summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
-rw-r--r--doxygen/examples/H5DO_examples.c2
-rw-r--r--fortran/src/H5Af.c24
-rw-r--r--fortran/src/H5Df.c52
-rw-r--r--fortran/src/H5Ef.c12
-rw-r--r--fortran/src/H5Ff.c14
-rw-r--r--fortran/src/H5Gf.c44
-rw-r--r--fortran/src/H5If.c4
-rw-r--r--fortran/src/H5Lf.c30
-rw-r--r--fortran/src/H5Of.c26
-rw-r--r--fortran/src/H5Pf.c84
-rw-r--r--fortran/src/H5Rf.c14
-rw-r--r--fortran/src/H5Sf.c34
-rw-r--r--fortran/src/H5Tf.c26
-rw-r--r--fortran/src/H5f90kit.c8
-rw-r--r--fortran/test/t.c10
-rw-r--r--hl/fortran/src/H5DSfc.c12
-rw-r--r--hl/fortran/src/H5IMcc.c4
-rw-r--r--hl/fortran/src/H5IMfc.c34
-rw-r--r--hl/fortran/src/H5LTfc.c48
-rw-r--r--hl/fortran/src/H5TBfc.c106
-rw-r--r--hl/src/H5DO.c4
-rw-r--r--hl/src/H5DS.c156
-rw-r--r--hl/src/H5IM.c20
-rw-r--r--hl/src/H5LD.c44
-rw-r--r--hl/src/H5LT.c84
-rw-r--r--hl/src/H5LTanalyze.c8
-rw-r--r--hl/src/H5LTparse.c10
-rw-r--r--hl/src/H5PT.c18
-rw-r--r--hl/src/H5TB.c78
-rw-r--r--hl/test/gen_test_ds.c16
-rw-r--r--hl/test/test_ds.c72
-rw-r--r--hl/test/test_dset_append.c14
-rw-r--r--hl/test/test_file_image.c70
-rw-r--r--hl/test/test_h5do_compat.c2
-rw-r--r--hl/test/test_image.c92
-rw-r--r--hl/test/test_ld.c40
-rw-r--r--hl/test/test_lite.c144
-rw-r--r--hl/test/test_packet.c10
-rw-r--r--hl/test/test_packet_vlen.c123
-rw-r--r--hl/test/test_table.c29
-rw-r--r--hl/tools/gif2h5/hdf2gif.c2
-rw-r--r--hl/tools/h5watch/extend_dset.c48
-rw-r--r--hl/tools/h5watch/h5watch.c129
-rw-r--r--hl/tools/h5watch/h5watchgentest.c10
-rw-r--r--src/H5.c75
-rw-r--r--src/H5A.c24
-rw-r--r--src/H5AC.c234
-rw-r--r--src/H5ACdbg.c32
-rw-r--r--src/H5ACmpio.c328
-rw-r--r--src/H5ACproxy_entry.c56
-rw-r--r--src/H5Abtree2.c20
-rw-r--r--src/H5Adense.c114
-rw-r--r--src/H5Aint.c202
-rw-r--r--src/H5Atest.c2
-rw-r--r--src/H5B.c262
-rw-r--r--src/H5B2.c100
-rw-r--r--src/H5B2cache.c144
-rw-r--r--src/H5B2dbg.c145
-rw-r--r--src/H5B2hdr.c62
-rw-r--r--src/H5B2int.c98
-rw-r--r--src/H5B2internal.c118
-rw-r--r--src/H5B2leaf.c98
-rw-r--r--src/H5B2stat.c6
-rw-r--r--src/H5B2test.c32
-rw-r--r--src/H5Bcache.c38
-rw-r--r--src/H5Bdbg.c88
-rw-r--r--src/H5C.c1242
-rw-r--r--src/H5CS.c44
-rw-r--r--src/H5CX.c340
-rw-r--r--src/H5Cdbg.c453
-rw-r--r--src/H5Cimage.c703
-rw-r--r--src/H5Clog.c84
-rw-r--r--src/H5Clog_json.c134
-rw-r--r--src/H5Clog_trace.c116
-rw-r--r--src/H5Cmpio.c263
-rw-r--r--src/H5Cpkg.h472
-rw-r--r--src/H5Cprefetched.c26
-rw-r--r--src/H5Cprivate.h2
-rw-r--r--src/H5Cquery.c30
-rw-r--r--src/H5Ctag.c90
-rw-r--r--src/H5Ctest.c4
-rw-r--r--src/H5D.c4
-rw-r--r--src/H5Dbtree.c278
-rw-r--r--src/H5Dbtree2.c250
-rw-r--r--src/H5Dchunk.c753
-rw-r--r--src/H5Dcompact.c46
-rw-r--r--src/H5Dcontig.c144
-rw-r--r--src/H5Ddbg.c3
-rw-r--r--src/H5Dearray.c294
-rw-r--r--src/H5Defl.c86
-rw-r--r--src/H5Dfarray.c278
-rw-r--r--src/H5Dfill.c54
-rw-r--r--src/H5Dint.c202
-rw-r--r--src/H5Dio.c62
-rw-r--r--src/H5Dlayout.c40
-rw-r--r--src/H5Dmpio.c254
-rw-r--r--src/H5Dnone.c108
-rw-r--r--src/H5Doh.c28
-rw-r--r--src/H5Dscatgath.c168
-rw-r--r--src/H5Dselect.c28
-rw-r--r--src/H5Dsingle.c142
-rw-r--r--src/H5Dtest.c10
-rw-r--r--src/H5Dvirtual.c286
-rw-r--r--src/H5E.c48
-rw-r--r--src/H5EA.c86
-rw-r--r--src/H5EAcache.c250
-rw-r--r--src/H5EAdbg.c176
-rw-r--r--src/H5EAdblkpage.c18
-rw-r--r--src/H5EAdblock.c44
-rw-r--r--src/H5EAhdr.c72
-rw-r--r--src/H5EAiblock.c30
-rw-r--r--src/H5EAint.c8
-rw-r--r--src/H5EAsblock.c34
-rw-r--r--src/H5EAstat.c4
-rw-r--r--src/H5EAtest.c40
-rw-r--r--src/H5ESevent.c8
-rw-r--r--src/H5ESint.c106
-rw-r--r--src/H5ESlist.c16
-rw-r--r--src/H5Eint.c110
-rw-r--r--src/H5F.c8
-rw-r--r--src/H5FA.c64
-rw-r--r--src/H5FAcache.c142
-rw-r--r--src/H5FAdbg.c82
-rw-r--r--src/H5FAdblkpage.c24
-rw-r--r--src/H5FAdblock.c32
-rw-r--r--src/H5FAhdr.c44
-rw-r--r--src/H5FAint.c8
-rw-r--r--src/H5FAstat.c6
-rw-r--r--src/H5FAtest.c38
-rw-r--r--src/H5FD.c102
-rw-r--r--src/H5FDcore.c58
-rw-r--r--src/H5FDdirect.c86
-rw-r--r--src/H5FDfamily.c18
-rw-r--r--src/H5FDhdfs.c158
-rw-r--r--src/H5FDint.c296
-rw-r--r--src/H5FDlog.c214
-rw-r--r--src/H5FDmirror.c144
-rw-r--r--src/H5FDmpi.c38
-rw-r--r--src/H5FDmpio.c326
-rw-r--r--src/H5FDonion.c62
-rw-r--r--src/H5FDonion_header.c32
-rw-r--r--src/H5FDonion_history.c32
-rw-r--r--src/H5FDonion_index.c134
-rw-r--r--src/H5FDros3.c164
-rw-r--r--src/H5FDs3comms.c212
-rw-r--r--src/H5FDsec2.c32
-rw-r--r--src/H5FDspace.c70
-rw-r--r--src/H5FDsplitter.c102
-rw-r--r--src/H5FDsubfiling/H5FDioc.c92
-rw-r--r--src/H5FDsubfiling/H5FDioc_int.c34
-rw-r--r--src/H5FDsubfiling/H5FDioc_priv.h30
-rw-r--r--src/H5FDsubfiling/H5FDioc_threads.c168
-rw-r--r--src/H5FDsubfiling/H5FDsubfile_int.c36
-rw-r--r--src/H5FDsubfiling/H5FDsubfiling.c236
-rw-r--r--src/H5FDsubfiling/H5subfiling_common.c314
-rw-r--r--src/H5FL.c174
-rw-r--r--src/H5FO.c78
-rw-r--r--src/H5FS.c194
-rw-r--r--src/H5FScache.c254
-rw-r--r--src/H5FSdbg.c92
-rw-r--r--src/H5FSint.c8
-rw-r--r--src/H5FSsection.c405
-rw-r--r--src/H5FSstat.c4
-rw-r--r--src/H5FStest.c8
-rw-r--r--src/H5Faccum.c50
-rw-r--r--src/H5Fcwfs.c22
-rw-r--r--src/H5Fdbg.c100
-rw-r--r--src/H5Fefc.c112
-rw-r--r--src/H5Fint.c198
-rw-r--r--src/H5Fio.c88
-rw-r--r--src/H5Fmount.c44
-rw-r--r--src/H5Fmpi.c32
-rw-r--r--src/H5Fprivate.h4
-rw-r--r--src/H5Fquery.c226
-rw-r--r--src/H5Fsfile.c10
-rw-r--r--src/H5Fspace.c30
-rw-r--r--src/H5Fsuper.c102
-rw-r--r--src/H5Fsuper_cache.c122
-rw-r--r--src/H5Gbtree2.c18
-rw-r--r--src/H5Gcache.c42
-rw-r--r--src/H5Gcompact.c52
-rw-r--r--src/H5Gdense.c106
-rw-r--r--src/H5Gdeprec.c10
-rw-r--r--src/H5Gent.c88
-rw-r--r--src/H5Gint.c84
-rw-r--r--src/H5Glink.c38
-rw-r--r--src/H5Gloc.c60
-rw-r--r--src/H5Gname.c90
-rw-r--r--src/H5Gnode.c157
-rw-r--r--src/H5Gobj.c66
-rw-r--r--src/H5Goh.c22
-rw-r--r--src/H5Groot.c30
-rw-r--r--src/H5Gstab.c78
-rw-r--r--src/H5Gtest.c14
-rw-r--r--src/H5Gtraverse.c40
-rw-r--r--src/H5HF.c76
-rw-r--r--src/H5HFbtree2.c38
-rw-r--r--src/H5HFcache.c524
-rw-r--r--src/H5HFdbg.c341
-rw-r--r--src/H5HFdblock.c71
-rw-r--r--src/H5HFdtable.c18
-rw-r--r--src/H5HFhdr.c90
-rw-r--r--src/H5HFhuge.c84
-rw-r--r--src/H5HFiblock.c160
-rw-r--r--src/H5HFiter.c58
-rw-r--r--src/H5HFman.c60
-rw-r--r--src/H5HFsection.c571
-rw-r--r--src/H5HFspace.c52
-rw-r--r--src/H5HFstat.c8
-rw-r--r--src/H5HFtest.c48
-rw-r--r--src/H5HFtiny.c42
-rw-r--r--src/H5HG.c89
-rw-r--r--src/H5HGcache.c60
-rw-r--r--src/H5HGdbg.c54
-rw-r--r--src/H5HGquery.c6
-rw-r--r--src/H5HL.c118
-rw-r--r--src/H5HLcache.c150
-rw-r--r--src/H5HLdbg.c32
-rw-r--r--src/H5HLdblk.c16
-rw-r--r--src/H5HLint.c20
-rw-r--r--src/H5HLprfx.c4
-rw-r--r--src/H5Idbg.c28
-rw-r--r--src/H5Iint.c80
-rw-r--r--src/H5Lexternal.c2
-rw-r--r--src/H5Lint.c126
-rw-r--r--src/H5M.c4
-rw-r--r--src/H5MF.c501
-rw-r--r--src/H5MFaggr.c196
-rw-r--r--src/H5MFdbg.c81
-rw-r--r--src/H5MFsection.c139
-rw-r--r--src/H5MM.c16
-rw-r--r--src/H5O.c2
-rw-r--r--src/H5Oainfo.c76
-rw-r--r--src/H5Oalloc.c187
-rw-r--r--src/H5Oattr.c88
-rw-r--r--src/H5Oattribute.c132
-rw-r--r--src/H5Obogus.c22
-rw-r--r--src/H5Obtreek.c38
-rw-r--r--src/H5Ocache.c212
-rw-r--r--src/H5Ocache_image.c38
-rw-r--r--src/H5Ochunk.c48
-rw-r--r--src/H5Ocont.c38
-rw-r--r--src/H5Ocopy.c154
-rw-r--r--src/H5Ocopy_ref.c26
-rw-r--r--src/H5Odbg.c230
-rw-r--r--src/H5Odeprec.c10
-rw-r--r--src/H5Odrvinfo.c36
-rw-r--r--src/H5Odtype.c208
-rw-r--r--src/H5Oefl.c67
-rw-r--r--src/H5Ofill.c106
-rw-r--r--src/H5Oflush.c6
-rw-r--r--src/H5Ofsinfo.c64
-rw-r--r--src/H5Oginfo.c36
-rw-r--r--src/H5Oint.c226
-rw-r--r--src/H5Olayout.c137
-rw-r--r--src/H5Olinfo.c78
-rw-r--r--src/H5Olink.c108
-rw-r--r--src/H5Omessage.c374
-rw-r--r--src/H5Omtime.c46
-rw-r--r--src/H5Oname.c30
-rw-r--r--src/H5Opkg.h4
-rw-r--r--src/H5Opline.c66
-rw-r--r--src/H5Orefcount.c30
-rw-r--r--src/H5Osdspace.c56
-rw-r--r--src/H5Oshared.c98
-rw-r--r--src/H5Oshared.h15
-rw-r--r--src/H5Oshmesg.c34
-rw-r--r--src/H5Ostab.c46
-rw-r--r--src/H5Otest.c18
-rw-r--r--src/H5Ounknown.c2
-rw-r--r--src/H5P.c6
-rw-r--r--src/H5PB.c152
-rw-r--r--src/H5PLint.c10
-rw-r--r--src/H5PLpath.c64
-rw-r--r--src/H5PLplugin_cache.c12
-rw-r--r--src/H5Pdapl.c82
-rw-r--r--src/H5Pdcpl.c128
-rw-r--r--src/H5Pdeprec.c2
-rw-r--r--src/H5Pdxpl.c124
-rw-r--r--src/H5Pencdec.c68
-rw-r--r--src/H5Pfapl.c174
-rw-r--r--src/H5Pfcpl.c40
-rw-r--r--src/H5Pgcpl.c4
-rw-r--r--src/H5Pint.c310
-rw-r--r--src/H5Plapl.c42
-rw-r--r--src/H5Pocpl.c32
-rw-r--r--src/H5Pocpypl.c34
-rw-r--r--src/H5Pstrcpl.c10
-rw-r--r--src/H5R.c8
-rw-r--r--src/H5RS.c74
-rw-r--r--src/H5Rdeprec.c18
-rw-r--r--src/H5Rint.c168
-rw-r--r--src/H5S.c86
-rw-r--r--src/H5SL.c150
-rw-r--r--src/H5SM.c292
-rw-r--r--src/H5SMbtree2.c18
-rw-r--r--src/H5SMcache.c124
-rw-r--r--src/H5SMmessage.c28
-rw-r--r--src/H5SMtest.c4
-rw-r--r--src/H5Sall.c110
-rw-r--r--src/H5Sdbg.c10
-rw-r--r--src/H5Shyper.c974
-rw-r--r--src/H5Smpio.c108
-rw-r--r--src/H5Snone.c108
-rw-r--r--src/H5Spoint.c168
-rw-r--r--src/H5Sselect.c196
-rw-r--r--src/H5Stest.c12
-rw-r--r--src/H5T.c304
-rw-r--r--src/H5TS.c12
-rw-r--r--src/H5Tarray.c14
-rw-r--r--src/H5Tbit.c24
-rw-r--r--src/H5Tcommit.c48
-rw-r--r--src/H5Tcompound.c34
-rw-r--r--src/H5Tconv.c205
-rw-r--r--src/H5Tdbg.c87
-rw-r--r--src/H5Tenum.c33
-rw-r--r--src/H5Tfields.c34
-rw-r--r--src/H5Tfixed.c2
-rw-r--r--src/H5Tnative.c10
-rw-r--r--src/H5Toffset.c12
-rw-r--r--src/H5Toh.c10
-rw-r--r--src/H5Tprecis.c12
-rw-r--r--src/H5Tref.c148
-rw-r--r--src/H5Tvisit.c4
-rw-r--r--src/H5Tvlen.c106
-rw-r--r--src/H5UC.c12
-rw-r--r--src/H5VLcallback.c222
-rw-r--r--src/H5VLdyn_ops.c10
-rw-r--r--src/H5VLint.c122
-rw-r--r--src/H5VLnative.c24
-rw-r--r--src/H5VLnative_blob.c16
-rw-r--r--src/H5VLnative_dataset.c20
-rw-r--r--src/H5VLnative_file.c2
-rw-r--r--src/H5VLnative_group.c2
-rw-r--r--src/H5VLnative_introspect.c2
-rw-r--r--src/H5VLnative_token.c12
-rw-r--r--src/H5VM.c204
-rw-r--r--src/H5VMprivate.h8
-rw-r--r--src/H5WB.c22
-rw-r--r--src/H5Z.c102
-rw-r--r--src/H5Zdeflate.c8
-rw-r--r--src/H5Zfletcher32.c2
-rw-r--r--src/H5Znbit.c26
-rw-r--r--src/H5Zscaleoffset.c30
-rw-r--r--src/H5Zshuffle.c4
-rw-r--r--src/H5Zszip.c20
-rw-r--r--src/H5Ztrans.c24
-rw-r--r--src/H5checksum.c20
-rw-r--r--src/H5dbg.c20
-rw-r--r--src/H5detect.c28
-rw-r--r--src/H5make_libsettings.c68
-rw-r--r--src/H5mpi.c18
-rw-r--r--src/H5system.c50
-rw-r--r--src/H5timer.c16
-rw-r--r--src/H5trace.c319
-rw-r--r--test/API/H5_api_async_test.c92
-rw-r--r--test/API/H5_api_attribute_test.c2348
-rw-r--r--test/API/H5_api_dataset_test.c1664
-rw-r--r--test/API/H5_api_datatype_test.c450
-rw-r--r--test/API/H5_api_file_test.c455
-rw-r--r--test/API/H5_api_group_test.c372
-rw-r--r--test/API/H5_api_link_test.c7192
-rw-r--r--test/API/H5_api_misc_test.c150
-rw-r--r--test/API/H5_api_object_test.c1346
-rw-r--r--test/API/H5_api_test.c64
-rw-r--r--test/API/H5_api_test_util.c118
-rw-r--r--test/API/tarray.c26
-rw-r--r--test/API/tattr.c202
-rw-r--r--test/API/tchecksum.c16
-rw-r--r--test/API/tcoords.c42
-rw-r--r--test/API/testhdf5.c132
-rw-r--r--test/API/tfile.c46
-rw-r--r--test/API/tgenprop.c100
-rw-r--r--test/API/th5o.c36
-rw-r--r--test/API/th5s.c146
-rw-r--r--test/API/tid.c56
-rw-r--r--test/API/titerate.c30
-rw-r--r--test/API/tmisc.c148
-rw-r--r--test/API/trefer.c188
-rw-r--r--test/API/tselect.c756
-rw-r--r--test/API/ttime.c4
-rw-r--r--test/API/tunicode.c34
-rw-r--r--test/API/tvlstr.c18
-rw-r--r--test/API/tvltypes.c80
-rw-r--r--test/accum.c494
-rw-r--r--test/accum_swmr_reader.c2
-rw-r--r--test/app_ref.c4
-rw-r--r--test/big.c66
-rw-r--r--test/bittests.c278
-rw-r--r--test/btree2.c60
-rw-r--r--test/cache.c1196
-rw-r--r--test/cache_api.c63
-rw-r--r--test/cache_common.c1143
-rw-r--r--test/cache_common.h2
-rw-r--r--test/cache_image.c690
-rw-r--r--test/cache_logging.c16
-rw-r--r--test/cache_tagging.c64
-rw-r--r--test/chunk_info.c46
-rw-r--r--test/cmpd_dset.c122
-rw-r--r--test/cmpd_dtransform.c26
-rw-r--r--test/cork.c42
-rw-r--r--test/cross_read.c24
-rw-r--r--test/dangle.c6
-rw-r--r--test/del_many_dense_attrs.c2
-rw-r--r--test/direct_chunk.c180
-rw-r--r--test/dsets.c1045
-rw-r--r--test/dt_arith.c1276
-rw-r--r--test/dtransform.c32
-rw-r--r--test/dtypes.c982
-rw-r--r--test/earray.c184
-rw-r--r--test/efc.c6
-rw-r--r--test/enc_dec_plist.c16
-rw-r--r--test/enc_dec_plist_cross_platform.c12
-rw-r--r--test/enum.c40
-rw-r--r--test/err_compat.c66
-rw-r--r--test/error_test.c74
-rw-r--r--test/event_set.c4
-rw-r--r--test/evict_on_close.c66
-rw-r--r--test/extend.c52
-rw-r--r--test/external.c46
-rw-r--r--test/external_common.c6
-rw-r--r--test/external_env.c4
-rw-r--r--test/farray.c86
-rw-r--r--test/fheap.c430
-rw-r--r--test/file_image.c66
-rw-r--r--test/filenotclosed.c8
-rw-r--r--test/fillval.c329
-rw-r--r--test/filter_fail.c40
-rw-r--r--test/filter_plugin.c60
-rw-r--r--test/flush1.c16
-rw-r--r--test/flush2.c20
-rw-r--r--test/flushrefresh.c40
-rw-r--r--test/freespace.c195
-rw-r--r--test/gen_bounds.c36
-rw-r--r--test/gen_cross.c8
-rw-r--r--test/gen_deflate.c6
-rw-r--r--test/gen_file_image.c4
-rw-r--r--test/gen_filters.c4
-rw-r--r--test/gen_new_super.c10
-rw-r--r--test/gen_nullspace.c20
-rw-r--r--test/gen_plist.c16
-rw-r--r--test/genall5.c728
-rw-r--r--test/getname.c18
-rw-r--r--test/gheap.c56
-rw-r--r--test/h5test.c142
-rw-r--r--test/hdfs.c50
-rw-r--r--test/hyperslab.c248
-rw-r--r--test/istore.c114
-rw-r--r--test/lheap.c8
-rw-r--r--test/links.c456
-rw-r--r--test/links_env.c14
-rw-r--r--test/mdset.c16
-rw-r--r--test/mf.c111
-rw-r--r--test/mirror_vfd.c280
-rw-r--r--test/mount.c4
-rw-r--r--test/mtime.c6
-rw-r--r--test/ntypes.c328
-rw-r--r--test/objcopy.c184
-rw-r--r--test/objcopy_ref.c54
-rw-r--r--test/ohdr.c28
-rw-r--r--test/onion.c356
-rw-r--r--test/page_buffer.c102
-rw-r--r--test/reserved.c2
-rw-r--r--test/ros3.c60
-rw-r--r--test/s3comms.c110
-rw-r--r--test/select_io_dset.c498
-rw-r--r--test/set_extent.c282
-rw-r--r--test/stab.c20
-rw-r--r--test/swmr.c332
-rw-r--r--test/swmr_addrem_writer.c76
-rw-r--r--test/swmr_common.c14
-rw-r--r--test/swmr_generator.c68
-rw-r--r--test/swmr_reader.c136
-rw-r--r--test/swmr_remove_reader.c122
-rw-r--r--test/swmr_remove_writer.c70
-rw-r--r--test/swmr_sparse_reader.c105
-rw-r--r--test/swmr_sparse_writer.c68
-rw-r--r--test/swmr_start_write.c110
-rw-r--r--test/swmr_writer.c82
-rw-r--r--test/tarray.c26
-rw-r--r--test/tattr.c196
-rw-r--r--test/tcheck_version.c30
-rw-r--r--test/tchecksum.c16
-rw-r--r--test/tcoords.c42
-rw-r--r--test/testframe.c42
-rw-r--r--test/testhdf5.c4
-rw-r--r--test/testmeta.c22
-rw-r--r--test/tfile.c46
-rw-r--r--test/tgenprop.c100
-rw-r--r--test/th5_system.c12
-rw-r--r--test/th5o.c36
-rw-r--r--test/th5s.c146
-rw-r--r--test/thread_id.c26
-rw-r--r--test/tid.c56
-rw-r--r--test/timer.c49
-rw-r--r--test/titerate.c20
-rw-r--r--test/tmeta.c2
-rw-r--r--test/tmisc.c136
-rw-r--r--test/trefer.c188
-rw-r--r--test/trefer_deprec.c116
-rw-r--r--test/trefer_shutdown.c22
-rw-r--r--test/trefstr.c16
-rw-r--r--test/tselect.c750
-rw-r--r--test/tskiplist.c22
-rw-r--r--test/tsohm.c70
-rw-r--r--test/ttime.c4
-rw-r--r--test/ttsafe.c4
-rw-r--r--test/ttsafe_acreate.c4
-rw-r--r--test/ttsafe_cancel.c26
-rw-r--r--test/ttsafe_dcreate.c2
-rw-r--r--test/ttsafe_error.c22
-rw-r--r--test/tunicode.c34
-rw-r--r--test/tvlstr.c18
-rw-r--r--test/tvltypes.c80
-rw-r--r--test/twriteorder.c102
-rw-r--r--test/unlink.c42
-rw-r--r--test/unregister.c24
-rw-r--r--test/use_append_chunk.c54
-rw-r--r--test/use_append_chunk_mirror.c70
-rw-r--r--test/use_append_mchunks.c54
-rw-r--r--test/use_common.c246
-rw-r--r--test/use_disable_mdc_flushes.c156
-rw-r--r--test/vds.c391
-rw-r--r--test/vds_env.c52
-rw-r--r--test/vds_swmr_reader.c10
-rw-r--r--test/vds_swmr_writer.c14
-rw-r--r--test/vfd.c292
-rw-r--r--test/vfd_plugin.c12
-rw-r--r--test/vol.c28
-rw-r--r--test/vol_plugin.c6
-rw-r--r--testpar/API/H5_api_async_test_parallel.c358
-rw-r--r--testpar/API/H5_api_attribute_test_parallel.c14
-rw-r--r--testpar/API/H5_api_dataset_test_parallel.c1756
-rw-r--r--testpar/API/H5_api_datatype_test_parallel.c14
-rw-r--r--testpar/API/H5_api_file_test_parallel.c50
-rw-r--r--testpar/API/H5_api_group_test_parallel.c14
-rw-r--r--testpar/API/H5_api_link_test_parallel.c14
-rw-r--r--testpar/API/H5_api_misc_test_parallel.c14
-rw-r--r--testpar/API/H5_api_object_test_parallel.c14
-rw-r--r--testpar/API/H5_api_test_parallel.c98
-rw-r--r--testpar/API/t_bigio.c190
-rw-r--r--testpar/API/t_chunk_alloc.c12
-rw-r--r--testpar/API/t_coll_chunk.c64
-rw-r--r--testpar/API/t_coll_md_read.c34
-rw-r--r--testpar/API/t_dset.c344
-rw-r--r--testpar/API/t_file.c26
-rw-r--r--testpar/API/t_file_image.c26
-rw-r--r--testpar/API/t_filter_read.c25
-rw-r--r--testpar/API/t_mdset.c246
-rw-r--r--testpar/API/t_ph5basic.c12
-rw-r--r--testpar/API/t_prop.c12
-rw-r--r--testpar/API/t_pshutdown.c8
-rw-r--r--testpar/API/t_shapesame.c565
-rw-r--r--testpar/API/t_span_tree.c329
-rw-r--r--testpar/API/testphdf5.c97
-rw-r--r--testpar/t_2Gio.c418
-rw-r--r--testpar/t_bigio.c186
-rw-r--r--testpar/t_cache.c1129
-rw-r--r--testpar/t_cache_image.c395
-rw-r--r--testpar/t_chunk_alloc.c12
-rw-r--r--testpar/t_coll_chunk.c64
-rw-r--r--testpar/t_coll_md.c34
-rw-r--r--testpar/t_dset.c344
-rw-r--r--testpar/t_file.c26
-rw-r--r--testpar/t_file_image.c26
-rw-r--r--testpar/t_filter_read.c25
-rw-r--r--testpar/t_filters_parallel.c1527
-rw-r--r--testpar/t_mdset.c246
-rw-r--r--testpar/t_mpi.c238
-rw-r--r--testpar/t_pflush1.c30
-rw-r--r--testpar/t_pflush2.c20
-rw-r--r--testpar/t_ph5basic.c12
-rw-r--r--testpar/t_pmulti_dset.c20
-rw-r--r--testpar/t_pread.c86
-rw-r--r--testpar/t_prestart.c12
-rw-r--r--testpar/t_prop.c12
-rw-r--r--testpar/t_pshutdown.c6
-rw-r--r--testpar/t_select_io_dset.c535
-rw-r--r--testpar/t_shapesame.c557
-rw-r--r--testpar/t_span_tree.c329
-rw-r--r--testpar/t_subfiling_vfd.c286
-rw-r--r--testpar/t_vfd.c364
-rw-r--r--testpar/testphdf5.c97
-rw-r--r--tools/lib/h5diff.c75
-rw-r--r--tools/lib/h5diff_array.c126
-rw-r--r--tools/lib/h5diff_attr.c38
-rw-r--r--tools/lib/h5diff_dset.c78
-rw-r--r--tools/lib/h5diff_util.c2
-rw-r--r--tools/lib/h5tools.c64
-rw-r--r--tools/lib/h5tools_dump.c170
-rw-r--r--tools/lib/h5tools_filters.c2
-rw-r--r--tools/lib/h5tools_ref.c12
-rw-r--r--tools/lib/h5tools_str.c100
-rw-r--r--tools/lib/h5tools_utils.c104
-rw-r--r--tools/lib/h5trav.c110
-rw-r--r--tools/lib/io_timer.c12
-rw-r--r--tools/libtest/h5tools_test_utils.c86
-rw-r--r--tools/src/h5copy/h5copy.c36
-rw-r--r--tools/src/h5diff/h5diff_common.c56
-rw-r--r--tools/src/h5diff/h5diff_main.c12
-rw-r--r--tools/src/h5diff/ph5diff_main.c28
-rw-r--r--tools/src/h5dump/h5dump.c72
-rw-r--r--tools/src/h5dump/h5dump_ddl.c78
-rw-r--r--tools/src/h5dump/h5dump_xml.c266
-rw-r--r--tools/src/h5format_convert/h5format_convert.c107
-rw-r--r--tools/src/h5import/h5import.c1612
-rw-r--r--tools/src/h5jam/h5jam.c64
-rw-r--r--tools/src/h5jam/h5unjam.c71
-rw-r--r--tools/src/h5ls/h5ls.c130
-rw-r--r--tools/src/h5perf/pio_engine.c172
-rw-r--r--tools/src/h5perf/pio_perf.c412
-rw-r--r--tools/src/h5perf/sio_engine.c126
-rw-r--r--tools/src/h5perf/sio_perf.c302
-rw-r--r--tools/src/h5repack/h5repack.c88
-rw-r--r--tools/src/h5repack/h5repack_copy.c92
-rw-r--r--tools/src/h5repack/h5repack_main.c50
-rw-r--r--tools/src/h5repack/h5repack_opttable.c14
-rw-r--r--tools/src/h5repack/h5repack_parse.c116
-rw-r--r--tools/src/h5repack/h5repack_refs.c117
-rw-r--r--tools/src/h5stat/h5stat.c420
-rw-r--r--tools/src/misc/h5clear.c12
-rw-r--r--tools/src/misc/h5debug.c293
-rw-r--r--tools/src/misc/h5delete.c4
-rw-r--r--tools/src/misc/h5mkgrp.c26
-rw-r--r--tools/src/misc/h5repart.c118
-rw-r--r--tools/test/h5copy/h5copygentest.c86
-rw-r--r--tools/test/h5diff/h5diffgentest.c540
-rw-r--r--tools/test/h5dump/h5dumpgentest.c1376
-rw-r--r--tools/test/h5format_convert/h5fc_chk_idx.c30
-rw-r--r--tools/test/h5format_convert/h5fc_gentest.c6
-rw-r--r--tools/test/h5import/h5importtest.c202
-rw-r--r--tools/test/h5jam/getub.c20
-rw-r--r--tools/test/h5jam/h5jamgentest.c10
-rw-r--r--tools/test/h5jam/tellub.c14
-rw-r--r--tools/test/h5repack/h5repackgentest.c10
-rw-r--r--tools/test/h5repack/h5repacktst.c274
-rw-r--r--tools/test/h5repack/testh5repack_detect_szip.c4
-rw-r--r--tools/test/h5stat/h5stat_gentest.c2
-rw-r--r--tools/test/misc/clear_open_chk.c22
-rw-r--r--tools/test/misc/h5clear_gentest.c8
-rw-r--r--tools/test/misc/h5perf_gentest.c28
-rw-r--r--tools/test/misc/h5repart_gentest.c38
-rw-r--r--tools/test/misc/repart_test.c6
-rw-r--r--tools/test/misc/talign.c46
-rw-r--r--tools/test/perform/chunk_cache.c32
-rw-r--r--tools/test/perform/direct_write_perf.c2
-rw-r--r--tools/test/perform/iopipe.c74
-rw-r--r--tools/test/perform/overhead.c10
-rw-r--r--tools/test/perform/perf_meta.c23
-rw-r--r--tools/test/perform/zip_perf.c104
-rw-r--r--utils/tools/h5dwalk/h5dwalk.c76
651 files changed, 44374 insertions, 44739 deletions
diff --git a/doxygen/examples/H5DO_examples.c b/doxygen/examples/H5DO_examples.c
index 7f4096e..2a2d6dd 100644
--- a/doxygen/examples/H5DO_examples.c
+++ b/doxygen/examples/H5DO_examples.c
@@ -190,7 +190,7 @@ size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
/* Get the size of the compressed chunk */
ret = H5Dget_chunk_storage_size(dataset, offset, &read_chunk_nbytes);
- readbuf = HDmalloc(read_chunk_nbytes);
+ readbuf = malloc(read_chunk_nbytes);
pt_readbuf = (const Bytef *)readbuf;
/* Use H5DOread_chunk() to read the chunk back */
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index c17d3f8..68926e2 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -60,7 +60,7 @@ h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen)
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -135,7 +135,7 @@ h5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf)
/*
* Allocate buffer to hold name of an attribute
*/
- if (NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
+ if (NULL == (c_buf = (char *)malloc(c_bufsize)))
HGOTO_DONE(FAIL);
/*
@@ -151,7 +151,7 @@ h5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf)
done:
if (c_buf)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -204,9 +204,9 @@ h5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd
done:
if (c_attr_name)
- HDfree(c_attr_name);
+ free(c_attr_name);
if (c_obj_name)
- HDfree(c_obj_name);
+ free(c_obj_name);
return ret_value;
}
/****if* H5Af/h5adelete_by_idx_c
@@ -256,7 +256,7 @@ h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f
done:
if (c_obj_name)
- HDfree(c_obj_name);
+ free(c_obj_name);
return ret_value;
}
@@ -325,7 +325,7 @@ h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_
* Allocate buffer to hold name of an attribute
*/
c_buf_size = (size_t)*size + 1;
- if (NULL == (c_buf = (char *)HDmalloc(c_buf_size)))
+ if (NULL == (c_buf = (char *)malloc(c_buf_size)))
HGOTO_DONE(FAIL)
/*
@@ -344,9 +344,9 @@ h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_
done:
if (c_obj_name)
- HDfree(c_obj_name);
+ free(c_obj_name);
if (c_buf)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -474,7 +474,7 @@ h5aget_info_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_
done:
if (c_obj_name)
- HDfree(c_obj_name);
+ free(c_obj_name);
return ret_value;
}
@@ -542,9 +542,9 @@ h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fc
done:
if (c_obj_name)
- HDfree(c_obj_name);
+ free(c_obj_name);
if (c_attr_name)
- HDfree(c_attr_name);
+ free(c_attr_name);
return ret_value;
}
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index 3df2fbf..83032c1 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -67,10 +67,10 @@ h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id
/*
* Allocate temporary buffer and copy references from Fortran.
*/
- buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * n);
+ buf_c = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * n);
if (buf_c != NULL) {
for (i = 0; i < n; i++) {
- HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE);
+ memcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE);
buf = buf + REF_REG_BUF_LEN_F;
}
}
@@ -85,7 +85,7 @@ h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id
c_mem_space_id = (hid_t)*mem_space_id;
c_file_space_id = (hid_t)*file_space_id;
ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- HDfree(buf_c);
+ free(buf_c);
if (ret < 0)
return ret_value;
ret_value = 0;
@@ -138,7 +138,7 @@ h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
/*
* Allocate temporary buffer.
*/
- buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * (size_t)n);
+ buf_c = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * (size_t)n);
if (buf_c != NULL) {
/*
* Call H5Dread function.
@@ -150,12 +150,12 @@ h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
if (ret >= 0) {
for (i = 0; i < n; i++) {
- HDmemcpy(buf, &buf_c[i], H5R_DSET_REG_REF_BUF_SIZE);
+ memcpy(buf, &buf_c[i], H5R_DSET_REG_REF_BUF_SIZE);
buf = buf + REF_REG_BUF_LEN_F;
}
}
if (buf_c != NULL)
- HDfree(buf_c);
+ free(buf_c);
}
if (ret < 0)
return ret_value;
@@ -320,7 +320,7 @@ h5dvlen_get_max_len_c(hid_t_f *dset_id, hid_t_f *type_id, hid_t_f *space_id, siz
if (num_elem < 0)
return ret_value;
- c_buf = (hvl_t *)HDmalloc(sizeof(hvl_t) * (size_t)num_elem);
+ c_buf = (hvl_t *)malloc(sizeof(hvl_t) * (size_t)num_elem);
if (c_buf == NULL)
return ret_value;
status = H5Dread(c_dset_id, c_type_id, H5S_ALL, c_space_id, H5P_DEFAULT, c_buf);
@@ -336,7 +336,7 @@ h5dvlen_get_max_len_c(hid_t_f *dset_id, hid_t_f *type_id, hid_t_f *space_id, siz
DONE:
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
/****if* H5Df/h5dwrite_vl_integer_c
@@ -393,7 +393,7 @@ h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space
c_file_space_id = (hid_t)*file_space_id;
c_xfer_prp = (hid_t)*xfer_prp;
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL)
return ret_value;
tmp = (int_f *)buf;
@@ -411,7 +411,7 @@ h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space
goto DONE;
ret_value = 0;
DONE:
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -471,7 +471,7 @@ h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
if (num_elem != (hssize_t)dims[1])
return ret_value;
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL)
return ret_value;
/*
@@ -487,7 +487,7 @@ h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
ret_value = 0;
DONE:
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -547,14 +547,14 @@ h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
/*
* Allocate arra of character pointers
*/
- c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
+ c_buf = (char **)malloc((size_t)num_elem * sizeof(char *));
if (c_buf == NULL)
return ret_value;
/* Copy data to long C string */
tmp = (char *)HD5f2cstring(buf, (size_t)(max_len * num_elem));
if (tmp == NULL) {
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
/*
@@ -562,7 +562,7 @@ h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
*/
tmp_p = tmp;
for (i = 0; i < num_elem; i++) {
- c_buf[i] = (char *)HDmalloc((size_t)len[i] + 1);
+ c_buf[i] = (char *)malloc((size_t)len[i] + 1);
memcpy(c_buf[i], tmp_p, (size_t)len[i]);
c_buf[i][len[i]] = '\0';
tmp_p = tmp_p + max_len;
@@ -578,8 +578,8 @@ h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
ret_value = 0;
DONE:
H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- HDfree(c_buf);
- HDfree(tmp);
+ free(c_buf);
+ free(tmp);
return ret_value;
}
/****if* H5Df/h5dread_vl_string_c
@@ -638,7 +638,7 @@ h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i
/*
* Allocate array of character pointers
*/
- c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
+ c_buf = (char **)malloc((size_t)num_elem * sizeof(char *));
if (c_buf == NULL)
return ret_value;
@@ -647,11 +647,11 @@ h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i
*/
status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
if (status < 0) {
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
/* Copy data to long C string */
- tmp = (char *)HDmalloc((size_t)(max_len * num_elem) + 1);
+ tmp = (char *)malloc((size_t)(max_len * num_elem) + 1);
tmp_p = tmp;
for (i = 0; i < max_len * num_elem; i++)
tmp[i] = ' ';
@@ -664,8 +664,8 @@ h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i
HD5packFstring(tmp, _fcdtocp(buf), (size_t)(max_len * num_elem));
ret_value = 0;
H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- HDfree(c_buf);
- HDfree(tmp);
+ free(c_buf);
+ free(tmp);
return ret_value;
}
@@ -723,7 +723,7 @@ h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id
c_file_space_id = (hid_t)*file_space_id;
c_xfer_prp = (hid_t)*xfer_prp;
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL)
return ret_value;
tmp = (real_f *)buf;
@@ -741,7 +741,7 @@ h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id
goto DONE;
ret_value = 0;
DONE:
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -801,7 +801,7 @@ h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
if (num_elem != (hssize_t)dims[1])
return ret_value;
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL)
return ret_value;
/*
@@ -818,7 +818,7 @@ h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
ret_value = 0;
DONE:
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c
index 7948808..16ba70f 100644
--- a/fortran/src/H5Ef.c
+++ b/fortran/src/H5Ef.c
@@ -84,7 +84,7 @@ h5eprint_c1(_fcd name, int_f *namelen)
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if (NULL == (file = HDfopen(c_name, "a")))
+ if (NULL == (file = fopen(c_name, "a")))
HGOTO_DONE(FAIL)
/*
@@ -97,7 +97,7 @@ done:
if (file)
HDfclose(file);
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -164,7 +164,7 @@ h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen)
int_f ret_value = 0;
if (c_namelen > 0)
- c_name = (char *)HDmalloc(c_namelen + 1);
+ c_name = (char *)malloc(c_namelen + 1);
if (!c_name)
HGOTO_DONE(FAIL)
@@ -179,7 +179,7 @@ h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen)
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -212,7 +212,7 @@ h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen)
int_f ret_value = 0;
if (c_namelen > 0)
- c_name = (char *)HDmalloc(c_namelen + 1);
+ c_name = (char *)malloc(c_namelen + 1);
if (!c_name)
HGOTO_DONE(FAIL)
@@ -227,7 +227,7 @@ h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen)
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index b2f09ef..e7b18f6 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -87,7 +87,7 @@ h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hi
*file_id = c_file_id;
}
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -147,7 +147,7 @@ h5fmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid
if (status >= 0)
ret_value = 0;
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -195,7 +195,7 @@ h5funmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen)
if (status >= 0)
ret_value = 0;
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -343,7 +343,7 @@ h5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f
c_file_id = (hid_t)*file_id;
c_obj_type = (unsigned)*obj_type;
c_max_objs = (size_t)*max_objs;
- c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t) * c_max_objs);
+ c_obj_ids = (hid_t *)malloc(sizeof(hid_t) * c_max_objs);
c_num_objs = H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, c_obj_ids);
if (c_num_objs < 0)
@@ -351,7 +351,7 @@ h5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f
for (u = 0; u < c_max_objs; u++)
obj_ids[u] = (hid_t_f)c_obj_ids[u];
- HDfree(c_obj_ids);
+ free(c_obj_ids);
*num_objs = (size_t_f)c_num_objs;
return ret_value;
@@ -417,7 +417,7 @@ h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen)
/*
* Allocate buffer to hold name of file
*/
- if (NULL == (c_buf = (char *)HDmalloc((size_t)*buflen + 1)))
+ if (NULL == (c_buf = (char *)malloc((size_t)*buflen + 1)))
HGOTO_DONE(FAIL);
/*
@@ -434,7 +434,7 @@ h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen)
done:
*size = (size_t_f)size_c;
if (c_buf)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index 445fcea..6342bc3 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -68,7 +68,7 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _f
*/
c_obj_namelen = (size_t)*obj_namelen;
if (c_obj_namelen)
- if (NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1)))
+ if (NULL == (c_obj_name = (char *)malloc(c_obj_namelen + 1)))
goto DONE;
/* Get a temporary group ID for the group to query */
@@ -100,9 +100,9 @@ DONE:
H5Gclose(gid);
if (c_obj_name)
- HDfree(c_obj_name);
+ free(c_obj_name);
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -147,7 +147,7 @@ h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers)
DONE:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -227,9 +227,9 @@ h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_n
DONE:
if (c_current_name)
- HDfree(c_current_name);
+ free(c_current_name);
if (c_new_name)
- HDfree(c_new_name);
+ free(c_new_name);
return ret_value;
}
@@ -314,9 +314,9 @@ h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_t
DONE:
if (c_cur_name)
- HDfree(c_cur_name);
+ free(c_cur_name);
if (c_new_name)
- HDfree(c_new_name);
+ free(c_new_name);
return ret_value;
}
@@ -358,7 +358,7 @@ h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen)
DONE:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -406,9 +406,9 @@ h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int
DONE:
if (c_src_name)
- HDfree(c_src_name);
+ free(c_src_name);
if (c_dst_name)
- HDfree(c_dst_name);
+ free(c_dst_name);
return ret_value;
}
@@ -459,9 +459,9 @@ h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_
DONE:
if (c_src_name)
- HDfree(c_src_name);
+ free(c_src_name);
if (c_dst_name)
- HDfree(c_dst_name);
+ free(c_dst_name);
return ret_value;
}
@@ -503,9 +503,9 @@ h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fc
* Allocate buffer to hold name of the value
*/
if (*size)
- c_value = (char *)HDmalloc((size_t)*size);
+ c_value = (char *)malloc((size_t)*size);
if (c_value == NULL) {
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -523,9 +523,9 @@ h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fc
DONE:
if (c_value)
- HDfree(c_value);
+ free(c_value);
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -573,9 +573,9 @@ h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f
DONE:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_comment)
- HDfree(c_comment);
+ free(c_comment);
return ret_value;
}
@@ -616,7 +616,7 @@ h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize,
*/
c_bufsize = (size_t)*bufsize;
if (c_bufsize) {
- if (NULL == (c_comment = (char *)HDmalloc(c_bufsize + 1)))
+ if (NULL == (c_comment = (char *)malloc(c_bufsize + 1)))
goto DONE;
} /* end if */
@@ -634,9 +634,9 @@ h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize,
DONE:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_comment)
- HDfree(c_comment);
+ free(c_comment);
return ret_value;
}
diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c
index ffc6e08..40d5c8d 100644
--- a/fortran/src/H5If.c
+++ b/fortran/src/H5If.c
@@ -94,7 +94,7 @@ h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size
* Allocate buffer to hold name of an object
*/
c_buf_size = (size_t)*buf_size + 1;
- c_buf = (char *)HDmalloc(c_buf_size);
+ c_buf = (char *)malloc(c_buf_size);
if (c_buf == NULL)
return ret_value;
@@ -114,7 +114,7 @@ h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size
ret_value = 0;
DONE:
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index ffc1d3d..7454a66 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -75,9 +75,9 @@ h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *de
done:
if (c_src_name)
- HDfree(c_src_name);
+ free(c_src_name);
if (c_dest_name)
- HDfree(c_dest_name);
+ free(c_dest_name);
return ret_value;
}
@@ -135,11 +135,11 @@ h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size
done:
if (c_file_name)
- HDfree(c_file_name);
+ free(c_file_name);
if (c_obj_name)
- HDfree(c_obj_name);
+ free(c_obj_name);
if (c_link_name)
- HDfree(c_link_name);
+ free(c_link_name);
return ret_value;
}
@@ -211,7 +211,7 @@ h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_
done:
if (c_link_name)
- HDfree(c_link_name);
+ free(c_link_name);
return ret_value;
}
@@ -389,9 +389,9 @@ h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *de
done:
if (c_src_name)
- HDfree(c_src_name);
+ free(c_src_name);
if (c_dest_name)
- HDfree(c_dest_name);
+ free(c_dest_name);
return ret_value;
}
@@ -443,7 +443,7 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
/*
* Allocate buffer to hold name of an attribute
*/
- if (NULL == (c_name = (char *)HDmalloc(c_size)))
+ if (NULL == (c_name = (char *)malloc(c_size)))
HGOTO_DONE(FAIL)
if ((c_size_link =
@@ -461,9 +461,9 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
done:
if (c_group_name)
- HDfree(c_group_name);
+ free(c_group_name);
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -625,9 +625,9 @@ done:
/* done: */
/* if(c_src_name) */
-/* HDfree(c_src_name); */
+/* free(c_src_name); */
/* if(c_dest_name) */
-/* HDfree(c_dest_name); */
+/* free(c_dest_name); */
/* return ret_value; */
/* } */
@@ -677,7 +677,7 @@ h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_
done:
if (c_link_name)
- HDfree(c_link_name);
+ free(c_link_name);
return ret_value;
}
@@ -739,7 +739,7 @@ h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index
*idx = (hsize_t_f)idx_c;
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index 5abe745..2ef08fe 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -128,7 +128,7 @@ h5olink_c(hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen,
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -273,7 +273,7 @@ h5oget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, int_f
done:
if (c_group_name)
- HDfree(c_group_name);
+ free(c_group_name);
return ret_value;
}
@@ -383,7 +383,7 @@ h5oexists_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -454,7 +454,7 @@ h5oset_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentlen)
done:
if (c_comment)
- HDfree(c_comment);
+ free(c_comment);
return ret_value;
}
@@ -506,9 +506,9 @@ h5oset_comment_by_name_c(hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_comment)
- HDfree(c_comment);
+ free(c_comment);
return ret_value;
}
@@ -544,7 +544,7 @@ h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize
* Allocate buffer to hold comment name
*/
- if (NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
+ if (NULL == (c_comment = (char *)malloc(c_commentsize)))
HGOTO_DONE(FAIL);
/*
@@ -563,7 +563,7 @@ h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize
done:
if (c_comment)
- HDfree(c_comment);
+ free(c_comment);
return ret_value;
}
@@ -609,7 +609,7 @@ h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd c
* Allocate buffer to hold comment name
*/
- if (NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
+ if (NULL == (c_comment = (char *)malloc(c_commentsize)))
HGOTO_DONE(FAIL);
/*
@@ -621,7 +621,7 @@ h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd c
HGOTO_DONE(FAIL);
if (c_name)
- HDfree(c_name);
+ free(c_name);
*bufsize = (size_t_f)c_bufsize;
@@ -630,16 +630,16 @@ h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd c
*/
if (c_comment) {
HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
- HDfree(c_comment);
+ free(c_comment);
}
return ret_value;
done:
if (c_comment)
- HDfree(c_comment);
+ free(c_comment);
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 38eba37..c13262e 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -1445,7 +1445,7 @@ h5pset_fapl_split_c(hid_t_f *prp_id, int_f *meta_len, _fcd meta_ext, hid_t_f *me
return ret_value;
c_raw_ext = (char *)HD5f2cstring(raw_ext, (size_t)*raw_len);
if (c_raw_ext == NULL) {
- HDfree(c_meta_ext);
+ free(c_meta_ext);
return ret_value;
}
@@ -1462,8 +1462,8 @@ h5pset_fapl_split_c(hid_t_f *prp_id, int_f *meta_len, _fcd meta_ext, hid_t_f *me
ret_value = 0;
DONE:
- HDfree(c_meta_ext);
- HDfree(c_raw_ext);
+ free(c_meta_ext);
+ free(c_raw_ext);
return ret_value;
}
@@ -1511,8 +1511,8 @@ h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f *meta_ext_size, _fcd meta_ext, hid
c_meta_ext_size = (size_t)*meta_ext_size;
c_raw_ext_size = (size_t)*raw_ext_size;
- c_meta_ext = (char *)HDmalloc(sizeof(char) * c_meta_ext_size);
- c_raw_ext = (char *)HDmalloc(sizeof(char) * c_raw_ext_size);
+ c_meta_ext = (char *)malloc(sizeof(char) * c_meta_ext_size);
+ c_raw_ext = (char *)malloc(sizeof(char) * c_raw_ext_size);
if (c_meta_ext == NULL || c_raw_ext == NULL)
return ret_value;
@@ -1726,7 +1726,7 @@ h5pset_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmt
unsigned int *c_cd_values;
unsigned i;
- c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
+ c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * c_cd_nelmts);
if (!c_cd_values)
return ret_value;
for (i = 0; i < c_cd_nelmts; i++)
@@ -1742,7 +1742,7 @@ h5pset_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmt
ret_value = 0;
DONE:
- HDfree(c_cd_values);
+ free(c_cd_values);
return ret_value;
}
@@ -1818,10 +1818,10 @@ h5pget_filter_c(hid_t_f *prp_id, int_f *filter_number, int_f *flags, size_t_f *c
c_cd_nelmts = (size_t)*cd_nelmts;
- if (NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
+ if (NULL == (c_name = (char *)malloc((size_t)*namelen + 1)))
goto DONE;
- if (NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts)))
+ if (NULL == (c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * c_cd_nelmts)))
goto DONE;
/*
@@ -1843,9 +1843,9 @@ h5pget_filter_c(hid_t_f *prp_id, int_f *filter_number, int_f *flags, size_t_f *c
DONE:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_cd_values)
- HDfree(c_cd_values);
+ free(c_cd_values);
return ret_value;
}
@@ -1901,7 +1901,7 @@ h5pset_external_c(hid_t_f *prp_id, _fcd name, int_f *namelen, off_t_f *offset, h
ret_value = 0;
DONE:
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -1986,7 +1986,7 @@ h5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f *name_size, _fcd name, o
* Allocate memory to store the name of the external file.
*/
if (c_namelen)
- c_name = (char *)HDmalloc(c_namelen + 1);
+ c_name = (char *)malloc(c_namelen + 1);
if (c_name == NULL)
return ret_value;
@@ -2010,7 +2010,7 @@ h5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f *name_size, _fcd name, o
ret_value = 0;
DONE:
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -2739,7 +2739,7 @@ h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls, H5P
DONE:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -2782,7 +2782,7 @@ h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void H5_
DONE:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -2825,7 +2825,7 @@ h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void H5_
DONE:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -2870,7 +2870,7 @@ h5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len)
DONE:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
/****if* H5Pf/h5pisa_class_c
@@ -2954,7 +2954,7 @@ h5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size)
DONE:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
/****if* H5Pf/h5pget_nprops_c
@@ -3078,7 +3078,7 @@ h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len)
DONE:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
/****if* H5Pf/h5premove_c
@@ -3121,7 +3121,7 @@ h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len)
DONE:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
/****if* H5Pf/h5punregister_c
@@ -3164,7 +3164,7 @@ h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len)
DONE:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
/****if* H5Pf/h5pclose_class_c
@@ -3281,7 +3281,7 @@ h5pset_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
DONE:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -3325,7 +3325,7 @@ h5pget_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
DONE:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -3558,8 +3558,8 @@ h5pset_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m
return ret_value;
tmp_p = tmp;
for (i = 0; i < H5FD_MEM_NTYPES; i++) {
- c_memb_name[i] = (char *)HDmalloc((size_t)len[i] + 1);
- HDmemcpy(c_memb_name[i], tmp_p, (size_t)len[i]);
+ c_memb_name[i] = (char *)malloc((size_t)len[i] + 1);
+ memcpy(c_memb_name[i], tmp_p, (size_t)len[i]);
tmp_pp = c_memb_name[i];
tmp_pp[len[i]] = '\0';
tmp_p = tmp_p + c_lenmax;
@@ -3588,9 +3588,9 @@ h5pset_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m
ret_value = 0;
DONE:
- HDfree(tmp);
+ free(tmp);
for (i = 0; i < H5FD_MEM_NTYPES; i++)
- HDfree(c_memb_name[i]);
+ free(c_memb_name[i]);
return ret_value;
}
@@ -3687,9 +3687,9 @@ h5pget_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m
/*
* Take care of names array
*/
- tmp = (char *)HDmalloc(c_lenmax * H5FD_MEM_NTYPES + 1);
+ tmp = (char *)malloc(c_lenmax * H5FD_MEM_NTYPES + 1);
tmp_p = tmp;
- HDmemset(tmp, ' ', c_lenmax * H5FD_MEM_NTYPES);
+ memset(tmp, ' ', c_lenmax * H5FD_MEM_NTYPES);
tmp[c_lenmax * H5FD_MEM_NTYPES] = '\0';
for (i = 0; i < H5FD_MEM_NTYPES; i++) {
memcpy(tmp_p, c_memb_name[i], strlen(c_memb_name[i]));
@@ -3714,9 +3714,9 @@ h5pget_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m
*flag = (int_f)relax;
*maxlen_out = (int_f)length;
ret_value = 0;
- HDfree(tmp);
+ free(tmp);
for (i = 0; i < H5FD_MEM_NTYPES; i++)
- HDfree(c_memb_name[i]);
+ free(c_memb_name[i]);
return ret_value;
}
@@ -3842,10 +3842,10 @@ h5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f
unsigned i;
int_f ret_value = -1;
- if (NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
+ if (NULL == (c_name = (char *)malloc((size_t)*namelen + 1)))
goto DONE;
- if (NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts_in)))
+ if (NULL == (c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * c_cd_nelmts_in)))
goto DONE;
/*
@@ -3866,9 +3866,9 @@ h5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f
DONE:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_cd_values)
- HDfree(c_cd_values);
+ free(c_cd_values);
return ret_value;
}
@@ -3907,7 +3907,7 @@ h5pmodify_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_ne
unsigned int *c_cd_values;
unsigned i;
- c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
+ c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * c_cd_nelmts);
if (!c_cd_values)
return ret_value;
for (i = 0; i < c_cd_nelmts; i++)
@@ -3923,7 +3923,7 @@ h5pmodify_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_ne
ret_value = 0;
DONE:
- HDfree(c_cd_values);
+ free(c_cd_values);
return ret_value;
}
@@ -4632,7 +4632,7 @@ h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le
* Allocate memory to store the expression.
*/
if (c_expression_len) {
- c_expression = (char *)HDmalloc(c_expression_len);
+ c_expression = (char *)malloc(c_expression_len);
if (NULL == c_expression)
HGOTO_DONE(FAIL)
} /* end if */
@@ -4651,7 +4651,7 @@ h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le
done:
if (c_expression)
- HDfree(c_expression);
+ free(c_expression);
return ret_value;
}
@@ -4702,7 +4702,7 @@ h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le
done:
if (c_expression)
- HDfree(c_expression);
+ free(c_expression);
return ret_value;
}
@@ -5373,7 +5373,7 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr)
if ((H5Pget_file_image((hid_t)*fapl_id, (void **)&c_buf_ptr, &c_buf_len_ptr)) < 0)
return ret_value; /* error occurred */
- HDmemcpy((void *)*buf_ptr, (void *)c_buf_ptr, c_buf_len_ptr);
+ memcpy((void *)*buf_ptr, (void *)c_buf_ptr, c_buf_len_ptr);
*buf_len_ptr = (size_t_f)c_buf_len_ptr;
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c
index a253b4a..c2f12e0 100644
--- a/fortran/src/H5Rf.c
+++ b/fortran/src/H5Rf.c
@@ -64,11 +64,11 @@ h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t
HGOTO_DONE(FAIL)
/* Copy the reference created */
- HDmemcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE);
+ memcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE);
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
} /* end h5rcreate_region_c() */
@@ -112,7 +112,7 @@ h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *re
if (H5Rcreate(ref, (hid_t)*loc_id, c_name, (H5R_type_t)*ref_type, (hid_t)*space_id) >= 0)
ret_value = 0;
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -183,7 +183,7 @@ h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id)
int_f ret_value = 0;
/* Copy the reference to dereference */
- HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
+ memcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
/*
* Call H5Rget_region function.
@@ -316,7 +316,7 @@ h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t
/*
* Allocate buffer to hold name of an attribute
*/
- if ((c_buf = (char *)HDmalloc(c_bufsize)) == NULL)
+ if ((c_buf = (char *)malloc(c_bufsize)) == NULL)
return ret_value;
/*
@@ -324,7 +324,7 @@ h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t
*/
if ((c_size = H5Rget_name((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, c_buf, c_bufsize)) < 0) {
if (c_buf)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
/*
@@ -335,7 +335,7 @@ h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t
*size_default = (size_t_f)c_size;
ret_value = 0;
if (c_buf)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index 00b97f8..d7202c7 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -301,7 +301,7 @@ h5sget_select_hyper_blocklist_c(hid_t_f *space_id, hsize_t_f *startblock, hsize_
return ret_value;
c_startblock = (hsize_t)*startblock;
- c_buf = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)(c_num_blocks * 2 * (hsize_t)rank));
+ c_buf = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)(c_num_blocks * 2 * (hsize_t)rank));
if (!c_buf)
return ret_value;
@@ -323,7 +323,7 @@ h5sget_select_hyper_blocklist_c(hid_t_f *space_id, hsize_t_f *startblock, hsize_
}
}
- HDfree(c_buf);
+ free(c_buf);
if (ret_value >= 0)
ret_value = 0;
return ret_value;
@@ -429,7 +429,7 @@ h5sget_select_elem_pointlist_c(hid_t_f *space_id, hsize_t_f *startpoint, hsize_t
return ret_value;
c_startpoint = (hsize_t)*startpoint;
- c_buf = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)(c_num_points * (hsize_t)rank));
+ c_buf = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)(c_num_points * (hsize_t)rank));
if (!c_buf)
return ret_value;
ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint, c_num_points, c_buf);
@@ -449,7 +449,7 @@ h5sget_select_elem_pointlist_c(hid_t_f *space_id, hsize_t_f *startpoint, hsize_t
if (ret_value >= 0)
ret_value = 0;
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -1054,19 +1054,19 @@ h5scombine_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f
rank = H5Sget_simple_extent_ndims(*space_id);
if (rank < 0)
return ret_value;
- c_start = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank);
+ c_start = (hsize_t *)malloc(sizeof(hsize_t) * (unsigned)rank);
if (c_start == NULL)
goto DONE;
- c_count = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank);
+ c_count = (hsize_t *)malloc(sizeof(hsize_t) * (unsigned)rank);
if (c_count == NULL)
goto DONE;
- c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank);
+ c_stride = (hsize_t *)malloc(sizeof(hsize_t) * (unsigned)rank);
if (c_stride == NULL)
goto DONE;
- c_block = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank);
+ c_block = (hsize_t *)malloc(sizeof(hsize_t) * (unsigned)rank);
if (c_block == NULL)
goto DONE;
@@ -1092,13 +1092,13 @@ h5scombine_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f
ret_value = 0;
DONE:
if (c_start != NULL)
- HDfree(c_start);
+ free(c_start);
if (c_count != NULL)
- HDfree(c_count);
+ free(c_count);
if (c_stride != NULL)
- HDfree(c_stride);
+ free(c_stride);
if (c_block != NULL)
- HDfree(c_block);
+ free(c_block);
return ret_value;
}
/****if* H5Sf/h5scombine_select_c
@@ -1257,7 +1257,7 @@ h5sselect_elements_c(hid_t_f *space_id, int_f *op, size_t_f *nelements, hsize_t_
c_space_id = *space_id;
rank = H5Sget_simple_extent_ndims(c_space_id);
- c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)rank * ((size_t)*nelements));
+ c_coord = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)rank * ((size_t)*nelements));
if (!c_coord)
return ret_value;
for (i = 0; i < (size_t)*nelements; i++) {
@@ -1270,7 +1270,7 @@ h5sselect_elements_c(hid_t_f *space_id, int_f *op, size_t_f *nelements, hsize_t_
status = H5Sselect_elements(c_space_id, c_op, c_nelements, c_coord);
if (status >= 0)
ret_value = 0;
- HDfree(c_coord);
+ free(c_coord);
return ret_value;
}
@@ -1363,7 +1363,7 @@ h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id)
/*
* Allocate buffer
*/
- if (NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
+ if (NULL == (c_buf = (unsigned char *)malloc(c_size)))
return ret_value;
/*
* Call H5Sencode function.
@@ -1378,11 +1378,11 @@ h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id)
* with blanks.
*/
- HDmemcpy(_fcdtocp(buf), (char *)c_buf, c_size);
+ memcpy(_fcdtocp(buf), (char *)c_buf, c_size);
ret_value = 0;
if (c_buf)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index a74f5d1..6438af0 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -66,7 +66,7 @@ h5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -116,7 +116,7 @@ h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -1357,7 +1357,7 @@ h5tget_member_index_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx)
goto DONE;
*idx = (int_f)c_index;
DONE:
- HDfree(c_name);
+ free(c_name);
ret_value = 0;
return ret_value;
}
@@ -1624,7 +1624,7 @@ h5tinsert_c(hid_t_f *type_id, _fcd name, int_f *namelen, size_t_f *offset, hid_t
error = H5Tinsert((hid_t)*type_id, c_name, (size_t)*offset, (hid_t)*field_id);
- HDfree(c_name);
+ free(c_name);
if (error < 0)
return ret_value;
ret_value = 0;
@@ -1784,7 +1784,7 @@ h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value)
c_value = *value;
error = H5Tenum_insert((hid_t)*type_id, c_name, &c_value);
- HDfree(c_name);
+ free(c_name);
if (error < 0)
return ret_value;
@@ -1825,11 +1825,11 @@ h5tenum_nameof_c(hid_t_f *type_id, int_f *value, _fcd name, size_t_f *namelen)
int_f c_value;
c_value = *value;
c_namelen = ((size_t)*namelen) + 1;
- c_name = (char *)HDmalloc(sizeof(char) * c_namelen);
+ c_name = (char *)malloc(sizeof(char) * c_namelen);
c_type_id = (hid_t)*type_id;
error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen);
HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
- HDfree(c_name);
+ free(c_name);
if (error < 0)
return ret_value;
@@ -1870,7 +1870,7 @@ h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value)
return ret_value;
error = H5Tenum_valueof((hid_t)*type_id, c_name, value);
- HDfree(c_name);
+ free(c_name);
if (error < 0)
return ret_value;
@@ -1947,7 +1947,7 @@ h5tset_tag_c(hid_t_f *type_id, _fcd tag, int_f *namelen)
c_tag = (char *)HD5f2cstring(tag, (size_t)*namelen);
status = H5Tset_tag((hid_t)*type_id, c_tag);
- HDfree(c_tag);
+ free(c_tag);
if (status < 0)
return ret_value;
@@ -2263,7 +2263,7 @@ h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc)
* Allocate buffer
*/
c_size = (size_t)*nalloc;
- if (NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
+ if (NULL == (c_buf = (unsigned char *)malloc(c_size)))
return ret_value;
/*
@@ -2278,11 +2278,11 @@ h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc)
* with blanks.
*/
- HDmemcpy(_fcdtocp(buf), (char *)c_buf, c_size);
+ memcpy(_fcdtocp(buf), (char *)c_buf, c_size);
ret_value = 0;
if (c_buf)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -2466,7 +2466,7 @@ h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f *namelen, void *value)
status = H5Tenum_insert((hid_t)*type_id, c_name, value);
- HDfree(c_name);
+ free(c_name);
if (status < 0)
return ret_value;
diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c
index dc2fa19..ebe5955 100644
--- a/fortran/src/H5f90kit.c
+++ b/fortran/src/H5f90kit.c
@@ -54,11 +54,11 @@ HD5f2cstring(_fcd fdesc, size_t len)
/*EMPTY*/;
/* Allocate C string */
- if (NULL == (cstr = (char *)HDmalloc((size_t)(i + 2))))
+ if (NULL == (cstr = (char *)malloc((size_t)(i + 2))))
return NULL;
/* Copy text from FORTRAN to C string */
- HDmemcpy(cstr, str, (size_t)(i + 1));
+ memcpy(cstr, str, (size_t)(i + 1));
/* Terminate C string */
cstr[i + 1] = '\0';
@@ -94,10 +94,10 @@ HD5packFstring(char *src, char *dest, size_t dst_len)
/* Copy over the string information, up to the length of the src */
/* (Don't copy the NUL terminator from the C string to the FORTRAN string */
- HDmemcpy(dest, src, MIN(src_len, dst_len));
+ memcpy(dest, src, MIN(src_len, dst_len));
/* Pad out any remaining space in the FORTRAN string with ' 's */
if (src_len < dst_len)
- HDmemset(&dest[src_len], ' ', dst_len - src_len);
+ memset(&dest[src_len], ' ', dst_len - src_len);
} /* HD5packFstring */
diff --git a/fortran/test/t.c b/fortran/test/t.c
index b89e8ae..f3b326b 100644
--- a/fortran/test/t.c
+++ b/fortran/test/t.c
@@ -49,7 +49,7 @@ nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_n
*/
if (NULL == (c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen)))
HGOTO_DONE(FAIL)
- if (NULL == (c_full_name = (char *)HDmalloc((size_t)*full_namelen + 1)))
+ if (NULL == (c_full_name = (char *)malloc((size_t)*full_namelen + 1)))
HGOTO_DONE(FAIL)
/*
@@ -61,9 +61,9 @@ nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_n
done:
if (c_base_name)
- HDfree(c_base_name);
+ free(c_base_name);
if (c_full_name)
- HDfree(c_full_name);
+ free(c_full_name);
return ret_value;
}
@@ -112,7 +112,7 @@ nh5_cleanup_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl)
DONE:
if (NULL != c_base_name[0])
- HDfree(c_base_name[0]);
+ free(c_base_name[0]);
return ret_value;
}
@@ -130,7 +130,7 @@ DONE:
void
nh5_exit_c(int_f *status)
{
- HDexit((int)*status);
+ exit((int)*status);
} /* h5_exit_c */
/*----------------------------------------------------------------------------
diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c
index 9ebd322..8029d34 100644
--- a/hl/fortran/src/H5DSfc.c
+++ b/hl/fortran/src/H5DSfc.c
@@ -54,7 +54,7 @@ h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen)
done:
if (c_dimname)
- HDfree(c_dimname);
+ free(c_dimname);
return ret_value;
@@ -231,7 +231,7 @@ h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen)
done:
if (c_label)
- HDfree(c_label);
+ free(c_label);
return ret_value;
@@ -262,7 +262,7 @@ h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size)
/*
* Allocate buffer to hold label
*/
- if ((c_label = (char *)HDmalloc((size_t)*size + 1)) == NULL)
+ if ((c_label = (char *)malloc((size_t)*size + 1)) == NULL)
HGOTO_DONE(FAIL);
/*
@@ -282,7 +282,7 @@ done:
*size = (size_t_f)size_c; /* Don't subtract '1' because H5DSget_label doesn't include the
* trailing NULL in the length calculation, Ref. HDFFV-7596 */
if (c_label)
- HDfree(c_label);
+ free(c_label);
return ret_value;
} /* end h5dsget_label_c() */
@@ -312,7 +312,7 @@ h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size)
/*
* Allocate buffer to hold name
*/
- if ((c_scale_name = (char *)HDmalloc((size_t)*size + 1)) == NULL)
+ if ((c_scale_name = (char *)malloc((size_t)*size + 1)) == NULL)
HGOTO_DONE(FAIL);
/*
@@ -330,7 +330,7 @@ h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size)
done:
if (c_scale_name)
- HDfree(c_scale_name);
+ free(c_scale_name);
return ret_value;
} /* end h5dsget_scale_name_c() */
diff --git a/hl/fortran/src/H5IMcc.c b/hl/fortran/src/H5IMcc.c
index 2084826..53c1f69 100644
--- a/hl/fortran/src/H5IMcc.c
+++ b/hl/fortran/src/H5IMcc.c
@@ -469,7 +469,7 @@ H5IM_get_palette(hid_t loc_id, const char *image_name, int pal_number, hid_t tid
dim_ref = (size_t)n_refs;
- refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * dim_ref);
+ refbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * dim_ref);
if (H5Aread(attr_id, attr_type, refbuf) < 0)
goto out;
@@ -489,7 +489,7 @@ H5IM_get_palette(hid_t loc_id, const char *image_name, int pal_number, hid_t tid
if (H5Dclose(pal_id) < 0)
goto out;
- HDfree(refbuf);
+ free(refbuf);
} /* H5T_REFERENCE */
diff --git a/hl/fortran/src/H5IMfc.c b/hl/fortran/src/H5IMfc.c
index cead871..1e060ad 100644
--- a/hl/fortran/src/H5IMfc.c
+++ b/hl/fortran/src/H5IMfc.c
@@ -63,7 +63,7 @@ h5immake_image_8bit_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -110,7 +110,7 @@ h5imread_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf)
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -168,9 +168,9 @@ h5immake_image_24bit_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_il != NULL)
- HDfree(c_il);
+ free(c_il);
return ret_value;
}
@@ -215,7 +215,7 @@ h5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *w
/*
* allocate buffer to hold name of an attribute
*/
- if ((c_buf = (char *)HDmalloc((size_t)*ilen + 1)) == NULL)
+ if ((c_buf = (char *)malloc((size_t)*ilen + 1)) == NULL)
goto done;
/*
@@ -242,9 +242,9 @@ h5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *w
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_buf != NULL)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -287,7 +287,7 @@ h5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name)
ret = H5IMis_image(c_loc_id, c_name);
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret;
}
@@ -334,7 +334,7 @@ h5immake_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dim
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -389,9 +389,9 @@ h5imlink_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_namepal != NULL)
- HDfree(c_namepal);
+ free(c_namepal);
return ret_value;
}
@@ -446,9 +446,9 @@ h5imunlink_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *il
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_namepal != NULL)
- HDfree(c_namepal);
+ free(c_namepal);
return ret_value;
}
@@ -501,7 +501,7 @@ h5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *np
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -557,7 +557,7 @@ h5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -607,7 +607,7 @@ h5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_numb
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -650,7 +650,7 @@ h5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name)
ret = H5IMis_palette(c_loc_id, c_name);
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret;
}
diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c
index c888eec..9555e9f 100644
--- a/hl/fortran/src/H5LTfc.c
+++ b/hl/fortran/src/H5LTfc.c
@@ -49,7 +49,7 @@ h5ltmake_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, h
if (c_name == NULL)
goto done;
- c_dims = (hsize_t *)HDmalloc(sizeof(hsize_t) * ((size_t)*rank));
+ c_dims = (hsize_t *)malloc(sizeof(hsize_t) * ((size_t)*rank));
if (c_dims == NULL)
goto done;
/*
@@ -71,9 +71,9 @@ h5ltmake_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, h
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_dims != NULL)
- HDfree(c_dims);
+ free(c_dims);
return ret_value;
}
@@ -124,7 +124,7 @@ h5ltread_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -179,9 +179,9 @@ h5ltmake_dataset_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_buf != NULL)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -231,7 +231,7 @@ h5ltread_dataset_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, char *b
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -324,11 +324,11 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_attrname != NULL)
- HDfree(c_attrname);
+ free(c_attrname);
if (c_buf != NULL)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -405,9 +405,9 @@ h5ltget_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_attrname != NULL)
- HDfree(c_attrname);
+ free(c_attrname);
return ret_value;
}
@@ -451,7 +451,7 @@ h5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, si
/*
* Allocate buffer to hold C attribute string
*/
- if ((c_buf = (char *)HDmalloc((size_t)*buf_size + 1)) == NULL)
+ if ((c_buf = (char *)malloc((size_t)*buf_size + 1)) == NULL)
goto done;
/*
@@ -470,11 +470,11 @@ h5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, si
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_attrname != NULL)
- HDfree(c_attrname);
+ free(c_attrname);
if (c_buf != NULL)
- HDfree(c_buf);
+ free(c_buf);
return ret_value;
}
@@ -526,7 +526,7 @@ h5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *ra
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -569,7 +569,7 @@ h5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name)
ret = H5LTfind_dataset(c_loc_id, c_name);
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret;
}
@@ -639,7 +639,7 @@ h5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -697,9 +697,9 @@ h5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, siz
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_attrname != NULL)
- HDfree(c_attrname);
+ free(c_attrname);
return ret_value;
}
@@ -774,9 +774,9 @@ h5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f
done:
if (c_name != NULL)
- HDfree(c_name);
+ free(c_name);
if (c_attrname != NULL)
- HDfree(c_attrname);
+ free(c_attrname);
return ret_value;
}
@@ -821,7 +821,7 @@ h5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_obj
done:
if (c_path != NULL)
- HDfree(c_path);
+ free(c_path);
return (int_f)ret;
}
diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c
index 588638c..5bbc326 100644
--- a/hl/fortran/src/H5TBfc.c
+++ b/hl/fortran/src/H5TBfc.c
@@ -61,9 +61,9 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name
HGOTO_DONE(FAIL)
if (NULL == (c_name1 = (char *)HD5f2cstring(name1, (size_t)*namelen1)))
HGOTO_DONE(FAIL)
- if (NULL == (c_field_offset = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_offset = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
- if (NULL == (c_field_types = (hid_t *)HDmalloc(sizeof(hid_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_types = (hid_t *)malloc(sizeof(hid_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
for (i = 0; i < num_elem; i++) {
@@ -74,7 +74,7 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name
/*
* allocate array of character pointers
*/
- if (NULL == (c_field_names = (char **)HDcalloc((size_t)num_elem, sizeof(char *))))
+ if (NULL == (c_field_names = (char **)calloc((size_t)num_elem, sizeof(char *))))
HGOTO_DONE(FAIL)
/* copy data to long C string */
@@ -86,9 +86,9 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name
*/
tmp_p = tmp;
for (i = 0; i < num_elem; i++) {
- if (NULL == (c_field_names[i] = (char *)HDmalloc((size_t)char_len_field_names[i] + 1)))
+ if (NULL == (c_field_names[i] = (char *)malloc((size_t)char_len_field_names[i] + 1)))
HGOTO_DONE(FAIL)
- HDmemcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]);
+ memcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]);
c_field_names[i][char_len_field_names[i]] = '\0';
tmp_p = tmp_p + *max_char_size_field_names;
} /* end for */
@@ -103,22 +103,22 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_name1)
- HDfree(c_name1);
+ free(c_name1);
if (c_field_names) {
for (i = 0; i < num_elem; i++) {
if (c_field_names[i])
- HDfree(c_field_names[i]);
+ free(c_field_names[i]);
} /* end for */
- HDfree(c_field_names);
+ free(c_field_names);
} /* end if */
if (tmp)
- HDfree(tmp);
+ free(tmp);
if (c_field_offset)
- HDfree(c_field_offset);
+ free(c_field_offset);
if (c_field_types)
- HDfree(c_field_types);
+ free(c_field_types);
return ret_value;
} /* end h5tbmake_table_c() */
@@ -166,9 +166,9 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *
HGOTO_DONE(FAIL)
if (NULL == (c_name1 = (char *)HD5f2cstring(name1, (size_t)*namelen1)))
HGOTO_DONE(FAIL)
- if (NULL == (c_field_offset = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_offset = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
- if (NULL == (c_field_types = (hid_t *)HDmalloc(sizeof(hid_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_types = (hid_t *)malloc(sizeof(hid_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
for (i = 0; i < num_elem; i++) {
@@ -179,7 +179,7 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *
/*
* allocate array of character pointers
*/
- if (NULL == (c_field_names = (char **)HDcalloc((size_t)num_elem, sizeof(char *))))
+ if (NULL == (c_field_names = (char **)calloc((size_t)num_elem, sizeof(char *))))
HGOTO_DONE(FAIL)
/* copy data to long C string */
@@ -191,9 +191,9 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *
*/
tmp_p = tmp;
for (i = 0; i < num_elem; i++) {
- if (NULL == (c_field_names[i] = (char *)HDmalloc((size_t)char_len_field_names[i] + 1)))
+ if (NULL == (c_field_names[i] = (char *)malloc((size_t)char_len_field_names[i] + 1)))
HGOTO_DONE(FAIL)
- HDmemcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]);
+ memcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]);
c_field_names[i][char_len_field_names[i]] = '\0';
tmp_p = tmp_p + *max_char_size_field_names;
} /* end for */
@@ -208,22 +208,22 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_name1)
- HDfree(c_name1);
+ free(c_name1);
if (c_field_names) {
for (i = 0; i < num_elem; i++) {
if (c_field_names[i])
- HDfree(c_field_names[i]);
+ free(c_field_names[i]);
} /* end for */
- HDfree(c_field_names);
+ free(c_field_names);
} /* end if */
if (tmp)
- HDfree(tmp);
+ free(tmp);
if (c_field_offset)
- HDfree(c_field_offset);
+ free(c_field_offset);
if (c_field_types)
- HDfree(c_field_types);
+ free(c_field_types);
return ret_value;
} /* end h5tbmake_table_c() */
@@ -260,9 +260,9 @@ h5tbread_table_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hsize_t_f *nfiel
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if (NULL == (c_dst_offset = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
+ if (NULL == (c_dst_offset = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
- if (NULL == (c_dst_sizes = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
+ if (NULL == (c_dst_sizes = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
for (i = 0; i < c_nfields; i++) {
@@ -278,12 +278,12 @@ h5tbread_table_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hsize_t_f *nfiel
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_dst_offset)
- HDfree(c_dst_offset);
+ free(c_dst_offset);
if (c_dst_sizes)
- HDfree(c_dst_sizes);
+ free(c_dst_sizes);
return ret_value;
} /* end h5tbmake_table_c() */
@@ -329,9 +329,9 @@ h5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_name1)
- HDfree(c_name1);
+ free(c_name1);
return ret_value;
}
@@ -377,9 +377,9 @@ h5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *n
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_name1)
- HDfree(c_name1);
+ free(c_name1);
return ret_value;
}
@@ -423,7 +423,7 @@ h5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *fi
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -467,7 +467,7 @@ h5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *fie
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -512,9 +512,9 @@ h5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *name
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_name1)
- HDfree(c_name1);
+ free(c_name1);
return ret_value;
}
@@ -557,9 +557,9 @@ h5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *name
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_name1)
- HDfree(c_name1);
+ free(c_name1);
return ret_value;
}
@@ -604,7 +604,7 @@ h5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
return ret_value;
}
@@ -655,15 +655,15 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if (NULL == (c_field_offsets = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_offsets = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
- if (NULL == (c_field_sizes = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_sizes = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
- if (NULL == (c_field_names = (char **)HDcalloc((size_t)c_nfields, sizeof(char *))))
+ if (NULL == (c_field_names = (char **)calloc((size_t)c_nfields, sizeof(char *))))
HGOTO_DONE(FAIL)
for (i = 0; i < c_nfields; i++)
- if (NULL == (c_field_names[i] = (char *)HDmalloc(sizeof(char) * HLTB_MAX_FIELD_LEN)))
+ if (NULL == (c_field_names[i] = (char *)malloc(sizeof(char) * HLTB_MAX_FIELD_LEN)))
HGOTO_DONE(FAIL)
/*
@@ -676,15 +676,15 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n
/* return values */
/* names array */
- if (NULL == (tmp = (char *)HDmalloc((c_lenmax * (size_t)c_nfields) + 1)))
+ if (NULL == (tmp = (char *)malloc((c_lenmax * (size_t)c_nfields) + 1)))
HGOTO_DONE(FAIL)
tmp_p = tmp;
- HDmemset(tmp, ' ', c_lenmax * (size_t)c_nfields);
+ memset(tmp, ' ', c_lenmax * (size_t)c_nfields);
tmp[c_lenmax * c_nfields] = '\0';
for (i = 0; i < c_nfields; i++) {
size_t field_name_len = HDstrlen(c_field_names[i]);
- HDmemcpy(tmp_p, c_field_names[i], field_name_len);
+ memcpy(tmp_p, c_field_names[i], field_name_len);
namelen2[i] = (size_t_f)field_name_len;
length = MAX(length, strlen((c_field_names[i])));
tmp_p = tmp_p + c_lenmax;
@@ -702,19 +702,19 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n
done:
if (c_name)
- HDfree(c_name);
+ free(c_name);
if (c_field_names) {
for (i = 0; i < num_elem; i++)
if (c_field_names[i])
- HDfree(c_field_names[i]);
- HDfree(c_field_names);
+ free(c_field_names[i]);
+ free(c_field_names);
} /* end if */
if (tmp)
- HDfree(tmp);
+ free(tmp);
if (c_field_offsets)
- HDfree(c_field_offsets);
+ free(c_field_offsets);
if (c_field_sizes)
- HDfree(c_field_sizes);
+ free(c_field_sizes);
return ret_value;
}
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c
index 580c6a1..28fe494 100644
--- a/hl/src/H5DO.c
+++ b/hl/src/H5DO.c
@@ -199,7 +199,7 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, hid_t
goto done;
/* Allocate the boundary array */
- boundary = (hsize_t *)HDmalloc(ndims * sizeof(hsize_t));
+ boundary = (hsize_t *)malloc(ndims * sizeof(hsize_t));
/* Retrieve the append flush property */
if (H5Pget_append_flush(dapl, ndims, boundary, &append_cb, &udata) < 0)
@@ -247,7 +247,7 @@ done:
ret_value = FAIL;
if (boundary)
- HDfree(boundary);
+ free(boundary);
return ret_value;
} /* H5DOappend() */
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index 34de473..6656f5e 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -310,7 +310,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -322,11 +322,11 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
/* store the REF information in the index of the dataset that has the DS */
buf[idx].len = 1;
if (is_new_ref) {
- buf[idx].p = HDmalloc(1 * sizeof(H5R_ref_t));
+ buf[idx].p = malloc(1 * sizeof(H5R_ref_t));
((H5R_ref_t *)buf[idx].p)[0] = nref_to_ds;
}
else {
- buf[idx].p = HDmalloc(1 * sizeof(hobj_ref_t));
+ buf[idx].p = malloc(1 * sizeof(hobj_ref_t));
((hobj_ref_t *)buf[idx].p)[0] = ref_to_ds;
}
/* write the attribute with the reference */
@@ -344,9 +344,9 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf[idx].p);
+ free(buf[idx].p);
buf[idx].p = NULL;
- HDfree(buf);
+ free(buf);
buf = NULL;
}
@@ -366,7 +366,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -421,11 +421,11 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
buf[idx].len++;
len = buf[idx].len;
if (is_new_ref) {
- buf[idx].p = HDrealloc(buf[idx].p, len * sizeof(H5R_ref_t));
+ buf[idx].p = realloc(buf[idx].p, len * sizeof(H5R_ref_t));
((H5R_ref_t *)buf[idx].p)[len - 1] = nref_to_ds;
}
else {
- buf[idx].p = HDrealloc(buf[idx].p, len * sizeof(hobj_ref_t));
+ buf[idx].p = realloc(buf[idx].p, len * sizeof(hobj_ref_t));
((hobj_ref_t *)buf[idx].p)[len - 1] = ref_to_ds;
}
} /* end if */
@@ -433,11 +433,11 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
/* store the REF information in the index of the dataset that has the DS */
buf[idx].len = 1;
if (is_new_ref) {
- buf[idx].p = HDmalloc(sizeof(H5R_ref_t));
+ buf[idx].p = malloc(sizeof(H5R_ref_t));
((H5R_ref_t *)buf[idx].p)[0] = nref_to_ds;
}
else {
- buf[idx].p = HDmalloc(sizeof(hobj_ref_t));
+ buf[idx].p = malloc(sizeof(hobj_ref_t));
((hobj_ref_t *)buf[idx].p)[0] = ref_to_ds;
}
} /* end else */
@@ -460,7 +460,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
} /* has_dimlist */
@@ -554,14 +554,14 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
nelmts++;
if (is_new_ref) {
- ndsbuf = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, ndsbuf) < 0)
goto out;
}
else {
- dsbuf = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, dsbuf) < 0)
@@ -580,12 +580,12 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
/* Allocate new buffer to copy old references and add new one */
if (is_new_ref) {
- ndsbuf_w = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf_w = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf_w == NULL)
goto out;
}
else {
- dsbuf_w = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf_w = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf_w == NULL)
goto out;
}
@@ -653,15 +653,15 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
if (H5Tclose(ntid) < 0)
goto out;
if (is_new_ref) {
- HDfree(ndsbuf);
+ free(ndsbuf);
dsbuf = NULL;
- HDfree(ndsbuf_w);
+ free(ndsbuf_w);
dsbuf = NULL;
}
else {
- HDfree(dsbuf);
+ free(dsbuf);
dsbuf = NULL;
- HDfree(dsbuf_w);
+ free(dsbuf_w);
dsbuf = NULL;
}
} /* has_reflist */
@@ -684,11 +684,11 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
/* error zone */
out:
if (buf)
- HDfree(buf);
+ free(buf);
if (dsbuf)
- HDfree(dsbuf);
+ free(dsbuf);
if (dsbuf_w)
- HDfree(dsbuf_w);
+ free(dsbuf_w);
H5E_BEGIN_TRY
{
@@ -853,7 +853,7 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -915,7 +915,7 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
}
len = --buf[idx].len;
if (len == 0) {
- HDfree(buf[idx].p);
+ free(buf[idx].p);
buf[idx].p = NULL;
}
/* Since a reference to a dim. scale can be inserted only once,
@@ -958,7 +958,7 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
/*-------------------------------------------------------------------------
@@ -984,22 +984,22 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (is_new_ref) {
- ndsbuf = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, ndsbuf) < 0)
goto out;
- ndsbuf_w = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf_w = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf_w == NULL)
goto out;
}
else {
- dsbuf = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, dsbuf) < 0)
goto out;
- dsbuf_w = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf_w = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf_w == NULL)
goto out;
}
@@ -1152,14 +1152,14 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
if (H5Tclose(ntid) < 0)
goto out;
if (is_new_ref) {
- HDfree(ndsbuf);
- HDfree(ndsbuf_w);
+ free(ndsbuf);
+ free(ndsbuf_w);
ndsbuf = NULL;
ndsbuf_w = NULL;
}
else {
- HDfree(dsbuf);
- HDfree(dsbuf_w);
+ free(dsbuf);
+ free(dsbuf_w);
dsbuf = NULL;
dsbuf_w = NULL;
}
@@ -1176,15 +1176,15 @@ out:
H5Tclose(tid);
if (ndsbuf) {
- HDfree(ndsbuf);
+ free(ndsbuf);
ndsbuf = NULL;
}
if (ndsbuf_w) {
- HDfree(ndsbuf_w);
+ free(ndsbuf_w);
ndsbuf_w = NULL;
}
if (dsbuf) {
- HDfree(dsbuf);
+ free(dsbuf);
dsbuf = NULL;
}
if (buf) {
@@ -1192,9 +1192,9 @@ out:
free the pointers allocated when we read data in */
for (i = 0; i < rank; i++) {
if (buf[i].p)
- HDfree(buf[i].p);
+ free(buf[i].p);
}
- HDfree(buf);
+ free(buf);
buf = NULL;
}
}
@@ -1337,7 +1337,7 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -1396,7 +1396,7 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
} /* has_dimlist */
@@ -1433,14 +1433,14 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (is_new_ref) {
- ndsbuf = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, ndsbuf) < 0)
goto out;
}
else {
- dsbuf = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, dsbuf) < 0)
@@ -1515,11 +1515,11 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (ndsbuf) {
- HDfree(ndsbuf);
+ free(ndsbuf);
ndsbuf = NULL;
}
if (dsbuf) {
- HDfree(dsbuf);
+ free(dsbuf);
dsbuf = NULL;
}
} /* has_reflist */
@@ -1541,15 +1541,15 @@ out:
H5E_END_TRY;
if (buf) {
- HDfree(buf);
+ free(buf);
buf = NULL;
}
if (ndsbuf) {
- HDfree(ndsbuf);
+ free(ndsbuf);
ndsbuf = NULL;
}
if (dsbuf) {
- HDfree(dsbuf);
+ free(dsbuf);
dsbuf = NULL;
}
return FAIL;
@@ -1672,7 +1672,7 @@ H5DSiterate_scales(hid_t did, unsigned int dim, int *ds_idx, H5DS_iterate_t visi
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -1748,7 +1748,7 @@ H5DSiterate_scales(hid_t did, unsigned int dim, int *ds_idx, H5DS_iterate_t visi
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
} /* if has_dimlist */
@@ -1759,7 +1759,7 @@ out:
{
if (buf) {
H5Treclaim(tid, sid, H5P_DEFAULT, buf);
- HDfree(buf);
+ free(buf);
}
H5Sclose(sid);
H5Aclose(aid);
@@ -1799,7 +1799,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
char const **const_buf; /* buf calls */
} u;
- HDmemset(&u, 0, sizeof(u));
+ memset(&u, 0, sizeof(u));
/*-------------------------------------------------------------------------
* parameter checking
@@ -1862,7 +1862,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
goto out;
/* allocate and initialize */
- u.const_buf = (char const **)HDmalloc((size_t)rank * sizeof(char *));
+ u.const_buf = (char const **)malloc((size_t)rank * sizeof(char *));
if (u.const_buf == NULL)
goto out;
@@ -1885,7 +1885,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
if (H5Aclose(aid) < 0)
goto out;
if (u.const_buf) {
- HDfree(u.const_buf);
+ free(u.const_buf);
u.const_buf = NULL;
}
}
@@ -1904,7 +1904,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
goto out;
/* allocate and initialize */
- u.buf = (char **)HDmalloc((size_t)rank * sizeof(char *));
+ u.buf = (char **)malloc((size_t)rank * sizeof(char *));
if (u.buf == NULL)
goto out;
@@ -1915,7 +1915,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
/* free the ptr that will be replaced by label */
if (u.buf[idx])
- HDfree(u.buf[idx]);
+ free(u.buf[idx]);
/* store the label information in the required index */
u.const_buf[idx] = label;
@@ -1930,7 +1930,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
/* free all the ptr's from the H5Aread() */
for (i = 0; i < (unsigned int)rank; i++) {
if (u.buf[i])
- HDfree(u.buf[i]);
+ free(u.buf[i]);
}
/* close */
@@ -1939,7 +1939,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
if (H5Aclose(aid) < 0)
goto out;
if (u.buf) {
- HDfree(u.buf);
+ free(u.buf);
u.buf = NULL;
}
}
@@ -1955,9 +1955,9 @@ out:
/* free all the ptr's from the H5Aread() */
for (i = 0; i < (unsigned int)rank; i++) {
if (u.buf[i])
- HDfree(u.buf[i]);
+ free(u.buf[i]);
}
- HDfree(u.buf);
+ free(u.buf);
}
H5E_BEGIN_TRY
{
@@ -2054,7 +2054,7 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
goto out;
/* allocate and initialize */
- buf = (char **)HDmalloc((size_t)rank * sizeof(char *));
+ buf = (char **)malloc((size_t)rank * sizeof(char *));
if (buf == NULL)
goto out;
@@ -2073,7 +2073,7 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
/* copy all/some of the name */
if (label) {
- HDmemcpy(label, buf[idx], copy_len);
+ memcpy(label, buf[idx], copy_len);
/* terminate the string */
label[copy_len] = '\0';
@@ -2082,7 +2082,7 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
/* free all the ptr's from the H5Aread() */
for (i = 0; i < rank; i++) {
if (buf[i])
- HDfree(buf[i]);
+ free(buf[i]);
}
/* close */
@@ -2091,7 +2091,7 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
if (H5Aclose(aid) < 0)
goto out;
if (buf) {
- HDfree(buf);
+ free(buf);
buf = NULL;
}
@@ -2103,9 +2103,9 @@ out:
/* free all the ptr's from the H5Aread() */
for (i = 0; i < rank; i++) {
if (buf[i])
- HDfree(buf[i]);
+ free(buf[i]);
}
- HDfree(buf);
+ free(buf);
}
H5E_BEGIN_TRY
{
@@ -2192,7 +2192,7 @@ H5DSget_scale_name(hid_t did, char *name, size_t size)
goto out;
/* allocate a temporary buffer */
- buf = (char *)HDmalloc(nbytes * sizeof(char));
+ buf = (char *)malloc(nbytes * sizeof(char));
if (buf == NULL)
goto out;
@@ -2205,7 +2205,7 @@ H5DSget_scale_name(hid_t did, char *name, size_t size)
/* copy all/some of the name */
if (name) {
- HDmemcpy(name, buf, copy_len);
+ memcpy(name, buf, copy_len);
/* terminate the string */
name[copy_len] = '\0';
@@ -2219,7 +2219,7 @@ H5DSget_scale_name(hid_t did, char *name, size_t size)
if (H5Sclose(sid) < 0)
goto out;
if (buf)
- HDfree(buf);
+ free(buf);
return (ssize_t)(nbytes - 1);
@@ -2233,7 +2233,7 @@ out:
}
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
return FAIL;
}
@@ -2315,7 +2315,7 @@ H5DSis_scale(hid_t did)
goto out;
}
- buf = (char *)HDmalloc((size_t)string_size * sizeof(char));
+ buf = (char *)malloc((size_t)string_size * sizeof(char));
if (buf == NULL)
goto out;
@@ -2327,7 +2327,7 @@ H5DSis_scale(hid_t did)
if (HDstrncmp(buf, DIMENSION_SCALE_CLASS, MIN(HDstrlen(DIMENSION_SCALE_CLASS), HDstrlen(buf))) == 0)
is_ds = 1;
- HDfree(buf);
+ free(buf);
if (H5Tclose(tid) < 0)
goto out;
@@ -2337,7 +2337,7 @@ H5DSis_scale(hid_t did)
}
out:
if (is_ds < 0) {
- HDfree(buf);
+ free(buf);
H5E_BEGIN_TRY
{
H5Aclose(aid);
@@ -2427,7 +2427,7 @@ H5DSget_num_scales(hid_t did, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -2446,7 +2446,7 @@ H5DSget_num_scales(hid_t did, unsigned int idx)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
} /* has_dimlist */
@@ -2463,7 +2463,7 @@ out:
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
return FAIL;
}
@@ -2510,7 +2510,7 @@ H5DS_is_reserved(hid_t did, hbool_t *is_reserved)
/* Allocate buffer large enough to hold string */
if ((string_size = H5Tget_size(tid)) == 0)
goto error;
- if (NULL == (buf = HDmalloc(string_size * sizeof(char))))
+ if (NULL == (buf = malloc(string_size * sizeof(char))))
goto error;
/* Read the attribute */
@@ -2524,7 +2524,7 @@ H5DS_is_reserved(hid_t did, hbool_t *is_reserved)
else
*is_reserved = FALSE;
- HDfree(buf);
+ free(buf);
if (H5Tclose(tid) < 0)
goto error;
@@ -2541,7 +2541,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return FAIL;
}
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c
index 25381fd..e38f096 100644
--- a/hl/src/H5IM.c
+++ b/hl/src/H5IM.c
@@ -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,7 +1081,7 @@ 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;
@@ -1093,7 +1093,7 @@ H5IMis_image(hid_t loc_id, const char *dset_name)
else
ret = 0;
- HDfree(attr_data);
+ free(attr_data);
if (H5Tclose(atid) < 0)
goto out;
@@ -1180,7 +1180,7 @@ 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;
@@ -1192,7 +1192,7 @@ H5IMis_palette(hid_t loc_id, const char *dset_name)
else
ret = 0;
- HDfree(attr_data);
+ free(attr_data);
if (H5Tclose(atid) < 0)
goto out;
diff --git a/hl/src/H5LD.c b/hl/src/H5LD.c
index 30257f6..5e39c08 100644
--- a/hl/src/H5LD.c
+++ b/hl/src/H5LD.c
@@ -43,12 +43,12 @@ H5LD_clean_vector(H5LD_memb_t *listv[])
{
unsigned n; /* Local index variable */
- HDassert(listv);
+ assert(listv);
/* Go through info for each field stored in listv[] */
for (n = 0; listv[n] != NULL; n++) {
if (listv[n]->names) {
- HDfree(listv[n]->names);
+ free(listv[n]->names);
listv[n]->names = NULL;
} /* end if */
@@ -59,7 +59,7 @@ H5LD_clean_vector(H5LD_memb_t *listv[])
} /* end if */
/* Free the H5LD_memb_t structure for the field */
- HDfree(listv[n]);
+ free(listv[n]);
listv[n] = NULL;
} /* end for */
} /* H5LD_clean_vector() */
@@ -159,8 +159,8 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid)
char *fields_ptr; /* Pointer to "fields" */
int ret_value = FAIL; /* Return value */
- HDassert(listv);
- HDassert(fields);
+ assert(listv);
+ assert(fields);
fields_ptr = fields;
nfields = 0;
@@ -178,11 +178,11 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid)
len = (HDstrlen(fields_ptr) / 2) + 2;
/* Allocate memory for an H5LD_memb_t for storing a field's info */
- if (NULL == (memb = (H5LD_memb_t *)HDcalloc((size_t)1, sizeof(H5LD_memb_t))))
+ if (NULL == (memb = (H5LD_memb_t *)calloc((size_t)1, sizeof(H5LD_memb_t))))
goto done;
/* Allocate memory for an array of pointers to member names */
- if (NULL == (memb->names = (char **)HDcalloc(len, sizeof(char *))))
+ if (NULL == (memb->names = (char **)calloc(len, sizeof(char *))))
goto done;
memb->names[j] = fields_ptr;
@@ -251,8 +251,8 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid)
} /* end if */
else {
if (memb) {
- HDfree(memb->names);
- HDfree(memb);
+ free(memb->names);
+ free(memb);
}
goto done;
} /* end else */
@@ -350,7 +350,7 @@ H5LD_get_dset_type_size(hid_t did, const char *fields)
size_t tot = 0; /* Data type size of all the fields in "fields" */
int n = 0, num = 0; /* Local index variables */
- HDassert(fields && *fields);
+ assert(fields && *fields);
/* Should be a compound datatype if "fields" exists */
if (H5Tget_class(dset_tid) != H5T_COMPOUND)
@@ -362,7 +362,7 @@ H5LD_get_dset_type_size(hid_t did, const char *fields)
/* Allocate memory for a list of H5LD_memb_t pointers to store "fields" info */
len = (HDstrlen(fields) / 2) + 2;
- if (NULL == (listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))))
+ if (NULL == (listv = (H5LD_memb_t **)calloc(len, sizeof(H5LD_memb_t *))))
goto done;
/* Process and store info for "fields" */
@@ -388,11 +388,11 @@ done:
/* Free the array of H5LD_memb_t pointers */
if (listv)
- HDfree(listv);
+ free(listv);
/* Free memory */
if (dup_fields)
- HDfree(dup_fields);
+ free(dup_fields);
return (ret_value);
} /* H5LD_get_dset_type_size() */
@@ -440,8 +440,8 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
goto done;
/* Verify that cur_dims must have one dimension whose size is greater than prev_dims */
- HDmemset(start, 0, sizeof start);
- HDmemset(count, 0, sizeof count);
+ memset(start, 0, sizeof start);
+ memset(count, 0, sizeof count);
ctr = 0;
for (i = 0; i < ndims; i++)
if (cur_dims[i] > prev_dims[i]) {
@@ -462,7 +462,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
goto done;
} /* end if */
else { /* changes for more than one dimensions */
- HDmemset(start, 0, sizeof start);
+ memset(start, 0, sizeof start);
/* Make the selection in the dataset based on "cur_dims" and "prev_dims" */
if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, cur_dims, NULL) < 0)
@@ -506,7 +506,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
goto done;
/* Allocate memory for reading in the elements in the dataset selection */
- if (NULL == (sav_buf = tmp_buf = (char *)HDcalloc((size_t)num_elmts, tot_tsize)))
+ if (NULL == (sav_buf = tmp_buf = (char *)calloc((size_t)num_elmts, tot_tsize)))
goto done;
/* Read the dataset elements in the selection */
@@ -519,7 +519,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
/* Allocate memory for the vector of H5LD_memb_t pointers */
len = (HDstrlen(fields) / 2) + 2;
- if (NULL == (listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))))
+ if (NULL == (listv = (H5LD_memb_t **)calloc(len, sizeof(H5LD_memb_t *))))
goto done;
/* Process and store information for "fields" */
@@ -532,7 +532,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
/* Copy data for "fields" to the input buffer */
for (j = 0; listv[j] != NULL; j++) {
- HDmemcpy(buf_p, tmp_buf + listv[j]->tot_offset, listv[j]->last_tsize);
+ memcpy(buf_p, tmp_buf + listv[j]->tot_offset, listv[j]->last_tsize);
buf_p += listv[j]->last_tsize;
} /* end for */
tmp_buf += tot_tsize;
@@ -555,13 +555,13 @@ done:
/* Free the array of H5LD_memb_t pointers */
if (listv)
- HDfree(listv);
+ free(listv);
/* Free memory */
if (dup_fields)
- HDfree(dup_fields);
+ free(dup_fields);
if (sav_buf)
- HDfree(sav_buf);
+ free(sav_buf);
return (ret_value);
} /* H5LD_get_dset_elmts() */
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 4c61aa8..90f0fbf 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -304,7 +304,7 @@ image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *
if (udata->vfd_ref_count != 1)
goto out;
- if (NULL == (udata->vfd_image_ptr = HDrealloc(ptr, size)))
+ if (NULL == (udata->vfd_image_ptr = realloc(ptr, size)))
goto out;
udata->vfd_image_size = size;
@@ -356,7 +356,7 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
* references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
!(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
- HDfree(udata->fapl_image_ptr);
+ free(udata->fapl_image_ptr);
udata->app_image_ptr = NULL;
udata->fapl_image_ptr = NULL;
udata->vfd_image_ptr = NULL;
@@ -375,7 +375,7 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
* references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
!(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
- HDfree(udata->vfd_image_ptr);
+ free(udata->vfd_image_ptr);
udata->app_image_ptr = NULL;
udata->fapl_image_ptr = NULL;
udata->vfd_image_ptr = NULL;
@@ -463,7 +463,7 @@ udata_free(void *_udata)
/* checks that there are no references outstanding before deallocating udata */
if (udata->ref_count == 0 && udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0)
- HDfree(udata);
+ free(udata);
return (SUCCEED);
@@ -832,7 +832,7 @@ H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
H5LT_file_image_ud_t *udata; /* Pointer to udata structure */
/* Allocate buffer to communicate user data to callbacks */
- if (NULL == (udata = (H5LT_file_image_ud_t *)HDmalloc(sizeof(H5LT_file_image_ud_t))))
+ if (NULL == (udata = (H5LT_file_image_ud_t *)malloc(sizeof(H5LT_file_image_ud_t))))
goto out;
/* Initialize udata with info about app buffer containing file image and flags */
@@ -852,7 +852,7 @@ H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
/* Set file image callbacks */
if (H5Pset_file_image_callbacks(fapl, &callbacks) < 0) {
- HDfree(udata);
+ free(udata);
goto out;
} /* end if */
} /* end if */
@@ -2021,7 +2021,7 @@ H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
goto out;
if (lang_type != H5LT_DDL) {
- HDfprintf(stderr, "only DDL is supported for now.\n");
+ fprintf(stderr, "only DDL is supported for now.\n");
goto out;
}
@@ -2029,11 +2029,11 @@ H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
myinput = HDstrdup(text);
if ((type_id = H5LTyyparse()) < 0) {
- HDfree(myinput);
+ free(myinput);
goto out;
}
- HDfree(myinput);
+ free(myinput);
input_len = 0;
return type_id;
@@ -2074,9 +2074,9 @@ realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, const char *str
*len += INCREMENT;
}
- tmp_realloc = (char *)HDrealloc(buf, *len);
+ tmp_realloc = (char *)realloc(buf, *len);
if (tmp_realloc == NULL) {
- HDfree(buf);
+ free(buf);
buf = NULL;
goto out;
}
@@ -2131,7 +2131,7 @@ indentation(size_t x, char *str, hbool_t no_u_buf, size_t *s_len)
char tmp_str[TMP_LEN];
if (x < 80) {
- HDmemset(tmp_str, ' ', x);
+ memset(tmp_str, ' ', x);
tmp_str[x] = '\0';
}
else
@@ -2191,8 +2191,8 @@ print_enum(hid_t type, char *str, size_t *str_len, hbool_t no_ubuf, size_t indt)
dst_size = H5Tget_size(native);
/* Get the names and raw values of all members */
- name = (char **)HDcalloc((size_t)nmembs, sizeof(char *));
- value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(dst_size, super_size));
+ name = (char **)calloc((size_t)nmembs, sizeof(char *));
+ value = (unsigned char *)calloc((size_t)nmembs, MAX(dst_size, super_size));
for (i = 0; i < nmembs; i++) {
if ((name[i] = H5Tget_member_name(type, (unsigned)i)) == NULL)
@@ -2219,7 +2219,7 @@ print_enum(hid_t type, char *str, size_t *str_len, hbool_t no_ubuf, size_t indt)
nchars = HDsnprintf(tmp_str, TMP_LEN, "\"%s\"", name[i]);
if (!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
- HDmemset(tmp_str, ' ', (size_t)MAX(3, 19 - nchars) + 1);
+ memset(tmp_str, ' ', (size_t)MAX(3, 19 - nchars) + 1);
tmp_str[MAX(3, 19 - nchars)] = '\0';
if (!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
@@ -2240,8 +2240,8 @@ print_enum(hid_t type, char *str, size_t *str_len, hbool_t no_ubuf, size_t indt)
for (i = 0; i < nmembs; i++)
H5free_memory(name[i]);
- HDfree(name);
- HDfree(value);
+ free(name);
+ free(value);
H5Tclose(super);
return str;
@@ -2250,8 +2250,8 @@ out:
if (0 == nmembs) {
str = realloc_and_append(no_ubuf, str_len, str, "\n");
- HDassert((indt + 4) < TMP_LEN);
- HDmemset(tmp_str, ' ', (indt + 4) + 1);
+ assert((indt + 4) < TMP_LEN);
+ memset(tmp_str, ' ', (indt + 4) + 1);
tmp_str[(indt + 4)] = '\0';
str = realloc_and_append(no_ubuf, str_len, str, tmp_str);
str = realloc_and_append(no_ubuf, str_len, str, " <empty>");
@@ -2261,12 +2261,12 @@ out:
if (name) {
for (i = 0; i < nmembs; i++)
if (name[i])
- HDfree(name[i]);
- HDfree(name);
+ free(name[i]);
+ free(name);
} /* end if */
if (value)
- HDfree(value);
+ free(value);
if (super >= 0)
H5Tclose(super);
@@ -2300,13 +2300,13 @@ H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len)
goto out;
if (len && !str) {
- text_str = (char *)HDcalloc(str_len, sizeof(char));
+ text_str = (char *)calloc(str_len, sizeof(char));
text_str[0] = '\0';
if (!(text_str = H5LT_dtype_to_text(dtype, text_str, lang_type, &str_len, 1)))
goto out;
*len = HDstrlen(text_str) + 1;
if (text_str)
- HDfree(text_str);
+ free(text_str);
text_str = NULL;
}
else if (len && str) {
@@ -2318,7 +2318,7 @@ H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len)
return ret;
out:
- HDfree(text_str);
+ free(text_str);
return FAIL;
}
@@ -2694,18 +2694,18 @@ next:
goto out;
if (H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
goto out;
- stmp = (char *)HDcalloc(super_len, sizeof(char));
+ stmp = (char *)calloc(super_len, sizeof(char));
if (H5LTdtype_to_text(super, stmp, lang, &super_len) < 0) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp))) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (stmp)
- HDfree(stmp);
+ free(stmp);
stmp = NULL;
HDsnprintf(tmp_str, TMP_LEN, ";\n");
@@ -2741,18 +2741,18 @@ next:
goto out;
if (H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
goto out;
- stmp = (char *)HDcalloc(super_len, sizeof(char));
+ stmp = (char *)calloc(super_len, sizeof(char));
if (H5LTdtype_to_text(super, stmp, lang, &super_len) < 0) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp))) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (stmp)
- HDfree(stmp);
+ free(stmp);
stmp = NULL;
HDsnprintf(tmp_str, TMP_LEN, "\n");
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
@@ -2802,17 +2802,17 @@ next:
goto out;
if (H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
goto out;
- stmp = (char *)HDcalloc(super_len, sizeof(char));
+ stmp = (char *)calloc(super_len, sizeof(char));
if (H5LTdtype_to_text(super, stmp, lang, &super_len) < 0) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp))) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (stmp)
- HDfree(stmp);
+ free(stmp);
stmp = NULL;
HDsnprintf(tmp_str, TMP_LEN, "\n");
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
@@ -2860,17 +2860,17 @@ next:
if (H5LTdtype_to_text(mtype, NULL, lang, &mlen) < 0)
goto out;
- mtmp = (char *)HDcalloc(mlen, sizeof(char));
+ mtmp = (char *)calloc(mlen, sizeof(char));
if (H5LTdtype_to_text(mtype, mtmp, lang, &mlen) < 0) {
- HDfree(mtmp);
+ free(mtmp);
goto out;
}
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, mtmp))) {
- HDfree(mtmp);
+ free(mtmp);
goto out;
}
if (mtmp)
- HDfree(mtmp);
+ free(mtmp);
mtmp = NULL;
if (H5T_COMPOUND == mclass)
@@ -3611,7 +3611,7 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
done:
if (tmp_path != NULL)
- HDfree(tmp_path);
+ free(tmp_path);
return ret_value;
}
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c
index 3f6feaa..45e3c57 100644
--- a/hl/src/H5LTanalyze.c
+++ b/hl/src/H5LTanalyze.c
@@ -1480,7 +1480,7 @@ case 55:
YY_RULE_SETUP
#line 117 "hl/src//H5LTanalyze.l"
{
- H5LTyylval.ival = HDatoi(yytext);
+ H5LTyylval.ival = atoi(yytext);
return NUMBER;
}
YY_BREAK
@@ -2552,7 +2552,7 @@ trim_quotes(const char *quoted)
size_t len = HDstrlen(quoted);
char *trimmed;
- HDassert(quoted[0] == '"' && quoted[len - 1] == '"');
+ assert(quoted[0] == '"' && quoted[len - 1] == '"');
trimmed = HDstrdup(quoted + 1);
trimmed[len - 2] = '\0';
@@ -2564,14 +2564,14 @@ static int my_yyinput(char *buf, int max_size)
{
int ret;
- HDmemcpy(buf, myinput, input_len);
+ memcpy(buf, myinput, input_len);
ret = (int)input_len;
return ret;
}
int H5LTyyerror(const char *msg)
{
- HDprintf("ERROR: %s before \"%s\".\n", msg, yytext);
+ printf("ERROR: %s before \"%s\".\n", msg, yytext);
return 0;
}
diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c
index fb12d2c..4386a7c 100644
--- a/hl/src/H5LTparse.c
+++ b/hl/src/H5LTparse.c
@@ -1643,7 +1643,7 @@ yyreduce:
}
}
if((yyvsp[-2].sval)) {
- HDfree((yyvsp[-2].sval));
+ free((yyvsp[-2].sval));
(yyvsp[-2].sval) = NULL;
}
cmpd_stack[csindex].is_field = 0;
@@ -1658,7 +1658,7 @@ yyreduce:
#line 205 "hl/src//H5LTparse.y"
{
(yyval.sval) = HDstrdup(yylval.sval);
- HDfree(yylval.sval);
+ free(yylval.sval);
yylval.sval = NULL;
}
#line 1634 "hl/src//H5LTparse.c"
@@ -1728,7 +1728,7 @@ yyreduce:
#line 253 "hl/src//H5LTparse.y"
{
H5Tset_tag((yyvsp[-3].hid), yylval.sval);
- HDfree(yylval.sval);
+ free(yylval.sval);
yylval.sval = NULL;
}
#line 1704 "hl/src//H5LTparse.c"
@@ -1872,7 +1872,7 @@ yyreduce:
{
is_enum_memb = 1; /*indicate member of enum*/
enum_memb_symbol = HDstrdup(yylval.sval);
- HDfree(yylval.sval);
+ free(yylval.sval);
yylval.sval = NULL;
}
#line 1848 "hl/src//H5LTparse.c"
@@ -1916,7 +1916,7 @@ yyreduce:
}
is_enum_memb = 0;
- if(enum_memb_symbol) HDfree(enum_memb_symbol);
+ if(enum_memb_symbol) free(enum_memb_symbol);
}
H5Tclose(super);
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c
index 9d5d627..65cdce3 100644
--- a/hl/src/H5PT.c
+++ b/hl/src/H5PT.c
@@ -84,7 +84,7 @@ H5PTcreate(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk_si
goto error;
/* Get memory for the table identifier */
- table = (htbl_t *)HDmalloc(sizeof(htbl_t));
+ table = (htbl_t *)malloc(sizeof(htbl_t));
if (table == NULL) {
goto error;
}
@@ -153,7 +153,7 @@ error:
if (table) {
if (table->type_id != H5I_INVALID_HID)
H5Tclose(table->type_id);
- HDfree(table);
+ free(table);
}
return ret_value;
@@ -203,7 +203,7 @@ H5PTcreate_fl(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk
goto error;
/* Get memory for the table identifier */
- table = (htbl_t *)HDmalloc(sizeof(htbl_t));
+ table = (htbl_t *)malloc(sizeof(htbl_t));
if (table == NULL) {
goto error;
}
@@ -267,7 +267,7 @@ error:
if (table) {
if (table->type_id != H5I_INVALID_HID)
H5Tclose(table->type_id);
- HDfree(table);
+ free(table);
}
return ret_value;
@@ -310,7 +310,7 @@ H5PTopen(hid_t loc_id, const char *dset_name)
H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
goto error;
- table = (htbl_t *)HDmalloc(sizeof(htbl_t));
+ table = (htbl_t *)malloc(sizeof(htbl_t));
if (table == NULL) {
goto error;
}
@@ -370,7 +370,7 @@ error:
H5Tclose(table->type_id);
if (table->dset_id != H5I_INVALID_HID)
H5Dclose(table->dset_id);
- HDfree(table);
+ free(table);
}
return ret_value;
@@ -387,7 +387,7 @@ error:
static herr_t
H5PT_free_id(void *id, void H5_ATTR_UNUSED **_ctx)
{
- HDfree(id);
+ free(id);
return SUCCEED;
}
@@ -422,7 +422,7 @@ H5PT_close(htbl_t *table)
if (H5Tclose(table->type_id) < 0)
goto error;
- HDfree(table);
+ free(table);
return SUCCEED;
@@ -432,7 +432,7 @@ error:
H5Dclose(table->dset_id);
H5Tclose(table->type_id);
H5E_END_TRY
- HDfree(table);
+ free(table);
}
return FAIL;
}
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c
index dd938bf..ccbee50 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -1229,9 +1229,9 @@ H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
if (H5TBget_table_info(loc_id, dset_name, &nfields, &ntotal_records) < 0)
goto out;
- if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
- if (NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_sizes = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
@@ -1251,7 +1251,7 @@ H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
read_nrecords = ntotal_records - read_start;
if (read_nrecords) {
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)read_nrecords, src_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)read_nrecords, src_size)))
goto out;
/* read the records after the deleted one(s) */
@@ -1317,11 +1317,11 @@ H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
out:
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (src_offset)
- HDfree(src_offset);
+ free(src_offset);
if (src_sizes)
- HDfree(src_sizes);
+ free(src_sizes);
if (mem_type_id > 0)
if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
@@ -1401,7 +1401,7 @@ H5TBinsert_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
goto out;
read_nrecords = ntotal_records - start;
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)read_nrecords, type_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)read_nrecords, type_size)))
goto out;
/* read the records after the inserted one(s) */
@@ -1473,7 +1473,7 @@ H5TBinsert_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
out:
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (sid > 0)
if (H5Sclose(sid) < 0)
ret_val = -1;
@@ -1543,9 +1543,9 @@ H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize
if (H5TBget_table_info(loc_id, dset_name1, &nfields, &ntotal_records) < 0)
goto out;
- if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
- if (NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_sizes = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
@@ -1573,7 +1573,7 @@ H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize
if (0 == (type_size1 = H5Tget_size(tid)))
goto out;
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size1)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, type_size1)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
@@ -1601,11 +1601,11 @@ H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize
out:
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (src_offset)
- HDfree(src_offset);
+ free(src_offset);
if (src_sizes)
- HDfree(src_sizes);
+ free(src_sizes);
if (tid > 0)
if (H5Tclose(tid) < 0)
ret_val = -1;
@@ -1696,9 +1696,9 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
if (H5TBget_table_info(loc_id1, dset_name1, &nfields, &nrecords) < 0)
goto out;
- if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
- if (NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_sizes = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
@@ -1773,7 +1773,7 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
goto out;
/* alloc fill value attribute buffer */
- if (NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(type_size)))
+ if (NULL == (tmp_fill_buf = (unsigned char *)malloc(type_size)))
goto out;
/* get the fill value attributes */
@@ -1823,7 +1823,7 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
* read data from 1st table
*-------------------------------------------------------------------------
*/
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, type_size)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
@@ -1856,7 +1856,7 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
if (H5Sclose(m_sid) < 0)
goto out;
m_sid = H5I_INVALID_HID;
- HDfree(tmp_buf);
+ free(tmp_buf);
tmp_buf = NULL;
/*-------------------------------------------------------------------------
@@ -1889,7 +1889,7 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
*-------------------------------------------------------------------------
*/
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, type_size)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
@@ -1919,13 +1919,13 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
out:
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (tmp_fill_buf)
- HDfree(tmp_fill_buf);
+ free(tmp_fill_buf);
if (src_offset)
- HDfree(src_offset);
+ free(src_offset);
if (src_sizes)
- HDfree(src_sizes);
+ free(src_sizes);
if (member_type_id > 0)
if (H5Tclose(member_type_id) < 0)
ret_val = -1;
@@ -2087,7 +2087,7 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi
goto out;
/* alloc fill value attribute buffer */
- if (NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(total_size)))
+ if (NULL == (tmp_fill_buf = (unsigned char *)malloc(total_size)))
goto out;
/* get the fill value attributes */
@@ -2188,7 +2188,7 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi
*-------------------------------------------------------------------------
*/
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, (size_t)total_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, (size_t)total_size)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
@@ -2346,9 +2346,9 @@ out:
if (member_name)
H5free_memory(member_name);
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (tmp_fill_buf)
- HDfree(tmp_fill_buf);
+ free(tmp_fill_buf);
if (preserve_id > 0)
if (H5Pclose(preserve_id) < 0)
ret_val = -1;
@@ -2544,7 +2544,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
curr_offset = 0;
/* alloc fill value attribute buffer */
- if (NULL == (tmp_fill_buf = (unsigned char *)HDmalloc((size_t)type_size2)))
+ if (NULL == (tmp_fill_buf = (unsigned char *)malloc((size_t)type_size2)))
goto out;
/*-------------------------------------------------------------------------
@@ -2653,7 +2653,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
if (H5Tinsert(read_type_id, member_name, (size_t)0, member_type_id) < 0)
goto out;
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, member_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, member_size)))
goto out;
/* read */
@@ -2698,7 +2698,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
goto out;
write_type_id = H5I_INVALID_HID;
- HDfree(tmp_buf);
+ free(tmp_buf);
tmp_buf = NULL;
} /* end if */
@@ -2788,9 +2788,9 @@ out:
if (member_name)
H5free_memory(member_name);
if (tmp_fill_buf)
- HDfree(tmp_fill_buf);
+ free(tmp_fill_buf);
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (attr_id > 0)
if (H5Aclose(attr_id) < 0)
ret_val = -1;
@@ -2907,7 +2907,7 @@ H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, unsigned char
if (H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
goto out;
- if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
@@ -2931,7 +2931,7 @@ H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, unsigned char
out:
if (src_offset)
- HDfree(src_offset);
+ free(src_offset);
return ret_val;
} /* end H5TBAget_fill() */
@@ -3279,11 +3279,11 @@ H5TB_create_type(hid_t loc_id, const char *dset_name, size_t type_size, const si
if (H5TBget_table_info(loc_id, dset_name, &nfields, NULL) < 0)
goto out;
- if (NULL == (fnames = (char **)HDcalloc(sizeof(char *), (size_t)nfields)))
+ if (NULL == (fnames = (char **)calloc(sizeof(char *), (size_t)nfields)))
goto out;
for (i = 0; i < nfields; i++)
- if (NULL == (fnames[i] = (char *)HDmalloc(HLTB_MAX_FIELD_LEN)))
+ if (NULL == (fnames[i] = (char *)malloc(HLTB_MAX_FIELD_LEN)))
goto out;
/* get field info */
@@ -3321,8 +3321,8 @@ out:
if (fnames) {
for (i = 0; i < nfields; i++)
if (fnames[i])
- HDfree(fnames[i]);
- HDfree(fnames);
+ free(fnames[i]);
+ free(fnames);
} /* end if */
if (mtype_id > 0)
if (H5Tclose(mtype_id) < 0)
diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c
index e0a3499..27a98e7 100644
--- a/hl/test/gen_test_ds.c
+++ b/hl/test/gen_test_ds.c
@@ -79,12 +79,12 @@ main(int argc, char **argv)
char filename[65];
if (argc < 2 || !argv[0] || !argv[1]) {
- HDprintf("Usage: gen_test [le | be]\n");
+ printf("Usage: gen_test [le | be]\n");
return 1;
}
if (argv[1] && (strcmp("le", argv[1]) != 0) && (strcmp("be", argv[1]) != 0)) {
- HDprintf("Usage: gen_test [le | be]\n");
+ printf("Usage: gen_test [le | be]\n");
return 1;
}
@@ -104,11 +104,11 @@ main(int argc, char **argv)
if (nerrors)
goto error;
- HDprintf("Dimension scales file generation passed.\n");
+ printf("Dimension scales file generation passed.\n");
return 0;
error:
- HDprintf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n", nerrors);
+ printf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n", nerrors);
return 1;
}
@@ -192,11 +192,11 @@ test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
if (H5DSis_attached(did, dsid, idx) == 0) {
if (H5DSattach_scale(did, dsid, idx) >= 0) {
if (H5DSis_attached(did, dsid, idx) > 0) {
- /* HDprintf(" scale attached "); */
+ /* printf(" scale attached "); */
ret_value = SUCCEED;
}
else if (H5DSis_attached(did, dsid, idx) == 0) {
- HDprintf(" scale not attached ");
+ printf(" scale not attached ");
}
}
}
@@ -260,13 +260,13 @@ test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename
if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
if (H5DSis_attached(did, dsid, idx) == 1) {
if ((name_len = H5DSget_scale_name(dsid, NULL, (size_t)0)) > 0) {
- name_out = (char *)HDmalloc((size_t)name_len * sizeof(char));
+ name_out = (char *)malloc((size_t)name_len * sizeof(char));
if (name_out != NULL) {
if (H5DSget_scale_name(dsid, name_out, (size_t)name_len) >= 0) {
if (strcmp(scalename, name_out) == 0) {
ret_value = SUCCEED;
}
- HDfree(name_out);
+ free(name_out);
name_out = NULL;
}
}
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 70af31a..3d31786 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -214,11 +214,11 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All dimension scales tests passed.\n");
+ printf("All dimension scales tests passed.\n");
return 0;
error:
- HDprintf("***** %d DIMENSION SCALES TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d DIMENSION SCALES TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return 1;
}
@@ -1111,7 +1111,7 @@ test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
ret_value = SUCCEED;
}
else if (H5DSis_attached(did, dsid, idx) == 0) {
- HDprintf(" scale not attached ");
+ printf(" scale not attached ");
}
}
}
@@ -1175,13 +1175,13 @@ test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename
if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
if (H5DSis_attached(did, dsid, idx) == 1) {
if ((name_len = H5DSget_scale_name(dsid, NULL, (size_t)0)) > 0) {
- name_out = (char *)HDmalloc(((size_t)name_len + 1) * sizeof(char));
+ name_out = (char *)malloc(((size_t)name_len + 1) * sizeof(char));
if (name_out != NULL) {
if (H5DSget_scale_name(dsid, name_out, (size_t)name_len + 1) >= 0) {
if (HDstrncmp(scalename, name_out, (size_t)name_len) == 0) {
ret_value = SUCCEED;
}
- HDfree(name_out);
+ free(name_out);
name_out = NULL;
}
}
@@ -2371,7 +2371,7 @@ test_simple(void)
char snames[3];
int i, j;
- HDprintf("Testing API functions\n");
+ printf("Testing API functions\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -3161,8 +3161,8 @@ test_simple(void)
goto out;
/* allocate */
- dim0_labeld = (char *)HDmalloc((size_t)dim0_label_size * sizeof(char));
- dim1_labeld = (char *)HDmalloc((size_t)dim1_label_size * sizeof(char));
+ dim0_labeld = (char *)malloc((size_t)dim0_label_size * sizeof(char));
+ dim1_labeld = (char *)malloc((size_t)dim1_label_size * sizeof(char));
if (dim0_labeld == NULL || dim1_labeld == NULL)
goto out;
if (H5DSget_label(did, DIM0, dim0_labeld, (size_t)dim0_label_size) < 0)
@@ -3174,11 +3174,11 @@ test_simple(void)
if (HDstrncmp(DIM1_LABEL, dim1_labeld, (size_t)(dim1_label_size - 1)) != 0)
goto out;
if (dim0_labeld) {
- HDfree(dim0_labeld);
+ free(dim0_labeld);
dim0_labeld = NULL;
}
if (dim1_labeld) {
- HDfree(dim1_labeld);
+ free(dim1_labeld);
dim1_labeld = NULL;
}
@@ -3225,7 +3225,7 @@ test_simple(void)
goto out;
/* allocate a buffer */
- name_out = (char *)HDmalloc(((size_t)name_len + 1) * sizeof(char));
+ name_out = (char *)malloc(((size_t)name_len + 1) * sizeof(char));
if (name_out == NULL)
goto out;
@@ -3236,7 +3236,7 @@ test_simple(void)
if (HDstrncmp("Latitude set 0", name_out, (size_t)name_len) != 0)
goto out;
if (name_out) {
- HDfree(name_out);
+ free(name_out);
name_out = NULL;
}
@@ -3497,7 +3497,7 @@ test_simple(void)
goto out;
break;
default:
- HDassert(0);
+ assert(0);
break;
} /*switch*/
} /*for*/
@@ -3627,7 +3627,7 @@ read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
goto out;
if (nelmts) {
- buf = (char *)HDmalloc(((size_t)nelmts * size));
+ buf = (char *)malloc(((size_t)nelmts * size));
if (buf == NULL)
goto out;
if (H5Dread(scale_id, mtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -3635,7 +3635,7 @@ read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
for (i = 0; i < nelmts; i++) {
if (buf[i] != data[i]) {
- HDprintf("read and write buffers differ\n");
+ printf("read and write buffers differ\n");
goto out;
}
}
@@ -3649,7 +3649,7 @@ read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
if (H5Tclose(mtid) < 0)
goto out;
if (buf)
- HDfree(buf);
+ free(buf);
return ret;
@@ -3661,7 +3661,7 @@ out:
H5Tclose(tid);
H5Tclose(mtid);
if (buf) {
- HDfree(buf);
+ free(buf);
}
}
H5E_END_TRY;
@@ -3839,7 +3839,7 @@ test_errors(void)
hid_t sidds = -1; /* space ID */
hsize_t pal_dims[] = {9, 3};
- HDprintf("Testing error conditions\n");
+ printf("Testing error conditions\n");
/*-------------------------------------------------------------------------
* create a file, spaces, dataset and group ids
@@ -4213,7 +4213,7 @@ test_iterators(void)
char dname[30]; /* dataset name */
int i;
- HDprintf("Testing iterators\n");
+ printf("Testing iterators\n");
/*-------------------------------------------------------------------------
* create a file, spaces, dataset and group ids
@@ -4403,7 +4403,7 @@ test_rank(void)
float buff[1] = {1};
int i;
- HDprintf("Testing ranks\n");
+ printf("Testing ranks\n");
/*-------------------------------------------------------------------------
* create a file, a dataset, scales
@@ -4610,7 +4610,7 @@ test_types(void)
const char *s1_str = "ABC";
const char *s2_str = "ABCD";
- HDprintf("Testing scales with several datatypes\n");
+ printf("Testing scales with several datatypes\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -4788,7 +4788,7 @@ test_data(void)
hsize_t londims[1]; /* array to hold dimensions */
float fill = -99; /* fill value */
- HDprintf("Testing reading ASCII data and generate HDF5 data with scales\n");
+ printf("Testing reading ASCII data and generate HDF5 data with scales\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -4818,7 +4818,7 @@ test_data(void)
if (H5LTmake_dataset_float(fid, "lat", 1, latdims, latbuf) < 0)
goto out;
- HDfree(latbuf);
+ free(latbuf);
latbuf = NULL;
/* read the longitude */
@@ -4829,7 +4829,7 @@ test_data(void)
if (H5LTmake_dataset_float(fid, "lon", 1, londims, lonbuf) < 0)
goto out;
- HDfree(lonbuf);
+ free(lonbuf);
lonbuf = NULL;
/* make a dataset for the data. a fill value is set */
@@ -4849,7 +4849,7 @@ test_data(void)
if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, vals) < 0)
goto out;
- HDfree(vals);
+ free(vals);
vals = NULL;
if (H5Dclose(did) < 0)
@@ -4924,11 +4924,11 @@ out:
H5_FAILED();
if (latbuf)
- HDfree(latbuf);
+ free(latbuf);
if (lonbuf)
- HDfree(lonbuf);
+ free(lonbuf);
if (vals)
- HDfree(vals);
+ free(vals);
return FAIL;
}
@@ -4957,20 +4957,20 @@ read_data(const char *fname, int ndims, hsize_t *dims, float **buf)
const char *data_file = H5_get_srcdir_filename(fname);
/* read first data file */
- f = HDfopen(data_file, "r");
+ f = fopen(data_file, "r");
if (f == NULL) {
- HDprintf("Could not open file %s\n", data_file);
+ printf("Could not open file %s\n", data_file);
return -1;
}
for (i = 0, nelms = 1; i < ndims; i++) {
if (HDfscanf(f, "%s %u", str, &j) && HDferror(f)) {
- HDprintf("fscanf error in file %s\n", data_file);
+ printf("fscanf error in file %s\n", data_file);
HDfclose(f);
return -1;
} /* end if */
if (HDfscanf(f, "%d", &n) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s\n", data_file);
+ printf("fscanf error in file %s\n", data_file);
HDfclose(f);
return -1;
} /* end if */
@@ -4978,17 +4978,17 @@ read_data(const char *fname, int ndims, hsize_t *dims, float **buf)
nelms *= (size_t)n;
}
- *buf = (float *)HDmalloc(nelms * sizeof(float));
+ *buf = (float *)malloc(nelms * sizeof(float));
if (*buf == NULL) {
- HDprintf("memory allocation failed\n");
+ printf("memory allocation failed\n");
HDfclose(f);
return -1;
}
for (j = 0; j < nelms; j++) {
if (HDfscanf(f, "%f", &val) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s\n", data_file);
+ printf("fscanf error in file %s\n", data_file);
HDfclose(f);
return -1;
} /* end if */
@@ -5018,7 +5018,7 @@ test_errors2(void)
int nscales; /* number of scales in DIM */
int count; /* visitor data */
- HDprintf("Testing parameter errors\n");
+ printf("Testing parameter errors\n");
/*-------------------------------------------------------------------------
* create a file, a dataset, scales
diff --git a/hl/test/test_dset_append.c b/hl/test/test_dset_append.c
index c4afe89..e8b474c 100644
--- a/hl/test/test_dset_append.c
+++ b/hl/test/test_dset_append.c
@@ -251,7 +251,7 @@ test_dataset_append_rows_columns(hid_t fid)
TEST_ERROR;
/* Clear the buffer */
- HDmemset(rbuf, 0, sizeof(rbuf));
+ memset(rbuf, 0, sizeof(rbuf));
/* Close the dataset */
if (H5Dclose(did) < 0)
@@ -387,7 +387,7 @@ test_dataset_append_rows(hid_t fid)
TEST_ERROR;
/* Clear the buffer */
- HDmemset(rbuf, 0, sizeof(rbuf));
+ memset(rbuf, 0, sizeof(rbuf));
/* Close the dataset */
if (H5Dclose(did) < 0)
@@ -524,7 +524,7 @@ test_dataset_append_columns(hid_t fid)
TEST_ERROR;
/* Clear the buffer */
- HDmemset(rbuf, 0, sizeof(rbuf));
+ memset(rbuf, 0, sizeof(rbuf));
/* Close the dataset */
if (H5Dclose(did) < 0)
@@ -687,7 +687,7 @@ test_dataset_append_BUG1(hid_t fid)
if (buf[i][j] != rbuf[i][j])
TEST_ERROR;
- HDmemset(rbuf, 0, sizeof(rbuf));
+ memset(rbuf, 0, sizeof(rbuf));
/* Close the dataset */
if (H5Dclose(did) < 0)
@@ -850,7 +850,7 @@ test_dataset_append_BUG2(hid_t fid)
if (buf[i][j] != rbuf[i][j])
TEST_ERROR;
- HDmemset(rbuf, 0, sizeof(rbuf));
+ memset(rbuf, 0, sizeof(rbuf));
/* Close the dataset */
if (H5Dclose(did) < 0)
@@ -1009,7 +1009,7 @@ test_dataset_append_less(hid_t fid)
TEST_ERROR;
/* Clear the buffer */
- HDmemset(rbuf, 0, sizeof(rbuf));
+ memset(rbuf, 0, sizeof(rbuf));
/* Close the dataset */
if (H5Dclose(did) < 0)
@@ -1166,7 +1166,7 @@ test_dataset_append_vary(hid_t fid)
TEST_ERROR;
/* Clear the dataset */
- HDmemset(rbuf, 0, sizeof(rbuf));
+ memset(rbuf, 0, sizeof(rbuf));
/* Close the dataset */
if (H5Dclose(did) < 0)
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c
index defaab2..e7d830b 100644
--- a/hl/test/test_file_image.c
+++ b/hl/test/test_file_image.c
@@ -76,27 +76,27 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
VERIFY(nflags > 0, "The number of flag combinations must be greater than 0");
/* allocate array of flags for open images */
- if (NULL == (input_flags = (unsigned *)HDmalloc(sizeof(unsigned) * open_images)))
+ if (NULL == (input_flags = (unsigned *)malloc(sizeof(unsigned) * open_images)))
FAIL_PUTS_ERROR("malloc() failed");
/* allocate array of pointers for each of the open images */
- if (NULL == (buf_ptr = (void **)HDmalloc(sizeof(void *) * open_images)))
+ if (NULL == (buf_ptr = (void **)malloc(sizeof(void *) * open_images)))
FAIL_PUTS_ERROR("malloc() failed");
/* allocate array to store the name of each of the open images */
- if (NULL == (filename = (char **)HDcalloc(1, sizeof(char *) * open_images)))
+ if (NULL == (filename = (char **)calloc(1, sizeof(char *) * open_images)))
FAIL_PUTS_ERROR("malloc() failed");
/* allocate array to store the size of each of the open images */
- if (NULL == (buf_size = (ssize_t *)HDmalloc(sizeof(ssize_t) * open_images)))
+ if (NULL == (buf_size = (ssize_t *)malloc(sizeof(ssize_t) * open_images)))
FAIL_PUTS_ERROR("malloc() failed");
/* allocate array for each of the file identifiers */
- if (NULL == (file_id = (hid_t *)HDmalloc(sizeof(hid_t) * open_images)))
+ if (NULL == (file_id = (hid_t *)malloc(sizeof(hid_t) * open_images)))
FAIL_PUTS_ERROR("malloc() failed");
/* allocate array for each of the dataset identifiers */
- if (NULL == (dset_id = (hid_t *)HDmalloc(sizeof(hid_t) * open_images)))
+ if (NULL == (dset_id = (hid_t *)malloc(sizeof(hid_t) * open_images)))
FAIL_PUTS_ERROR("malloc() failed");
HL_TESTING2("get file images");
@@ -109,9 +109,9 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
/* allocate name buffer for image i */
size_t filenamelength = sizeof(char) * 32;
- filename[i] = (char *)HDmalloc(filenamelength);
+ filename[i] = (char *)malloc(filenamelength);
if (!filename[i])
- FAIL_PUTS_ERROR("HDmalloc() failed");
+ FAIL_PUTS_ERROR("malloc() failed");
/* create file name */
HDsnprintf(filename[i], filenamelength, "image_file%d.h5", (int)i);
@@ -169,7 +169,7 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
FAIL_PUTS_ERROR("H5Fget_file_image() failed");
/* allocate buffer for the file image i */
- if (NULL == (buf_ptr[i] = (void *)HDmalloc((size_t)buf_size[i])))
+ if (NULL == (buf_ptr[i] = (void *)malloc((size_t)buf_size[i])))
FAIL_PUTS_ERROR("malloc() failed");
/* buffer for file image 2 is filled with counter data (non-valid image) */
@@ -233,28 +233,28 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
*/
if (input_flags[i] & H5LT_FILE_IMAGE_OPEN_RW && !(input_flags[i] & H5LT_FILE_IMAGE_DONT_COPY)) {
- void *tmp_ptr = HDmalloc((size_t)buf_size[i]);
+ void *tmp_ptr = malloc((size_t)buf_size[i]);
if (!tmp_ptr)
FAIL_PUTS_ERROR("buffer allocation failed");
/* Copy vfd buffer to a temporary buffer */
- HDmemcpy(tmp_ptr, (void *)*core_buf_ptr_ptr, (size_t)buf_size[i]);
+ memcpy(tmp_ptr, (void *)*core_buf_ptr_ptr, (size_t)buf_size[i]);
/* Clear status_flags in the superblock for the vfd buffer: file locking is using status_flags
*/
- HDmemset((uint8_t *)tmp_ptr + SUPER_STATUS_FLAGS_OFF_V0_V1, (int)0,
- (size_t)SUPER_STATUS_FLAGS_SIZE_V0_V1);
+ memset((uint8_t *)tmp_ptr + SUPER_STATUS_FLAGS_OFF_V0_V1, (int)0,
+ (size_t)SUPER_STATUS_FLAGS_SIZE_V0_V1);
/* Does the comparison */
- if (HDmemcmp(tmp_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
+ if (memcmp(tmp_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
FAIL_PUTS_ERROR("comparison of TMP vfd and user buffer failed");
/* Free the temporary buffer */
if (tmp_ptr)
- HDfree(tmp_ptr);
+ free(tmp_ptr);
}
else {
/* test whether the contents of the user buffer and driver buffer */
/* are equal. */
- if (HDmemcmp(*core_buf_ptr_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
+ if (memcmp(*core_buf_ptr_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
FAIL_PUTS_ERROR("comparison of vfd and user buffer failed");
}
} /* end else */
@@ -268,7 +268,7 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
for (i = 0; i < open_images; i++) {
/* if opening the file image failed, continue next iteration */
if (file_id[i] < 0) {
- HDassert(i == 2);
+ assert(i == 2);
continue;
} /* end if */
@@ -324,7 +324,7 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
for (i = 0; i < open_images; i++) {
/* if opening the file image failed, continue next iteration */
if (file_id[i] < 0) {
- HDassert(i == 2);
+ assert(i == 2);
continue;
} /* end if */
@@ -508,20 +508,20 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
if (!(input_flags[i] & H5LT_FILE_IMAGE_DONT_COPY) ||
(input_flags[i] & H5LT_FILE_IMAGE_DONT_RELEASE)) {
VERIFY(buf_ptr[i] != NULL, "buffer pointer must be non NULL");
- HDfree(buf_ptr[i]);
+ free(buf_ptr[i]);
} /* end if */
} /* end for */
/* release temporary working buffers */
for (i = 0; i < open_images; i++)
- HDfree(filename[i]);
- HDfree(filename);
- HDfree(file_id);
- HDfree(dset_id);
- HDfree(buf_ptr);
- HDfree(buf_size);
- HDfree(input_flags);
+ free(filename[i]);
+ free(filename);
+ free(file_id);
+ free(dset_id);
+ free(buf_ptr);
+ free(buf_size);
+ free(input_flags);
PASSED();
@@ -532,14 +532,14 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
error:
if (filename) {
for (i = 0; i < open_images; i++)
- HDfree(filename[i]);
- HDfree(filename);
+ free(filename[i]);
+ free(filename);
}
- HDfree(file_id);
- HDfree(dset_id);
- HDfree(buf_ptr);
- HDfree(buf_size);
- HDfree(input_flags);
+ free(file_id);
+ free(dset_id);
+ free(buf_ptr);
+ free(buf_size);
+ free(input_flags);
H5_FAILED();
return -1;
@@ -572,10 +572,10 @@ main(void)
if (nerrors)
goto error;
- HDprintf("File image tests passed.\n");
+ printf("File image tests passed.\n");
return 0;
error:
- HDprintf("***** %d IMAGE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d IMAGE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return 1;
}
diff --git a/hl/test/test_h5do_compat.c b/hl/test/test_h5do_compat.c
index 4a3c607..bf48e9b 100644
--- a/hl/test/test_h5do_compat.c
+++ b/hl/test/test_h5do_compat.c
@@ -192,7 +192,7 @@ test_direct_chunk_read(hid_t did)
TEST_ERROR;
/* Read the raw chunk back */
- HDmemset(chunk_data, 0, CHUNK_NX * sizeof(int));
+ memset(chunk_data, 0, CHUNK_NX * sizeof(int));
filter_mask = UINT_MAX;
offset[0] = (hsize_t)i * CHUNK_NX;
if (H5DOread_chunk(did, H5P_DEFAULT, offset, &filter_mask, chunk_data) < 0)
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index 462a3ce..6541ef5 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -71,11 +71,11 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All image tests passed.\n");
+ printf("All image tests passed.\n");
return 0;
error:
- HDprintf("***** %d IMAGE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d IMAGE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return 1;
}
@@ -111,14 +111,14 @@ test_simple(void)
hsize_t pal_dims_out[2]; /* palette dimensions */
/* Allocate image buffers */
- buf1 = (unsigned char *)HDmalloc(WIDTH * HEIGHT);
- HDassert(buf1);
- buf2 = (unsigned char *)HDmalloc(WIDTH * HEIGHT * 3);
- HDassert(buf2);
- buf1_out = (unsigned char *)HDmalloc(WIDTH * HEIGHT);
- HDassert(buf1_out);
- buf2_out = (unsigned char *)HDmalloc(WIDTH * HEIGHT * 3);
- HDassert(buf2_out);
+ buf1 = (unsigned char *)malloc(WIDTH * HEIGHT);
+ assert(buf1);
+ buf2 = (unsigned char *)malloc(WIDTH * HEIGHT * 3);
+ assert(buf2);
+ buf1_out = (unsigned char *)malloc(WIDTH * HEIGHT);
+ assert(buf1_out);
+ buf2_out = (unsigned char *)malloc(WIDTH * HEIGHT * 3);
+ assert(buf2_out);
/* create an image */
space = WIDTH * HEIGHT / PAL_ENTRIES;
@@ -274,13 +274,13 @@ test_simple(void)
*/
if (buf1)
- HDfree(buf1);
+ free(buf1);
if (buf2)
- HDfree(buf2);
+ free(buf2);
if (buf1_out)
- HDfree(buf1_out);
+ free(buf1_out);
if (buf2_out)
- HDfree(buf2_out);
+ free(buf2_out);
/* Close the file. */
if (H5Fclose(fid) < 0)
@@ -293,13 +293,13 @@ test_simple(void)
/* error zone, gracefully close */
out:
if (buf1)
- HDfree(buf1);
+ free(buf1);
if (buf2)
- HDfree(buf2);
+ free(buf2);
if (buf1_out)
- HDfree(buf1_out);
+ free(buf1_out);
if (buf2_out)
- HDfree(buf2_out);
+ free(buf2_out);
H5E_BEGIN_TRY
{
H5Fclose(fid);
@@ -329,7 +329,7 @@ test_data(void)
if ((fid = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- HDprintf("Testing read ascii image data and generate images\n");
+ printf("Testing read ascii image data and generate images\n");
/*-------------------------------------------------------------------------
* read 8bit image data
@@ -480,7 +480,7 @@ test_data(void)
goto out;
/* Release memory buffer */
- HDfree(image_data);
+ free(image_data);
return 0;
@@ -488,7 +488,7 @@ test_data(void)
out:
/* Release memory buffer */
if (image_data)
- HDfree(image_data);
+ free(image_data);
H5E_BEGIN_TRY
{
@@ -531,16 +531,16 @@ test_generate(void)
if ((fid = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- HDprintf("Testing read and process data and make indexed images\n");
+ printf("Testing read and process data and make indexed images\n");
/*-------------------------------------------------------------------------
* read data; the file data format is described below
*-------------------------------------------------------------------------
*/
- f = HDfopen(data_file, "r");
+ f = fopen(data_file, "r");
if (f == NULL) {
- HDprintf("Could not find file %s. Try set $srcdir \n", data_file);
+ printf("Could not find file %s. Try set $srcdir \n", data_file);
goto out;
}
@@ -580,11 +580,11 @@ test_generate(void)
*/
if (HDfscanf(f, "%d %d %d", &imax, &jmax, &kmax) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
if (HDfscanf(f, "%f %f %f", &valex, &xmin, &xmax) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
@@ -606,16 +606,16 @@ test_generate(void)
if (n_elements > INT_MAX / (int)sizeof(float))
goto out;
- data = (float *)HDmalloc((size_t)n_elements * sizeof(float));
+ data = (float *)malloc((size_t)n_elements * sizeof(float));
if (NULL == data)
goto out;
- image_data = (unsigned char *)HDmalloc((size_t)n_elements * sizeof(unsigned char));
+ image_data = (unsigned char *)malloc((size_t)n_elements * sizeof(unsigned char));
if (NULL == image_data)
goto out;
for (i = 0; i < n_elements; i++) {
if (HDfscanf(f, "%f ", &value) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
data[i] = value;
@@ -712,8 +712,8 @@ test_generate(void)
goto out;
/* Release memory buffers */
- HDfree(data);
- HDfree(image_data);
+ free(data);
+ free(image_data);
/* Indicate success */
return 0;
@@ -722,9 +722,9 @@ test_generate(void)
out:
/* Release memory buffers */
if (data)
- HDfree(data);
+ free(data);
if (image_data)
- HDfree(image_data);
+ free(image_data);
H5E_BEGIN_TRY
{
@@ -773,38 +773,38 @@ read_data(const char *fname, /*IN*/
*-------------------------------------------------------------------------
*/
- if (NULL == (f = HDfopen(data_file, "r"))) {
- HDprintf("Could not open file %s. Try set $srcdir \n", data_file);
+ if (NULL == (f = fopen(data_file, "r"))) {
+ printf("Could not open file %s. Try set $srcdir \n", data_file);
goto out;
}
if (HDfscanf(f, "%s", str) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
if (HDfscanf(f, "%d", &color_planes) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
if (HDfscanf(f, "%s", str) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
if (HDfscanf(f, "%d", &h) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
if (HDfscanf(f, "%s", str) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
if (HDfscanf(f, "%d", &w) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
@@ -825,10 +825,10 @@ read_data(const char *fname, /*IN*/
/* Release the buffer, if it was previously allocated */
if (image_data)
- HDfree(image_data);
+ free(image_data);
/* Allocate the image data buffer */
- image_data = (unsigned char *)HDmalloc((size_t)n_elements * sizeof(unsigned char));
+ image_data = (unsigned char *)malloc((size_t)n_elements * sizeof(unsigned char));
if (NULL == image_data)
goto out;
@@ -838,7 +838,7 @@ read_data(const char *fname, /*IN*/
/* Read data elements */
for (i = 0; i < n_elements; i++) {
if (HDfscanf(f, "%d", &n) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s.\n", data_file);
+ printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
image_data[i] = (unsigned char)n;
@@ -889,8 +889,8 @@ read_palette(const char *fname, rgb_t *palette, size_t palette_size)
return -1;
/* open the input file */
- if (!(file = HDfopen(data_file, "r"))) {
- HDprintf("Could not open file %s. Try set $srcdir \n", data_file);
+ if (!(file = fopen(data_file, "r"))) {
+ printf("Could not open file %s. Try set $srcdir \n", data_file);
return -1;
}
diff --git a/hl/test/test_ld.c b/hl/test/test_ld.c
index 11ea0e6..64bf09f 100644
--- a/hl/test/test_ld.c
+++ b/hl/test/test_ld.c
@@ -1036,10 +1036,10 @@ test_LD_elmts_one(const char *file, const char *dname, const char *fields)
/* Loop through different variations of extending the dataset */
for (i = 0; i < ONE_NTESTS; i++) {
- HDmemset(vbuf1, 0, TEST_BUF_SIZE * sizeof(test_valid_fields1));
- HDmemset(vbuf2, 0, TEST_BUF_SIZE * sizeof(test_valid_fields2));
- HDmemset(ccbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
- HDmemset(iibuf, 0, TEST_BUF_SIZE * sizeof(int));
+ memset(vbuf1, 0, TEST_BUF_SIZE * sizeof(test_valid_fields1));
+ memset(vbuf2, 0, TEST_BUF_SIZE * sizeof(test_valid_fields2));
+ memset(ccbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
+ memset(iibuf, 0, TEST_BUF_SIZE * sizeof(int));
ext_dims[0] = (hsize_t)((int)prev_dims[0] + one_tests[i]);
@@ -1247,10 +1247,10 @@ test_LD_elmts_two(const char *file, const char *dname, const char *fields)
/* Loop through different variations of extending the dataset */
for (i = 0; i < TWO_NTESTS; i++) {
- HDmemset(vbuf1, 0, TEST_BUF_SIZE * sizeof(test_valid_fields1));
- HDmemset(vbuf2, 0, TEST_BUF_SIZE * sizeof(test_valid_fields2));
- HDmemset(ccbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
- HDmemset(iibuf, 0, TEST_BUF_SIZE * sizeof(int));
+ memset(vbuf1, 0, TEST_BUF_SIZE * sizeof(test_valid_fields1));
+ memset(vbuf2, 0, TEST_BUF_SIZE * sizeof(test_valid_fields2));
+ memset(ccbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
+ memset(iibuf, 0, TEST_BUF_SIZE * sizeof(int));
ext_dims[0] = (hsize_t)((int)prev_dims[0] + two_tests[i][0]);
ext_dims[1] = (hsize_t)((int)prev_dims[1] + two_tests[i][1]);
@@ -1350,19 +1350,19 @@ main(void)
int nerrors = 0;
/* Set up temporary buffers for tests: test_LD_elmts_one() & test_LD_elmts_two() */
- if (NULL == (ibuf = (int *)HDmalloc(sizeof(int) * TEST_BUF_SIZE)))
+ if (NULL == (ibuf = (int *)malloc(sizeof(int) * TEST_BUF_SIZE)))
FAIL_STACK_ERROR;
- if (NULL == (iibuf = (int *)HDmalloc(sizeof(int) * TEST_BUF_SIZE)))
+ if (NULL == (iibuf = (int *)malloc(sizeof(int) * TEST_BUF_SIZE)))
FAIL_STACK_ERROR;
- if (NULL == (cbuf = (set_t *)HDmalloc(sizeof(set_t) * TEST_BUF_SIZE)))
+ if (NULL == (cbuf = (set_t *)malloc(sizeof(set_t) * TEST_BUF_SIZE)))
FAIL_STACK_ERROR;
- if (NULL == (ccbuf = (set_t *)HDmalloc(sizeof(set_t) * TEST_BUF_SIZE)))
+ if (NULL == (ccbuf = (set_t *)malloc(sizeof(set_t) * TEST_BUF_SIZE)))
FAIL_STACK_ERROR;
- if (NULL == (vbuf1 = (test_valid_fields1 *)HDmalloc(sizeof(test_valid_fields1) * TEST_BUF_SIZE)))
+ if (NULL == (vbuf1 = (test_valid_fields1 *)malloc(sizeof(test_valid_fields1) * TEST_BUF_SIZE)))
FAIL_STACK_ERROR;
- if (NULL == (vbuf2 = (test_valid_fields2 *)HDmalloc(sizeof(test_valid_fields2) * TEST_BUF_SIZE)))
+ if (NULL == (vbuf2 = (test_valid_fields2 *)malloc(sizeof(test_valid_fields2) * TEST_BUF_SIZE)))
FAIL_STACK_ERROR;
/*
@@ -1414,17 +1414,17 @@ main(void)
/* Free temporary buffers */
if (ibuf)
- HDfree(ibuf);
+ free(ibuf);
if (iibuf)
- HDfree(iibuf);
+ free(iibuf);
if (cbuf)
- HDfree(cbuf);
+ free(cbuf);
if (ccbuf)
- HDfree(ccbuf);
+ free(ccbuf);
if (vbuf1)
- HDfree(vbuf1);
+ free(vbuf1);
if (vbuf2)
- HDfree(vbuf2);
+ free(vbuf2);
/* check for errors */
if (nerrors)
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index cf139d9..6ff3134 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -1038,26 +1038,26 @@ make_attributes(hid_t loc_id, const char *obj_name)
HL_TESTING2("H5LTget_attribute_info");
- if (NULL == (dims_out = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)rank_out)))
+ if (NULL == (dims_out = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)rank_out)))
return -1;
if (H5LTget_attribute_info(loc_id, obj_name, ATTR2_NAME, dims_out, &type_class, &type_size) < 0) {
- HDfree(dims_out);
+ free(dims_out);
return -1;
}
for (i = 0; i < rank_out; i++) {
if (dims_out[i] != 5) {
- HDfree(dims_out);
+ free(dims_out);
return -1;
}
}
if (type_class != H5T_INTEGER) {
- HDfree(dims_out);
+ free(dims_out);
return -1;
}
- HDfree(dims_out);
+ free(dims_out);
PASSED();
@@ -1092,17 +1092,17 @@ test_integers(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrcmp(dt_str, "H5T_STD_I8BE") != 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1150,17 +1150,17 @@ test_fps(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrcmp(dt_str, "H5T_IEEE_F32BE") != 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1221,19 +1221,19 @@ test_strings(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET "
"H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
- HDprintf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
+ printf("dt=\n%s\n", dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1256,46 +1256,46 @@ test_strings(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n "
"CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
- HDprintf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
+ printf("dt=\n%s\n", dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
/* Length of the character buffer is larger then needed */
str_len = str_len + 10;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrncmp(dt_str,
"H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
"H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
str_len - 1) != 0) {
- HDprintf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
+ printf("dt=\n%s\n", dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
/* Length of the character buffer is smaller then needed */
str_len = 21;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
/* check the truncated string */
@@ -1306,12 +1306,12 @@ test_strings(void)
"H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
"H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
str_len) != 0) {
- HDprintf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
+ printf("dt=\n%s\n", dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1321,7 +1321,7 @@ test_strings(void)
out:
if (dt_str)
- HDfree(dt_str);
+ free(dt_str);
H5_FAILED();
return -1;
@@ -1358,21 +1358,21 @@ test_opaques(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrcmp(
dt_str,
"H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }") !=
0) {
- HDprintf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
+ printf("dt=\n%s\n", dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1438,22 +1438,22 @@ test_enums(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrcmp(dt_str,
"H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" "
" 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }") != 0) {
- HDprintf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
+ printf("dt=\n%s\n", dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1502,18 +1502,18 @@ test_variables(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }") != 0) {
- HDprintf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
+ printf("dt=\n%s\n", dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1564,21 +1564,21 @@ test_arrays(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n "
" H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE "
"\"arr_compound_2\" : 1;\n }\n }\n }") != 0) {
- HDprintf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
+ printf("dt=\n%s\n", dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1625,19 +1625,19 @@ test_compounds(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
if (HDstrcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE "
"\"two_field\" : 6;\n }") != 0) {
- HDprintf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
+ printf("dt=\n%s\n", dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1738,13 +1738,13 @@ test_compound_bug(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1775,14 +1775,14 @@ test_compound_bug(void)
if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)calloc(str_len, sizeof(char))))
goto out;
if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
- HDfree(dt_str);
+ free(dt_str);
goto out;
}
- HDfree(dt_str);
+ free(dt_str);
if (H5Tclose(dtype) < 0)
goto out;
@@ -1813,9 +1813,9 @@ test_complicated_compound(void)
HL_TESTING3(" text for complicated compound types");
/* Open input file */
- fp = HDfopen(filename, "r");
+ fp = fopen(filename, "r");
if (fp == NULL) {
- HDprintf("Could not find file %s. Try set $srcdir \n", filename);
+ printf("Could not find file %s. Try set $srcdir \n", filename);
goto out;
}
@@ -1823,15 +1823,15 @@ test_complicated_compound(void)
* Library has convenient function getline() but isn't available on
* all machines.
*/
- if ((line = (char *)HDcalloc(size, sizeof(char))) == NULL)
+ if ((line = (char *)calloc(size, sizeof(char))) == NULL)
goto out;
if (HDfgets(line, (int)size, fp) == NULL)
goto out;
while (HDstrlen(line) == size - 1) {
size *= 2;
if (line)
- HDfree(line);
- if ((line = (char *)HDcalloc(size, sizeof(char))) == NULL)
+ free(line);
+ if ((line = (char *)calloc(size, sizeof(char))) == NULL)
goto out;
if (HDfseek(fp, 0L, SEEK_SET) != 0)
goto out;
@@ -1857,7 +1857,7 @@ test_complicated_compound(void)
goto out;
if (line)
- HDfree(line);
+ free(line);
PASSED();
return 0;
@@ -1865,7 +1865,7 @@ test_complicated_compound(void)
out:
if (line)
- HDfree(line);
+ free(line);
if (fp)
HDfclose(fp);
diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c
index 3bfba6e..d4af45e 100644
--- a/hl/test/test_packet.c
+++ b/hl/test/test_packet.c
@@ -168,7 +168,7 @@ test_create_close(hid_t fid)
/* Create a datatype for the particle struct */
part_t = make_particle_type();
- HDassert(part_t != -1);
+ assert(part_t != -1);
/* Create the table */
table = H5PTcreate_fl(fid, PT_NAME, part_t, (hsize_t)100, -1);
@@ -445,7 +445,7 @@ test_big_table(hid_t fid)
/* Create a datatype for the particle struct */
part_t = make_particle_type();
- HDassert(part_t != -1);
+ assert(part_t != -1);
/* Create a new table */
table = H5PTcreate_fl(fid, "Packet Test Dataset2", part_t, (hsize_t)33, -1);
@@ -519,7 +519,7 @@ test_opaque(hid_t fid)
if ((part_t = H5Tcreate(H5T_OPAQUE, sizeof(particle_t))) < 0)
return FAIL;
- HDassert(part_t != -1);
+ assert(part_t != -1);
/* Tag the opaque datatype */
if (H5Tset_tag(part_t, "Opaque Particle") < 0)
@@ -595,7 +595,7 @@ test_compress(void)
/* Create a datatype for the particle struct */
part_t = make_particle_type();
- HDassert(part_t != -1);
+ assert(part_t != -1);
/* Create a new table with compression level 8 */
table = H5PTcreate_fl(fid1, "Compressed Test Dataset", part_t, (hsize_t)80, 8);
@@ -620,7 +620,7 @@ test_compress(void)
TEST_ERROR;
/* Read particles to ensure that all of them were written correctly */
- HDmemset(readPart, 0, sizeof(readPart));
+ memset(readPart, 0, sizeof(readPart));
for (c = 0; c < BIG_TABLE_SIZE; c++) {
err = H5PTget_next(table, (size_t)1, readPart);
if (err < 0)
diff --git a/hl/test/test_packet_vlen.c b/hl/test/test_packet_vlen.c
index 5e06c85..bf95859 100644
--- a/hl/test/test_packet_vlen.c
+++ b/hl/test/test_packet_vlen.c
@@ -68,9 +68,9 @@ test_VLof_atomic(void)
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
- writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
+ writeBuf[uu].p = malloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -120,8 +120,8 @@ test_VLof_atomic(void)
for (uu = 0; uu < NRECORDS; uu++)
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
- HDprintf("Packet %u's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
- HDprintf("Packet %u's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
+ printf("Packet %u's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
+ printf("Packet %u's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
}
}
@@ -188,9 +188,9 @@ test_VLof_comptype(void)
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
- writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
+ writeBuf[uu].p = malloc((uu + 1) * sizeof(VLcomp_t));
if (writeBuf[uu].p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -257,16 +257,16 @@ test_VLof_comptype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
- HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n",
- __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
+ fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n",
+ __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
continue;
} /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv]) {
- HDfprintf(
- stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n", vv,
- (int)((unsigned int *)writeBuf[uu].p)[vv], vv, (int)((unsigned int *)readBuf[uu].p)[vv]);
+ fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n",
+ vv, (int)((unsigned int *)writeBuf[uu].p)[vv], vv,
+ (int)((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@@ -344,16 +344,16 @@ test_compound_VL_VLtype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].u = uu * 10;
writeBuf[uu].f = (float)(uu * 20) / 3.0F;
- writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
+ writeBuf[uu].v.p = malloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].v.len = uu + L1_INCM;
for (t1 = (hvl_t *)((writeBuf[uu].v).p), vv = 0; vv < (uu + L1_INCM); vv++, t1++) {
- t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
+ t1->p = malloc((vv + L2_INCM) * sizeof(unsigned int));
if (t1->p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + L2_INCM;
@@ -429,34 +429,34 @@ test_compound_VL_VLtype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
- HDfprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu,
- writeBuf[uu].u, uu, readBuf[uu].u);
+ fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu,
+ writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f, readBuf[uu].f)) {
- HDfprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu,
- (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu,
+ (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
- HDfprintf(stderr,
- "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n",
- __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ fprintf(stderr,
+ "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n",
+ __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0;
(size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
- HDfprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n",
- __LINE__, uu, vv, t1->len, t2->len);
+ fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n",
+ __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww]) {
- HDfprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww,
- ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww,
+ ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
@@ -527,16 +527,16 @@ test_VLof_VLtype(void)
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
- writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
+ writeBuf[uu].p = malloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[uu].len = uu + 1;
for (t1 = (hvl_t *)(writeBuf[uu].p), vv = 0; vv < (uu + 1); vv++, t1++) {
- t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
+ t1->p = malloc((vv + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + 1;
@@ -655,7 +655,7 @@ verify_ptlengthtype(hid_t fid, const char *table_name, herr_t expected_value)
HDstrcpy(lenthtype, "fixed-length");
if (expected_value == 1)
HDstrcpy(lenthtype, "variable-length");
- HDfprintf(stderr, "\nPacket table '%s' should be %s but is not\n", table_name, lenthtype);
+ fprintf(stderr, "\nPacket table '%s' should be %s but is not\n", table_name, lenthtype);
ret = FAIL;
}
@@ -1010,7 +1010,7 @@ verify_accessors(hid_t fid, const char *table_name, hbool_t uses_vlen_type)
HDstrcpy(lenthtype, "variable-length");
else
HDstrcpy(lenthtype, "fixed-length");
- HDfprintf(stderr, "\nThe dataset '%s' should be %s but is not\n", table_name, lenthtype);
+ fprintf(stderr, "\nThe dataset '%s' should be %s but is not\n", table_name, lenthtype);
goto error;
}
@@ -1103,9 +1103,9 @@ testfl_VLof_atomic(void)
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
- writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
+ writeBuf[uu].p = malloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -1155,8 +1155,8 @@ testfl_VLof_atomic(void)
for (uu = 0; uu < NRECORDS; uu++)
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
- HDprintf("Packet %d's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
- HDprintf("Packet %d's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
+ printf("Packet %d's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
+ printf("Packet %d's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
}
}
@@ -1223,9 +1223,9 @@ testfl_VLof_comptype(void)
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
- writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
+ writeBuf[uu].p = malloc((uu + 1) * sizeof(VLcomp_t));
if (writeBuf[uu].p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].len = uu + 1;
@@ -1292,16 +1292,15 @@ testfl_VLof_comptype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
- HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",
- __LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
+ fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",
+ __LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
continue;
} /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv]) {
- HDfprintf(stderr,
- "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n", vv,
- ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
+ fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n",
+ vv, ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@@ -1379,16 +1378,16 @@ testfl_compound_VL_VLtype(void)
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].u = uu * 10;
writeBuf[uu].f = (float)(uu * 20) / 3.0F;
- writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
+ writeBuf[uu].v.p = malloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
writeBuf[uu].v.len = uu + L1_INCM;
for (t1 = (hvl_t *)((writeBuf[uu].v).p), vv = 0; vv < (uu + L1_INCM); vv++, t1++) {
- t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
+ t1->p = malloc((vv + L2_INCM) * sizeof(unsigned int));
if (t1->p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + L2_INCM;
@@ -1464,34 +1463,34 @@ testfl_compound_VL_VLtype(void)
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
- HDfprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu,
- writeBuf[uu].u, uu, readBuf[uu].u);
+ fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu,
+ writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f, readBuf[uu].f)) {
- HDfprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu,
- (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu,
+ (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
- HDfprintf(stderr,
- "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n",
- __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ fprintf(stderr,
+ "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n",
+ __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0;
(size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
- HDfprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n",
- __LINE__, uu, vv, t1->len, t2->len);
+ fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n",
+ __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww]) {
- HDfprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww,
- ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww,
+ ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
@@ -1562,16 +1561,16 @@ testfl_VLof_VLtype(void)
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
- writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
+ writeBuf[uu].p = malloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[uu].len = uu + 1;
for (t1 = (hvl_t *)(writeBuf[uu].p), vv = 0; vv < (uu + 1); vv++, t1++) {
- t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
+ t1->p = malloc((vv + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
- HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
}
t1->len = vv + 1;
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index 3c8246a..06e07b8 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -136,8 +136,8 @@ h5file_open(const char *fname, unsigned flags)
/* open */
if ((fid = H5Fopen(data_file, flags, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "Error: Cannot open file <%s>\n", data_file);
- HDexit(1);
+ fprintf(stderr, "Error: Cannot open file <%s>\n", data_file);
+ exit(1);
}
return fid;
@@ -153,11 +153,11 @@ 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 ||
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)) {
- HDfprintf(stderr, "read and write buffers have differences\n");
- HDfprintf(stderr, "%s %ld %f %f %d\n", rbuf[i].name, rbuf[i].longi, (double)rbuf[i].pressure,
- rbuf[i].temperature, rbuf[i].lati);
- HDfprintf(stderr, "%s %ld %f %f %d\n", wbuf[j].name, wbuf[j].longi, (double)wbuf[j].pressure,
- wbuf[j].temperature, wbuf[j].lati);
+ fprintf(stderr, "read and write buffers have differences\n");
+ fprintf(stderr, "%s %ld %f %f %d\n", rbuf[i].name, rbuf[i].longi, (double)rbuf[i].pressure,
+ rbuf[i].temperature, rbuf[i].lati);
+ fprintf(stderr, "%s %ld %f %f %d\n", wbuf[j].name, wbuf[j].longi, (double)wbuf[j].pressure,
+ wbuf[j].temperature, wbuf[j].lati);
return -1;
}
return 0;
@@ -1023,10 +1023,9 @@ test_table(hid_t fid, int do_write)
if (rbuf[i].lati != position_in[i - NRECORDS_ADD + 1].lati ||
rbuf[i].longi != position_in[i - NRECORDS_ADD + 1].longi ||
!H5_FLT_ABS_EQUAL(rbuf[i].pressure, pressure_in[i - NRECORDS_ADD + 1])) {
- HDfprintf(stderr, "%ld %f %d\n", rbuf[i].longi, (double)rbuf[i].pressure,
- rbuf[i].lati);
- HDfprintf(stderr, "%ld %f %d\n", position_in[i].longi, (double)pressure_in[i],
- position_in[i].lati);
+ fprintf(stderr, "%ld %f %d\n", rbuf[i].longi, (double)rbuf[i].pressure, rbuf[i].lati);
+ fprintf(stderr, "%ld %f %d\n", position_in[i].longi, (double)pressure_in[i],
+ position_in[i].lati);
goto out;
}
}
@@ -1464,9 +1463,9 @@ test_table(hid_t fid, int do_write)
HL_TESTING2("getting field info");
/* allocate */
- names_out = (char **)HDmalloc(sizeof(char *) * (size_t)NFIELDS);
+ names_out = (char **)malloc(sizeof(char *) * (size_t)NFIELDS);
for (i = 0; i < NFIELDS; i++) {
- names_out[i] = (char *)HDmalloc(sizeof(char) * 255);
+ names_out[i] = (char *)malloc(sizeof(char) * 255);
}
/* Get field info */
@@ -1481,9 +1480,9 @@ test_table(hid_t fid, int do_write)
/* release */
for (i = 0; i < NFIELDS; i++) {
- HDfree(names_out[i]);
+ free(names_out[i]);
}
- HDfree(names_out);
+ free(names_out);
PASSED();
diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c
index 2fd9756..6b33b81 100644
--- a/hl/tools/gif2h5/hdf2gif.c
+++ b/hl/tools/gif2h5/hdf2gif.c
@@ -46,7 +46,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
FILE *fpGif = NULL;
diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c
index 97abbc6..59c5eb7 100644
--- a/hl/tools/h5watch/extend_dset.c
+++ b/hl/tools/h5watch/extend_dset.c
@@ -85,9 +85,9 @@ extend_dset_two(const char *file, char *dname, int action1, int action2)
set_t *cbuf = NULL; /* buffer for storing retrieved elements (compound) */
/* Allocate memory */
- if (NULL == (ibuf = (int *)HDcalloc(TEST_BUF_SIZE, sizeof(int))))
+ if (NULL == (ibuf = (int *)calloc(TEST_BUF_SIZE, sizeof(int))))
goto error;
- if (NULL == (cbuf = (set_t *)HDcalloc(TEST_BUF_SIZE, sizeof(set_t))))
+ if (NULL == (cbuf = (set_t *)calloc(TEST_BUF_SIZE, sizeof(set_t))))
goto error;
/* Create a copy of file access property list */
@@ -148,7 +148,7 @@ extend_dset_two(const char *file, char *dname, int action1, int action2)
/* Compound type */
if (!HDstrcmp(dname, DSET_CMPD_TWO)) {
- HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
+ memset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
for (i = 0; i < num_elmts; i++) {
cbuf[i].field1 = action1;
cbuf[i].field2.a = action1;
@@ -166,7 +166,7 @@ extend_dset_two(const char *file, char *dname, int action1, int action2)
goto error;
}
else { /* Integer type */
- HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
+ memset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
for (i = 0; i < num_elmts; i++)
ibuf[i] = action1;
@@ -189,9 +189,9 @@ extend_dset_two(const char *file, char *dname, int action1, int action2)
goto error;
if (ibuf)
- HDfree(ibuf);
+ free(ibuf);
if (cbuf)
- HDfree(cbuf);
+ free(cbuf);
return SUCCEED;
@@ -204,9 +204,9 @@ error:
H5E_END_TRY
if (ibuf)
- HDfree(ibuf);
+ free(ibuf);
if (cbuf)
- HDfree(cbuf);
+ free(cbuf);
return FAIL;
@@ -239,9 +239,9 @@ extend_dset_one(const char *file, char *dname, int action)
set_t *cbuf = NULL; /* buffer for storing retrieved elements (compound) */
/* Allocate memory */
- if (NULL == (ibuf = (int *)HDcalloc(TEST_BUF_SIZE, sizeof(int))))
+ if (NULL == (ibuf = (int *)calloc(TEST_BUF_SIZE, sizeof(int))))
goto error;
- if (NULL == (cbuf = (set_t *)HDcalloc(TEST_BUF_SIZE, sizeof(set_t))))
+ if (NULL == (cbuf = (set_t *)calloc(TEST_BUF_SIZE, sizeof(set_t))))
goto error;
/* Create a copy of file access property list */
@@ -307,7 +307,7 @@ extend_dset_one(const char *file, char *dname, int action)
/* Compound type */
if (!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) {
- HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
+ memset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
for (i = 0; i < action; i++) {
cbuf[i].field1 = i + 1;
cbuf[i].field2.a = i + 2;
@@ -328,7 +328,7 @@ extend_dset_one(const char *file, char *dname, int action)
}
else { /* Integer type */
- HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
+ memset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
for (i = 0; i < action; i++)
ibuf[i] = (int)i;
@@ -358,9 +358,9 @@ extend_dset_one(const char *file, char *dname, int action)
goto error;
if (ibuf)
- HDfree(ibuf);
+ free(ibuf);
if (cbuf)
- HDfree(cbuf);
+ free(cbuf);
return SUCCEED;
@@ -375,9 +375,9 @@ error:
H5E_END_TRY
if (ibuf)
- HDfree(ibuf);
+ free(ibuf);
if (cbuf)
- HDfree(cbuf);
+ free(cbuf);
return FAIL;
} /* end extend_dset_one() */
@@ -398,15 +398,15 @@ main(int argc, char *argv[])
int action1, action2;
if (argc != 5) {
- HDfprintf(stderr, "Should have file name, dataset name, and the extended amount...\n");
+ fprintf(stderr, "Should have file name, dataset name, and the extended amount...\n");
goto error;
} /* end if */
/* Get the dataset name to be extended */
fname = HDstrdup(argv[1]);
dname = HDstrdup(argv[2]);
- action1 = HDatoi(argv[3]);
- action2 = HDatoi(argv[4]);
+ action1 = atoi(argv[3]);
+ action2 = atoi(argv[4]);
if (!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) {
if (extend_dset_one(fname, dname, action1) < 0)
@@ -422,16 +422,16 @@ main(int argc, char *argv[])
goto error;
}
else {
- HDfprintf(stdout, "Dataset cannot be extended...\n");
+ fprintf(stdout, "Dataset cannot be extended...\n");
goto error;
} /* end if-else */
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
if (dname)
- HDfree(dname);
+ free(dname);
if (fname)
- HDfree(fname);
- HDexit(EXIT_FAILURE);
+ free(fname);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
index 248fb90..d5b4d6e 100644
--- a/hl/tools/h5watch/h5watch.c
+++ b/hl/tools/h5watch/h5watch.c
@@ -121,11 +121,11 @@ doprint(hid_t did, const hsize_t *start, const hsize_t *block, int rank)
subset.block.data[i] = block[i];
} /* end for */
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.sset = &subset;
/* Set to all default values and then override */
- HDmemset(&info, 0, sizeof info);
+ memset(&info, 0, sizeof info);
if (g_simple_output) {
info.idx_fmt = "";
@@ -199,7 +199,7 @@ doprint(hid_t did, const hsize_t *start, const hsize_t *block, int rank)
if ((ret_value = h5tools_dump_dset(stdout, &info, &ctx, did)) < 0)
error_msg("unable to print data\n");
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
return ret_value;
@@ -292,7 +292,7 @@ monitor_dataset(hid_t fid, char *dsetname)
hsize_t cur_dims[H5S_MAX_RANK]; /* previous dataspace dimensions */
herr_t ret_value = SUCCEED; /* return value */
- HDfprintf(stdout, "Monitoring dataset %s...\n", dsetname);
+ fprintf(stdout, "Monitoring dataset %s...\n", dsetname);
/* Open the dataset for minitoring */
if ((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
@@ -312,7 +312,7 @@ monitor_dataset(hid_t fid, char *dsetname)
ret_value = FAIL;
goto done;
}
- HDfflush(stdout);
+ fflush(stdout);
/* Loop until an error occurs or the user interrupts execution */
while (!g_user_interrupt) {
@@ -339,14 +339,13 @@ monitor_dataset(hid_t fid, char *dsetname)
if (i != ndims) {
/* Printing changes in dimension sizes */
for (u = 0; u < ndims; u++) {
- HDfprintf(stdout, "dimension %d: %" PRIuHSIZE "->%" PRIuHSIZE "", u, prev_dims[u],
- cur_dims[u]);
+ fprintf(stdout, "dimension %d: %" PRIuHSIZE "->%" PRIuHSIZE "", u, prev_dims[u], cur_dims[u]);
if (cur_dims[u] > prev_dims[u])
- HDfprintf(stdout, " (increases)\n");
+ fprintf(stdout, " (increases)\n");
else if (cur_dims[u] < prev_dims[u])
- HDfprintf(stdout, " (decreases)\n");
+ fprintf(stdout, " (decreases)\n");
else
- HDfprintf(stdout, " (unchanged)\n");
+ fprintf(stdout, " (unchanged)\n");
}
/* Printing elements appended to the dataset if there is */
@@ -360,7 +359,7 @@ monitor_dataset(hid_t fid, char *dsetname)
/* Print the new appended data to the dataset */
if (cur_dims[u] > prev_dims[u]) {
- HDfprintf(stdout, " Data:\n");
+ fprintf(stdout, " Data:\n");
for (j = 0; j < ndims; j++) {
start[j] = 0;
@@ -374,17 +373,17 @@ monitor_dataset(hid_t fid, char *dsetname)
}
} /* end for */
}
- HDfflush(stdout);
+ fflush(stdout);
}
/* Save the current dimension sizes */
- HDmemcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t));
+ memcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t));
/* Sleep before next monitor */
HDsleep(g_polling_interval);
} /* end while */
- HDfflush(stdout);
+ fflush(stdout);
done:
/* Closing */
@@ -415,7 +414,7 @@ process_cmpd_fields(hid_t fid, char *dsetname)
size_t len; /* number of comma-separated fields in "g_list_of_fields" */
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(g_list_of_fields && *g_list_of_fields);
+ assert(g_list_of_fields && *g_list_of_fields);
/* Open the dataset */
if ((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
@@ -449,7 +448,7 @@ process_cmpd_fields(hid_t fid, char *dsetname)
len = HDstrlen(g_list_of_fields) / 2 + 2;
/* Allocate memory for a list vector of H5LD_memb_t structures to store "g_list_of_fields" info */
- if ((g_listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))) == NULL) {
+ if ((g_listv = (H5LD_memb_t **)calloc(len, sizeof(H5LD_memb_t *))) == NULL) {
error_msg("error in allocating memory for H5LD_memb_t\n");
ret_value = FAIL;
goto done;
@@ -532,8 +531,8 @@ check_dataset(hid_t fid, char *dsetname)
goto done;
}
- HDmemset(cur_dims, 0, sizeof cur_dims);
- HDmemset(max_dims, 0, sizeof max_dims);
+ memset(cur_dims, 0, sizeof cur_dims);
+ memset(max_dims, 0, sizeof max_dims);
/* Get dataset's dataspace */
if ((sid = H5Dget_space(did)) < 0) {
@@ -608,46 +607,46 @@ leave(int ret)
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "Usage: %s [OPTIONS] [OBJECT]\n", prog);
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " OPTIONS\n");
- HDfprintf(stdout, " --help Print a usage message and exit.\n");
- HDfprintf(stdout, " --version Print version number and exit.\n");
- HDfprintf(stdout, " --label Label members of compound typed dataset.\n");
- HDfprintf(stdout, " --simple Use a machine-readable output format.\n");
- HDfprintf(stdout, " --dim Monitor changes in size of dataset dimensions only.\n");
- HDfprintf(stdout, " --width=N Set the number of columns to N for output.\n");
- HDfprintf(stdout, " A value of 0 sets the number of columns to the\n");
- HDfprintf(stdout, " maximum (65535). The default width is 80 columns.\n");
- HDfprintf(stdout, " --polling=N Set the polling interval to N (in seconds) when the\n");
- HDfprintf(stdout,
- " dataset will be checked for appended data. The default\n");
- HDfprintf(stdout, " polling interval is 1.\n");
- HDfprintf(stdout, " --fields=<list_of_fields>\n");
- HDfprintf(stdout,
- " Display data for the fields specified in <list_of_fields>\n");
- HDfprintf(stdout, " for a compound data type. <list_of_fields> can be\n");
- HDfprintf(stdout, " specified as follows:\n");
- HDfprintf(stdout, " 1) A comma-separated list of field names in a\n");
- HDfprintf(stdout, " compound data type. \",\" is the separator\n");
- HDfprintf(stdout, " for field names while \".\" is the separator\n");
- HDfprintf(stdout, " for a nested field.\n");
- HDfprintf(stdout, " 2) A single field name in a compound data type.\n");
- HDfprintf(stdout, " Can use this option multiple times.\n");
- HDfprintf(stdout, " Note that backslash is the escape character to avoid\n");
- HDfprintf(stdout,
- " characters in field names that conflict with the tool's\n");
- HDfprintf(stdout, " separators.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]\n");
- HDfprintf(stdout, " <filename> Name of the HDF5 file. It may be preceded by path\n");
- HDfprintf(stdout, " separated by slashes to the specified HDF5 file.\n");
- HDfprintf(stdout, " <path_to_dataset> Path separated by slashes to the specified dataset\n");
- HDfprintf(stdout, " <dsetname> Name of the dataset\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout,
- " User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).\n");
+ fflush(stdout);
+ fprintf(stdout, "Usage: %s [OPTIONS] [OBJECT]\n", prog);
+ fprintf(stdout, "\n");
+ fprintf(stdout, " OPTIONS\n");
+ fprintf(stdout, " --help Print a usage message and exit.\n");
+ fprintf(stdout, " --version Print version number and exit.\n");
+ fprintf(stdout, " --label Label members of compound typed dataset.\n");
+ fprintf(stdout, " --simple Use a machine-readable output format.\n");
+ fprintf(stdout, " --dim Monitor changes in size of dataset dimensions only.\n");
+ fprintf(stdout, " --width=N Set the number of columns to N for output.\n");
+ fprintf(stdout, " A value of 0 sets the number of columns to the\n");
+ fprintf(stdout, " maximum (65535). The default width is 80 columns.\n");
+ fprintf(stdout, " --polling=N Set the polling interval to N (in seconds) when the\n");
+ fprintf(stdout,
+ " dataset will be checked for appended data. The default\n");
+ fprintf(stdout, " polling interval is 1.\n");
+ fprintf(stdout, " --fields=<list_of_fields>\n");
+ fprintf(stdout,
+ " Display data for the fields specified in <list_of_fields>\n");
+ fprintf(stdout, " for a compound data type. <list_of_fields> can be\n");
+ fprintf(stdout, " specified as follows:\n");
+ fprintf(stdout, " 1) A comma-separated list of field names in a\n");
+ fprintf(stdout, " compound data type. \",\" is the separator\n");
+ fprintf(stdout, " for field names while \".\" is the separator\n");
+ fprintf(stdout, " for a nested field.\n");
+ fprintf(stdout, " 2) A single field name in a compound data type.\n");
+ fprintf(stdout, " Can use this option multiple times.\n");
+ fprintf(stdout, " Note that backslash is the escape character to avoid\n");
+ fprintf(stdout,
+ " characters in field names that conflict with the tool's\n");
+ fprintf(stdout, " separators.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]\n");
+ fprintf(stdout, " <filename> Name of the HDF5 file. It may be preceded by path\n");
+ fprintf(stdout, " separated by slashes to the specified HDF5 file.\n");
+ fprintf(stdout, " <path_to_dataset> Path separated by slashes to the specified dataset\n");
+ fprintf(stdout, " <dsetname> Name of the dataset\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout,
+ " User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).\n");
} /* usage() */
@@ -732,7 +731,7 @@ parse_command_line(int argc, const char *const *argv)
error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__);
leave(EXIT_FAILURE);
}
- if ((g_list_of_fields = (char *)HDrealloc(
+ if ((g_list_of_fields = (char *)realloc(
g_list_of_fields, HDstrlen(g_list_of_fields) + HDstrlen(str) + 2)) == NULL) {
error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__);
leave(EXIT_FAILURE);
@@ -868,7 +867,7 @@ main(int argc, char *argv[])
sizeof drivername);
if (fid >= 0) {
- HDfprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername);
+ fprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername);
break; /*success*/
} /* end if */
@@ -928,17 +927,17 @@ main(int argc, char *argv[])
done:
/* Free spaces */
if (fname)
- HDfree(fname);
+ free(fname);
if (dname)
- HDfree(dname);
+ free(dname);
if (g_list_of_fields)
- HDfree(g_list_of_fields);
+ free(g_list_of_fields);
if (g_listv) {
H5LD_clean_vector(g_listv);
- HDfree(g_listv);
+ free(g_listv);
}
if (g_dup_fields)
- HDfree(g_dup_fields);
+ free(g_dup_fields);
/* Close the file access property list */
if (fapl >= 0 && H5Pclose(fapl) < 0) {
diff --git a/hl/tools/h5watch/h5watchgentest.c b/hl/tools/h5watch/h5watchgentest.c
index 5b8cf07..9fda9be 100644
--- a/hl/tools/h5watch/h5watchgentest.c
+++ b/hl/tools/h5watch/h5watchgentest.c
@@ -172,14 +172,14 @@ main(void)
/* Create a copy of file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Create a file with the latest format */
if ((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Initialization for one-dimensional dataset */
cur_dims[0] = ONE_DIMS0;
@@ -341,7 +341,7 @@ main(void)
if (H5Fclose(fid) < 0)
goto done;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
done:
H5E_BEGIN_TRY
@@ -356,5 +356,5 @@ done:
H5Fclose(fid);
H5E_END_TRY
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/src/H5.c b/src/H5.c
index c22d0c9..a33f6f1 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -183,7 +183,7 @@ H5_init_library(void)
/*
* Make sure the package information is updated.
*/
- HDmemset(&H5_debug_g, 0, sizeof H5_debug_g);
+ memset(&H5_debug_g, 0, sizeof H5_debug_g);
H5_debug_g.pkg[H5_PKG_A].name = "a";
H5_debug_g.pkg[H5_PKG_AC].name = "ac";
H5_debug_g.pkg[H5_PKG_B].name = "b";
@@ -745,7 +745,7 @@ H5__debug_mask(const char *s)
} /* end if */
} /* end for */
if (i >= (size_t)H5_NPKGS)
- HDfprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name);
+ fprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name);
} /* end if-else */
}
else if (HDisdigit(*s)) {
@@ -900,15 +900,15 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum) {
switch (disable_version_check) {
case 0:
- HDfprintf(stderr, "%s%s", version_mismatch_warning,
- "You can, at your own risk, disable this warning by setting the environment\n"
- "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
- "Setting it to 2 or higher will suppress the warning messages totally.\n");
+ fprintf(stderr, "%s%s", version_mismatch_warning,
+ "You can, at your own risk, disable this warning by setting the environment\n"
+ "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
+ "Setting it to 2 or higher will suppress the warning messages totally.\n");
/* Mention the versions we are referring to */
- HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
- (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
+ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
/* Show library settings if available */
- HDfprintf(stderr, "%s", H5libhdf5_settings);
+ fprintf(stderr, "%s", H5libhdf5_settings);
/* Bail out now. */
HDfputs("Bye...\n", stderr);
@@ -916,16 +916,16 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
case 1:
/* continue with a warning */
/* Note that the warning message is embedded in the format string.*/
- HDfprintf(stderr,
- "%s'HDF5_DISABLE_VERSION_CHECK' "
- "environment variable is set to %d, application will\n"
- "continue at your own risk.\n",
- version_mismatch_warning, disable_version_check);
+ fprintf(stderr,
+ "%s'HDF5_DISABLE_VERSION_CHECK' "
+ "environment variable is set to %d, application will\n"
+ "continue at your own risk.\n",
+ version_mismatch_warning, disable_version_check);
/* Mention the versions we are referring to */
- HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
- (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
+ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
/* Show library settings if available */
- HDfprintf(stderr, "%s", H5libhdf5_settings);
+ fprintf(stderr, "%s", H5libhdf5_settings);
break;
default:
/* 2 or higher: continue silently */
@@ -942,15 +942,13 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
if (VERS_RELEASE_EXCEPTIONS[i] == relnum || VERS_RELEASE_EXCEPTIONS[i] == H5_VERS_RELEASE) {
switch (disable_version_check) {
case 0:
- HDfprintf(
- stderr, "%s%s", release_mismatch_warning,
- "You can, at your own risk, disable this warning by setting the environment\n"
- "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
- "Setting it to 2 or higher will suppress the warning messages totally.\n");
+ fprintf(stderr, "%s%s", release_mismatch_warning,
+ "You can, at your own risk, disable this warning by setting the environment\n"
+ "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
+ "Setting it to 2 or higher will suppress the warning messages totally.\n");
/* Mention the versions we are referring to */
- HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum,
- relnum, (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR,
- (unsigned)H5_VERS_RELEASE);
+ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
/* Bail out now. */
HDfputs("Bye...\n", stderr);
@@ -958,15 +956,14 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
case 1:
/* continue with a warning */
/* Note that the warning message is embedded in the format string.*/
- HDfprintf(stderr,
- "%s'HDF5_DISABLE_VERSION_CHECK' "
- "environment variable is set to %d, application will\n"
- "continue at your own risk.\n",
- release_mismatch_warning, disable_version_check);
+ fprintf(stderr,
+ "%s'HDF5_DISABLE_VERSION_CHECK' "
+ "environment variable is set to %d, application will\n"
+ "continue at your own risk.\n",
+ release_mismatch_warning, disable_version_check);
/* Mention the versions we are referring to */
- HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum,
- relnum, (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR,
- (unsigned)H5_VERS_RELEASE);
+ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
break;
default:
/* 2 or higher: continue silently */
@@ -999,11 +996,11 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
"variable 'HDF5_DISABLE_VERSION_CHECK' to a value of 1 "
"will suppress\nthis warning.\n",
stderr);
- HDfprintf(stderr,
- "Library version information are:\n"
- "H5_VERS_MAJOR=%d, H5_VERS_MINOR=%d, H5_VERS_RELEASE=%d, "
- "H5_VERS_SUBRELEASE=%s,\nH5_VERS_INFO=%s\n",
- H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, H5_VERS_SUBRELEASE, H5_VERS_INFO);
+ fprintf(stderr,
+ "Library version information are:\n"
+ "H5_VERS_MAJOR=%d, H5_VERS_MINOR=%d, H5_VERS_RELEASE=%d, "
+ "H5_VERS_SUBRELEASE=%s,\nH5_VERS_INFO=%s\n",
+ H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, H5_VERS_SUBRELEASE, H5_VERS_INFO);
} /* end if */
}
@@ -1259,7 +1256,7 @@ H5is_library_terminating(hbool_t *is_terminating /*out*/)
FUNC_ENTER_API_NOINIT
H5TRACE1("e", "x", is_terminating);
- HDassert(is_terminating);
+ assert(is_terminating);
if (is_terminating)
*is_terminating = H5_TERM_GLOBAL;
diff --git a/src/H5A.c b/src/H5A.c
index 439654b..b110be9 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -119,9 +119,9 @@ H5A__create_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(loc_params);
- HDassert(attr_name);
+ assert(vol_obj);
+ assert(loc_params);
+ assert(attr_name);
/* Create the attribute */
if (NULL == (attr = H5VL_attr_create(vol_obj, loc_params, attr_name, type_id, space_id, acpl_id, aapl_id,
@@ -455,8 +455,8 @@ H5A__open_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const ch
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Open the attribute */
if (NULL ==
@@ -1205,7 +1205,7 @@ H5Aget_create_plist(hid_t attr_id)
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", attr_id);
- HDassert(H5P_LST_ATTRIBUTE_CREATE_ID_g != -1);
+ assert(H5P_LST_ATTRIBUTE_CREATE_ID_g != -1);
/* Check arguments */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
@@ -1589,10 +1589,10 @@ H5A__rename_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(loc_params);
- HDassert(old_name);
- HDassert(new_name);
+ assert(vol_obj);
+ assert(loc_params);
+ assert(old_name);
+ assert(new_name);
/* Avoid thrashing things if the names are the same */
if (HDstrcmp(old_name, new_name) != 0) {
@@ -2332,8 +2332,8 @@ H5A__exists_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Check arguments */
if (!attr_name || !*attr_name)
diff --git a/src/H5AC.c b/src/H5AC.c
index 2b4c297..77fb142 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -207,8 +207,8 @@ H5AC_cache_image_pending(const H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
ret_value = H5C_cache_image_pending(cache_ptr);
@@ -246,11 +246,11 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(NULL == f->shared->cache);
- HDassert(config_ptr != NULL);
- HDassert(image_config_ptr != NULL);
- HDassert(image_config_ptr->version == H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION);
+ assert(f);
+ assert(NULL == f->shared->cache);
+ assert(config_ptr != NULL);
+ assert(image_config_ptr != NULL);
+ assert(image_config_ptr->version == H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION);
HDcompile_assert(NELMTS(H5AC_class_s) == H5AC_NTYPES);
HDcompile_assert(H5C__MAX_NUM_TYPE_IDS == H5AC_NTYPES);
@@ -428,9 +428,9 @@ H5AC_dest(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
#if H5AC_DUMP_STATS_ON_CLOSE
/* Dump debugging info */
@@ -459,7 +459,7 @@ H5AC_dest(H5F_t *f)
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache);
if (aux_ptr) {
/* Sanity check */
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
/* If the file was opened R/W, attempt to flush all entries
* from rank 0 & Bcast clean list to other ranks.
@@ -502,17 +502,17 @@ H5AC_dest(H5F_t *f)
#ifdef H5_HAVE_PARALLEL
if (aux_ptr != NULL) {
if (aux_ptr->d_slist_ptr != NULL) {
- HDassert(H5SL_count(aux_ptr->d_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->d_slist_ptr) == 0);
H5SL_close(aux_ptr->d_slist_ptr);
} /* end if */
if (aux_ptr->c_slist_ptr != NULL) {
- HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
H5SL_close(aux_ptr->c_slist_ptr);
} /* end if */
if (aux_ptr->candidate_slist_ptr != NULL) {
- HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
H5SL_close(aux_ptr->candidate_slist_ptr);
} /* end if */
@@ -546,9 +546,9 @@ H5AC_evict(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
/* Evict all entries in the cache except the pinned superblock entry */
if (H5C_evict(f) < 0)
@@ -585,12 +585,12 @@ H5AC_expunge_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, unsigned fl
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(type->serialize);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(type->serialize);
+ assert(H5F_addr_defined(addr));
if (H5C_expunge_entry(f, type, addr, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_expunge_entry() failed")
@@ -631,9 +631,9 @@ H5AC_flush(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
#ifdef H5_HAVE_PARALLEL
/* flushing the cache, so clear all collective entries */
@@ -748,13 +748,13 @@ H5AC_insert_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(type->serialize);
- HDassert(H5F_addr_defined(addr));
- HDassert(thing);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(type->serialize);
+ assert(H5F_addr_defined(addr));
+ assert(thing);
/* Check for invalid access request */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -818,9 +818,9 @@ H5AC_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_load_cache_image_on_next_protect(f, addr, len, rw) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "call to H5C_load_cache_image_on_next_protect failed")
@@ -852,7 +852,7 @@ H5AC_mark_entry_dirty(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
/* Set up entry & cache pointers */
entry_ptr = (H5AC_info_t *)thing;
@@ -906,7 +906,7 @@ H5AC_mark_entry_clean(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
@@ -959,7 +959,7 @@ H5AC_mark_entry_unserialized(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
/* Set up entry & cache pointers */
entry_ptr = (H5AC_info_t *)thing;
@@ -1001,7 +1001,7 @@ H5AC_mark_entry_serialized(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
@@ -1043,12 +1043,12 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(H5F_addr_defined(old_addr));
- HDassert(H5F_addr_defined(new_addr));
- HDassert(H5F_addr_ne(old_addr, new_addr));
+ assert(f);
+ assert(f->shared->cache);
+ assert(type);
+ assert(H5F_addr_defined(old_addr));
+ assert(H5F_addr_defined(new_addr));
+ assert(H5F_addr_ne(old_addr, new_addr));
#ifdef H5_HAVE_PARALLEL
/* Log moving the entry */
@@ -1099,11 +1099,11 @@ H5AC_pin_protected_entry(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
/* Pin entry */
if (H5C_pin_protected_entry(thing) < 0)
@@ -1145,9 +1145,9 @@ H5AC_prep_for_file_close(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_prep_for_file_close(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cache prep for file close failed")
@@ -1187,9 +1187,9 @@ H5AC_prep_for_file_flush(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't enable skip list")
@@ -1231,9 +1231,9 @@ H5AC_secure_from_file_flush(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_set_slist_enabled(f->shared->cache, FALSE, FALSE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't disable skip list")
@@ -1266,12 +1266,12 @@ H5AC_create_flush_dependency(void *parent_thing, void *child_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(parent_thing);
- HDassert(child_thing);
+ assert(parent_thing);
+ assert(child_thing);
entry_ptr = (H5AC_info_t *)parent_thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
/* Create the flush dependency */
if (H5C_create_flush_dependency(parent_thing, child_thing) < 0)
@@ -1320,21 +1320,21 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata, unsi
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(type->serialize);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(type->serialize);
+ assert(H5F_addr_defined(addr));
/* Check for unexpected flags -- H5C__FLUSH_COLLECTIVELY_FLAG
* only permitted in the parallel case.
*/
#ifdef H5_HAVE_PARALLEL
- HDassert(0 == (flags &
- (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG | H5C__FLUSH_COLLECTIVELY_FLAG))));
+ assert(0 == (flags &
+ (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG | H5C__FLUSH_COLLECTIVELY_FLAG))));
#else /* H5_HAVE_PARALLEL */
- HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG))));
+ assert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG))));
#endif /* H5_HAVE_PARALLEL */
/* Check for invalid access request */
@@ -1388,11 +1388,11 @@ H5AC_resize_entry(void *thing, size_t new_size)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
#ifdef H5_HAVE_PARALLEL
/* Log the generation of dirty bytes of metadata iff:
@@ -1485,11 +1485,11 @@ H5AC_unpin_entry(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
/* Unpin the entry */
if (H5C_unpin_entry(thing) < 0)
@@ -1527,12 +1527,12 @@ H5AC_destroy_flush_dependency(void *parent_thing, void *child_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(parent_thing);
- HDassert(child_thing);
+ assert(parent_thing);
+ assert(child_thing);
entry_ptr = (H5AC_info_t *)parent_thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
/* Destroy the flush dependency */
if (H5C_destroy_flush_dependency(parent_thing, child_thing) < 0)
@@ -1599,16 +1599,16 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(type->deserialize);
- HDassert(type->image_len);
- HDassert(H5F_addr_defined(addr));
- HDassert(thing);
- HDassert(((H5AC_info_t *)thing)->addr == addr);
- HDassert(((H5AC_info_t *)thing)->type == type);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(type->deserialize);
+ assert(type->image_len);
+ assert(H5F_addr_defined(addr));
+ assert(thing);
+ assert(((H5AC_info_t *)thing)->addr == addr);
+ assert(((H5AC_info_t *)thing)->type == type);
dirtied =
(hbool_t)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) || (((H5AC_info_t *)thing)->dirtied));
@@ -1883,7 +1883,7 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, const H5AC_cache_config_t *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr);
+ assert(cache_ptr);
if (cache_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad cache_ptr on entry")
@@ -2118,12 +2118,12 @@ H5AC__check_if_write_permitted(const H5F_t
#ifdef H5_HAVE_PARALLEL
/* Sanity checks */
- HDassert(f != NULL);
- HDassert(f->shared != NULL);
- HDassert(f->shared->cache != NULL);
+ assert(f != NULL);
+ assert(f->shared != NULL);
+ assert(f->shared->cache != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache);
if (aux_ptr != NULL) {
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if ((aux_ptr->mpi_rank == 0) ||
(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED))
@@ -2225,9 +2225,9 @@ H5AC_ignore_tags(const H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
/* Set up a new metadata tag */
if (H5C_ignore_tags(f->shared->cache) < 0)
@@ -2286,8 +2286,8 @@ H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Call cache-level function to re-tag entries with the COPIED tag */
if (H5C_retag_entries(f->shared->cache, H5AC__COPIED_TAG, metadata_tag) < 0)
@@ -2320,8 +2320,8 @@ H5AC_flush_tagged_metadata(H5F_t *f, haddr_t metadata_tag)
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Call cache level function to flush metadata entries with specified tag */
if (H5C_flush_tagged_entries(f, metadata_tag) < 0)
@@ -2354,8 +2354,8 @@ H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, hbool_t match_global)
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Call cache level function to evict metadata entries with specified tag */
if (H5C_evict_tagged_entries(f, metadata_tag, match_global) < 0)
@@ -2387,8 +2387,8 @@ H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flag
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Call cache level function to expunge entries with specified tag and type id */
if (H5C_expunge_tag_type_metadata(f, tag, type_id, flags) < 0)
@@ -2420,8 +2420,8 @@ H5AC_get_tag(const void *thing, haddr_t *tag)
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(thing);
- HDassert(tag);
+ assert(thing);
+ assert(tag);
/* Call cache level function to get the tag */
if (H5C_get_tag(thing, tag) < 0)
@@ -2450,11 +2450,11 @@ H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(action == H5AC__SET_CORK || action == H5AC__UNCORK || action == H5AC__GET_CORKED);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(H5F_addr_defined(obj_addr));
+ assert(action == H5AC__SET_CORK || action == H5AC__UNCORK || action == H5AC__GET_CORKED);
/* Skip the search on "tag_list" when there are no "corked" objects.
* This is done to mitigate the slow down when closing objects.
@@ -2462,7 +2462,7 @@ H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked)
* in the future.
*/
if (action == H5AC__GET_CORKED) {
- HDassert(corked);
+ assert(corked);
if (H5C_get_num_objs_corked(f->shared->cache) == 0) {
*corked = FALSE;
HGOTO_DONE(SUCCEED)
@@ -2535,9 +2535,9 @@ H5AC_get_entry_ring(const H5F_t *f, haddr_t addr, H5AC_ring_t *ring)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(ring);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(ring);
/* Retrieve the ring value for the entry at address */
if (H5C_get_entry_ring(f, addr, ring) < 0)
@@ -2565,7 +2565,7 @@ H5AC_set_ring(H5AC_ring_t ring, H5AC_ring_t *orig_ring)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- /* Note: orig_ring can be NULL so don't check it with HDassert() */
+ /* Note: orig_ring can be NULL so don't check it with assert() */
/* Get the current ring value and return that (if orig_ring is NOT null) */
if (orig_ring)
@@ -2614,7 +2614,7 @@ H5AC_unsettle_entry_ring(void *_entry)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
/* Unsettle the entry's ring */
if (H5C_unsettle_entry_ring(entry) < 0)
@@ -2688,9 +2688,9 @@ H5AC_remove_entry(void *_entry)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
cache = entry->cache_ptr;
- HDassert(cache);
+ assert(cache);
/* Remove the entry from the cache*/
if (H5C_remove_entry(entry) < 0)
diff --git a/src/H5ACdbg.c b/src/H5ACdbg.c
index 55f0418..ead20c0 100644
--- a/src/H5ACdbg.c
+++ b/src/H5ACdbg.c
@@ -79,9 +79,9 @@ H5AC_stats(const H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
/* at present, this can't fail */
(void)H5C_stats(f->shared->cache, H5F_OPEN_NAME(f), FALSE);
@@ -112,9 +112,9 @@ H5AC_dump_cache(const H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_dump_cache(f->shared->cache, H5F_OPEN_NAME(f)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_dump_cache() failed.")
@@ -173,8 +173,8 @@ H5AC_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr, void **entry_ptr_ptr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
if (H5C_get_entry_ptr_from_addr(cache_ptr, addr, entry_ptr_ptr) < 0)
@@ -220,8 +220,8 @@ H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr,
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
ret_value = H5C_flush_dependency_exists(cache_ptr, parent_addr, child_addr, fd_exists_ptr);
@@ -269,8 +269,8 @@ H5AC_verify_entry_type(const H5F_t *f, haddr_t addr, const H5AC_class_t *expecte
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
if (H5C_verify_entry_type(cache_ptr, addr, expected_type, in_cache_ptr, type_ok_ptr) < 0)
@@ -304,8 +304,8 @@ H5AC_get_serialization_in_progress(H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
/* Set return value */
@@ -342,8 +342,8 @@ H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
ret_value = H5C_cache_is_clean(cache_ptr, inner_ring);
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index e103a26..9201f21 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -143,10 +143,10 @@ H5AC__set_sync_point_done_callback(H5C_t *cache_ptr, H5AC_sync_point_done_cb_t s
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
+ assert(cache_ptr);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
aux_ptr->sync_point_done = sync_point_done;
@@ -175,10 +175,10 @@ H5AC__set_write_done_callback(H5C_t *cache_ptr, H5AC_write_done_cb_t write_done)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
+ assert(cache_ptr);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
aux_ptr->write_done = write_done;
@@ -213,12 +213,12 @@ H5AC_add_candidate(H5AC_t *cache_ptr, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(aux_ptr->candidate_slist_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr->candidate_slist_ptr != NULL);
/* Construct an entry for the supplied address, and insert
* it into the candidate slist.
@@ -275,17 +275,17 @@ H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, unsigned *num_entries_ptr, had
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(aux_ptr->candidate_slist_ptr != NULL);
- HDassert(num_entries_ptr != NULL);
- HDassert(*num_entries_ptr == 0);
- HDassert(haddr_buf_ptr_ptr != NULL);
- HDassert(*haddr_buf_ptr_ptr == NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr->candidate_slist_ptr != NULL);
+ assert(num_entries_ptr != NULL);
+ assert(*num_entries_ptr == 0);
+ assert(haddr_buf_ptr_ptr != NULL);
+ assert(*haddr_buf_ptr_ptr == NULL);
/* First broadcast the number of entries in the list so that the
* receivers can set up buffers to receive them. If there aren't
@@ -307,8 +307,8 @@ H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, unsigned *num_entries_ptr, had
/* Push an error, but still participate in following MPI_Bcast */
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.")
}
- HDassert(chk_num_entries == num_entries);
- HDassert(haddr_buf_ptr != NULL);
+ assert(chk_num_entries == num_entries);
+ assert(haddr_buf_ptr != NULL);
/* Now broadcast the list of candidate entries */
buf_size = sizeof(haddr_t) * num_entries;
@@ -355,8 +355,8 @@ H5AC__broadcast_clean_list_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_uda
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(slist_entry_ptr);
- HDassert(udata);
+ assert(slist_entry_ptr);
+ assert(udata);
/* Store the entry's address in the buffer */
addr = slist_entry_ptr->addr;
@@ -408,12 +408,12 @@ H5AC__broadcast_clean_list(H5AC_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* First broadcast the number of entries in the list so that the
* receives can set up a buffer to receive them. If there aren't
@@ -495,18 +495,18 @@ H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_NDEBUG_UNUS
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE) || (aux_ptr->mpi_rank == 0));
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
- HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
- HDassert(aux_ptr->candidate_slist_ptr != NULL);
- HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
- HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
- (sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE));
+ assert(cache_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE) || (aux_ptr->mpi_rank == 0));
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
+ assert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
+ assert(aux_ptr->candidate_slist_ptr != NULL);
+ assert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
+ assert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
+ (sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE));
switch (sync_point_op) {
case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN:
@@ -551,8 +551,8 @@ H5AC__copy_candidate_list_to_buffer_cb(void *_item, void H5_ATTR_UNUSED *_key, v
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(slist_entry_ptr);
- HDassert(udata);
+ assert(slist_entry_ptr);
+ assert(udata);
/* Store the entry's address in the buffer */
udata->addr_buf_ptr[udata->u] = slist_entry_ptr->addr;
@@ -609,17 +609,17 @@ H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, unsigned *num_entri
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(aux_ptr->candidate_slist_ptr != NULL);
- HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) > 0);
- HDassert(num_entries_ptr != NULL);
- HDassert(*num_entries_ptr == 0);
- HDassert(haddr_buf_ptr_ptr != NULL);
- HDassert(*haddr_buf_ptr_ptr == NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr->candidate_slist_ptr != NULL);
+ assert(H5SL_count(aux_ptr->candidate_slist_ptr) > 0);
+ assert(num_entries_ptr != NULL);
+ assert(*num_entries_ptr == 0);
+ assert(haddr_buf_ptr_ptr != NULL);
+ assert(*haddr_buf_ptr_ptr == NULL);
num_entries = (unsigned)H5SL_count(aux_ptr->candidate_slist_ptr);
@@ -681,16 +681,16 @@ H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
addr = entry_ptr->addr;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* if the entry appears in the dirtied entry slist, remove it. */
if (NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr))))
@@ -734,21 +734,21 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr);
+ assert(entry_ptr->is_dirty == FALSE);
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if (aux_ptr->mpi_rank == 0) {
H5AC_slist_entry_t *slist_entry_ptr;
haddr_t addr = entry_ptr->addr;
/* Sanity checks */
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
if (NULL == H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) {
/* insert the address of the entry in the dirty entry list, and
@@ -811,21 +811,21 @@ H5AC__log_cleaned_entry(const H5AC_info_t *entry_ptr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(entry_ptr);
- HDassert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr);
+ assert(entry_ptr->is_dirty == FALSE);
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if (aux_ptr->mpi_rank == 0) {
H5AC_slist_entry_t *slist_entry_ptr;
haddr_t addr = entry_ptr->addr;
/* Sanity checks */
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* Remove it from both the cleaned list and the dirtied list. */
if (NULL !=
@@ -875,12 +875,12 @@ H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, unsig
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* Set local flags */
cleared = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0);
@@ -942,18 +942,18 @@ H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if (aux_ptr->mpi_rank == 0) {
H5AC_slist_entry_t *slist_entry_ptr;
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* Entry to insert should not be in dirty list currently */
if (NULL != H5SL_search(aux_ptr->d_slist_ptr, (const void *)(&entry_ptr->addr)))
@@ -1043,13 +1043,13 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = (H5AC_t *)f->shared->cache;
- HDassert(cache_ptr);
+ assert(cache_ptr);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
/* get entry status, size, etc here */
if (H5C_get_entry_status(f, old_addr, &entry_size, &entry_in_cache, &entry_dirty, NULL, NULL, NULL, NULL,
@@ -1061,8 +1061,8 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
if (aux_ptr->mpi_rank == 0) {
H5AC_slist_entry_t *slist_entry_ptr;
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* if the entry appears in the cleaned entry slist, under its old
* address, remove it.
@@ -1085,7 +1085,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
* list under its old address implies that it must have
* been clean to start with.
*/
- HDassert(!entry_dirty);
+ assert(!entry_dirty);
if (NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .")
slist_entry_ptr->addr = new_addr;
@@ -1223,13 +1223,13 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
/* to prevent "messages from the future" we must synchronize all
* processes before we write any entries.
@@ -1241,7 +1241,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f)
if (H5AC__broadcast_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast candidate slist.")
- HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
} /* end if */
else {
if (H5AC__receive_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0)
@@ -1386,18 +1386,18 @@ H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
if (aux_ptr->mpi_rank == 0) {
if (H5AC__broadcast_clean_list(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast clean slist.")
- HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
} /* end if */
else if (H5AC__receive_and_apply_clean_list(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive and/or process clean slist broadcast.")
@@ -1437,10 +1437,10 @@ H5AC__receive_haddr_list(MPI_Comm mpi_comm, unsigned *num_entries_ptr, haddr_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(num_entries_ptr != NULL);
- HDassert(*num_entries_ptr == 0);
- HDassert(haddr_buf_ptr_ptr != NULL);
- HDassert(*haddr_buf_ptr_ptr == NULL);
+ assert(num_entries_ptr != NULL);
+ assert(*num_entries_ptr == 0);
+ assert(haddr_buf_ptr_ptr != NULL);
+ assert(*haddr_buf_ptr_ptr == NULL);
/* First receive the number of entries in the list so that we
* can set up a buffer to receive them. If there aren't
@@ -1509,13 +1509,13 @@ H5AC__receive_and_apply_clean_list(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank != 0);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank != 0);
/* Retrieve the clean list from process 0 */
if (H5AC__receive_haddr_list(aux_ptr->mpi_comm, &num_entries, &haddr_buf_ptr) < 0)
@@ -1569,16 +1569,16 @@ H5AC__receive_candidate_list(const H5AC_t *cache_ptr, unsigned *num_entries_ptr,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank != 0);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(num_entries_ptr != NULL);
- HDassert(*num_entries_ptr == 0);
- HDassert(haddr_buf_ptr_ptr != NULL);
- HDassert(*haddr_buf_ptr_ptr == NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank != 0);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(num_entries_ptr != NULL);
+ assert(*num_entries_ptr == 0);
+ assert(haddr_buf_ptr_ptr != NULL);
+ assert(*haddr_buf_ptr_ptr == NULL);
/* Retrieve the candidate list from process 0 */
if (H5AC__receive_haddr_list(aux_ptr->mpi_comm, num_entries_ptr, haddr_buf_ptr_ptr) < 0)
@@ -1650,13 +1650,13 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
/* first construct the candidate list -- initially, this will be in the
* form of a skip list. We will convert it later.
@@ -1794,13 +1794,13 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
/* Query if evictions are allowed */
if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
@@ -1873,13 +1873,13 @@ H5AC__rsp__p0_only__flush(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
/* To prevent "messages from the future" we must
* synchronize all processes before we start the flush.
@@ -1984,13 +1984,13 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
/* Query if evictions are allowed */
if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
@@ -2098,21 +2098,21 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
- (sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED));
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
+ (sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED));
#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
- HDfprintf(stdout, "%d:%s...:%u: (u/uu/i/iu/m/mu) = %zu/%u/%zu/%u/%zu/%u\n", aux_ptr->mpi_rank, __func__,
- aux_ptr->dirty_bytes_propagations, aux_ptr->unprotect_dirty_bytes,
- aux_ptr->unprotect_dirty_bytes_updates, aux_ptr->insert_dirty_bytes,
- aux_ptr->insert_dirty_bytes_updates, aux_ptr->move_dirty_bytes,
- aux_ptr->move_dirty_bytes_updates);
+ fprintf(stdout, "%d:%s...:%u: (u/uu/i/iu/m/mu) = %zu/%u/%zu/%u/%zu/%u\n", aux_ptr->mpi_rank, __func__,
+ aux_ptr->dirty_bytes_propagations, aux_ptr->unprotect_dirty_bytes,
+ aux_ptr->unprotect_dirty_bytes_updates, aux_ptr->insert_dirty_bytes,
+ aux_ptr->insert_dirty_bytes_updates, aux_ptr->move_dirty_bytes,
+ aux_ptr->move_dirty_bytes_updates);
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
/* Clear collective access flag on half of the entries in the cache and
@@ -2229,14 +2229,14 @@ H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, unsigned num_candidates, haddr_t *ca
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(num_candidates > 0);
- HDassert(candidates_list_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(num_candidates > 0);
+ assert(candidates_list_ptr != NULL);
/* clean up dirtied and flushed and still clean lists by removing
* all entries on the candidate list. Cleared entries should
@@ -2289,8 +2289,8 @@ H5AC__flush_entries(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared->cache);
/* Check if we have >1 ranks */
if (H5C_get_aux_ptr(f->shared->cache))
diff --git a/src/H5ACproxy_entry.c b/src/H5ACproxy_entry.c
index 20889e2..8fa0897 100644
--- a/src/H5ACproxy_entry.c
+++ b/src/H5ACproxy_entry.c
@@ -150,8 +150,8 @@ H5AC_proxy_entry_add_parent(H5AC_proxy_entry_t *pentry, void *_parent)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(parent);
- HDassert(pentry);
+ assert(parent);
+ assert(pentry);
/* Add parent to the list of parents */
if (NULL == pentry->parents)
@@ -166,7 +166,7 @@ H5AC_proxy_entry_add_parent(H5AC_proxy_entry_t *pentry, void *_parent)
/* Add flush dependency on parent */
if (pentry->nchildren > 0) {
/* Sanity check */
- HDassert(H5F_addr_defined(pentry->addr));
+ assert(H5F_addr_defined(pentry->addr));
if (H5AC_create_flush_dependency(parent, pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "unable to set flush dependency on proxy entry")
@@ -198,9 +198,9 @@ H5AC_proxy_entry_remove_parent(H5AC_proxy_entry_t *pentry, void *_parent)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(pentry);
- HDassert(pentry->parents);
- HDassert(parent);
+ assert(pentry);
+ assert(pentry->parents);
+ assert(parent);
/* Remove parent from skip list */
if (NULL == (rem_parent = (H5AC_info_t *)H5SL_remove(pentry->parents, &parent->addr)))
@@ -211,7 +211,7 @@ H5AC_proxy_entry_remove_parent(H5AC_proxy_entry_t *pentry, void *_parent)
/* Shut down the skip list, if this is the last parent */
if (0 == H5SL_count(pentry->parents)) {
/* Sanity check */
- HDassert(0 == pentry->nchildren);
+ assert(0 == pentry->nchildren);
if (H5SL_close(pentry->parents) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CLOSEERROR, FAIL, "can't close proxy parent skip list")
@@ -279,8 +279,8 @@ H5AC_proxy_entry_add_child(H5AC_proxy_entry_t *pentry, H5F_t *f, void *child)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(pentry);
- HDassert(child);
+ assert(pentry);
+ assert(child);
/* Check for first child */
if (0 == pentry->nchildren) {
@@ -372,8 +372,8 @@ H5AC_proxy_entry_remove_child(H5AC_proxy_entry_t *pentry, void *child)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(pentry);
- HDassert(child);
+ assert(pentry);
+ assert(child);
/* Remove flush dependency on proxy entry */
if (H5AC_destroy_flush_dependency(pentry, child) < 0)
@@ -423,11 +423,11 @@ H5AC_proxy_entry_dest(H5AC_proxy_entry_t *pentry)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(pentry);
- HDassert(NULL == pentry->parents);
- HDassert(0 == pentry->nchildren);
- HDassert(0 == pentry->ndirty_children);
- HDassert(0 == pentry->nunser_children);
+ assert(pentry);
+ assert(NULL == pentry->parents);
+ assert(0 == pentry->nchildren);
+ assert(0 == pentry->ndirty_children);
+ assert(0 == pentry->nunser_children);
/* Free the proxy entry object */
pentry = H5FL_FREE(H5AC_proxy_entry_t, pentry);
@@ -453,7 +453,7 @@ H5AC__proxy_entry_image_len(const void H5_ATTR_UNUSED *thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image_len);
+ assert(image_len);
/* Set the image length size to 1 byte */
*image_len = 1;
@@ -482,7 +482,7 @@ H5AC__proxy_entry_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
/* Should never be invoked */
- HDassert(0 && "Invalid callback?!?");
+ assert(0 && "Invalid callback?!?");
HERROR(H5E_CACHE, H5E_CANTSERIALIZE, "called unreachable fcn.");
@@ -510,7 +510,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pentry);
+ assert(pentry);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
@@ -520,7 +520,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Invalid action?!?");
+ assert(0 && "Invalid action?!?");
#endif /* NDEBUG */
break;
@@ -528,28 +528,28 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Invalid action?!?");
+ assert(0 && "Invalid action?!?");
#endif /* NDEBUG */
break;
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
/* Sanity checks */
- HDassert(0 == pentry->ndirty_children);
- HDassert(0 == pentry->nunser_children);
+ assert(0 == pentry->ndirty_children);
+ assert(0 == pentry->nunser_children);
/* No action */
break;
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
/* Sanity checks */
- HDassert(pentry->ndirty_children > 0);
+ assert(pentry->ndirty_children > 0);
/* No action */
break;
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
/* Sanity checks */
- HDassert(0 == pentry->ndirty_children);
+ assert(0 == pentry->ndirty_children);
/* No action */
break;
@@ -566,7 +566,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
/* Sanity check */
- HDassert(pentry->ndirty_children > 0);
+ assert(pentry->ndirty_children > 0);
/* Decrement # of dirty children */
pentry->ndirty_children--;
@@ -589,7 +589,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
case H5AC_NOTIFY_ACTION_CHILD_SERIALIZED:
/* Sanity check */
- HDassert(pentry->nunser_children > 0);
+ assert(pentry->nunser_children > 0);
/* Decrement # of unserialized children */
pentry->nunser_children--;
@@ -604,7 +604,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown notify action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 788aab7..aa7f087 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -237,8 +237,8 @@ H5A__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(bt2_udata);
- HDassert(bt2_rec);
+ assert(bt2_udata);
+ assert(bt2_rec);
/* Check hash value */
if (bt2_udata->name_hash < bt2_rec->hash)
@@ -250,7 +250,7 @@ H5A__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
H5HF_t *fheap; /* Fractal heap handle to use for finding object */
/* Sanity check */
- HDassert(bt2_udata->name_hash == bt2_rec->hash);
+ assert(bt2_udata->name_hash == bt2_rec->hash);
/* Prepare user data for callback */
/* down */
@@ -268,7 +268,7 @@ H5A__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
fheap = bt2_udata->shared_fheap;
else
fheap = bt2_udata->fheap;
- HDassert(fheap);
+ assert(fheap);
/* Check if the user's attribute and the B-tree's attribute have the same name */
if (H5HF_op(fheap, &bt2_rec->id, H5A__dense_fh_name_cmp, &fh_udata) < 0)
@@ -363,8 +363,8 @@ H5A__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u, %08" PRIx32 "}\n", indent, "", fwidth,
- "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder, nrecord->hash);
+ fprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u, %08" PRIx32 "}\n", indent, "", fwidth,
+ "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder, nrecord->hash);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A__dense_btree2_name_debug() */
@@ -421,8 +421,8 @@ H5A__dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, i
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(bt2_udata);
- HDassert(bt2_rec);
+ assert(bt2_udata);
+ assert(bt2_rec);
/* Check creation order value */
if (bt2_udata->corder < bt2_rec->corder)
@@ -514,8 +514,8 @@ H5A__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u}\n", indent, "", fwidth,
- "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder);
+ fprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u}\n", indent, "", fwidth,
+ "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A__dense_btree2_corder_debug() */
diff --git a/src/H5Adense.c b/src/H5Adense.c
index efac18d..02c6d68 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -177,12 +177,12 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
+ assert(f);
+ assert(ainfo);
/* Set fractal heap creation parameters */
/* XXX: Give some control of these to applications? */
- HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
+ memset(&fheap_cparam, 0, sizeof(fheap_cparam));
fheap_cparam.managed.width = H5O_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5O_FHEAP_MAN_START_BLOCK_SIZE;
fheap_cparam.managed.max_direct_size = H5O_FHEAP_MAN_MAX_DIRECT_SIZE;
@@ -206,12 +206,12 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
/* Retrieve the heap's ID length in the file */
if (H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
- HDassert(fheap_id_len == H5O_FHEAP_ID_LEN);
+ assert(fheap_id_len == H5O_FHEAP_ID_LEN);
}
#endif /* NDEBUG */
/* Create the name index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5A_BT2_NAME;
bt2_cparam.node_size = (size_t)H5A_NAME_BT2_NODE_SIZE;
bt2_cparam.rrec_size = 4 + /* Name's hash value */
@@ -230,7 +230,7 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
/* Check if we should create a creation order index v2 B-tree */
if (ainfo->index_corder) {
/* Create the creation order index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5A_BT2_CORDER;
bt2_cparam.node_size = (size_t)H5A_CORDER_BT2_NODE_SIZE;
bt2_cparam.rrec_size = 4 + /* Creation order index */
@@ -279,9 +279,9 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(attr);
- HDassert(user_attr);
- HDassert(took_ownership);
+ assert(attr);
+ assert(user_attr);
+ assert(took_ownership);
/*
* If there is an attribute already stored in "user_attr",
@@ -343,9 +343,9 @@ H5A__dense_open(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(name);
+ assert(f);
+ assert(ainfo);
+ assert(name);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr)))
@@ -434,9 +434,9 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(attr);
+ assert(f);
+ assert(ainfo);
+ assert(attr);
/* Check if attributes are shared in this file */
if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0)
@@ -459,7 +459,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
/* Attributes can't be "unique be shareable" yet */
- HDassert(!(mesg_flags & H5O_MSG_FLAG_SHAREABLE));
+ assert(!(mesg_flags & H5O_MSG_FLAG_SHAREABLE));
} /* end else */
/* Retrieve the address of the shared message's fractal heap */
@@ -481,7 +481,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
/* Check for inserting shared attribute */
if (mesg_flags & H5O_MSG_FLAG_SHARED) {
/* Sanity check */
- HDassert(attr_sharable);
+ assert(attr_sharable);
/* Use heap ID for shared message heap */
udata.id = attr->sh_loc.u.heap_id;
@@ -535,7 +535,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
/* Check if we should create a creation order index v2 B-tree record */
if (ainfo->index_corder) {
/* Open the creation order index v2 B-tree */
- HDassert(H5F_addr_defined(ainfo->corder_bt2_addr));
+ assert(H5F_addr_defined(ainfo->corder_bt2_addr));
if (NULL == (bt2_corder = H5B2_open(f, ainfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
@@ -582,8 +582,8 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(record);
- HDassert(new_heap_id);
+ assert(record);
+ assert(new_heap_id);
/* Update record's heap ID */
record->id = *new_heap_id;
@@ -619,8 +619,8 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(record);
- HDassert(op_data);
+ assert(record);
+ assert(op_data);
/* Check for modifying shared attribute */
if (record->flags & H5O_MSG_FLAG_SHARED) {
@@ -687,7 +687,7 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
if (H5HF_get_obj_len(op_data->fheap, &record->id, &obj_len) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get object size")
- HDassert(obj_len == attr_size);
+ assert(obj_len == attr_size);
}
#endif /* NDEBUG */
/* Update existing attribute in heap */
@@ -732,11 +732,11 @@ H5A__dense_write(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(H5F_addr_defined(ainfo->fheap_addr));
- HDassert(H5F_addr_defined(ainfo->name_bt2_addr));
- HDassert(attr);
+ assert(f);
+ assert(ainfo);
+ assert(H5F_addr_defined(ainfo->fheap_addr));
+ assert(H5F_addr_defined(ainfo->name_bt2_addr));
+ assert(attr);
/* Check if attributes are shared in this file */
if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0)
@@ -872,10 +872,10 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(old_name);
- HDassert(new_name);
+ assert(f);
+ assert(ainfo);
+ assert(old_name);
+ assert(new_name);
/* Check if attributes are shared in this file */
if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0)
@@ -922,7 +922,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index")
if (attr_exists == FALSE)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute in name index")
- HDassert(attr_copy);
+ assert(attr_copy);
/* Check if message is already shared */
if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) < 0)
@@ -946,7 +946,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
hbool_t corder_attr_exists; /* Attribute exists in v2 B-tree */
/* Open the creation order index v2 B-tree */
- HDassert(H5F_addr_defined(ainfo->corder_bt2_addr));
+ assert(H5F_addr_defined(ainfo->corder_bt2_addr));
if (NULL == (bt2_corder = H5B2_open(f, ainfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation index")
@@ -1099,7 +1099,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
break;
default:
- HDassert("unknown attribute op type" && 0);
+ assert("unknown attribute op type" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type")
#endif /* NDEBUG */
@@ -1148,11 +1148,11 @@ H5A__dense_iterate(H5F_t *f, hid_t loc_id, const H5O_ainfo_t *ainfo, H5_index_t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(H5F_addr_defined(ainfo->fheap_addr));
- HDassert(H5F_addr_defined(ainfo->name_bt2_addr));
- HDassert(attr_op);
+ assert(f);
+ assert(ainfo);
+ assert(H5F_addr_defined(ainfo->fheap_addr));
+ assert(H5F_addr_defined(ainfo->name_bt2_addr));
+ assert(attr_op);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -1161,14 +1161,14 @@ H5A__dense_iterate(H5F_t *f, hid_t loc_id, const H5O_ainfo_t *ainfo, H5_index_t
* table and sorting it.
*/
if (order == H5_ITER_NATIVE) {
- HDassert(H5F_addr_defined(ainfo->name_bt2_addr));
+ assert(H5F_addr_defined(ainfo->name_bt2_addr));
bt2_addr = ainfo->name_bt2_addr;
} /* end if */
else
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -1343,9 +1343,9 @@ H5A__dense_remove(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(name && *name);
+ assert(f);
+ assert(ainfo);
+ assert(name && *name);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr)))
@@ -1445,7 +1445,7 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
/* Call fractal heap 'op' routine, to make copy of attribute to remove */
if (H5HF_op(fheap, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "attribute removal callback failed")
- HDassert(fh_udata.attr);
+ assert(fh_udata.attr);
/* Use the attribute's shared location */
use_sh_loc = FALSE;
@@ -1468,7 +1468,7 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
other_bt2_udata.corder = fh_udata.attr->shared->crt_idx;
} /* end if */
else {
- HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
+ assert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
/* Set up the user data for the v2 B-tree 'record remove' callback */
other_bt2_udata.f = bt2_udata->f;
@@ -1555,8 +1555,8 @@ H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
+ assert(f);
+ assert(ainfo);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -1566,13 +1566,13 @@ H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type
*/
if (order == H5_ITER_NATIVE) {
bt2_addr = ainfo->name_bt2_addr;
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
} /* end if */
else
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -1680,10 +1680,10 @@ H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, hbool_t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(name);
- HDassert(attr_exists);
+ assert(f);
+ assert(ainfo);
+ assert(name);
+ assert(attr_exists);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr)))
@@ -1825,8 +1825,8 @@ H5A__dense_delete(H5F_t *f, H5O_ainfo_t *ainfo)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
+ assert(f);
+ assert(ainfo);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr)))
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 8662b5f..6905235 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -221,7 +221,7 @@ H5A_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_ATTR));
+ assert(0 == H5I_nmembers(H5I_ATTR));
/* Destroy the attribute object id group */
n += (H5I_dec_type_ref(H5I_ATTR) > 0);
@@ -253,10 +253,10 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
FUNC_ENTER_PACKAGE_TAG(loc->oloc->addr)
/* Check args */
- HDassert(loc);
- HDassert(attr_name);
- HDassert(type);
- HDassert(space);
+ assert(loc);
+ assert(attr_name);
+ assert(type);
+ assert(space);
/* Check for existing attribute with same name */
/* (technically, the "attribute create" operation will fail for a duplicated
@@ -285,7 +285,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "can't allocate shared attr structure")
/* If the creation property list is H5P_ATTRIBUTE_CREATE_DEFAULT, use the default character encoding */
- HDassert(acpl_id != H5P_DEFAULT);
+ assert(acpl_id != H5P_DEFAULT);
if (acpl_id == H5P_ATTRIBUTE_CREATE_DEFAULT)
attr->shared->encoding = H5F_DEFAULT_CSET;
else {
@@ -363,8 +363,8 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, NULL, "dataspace is invalid")
H5_CHECKED_ASSIGN(nelmts, size_t, snelmts, hssize_t);
- HDassert(attr->shared->dt_size > 0);
- HDassert(attr->shared->ds_size > 0);
+ assert(attr->shared->dt_size > 0);
+ assert(attr->shared->ds_size > 0);
attr->shared->data_size = nelmts * H5T_GET_SIZE(attr->shared->dt);
/* Hold the symbol table entry (and file) open */
@@ -417,9 +417,9 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(obj_name);
- HDassert(attr_name);
+ assert(loc);
+ assert(obj_name);
+ assert(attr_name);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -476,8 +476,8 @@ H5A__open_common(const H5G_loc_t *loc, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(attr);
+ assert(loc);
+ assert(attr);
#if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG)
/* Clear object location */
@@ -527,8 +527,8 @@ H5A__open(const H5G_loc_t *loc, const char *attr_name)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(attr_name);
+ assert(loc);
+ assert(attr_name);
/* Read in attribute from object header */
if (NULL == (attr = H5O__attr_open_by_name(loc->oloc, attr_name)))
@@ -577,8 +577,8 @@ H5A__open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(obj_name);
+ assert(loc);
+ assert(obj_name);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -639,9 +639,9 @@ H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_n
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(obj_name);
- HDassert(attr_name);
+ assert(loc);
+ assert(obj_name);
+ assert(attr_name);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -709,9 +709,9 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
FUNC_ENTER_PACKAGE_TAG(attr->oloc.addr)
- HDassert(attr);
- HDassert(mem_type);
- HDassert(buf);
+ assert(attr);
+ assert(mem_type);
+ assert(buf);
/* Patch the top level file pointer in attr->shared->dt->shared->u.vlen.f if needed */
if (H5T_patch_vlen_file(attr->shared->dt, H5F_VOL_OBJ(attr->oloc.file)) < 0)
@@ -729,7 +729,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
/* Check if the attribute has any data yet, if not, fill with zeroes */
if (attr->obj_opened && !attr->shared->data)
- HDmemset(buf, 0, (dst_type_size * nelmts));
+ memset(buf, 0, (dst_type_size * nelmts));
else { /* Attribute exists and has a value */
/* Convert memory buffer into disk buffer */
/* Set up type conversion function */
@@ -764,7 +764,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
/* Copy the application buffer into the background buffer if necessary */
if (need_bkg == H5T_BKG_YES) {
- HDassert(buf_size >= (dst_type_size * nelmts));
+ assert(buf_size >= (dst_type_size * nelmts));
H5MM_memcpy(bkg_buf, buf, dst_type_size * nelmts);
}
}
@@ -778,7 +778,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
} /* end if */
/* No type conversion necessary */
else {
- HDassert(dst_type_size == src_type_size);
+ assert(dst_type_size == src_type_size);
/* Copy the attribute data into the user's buffer */
H5MM_memcpy(buf, attr->shared->data, (dst_type_size * nelmts));
@@ -831,9 +831,9 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
FUNC_ENTER_PACKAGE_TAG(attr->oloc.addr)
- HDassert(attr);
- HDassert(mem_type);
- HDassert(buf);
+ assert(attr);
+ assert(mem_type);
+ assert(buf);
/* Patch the top level file pointer in attr->shared->dt->shared->u.vlen.f if needed */
if (H5T_patch_vlen_file(attr->shared->dt, H5F_VOL_OBJ(attr->oloc.file)) < 0)
@@ -888,7 +888,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
/* Clear background buffer if it's not supposed to be initialized with file
* contents */
if (need_bkg == H5T_BKG_TEMP)
- HDmemset(bkg_buf, 0, dst_type_size * nelmts);
+ memset(bkg_buf, 0, dst_type_size * nelmts);
}
else if (NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed")
@@ -908,7 +908,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
} /* end if */
/* No type conversion necessary */
else {
- HDassert(dst_type_size == src_type_size);
+ assert(dst_type_size == src_type_size);
/* Allocate the attribute buffer, if there isn't one */
if (attr->shared->data == NULL)
@@ -962,8 +962,8 @@ H5A__get_name(H5A_t *attr, size_t buf_size, char *buf, size_t *attr_name_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(attr);
- HDassert(attr_name_len);
+ assert(attr);
+ assert(attr_name_len);
/* Get the real attribute length */
nbytes = HDstrlen(attr->shared->name);
@@ -1004,7 +1004,7 @@ H5A_get_space(H5A_t *attr)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(attr);
+ assert(attr);
/* Copy the attribute's dataspace */
if (NULL == (ds = H5S_copy(attr->shared->ds, FALSE, TRUE)))
@@ -1039,7 +1039,7 @@ H5A__get_type(H5A_t *attr)
FUNC_ENTER_PACKAGE
- HDassert(attr);
+ assert(attr);
/* Patch the datatype's "top level" file pointer */
if (H5T_patch_file(attr->shared->dt, attr->oloc.file) < 0)
@@ -1145,8 +1145,8 @@ H5A__get_info(const H5A_t *attr, H5A_info_t *ainfo)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(attr);
- HDassert(ainfo);
+ assert(attr);
+ assert(ainfo);
/* Set info for attribute */
ainfo->cset = attr->shared->encoding;
@@ -1186,7 +1186,7 @@ H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(old_attr);
+ assert(old_attr);
/* Allocate attribute structure */
if (_new_attr == NULL) {
@@ -1246,8 +1246,8 @@ H5A__shared_free(H5A_t *attr)
FUNC_ENTER_PACKAGE
- HDassert(attr);
- HDassert(attr->shared);
+ assert(attr);
+ assert(attr->shared);
/* Free dynamically allocated items.
* When possible, keep trying to shut things down (via HDONE_ERROR).
@@ -1292,7 +1292,7 @@ H5A__close_cb(H5VL_object_t *attr_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(attr_vol_obj);
+ assert(attr_vol_obj);
/* Close the attribute */
if (H5VL_attr_close(attr_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
@@ -1325,8 +1325,8 @@ H5A__close(H5A_t *attr)
FUNC_ENTER_PACKAGE
- HDassert(attr);
- HDassert(attr->shared);
+ assert(attr);
+ assert(attr->shared);
/* Close the object's symbol-table entry */
if (attr->obj_opened && (H5O_close(&(attr->oloc), NULL) < 0))
@@ -1378,7 +1378,7 @@ H5A_oloc(H5A_t *attr)
FUNC_ENTER_NOAPI_NOERR
- HDassert(attr);
+ assert(attr);
/* Set return value */
ret_value = &(attr->oloc);
@@ -1408,7 +1408,7 @@ H5A_nameof(H5A_t *attr)
FUNC_ENTER_NOAPI_NOERR
- HDassert(attr);
+ assert(attr);
/* Set return value */
ret_value = &(attr->path);
@@ -1436,7 +1436,7 @@ H5A_type(const H5A_t *attr)
FUNC_ENTER_NOAPI_NOERR
- HDassert(attr);
+ assert(attr);
/* Set return value */
ret_value = attr->shared->dt;
@@ -1468,9 +1468,9 @@ H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj_name);
- HDassert(attr_name);
- HDassert(attr_exists);
+ assert(obj_name);
+ assert(attr_name);
+ assert(attr_exists);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -1521,7 +1521,7 @@ H5A__compact_build_table_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Re-allocate the table if necessary */
if (udata->curr_attr == udata->atable->nattrs) {
@@ -1580,9 +1580,9 @@ H5A__compact_build_table(H5F_t *f, H5O_t *oh, H5_index_t idx_type, H5_iter_order
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(oh);
- HDassert(atable);
+ assert(f);
+ assert(oh);
+ assert(atable);
/* Initialize table */
atable->attrs = NULL;
@@ -1638,9 +1638,9 @@ H5A__dense_build_table_cb(const H5A_t *attr, void *_udata)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(attr);
- HDassert(udata);
- HDassert(udata->curr_attr < udata->atable->nattrs);
+ assert(attr);
+ assert(udata);
+ assert(udata->curr_attr < udata->atable->nattrs);
/* Allocate attribute for entry in the table */
if (NULL == (udata->atable->attrs[udata->curr_attr] = H5FL_CALLOC(H5A_t)))
@@ -1685,11 +1685,11 @@ H5A__dense_build_table(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(ainfo);
- HDassert(H5F_addr_defined(ainfo->fheap_addr));
- HDassert(H5F_addr_defined(ainfo->name_bt2_addr));
- HDassert(atable);
+ assert(f);
+ assert(ainfo);
+ assert(H5F_addr_defined(ainfo->fheap_addr));
+ assert(H5F_addr_defined(ainfo->name_bt2_addr));
+ assert(atable);
/* Open the name index v2 B-tree */
if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL)))
@@ -1879,7 +1879,7 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, H5_iter_orde
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(atable);
+ assert(atable);
/* Pick appropriate comparison routine */
if (idx_type == H5_INDEX_NAME) {
@@ -1888,16 +1888,16 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, H5_iter_orde
else if (order == H5_ITER_DEC)
HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_name_dec);
else
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
if (order == H5_ITER_INC)
HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_corder_inc);
else if (order == H5_ITER_DEC)
HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_corder_dec);
else
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1926,8 +1926,8 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(atable);
- HDassert(attr_op);
+ assert(atable);
+ assert(attr_op);
/* Skip over attributes, if requested */
if (last_attr)
@@ -1963,7 +1963,7 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l
break;
default:
- HDassert("unknown attribute op type" && 0);
+ assert("unknown attribute op type" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type")
#endif /* NDEBUG */
@@ -2002,7 +2002,7 @@ H5A__attr_release_table(H5A_attr_table_t *atable)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(atable);
+ assert(atable);
/* Release attribute info, if any. */
if (atable->nattrs > 0) {
@@ -2014,7 +2014,7 @@ H5A__attr_release_table(H5A_attr_table_t *atable)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute")
} /* end if */
else
- HDassert(atable->attrs == NULL);
+ assert(atable->attrs == NULL);
atable->attrs = (H5A_t **)H5FL_SEQ_FREE(H5A_t_ptr, atable->attrs);
@@ -2044,9 +2044,9 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo)
FUNC_ENTER_NOAPI_TAG(oh->cache_info.addr, FAIL)
/* check arguments */
- HDassert(f);
- HDassert(oh);
- HDassert(ainfo);
+ assert(f);
+ assert(oh);
+ assert(ainfo);
/* Check if the "attribute info" message exists */
if ((ret_value = H5O_msg_exists_oh(oh, H5O_AINFO_ID)) < 0)
@@ -2108,8 +2108,8 @@ H5A__set_version(const H5F_t *f, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(attr);
+ assert(f);
+ assert(attr);
/* Check whether datatype and dataspace are shared */
if (H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt) > 0)
@@ -2185,10 +2185,10 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(attr_src);
- HDassert(file_dst);
- HDassert(cpy_info);
- HDassert(!cpy_info->copy_without_attr);
+ assert(attr_src);
+ assert(file_dst);
+ assert(cpy_info);
+ assert(!cpy_info->copy_without_attr);
/* Allocate space for the destination message */
if (NULL == (attr_dst = H5FL_CALLOC(H5A_t)))
@@ -2210,7 +2210,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Copy attribute's name */
attr_dst->shared->name = H5MM_strdup(attr_src->shared->name);
- HDassert(attr_dst->shared->name);
+ assert(attr_dst->shared->name);
attr_dst->shared->encoding = attr_src->shared->encoding;
/* Copy attribute's datatype */
@@ -2235,7 +2235,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Copy the dataspace for the attribute. Make sure the maximal dimension is also copied.
* Otherwise the comparison in the test may complain about it. SLU 2011/4/12 */
attr_dst->shared->ds = H5S_copy(attr_src->shared->ds, FALSE, TRUE);
- HDassert(attr_dst->shared->ds);
+ assert(attr_dst->shared->ds);
/* Reset the dataspace's sharing in the source file before trying to share
* it in the destination.
@@ -2256,9 +2256,9 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
* size unless they're shared.
*/
attr_dst->shared->dt_size = H5O_msg_raw_size(file_dst, H5O_DTYPE_ID, FALSE, attr_dst->shared->dt);
- HDassert(attr_dst->shared->dt_size > 0);
+ assert(attr_dst->shared->dt_size > 0);
attr_dst->shared->ds_size = H5O_msg_raw_size(file_dst, H5O_SDSPACE_ID, FALSE, attr_dst->shared->ds);
- HDassert(attr_dst->shared->ds_size > 0);
+ assert(attr_dst->shared->ds_size > 0);
/* Check whether to recompute the size of the attribute */
/* (happens when the datatype or dataspace changes sharing status) */
@@ -2371,7 +2371,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Set background buffer to all zeros */
if (bkg_buf)
- HDmemset(bkg_buf, 0, buf_size);
+ memset(bkg_buf, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0)
@@ -2383,7 +2383,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, NULL, "unable to reclaim variable-length data")
} /* end if */
else {
- HDassert(attr_dst->shared->data_size == attr_src->shared->data_size);
+ assert(attr_dst->shared->data_size == attr_src->shared->data_size);
H5MM_memcpy(attr_dst->shared->data, attr_src->shared->data, attr_src->shared->data_size);
} /* end else */
} /* end if(attr_src->shared->data) */
@@ -2457,16 +2457,16 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(src_oloc);
- HDassert(dst_oloc);
- HDassert(attr_dst);
- HDassert(attr_src);
+ assert(src_oloc);
+ assert(dst_oloc);
+ assert(attr_dst);
+ assert(attr_src);
file_src = src_oloc->file;
file_dst = dst_oloc->file;
- HDassert(file_src);
- HDassert(file_dst);
+ assert(file_src);
+ assert(file_dst);
if (H5T_is_named(attr_src->shared->dt)) {
H5O_loc_t *src_oloc_dt; /* Pointer to source datatype's object location */
@@ -2474,9 +2474,9 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l
/* Get group entries for source & destination */
src_oloc_dt = H5T_oloc(attr_src->shared->dt);
- HDassert(src_oloc_dt);
+ assert(src_oloc_dt);
dst_oloc_dt = H5T_oloc(attr_dst->shared->dt);
- HDassert(dst_oloc_dt);
+ assert(dst_oloc_dt);
/* Reset object location for new object */
H5O_loc_reset(dst_oloc_dt);
@@ -2517,7 +2517,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l
} /* end if */
else
/* Reset value to zero */
- HDmemset(attr_dst->shared->data, 0, attr_dst->shared->data_size);
+ memset(attr_dst->shared->data, 0, attr_dst->shared->data_size);
} /* end if */
done:
@@ -2547,11 +2547,11 @@ H5A__dense_post_copy_file_cb(const H5A_t *attr_src, void *_udata)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(attr_src);
- HDassert(udata);
- HDassert(udata->ainfo);
- HDassert(udata->file);
- HDassert(udata->cpy_info);
+ assert(attr_src);
+ assert(udata);
+ assert(udata->ainfo);
+ assert(udata->file);
+ assert(udata->cpy_info);
if (NULL ==
(attr_dst = H5A__attr_copy_file(attr_src, udata->file, udata->recompute_size, udata->cpy_info)))
@@ -2605,8 +2605,8 @@ H5A__dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainf
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(ainfo_src);
- HDassert(ainfo_dst);
+ assert(ainfo_src);
+ assert(ainfo_dst);
udata.ainfo = ainfo_dst; /* Destination dense information */
udata.file = dst_oloc->file; /* Destination file */
diff --git a/src/H5Atest.c b/src/H5Atest.c
index 803d3cd..cb7671d 100644
--- a/src/H5Atest.c
+++ b/src/H5Atest.c
@@ -128,7 +128,7 @@ H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
api_ctx_pushed = TRUE;
/* Sanity check */
- HDassert(H5O_msg_is_shared(H5O_ATTR_ID, attr));
+ assert(H5O_msg_is_shared(H5O_ATTR_ID, attr));
/* Retrieve ref count for shared or shareable attribute */
if (H5SM_get_refcount(attr->oloc.file, H5O_ATTR_ID, &attr->sh_loc, ref_count) < 0)
diff --git a/src/H5B.c b/src/H5B.c
index 596a05d..881abb0 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -211,16 +211,16 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(addr_p);
+ assert(f);
+ assert(type);
+ assert(addr_p);
/*
* Allocate file and memory data structures.
*/
if (NULL == (bt = H5FL_MALLOC(H5B_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
- HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&bt->cache_info, 0, sizeof(H5AC_info_t));
bt->level = 0;
bt->left = HADDR_UNDEF;
bt->right = HADDR_UNDEF;
@@ -229,7 +229,7 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
H5UC_INC(bt->rc_shared);
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
+ assert(shared);
if (NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
@@ -298,18 +298,18 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void *
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(type->decode);
- HDassert(type->cmp3);
- HDassert(type->found);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(type);
+ assert(type->decode);
+ assert(type->cmp3);
+ assert(type->found);
+ assert(H5F_addr_defined(addr));
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/*
* Perform a binary search to locate the child which contains
@@ -338,7 +338,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void *
/*
* Follow the link to the subtree or to the data node.
*/
- HDassert(idx < bt->nchildren);
+ assert(idx < bt->nchildren);
if (bt->level > 0) {
if ((ret_value = H5B_find(f, type, bt->child[idx], found, udata)) < 0)
@@ -392,19 +392,19 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(bt_ud);
- HDassert(bt_ud->bt);
- HDassert(H5F_addr_defined(bt_ud->addr));
- HDassert(split_bt_ud);
- HDassert(!split_bt_ud->bt);
+ assert(f);
+ assert(bt_ud);
+ assert(bt_ud->bt);
+ assert(H5F_addr_defined(bt_ud->addr));
+ assert(split_bt_ud);
+ assert(!split_bt_ud->bt);
/*
* Initialize variables.
*/
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt_ud->bt->rc_shared);
- HDassert(shared);
- HDassert(bt_ud->bt->nchildren == shared->two_k);
+ assert(shared);
+ assert(bt_ud->bt->nchildren == shared->two_k);
/* Get B-tree split ratios */
if (H5CX_get_btree_split_ratios(split_ratios) < 0)
@@ -422,8 +422,8 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_
side = "LEFT";
else
side = "MIDDLE";
- HDfprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s", shared->two_k, split_ratios[0],
- split_ratios[1], split_ratios[2], side);
+ fprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s", shared->two_k, split_ratios[0],
+ split_ratios[1], split_ratios[2], side);
}
#endif
@@ -450,7 +450,7 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_
nright = shared->two_k - nleft;
#ifdef H5B_DEBUG
if (H5DEBUG(B))
- HDfprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
+ fprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
#endif
/*
@@ -503,7 +503,7 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_
} /* end if */
bt_ud->bt->right = split_bt_ud->addr;
- HDassert(bt_ud->cache_flags & H5AC__DIRTIED_FLAG);
+ assert(bt_ud->cache_flags & H5AC__DIRTIED_FLAG);
done:
if (ret_value < 0) {
@@ -556,16 +556,16 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(type);
- HDassert(type->sizeof_nkey <= sizeof _lt_key);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(type);
+ assert(type->sizeof_nkey <= sizeof _lt_key);
+ assert(H5F_addr_defined(addr));
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Protect the root node */
cache_udata.f = f;
@@ -583,12 +583,12 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/* Check if the root node split */
if (H5B_INS_NOOP == my_ins) {
/* The root node did not split - just return */
- HDassert(!split_bt_ud.bt);
+ assert(!split_bt_ud.bt);
HGOTO_DONE(SUCCEED)
} /* end if */
- HDassert(H5B_INS_RIGHT == my_ins);
- HDassert(split_bt_ud.bt);
- HDassert(H5F_addr_defined(split_bt_ud.addr));
+ assert(H5B_INS_RIGHT == my_ins);
+ assert(split_bt_ud.bt);
+ assert(H5F_addr_defined(split_bt_ud.addr));
/* Get level of old root */
level = bt_ud.bt->level;
@@ -694,12 +694,12 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5
FUNC_ENTER_PACKAGE_NOERR
- HDassert(bt);
- HDassert(bt_flags);
- HDassert(H5F_addr_defined(child));
+ assert(bt);
+ assert(bt_flags);
+ assert(H5F_addr_defined(child));
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
- HDassert(bt->nchildren < shared->two_k);
+ assert(shared);
+ assert(bt->nchildren < shared->two_k);
/* Check for inserting right-most key into node (common when just appending
* records to an unlimited dimension chunked dataset)
@@ -791,22 +791,22 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
/*
* Check arguments
*/
- HDassert(f);
- HDassert(bt_ud);
- HDassert(bt_ud->bt);
- HDassert(H5F_addr_defined(bt_ud->addr));
- HDassert(type);
- HDassert(type->decode);
- HDassert(type->cmp3);
- HDassert(type->new_node);
- HDassert(lt_key);
- HDassert(lt_key_changed);
- HDassert(rt_key);
- HDassert(rt_key_changed);
- HDassert(split_bt_ud);
- HDassert(!split_bt_ud->bt);
- HDassert(!H5F_addr_defined(split_bt_ud->addr));
- HDassert(split_bt_ud->cache_flags == H5AC__NO_FLAGS_SET);
+ assert(f);
+ assert(bt_ud);
+ assert(bt_ud->bt);
+ assert(H5F_addr_defined(bt_ud->addr));
+ assert(type);
+ assert(type->decode);
+ assert(type->cmp3);
+ assert(type->new_node);
+ assert(lt_key);
+ assert(lt_key_changed);
+ assert(rt_key);
+ assert(rt_key_changed);
+ assert(split_bt_ud);
+ assert(!split_bt_ud->bt);
+ assert(!H5F_addr_defined(split_bt_ud->addr));
+ assert(split_bt_ud->cache_flags == H5AC__NO_FLAGS_SET);
bt = bt_ud->bt;
@@ -817,7 +817,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/*
* Use a binary search to find the child that will receive the new
@@ -844,7 +844,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
* The value being inserted will be the only value in this tree. We
* must necessarily be at level zero.
*/
- HDassert(0 == bt->level);
+ assert(0 == bt->level);
if ((type->new_node)(f, H5B_INS_FIRST, H5B_NKEY(bt, shared, 0), udata, H5B_NKEY(bt, shared, 1),
bt->child + 0 /*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node")
@@ -965,7 +965,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
* We couldn't figure out which branch to follow out of this node. THIS
* IS A MAJOR PROBLEM THAT NEEDS TO BE FIXED --rpm.
*/
- HDassert("INTERNAL HDF5 ERROR (contact rpm)" && 0);
+ assert("INTERNAL HDF5 ERROR (contact rpm)" && 0);
#ifdef NDEBUG
HDabort();
#endif /* NDEBUG */
@@ -974,7 +974,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
/*
* Follow a branch out of this node to another subtree.
*/
- HDassert(idx < bt->nchildren);
+ assert(idx < bt->nchildren);
child_bt_ud.addr = bt->child[idx];
if (NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, H5AC_BT, child_bt_ud.addr, &cache_udata,
H5AC__NO_FLAGS_SET)))
@@ -989,13 +989,13 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
/*
* Follow a branch out of this node to a leaf node of some other type.
*/
- HDassert(idx < bt->nchildren);
+ assert(idx < bt->nchildren);
if ((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx), lt_key_changed,
md_key, udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed,
&new_child_bt_ud.addr /*out*/)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert leaf node")
}
- HDassert((int)my_ins >= 0);
+ assert((int)my_ins >= 0);
/*
* Update the left and right keys of the current node.
@@ -1003,8 +1003,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (*lt_key_changed) {
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
if (idx > 0) {
- HDassert(type->critical_key == H5B_LEFT);
- HDassert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
+ assert(type->critical_key == H5B_LEFT);
+ assert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
*lt_key_changed = FALSE;
} /* end if */
else
@@ -1013,8 +1013,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (*rt_key_changed) {
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
if (idx + 1 < bt->nchildren) {
- HDassert(type->critical_key == H5B_RIGHT);
- HDassert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
+ assert(type->critical_key == H5B_RIGHT);
+ assert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
*rt_key_changed = FALSE;
} /* end if */
else
@@ -1024,13 +1024,13 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
/*
* Handle changes/additions to children
*/
- HDassert(!(bt->level == 0) != !(child_bt_ud.bt));
+ assert(!(bt->level == 0) != !(child_bt_ud.bt));
if (H5B_INS_CHANGE == my_ins) {
/*
* The insertion simply changed the address for the child.
*/
- HDassert(!child_bt_ud.bt);
- HDassert(bt->level == 0);
+ assert(!child_bt_ud.bt);
+ assert(bt->level == 0);
bt->child[idx] = new_child_bt_ud.addr;
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
}
@@ -1077,7 +1077,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
* in the new node.
*/
cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata, H5B_NKEY(split_bt_ud->bt, shared, 0));
- HDassert(0 == cmp);
+ assert(0 == cmp);
#endif
} /* end if */
else
@@ -1124,17 +1124,17 @@ H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operato
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
- HDassert(op);
- HDassert(udata);
+ assert(f);
+ assert(type);
+ assert(H5F_addr_defined(addr));
+ assert(op);
+ assert(udata);
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Protect the initial/current node */
cache_udata.f = f;
@@ -1183,11 +1183,11 @@ H5B_iterate(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operator_t op,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
- HDassert(op);
- HDassert(udata);
+ assert(f);
+ assert(type);
+ assert(H5F_addr_defined(addr));
+ assert(op);
+ assert(udata);
/* Iterate over the B-tree records */
if ((ret_value = H5B__iterate_helper(f, type, addr, op, udata)) < 0)
@@ -1236,20 +1236,20 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(type);
- HDassert(type->decode);
- HDassert(type->cmp3);
- HDassert(lt_key && lt_key_changed);
- HDassert(udata);
- HDassert(rt_key && rt_key_changed);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(type);
+ assert(type->decode);
+ assert(type->cmp3);
+ assert(lt_key && lt_key_changed);
+ assert(udata);
+ assert(rt_key && rt_key_changed);
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/*
* Perform a binary search to locate the child which contains the thing
@@ -1276,7 +1276,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
* Follow the link to the subtree or to the data node. The return value
* will be one of H5B_INS_ERROR, H5B_INS_NOOP, or H5B_INS_REMOVE.
*/
- HDassert(idx < bt->nchildren);
+ assert(idx < bt->nchildren);
if (bt->level > 0) {
/* We're at an internal node -- call recursively */
if ((int)(ret_value =
@@ -1315,7 +1315,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
* our right key and indicate that it changed.
*/
if (*lt_key_changed) {
- HDassert(type->critical_key == H5B_LEFT);
+ assert(type->critical_key == H5B_LEFT);
bt_flags |= H5AC__DIRTIED_FLAG;
if (idx > 0)
@@ -1325,7 +1325,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
} /* end if */
if (*rt_key_changed) {
- HDassert(type->critical_key == H5B_RIGHT);
+ assert(type->critical_key == H5B_RIGHT);
bt_flags |= H5AC__DIRTIED_FLAG;
if (idx + 1 < bt->nchildren)
/* Don't propagate change out of this B-tree node */
@@ -1342,8 +1342,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
/* Clients should not change keys when a node is removed. This function
* will handle it as appropriate, based on the value of bt->critical_key
*/
- HDassert(!(*lt_key_changed));
- HDassert(!(*rt_key_changed));
+ assert(!(*lt_key_changed));
+ assert(!(*rt_key_changed));
if (1 == bt->nchildren) {
/*
@@ -1496,8 +1496,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
/* Patch keys in neighboring trees if necessary */
if (*lt_key_changed && H5F_addr_defined(bt->left)) {
- HDassert(type->critical_key == H5B_LEFT);
- HDassert(level > 0);
+ assert(type->critical_key == H5B_LEFT);
+ assert(level > 0);
/* Update the rightmost key in the left sibling */
if (NULL == (sibling = (H5B_t *)H5AC_protect(f, H5AC_BT, bt->left, &cache_udata, H5AC__NO_FLAGS_SET)))
@@ -1511,8 +1511,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
sibling = NULL; /* Make certain future references will be caught */
} /* end if */
else if (*rt_key_changed && H5F_addr_defined(bt->right)) {
- HDassert(type->critical_key == H5B_RIGHT);
- HDassert(level > 0);
+ assert(type->critical_key == H5B_RIGHT);
+ assert(level > 0);
/* Update the lefttmost key in the right sibling */
if (NULL ==
@@ -1563,10 +1563,10 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(type);
- HDassert(type->sizeof_nkey <= sizeof _lt_key);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(type);
+ assert(type->sizeof_nkey <= sizeof _lt_key);
+ assert(H5F_addr_defined(addr));
/* The actual removal */
if (H5B_INS_ERROR ==
@@ -1606,15 +1606,15 @@ H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(type);
+ assert(H5F_addr_defined(addr));
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Lock this B-tree node into memory for now */
cache_udata.f = f;
@@ -1678,7 +1678,7 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
/*
* Check arguments.
*/
- HDassert(type);
+ assert(type);
/* Allocate space for the shared structure */
if (NULL == (shared = H5FL_CALLOC(H5B_shared_t)))
@@ -1690,17 +1690,17 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
shared->sizeof_addr = H5F_SIZEOF_ADDR(f);
shared->sizeof_len = H5F_SIZEOF_SIZE(f);
shared->sizeof_rkey = sizeof_rkey;
- HDassert(shared->sizeof_rkey);
+ assert(shared->sizeof_rkey);
shared->sizeof_keys = (shared->two_k + 1) * type->sizeof_nkey;
shared->sizeof_rnode = ((size_t)H5B_SIZEOF_HDR(f) + /*node header */
shared->two_k * H5F_SIZEOF_ADDR(f) + /*child pointers */
(shared->two_k + 1) * shared->sizeof_rkey); /*keys */
- HDassert(shared->sizeof_rnode);
+ assert(shared->sizeof_rnode);
/* Allocate and clear shared buffers */
if (NULL == (shared->page = H5FL_BLK_MALLOC(page, shared->sizeof_rnode)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page")
- HDmemset(shared->page, 0, shared->sizeof_rnode);
+ memset(shared->page, 0, shared->sizeof_rnode);
if (NULL == (shared->nkey = H5FL_SEQ_MALLOC(size_t, (size_t)(shared->two_k + 1))))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys")
@@ -1782,9 +1782,9 @@ H5B__copy(const H5B_t *old_bt)
/*
* Check arguments.
*/
- HDassert(old_bt);
+ assert(old_bt);
shared = (H5B_shared_t *)H5UC_GET_OBJ(old_bt->rc_shared);
- HDassert(shared);
+ assert(shared);
/* Allocate memory for the new H5B_t object */
if (NULL == (new_node = H5FL_MALLOC(H5B_t)))
@@ -1794,7 +1794,7 @@ H5B__copy(const H5B_t *old_bt)
H5MM_memcpy(new_node, old_bt, sizeof(H5B_t));
/* Reset cache info */
- HDmemset(&new_node->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&new_node->cache_info, 0, sizeof(H5AC_info_t));
if (NULL == (new_node->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
NULL == (new_node->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
@@ -1852,18 +1852,18 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
- HDassert(info_udata);
- HDassert(info_udata->bt_info);
- HDassert(info_udata->udata);
+ assert(f);
+ assert(type);
+ assert(H5F_addr_defined(addr));
+ assert(info_udata);
+ assert(info_udata->bt_info);
+ assert(info_udata->udata);
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, info_udata->udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Get the raw node size for iteration */
sizeof_rnode = shared->sizeof_rnode;
@@ -1950,14 +1950,14 @@ H5B_get_info(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_info_t *bt_inf
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(bt_info);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata);
+ assert(f);
+ assert(type);
+ assert(bt_info);
+ assert(H5F_addr_defined(addr));
+ assert(udata);
/* Portably initialize B-tree info struct */
- HDmemset(bt_info, 0, sizeof(*bt_info));
+ memset(bt_info, 0, sizeof(*bt_info));
/* Set up internal user-data for the B-tree 'get info' helper routine */
info_udata.bt_info = bt_info;
@@ -2002,8 +2002,8 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
+ assert(f);
+ assert(type);
if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "address is undefined")
@@ -2011,7 +2011,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, NULL)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- HDassert(H5UC_GET_OBJ(rc_shared) != NULL);
+ assert(H5UC_GET_OBJ(rc_shared) != NULL);
/*
* Load the tree node.
@@ -2049,8 +2049,8 @@ H5B__node_dest(H5B_t *bt)
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(bt);
- HDassert(bt->rc_shared);
+ assert(bt);
+ assert(bt->rc_shared);
bt->child = H5FL_SEQ_FREE(haddr_t, bt->child);
bt->native = H5FL_BLK_FREE(native_block, bt->native);
diff --git a/src/H5B2.c b/src/H5B2.c
index 7781eab..cdb0ef9 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -132,8 +132,8 @@ H5B2_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* H5B2 interface sanity check */
HDcompile_assert(H5B2_NUM_BTREE_ID == NELMTS(H5B2_client_class_g));
@@ -200,8 +200,8 @@ H5B2_open(H5F_t *f, haddr_t addr, void *ctx_udata)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Look up the B-tree header */
if (NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__READ_ONLY_FLAG)))
@@ -263,8 +263,8 @@ H5B2_insert(H5B2_t *bt2, void *udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(udata);
+ assert(bt2);
+ assert(udata);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -305,8 +305,8 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(udata);
+ assert(bt2);
+ assert(udata);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -333,7 +333,7 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
} /* end else */
/* Sanity check */
- HDassert(H5B2_UPDATE_UNKNOWN != status);
+ assert(H5B2_UPDATE_UNKNOWN != status);
/* Use insert algorithm if nodes to leaf full */
if (H5B2_UPDATE_INSERT_CHILD_FULL == status) {
@@ -347,7 +347,7 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
} /* end else-if */
else {
/* Sanity check */
- HDassert(H5B2_UPDATE_MODIFY_DONE == status);
+ assert(H5B2_UPDATE_MODIFY_DONE == status);
} /* end else */
done:
@@ -374,8 +374,8 @@ H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr_p)
/*
* Check arguments.
*/
- HDassert(bt2);
- HDassert(addr_p);
+ assert(bt2);
+ assert(addr_p);
/* Retrieve the header address for this v2 B-tree */
*addr_p = bt2->hdr->addr;
@@ -408,8 +408,8 @@ H5B2_iterate(H5B2_t *bt2, H5B2_operator_t op, void *op_data)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -463,8 +463,8 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(found);
+ assert(bt2);
+ assert(found);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -686,7 +686,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -723,8 +723,8 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -845,7 +845,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
} /* end if */
else
/* Index that is greater than the number of records in the tree? */
- HDassert(0 && "Index off end of tree??");
+ assert(0 && "Index off end of tree??");
} /* end if */
/* Decrement depth we're at in B-tree */
@@ -867,7 +867,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
} /* end if */
/* Sanity check index */
- HDassert(idx < leaf->nrec);
+ assert(idx < leaf->nrec);
/* Make callback for correct record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) {
@@ -885,7 +885,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -914,7 +914,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -946,7 +946,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't destroy node's node pointer block factory")
- HDassert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
+ assert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
hdr->depth = (uint16_t)(hdr->depth - depth_decreased);
} /* end for */
} /* end if */
@@ -987,7 +987,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -1027,7 +1027,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't destroy node's node pointer block factory")
- HDassert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
+ assert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
hdr->depth = (uint16_t)(hdr->depth - depth_decreased);
} /* end for */
} /* end if */
@@ -1065,8 +1065,8 @@ H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(bt2);
- HDassert(nrec);
+ assert(bt2);
+ assert(nrec);
/* Get B-tree number of records */
*nrec = bt2->hdr->root.all_nrec;
@@ -1107,8 +1107,8 @@ H5B2_neighbor(H5B2_t *bt2, H5B2_compare_t range, void *udata, H5B2_found_t op, v
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -1169,8 +1169,8 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -1263,7 +1263,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
/* Make callback for current record */
if ((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
/* Unlock current node */
if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) <
@@ -1331,7 +1331,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
/* Make callback for current record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
/* Unlock current node */
if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
@@ -1375,7 +1375,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -1405,8 +1405,8 @@ H5B2_close(H5B2_t *bt2)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(bt2);
- HDassert(bt2->f);
+ assert(bt2);
+ assert(bt2->f);
/* Decrement file reference & check if this is the last open v2 B-tree using the shared B-tree header */
if (0 == H5B2__hdr_fuse_decr(bt2->hdr)) {
@@ -1428,7 +1428,7 @@ H5B2_close(H5B2_t *bt2)
H5B2_hdr_t *hdr; /* Another pointer to v2 B-tree header */
/* Sanity check */
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
#ifndef NDEBUG
{
@@ -1441,9 +1441,9 @@ H5B2_close(H5B2_t *bt2)
(unsigned long long)bt2_addr)
/* Sanity checks on header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PINNED);
- HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PINNED);
+ assert(!(hdr_status & H5AC_ES__IS_PROTECTED));
}
#endif /* NDEBUG */
@@ -1515,8 +1515,8 @@ H5B2_delete(H5F_t *f, haddr_t addr, void *ctx_udata, H5B2_remove_t op, void *op_
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Lock the v2 B-tree header into memory */
if (NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__NO_FLAGS_SET)))
@@ -1572,10 +1572,10 @@ H5B2_depend(H5B2_t *bt2, H5AC_proxy_entry_t *parent)
/*
* Check arguments.
*/
- HDassert(bt2);
- HDassert(hdr);
- HDassert(parent);
- HDassert(hdr->parent == NULL || hdr->parent == parent);
+ assert(bt2);
+ assert(hdr);
+ assert(parent);
+ assert(hdr->parent == NULL || hdr->parent == parent);
/*
* Check to see if the flush dependency between the parent
@@ -1584,7 +1584,7 @@ H5B2_depend(H5B2_t *bt2, H5AC_proxy_entry_t *parent)
*/
if (NULL == hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Set the shared v2 B-tree header's file context for this operation */
hdr->f = bt2->f;
@@ -1619,8 +1619,8 @@ H5B2_patch_file(H5B2_t *bt2, H5F_t *f)
/*
* Check arguments.
*/
- HDassert(bt2);
- HDassert(f);
+ assert(bt2);
+ assert(f);
if (bt2->f != f || bt2->hdr->f != f)
bt2->f = bt2->hdr->f = f;
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 07c6cdf..a3968e5 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -167,9 +167,9 @@ H5B2__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = H5B2_HEADER_SIZE_FILE(udata->f);
@@ -201,7 +201,7 @@ H5B2__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -241,15 +241,15 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate new B-tree header and reset cache info */
if (NULL == (hdr = H5B2__hdr_alloc(udata->f)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "allocation failed for B-tree header")
/* Magic number */
- if (HDmemcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature")
image += H5_SIZEOF_MAGIC;
@@ -286,7 +286,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == hdr->hdr_size);
+ assert((size_t)(image - (const uint8_t *)_image) == hdr->hdr_size);
/* Initialize B-tree header info */
cparam.cls = H5B2_client_class_g[id];
@@ -297,7 +297,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
hdr->addr = udata->addr;
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
/* Set return value */
ret_value = hdr;
@@ -330,8 +330,8 @@ H5B2__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(image_len);
+ assert(hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = hdr->hdr_size;
@@ -361,9 +361,9 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(hdr);
+ assert(f);
+ assert(image);
+ assert(hdr);
/* Magic number */
H5MM_memcpy(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -373,7 +373,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5B2_HDR_VERSION;
/* B-tree type */
- HDassert(hdr->cls->id <= 255);
+ assert(hdr->cls->id <= 255);
*image++ = (uint8_t)hdr->cls->id;
/* Node size (in bytes) */
@@ -403,7 +403,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2__cache_hdr_serialize() */
@@ -431,7 +431,7 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check if the file was opened with SWMR-write access */
if (hdr->swmr_write) {
@@ -462,7 +462,7 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
*/
if (hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Destroy flush dependency on object header proxy */
if (H5AC_proxy_entry_remove_child((H5AC_proxy_entry_t *)hdr->parent,
@@ -486,12 +486,12 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == hdr->parent);
+ assert(NULL == hdr->parent);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -518,7 +518,7 @@ H5B2__cache_hdr_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Destroy v2 B-tree header */
if (H5B2__hdr_free((H5B2_hdr_t *)thing) < 0)
@@ -548,9 +548,9 @@ H5B2__cache_int_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = udata->hdr->node_size;
@@ -584,8 +584,8 @@ H5B2__cache_int_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, voi
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Internal node prefix header + records + child pointer triplets: size with checksum at the end */
chk_size = H5B2_INT_PREFIX_SIZE + (udata->nrec * udata->hdr->rrec_size) +
@@ -630,8 +630,8 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate new internal node and reset cache info */
if (NULL == (internal = H5FL_CALLOC(H5B2_internal_t)))
@@ -647,7 +647,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
internal->shadow_epoch = udata->hdr->shadow_epoch;
/* Magic number */
- if (HDmemcmp(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node signature")
image += H5_SIZEOF_MAGIC;
@@ -710,7 +710,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
UINT32DECODE(image, stored_chksum);
/* Sanity check parsing */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
/* Set return value */
ret_value = internal;
@@ -744,9 +744,9 @@ H5B2__cache_int_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(internal);
- HDassert(internal->hdr);
- HDassert(image_len);
+ assert(internal);
+ assert(internal->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = internal->hdr->node_size;
@@ -780,10 +780,10 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(internal);
- HDassert(internal->hdr);
+ assert(f);
+ assert(image);
+ assert(internal);
+ assert(internal->hdr);
/* Magic number */
H5MM_memcpy(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -793,9 +793,9 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5B2_INT_VERSION;
/* B-tree type */
- HDassert(internal->hdr->cls->id <= 255);
+ assert(internal->hdr->cls->id <= 255);
*image++ = (uint8_t)internal->hdr->cls->id;
- HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
+ assert((size_t)(image - (uint8_t *)_image) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
/* Serialize records for internal node */
native = internal->int_native;
@@ -830,10 +830,10 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= len);
+ assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of internal node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -862,8 +862,8 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing)
/*
* Check arguments.
*/
- HDassert(internal);
- HDassert(internal->hdr);
+ assert(internal);
+ assert(internal->hdr);
/* Check if the file was opened with SWMR-write access */
if (internal->hdr->swmr_write) {
@@ -904,12 +904,12 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == internal->top_proxy);
+ assert(NULL == internal->top_proxy);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -937,7 +937,7 @@ H5B2__cache_int_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(internal);
+ assert(internal);
/* Release v2 B-tree internal node */
if (H5B2__internal_free(internal) < 0)
@@ -967,9 +967,9 @@ H5B2__cache_leaf_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = udata->hdr->node_size;
@@ -1003,8 +1003,8 @@ H5B2__cache_leaf_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Leaf node prefix header + records: size with checksum at the end */
chk_size = H5B2_LEAF_PREFIX_SIZE + (udata->nrec * udata->hdr->rrec_size);
@@ -1046,8 +1046,8 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate new leaf node and reset cache info */
if (NULL == (leaf = H5FL_CALLOC(H5B2_leaf_t)))
@@ -1063,7 +1063,7 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
leaf->shadow_epoch = udata->hdr->shadow_epoch;
/* Magic number */
- if (HDmemcmp(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree leaf node signature")
image += H5_SIZEOF_MAGIC;
@@ -1100,10 +1100,10 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
UINT32DECODE(image, stored_chksum);
/* Sanity check parsing */
- HDassert((size_t)(image - (const uint8_t *)_image) <= udata->hdr->node_size);
+ assert((size_t)(image - (const uint8_t *)_image) <= udata->hdr->node_size);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
/* Set return value */
ret_value = leaf;
@@ -1136,9 +1136,9 @@ H5B2__cache_leaf_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(leaf);
- HDassert(leaf->hdr);
- HDassert(image_len);
+ assert(leaf);
+ assert(leaf->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = leaf->hdr->node_size;
@@ -1172,10 +1172,10 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(leaf);
- HDassert(leaf->hdr);
+ assert(f);
+ assert(image);
+ assert(leaf);
+ assert(leaf->hdr);
/* magic number */
H5MM_memcpy(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -1185,9 +1185,9 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
*image++ = H5B2_LEAF_VERSION;
/* B-tree type */
- HDassert(leaf->hdr->cls->id <= 255);
+ assert(leaf->hdr->cls->id <= 255);
*image++ = (uint8_t)leaf->hdr->cls->id;
- HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
+ assert((size_t)(image - (uint8_t *)_image) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
/* Serialize records for leaf node */
native = leaf->leaf_native;
@@ -1209,10 +1209,10 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= len);
+ assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of leaf node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1241,8 +1241,8 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing)
/*
* Check arguments.
*/
- HDassert(leaf);
- HDassert(leaf->hdr);
+ assert(leaf);
+ assert(leaf->hdr);
/* Check if the file was opened with SWMR-write access */
if (leaf->hdr->swmr_write) {
@@ -1283,12 +1283,12 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == leaf->top_proxy);
+ assert(NULL == leaf->top_proxy);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1316,7 +1316,7 @@ H5B2__cache_leaf_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(leaf);
+ assert(leaf);
/* Destroy v2 B-tree leaf node */
if (H5B2__leaf_free(leaf) < 0)
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 8e01898..79819f7 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -89,13 +89,13 @@ H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(type);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(type);
/* Load the B-tree header */
if (NULL == (hdr = H5B2__hdr_protect(f, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -105,34 +105,33 @@ H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
hdr->f = f;
/* Print opening message */
- HDfprintf(stream, "%*sv2 B-tree Header...\n", indent, "");
+ fprintf(stream, "%*sv2 B-tree Header...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
- (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:", hdr->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Depth:", hdr->depth);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of records in tree:", hdr->root.all_nrec);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of records in root node:", hdr->root.node_nrec);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of root node:", hdr->root.addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Split percent:", hdr->split_percent);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Merge percent:", hdr->merge_percent);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
+ (unsigned)hdr->cls->id);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Dirty flag:", hdr->cache_info.is_dirty ? "True" : "False");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Depth:", hdr->depth);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of records in tree:", hdr->root.all_nrec);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of records in root node:", hdr->root.node_nrec);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of root node:", hdr->root.addr);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Split percent:", hdr->split_percent);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Merge percent:", hdr->merge_percent);
/* Print relevant node info */
- HDfprintf(stream, "%*sNode Info: (max_nrec/split_nrec/merge_nrec)\n", indent, "");
+ fprintf(stream, "%*sNode Info: (max_nrec/split_nrec/merge_nrec)\n", indent, "");
for (u = 0; u < (unsigned)(hdr->depth + 1); u++) {
HDsnprintf(temp_str, sizeof(temp_str), "Depth %u:", u);
- HDfprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str,
- hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec);
+ fprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str,
+ hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec);
} /* end for */
done:
@@ -170,15 +169,15 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(type);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(nrec > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(type);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(nrec > 0);
/* Load the B-tree header */
if (NULL == (hdr = H5B2__hdr_protect(f, hdr_addr, f, H5AC__READ_ONLY_FLAG)))
@@ -198,41 +197,41 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
/* Print opening message */
- HDfprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, "");
+ fprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
- (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:", internal->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", internal->nrec);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
+ (unsigned)hdr->cls->id);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Dirty flag:", internal->cache_info.is_dirty ? "True" : "False");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", internal->nrec);
/* Print all node pointers and records */
for (u = 0; u < internal->nrec; u++) {
/* Print node pointer */
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
- HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
- internal->node_ptrs[u].addr);
+ fprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
+ temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
+ internal->node_ptrs[u].addr);
/* Print record */
HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
- HDassert(H5B2_INT_NREC(internal, hdr, u));
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ assert(H5B2_INT_NREC(internal, hdr, u));
(void)(type->debug)(stream, indent + 6, MAX(0, fwidth - 6), H5B2_INT_NREC(internal, hdr, u),
hdr->cb_ctx);
} /* end for */
/* Print final node pointer */
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
- HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
- internal->node_ptrs[u].addr);
+ fprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
+ temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
+ internal->node_ptrs[u].addr);
done:
if (hdr && H5B2__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
@@ -271,15 +270,15 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(type);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(nrec > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(type);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(nrec > 0);
/* Load the B-tree header */
if (NULL == (hdr = H5B2__hdr_protect(f, hdr_addr, f, H5AC__READ_ONLY_FLAG)))
@@ -298,26 +297,26 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Print opening message */
- HDfprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, "");
+ fprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
- (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:", leaf->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", leaf->nrec);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
+ (unsigned)hdr->cls->id);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Dirty flag:", leaf->cache_info.is_dirty ? "True" : "False");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", leaf->nrec);
/* Print all node pointers and records */
for (u = 0; u < leaf->nrec; u++) {
/* Print record */
HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
- HDassert(H5B2_LEAF_NREC(leaf, hdr, u));
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ assert(H5B2_LEAF_NREC(leaf, hdr, u));
(void)(type->debug)(stream, indent + 6, MAX(0, fwidth - 6), H5B2_LEAF_NREC(leaf, hdr, u),
hdr->cb_ctx);
} /* end for */
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index 270789f..afc9fe6 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -108,16 +108,16 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(cparam);
- HDassert(cparam->cls);
- HDassert((cparam->cls->crt_context && cparam->cls->dst_context) ||
- (NULL == cparam->cls->crt_context && NULL == cparam->cls->dst_context));
- HDassert(cparam->node_size > 0);
- HDassert(cparam->rrec_size > 0);
- HDassert(cparam->merge_percent > 0 && cparam->merge_percent <= 100);
- HDassert(cparam->split_percent > 0 && cparam->split_percent <= 100);
- HDassert(cparam->merge_percent < (cparam->split_percent / 2));
+ assert(hdr);
+ assert(cparam);
+ assert(cparam->cls);
+ assert((cparam->cls->crt_context && cparam->cls->dst_context) ||
+ (NULL == cparam->cls->crt_context && NULL == cparam->cls->dst_context));
+ assert(cparam->node_size > 0);
+ assert(cparam->rrec_size > 0);
+ assert(cparam->merge_percent > 0 && cparam->merge_percent <= 100);
+ assert(cparam->split_percent > 0 && cparam->split_percent <= 100);
+ assert(cparam->merge_percent < (cparam->split_percent / 2));
/* Assign dynamic information */
hdr->depth = depth;
@@ -134,7 +134,7 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
/* Allocate "page" for node I/O */
if (NULL == (hdr->page = H5FL_BLK_MALLOC(node_page, hdr->node_size)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(hdr->page, 0, hdr->node_size);
+ memset(hdr->page, 0, hdr->node_size);
/* Allocate array of node info structs */
if (NULL == (hdr->node_info = H5FL_SEQ_MALLOC(H5B2_node_info_t, (size_t)(hdr->depth + 1))))
@@ -166,14 +166,14 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
/* (uses leaf # of records because its the largest) */
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[0].max_nrec);
H5_CHECKED_ASSIGN(hdr->max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
- HDassert(hdr->max_nrec_size <= H5B2_SIZEOF_RECORDS_PER_NODE);
+ assert(hdr->max_nrec_size <= H5B2_SIZEOF_RECORDS_PER_NODE);
/* Initialize internal node info */
if (depth > 0) {
for (u = 1; u < (unsigned)(depth + 1); u++) {
sz_max_nrec = H5B2_NUM_INT_REC(hdr, u);
H5_CHECKED_ASSIGN(hdr->node_info[u].max_nrec, unsigned, sz_max_nrec, size_t)
- HDassert(hdr->node_info[u].max_nrec <= hdr->node_info[u - 1].max_nrec);
+ assert(hdr->node_info[u].max_nrec <= hdr->node_info[u - 1].max_nrec);
hdr->node_info[u].split_nrec = (hdr->node_info[u].max_nrec * hdr->split_percent) / 100;
hdr->node_info[u].merge_nrec = (hdr->node_info[u].max_nrec * hdr->merge_percent) / 100;
@@ -237,7 +237,7 @@ H5B2__hdr_alloc(H5F_t *f)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
/* Allocate space for the shared information */
if (NULL == (hdr = H5FL_CALLOC(H5B2_hdr_t)))
@@ -282,8 +282,8 @@ H5B2__hdr_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* Allocate v2 B-tree header */
if (NULL == (hdr = H5B2__hdr_alloc(f)))
@@ -358,7 +358,7 @@ H5B2__hdr_incr(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as un-evictable when a B-tree node is depending on it */
if (hdr->rc == 0)
@@ -392,8 +392,8 @@ H5B2__hdr_decr(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->rc > 0);
+ assert(hdr);
+ assert(hdr->rc > 0);
/* Decrement reference count on B-tree header */
hdr->rc--;
@@ -425,7 +425,7 @@ H5B2__hdr_fuse_incr(H5B2_hdr_t *hdr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Increment file reference count on shared header */
hdr->file_rc++;
@@ -451,8 +451,8 @@ H5B2__hdr_fuse_decr(H5B2_hdr_t *hdr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->file_rc);
+ assert(hdr);
+ assert(hdr->file_rc);
/* Decrement file reference count on shared header */
hdr->file_rc--;
@@ -480,7 +480,7 @@ H5B2__hdr_dirty(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark B-tree header as dirty in cache */
if (H5AC_mark_entry_dirty(hdr) < 0)
@@ -512,11 +512,11 @@ H5B2__hdr_protect(H5F_t *f, haddr_t hdr_addr, void *ctx_udata, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(hdr_addr));
+ assert(f);
+ assert(H5F_addr_defined(hdr_addr));
/* only the H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for cache callbacks */
udata.f = f;
@@ -575,7 +575,7 @@ H5B2__hdr_unprotect(H5B2_hdr_t *hdr, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Unprotect the header */
if (H5AC_unprotect(hdr->f, H5AC_BT2_HDR, hdr->addr, hdr, cache_flags) < 0)
@@ -606,7 +606,7 @@ H5B2__hdr_free(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Destroy the callback context */
if (hdr->cb_ctx) {
@@ -684,7 +684,7 @@ H5B2__hdr_delete(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
#ifndef NDEBUG
{
@@ -696,8 +696,8 @@ H5B2__hdr_delete(H5B2_hdr_t *hdr)
"unable to check metadata cache status for v2 B-tree header")
/* Sanity checks on v2 B-tree header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PROTECTED);
} /* end block */
#endif /* NDEBUG */
diff --git a/src/H5B2int.c b/src/H5B2int.c
index bac42a2..c7fe3fd 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -153,9 +153,9 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
+ assert(hdr);
+ assert(internal);
+ assert(internal_flags_ptr);
/* Slide records in parent node up one space, to make room for promoted record */
if (idx < internal->nrec) {
@@ -350,7 +350,7 @@ H5B2__split_root(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
+ assert(hdr);
/* Update depth of B-tree */
hdr->depth++;
@@ -437,8 +437,8 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(internal);
+ assert(hdr);
+ assert(internal);
/* Check for the kind of B-tree node to redistribute */
if (depth > 1) {
@@ -582,7 +582,7 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
(uint16_t)(*left_nrec - new_left_nrec); /* Number of records to move from left node to right */
/* Sanity check */
- HDassert(*left_nrec > *right_nrec);
+ assert(*left_nrec > *right_nrec);
/* Slide records in right node up */
HDmemmove(H5B2_NAT_NREC(right_native, hdr, move_nrec), H5B2_NAT_NREC(right_native, hdr, 0),
@@ -716,9 +716,9 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
+ assert(hdr);
+ assert(internal);
+ assert(internal_flags_ptr);
/* Check for the kind of B-tree node to redistribute */
if (depth > 1) {
@@ -806,8 +806,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
uint16_t curr_middle_nrec = *middle_nrec;
/* Sanity check rounding */
- HDassert(new_middle_nrec <= new_left_nrec);
- HDassert(new_middle_nrec <= new_right_nrec);
+ assert(new_middle_nrec <= new_left_nrec);
+ assert(new_middle_nrec <= new_right_nrec);
/* Move records into left node */
if (new_left_nrec > *left_nrec) {
@@ -1135,10 +1135,10 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(internal);
+ assert(internal_flags_ptr);
/* Check for the kind of B-tree node to split */
if (depth > 1) {
@@ -1317,10 +1317,10 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(internal);
+ assert(internal_flags_ptr);
/* Check for the kind of B-tree node to split */
if (depth > 1) {
@@ -1565,8 +1565,8 @@ H5B2__insert(H5B2_hdr_t *hdr, void *udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(udata);
+ assert(hdr);
+ assert(udata);
/* Check if the root node is allocated yet */
if (!H5F_addr_defined(hdr->root.addr)) {
@@ -1631,9 +1631,9 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node);
- HDassert(op);
+ assert(hdr);
+ assert(curr_node);
+ assert(op);
/* Protect current node & set up variables */
if (depth > 0) {
@@ -1748,8 +1748,8 @@ H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, v
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node);
+ assert(hdr);
+ assert(curr_node);
if (depth > 0) {
H5B2_internal_t *internal; /* Pointer to internal node */
@@ -1830,10 +1830,10 @@ H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, voi
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node);
- HDassert(btree_size);
- HDassert(depth > 0);
+ assert(hdr);
+ assert(curr_node);
+ assert(btree_size);
+ assert(depth > 0);
/* Lock the current B-tree node */
if (NULL ==
@@ -1883,8 +1883,8 @@ H5B2__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Create a flush dependency between parent and child entry */
if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0)
@@ -1918,11 +1918,11 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(node_ptr);
- HDassert(old_parent);
- HDassert(new_parent);
+ assert(hdr);
+ assert(depth > 0);
+ assert(node_ptr);
+ assert(old_parent);
+ assert(new_parent);
/* Check the node's entry status in the metadata cache */
if (H5AC_get_entry_status(hdr->f, node_ptr->addr, &node_status) < 0)
@@ -1949,7 +1949,7 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
update_deps = TRUE;
} /* end if */
else
- HDassert(child_int->parent == new_parent);
+ assert(child_int->parent == new_parent);
} /* end if */
else {
H5B2_leaf_t *child_leaf;
@@ -1966,13 +1966,13 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
update_deps = TRUE;
} /* end if */
else
- HDassert(child_leaf->parent == new_parent);
+ assert(child_leaf->parent == new_parent);
} /* end else */
/* Update flush dependencies if necessary */
if (update_deps) {
/* Sanity check */
- HDassert(parent_ptr);
+ assert(parent_ptr);
/* Switch the flush dependency for the node */
if (H5B2__destroy_flush_depend((H5AC_info_t *)old_parent, (H5AC_info_t *)child) < 0)
@@ -2014,12 +2014,12 @@ H5B2__update_child_flush_depends(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(depth > 1);
- HDassert(node_ptrs);
- HDassert(start_idx <= end_idx);
- HDassert(old_parent);
- HDassert(new_parent);
+ assert(hdr);
+ assert(depth > 1);
+ assert(node_ptrs);
+ assert(start_idx <= end_idx);
+ assert(old_parent);
+ assert(new_parent);
/* Loop over children */
for (u = start_idx; u < end_idx; u++)
@@ -2051,8 +2051,8 @@ H5B2__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Destroy a flush dependency between parent and child entry */
if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0)
diff --git a/src/H5B2internal.c b/src/H5B2internal.c
index 312dee0..381ef03 100644
--- a/src/H5B2internal.c
+++ b/src/H5B2internal.c
@@ -90,9 +90,9 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(node_ptr);
- HDassert(depth > 0);
+ assert(hdr);
+ assert(node_ptr);
+ assert(depth > 0);
/* Allocate memory for internal node information */
if (NULL == (internal = H5FL_CALLOC(H5B2_internal_t)))
@@ -109,14 +109,14 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
if (NULL == (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].nat_rec_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for B-tree internal native keys")
- HDmemset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
+ memset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
/* Allocate space for the node pointers in memory */
if (NULL ==
(internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].node_ptr_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for B-tree internal node pointers")
- HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
+ memset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
/* Set depth of the node */
internal->depth = depth;
@@ -190,13 +190,13 @@ H5B2__protect_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(node_ptr);
- HDassert(H5F_addr_defined(node_ptr->addr));
- HDassert(depth > 0);
+ assert(hdr);
+ assert(node_ptr);
+ assert(H5F_addr_defined(node_ptr->addr));
+ assert(depth > 0);
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for callback */
udata.f = hdr->f;
@@ -289,11 +289,11 @@ H5B2__neighbor_internal(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_n
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
- HDassert(op);
+ assert(hdr);
+ assert(depth > 0);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(op);
/* Lock current B-tree node */
if (NULL ==
@@ -313,7 +313,7 @@ H5B2__neighbor_internal(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_n
neighbor_loc = H5B2_INT_NREC(internal, hdr, idx - 1);
} /* end if */
else {
- HDassert(comp == H5B2_COMPARE_GREATER);
+ assert(comp == H5B2_COMPARE_GREATER);
if (idx < internal->nrec)
neighbor_loc = H5B2_INT_NREC(internal, hdr, idx);
@@ -366,10 +366,10 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(depth > 0);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL ==
@@ -377,7 +377,7 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Sanity check number of records */
- HDassert(internal->nrec == curr_node_ptr->node_nrec);
+ assert(internal->nrec == curr_node_ptr->node_nrec);
/* Split or redistribute child node pointers, if necessary */
{
@@ -537,10 +537,10 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(depth > 0);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL ==
@@ -548,7 +548,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Sanity check number of records */
- HDassert(internal->nrec == curr_node_ptr->node_nrec);
+ assert(internal->nrec == curr_node_ptr->node_nrec);
/* Locate node pointer for child */
if (H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) <
@@ -562,7 +562,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
/* Make callback for current record */
if ((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL,
"'modify' callback failed for B-tree update operation")
@@ -691,7 +691,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
case H5B2_UPDATE_UNKNOWN:
default:
- HDassert(0 && "Invalid update status");
+ assert(0 && "Invalid update status");
HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "invalid update status")
} /* end switch */
} /* end else */
@@ -746,12 +746,12 @@ H5B2__shadow_internal(H5B2_internal_t *internal, H5B2_node_ptr_t *curr_node_ptr)
/*
* Check arguments.
*/
- HDassert(internal);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(internal);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
hdr = internal->hdr;
- HDassert(hdr);
- HDassert(hdr->swmr_write);
+ assert(hdr);
+ assert(hdr->swmr_write);
/* We only need to shadow the node if it has not been shadowed since the
* last time the header was flushed, as otherwise it will be unreachable by
@@ -819,11 +819,11 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(parent_cache_info);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(depth > 0);
+ assert(parent_cache_info);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (internal = H5B2__protect_internal(hdr, parent_cache_info, curr_node_ptr, depth, FALSE,
@@ -1063,19 +1063,19 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(parent_cache_info);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(depth > 0);
+ assert(parent_cache_info);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (internal = H5B2__protect_internal(hdr, parent_cache_info, curr_node_ptr, depth, FALSE,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
internal_addr = curr_node_ptr->addr;
- HDassert(internal->nrec == curr_node_ptr->node_nrec);
- HDassert(depth == hdr->depth || internal->nrec > 1);
+ assert(internal->nrec == curr_node_ptr->node_nrec);
+ assert(depth == hdr->depth || internal->nrec > 1);
/* Determine the correct number of records to merge at */
merge_nrec = hdr->node_info[depth - 1].merge_nrec;
@@ -1084,7 +1084,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
/* (The root node is the only internal node allowed to have 1 record) */
if (internal->nrec == 1 &&
((internal->node_ptrs[0].node_nrec + internal->node_ptrs[1].node_nrec) <= ((merge_nrec * 2) + 1))) {
- HDassert(depth == hdr->depth);
+ assert(depth == hdr->depth);
/* Merge children of root node */
if (H5B2__merge2(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags,
@@ -1347,7 +1347,7 @@ H5B2__internal_free(H5B2_internal_t *internal)
/*
* Check arguments.
*/
- HDassert(internal);
+ assert(internal);
/* Release internal node's native key buffer */
if (internal->int_native)
@@ -1364,7 +1364,7 @@ H5B2__internal_free(H5B2_internal_t *internal)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header")
/* Sanity check */
- HDassert(NULL == internal->top_proxy);
+ assert(NULL == internal->top_proxy);
/* Free B-tree internal node info */
internal = H5FL_FREE(H5B2_internal_t, internal);
@@ -1395,22 +1395,22 @@ H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_U
uint16_t u, v; /* Local index variables */
/* General sanity checking on node */
- HDassert(internal->nrec <= hdr->node_info->split_nrec);
+ assert(internal->nrec <= hdr->node_info->split_nrec);
/* Sanity checking on node pointers */
tot_all_nrec = internal->nrec;
for (u = 0; u < internal->nrec + 1; u++) {
tot_all_nrec += internal->node_ptrs[u].all_nrec;
- HDassert(H5F_addr_defined(internal->node_ptrs[u].addr));
- HDassert(internal->node_ptrs[u].addr > 0);
+ assert(H5F_addr_defined(internal->node_ptrs[u].addr));
+ assert(internal->node_ptrs[u].addr > 0);
for (v = 0; v < u; v++)
- HDassert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
+ assert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
} /* end for */
/* Sanity check all_nrec total in parent */
if (parent_all_nrec > 0)
- HDassert(tot_all_nrec == parent_all_nrec);
+ assert(tot_all_nrec == parent_all_nrec);
return (0);
} /* end H5B2__assert_internal() */
@@ -1435,24 +1435,24 @@ H5B2__assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_
uint16_t u, v; /* Local index variables */
/* General sanity checking on node */
- HDassert(internal->nrec <= hdr->node_info->split_nrec);
+ assert(internal->nrec <= hdr->node_info->split_nrec);
/* Sanity checking on node pointers */
tot_all_nrec = internal->nrec;
for (u = 0; u < internal->nrec + 1; u++) {
tot_all_nrec += internal->node_ptrs[u].all_nrec;
- HDassert(H5F_addr_defined(internal->node_ptrs[u].addr));
- HDassert(internal->node_ptrs[u].addr > 0);
+ assert(H5F_addr_defined(internal->node_ptrs[u].addr));
+ assert(internal->node_ptrs[u].addr > 0);
for (v = 0; v < u; v++)
- HDassert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
+ assert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
for (v = 0; v < internal2->nrec + 1; v++)
- HDassert(internal->node_ptrs[u].addr != internal2->node_ptrs[v].addr);
+ assert(internal->node_ptrs[u].addr != internal2->node_ptrs[v].addr);
} /* end for */
/* Sanity check all_nrec total in parent */
if (parent_all_nrec > 0)
- HDassert(tot_all_nrec == parent_all_nrec);
+ assert(tot_all_nrec == parent_all_nrec);
return (0);
} /* end H5B2__assert_internal2() */
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index 9bc39de..f9f0024 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -91,8 +91,8 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(node_ptr);
+ assert(hdr);
+ assert(node_ptr);
/* Allocate memory for leaf information */
if (NULL == (leaf = H5FL_CALLOC(H5B2_leaf_t)))
@@ -108,7 +108,7 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr)
/* Allocate space for the native keys in memory */
if (NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[0].nat_rec_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys")
- HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
+ memset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
/* Set parent */
leaf->parent = parent;
@@ -178,12 +178,12 @@ H5B2__protect_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, hbo
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(node_ptr);
- HDassert(H5F_addr_defined(node_ptr->addr));
+ assert(hdr);
+ assert(node_ptr);
+ assert(H5F_addr_defined(node_ptr->addr));
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for callback */
udata.f = hdr->f;
@@ -273,10 +273,10 @@ H5B2__neighbor_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, void *neigh
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
- HDassert(op);
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(op);
/* Lock current B-tree node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG)))
@@ -296,7 +296,7 @@ H5B2__neighbor_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, void *neigh
neighbor_loc = H5B2_LEAF_NREC(leaf, hdr, idx - 1);
} /* end if */
else {
- HDassert(comp == H5B2_COMPARE_GREATER);
+ assert(comp == H5B2_COMPARE_GREATER);
if (idx < leaf->nrec)
neighbor_loc = H5B2_LEAF_NREC(leaf, hdr, idx);
@@ -345,20 +345,20 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Must have a leaf node with enough space to insert a record now */
- HDassert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
+ assert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
/* Sanity check number of records */
- HDassert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
- HDassert(leaf->nrec == curr_node_ptr->node_nrec);
+ assert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
+ assert(leaf->nrec == curr_node_ptr->node_nrec);
/* Check for inserting into empty leaf */
if (leaf->nrec == 0)
@@ -459,17 +459,17 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Sanity check number of records */
- HDassert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
- HDassert(leaf->nrec == curr_node_ptr->node_nrec);
+ assert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
+ assert(leaf->nrec == curr_node_ptr->node_nrec);
/* Check for inserting into empty leaf */
if (leaf->nrec == 0)
@@ -508,7 +508,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s
/* Make callback for current record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL,
"'modify' callback failed for B-tree update operation")
@@ -522,7 +522,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s
} /* end if */
else {
/* Must have a leaf node with enough space to insert a record now */
- HDassert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
+ assert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
/* Make callback to store record in native form */
if ((hdr->cls->store)(H5B2_LEAF_NREC(leaf, hdr, idx), udata) < 0)
@@ -615,10 +615,10 @@ H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsi
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
- HDassert(idx <= internal->nrec);
+ assert(hdr);
+ assert(internal);
+ assert(internal_flags_ptr);
+ assert(idx <= internal->nrec);
/* Check for the kind of B-tree node to swap */
if (depth > 1) {
@@ -706,12 +706,12 @@ H5B2__shadow_leaf(H5B2_leaf_t *leaf, H5B2_node_ptr_t *curr_node_ptr)
/*
* Check arguments.
*/
- HDassert(leaf);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(leaf);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
hdr = leaf->hdr;
- HDassert(hdr);
- HDassert(hdr->swmr_write);
+ assert(hdr);
+ assert(hdr->swmr_write);
/* We only need to shadow the node if it has not been shadowed since the
* last time the header was flushed, as otherwise it will be unreachable by
@@ -773,9 +773,9 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
@@ -783,8 +783,8 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
leaf_addr = curr_node_ptr->addr;
/* Sanity check number of records */
- HDassert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
- HDassert(leaf->nrec == curr_node_ptr->node_nrec);
+ assert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
+ assert(leaf->nrec == curr_node_ptr->node_nrec);
/* Find correct location to remove this record */
if (H5B2__locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0)
@@ -879,9 +879,9 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_n
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock B-tree leaf node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
@@ -889,9 +889,9 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_n
leaf_addr = curr_node_ptr->addr;
/* Sanity check number of records */
- HDassert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
- HDassert(leaf->nrec == curr_node_ptr->node_nrec);
- HDassert(idx < leaf->nrec);
+ assert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
+ assert(leaf->nrec == curr_node_ptr->node_nrec);
+ assert(idx < leaf->nrec);
/* Check for invalidating the min/max record for the tree */
if (H5B2_POS_MIDDLE != curr_pos) {
@@ -977,7 +977,7 @@ H5B2__leaf_free(H5B2_leaf_t *leaf)
/*
* Check arguments.
*/
- HDassert(leaf);
+ assert(leaf);
/* Release leaf's native key buffer */
if (leaf->leaf_native)
@@ -988,7 +988,7 @@ H5B2__leaf_free(H5B2_leaf_t *leaf)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header")
/* Sanity check */
- HDassert(NULL == leaf->top_proxy);
+ assert(NULL == leaf->top_proxy);
/* Free B-tree leaf node info */
leaf = H5FL_FREE(H5B2_leaf_t, leaf);
@@ -1015,7 +1015,7 @@ H5_ATTR_PURE herr_t
H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_leaf_t H5_ATTR_NDEBUG_UNUSED *leaf)
{
/* General sanity checking on node */
- HDassert(leaf->nrec <= hdr->node_info->split_nrec);
+ assert(leaf->nrec <= hdr->node_info->split_nrec);
return (0);
} /* end H5B2__assert_leaf() */
@@ -1037,7 +1037,7 @@ H5B2__assert_leaf2(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_leaf_
const H5B2_leaf_t H5_ATTR_UNUSED *leaf2)
{
/* General sanity checking on node */
- HDassert(leaf->nrec <= hdr->node_info->split_nrec);
+ assert(leaf->nrec <= hdr->node_info->split_nrec);
return (0);
} /* end H5B2__assert_leaf2() */
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index 1295638..4b399ba 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -76,7 +76,7 @@ H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(info);
+ assert(info);
/* Get information about the B-tree */
info->depth = bt2->hdr->depth;
@@ -107,8 +107,8 @@ H5B2_size(H5B2_t *bt2, hsize_t *btree_size)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(btree_size);
+ assert(bt2);
+ assert(btree_size);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
diff --git a/src/H5B2test.c b/src/H5B2test.c
index 14ce00d..4ce7388 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -136,7 +136,7 @@ H5B2__test_crt_context(void *_f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Allocate callback context */
if (NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t)))
@@ -173,7 +173,7 @@ H5B2__test_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Release callback context */
ctx = H5FL_FREE(H5B2_test_ctx_t, ctx);
@@ -249,7 +249,7 @@ H5B2__test_encode(uint8_t *raw, const void *nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
H5F_ENCODE_LENGTH_LEN(raw, *(const hsize_t *)nrecord, ctx->sizeof_size);
@@ -277,7 +277,7 @@ H5B2__test_decode(const uint8_t *raw, void *nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
H5F_DECODE_LENGTH_LEN(raw, *(hsize_t *)nrecord, ctx->sizeof_size);
@@ -302,9 +302,9 @@ H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record, const
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(record);
+ assert(record);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Record:", *(const hsize_t *)record);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Record:", *(const hsize_t *)record);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2__test_debug() */
@@ -377,7 +377,7 @@ H5B2__test2_encode(uint8_t *raw, const void *nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
H5F_ENCODE_LENGTH_LEN(raw, ((const H5B2_test_rec_t *)nrecord)->key, ctx->sizeof_size);
H5F_ENCODE_LENGTH_LEN(raw, ((const H5B2_test_rec_t *)nrecord)->val, ctx->sizeof_size);
@@ -406,7 +406,7 @@ H5B2__test2_decode(const uint8_t *raw, void *nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
H5F_DECODE_LENGTH_LEN(raw, ((H5B2_test_rec_t *)nrecord)->key, ctx->sizeof_size);
H5F_DECODE_LENGTH_LEN(raw, ((H5B2_test_rec_t *)nrecord)->val, ctx->sizeof_size);
@@ -432,10 +432,10 @@ H5B2__test2_debug(FILE *stream, int indent, int fwidth, const void *record, cons
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(record);
+ assert(record);
- HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE ", %" PRIuHSIZE ")\n", indent, "", fwidth,
- "Record:", ((const H5B2_test_rec_t *)record)->key, ((const H5B2_test_rec_t *)record)->val);
+ fprintf(stream, "%*s%-*s (%" PRIuHSIZE ", %" PRIuHSIZE ")\n", indent, "", fwidth,
+ "Record:", ((const H5B2_test_rec_t *)record)->key, ((const H5B2_test_rec_t *)record)->val);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2__test2_debug() */
@@ -458,8 +458,8 @@ H5B2__get_root_addr_test(H5B2_t *bt2, haddr_t *root_addr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(bt2);
- HDassert(root_addr);
+ assert(bt2);
+ assert(root_addr);
/* Get B-tree root addr */
*root_addr = bt2->hdr->root.addr;
@@ -493,7 +493,7 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -607,7 +607,7 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo)
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -641,7 +641,7 @@ H5B2__get_node_depth_test(H5B2_t *bt2, void *udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Get information abou the node */
if (H5B2__get_node_info_test(bt2, udata, &ninfo) < 0)
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index 437bc1b..ada63ae 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -95,12 +95,12 @@ H5B__cache_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(image_len);
+ assert(udata);
+ assert(image_len);
/* Get shared info for B-tree */
shared = (H5B_shared_t *)H5UC_GET_OBJ(udata->rc_shared);
- HDassert(shared);
+ assert(shared);
/* Set the image length size */
*image_len = shared->sizeof_rnode;
@@ -132,13 +132,13 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate the B-tree node in memory */
if (NULL == (bt = H5FL_MALLOC(H5B_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate B-tree struct")
- HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&bt->cache_info, 0, sizeof(H5AC_info_t));
/* Set & increment the ref-counted "shared" B-tree information for the node */
bt->rc_shared = udata->rc_shared;
@@ -158,7 +158,7 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_BTREE, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree signature")
image += H5_SIZEOF_MAGIC;
@@ -239,12 +239,12 @@ H5B__cache_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(bt);
- HDassert(image_len);
+ assert(bt);
+ assert(image_len);
/* Get shared info for B-tree */
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
+ assert(shared);
/* Set the image length size */
*image_len = shared->sizeof_rnode;
@@ -273,13 +273,13 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(image);
- HDassert(bt);
- HDassert(bt->rc_shared);
+ assert(image);
+ assert(bt);
+ assert(bt->rc_shared);
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
- HDassert(shared->type);
- HDassert(shared->type->encode);
+ assert(shared);
+ assert(shared->type);
+ assert(shared->type->encode);
/* magic number */
H5MM_memcpy(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -322,10 +322,10 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo
} /* end if */
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= len);
+ assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -347,7 +347,7 @@ H5B__cache_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Destroy B-tree node */
if (H5B__node_dest((H5B_t *)thing) < 0)
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index b134772..828f7cc 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -62,21 +62,21 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(type);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(type);
/* Currently does not support SWMR access */
- HDassert(!(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE));
+ assert(!(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE));
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/*
* Load the tree node.
@@ -90,38 +90,38 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Tree type ID:",
- ((shared->type->id) == H5B_SNODE_ID
- ? "H5B_SNODE_ID"
- : ((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!")));
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of node:", shared->sizeof_rnode);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of raw (disk) key:", shared->sizeof_rkey);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:", bt->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Level:", bt->level);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of left sibling:", bt->left);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of right sibling:", bt->right);
- HDfprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth, "Number of children (max):", bt->nchildren,
- shared->two_k);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Tree type ID:",
+ ((shared->type->id) == H5B_SNODE_ID
+ ? "H5B_SNODE_ID"
+ : ((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!")));
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of node:", shared->sizeof_rnode);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of raw (disk) key:", shared->sizeof_rkey);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Dirty flag:", bt->cache_info.is_dirty ? "True" : "False");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Level:", bt->level);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of left sibling:", bt->left);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of right sibling:", bt->right);
+ fprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth, "Number of children (max):", bt->nchildren,
+ shared->two_k);
/*
* Print the child addresses
*/
for (u = 0; u < bt->nchildren; u++) {
- HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(3, fwidth) - 3,
- "Address:", bt->child[u]);
+ fprintf(stream, "%*sChild %d...\n", indent, "", u);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(3, fwidth) - 3,
+ "Address:", bt->child[u]);
/* If there is a key debugging routine, use it to display the left & right keys */
if (type->debug_key) {
/* Decode the 'left' key & print it */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Left Key:");
- HDassert(H5B_NKEY(bt, shared, u));
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Left Key:");
+ assert(H5B_NKEY(bt, shared, u));
(void)(type->debug_key)(stream, indent + 6, MAX(6, fwidth) - 6, H5B_NKEY(bt, shared, u), udata);
/* Decode the 'right' key & print it */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Right Key:");
- HDassert(H5B_NKEY(bt, shared, u + 1));
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Right Key:");
+ assert(H5B_NKEY(bt, shared, u + 1));
(void)(type->debug_key)(stream, indent + 6, MAX(6, fwidth) - 6, H5B_NKEY(bt, shared, u + 1),
udata);
} /* end if */
@@ -172,31 +172,31 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
if (0 == ncalls++) {
if (H5DEBUG(B))
- HDfprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
+ fprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
} /* end if */
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Initialize the queue */
cache_udata.f = f;
cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG);
- HDassert(bt);
+ assert(bt);
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
+ assert(shared);
cur = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
- HDassert(cur);
+ assert(cur);
cur->addr = addr;
cur->level = bt->level;
head = tail = cur;
status = H5AC_unprotect(f, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET);
- HDassert(status >= 0);
+ assert(status >= 0);
bt = NULL; /* Make certain future references will be caught */
/*
@@ -207,18 +207,18 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
*/
for (ncell = 0; cur; ncell++) {
bt = (H5B_t *)H5AC_protect(f, H5AC_BT, cur->addr, &cache_udata, H5AC__READ_ONLY_FLAG);
- HDassert(bt);
+ assert(bt);
/* Check node header */
- HDassert(bt->level == cur->level);
+ assert(bt->level == cur->level);
if (cur->next && cur->next->level == bt->level)
- HDassert(H5F_addr_eq(bt->right, cur->next->addr));
+ assert(H5F_addr_eq(bt->right, cur->next->addr));
else
- HDassert(!H5F_addr_defined(bt->right));
+ assert(!H5F_addr_defined(bt->right));
if (prev && prev->level == bt->level)
- HDassert(H5F_addr_eq(bt->left, prev->addr));
+ assert(H5F_addr_eq(bt->left, prev->addr));
else
- HDassert(!H5F_addr_defined(bt->left));
+ assert(!H5F_addr_defined(bt->left));
if (cur->level > 0) {
unsigned u;
@@ -229,11 +229,11 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
* have then the tree has a cycle.
*/
for (tmp = head; tmp; tmp = tmp->next)
- HDassert(H5F_addr_ne(tmp->addr, bt->child[u]));
+ assert(H5F_addr_ne(tmp->addr, bt->child[u]));
/* Add the child node to the end of the queue */
tmp = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
- HDassert(tmp);
+ assert(tmp);
tmp->addr = bt->child[u];
tmp->level = bt->level - 1;
tail->next = tmp;
@@ -241,13 +241,13 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
/* Check that the keys are monotonically increasing */
cmp = (type->cmp2)(H5B_NKEY(bt, shared, u), udata, H5B_NKEY(bt, shared, u + 1));
- HDassert(cmp < 0);
+ assert(cmp < 0);
} /* end for */
} /* end if */
/* Release node */
status = H5AC_unprotect(f, H5AC_BT, cur->addr, bt, H5AC__NO_FLAGS_SET);
- HDassert(status >= 0);
+ assert(status >= 0);
bt = NULL; /* Make certain future references will be caught */
/* Advance current location in queue */
diff --git a/src/H5C.c b/src/H5C.c
index 8a97e47..d8870f0 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -184,17 +184,17 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
FUNC_ENTER_NOAPI(NULL)
- HDassert(max_cache_size >= H5C__MIN_MAX_CACHE_SIZE);
- HDassert(max_cache_size <= H5C__MAX_MAX_CACHE_SIZE);
- HDassert(min_clean_size <= max_cache_size);
+ assert(max_cache_size >= H5C__MIN_MAX_CACHE_SIZE);
+ assert(max_cache_size <= H5C__MAX_MAX_CACHE_SIZE);
+ assert(min_clean_size <= max_cache_size);
- HDassert(max_type_id >= 0);
- HDassert(max_type_id < H5C__MAX_NUM_TYPE_IDS);
- HDassert(class_table_ptr);
+ assert(max_type_id >= 0);
+ assert(max_type_id < H5C__MAX_NUM_TYPE_IDS);
+ assert(class_table_ptr);
for (i = 0; i <= max_type_id; i++) {
- HDassert((class_table_ptr)[i]);
- HDassert(HDstrlen((class_table_ptr)[i]->name) > 0);
+ assert((class_table_ptr)[i]);
+ assert(HDstrlen((class_table_ptr)[i]->name) > 0);
} /* end for */
if (NULL == (cache_ptr = H5FL_CALLOC(H5C_t)))
@@ -360,7 +360,7 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->epoch_marker_ringbuf_size = 0;
/* Initialize all epoch marker entries' fields to zero/FALSE/NULL */
- HDmemset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
+ memset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
/* Set non-zero/FALSE/NULL fields for epoch markers */
for (i = 0; i < H5C__MAX_EPOCH_MARKERS; i++) {
@@ -440,7 +440,7 @@ done:
*
* Purpose: Print results of a automatic cache resize.
*
- * This function should only be used where HDprintf() behaves
+ * This function should only be used where printf() behaves
* well -- i.e. not on Windows.
*
* Return: void
@@ -460,107 +460,107 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr,
double hit_rate, enum H5C_resize_status status, size_t old_max_cache_size,
size_t new_max_cache_size, size_t old_min_clean_size, size_t new_min_clean_size)
{
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(version == H5C__CURR_AUTO_RESIZE_RPT_FCN_VER);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(version == H5C__CURR_AUTO_RESIZE_RPT_FCN_VER);
switch (status) {
case in_spec:
- HDfprintf(stdout, "%sAuto cache resize -- no change. (hit rate = %lf)\n", cache_ptr->prefix,
- hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- no change. (hit rate = %lf)\n", cache_ptr->prefix,
+ hit_rate);
break;
case increase:
- HDassert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold);
- HDassert(old_max_cache_size < new_max_cache_size);
+ assert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold);
+ assert(old_max_cache_size < new_max_cache_size);
- HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
- HDfprintf(stdout, "%scache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
- old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
+ fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
+ fprintf(stdout, "%scache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
+ old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
break;
case flash_increase:
- HDassert(old_max_cache_size < new_max_cache_size);
+ assert(old_max_cache_size < new_max_cache_size);
- HDfprintf(stdout, "%sflash cache resize(%d) -- size threshold = %zu.\n", cache_ptr->prefix,
- (int)(cache_ptr->resize_ctl.flash_incr_mode), cache_ptr->flash_size_increase_threshold);
- HDfprintf(stdout, "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
- old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
+ fprintf(stdout, "%sflash cache resize(%d) -- size threshold = %zu.\n", cache_ptr->prefix,
+ (int)(cache_ptr->resize_ctl.flash_incr_mode), cache_ptr->flash_size_increase_threshold);
+ fprintf(stdout, "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
+ old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
break;
case decrease:
- HDassert(old_max_cache_size > new_max_cache_size);
+ assert(old_max_cache_size > new_max_cache_size);
switch (cache_ptr->resize_ctl.decr_mode) {
case H5C_decr__off:
- HDfprintf(stdout, "%sAuto cache resize -- decrease off. HR = %lf\n", cache_ptr->prefix,
- hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- decrease off. HR = %lf\n", cache_ptr->prefix,
+ hit_rate);
break;
case H5C_decr__threshold:
- HDassert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold);
+ assert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold);
- HDfprintf(stdout, "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold);
- HDfprintf(stdout, "%sout of bounds high (%6.5lf).\n", cache_ptr->prefix,
- cache_ptr->resize_ctl.upper_hr_threshold);
+ fprintf(stdout, "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold);
+ fprintf(stdout, "%sout of bounds high (%6.5lf).\n", cache_ptr->prefix,
+ cache_ptr->resize_ctl.upper_hr_threshold);
break;
case H5C_decr__age_out:
- HDfprintf(stdout, "%sAuto cache resize -- decrease by ageout. HR = %lf\n",
- cache_ptr->prefix, hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- decrease by ageout. HR = %lf\n",
+ cache_ptr->prefix, hit_rate);
break;
case H5C_decr__age_out_with_threshold:
- HDassert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold);
+ assert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold);
- HDfprintf(stdout,
- "%sAuto cache resize -- decrease by ageout with threshold. HR = %lf > %6.5lf\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold);
+ fprintf(stdout,
+ "%sAuto cache resize -- decrease by ageout with threshold. HR = %lf > %6.5lf\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold);
break;
default:
- HDfprintf(stdout, "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n",
- cache_ptr->prefix, hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n",
+ cache_ptr->prefix, hit_rate);
}
- HDfprintf(stdout, "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
- old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
+ fprintf(stdout, "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
+ old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
break;
case at_max_size:
- HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
- HDfprintf(stdout, "%s cache already at maximum size so no change.\n", cache_ptr->prefix);
+ fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
+ fprintf(stdout, "%s cache already at maximum size so no change.\n", cache_ptr->prefix);
break;
case at_min_size:
- HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix,
- hit_rate);
- HDfprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix);
+ fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix,
+ hit_rate);
+ fprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix);
break;
case increase_disabled:
- HDfprintf(stdout, "%sAuto cache resize -- increase disabled -- HR = %lf.", cache_ptr->prefix,
- hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- increase disabled -- HR = %lf.", cache_ptr->prefix,
+ hit_rate);
break;
case decrease_disabled:
- HDfprintf(stdout, "%sAuto cache resize -- decrease disabled -- HR = %lf.\n", cache_ptr->prefix,
- hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- decrease disabled -- HR = %lf.\n", cache_ptr->prefix,
+ hit_rate);
break;
case not_full:
- HDassert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold);
+ assert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold);
- HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
- HDfprintf(stdout, "%s cache not full so no increase in size.\n", cache_ptr->prefix);
+ fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
+ fprintf(stdout, "%s cache not full so no increase in size.\n", cache_ptr->prefix);
break;
default:
- HDfprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix);
+ fprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix);
break;
}
} /* H5C_def_auto_resize_rpt_fcn() */
@@ -590,12 +590,12 @@ H5C_prep_for_file_close(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* It is possible to receive the close warning more than once */
if (cache_ptr->close_warning_received)
@@ -603,7 +603,7 @@ H5C_prep_for_file_close(H5F_t *f)
cache_ptr->close_warning_received = TRUE;
/* Make certain there aren't any protected entries */
- HDassert(cache_ptr->pl_len == 0);
+ assert(cache_ptr->pl_len == 0);
/* Prepare cache image */
if (H5C__prep_image_for_file_close(f, &image_generated) < 0)
@@ -682,9 +682,9 @@ H5C_dest(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
#if H5AC_DUMP_IMAGE_STATS_ON_CLOSE
if (H5C_image_stats(cache_ptr, TRUE) < 0)
@@ -708,8 +708,8 @@ H5C_dest(H5F_t *f)
* point? If no, shouldn't this if statement be an assert?
*/
if (cache_ptr->slist_ptr != NULL) {
- HDassert(cache_ptr->slist_len == 0);
- HDassert(cache_ptr->slist_size == 0);
+ assert(cache_ptr->slist_len == 0);
+ assert(cache_ptr->slist_size == 0);
H5SL_close(cache_ptr->slist_ptr);
cache_ptr->slist_ptr = NULL;
@@ -727,8 +727,8 @@ H5C_dest(H5F_t *f)
#ifndef NDEBUG
#ifdef H5C_DO_SANITY_CHECKS
if (cache_ptr->get_entry_ptr_from_addr_counter > 0)
- HDfprintf(stdout, "*** %" PRId64 " calls to H5C_get_entry_ptr_from_add(). ***\n",
- cache_ptr->get_entry_ptr_from_addr_counter);
+ fprintf(stdout, "*** %" PRId64 " calls to H5C_get_entry_ptr_from_add(). ***\n",
+ cache_ptr->get_entry_ptr_from_addr_counter);
#endif /* H5C_DO_SANITY_CHECKS */
cache_ptr->magic = 0;
@@ -770,7 +770,7 @@ H5C_evict(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Enable the slist, as it is needed in the flush */
if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
@@ -812,13 +812,13 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(type);
+ assert(H5F_addr_defined(addr));
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_lru_list(cache_ptr) < 0)
@@ -831,8 +831,8 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag
/* the target doesn't exist in the cache, so we are done. */
HGOTO_DONE(SUCCEED)
- HDassert(entry_ptr->addr == addr);
- HDassert(entry_ptr->type == type);
+ assert(entry_ptr->addr == addr);
+ assert(entry_ptr->type == type);
/* Check for entry being pinned or protected */
if (entry_ptr->is_protected)
@@ -901,20 +901,20 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
for (i = H5C_RING_USER; i < H5C_RING_NTYPES; i++) {
index_len += cache_ptr->index_ring_len[i];
@@ -926,12 +926,12 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
- HDassert(cache_ptr->index_len == index_len);
- HDassert(cache_ptr->index_size == index_size);
- HDassert(cache_ptr->clean_index_size == clean_index_size);
- HDassert(cache_ptr->dirty_index_size == dirty_index_size);
- HDassert(cache_ptr->slist_len == slist_len);
- HDassert(cache_ptr->slist_size == slist_size);
+ assert(cache_ptr->index_len == index_len);
+ assert(cache_ptr->index_size == index_size);
+ assert(cache_ptr->clean_index_size == clean_index_size);
+ assert(cache_ptr->dirty_index_size == dirty_index_size);
+ assert(cache_ptr->slist_len == slist_len);
+ assert(cache_ptr->slist_size == slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
@@ -941,8 +941,8 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
destroy = ((flags & H5C__FLUSH_INVALIDATE_FLAG) != 0);
- HDassert(!(destroy && ((flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0)));
- HDassert(!(cache_ptr->flush_in_progress));
+ assert(!(destroy && ((flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0)));
+ assert(!(cache_ptr->flush_in_progress));
cache_ptr->flush_in_progress = TRUE;
@@ -1033,13 +1033,13 @@ H5C_flush_to_min_clean(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (cache_ptr->check_write_permitted != NULL) {
if ((cache_ptr->check_write_permitted)(f, &write_permitted) < 0)
@@ -1092,18 +1092,18 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(type);
- HDassert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
- HDassert(type->image_len);
- HDassert(H5F_addr_defined(addr));
- HDassert(thing);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(type);
+ assert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
+ assert(type->image_len);
+ assert(H5F_addr_defined(addr));
+ assert(thing);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
/* no need to verify that entry is not already in the index as */
@@ -1161,7 +1161,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
/* Retrieve the size of the thing */
if ((type->image_len)(thing, &(entry_ptr->size)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "can't get size of thing")
- HDassert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE);
+ assert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE);
entry_ptr->in_slist = FALSE;
@@ -1255,7 +1255,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
else
write_permitted = cache_ptr->write_permitted;
- HDassert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
+ assert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
space_needed = entry_ptr->size;
if (space_needed > cache_ptr->max_cache_size)
space_needed = cache_ptr->max_cache_size;
@@ -1289,7 +1289,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL)
/* New entries are presumed to be dirty */
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
entry_ptr->flush_marker = set_flush_marker;
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, FAIL)
@@ -1377,14 +1377,14 @@ H5C_mark_entry_dirty(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
+ assert(entry_ptr);
+ assert(H5F_addr_defined(entry_ptr->addr));
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (entry_ptr->is_protected) {
- HDassert(!((entry_ptr)->is_read_only));
+ assert(!((entry_ptr)->is_read_only));
/* set the dirtied flag */
entry_ptr->dirtied = TRUE;
@@ -1475,11 +1475,11 @@ H5C_mark_entry_clean(void *_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
+ assert(entry_ptr);
+ assert(H5F_addr_defined(entry_ptr->addr));
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Operate on pinned entry */
if (entry_ptr->is_protected)
@@ -1550,11 +1550,11 @@ H5C_mark_entry_unserialized(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
- HDassert(H5F_addr_defined(entry->addr));
+ assert(entry);
+ assert(H5F_addr_defined(entry->addr));
if (entry->is_protected || entry->is_pinned) {
- HDassert(!entry->is_read_only);
+ assert(!entry->is_read_only);
/* Reset image_up_to_date */
if (entry->image_up_to_date) {
@@ -1596,8 +1596,8 @@ H5C_mark_entry_serialized(void *_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
- HDassert(H5F_addr_defined(entry->addr));
+ assert(entry);
+ assert(H5F_addr_defined(entry->addr));
/* Operate on pinned entry */
if (entry->is_protected)
@@ -1645,12 +1645,12 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(type);
- HDassert(H5F_addr_defined(old_addr));
- HDassert(H5F_addr_defined(new_addr));
- HDassert(H5F_addr_ne(old_addr, new_addr));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(type);
+ assert(H5F_addr_defined(old_addr));
+ assert(H5F_addr_defined(new_addr));
+ assert(H5F_addr_ne(old_addr, new_addr));
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -1664,8 +1664,8 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
/* the old item doesn't exist in the cache, so we are done. */
HGOTO_DONE(SUCCEED)
- HDassert(entry_ptr->addr == old_addr);
- HDassert(entry_ptr->type == type);
+ assert(entry_ptr->addr == old_addr);
+ assert(entry_ptr->type == type);
/* Check for R/W status, otherwise error */
/* (Moving a R/O entry would mark it dirty, which shouldn't
@@ -1702,7 +1702,7 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr, FAIL)
if (entry_ptr->in_slist) {
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr->slist_ptr);
H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, FALSE)
} /* end if */
} /* end if */
@@ -1793,11 +1793,11 @@ H5C_resize_entry(void *thing, size_t new_size)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
+ assert(entry_ptr);
+ assert(H5F_addr_defined(entry_ptr->addr));
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Check for usage errors */
if (new_size <= 0)
@@ -1926,11 +1926,11 @@ H5C_pin_protected_entry(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
+ assert(entry_ptr);
+ assert(H5F_addr_defined(entry_ptr->addr));
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -2000,16 +2000,16 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(type);
- HDassert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
- HDassert(H5F_addr_defined(addr));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(type);
+ assert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
+ assert(H5F_addr_defined(addr));
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -2042,7 +2042,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
if (entry_ptr->ring != ring)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "ring type mismatch occurred for cache entry")
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (entry_ptr->prefetched) {
/* This call removes the prefetched entry from the cache,
@@ -2052,9 +2052,9 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
if (H5C__deserialize_prefetched_entry(f, cache_ptr, &entry_ptr, type, addr, udata) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't deserialize prefetched entry")
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!entry_ptr->prefetched);
- HDassert(entry_ptr->addr == addr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!entry_ptr->prefetched);
+ assert(entry_ptr->addr == addr);
} /* end if */
/* Check for trying to load the wrong type of entry from an address */
@@ -2097,7 +2097,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
*/
HDONE_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "can't generate entry's image")
} /* end if */
- HDassert(entry_ptr->image_ptr);
+ assert(entry_ptr->image_ptr);
H5_CHECKED_ASSIGN(buf_size, int, entry_ptr->size, size_t);
if (MPI_SUCCESS != (mpi_code = MPI_Bcast(entry_ptr->image_ptr, buf_size, MPI_BYTE, 0, comm)))
@@ -2196,7 +2196,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
have_write_permitted = TRUE;
} /* end else */
- HDassert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
+ assert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
space_needed = entry_ptr->size;
if (space_needed > cache_ptr->max_cache_size)
space_needed = cache_ptr->max_cache_size;
@@ -2261,12 +2261,12 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
was_loaded = TRUE;
} /* end else */
- HDassert(entry_ptr->addr == addr);
- HDassert(entry_ptr->type == type);
+ assert(entry_ptr->addr == addr);
+ assert(entry_ptr->type == type);
if (entry_ptr->is_protected) {
if (read_only && entry_ptr->is_read_only) {
- HDassert(entry_ptr->ro_ref_count > 0);
+ assert(entry_ptr->ro_ref_count > 0);
(entry_ptr->ro_ref_count)++;
} /* end if */
else
@@ -2546,9 +2546,9 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
*
* by definition.
*/
- HDassert(new_min_clean_size <= new_max_cache_size);
- HDassert(cache_ptr->resize_ctl.min_size <= new_max_cache_size);
- HDassert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
+ assert(new_min_clean_size <= new_max_cache_size);
+ assert(cache_ptr->resize_ctl.min_size <= new_max_cache_size);
+ assert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
if (new_max_cache_size < cache_ptr->max_cache_size)
cache_ptr->size_decreased = TRUE;
@@ -2722,7 +2722,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
/* scan the index list and insert all dirty entries in the slist */
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (entry_ptr->is_dirty)
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
entry_ptr = entry_ptr->il_next;
@@ -2734,7 +2734,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
* and in any case, there is no requirement that all dirty entries
* will reside on the dirty LRU.
*/
- HDassert(cache_ptr->dirty_index_size == cache_ptr->slist_size);
+ assert(cache_ptr->dirty_index_size == cache_ptr->slist_size);
}
else { /* take down the skip list */
if (!cache_ptr->slist_enabled)
@@ -2757,8 +2757,8 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
cache_ptr->slist_enabled = FALSE;
- HDassert(0 == cache_ptr->slist_len);
- HDassert(0 == cache_ptr->slist_size);
+ assert(0 == cache_ptr->slist_len);
+ assert(0 == cache_ptr->slist_size);
}
done:
@@ -2788,10 +2788,10 @@ H5C_unpin_entry(void *_entry_ptr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(entry_ptr);
+ assert(entry_ptr);
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -2867,28 +2867,28 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
free_file_space = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0);
take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0);
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
- HDassert(thing);
- HDassert(!(pin_entry && unpin_entry));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
+ assert(thing);
+ assert(!(pin_entry && unpin_entry));
/* deleted flag must accompany free_file_space */
- HDassert((!free_file_space) || (deleted));
+ assert((!free_file_space) || (deleted));
/* deleted flag must accompany take_ownership */
- HDassert((!take_ownership) || (deleted));
+ assert((!take_ownership) || (deleted));
/* can't have both free_file_space & take_ownership */
- HDassert(!(free_file_space && take_ownership));
+ assert(!(free_file_space && take_ownership));
entry_ptr = (H5C_cache_entry_t *)thing;
- HDassert(entry_ptr->addr == addr);
+ assert(entry_ptr->addr == addr);
/* also set the dirtied variable if the dirtied field is set in
* the entry.
@@ -2908,8 +2908,8 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
*/
if (entry_ptr->ro_ref_count > 1) {
/* Sanity check */
- HDassert(entry_ptr->is_protected);
- HDassert(entry_ptr->is_read_only);
+ assert(entry_ptr->is_protected);
+ assert(entry_ptr->is_read_only);
if (dirtied)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??")
@@ -2932,7 +2932,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
else {
if (entry_ptr->is_read_only) {
/* Sanity check */
- HDassert(entry_ptr->ro_ref_count == 1);
+ assert(entry_ptr->ro_ref_count == 1);
if (dirtied)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??")
@@ -2959,7 +2959,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
*/
if (entry_ptr->clear_on_unprotect) {
/* Sanity check */
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
entry_ptr->clear_on_unprotect = FALSE;
if (!dirtied)
@@ -3077,7 +3077,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
/* Delete the entry from the skip list on destroy */
flush_flags |= H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG;
- HDassert((!cache_ptr->slist_enabled) || (((!was_clean) || dirtied) == (entry_ptr->in_slist)));
+ assert((!cache_ptr->slist_enabled) || (((!was_clean) || dirtied) == (entry_ptr->in_slist)));
if (H5C__flush_single_entry(f, entry_ptr, flush_flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't flush entry")
@@ -3147,13 +3147,13 @@ H5C_unsettle_entry_ring(void *_entry)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
- HDassert(entry->ring != H5C_RING_UNDEFINED);
- HDassert((H5C_RING_USER == entry->ring) || (H5C_RING_RDFSM == entry->ring) ||
- (H5C_RING_MDFSM == entry->ring));
+ assert(entry);
+ assert(entry->ring != H5C_RING_UNDEFINED);
+ assert((H5C_RING_USER == entry->ring) || (H5C_RING_RDFSM == entry->ring) ||
+ (H5C_RING_MDFSM == entry->ring));
cache = entry->cache_ptr;
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
switch (entry->ring) {
case H5C_RING_USER:
@@ -3177,7 +3177,7 @@ H5C_unsettle_entry_ring(void *_entry)
break;
default:
- HDassert(FALSE); /* this should be un-reachable */
+ assert(FALSE); /* this should be un-reachable */
break;
} /* end switch */
@@ -3218,12 +3218,12 @@ H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert((H5C_RING_RDFSM == ring) || (H5C_RING_MDFSM == ring));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert((H5C_RING_RDFSM == ring) || (H5C_RING_MDFSM == ring));
cache_ptr = f->shared->cache;
- HDassert(H5C__H5C_T_MAGIC == cache_ptr->magic);
+ assert(H5C__H5C_T_MAGIC == cache_ptr->magic);
switch (ring) {
case H5C_RING_RDFSM:
@@ -3243,7 +3243,7 @@ H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring)
break;
default:
- HDassert(FALSE); /* this should be un-reachable */
+ assert(FALSE); /* this should be un-reachable */
break;
} /* end switch */
@@ -3418,23 +3418,23 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(parent_entry);
- HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(H5F_addr_defined(parent_entry->addr));
- HDassert(child_entry);
- HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(H5F_addr_defined(child_entry->addr));
+ assert(parent_entry);
+ assert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(H5F_addr_defined(parent_entry->addr));
+ assert(child_entry);
+ assert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(H5F_addr_defined(child_entry->addr));
cache_ptr = parent_entry->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr == child_entry->cache_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr == child_entry->cache_ptr);
#ifndef NDEBUG
/* Make sure the parent is not already a parent */
{
unsigned u;
for (u = 0; u < child_entry->flush_dep_nparents; u++)
- HDassert(child_entry->flush_dep_parent[u] != parent_entry);
+ assert(child_entry->flush_dep_parent[u] != parent_entry);
} /* end block */
#endif /* NDEBUG */
@@ -3447,9 +3447,9 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
/* Check for parent not pinned */
if (!parent_entry->is_pinned) {
/* Sanity check */
- HDassert(parent_entry->flush_dep_nchildren == 0);
- HDassert(!parent_entry->pinned_from_client);
- HDassert(!parent_entry->pinned_from_cache);
+ assert(parent_entry->flush_dep_nchildren == 0);
+ assert(!parent_entry->pinned_from_client);
+ assert(!parent_entry->pinned_from_cache);
/* Pin the parent entry */
parent_entry->is_pinned = TRUE;
@@ -3463,7 +3463,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
if (child_entry->flush_dep_nparents >= child_entry->flush_dep_parent_nalloc) {
if (child_entry->flush_dep_parent_nalloc == 0) {
/* Array does not exist yet, allocate it */
- HDassert(!child_entry->flush_dep_parent);
+ assert(!child_entry->flush_dep_parent);
if (NULL == (child_entry->flush_dep_parent =
H5FL_SEQ_MALLOC(H5C_cache_entry_ptr_t, H5C_FLUSH_DEP_PARENT_INIT)))
@@ -3473,7 +3473,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
} /* end if */
else {
/* Resize existing array */
- HDassert(child_entry->flush_dep_parent);
+ assert(child_entry->flush_dep_parent);
if (NULL == (child_entry->flush_dep_parent =
H5FL_SEQ_REALLOC(H5C_cache_entry_ptr_t, child_entry->flush_dep_parent,
@@ -3495,7 +3495,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
/* Adjust the number of dirty children */
if (child_entry->is_dirty) {
/* Sanity check */
- HDassert(parent_entry->flush_dep_ndirty_children < parent_entry->flush_dep_nchildren);
+ assert(parent_entry->flush_dep_ndirty_children < parent_entry->flush_dep_nchildren);
parent_entry->flush_dep_ndirty_children++;
@@ -3510,7 +3510,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
* that it is possible for and entry to be clean and unserialized.
*/
if (!child_entry->image_up_to_date) {
- HDassert(parent_entry->flush_dep_nunser_children < parent_entry->flush_dep_nchildren);
+ assert(parent_entry->flush_dep_nunser_children < parent_entry->flush_dep_nchildren);
parent_entry->flush_dep_nunser_children++;
@@ -3522,11 +3522,11 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
} /* end if */
/* Post-conditions, for successful operation */
- HDassert(parent_entry->is_pinned);
- HDassert(parent_entry->flush_dep_nchildren > 0);
- HDassert(child_entry->flush_dep_parent);
- HDassert(child_entry->flush_dep_nparents > 0);
- HDassert(child_entry->flush_dep_parent_nalloc > 0);
+ assert(parent_entry->is_pinned);
+ assert(parent_entry->flush_dep_nchildren > 0);
+ assert(child_entry->flush_dep_parent);
+ assert(child_entry->flush_dep_nparents > 0);
+ assert(child_entry->flush_dep_parent_nalloc > 0);
#ifndef NDEBUG
H5C__assert_flush_dep_nocycle(parent_entry, child_entry);
#endif /* NDEBUG */
@@ -3560,16 +3560,16 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(parent_entry);
- HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(H5F_addr_defined(parent_entry->addr));
- HDassert(child_entry);
- HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(H5F_addr_defined(child_entry->addr));
+ assert(parent_entry);
+ assert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(H5F_addr_defined(parent_entry->addr));
+ assert(child_entry);
+ assert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(H5F_addr_defined(child_entry->addr));
cache_ptr = parent_entry->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr == child_entry->cache_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr == child_entry->cache_ptr);
/* Usage checks */
if (!parent_entry->is_pinned)
@@ -3601,7 +3601,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
parent_entry->flush_dep_nchildren--;
if (0 == parent_entry->flush_dep_nchildren) {
/* Sanity check */
- HDassert(parent_entry->pinned_from_cache);
+ assert(parent_entry->pinned_from_cache);
/* Check if we should unpin parent entry now */
if (!parent_entry->pinned_from_client)
@@ -3615,7 +3615,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
/* Adjust parent entry's ndirty_children */
if (child_entry->is_dirty) {
/* Sanity check */
- HDassert(parent_entry->flush_dep_ndirty_children > 0);
+ assert(parent_entry->flush_dep_ndirty_children > 0);
parent_entry->flush_dep_ndirty_children--;
@@ -3628,7 +3628,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
/* adjust parent entry's number of unserialized children */
if (!child_entry->image_up_to_date) {
- HDassert(parent_entry->flush_dep_nunser_children > 0);
+ assert(parent_entry->flush_dep_nunser_children > 0);
parent_entry->flush_dep_nunser_children--;
@@ -3687,9 +3687,9 @@ H5C__pin_entry_from_client(H5C_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(entry_ptr);
- HDassert(entry_ptr->is_protected);
+ assert(cache_ptr);
+ assert(entry_ptr);
+ assert(entry_ptr->is_protected);
/* Check if the entry is already pinned */
if (entry_ptr->is_pinned) {
@@ -3734,9 +3734,9 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t up
#endif
/* Sanity checking */
- HDassert(cache_ptr);
- HDassert(entry_ptr);
- HDassert(entry_ptr->is_pinned);
+ assert(cache_ptr);
+ assert(entry_ptr);
+ assert(entry_ptr->is_pinned);
/* If requested, update the replacement policy if the entry is not protected */
if (update_rp && !entry_ptr->is_protected)
@@ -3774,8 +3774,8 @@ H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbo
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(cache_ptr);
- HDassert(entry_ptr);
+ assert(cache_ptr);
+ assert(entry_ptr);
/* Error checking (should be sanity checks?) */
if (!entry_ptr->is_pinned)
@@ -3831,12 +3831,12 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->cache_accesses >= cache_ptr->resize_ctl.epoch_length);
- HDassert(0.0 <= cache_ptr->resize_ctl.min_clean_fraction);
- HDassert(cache_ptr->resize_ctl.min_clean_fraction <= 100.0);
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->cache_accesses >= cache_ptr->resize_ctl.epoch_length);
+ assert(0.0 <= cache_ptr->resize_ctl.min_clean_fraction);
+ assert(cache_ptr->resize_ctl.min_clean_fraction <= 100.0);
/* check to see if cache_ptr->resize_in_progress is TRUE. If it, this
* is a re-entrant call via a client callback called in the resize
@@ -3853,13 +3853,13 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
if (!cache_ptr->resize_enabled)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Auto cache resize disabled")
- HDassert((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
- (cache_ptr->resize_ctl.decr_mode != H5C_decr__off));
+ assert((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
+ (cache_ptr->resize_ctl.decr_mode != H5C_decr__off));
if (H5C_get_cache_hit_rate(cache_ptr, &hit_rate) != SUCCEED)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate")
- HDassert((0.0 <= hit_rate) && (hit_rate <= 1.0));
+ assert((0.0 <= hit_rate) && (hit_rate <= 1.0));
switch (cache_ptr->resize_ctl.incr_mode) {
case H5C_incr__off:
@@ -3872,7 +3872,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
if (!cache_ptr->size_increase_possible)
status = increase_disabled;
else if (cache_ptr->max_cache_size >= cache_ptr->resize_ctl.max_size) {
- HDassert(cache_ptr->max_cache_size == cache_ptr->resize_ctl.max_size);
+ assert(cache_ptr->max_cache_size == cache_ptr->resize_ctl.max_size);
status = at_max_size;
}
else if (!cache_ptr->cache_full)
@@ -3937,7 +3937,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
if (!cache_ptr->size_decrease_possible)
status = decrease_disabled;
else if (cache_ptr->max_cache_size <= cache_ptr->resize_ctl.min_size) {
- HDassert(cache_ptr->max_cache_size == cache_ptr->resize_ctl.min_size);
+ assert(cache_ptr->max_cache_size == cache_ptr->resize_ctl.min_size);
status = at_min_size;
}
else {
@@ -4000,9 +4000,9 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
*
* by definition.
*/
- HDassert(new_min_clean_size <= new_max_cache_size);
- HDassert(cache_ptr->resize_ctl.min_size <= new_max_cache_size);
- HDassert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
+ assert(new_min_clean_size <= new_max_cache_size);
+ assert(cache_ptr->resize_ctl.min_size <= new_max_cache_size);
+ assert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
cache_ptr->max_cache_size = new_max_cache_size;
cache_ptr->min_clean_size = new_min_clean_size;
@@ -4044,10 +4044,10 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
done:
/* Sanity checks */
- HDassert(cache_ptr->resize_in_progress);
+ assert(cache_ptr->resize_in_progress);
if (!reentrant_call)
cache_ptr->resize_in_progress = FALSE;
- HDassert((!reentrant_call) || (cache_ptr->resize_in_progress));
+ assert((!reentrant_call) || (cache_ptr->resize_in_progress));
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__auto_adjust_cache_size() */
@@ -4081,11 +4081,11 @@ H5C__autoadjust__ageout(H5F_t *f, double hit_rate, enum H5C_resize_status *statu
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert((status_ptr) && (*status_ptr == in_spec));
- HDassert((new_max_cache_size_ptr) && (*new_max_cache_size_ptr == 0));
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert((status_ptr) && (*status_ptr == in_spec));
+ assert((new_max_cache_size_ptr) && (*new_max_cache_size_ptr == 0));
/* remove excess epoch markers if any */
if (cache_ptr->epoch_markers_active > cache_ptr->resize_ctl.epochs_before_eviction)
@@ -4162,8 +4162,8 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (cache_ptr->epoch_markers_active <= 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "No active epoch markers on entry?!?!?")
@@ -4185,9 +4185,9 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr)
/* now, re-insert it at the head of the LRU list, and at the tail of
* the ring buffer.
*/
- HDassert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
- HDassert(cache_ptr->epoch_markers[i].next == NULL);
- HDassert(cache_ptr->epoch_markers[i].prev == NULL);
+ assert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
+ assert(cache_ptr->epoch_markers[i].next == NULL);
+ assert(cache_ptr->epoch_markers[i].prev == NULL);
cache_ptr->epoch_marker_ringbuf_last =
(cache_ptr->epoch_marker_ringbuf_last + 1) % (H5C__MAX_EPOCH_MARKERS + 1);
@@ -4257,9 +4257,9 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* if there is a limit on the amount that the cache size can be decrease
* in any one round of the cache size reduction algorithm, load that
@@ -4279,10 +4279,10 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
bytes_evicted < eviction_size_limit) {
hbool_t skipping_entry = FALSE;
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert((entry_ptr->ro_ref_count) == 0);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert((entry_ptr->ro_ref_count) == 0);
next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
@@ -4291,7 +4291,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
prev_is_dirty = prev_ptr->is_dirty;
if (entry_ptr->is_dirty) {
- HDassert(!entry_ptr->prefetched_dirty);
+ assert(!entry_ptr->prefetched_dirty);
/* dirty corked entry is skipped */
if (entry_ptr->tag_info && entry_ptr->tag_info->corked)
@@ -4324,8 +4324,8 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
} /* end else-if */
else {
- HDassert(!entry_ptr->is_dirty);
- HDassert(entry_ptr->prefetched_dirty);
+ assert(!entry_ptr->is_dirty);
+ assert(entry_ptr->prefetched_dirty);
skipping_entry = TRUE;
} /* end else */
@@ -4379,11 +4379,11 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
* performance implications, but it shouldn't cause any net
* slowdown.
*/
- HDassert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
+ assert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
entry_ptr = cache_ptr->LRU_tail_ptr;
while (entry_ptr != NULL && ((entry_ptr->type)->id != H5AC_EPOCH_MARKER_ID) &&
(bytes_evicted < eviction_size_limit)) {
- HDassert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_protected));
prev_ptr = entry_ptr->prev;
@@ -4432,8 +4432,8 @@ H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (cache_ptr->epoch_markers_active >= cache_ptr->resize_ctl.epochs_before_eviction)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Already have a full complement of markers")
@@ -4445,9 +4445,9 @@ H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr)
if (i >= H5C__MAX_EPOCH_MARKERS)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't find unused marker")
- HDassert(((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i);
- HDassert(((cache_ptr->epoch_markers)[i]).next == NULL);
- HDassert(((cache_ptr->epoch_markers)[i]).prev == NULL);
+ assert(((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i);
+ assert(((cache_ptr->epoch_markers)[i]).next == NULL);
+ assert(((cache_ptr->epoch_markers)[i]).prev == NULL);
(cache_ptr->epoch_marker_active)[i] = TRUE;
@@ -4490,8 +4490,8 @@ H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
while (cache_ptr->epoch_markers_active > 0) {
/* get the index of the last epoch marker in the LRU list
@@ -4518,14 +4518,14 @@ H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr)
/* mark the epoch marker as unused. */
cache_ptr->epoch_marker_active[i] = FALSE;
- HDassert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
- HDassert(cache_ptr->epoch_markers[i].next == NULL);
- HDassert(cache_ptr->epoch_markers[i].prev == NULL);
+ assert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
+ assert(cache_ptr->epoch_markers[i].next == NULL);
+ assert(cache_ptr->epoch_markers[i].prev == NULL);
/* decrement the number of active epoch markers */
cache_ptr->epoch_markers_active -= 1;
- HDassert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
+ assert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
}
done:
@@ -4556,8 +4556,8 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (cache_ptr->epoch_markers_active <= cache_ptr->resize_ctl.epochs_before_eviction)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "no excess markers on entry")
@@ -4586,14 +4586,14 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr)
/* mark the epoch marker as unused. */
cache_ptr->epoch_marker_active[i] = FALSE;
- HDassert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
- HDassert(cache_ptr->epoch_markers[i].next == NULL);
- HDassert(cache_ptr->epoch_markers[i].prev == NULL);
+ assert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
+ assert(cache_ptr->epoch_markers[i].next == NULL);
+ assert(cache_ptr->epoch_markers[i].prev == NULL);
/* decrement the number of active epoch markers */
cache_ptr->epoch_markers_active -= 1;
- HDassert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
+ assert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
}
done:
@@ -4630,11 +4630,11 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->flash_size_increase_possible);
- HDassert(new_entry_size > cache_ptr->flash_size_increase_threshold);
- HDassert(old_entry_size < new_entry_size);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->flash_size_increase_possible);
+ assert(new_entry_size > cache_ptr->flash_size_increase_threshold);
+ assert(old_entry_size < new_entry_size);
if (old_entry_size >= new_entry_size)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "old_entry_size >= new_entry_size")
@@ -4650,7 +4650,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n
case H5C_flash_incr__add_space:
if (cache_ptr->index_size < cache_ptr->max_cache_size) {
- HDassert((cache_ptr->max_cache_size - cache_ptr->index_size) < space_needed);
+ assert((cache_ptr->max_cache_size - cache_ptr->index_size) < space_needed);
space_needed -= cache_ptr->max_cache_size - cache_ptr->index_size;
}
space_needed = (size_t)(((double)space_needed) * cache_ptr->resize_ctl.flash_multiple);
@@ -4664,10 +4664,10 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n
if (new_max_cache_size > cache_ptr->resize_ctl.max_size)
new_max_cache_size = cache_ptr->resize_ctl.max_size;
- HDassert(new_max_cache_size > cache_ptr->max_cache_size);
+ assert(new_max_cache_size > cache_ptr->max_cache_size);
new_min_clean_size = (size_t)((double)new_max_cache_size * cache_ptr->resize_ctl.min_clean_fraction);
- HDassert(new_min_clean_size <= new_max_cache_size);
+ assert(new_min_clean_size <= new_max_cache_size);
old_max_cache_size = cache_ptr->max_cache_size;
old_min_clean_size = cache_ptr->min_clean_size;
@@ -4676,7 +4676,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n
cache_ptr->min_clean_size = new_min_clean_size;
/* update flash cache size increase fields as appropriate */
- HDassert(cache_ptr->flash_size_increase_possible);
+ assert(cache_ptr->flash_size_increase_possible);
switch (cache_ptr->resize_ctl.flash_incr_mode) {
case H5C_flash_incr__off:
@@ -4762,13 +4762,13 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
- HDassert(cache_ptr->slist_enabled);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
+ assert(cache_ptr->slist_enabled);
#ifdef H5C_DO_SANITY_CHECKS
{
@@ -4780,12 +4780,12 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
size_t dirty_index_size = (size_t)0;
size_t slist_size = (size_t)0;
- HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
for (i = H5C_RING_USER; i < H5C_RING_NTYPES; i++) {
index_len += cache_ptr->index_ring_len[i];
@@ -4797,12 +4797,12 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
- HDassert(cache_ptr->index_len == index_len);
- HDassert(cache_ptr->index_size == index_size);
- HDassert(cache_ptr->clean_index_size == clean_index_size);
- HDassert(cache_ptr->dirty_index_size == dirty_index_size);
- HDassert(cache_ptr->slist_len == slist_len);
- HDassert(cache_ptr->slist_size == slist_size);
+ assert(cache_ptr->index_len == index_len);
+ assert(cache_ptr->index_size == index_size);
+ assert(cache_ptr->clean_index_size == clean_index_size);
+ assert(cache_ptr->dirty_index_size == dirty_index_size);
+ assert(cache_ptr->slist_len == slist_len);
+ assert(cache_ptr->slist_size == slist_size);
}
#endif /* H5C_DO_SANITY_CHECKS */
@@ -4824,10 +4824,10 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
#ifndef NDEBUG
/* Invariants, after destroying all entries in the hash table */
if (!(flags & H5C__EVICT_ALLOW_LAST_PINS_FLAG)) {
- HDassert(cache_ptr->index_size == 0);
- HDassert(cache_ptr->clean_index_size == 0);
- HDassert(cache_ptr->pel_len == 0);
- HDassert(cache_ptr->pel_size == 0);
+ assert(cache_ptr->index_size == 0);
+ assert(cache_ptr->clean_index_size == 0);
+ assert(cache_ptr->pel_len == 0);
+ assert(cache_ptr->pel_size == 0);
} /* end if */
else {
H5C_cache_entry_t *entry_ptr; /* Cache entry */
@@ -4836,29 +4836,29 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
/* All rings except ring 4 should be empty now */
/* (Ring 4 has the superblock) */
for (u = H5C_RING_USER; u < H5C_RING_SB; u++) {
- HDassert(cache_ptr->index_ring_len[u] == 0);
- HDassert(cache_ptr->index_ring_size[u] == 0);
- HDassert(cache_ptr->clean_index_ring_size[u] == 0);
+ assert(cache_ptr->index_ring_len[u] == 0);
+ assert(cache_ptr->index_ring_size[u] == 0);
+ assert(cache_ptr->clean_index_ring_size[u] == 0);
} /* end for */
/* Check that any remaining pinned entries are in the superblock ring */
entry_ptr = cache_ptr->pel_head_ptr;
while (entry_ptr) {
/* Check ring */
- HDassert(entry_ptr->ring == H5C_RING_SB);
+ assert(entry_ptr->ring == H5C_RING_SB);
/* Advance to next entry in pinned entry list */
entry_ptr = entry_ptr->next;
} /* end while */
} /* end else */
- HDassert(cache_ptr->dirty_index_size == 0);
- HDassert(cache_ptr->slist_len == 0);
- HDassert(cache_ptr->slist_size == 0);
- HDassert(cache_ptr->pl_len == 0);
- HDassert(cache_ptr->pl_size == 0);
- HDassert(cache_ptr->LRU_list_len == 0);
- HDassert(cache_ptr->LRU_list_size == 0);
+ assert(cache_ptr->dirty_index_size == 0);
+ assert(cache_ptr->slist_len == 0);
+ assert(cache_ptr->slist_size == 0);
+ assert(cache_ptr->pl_len == 0);
+ assert(cache_ptr->pl_size == 0);
+ assert(cache_ptr->LRU_list_len == 0);
+ assert(cache_ptr->LRU_list_size == 0);
#endif /* NDEBUG */
done:
@@ -4923,19 +4923,19 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_enabled);
- HDassert(cache_ptr->slist_ptr);
- HDassert(ring > H5C_RING_UNDEFINED);
- HDassert(ring < H5C_RING_NTYPES);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_enabled);
+ assert(cache_ptr->slist_ptr);
+ assert(ring > H5C_RING_UNDEFINED);
+ assert(ring < H5C_RING_NTYPES);
- HDassert(cache_ptr->epoch_markers_active == 0);
+ assert(cache_ptr->epoch_markers_active == 0);
/* Filter out the flags that are not relevant to the flush/invalidate.
*/
@@ -4973,8 +4973,8 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
entry_ptr = cache_ptr->pel_head_ptr;
cur_ring_pel_len = 0;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring >= ring);
if (entry_ptr->ring == ring)
cur_ring_pel_len++;
@@ -5040,10 +5040,10 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (NULL == next_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!")
- HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(next_entry_ptr->is_dirty);
- HDassert(next_entry_ptr->in_slist);
- HDassert(next_entry_ptr->ring >= ring);
+ assert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(next_entry_ptr->is_dirty);
+ assert(next_entry_ptr->in_slist);
+ assert(next_entry_ptr->ring >= ring);
} /* end if */
entry_ptr = next_entry_ptr;
@@ -5059,11 +5059,11 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* slist if we find them. However, best we do some extra
* sanity checking just in case.
*/
- HDassert(entry_ptr != NULL);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->in_slist);
- HDassert(entry_ptr->is_dirty);
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr != NULL);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->in_slist);
+ assert(entry_ptr->is_dirty);
+ assert(entry_ptr->ring >= ring);
/* increment node pointer now, before we delete its target
* from the slist.
@@ -5074,11 +5074,11 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (NULL == next_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!")
- HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(next_entry_ptr->is_dirty);
- HDassert(next_entry_ptr->in_slist);
- HDassert(next_entry_ptr->ring >= ring);
- HDassert(entry_ptr != next_entry_ptr);
+ assert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(next_entry_ptr->is_dirty);
+ assert(next_entry_ptr->in_slist);
+ assert(next_entry_ptr->ring >= ring);
+ assert(entry_ptr != next_entry_ptr);
} /* end if */
else
next_entry_ptr = NULL;
@@ -5153,10 +5153,10 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
*/
if (node_ptr == NULL) {
- HDassert(cache_ptr->slist_len ==
- (uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase));
- HDassert(cache_ptr->slist_size ==
- (size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase));
+ assert(cache_ptr->slist_len ==
+ (uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase));
+ assert(cache_ptr->slist_size ==
+ (size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase));
} /* end if */
#endif /* H5C_DO_SANITY_CHECKS */
@@ -5182,11 +5182,11 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
next_entry_ptr = cache_ptr->il_head;
while (next_entry_ptr != NULL) {
entry_ptr = next_entry_ptr;
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring >= ring);
next_entry_ptr = entry_ptr->il_next;
- HDassert((next_entry_ptr == NULL) || (next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC));
+ assert((next_entry_ptr == NULL) || (next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC));
if (((!entry_ptr->flush_me_last) ||
(entry_ptr->flush_me_last && (cache_ptr->num_last_entries >= cache_ptr->slist_len))) &&
@@ -5200,7 +5200,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
protected_entries++;
if (!entry_ptr->in_slist)
- HDassert(!(entry_ptr->is_dirty));
+ assert(!(entry_ptr->is_dirty));
} /* end if */
else if (!entry_ptr->is_pinned) {
/* if *entry_ptr is dirty, it is possible
@@ -5276,8 +5276,8 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
cur_ring_pel_len = 0;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring >= ring);
if (entry_ptr->ring == ring)
cur_ring_pel_len++;
@@ -5299,7 +5299,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
(int)cur_ring_pel_len, (int)old_ring_pel_len, (int)ring)
} /* end if */
- HDassert(protected_entries == cache_ptr->pl_len);
+ assert(protected_entries == cache_ptr->pl_len);
if ((protected_entries > 0) && (protected_entries == cache_ptr->index_len))
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
@@ -5309,16 +5309,16 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
/* Invariants, after destroying all entries in the ring */
for (i = (int)H5C_RING_UNDEFINED; i <= (int)ring; i++) {
- HDassert(cache_ptr->index_ring_len[i] == 0);
- HDassert(cache_ptr->index_ring_size[i] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[i] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[i] == (size_t)0);
+ assert(cache_ptr->index_ring_len[i] == 0);
+ assert(cache_ptr->index_ring_size[i] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[i] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[i] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[i] == 0);
- HDassert(cache_ptr->slist_ring_size[i] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[i] == 0);
+ assert(cache_ptr->slist_ring_size[i] == (size_t)0);
} /* end for */
- HDassert(protected_entries <= cache_ptr->pl_len);
+ assert(protected_entries <= cache_ptr->pl_len);
if (protected_entries > 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cache has protected entries")
@@ -5376,13 +5376,13 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_enabled);
- HDassert(cache_ptr->slist_ptr);
- HDassert((flags & H5C__FLUSH_INVALIDATE_FLAG) == 0);
- HDassert(ring > H5C_RING_UNDEFINED);
- HDassert(ring < H5C_RING_NTYPES);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_enabled);
+ assert(cache_ptr->slist_ptr);
+ assert((flags & H5C__FLUSH_INVALIDATE_FLAG) == 0);
+ assert(ring > H5C_RING_UNDEFINED);
+ assert(ring < H5C_RING_NTYPES);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -5395,9 +5395,9 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (!flush_marked_entries)
for (i = (int)H5C_RING_UNDEFINED; i < (int)ring; i++)
- HDassert(cache_ptr->slist_ring_len[i] == 0);
+ assert(cache_ptr->slist_ring_len[i] == 0);
- HDassert(cache_ptr->flush_in_progress);
+ assert(cache_ptr->flush_in_progress);
/* When we are only flushing marked entries, the slist will usually
* still contain entries when we have flushed everything we should.
@@ -5474,9 +5474,9 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (NULL == next_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!")
- HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(next_entry_ptr->is_dirty);
- HDassert(next_entry_ptr->in_slist);
+ assert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(next_entry_ptr->is_dirty);
+ assert(next_entry_ptr->in_slist);
} /* end if */
entry_ptr = next_entry_ptr;
@@ -5498,12 +5498,12 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* with, we do a bit of extra sanity checking on
* entry_ptr.
*/
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->in_slist);
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->in_slist);
+ assert(entry_ptr->is_dirty);
if (!flush_marked_entries || entry_ptr->flush_marker)
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr->ring >= ring);
/* Advance node pointer now, before we delete its target
* from the slist.
@@ -5514,14 +5514,14 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (NULL == next_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!")
- HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(next_entry_ptr->is_dirty);
- HDassert(next_entry_ptr->in_slist);
+ assert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(next_entry_ptr->is_dirty);
+ assert(next_entry_ptr->in_slist);
if (!flush_marked_entries || next_entry_ptr->flush_marker)
- HDassert(next_entry_ptr->ring >= ring);
+ assert(next_entry_ptr->ring >= ring);
- HDassert(entry_ptr != next_entry_ptr);
+ assert(entry_ptr != next_entry_ptr);
} /* end if */
else
next_entry_ptr = NULL;
@@ -5533,7 +5533,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
((entry_ptr->flush_dep_nchildren == 0) || (entry_ptr->flush_dep_ndirty_children == 0)) &&
(entry_ptr->ring == ring)) {
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
if (entry_ptr->is_protected) {
/* we probably have major problems -- but lets
@@ -5567,22 +5567,22 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
#ifdef H5C_DO_SANITY_CHECKS
/* Verify that the slist size and length are as expected. */
- HDassert((uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase) ==
- cache_ptr->slist_len);
- HDassert((size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase) ==
- cache_ptr->slist_size);
+ assert((uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase) ==
+ cache_ptr->slist_len);
+ assert((size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase) ==
+ cache_ptr->slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
} /* while */
- HDassert(protected_entries <= cache_ptr->pl_len);
+ assert(protected_entries <= cache_ptr->pl_len);
if (((cache_ptr->pl_len > 0) && !ignore_protected) || tried_to_flush_protected_entry)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "cache has protected items")
#ifdef H5C_DO_SANITY_CHECKS
if (!flush_marked_entries) {
- HDassert(cache_ptr->slist_ring_len[ring] == 0);
- HDassert(cache_ptr->slist_ring_size[ring] == 0);
+ assert(cache_ptr->slist_ring_len[ring] == 0);
+ assert(cache_ptr->slist_ring_size[ring] == 0);
} /* end if */
#endif /* H5C_DO_SANITY_CHECKS */
@@ -5639,14 +5639,14 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
FUNC_ENTER_PACKAGE
- HDassert(f);
+ assert(f);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring != H5C_RING_UNDEFINED);
- HDassert(entry_ptr->type);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring != H5C_RING_UNDEFINED);
+ assert(entry_ptr->type);
/* setup external flags from the flags parameter */
destroy = ((flags & H5C__FLUSH_INVALIDATE_FLAG) != 0);
@@ -5685,11 +5685,11 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
cache_ptr->num_entries_in_image > 0 && cache_ptr->image_entries != NULL) {
/* Sanity checks */
- HDassert(entry_ptr->image_up_to_date || !(entry_ptr->include_in_image));
- HDassert(entry_ptr->image_ptr || !(entry_ptr->include_in_image));
- HDassert((!clear_only) || !(entry_ptr->include_in_image));
- HDassert((!take_ownership) || !(entry_ptr->include_in_image));
- HDassert((!free_file_space) || !(entry_ptr->include_in_image));
+ assert(entry_ptr->image_up_to_date || !(entry_ptr->include_in_image));
+ assert(entry_ptr->image_ptr || !(entry_ptr->include_in_image));
+ assert((!clear_only) || !(entry_ptr->include_in_image));
+ assert((!take_ownership) || !(entry_ptr->include_in_image));
+ assert((!free_file_space) || !(entry_ptr->include_in_image));
suppress_image_entry_frees = TRUE;
@@ -5701,19 +5701,19 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
#ifdef H5C_DO_SANITY_CHECKS
if (cache_ptr->slist_enabled) {
if (entry_ptr->in_slist) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
if (entry_ptr->flush_marker && !entry_ptr->is_dirty)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry in slist failed sanity checks")
} /* end if */
else {
- HDassert(!entry_ptr->is_dirty);
- HDassert(!entry_ptr->flush_marker);
+ assert(!entry_ptr->is_dirty);
+ assert(!entry_ptr->flush_marker);
if (entry_ptr->is_dirty || entry_ptr->flush_marker)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry failed sanity checks")
} /* end else */
}
else { /* slist is disabled */
- HDassert(!entry_ptr->in_slist);
+ assert(!entry_ptr->in_slist);
if (!entry_ptr->is_dirty)
if (entry_ptr->flush_marker)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush marked clean entry?")
@@ -5741,7 +5741,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* entry.
*/
if (write_entry || generate_image) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
if (NULL == entry_ptr->image_ptr) {
if (NULL == (entry_ptr->image_ptr = H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL,
@@ -5756,7 +5756,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
if (!entry_ptr->image_up_to_date) {
/* Sanity check */
- HDassert(!entry_ptr->prefetched);
+ assert(!entry_ptr->prefetched);
/* Generate the entry's image */
if (H5C__generate_image(f, cache_ptr, entry_ptr) < 0)
@@ -5771,7 +5771,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* flag should only be used in test code.
*/
if (write_entry) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
#ifdef H5C_DO_SANITY_CHECKS
if (cache_ptr->check_write_permitted && !cache_ptr->write_permitted)
@@ -5797,7 +5797,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
else {
#endif /* H5_HAVE_PARALLEL */
if (entry_ptr->prefetched) {
- HDassert(entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
+ assert(entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
mem_type = cache_ptr->class_table_ptr[entry_ptr->prefetch_type_id]->mem_type;
} /* end if */
else
@@ -5833,7 +5833,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr)
}
else if (write_entry) {
- HDassert(was_dirty);
+ assert(was_dirty);
/* only log a flush if we actually wrote to disk */
H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr)
@@ -5848,11 +5848,11 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
if (destroy) {
/* Sanity checks */
if (take_ownership)
- HDassert(!destroy_entry);
+ assert(!destroy_entry);
else
- HDassert(destroy_entry);
+ assert(destroy_entry);
- HDassert(!entry_ptr->is_pinned);
+ assert(!entry_ptr->is_pinned);
/* Update stats, while entry is still in the cache */
H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership)
@@ -5901,13 +5901,13 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove entry from tag list")
/* verify that the entry is no longer part of any flush dependencies */
- HDassert(entry_ptr->flush_dep_nparents == 0);
- HDassert(entry_ptr->flush_dep_nchildren == 0);
+ assert(entry_ptr->flush_dep_nparents == 0);
+ assert(entry_ptr->flush_dep_nchildren == 0);
} /* end if */
else {
- HDassert(clear_only || write_entry);
- HDassert(entry_ptr->is_dirty);
- HDassert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
+ assert(clear_only || write_entry);
+ assert(entry_ptr->is_dirty);
+ assert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
/* We are either doing a flush or a clear.
*
@@ -5941,7 +5941,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* if appropriate
*/
if (entry_ptr->flush_dep_ndirty_children != 0)
- HDassert(entry_ptr->flush_dep_ndirty_children == 0);
+ assert(entry_ptr->flush_dep_ndirty_children == 0);
if (entry_ptr->flush_dep_nparents > 0)
if (H5C__mark_flush_dep_clean(entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "Can't propagate flush dep clean flag")
@@ -5963,7 +5963,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
*/
if (destroy) {
/* Sanity check */
- HDassert(0 == entry_ptr->flush_dep_nparents);
+ assert(0 == entry_ptr->flush_dep_nparents);
/* if both suppress_image_entry_frees and entry_ptr->include_in_image
* are true, simply set entry_ptr->image_ptr to NULL, as we have
@@ -5984,8 +5984,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* the flush dependency parents addresses array if necessary.
*/
if (!entry_ptr->prefetched) {
- HDassert(0 == entry_ptr->fd_parent_count);
- HDassert(NULL == entry_ptr->fd_parent_addrs);
+ assert(0 == entry_ptr->fd_parent_count);
+ assert(NULL == entry_ptr->fd_parent_addrs);
} /* end if */
/* Check whether we should free the space in the file that
@@ -5995,15 +5995,15 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
hsize_t fsf_size;
/* Sanity checks */
- HDassert(H5F_addr_defined(entry_ptr->addr));
- HDassert(!H5F_IS_TMP_ADDR(f, entry_ptr->addr));
+ assert(H5F_addr_defined(entry_ptr->addr));
+ assert(!H5F_IS_TMP_ADDR(f, entry_ptr->addr));
#ifndef NDEBUG
{
size_t curr_len;
/* Get the actual image size for the thing again */
entry_ptr->type->image_len((void *)entry_ptr, &curr_len);
- HDassert(curr_len == entry_ptr->size);
+ assert(curr_len == entry_ptr->size);
}
#endif /* NDEBUG */
@@ -6071,13 +6071,13 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
/* verify that the image has been freed */
- HDassert(entry_ptr->image_ptr == NULL);
+ assert(entry_ptr->image_ptr == NULL);
if (entry_ptr->type->free_icr((void *)entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "free_icr callback failed")
} /* end if */
else {
- HDassert(take_ownership);
+ assert(take_ownership);
/* Client is taking ownership of the entry. Set bad magic here too
* so the cache will choke unless the entry is re-inserted properly
@@ -6091,8 +6091,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
*/
if (update_page_buffer) {
/* Sanity check */
- HDassert(!destroy);
- HDassert(entry_ptr->image_ptr);
+ assert(!destroy);
+ assert(entry_ptr->image_ptr);
if (f->shared->page_buf && (f->shared->page_buf->page_size >= entry_ptr->size))
if (H5PB_update_entry(f->shared->page_buf, entry_ptr->addr, entry_ptr->size,
@@ -6105,8 +6105,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "log_flush callback failed")
done:
- HDassert((ret_value != SUCCEED) || (destroy_entry) || (!entry_ptr->flush_in_progress));
- HDassert((ret_value != SUCCEED) || (destroy_entry) || (take_ownership) || (!entry_ptr->is_dirty));
+ assert((ret_value != SUCCEED) || (destroy_entry) || (!entry_ptr->flush_in_progress));
+ assert((ret_value != SUCCEED) || (destroy_entry) || (take_ownership) || (!entry_ptr->is_dirty));
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_single_entry() */
@@ -6213,27 +6213,27 @@ H5C__load_entry(H5F_t *f,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
- HDassert(type->get_initial_load_size);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(H5F_addr_defined(addr));
+ assert(type->get_initial_load_size);
if (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)
- HDassert(type->get_final_load_size);
+ assert(type->get_final_load_size);
else
- HDassert(NULL == type->get_final_load_size);
- HDassert(type->deserialize);
+ assert(NULL == type->get_final_load_size);
+ assert(type->deserialize);
/* Can't see how skip reads could be usefully combined with
* the speculative read flag. Hence disallow.
*/
- HDassert(!((type->flags & H5C__CLASS_SKIP_READS) && (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)));
+ assert(!((type->flags & H5C__CLASS_SKIP_READS) && (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)));
/* Call the get_initial_load_size callback, to retrieve the initial size of image */
if (type->get_initial_load_size(udata, &len) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "can't retrieve image size")
- HDassert(len > 0);
+ assert(len > 0);
/* Check for possible speculative read off the end of the file */
if (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)
@@ -6293,7 +6293,7 @@ H5C__load_entry(H5F_t *f,
#ifdef H5_HAVE_PARALLEL
if (coll_access) {
/* Push an error, but still participate in following MPI_Bcast */
- HDmemset(image, 0, len);
+ memset(image, 0, len);
HDONE_ERROR(H5E_CACHE, H5E_READERROR, NULL, "Can't read image*")
}
else
@@ -6351,7 +6351,7 @@ H5C__load_entry(H5F_t *f,
#ifdef H5_HAVE_PARALLEL
if (coll_access) {
/* Push an error, but still participate in following MPI_Bcast */
- HDmemset(image + len, 0, actual_len - len);
+ memset(image + len, 0, actual_len - len);
HDONE_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image")
}
else
@@ -6430,7 +6430,7 @@ H5C__load_entry(H5F_t *f,
*
* In the following assert:
*
- * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
+ * assert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
*
* note that type ids 5 & 6 are associated with object headers in the
* metadata cache.
@@ -6440,13 +6440,13 @@ H5C__load_entry(H5F_t *f,
* metadata cache.
*/
- HDassert((dirty == FALSE) || (type->id == 5 || type->id == 6));
+ assert((dirty == FALSE) || (type->id == 5 || type->id == 6));
entry->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
entry->cache_ptr = f->shared->cache;
entry->addr = addr;
entry->size = len;
- HDassert(entry->size < H5C_MAX_ENTRY_SIZE);
+ assert(entry->size < H5C_MAX_ENTRY_SIZE);
entry->image_ptr = image;
entry->image_up_to_date = !dirty;
entry->type = type;
@@ -6585,10 +6585,10 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
/* check to see if cache_ptr->msic_in_progress is TRUE. If it, this
* is a re-entrant call via a client callback called in the make
@@ -6615,10 +6615,10 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
while ((((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) ||
((empty_space + cache_ptr->clean_index_size) < (cache_ptr->min_clean_size))) &&
(entries_examined <= (2 * initial_list_len)) && (entry_ptr != NULL)) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert((entry_ptr->ro_ref_count) == 0);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert((entry_ptr->ro_ref_count) == 0);
next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
@@ -6730,7 +6730,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
else
empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
- HDassert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
+ assert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
}
#if H5C_COLLECT_CACHE_STATS
@@ -6751,22 +6751,22 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
#endif /* H5C_COLLECT_CACHE_STATS */
/* NEED: work on a better assert for corked entries */
- HDassert((entries_examined > (2 * initial_list_len)) ||
- ((cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
- cache_ptr->max_cache_size) ||
- ((cache_ptr->clean_index_size + empty_space) >= cache_ptr->min_clean_size) ||
- ((num_corked_entries)));
+ assert((entries_examined > (2 * initial_list_len)) ||
+ ((cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
+ cache_ptr->max_cache_size) ||
+ ((cache_ptr->clean_index_size + empty_space) >= cache_ptr->min_clean_size) ||
+ ((num_corked_entries)));
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- HDassert((entries_examined > (2 * initial_list_len)) ||
- (cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size));
- HDassert((entries_examined > (2 * initial_list_len)) ||
- (cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size));
+ assert((entries_examined > (2 * initial_list_len)) ||
+ (cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size));
+ assert((entries_examined > (2 * initial_list_len)) ||
+ (cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size));
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
}
else {
- HDassert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
+ assert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
initial_list_len = cache_ptr->cLRU_list_len;
@@ -6774,10 +6774,10 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
while (((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) &&
(entries_examined <= initial_list_len) && (entry_ptr != NULL)) {
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert((entry_ptr->ro_ref_count) == 0);
- HDassert(!(entry_ptr->is_dirty));
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert((entry_ptr->ro_ref_count) == 0);
+ assert(!(entry_ptr->is_dirty));
prev_ptr = entry_ptr->aux_prev;
@@ -6805,10 +6805,10 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
done:
/* Sanity checks */
- HDassert(cache_ptr->msic_in_progress);
+ assert(cache_ptr->msic_in_progress);
if (!reentrant_call)
cache_ptr->msic_in_progress = FALSE;
- HDassert((!reentrant_call) || (cache_ptr->msic_in_progress));
+ assert((!reentrant_call) || (cache_ptr->msic_in_progress));
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__make_space_in_cache() */
@@ -6840,8 +6840,8 @@ H5C__validate_lru_list(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (((cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_tail_ptr == NULL)) &&
(cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr))
@@ -6880,7 +6880,7 @@ H5C__validate_lru_list(H5C_t *cache_ptr)
done:
if (ret_value != SUCCEED)
- HDassert(0);
+ assert(0);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__validate_lru_list() */
@@ -6914,8 +6914,8 @@ H5C__validate_pinned_entry_list(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (((cache_ptr->pel_head_ptr == NULL) || (cache_ptr->pel_tail_ptr == NULL)) &&
(cache_ptr->pel_head_ptr != cache_ptr->pel_tail_ptr))
@@ -6957,7 +6957,7 @@ H5C__validate_pinned_entry_list(H5C_t *cache_ptr)
done:
if (ret_value != SUCCEED)
- HDassert(0);
+ assert(0);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__validate_pinned_entry_list() */
@@ -6991,8 +6991,8 @@ H5C__validate_protected_entry_list(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (((cache_ptr->pl_head_ptr == NULL) || (cache_ptr->pl_tail_ptr == NULL)) &&
(cache_ptr->pl_head_ptr != cache_ptr->pl_tail_ptr))
@@ -7034,7 +7034,7 @@ H5C__validate_protected_entry_list(H5C_t *cache_ptr)
done:
if (ret_value != SUCCEED)
- HDassert(0);
+ assert(0);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__validate_protected_entry_list() */
@@ -7066,9 +7066,9 @@ H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr)
FUNC_ENTER_PACKAGE
/* Assertions */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
node_ptr = H5SL_first(cache_ptr->slist_ptr);
in_slist = FALSE;
@@ -7077,10 +7077,10 @@ H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr)
entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->is_dirty);
- HDassert(entry_ptr->in_slist);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->is_dirty);
+ assert(entry_ptr->in_slist);
if (entry_ptr == target_ptr)
in_slist = TRUE;
@@ -7117,7 +7117,7 @@ H5C__flush_marked_entries(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Assertions */
- HDassert(f != NULL);
+ assert(f != NULL);
/* Enable the slist, as it is needed in the flush */
if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
@@ -7170,15 +7170,15 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
FUNC_ENTER_NOAPI_NOINIT
/* Assertions */
- HDassert(cache_ptr != NULL);
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(action == H5C__SET_CORK || action == H5C__UNCORK || action == H5C__GET_CORKED);
+ assert(cache_ptr != NULL);
+ assert(H5F_addr_defined(obj_addr));
+ assert(action == H5C__SET_CORK || action == H5C__UNCORK || action == H5C__GET_CORKED);
/* Search the list of corked object addresses in the cache */
HASH_FIND(hh, cache_ptr->tag_list, &obj_addr, sizeof(haddr_t), tag_info);
if (H5C__GET_CORKED == action) {
- HDassert(corked);
+ assert(corked);
if (tag_info != NULL && tag_info->corked)
*corked = TRUE;
else
@@ -7186,7 +7186,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
}
else {
/* Sanity check */
- HDassert(H5C__SET_CORK == action || H5C__UNCORK == action);
+ assert(H5C__SET_CORK == action || H5C__UNCORK == action);
/* Perform appropriate action */
if (H5C__SET_CORK == action) {
@@ -7206,7 +7206,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
/* Check for object already corked */
if (tag_info->corked)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCORK, FAIL, "object already corked")
- HDassert(tag_info->entry_cnt > 0 && tag_info->head);
+ assert(tag_info->entry_cnt > 0 && tag_info->head);
}
/* Set the corked status for the entire object */
@@ -7229,7 +7229,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
/* Remove the tag info from the tag list, if there's no more entries with this tag */
if (0 == tag_info->entry_cnt) {
/* Sanity check */
- HDassert(NULL == tag_info->head);
+ assert(NULL == tag_info->head);
HASH_DELETE(hh, cache_ptr->tag_list, tag_info);
@@ -7237,7 +7237,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
tag_info = H5FL_FREE(H5C_tag_info_t, tag_info);
}
else
- HDassert(NULL != tag_info->head);
+ assert(NULL != tag_info->head);
}
}
@@ -7269,13 +7269,13 @@ H5C__mark_flush_dep_dirty(H5C_cache_entry_t *entry)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
/* Iterate over the parent entries, if any */
for (u = 0; u < entry->flush_dep_nparents; u++) {
/* Sanity check */
- HDassert(entry->flush_dep_parent[u]->flush_dep_ndirty_children <
- entry->flush_dep_parent[u]->flush_dep_nchildren);
+ assert(entry->flush_dep_parent[u]->flush_dep_ndirty_children <
+ entry->flush_dep_parent[u]->flush_dep_nchildren);
/* Adjust the parent's number of dirty children */
entry->flush_dep_parent[u]->flush_dep_ndirty_children++;
@@ -7316,7 +7316,7 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t *entry)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
/* Iterate over the parent entries, if any */
/* Note reverse iteration order, in case the callback removes the flush
@@ -7324,7 +7324,7 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t *entry)
*/
for (i = ((int)entry->flush_dep_nparents) - 1; i >= 0; i--) {
/* Sanity check */
- HDassert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0);
+ assert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0);
/* Adjust the parent's number of dirty children */
entry->flush_dep_parent[i]->flush_dep_ndirty_children--;
@@ -7364,7 +7364,7 @@ H5C__mark_flush_dep_serialized(H5C_cache_entry_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
/* Iterate over the parent entries, if any */
/* Note reverse iteration order, in case the callback removes the flush
@@ -7372,9 +7372,9 @@ H5C__mark_flush_dep_serialized(H5C_cache_entry_t *entry_ptr)
*/
for (i = ((int)entry_ptr->flush_dep_nparents) - 1; i >= 0; i--) {
/* Sanity checks */
- HDassert(entry_ptr->flush_dep_parent);
- HDassert(entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->flush_dep_parent[i]->flush_dep_nunser_children > 0);
+ assert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->flush_dep_parent[i]->flush_dep_nunser_children > 0);
/* decrement the parents number of unserialized children */
entry_ptr->flush_dep_parent[i]->flush_dep_nunser_children--;
@@ -7414,15 +7414,15 @@ H5C__mark_flush_dep_unserialized(H5C_cache_entry_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
/* Iterate over the parent entries, if any */
for (u = 0; u < entry_ptr->flush_dep_nparents; u++) {
/* Sanity check */
- HDassert(entry_ptr->flush_dep_parent);
- HDassert(entry_ptr->flush_dep_parent[u]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->flush_dep_parent[u]->flush_dep_nunser_children <
- entry_ptr->flush_dep_parent[u]->flush_dep_nchildren);
+ assert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->flush_dep_parent[u]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->flush_dep_parent[u]->flush_dep_nunser_children <
+ entry_ptr->flush_dep_parent[u]->flush_dep_nchildren);
/* increment parents number of usserialized children */
entry_ptr->flush_dep_parent[u]->flush_dep_nunser_children++;
@@ -7463,11 +7463,11 @@ H5C__assert_flush_dep_nocycle(const H5C_cache_entry_t *entry, const H5C_cache_en
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry);
- HDassert(base_entry);
+ assert(entry);
+ assert(base_entry);
/* Make sure the entries are not the same */
- HDassert(base_entry != entry);
+ assert(base_entry != entry);
/* Iterate over entry's parents (if any) */
for (u = 0; u < entry->flush_dep_nparents; u++)
@@ -7530,20 +7530,20 @@ H5C__serialize_cache(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
for (i = H5C_RING_USER; i < H5C_RING_NTYPES; i++) {
index_len += cache_ptr->index_ring_len[i];
@@ -7555,12 +7555,12 @@ H5C__serialize_cache(H5F_t *f)
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
- HDassert(cache_ptr->index_len == index_len);
- HDassert(cache_ptr->index_size == index_size);
- HDassert(cache_ptr->clean_index_size == clean_index_size);
- HDassert(cache_ptr->dirty_index_size == dirty_index_size);
- HDassert(cache_ptr->slist_len == slist_len);
- HDassert(cache_ptr->slist_size == slist_size);
+ assert(cache_ptr->index_len == index_len);
+ assert(cache_ptr->index_size == index_size);
+ assert(cache_ptr->clean_index_size == clean_index_size);
+ assert(cache_ptr->dirty_index_size == dirty_index_size);
+ assert(cache_ptr->slist_len == slist_len);
+ assert(cache_ptr->slist_size == slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
@@ -7582,7 +7582,7 @@ H5C__serialize_cache(H5F_t *f)
scan_ptr = cache_ptr->il_head;
while (scan_ptr != NULL) {
- HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
scan_ptr->serialization_count = 0;
scan_ptr = scan_ptr->il_next;
} /* end while */
@@ -7595,7 +7595,7 @@ H5C__serialize_cache(H5F_t *f)
* turn required to support sanity checking in some cache
* clients.
*/
- HDassert(!cache_ptr->serialization_in_progress);
+ assert(!cache_ptr->serialization_in_progress);
cache_ptr->serialization_in_progress = TRUE;
/* Serialize each ring, starting from the outermost ring and
@@ -7603,7 +7603,7 @@ H5C__serialize_cache(H5F_t *f)
*/
ring = H5C_RING_USER;
while (ring < H5C_RING_NTYPES) {
- HDassert(cache_ptr->close_warning_received);
+ assert(cache_ptr->close_warning_received);
switch (ring) {
case H5C_RING_USER:
break;
@@ -7647,8 +7647,8 @@ H5C__serialize_cache(H5F_t *f)
scan_ptr = cache_ptr->il_head;
while (scan_ptr != NULL) {
- HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(scan_ptr->serialization_count <= 1);
+ assert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(scan_ptr->serialization_count <= 1);
scan_ptr = scan_ptr->il_next;
} /* end while */
@@ -7700,15 +7700,15 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(ring > H5C_RING_UNDEFINED);
- HDassert(ring < H5C_RING_NTYPES);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(ring > H5C_RING_UNDEFINED);
+ assert(ring < H5C_RING_NTYPES);
- HDassert(cache_ptr->serialization_in_progress);
+ assert(cache_ptr->serialization_in_progress);
/* The objective here is to serialize all entries in the cache ring
* in flush dependency order.
@@ -7797,13 +7797,13 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
done = TRUE; /* set to FALSE if any activity in inner loop */
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Verify that either the entry is already serialized, or
* that it is assigned to either the target or an inner
* ring.
*/
- HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
+ assert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
/* Skip flush me last entries or inner ring entries */
if (!entry_ptr->flush_me_last && entry_ptr->ring == ring) {
@@ -7818,14 +7818,14 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
* and it has no unserialized flush dependency children.
*/
if (!entry_ptr->image_up_to_date && entry_ptr->flush_dep_nunser_children == 0) {
- HDassert(entry_ptr->serialization_count == 0);
+ assert(entry_ptr->serialization_count == 0);
/* Serialize the entry */
if (H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
- HDassert(entry_ptr->serialization_count == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->serialization_count == 0);
#ifndef NDEBUG
/* Increment serialization counter (to detect multiple serializations) */
@@ -7872,16 +7872,16 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
*/
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring > H5C_RING_UNDEFINED);
- HDassert(entry_ptr->ring < H5C_RING_NTYPES);
- HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring > H5C_RING_UNDEFINED);
+ assert(entry_ptr->ring < H5C_RING_NTYPES);
+ assert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
if (entry_ptr->ring == ring) {
if (entry_ptr->flush_me_last) {
if (!entry_ptr->image_up_to_date) {
- HDassert(entry_ptr->serialization_count == 0);
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->serialization_count == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
/* Serialize the entry */
if (H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
@@ -7894,8 +7894,8 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
"flush_me_last entry serialization triggered restart")
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
- HDassert(entry_ptr->serialization_count == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->serialization_count == 0);
#ifndef NDEBUG
/* Increment serialization counter (to detect multiple serializations) */
entry_ptr->serialization_count++;
@@ -7903,9 +7903,9 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
} /* end if */
} /* end if */
else {
- HDassert(entry_ptr->image_up_to_date);
- HDassert(entry_ptr->serialization_count <= 1);
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->image_up_to_date);
+ assert(entry_ptr->serialization_count <= 1);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
} /* end else */
} /* if ( entry_ptr->ring == ring ) */
@@ -7913,7 +7913,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
} /* while ( entry_ptr != NULL ) */
done:
- HDassert(cache_ptr->serialization_in_progress);
+ assert(cache_ptr->serialization_in_progress);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_ring() */
@@ -7937,17 +7937,17 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!entry_ptr->prefetched);
- HDassert(!entry_ptr->image_up_to_date);
- HDassert(entry_ptr->is_dirty);
- HDassert(!entry_ptr->is_protected);
- HDassert(!entry_ptr->flush_in_progress);
- HDassert(entry_ptr->type);
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!entry_ptr->prefetched);
+ assert(!entry_ptr->image_up_to_date);
+ assert(entry_ptr->is_dirty);
+ assert(!entry_ptr->is_protected);
+ assert(!entry_ptr->flush_in_progress);
+ assert(entry_ptr->type);
/* Set entry_ptr->flush_in_progress to TRUE so the target entry
* will not be evicted out from under us. Must set it back to FALSE
@@ -7957,7 +7957,7 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
/* Allocate buffer for the entry image if required. */
if (NULL == entry_ptr->image_ptr) {
- HDassert(entry_ptr->size > 0);
+ assert(entry_ptr->size > 0);
if (NULL == (entry_ptr->image_ptr = H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer")
#if H5C_DO_MEMORY_SANITY_CHECKS
@@ -7974,8 +7974,8 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
entry_ptr->flush_in_progress = FALSE;
done:
- HDassert((ret_value != SUCCEED) || (!entry_ptr->flush_in_progress));
- HDassert((ret_value != SUCCEED) || (entry_ptr->image_up_to_date));
+ assert((ret_value != SUCCEED) || (!entry_ptr->flush_in_progress));
+ assert((ret_value != SUCCEED) || (entry_ptr->image_up_to_date));
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_single_entry() */
@@ -8012,15 +8012,15 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!entry_ptr->image_up_to_date);
- HDassert(entry_ptr->is_dirty);
- HDassert(!entry_ptr->is_protected);
- HDassert(entry_ptr->type);
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!entry_ptr->image_up_to_date);
+ assert(entry_ptr->is_dirty);
+ assert(!entry_ptr->is_protected);
+ assert(entry_ptr->type);
/* make note of the entry's current address */
old_addr = entry_ptr->addr;
@@ -8066,7 +8066,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
*/
if (serialize_flags & H5C__SERIALIZE_RESIZED_FLAG) {
/* Sanity check */
- HDassert(new_len > 0);
+ assert(new_len > 0);
/* Allocate a new image buffer */
if (NULL ==
@@ -8099,8 +8099,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
* H5C__UPDATE_SLIST_FOR_SIZE_CHANGE() is a no-op if the
* slist is enabled, call it un-conditionally.
*/
- HDassert(entry_ptr->is_dirty);
- HDassert((entry_ptr->in_slist) || (!cache_ptr->slist_enabled));
+ assert(entry_ptr->is_dirty);
+ assert((entry_ptr->in_slist) || (!cache_ptr->slist_enabled));
H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, new_len);
@@ -8129,7 +8129,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL);
} /* end if */
else /* move is already done for us -- just do sanity checks */
- HDassert(entry_ptr->addr == new_addr);
+ assert(entry_ptr->addr == new_addr);
} /* end if */
} /* end if(serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET) */
@@ -8138,8 +8138,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to serialize entry")
#if H5C_DO_MEMORY_SANITY_CHECKS
- HDassert(0 == HDmemcmp(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE,
- H5C_IMAGE_EXTRA_SPACE));
+ assert(0 == memcmp(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE,
+ H5C_IMAGE_EXTRA_SPACE));
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
entry_ptr->image_up_to_date = TRUE;
@@ -8150,7 +8150,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
* (see assertion on entry), no need to check that -- only check
* for flush dependency parents.
*/
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
if (entry_ptr->flush_dep_nparents > 0)
if (H5C__mark_flush_dep_serialized(entry_ptr) < 0)
@@ -8184,11 +8184,11 @@ H5C_remove_entry(void *_entry)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
- HDassert(entry->ring != H5C_RING_UNDEFINED);
+ assert(entry);
+ assert(entry->ring != H5C_RING_UNDEFINED);
cache = entry->cache_ptr;
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Check for error conditions */
if (entry->is_dirty)
@@ -8211,9 +8211,9 @@ H5C_remove_entry(void *_entry)
"can't remove entry with flush dependency children from cache")
/* Additional internal cache consistency checks */
- HDassert(!entry->in_slist);
- HDassert(!entry->flush_marker);
- HDassert(!entry->flush_in_progress);
+ assert(!entry->in_slist);
+ assert(!entry->flush_marker);
+ assert(!entry->flush_in_progress);
/* Note that the algorithm below is (very) similar to the set of operations
* in H5C__flush_single_entry() and should be kept in sync with changes
diff --git a/src/H5CS.c b/src/H5CS.c
index c4a8862..b3a333a 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -90,10 +90,10 @@ H5CS__get_stack(void)
fstack = (H5CS_t *)LocalAlloc(
LPTR, sizeof(H5CS_t)); /* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
#else
- fstack = (H5CS_t *)HDmalloc(
- sizeof(H5CS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
+ fstack =
+ (H5CS_t *)malloc(sizeof(H5CS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
#endif /* H5_HAVE_WIN_THREADS */
- HDassert(fstack);
+ assert(fstack);
/* Set the thread-specific info */
fstack->nused = 0;
@@ -133,21 +133,21 @@ H5CS_print_stack(const H5CS_t *fstack, FILE *stream)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
- HDassert(fstack);
+ assert(fstack);
/* Default to outputting information to stderr */
if (!stream)
stream = stderr;
- HDfprintf(stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g);
+ fprintf(stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g);
/* try show the process or thread id in multiple processes cases*/
- HDfprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id());
+ fprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id());
if (fstack && fstack->nused > 0)
- HDfprintf(stream, " Back trace follows.");
+ fprintf(stream, " Back trace follows.");
HDfputc('\n', stream);
for (i = fstack->nused - 1; i >= 0; --i)
- HDfprintf(stream, "%*s#%03d: Routine: %s\n", indent, "", i, fstack->rec[i]);
+ fprintf(stream, "%*s#%03d: Routine: %s\n", indent, "", i, fstack->rec[i]);
FUNC_LEAVE_NOAPI_NOFS(SUCCEED)
} /* end H5CS_print_stack() */
@@ -174,19 +174,19 @@ H5CS_push(const char *func_name)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
- HDassert(fstack);
- HDassert(fstack->nused <= fstack->nalloc);
- HDassert(func_name);
+ assert(fstack);
+ assert(fstack->nused <= fstack->nalloc);
+ assert(func_name);
/* Check if we need to expand the stack of records */
if (fstack->nused == fstack->nalloc) {
size_t na = MAX((fstack->nalloc * 2), H5CS_MIN_NSLOTS);
/* Don't use H5MM_realloc here */
- const char **x = (const char **)HDrealloc(fstack->rec, na * sizeof(const char *));
+ const char **x = (const char **)realloc(fstack->rec, na * sizeof(const char *));
/* (Avoid returning an error from this routine, currently -QAK) */
- HDassert(x);
+ assert(x);
fstack->rec = x;
fstack->nalloc = na;
} /* end if */
@@ -219,8 +219,8 @@ H5CS_pop(void)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
- HDassert(fstack);
- HDassert(fstack->nused > 0);
+ assert(fstack);
+ assert(fstack->nused > 0);
/* Pop the function. */
fstack->nused--;
@@ -252,18 +252,18 @@ H5CS_copy_stack(void)
FUNC_ENTER_NOAPI_NOFS
/* Sanity check */
- HDassert(old_stack);
+ assert(old_stack);
/* Allocate a new stack */
/* (Don't use library allocate code, since this code stack supports it) */
- if (NULL == (new_stack = HDcalloc(1, sizeof(H5CS_t))))
+ if (NULL == (new_stack = calloc(1, sizeof(H5CS_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate function stack")
- if (NULL == (new_stack->rec = HDcalloc(old_stack->nused, sizeof(const char *))))
+ if (NULL == (new_stack->rec = calloc(old_stack->nused, sizeof(const char *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate function stack records")
/* Copy pointers on old stack to new one */
/* (Strings don't need to be duplicated, they are statically allocated) */
- HDmemcpy(new_stack->rec, old_stack->rec, sizeof(char *) * old_stack->nused);
+ memcpy(new_stack->rec, old_stack->rec, sizeof(char *) * old_stack->nused);
new_stack->nused = new_stack->nalloc = old_stack->nused;
/* Set the return value */
@@ -294,18 +294,18 @@ H5CS_close_stack(H5CS_t *stack)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
- HDassert(stack);
+ assert(stack);
/* Free stack */
/* The function name string are statically allocated (by the compiler)
* and are not allocated, so there's no need to free them.
*/
if (stack->rec) {
- HDfree(stack->rec);
+ free(stack->rec);
stack->rec = NULL;
} /* end if */
if (stack)
- HDfree(stack);
+ free(stack);
FUNC_LEAVE_NOAPI_NOFS(SUCCEED)
} /* end H5CS_close_stack() */
diff --git a/src/H5CX.c b/src/H5CX.c
index e5595b7..5781e2a 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -491,7 +491,7 @@ H5CX_init(void)
FUNC_ENTER_NOAPI(FAIL)
/* Reset the "default DXPL cache" information */
- HDmemset(&H5CX_def_dxpl_cache, 0, sizeof(H5CX_dxpl_cache_t));
+ memset(&H5CX_def_dxpl_cache, 0, sizeof(H5CX_dxpl_cache_t));
/* Get the default DXPL cache information */
@@ -588,7 +588,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve modify write buffer property")
/* Reset the "default LCPL cache" information */
- HDmemset(&H5CX_def_lcpl_cache, 0, sizeof(H5CX_lcpl_cache_t));
+ memset(&H5CX_def_lcpl_cache, 0, sizeof(H5CX_lcpl_cache_t));
/* Get the default LCPL cache information */
@@ -605,7 +605,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve intermediate group creation flag")
/* Reset the "default LAPL cache" information */
- HDmemset(&H5CX_def_lapl_cache, 0, sizeof(H5CX_lapl_cache_t));
+ memset(&H5CX_def_lapl_cache, 0, sizeof(H5CX_lapl_cache_t));
/* Get the default LAPL cache information */
@@ -618,7 +618,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve number of soft / UD links to traverse")
/* Reset the "default DCPL cache" information */
- HDmemset(&H5CX_def_dcpl_cache, 0, sizeof(H5CX_dcpl_cache_t));
+ memset(&H5CX_def_dcpl_cache, 0, sizeof(H5CX_dcpl_cache_t));
/* Get the default DCPL cache information */
@@ -635,7 +635,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve object header flags")
/* Reset the "default DAPL cache" information */
- HDmemset(&H5CX_def_dapl_cache, 0, sizeof(H5CX_dapl_cache_t));
+ memset(&H5CX_def_dapl_cache, 0, sizeof(H5CX_dapl_cache_t));
/* Get the default DAPL cache information */
@@ -652,7 +652,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve prefix for VDS")
/* Reset the "default FAPL cache" information */
- HDmemset(&H5CX_def_fapl_cache, 0, sizeof(H5CX_fapl_cache_t));
+ memset(&H5CX_def_fapl_cache, 0, sizeof(H5CX_fapl_cache_t));
/* Get the default FAPL cache information */
@@ -696,8 +696,8 @@ H5CX_term_package(void)
cnode = H5CX__pop_common(FALSE);
/* Free the context node */
- /* (Allocated with HDmalloc() in H5CX_push_special() ) */
- HDfree(cnode);
+ /* (Allocated with malloc() in H5CX_push_special() ) */
+ free(cnode);
#ifndef H5_HAVE_THREADSAFE
H5CX_head_g = NULL;
@@ -736,12 +736,12 @@ H5CX__get_context(void)
/* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
ctx = (H5CX_node_t **)LocalAlloc(LPTR, sizeof(H5CX_node_t *));
#else
- /* Use HDmalloc here since this has to match the HDfree in the
+ /* Use malloc here since this has to match the free in the
* destructor and we want to avoid the codestack there.
*/
- ctx = (H5CX_node_t **)HDmalloc(sizeof(H5CX_node_t *));
+ ctx = (H5CX_node_t **)malloc(sizeof(H5CX_node_t *));
#endif /* H5_HAVE_WIN_THREADS */
- HDassert(ctx);
+ assert(ctx);
/* Reset the thread-specific info */
*ctx = NULL;
@@ -778,9 +778,9 @@ H5CX__push_common(H5CX_node_t *cnode)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(cnode);
+ assert(cnode);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head);
+ assert(head);
/* Set non-zero context info */
cnode->ctx.dxpl_id = H5P_DATASET_XFER_DEFAULT;
@@ -852,8 +852,8 @@ H5CX_push_special(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Allocate & clear API context node, without using library API routines */
- cnode = (H5CX_node_t *)HDcalloc(1, sizeof(H5CX_node_t));
- HDassert(cnode);
+ cnode = (H5CX_node_t *)calloc(1, sizeof(H5CX_node_t));
+ assert(cnode);
/* Set context info */
H5CX__push_common(cnode);
@@ -888,8 +888,8 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(api_state);
+ assert(head && *head);
+ assert(api_state);
/* Allocate & clear API context state */
if (NULL == (*api_state = H5FL_CALLOC(H5CX_state_t)))
@@ -946,7 +946,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
/* Keep a reference to the current VOL wrapping context */
(*api_state)->vol_wrap_ctx = (*head)->ctx.vol_wrap_ctx;
if (NULL != (*api_state)->vol_wrap_ctx) {
- HDassert((*head)->ctx.vol_wrap_ctx_valid);
+ assert((*head)->ctx.vol_wrap_ctx_valid);
if (H5VL_inc_vol_wrapper((*api_state)->vol_wrap_ctx) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTINC, FAIL, "can't increment refcount on VOL wrapping context")
} /* end if */
@@ -1027,8 +1027,8 @@ H5CX_restore_state(const H5CX_state_t *api_state)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(api_state);
+ assert(head && *head);
+ assert(api_state);
/* Restore the DCPL info */
(*head)->ctx.dcpl_id = api_state->dcpl_id;
@@ -1086,7 +1086,7 @@ H5CX_free_state(H5CX_state_t *api_state)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(api_state);
+ assert(api_state);
/* Release the DCPL */
if (0 != api_state->dcpl_id && H5P_DATASET_CREATE_DEFAULT != api_state->dcpl_id)
@@ -1154,7 +1154,7 @@ H5CX_is_def_dxpl(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
is_def_dxpl = ((*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT);
@@ -1183,7 +1183,7 @@ H5CX_set_dxpl(hid_t dxpl_id)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context's DXPL to a new value */
(*head)->ctx.dxpl_id = dxpl_id;
@@ -1212,7 +1212,7 @@ H5CX_set_dcpl(hid_t dcpl_id)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context's DCPL to a new value */
(*head)->ctx.dcpl_id = dcpl_id;
@@ -1243,7 +1243,7 @@ H5CX_set_libver_bounds(H5F_t *f)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.low_bound = (f == NULL) ? H5F_LIBVER_LATEST : H5F_LOW_BOUND(f);
@@ -1277,7 +1277,7 @@ H5CX_set_lcpl(hid_t lcpl_id)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context's LCPL to a new value */
(*head)->ctx.lcpl_id = lcpl_id;
@@ -1306,7 +1306,7 @@ H5CX_set_lapl(hid_t lapl_id)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context's LAPL to a new value */
(*head)->ctx.lapl_id = lapl_id;
@@ -1346,10 +1346,10 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass,
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(acspl_id);
- HDassert(libclass);
+ assert(acspl_id);
+ assert(libclass);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set access plist to the default property list of the appropriate class if it's the generic default */
if (H5P_DEFAULT == *acspl_id)
@@ -1468,7 +1468,7 @@ H5CX_set_loc(hid_t
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set collective metadata read flag */
(*head)->ctx.coll_metadata_read = TRUE;
@@ -1520,7 +1520,7 @@ H5CX_set_vol_wrap_ctx(void *vol_wrap_ctx)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.vol_wrap_ctx = vol_wrap_ctx;
@@ -1553,7 +1553,7 @@ H5CX_set_vol_connector_prop(const H5VL_connector_prop_t *vol_connector_prop)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
H5MM_memcpy(&(*head)->ctx.vol_connector_prop, vol_connector_prop, sizeof(H5VL_connector_prop_t));
@@ -1586,7 +1586,7 @@ H5CX_get_dxpl(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
dxpl_id = (*head)->ctx.dxpl_id;
@@ -1616,7 +1616,7 @@ H5CX_get_lapl(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
lapl_id = (*head)->ctx.lapl_id;
@@ -1645,7 +1645,7 @@ H5CX_get_vol_wrap_ctx(void **vol_wrap_ctx)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_wrap_ctx);
+ assert(vol_wrap_ctx);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
/* No error is expected at this point. But in case an application calls H5VLwrap_register
@@ -1689,16 +1689,16 @@ H5CX_get_vol_connector_prop(H5VL_connector_prop_t *vol_connector_prop)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(vol_connector_prop);
+ assert(vol_connector_prop);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Check for value that was set */
if ((*head)->ctx.vol_connector_prop_valid)
/* Get the value */
H5MM_memcpy(vol_connector_prop, &(*head)->ctx.vol_connector_prop, sizeof(H5VL_connector_prop_t));
else
- HDmemset(vol_connector_prop, 0, sizeof(H5VL_connector_prop_t));
+ memset(vol_connector_prop, 0, sizeof(H5VL_connector_prop_t));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_get_vol_connector_prop() */
@@ -1725,7 +1725,7 @@ H5CX_get_tag(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
tag = (*head)->ctx.tag;
@@ -1755,7 +1755,7 @@ H5CX_get_ring(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
ring = (*head)->ctx.ring;
@@ -1787,7 +1787,7 @@ H5CX_get_coll_metadata_read(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
coll_md_read = (*head)->ctx.coll_metadata_read;
@@ -1818,10 +1818,10 @@ H5CX_get_mpi_coll_datatypes(MPI_Datatype *btype, MPI_Datatype *ftype)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(btype);
- HDassert(ftype);
+ assert(btype);
+ assert(ftype);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context values */
*btype = (*head)->ctx.btype;
@@ -1852,7 +1852,7 @@ H5CX_get_mpi_file_flushing(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
flushing = (*head)->ctx.mpi_file_flushing;
@@ -1883,7 +1883,7 @@ H5CX_get_mpio_rank0_bcast(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
do_rank0_bcast = (*head)->ctx.rank0_bcast;
@@ -1913,10 +1913,10 @@ H5CX_get_btree_split_ratios(double split_ratio[3])
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(split_ratio);
+ assert(split_ratio);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_BTREE_SPLIT_RATIO_NAME,
btree_split_ratio)
@@ -1949,10 +1949,10 @@ H5CX_get_max_temp_buf(size_t *max_temp_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(max_temp_buf);
+ assert(max_temp_buf);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MAX_TEMP_BUF_NAME, max_temp_buf)
@@ -1984,10 +1984,10 @@ H5CX_get_tconv_buf(void **tconv_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(tconv_buf);
+ assert(tconv_buf);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_TCONV_BUF_NAME, tconv_buf)
@@ -2019,10 +2019,10 @@ H5CX_get_bkgr_buf(void **bkgr_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(bkgr_buf);
+ assert(bkgr_buf);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_BKGR_BUF_NAME, bkgr_buf)
@@ -2054,10 +2054,10 @@ H5CX_get_bkgr_buf_type(H5T_bkg_t *bkgr_buf_type)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(bkgr_buf_type);
+ assert(bkgr_buf_type);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_BKGR_BUF_TYPE_NAME, bkgr_buf_type)
@@ -2089,10 +2089,10 @@ H5CX_get_vec_size(size_t *vec_size)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vec_size);
+ assert(vec_size);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_HYPER_VECTOR_SIZE_NAME, vec_size)
@@ -2126,10 +2126,10 @@ H5CX_get_io_xfer_mode(H5FD_mpio_xfer_t *io_xfer_mode)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(io_xfer_mode);
+ assert(io_xfer_mode);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_IO_XFER_MODE_NAME, io_xfer_mode)
@@ -2161,10 +2161,10 @@ H5CX_get_mpio_coll_opt(H5FD_mpio_collective_opt_t *mpio_coll_opt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_coll_opt);
+ assert(mpio_coll_opt);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, mpio_coll_opt)
@@ -2196,10 +2196,10 @@ H5CX_get_mpio_local_no_coll_cause(uint32_t *mpio_local_no_coll_cause)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_local_no_coll_cause);
+ assert(mpio_local_no_coll_cause);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID_SET(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME,
mpio_local_no_coll_cause)
@@ -2232,10 +2232,10 @@ H5CX_get_mpio_global_no_coll_cause(uint32_t *mpio_global_no_coll_cause)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_global_no_coll_cause);
+ assert(mpio_global_no_coll_cause);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID_SET(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME,
mpio_global_no_coll_cause)
@@ -2268,10 +2268,10 @@ H5CX_get_mpio_chunk_opt_mode(H5FD_mpio_chunk_opt_t *mpio_chunk_opt_mode)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_chunk_opt_mode);
+ assert(mpio_chunk_opt_mode);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME,
mpio_chunk_opt_mode)
@@ -2304,10 +2304,10 @@ H5CX_get_mpio_chunk_opt_num(unsigned *mpio_chunk_opt_num)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_chunk_opt_num);
+ assert(mpio_chunk_opt_num);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME,
mpio_chunk_opt_num)
@@ -2340,10 +2340,10 @@ H5CX_get_mpio_chunk_opt_ratio(unsigned *mpio_chunk_opt_ratio)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_chunk_opt_ratio);
+ assert(mpio_chunk_opt_ratio);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME,
mpio_chunk_opt_ratio)
@@ -2377,10 +2377,10 @@ H5CX_get_err_detect(H5Z_EDC_t *err_detect)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(err_detect);
+ assert(err_detect);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_EDC_NAME, err_detect)
@@ -2412,10 +2412,10 @@ H5CX_get_filter_cb(H5Z_cb_t *filter_cb)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(filter_cb);
+ assert(filter_cb);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_FILTER_CB_NAME, filter_cb)
@@ -2447,10 +2447,10 @@ H5CX_get_data_transform(H5Z_data_xform_t **data_transform)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(data_transform);
+ assert(data_transform);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
/* Check if the value has been retrieved already */
if (!(*head)->ctx.data_transform_valid) {
@@ -2505,10 +2505,10 @@ H5CX_get_vlen_alloc_info(H5T_vlen_alloc_info_t *vl_alloc_info)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vl_alloc_info);
+ assert(vl_alloc_info);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
/* Check if the value has been retrieved already */
if (!(*head)->ctx.vl_alloc_info_valid) {
@@ -2570,10 +2570,10 @@ H5CX_get_dt_conv_cb(H5T_conv_cb_t *dt_conv_cb)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt_conv_cb);
+ assert(dt_conv_cb);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_CONV_CB_NAME, dt_conv_cb)
@@ -2605,10 +2605,10 @@ H5CX_get_selection_io_mode(H5D_selection_io_mode_t *selection_io_mode)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(selection_io_mode);
+ assert(selection_io_mode);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_SELECTION_IO_MODE_NAME,
selection_io_mode)
@@ -2642,10 +2642,10 @@ H5CX_get_no_selection_io_cause(uint32_t *no_selection_io_cause)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(no_selection_io_cause);
+ assert(no_selection_io_cause);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID_SET(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_NO_SELECTION_IO_CAUSE_NAME,
no_selection_io_cause)
@@ -2675,10 +2675,10 @@ H5CX_get_modify_write_buf(hbool_t *modify_write_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(modify_write_buf);
+ assert(modify_write_buf);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MODIFY_WRITE_BUF_NAME, modify_write_buf)
@@ -2710,10 +2710,10 @@ H5CX_get_encoding(H5T_cset_t *encoding)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(encoding);
+ assert(encoding);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
H5CX_RETRIEVE_PROP_VALID(lcpl, H5P_LINK_CREATE_DEFAULT, H5P_STRCRT_CHAR_ENCODING_NAME, encoding)
@@ -2745,10 +2745,10 @@ H5CX_get_intermediate_group(unsigned *crt_intermed_group)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(crt_intermed_group);
+ assert(crt_intermed_group);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
H5CX_RETRIEVE_PROP_VALID(lcpl, H5P_LINK_CREATE_DEFAULT, H5L_CRT_INTERMEDIATE_GROUP_NAME,
intermediate_group)
@@ -2781,10 +2781,10 @@ H5CX_get_nlinks(size_t *nlinks)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(nlinks);
+ assert(nlinks);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(lapl, H5P_LINK_ACCESS_DEFAULT, H5L_ACS_NLINKS_NAME, nlinks)
@@ -2816,11 +2816,11 @@ H5CX_get_libver_bounds(H5F_libver_t *low_bound, H5F_libver_t *high_bound)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(low_bound);
- HDassert(high_bound);
+ assert(low_bound);
+ assert(high_bound);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.fapl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.fapl_id);
H5CX_RETRIEVE_PROP_VALID(fapl, H5P_FILE_ACCESS_DEFAULT, H5F_ACS_LIBVER_LOW_BOUND_NAME, low_bound)
H5CX_RETRIEVE_PROP_VALID(fapl, H5P_FILE_ACCESS_DEFAULT, H5F_ACS_LIBVER_HIGH_BOUND_NAME, high_bound)
@@ -2855,10 +2855,10 @@ H5CX_get_dset_min_ohdr_flag(hbool_t *dset_min_ohdr_flag)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dset_min_ohdr_flag);
+ assert(dset_min_ohdr_flag);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
H5CX_RETRIEVE_PROP_VALID(dcpl, H5P_DATASET_CREATE_DEFAULT, H5D_CRT_MIN_DSET_HDR_SIZE_NAME,
do_min_dset_ohdr)
@@ -2891,10 +2891,10 @@ H5CX_get_ext_file_prefix(const char **extfile_prefix)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(extfile_prefix);
+ assert(extfile_prefix);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dapl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dapl_id);
/* Check if the value has been retrieved already */
if (!(*head)->ctx.extfile_prefix_valid) {
@@ -2949,10 +2949,10 @@ H5CX_get_vds_prefix(const char **vds_prefix)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vds_prefix);
+ assert(vds_prefix);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dapl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dapl_id);
/* Check if the value has been retrieved already */
if (!(*head)->ctx.vds_prefix_valid) {
@@ -3007,7 +3007,7 @@ H5CX_set_tag(haddr_t tag)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.tag = tag;
@@ -3035,7 +3035,7 @@ H5CX_set_ring(H5AC_ring_t ring)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.ring = ring;
@@ -3065,7 +3065,7 @@ H5CX_set_coll_metadata_read(hbool_t cmdr)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.coll_metadata_read = cmdr;
@@ -3097,7 +3097,7 @@ H5CX_set_mpi_coll_datatypes(MPI_Datatype btype, MPI_Datatype ftype)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context values */
(*head)->ctx.btype = btype;
@@ -3128,7 +3128,7 @@ H5CX_set_io_xfer_mode(H5FD_mpio_xfer_t io_xfer_mode)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.io_xfer_mode = io_xfer_mode;
@@ -3161,7 +3161,7 @@ H5CX_set_mpio_coll_opt(H5FD_mpio_collective_opt_t mpio_coll_opt)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.mpio_coll_opt = mpio_coll_opt;
@@ -3193,7 +3193,7 @@ H5CX_set_mpi_file_flushing(hbool_t flushing)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.mpi_file_flushing = flushing;
@@ -3222,7 +3222,7 @@ H5CX_set_mpio_rank0_bcast(hbool_t rank0_bcast)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.rank0_bcast = rank0_bcast;
@@ -3252,7 +3252,7 @@ H5CX_set_vlen_alloc_info(H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.vl_alloc_info.alloc_func = alloc_func;
@@ -3288,7 +3288,7 @@ H5CX_set_nlinks(size_t nlinks)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.nlinks = nlinks;
@@ -3322,8 +3322,8 @@ H5CX_set_mpio_actual_chunk_opt(H5D_mpio_actual_chunk_opt_mode_t mpio_actual_chun
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
/* Cache the value for later, marking it to set in DXPL when context popped */
(*head)->ctx.mpio_actual_chunk_opt = mpio_actual_chunk_opt;
@@ -3353,8 +3353,8 @@ H5CX_set_mpio_actual_io_mode(H5D_mpio_actual_io_mode_t mpio_actual_io_mode)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
/* Cache the value for later, marking it to set in DXPL when context popped */
(*head)->ctx.mpio_actual_io_mode = mpio_actual_io_mode;
@@ -3384,8 +3384,8 @@ H5CX_set_mpio_local_no_coll_cause(uint32_t mpio_local_no_coll_cause)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert((*head)->ctx.dxpl_id != H5P_DEFAULT);
+ assert(head && *head);
+ assert((*head)->ctx.dxpl_id != H5P_DEFAULT);
/* If we're using the default DXPL, don't modify it */
if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT) {
@@ -3418,8 +3418,8 @@ H5CX_set_mpio_global_no_coll_cause(uint32_t mpio_global_no_coll_cause)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert((*head)->ctx.dxpl_id != H5P_DEFAULT);
+ assert(head && *head);
+ assert((*head)->ctx.dxpl_id != H5P_DEFAULT);
/* If we're using the default DXPL, don't modify it */
if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT) {
@@ -3457,8 +3457,8 @@ H5CX_test_set_mpio_coll_chunk_link_hard(int mpio_coll_chunk_link_hard)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_HARD_NAME, mpio_coll_chunk_link_hard)
@@ -3490,8 +3490,8 @@ H5CX_test_set_mpio_coll_chunk_multi_hard(int mpio_coll_chunk_multi_hard)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME, mpio_coll_chunk_multi_hard)
@@ -3523,8 +3523,8 @@ H5CX_test_set_mpio_coll_chunk_link_num_true(int mpio_coll_chunk_link_num_true)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME, mpio_coll_chunk_link_num_true)
@@ -3557,8 +3557,8 @@ H5CX_test_set_mpio_coll_chunk_link_num_false(int mpio_coll_chunk_link_num_false)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME, mpio_coll_chunk_link_num_false)
@@ -3591,8 +3591,8 @@ H5CX_test_set_mpio_coll_chunk_multi_ratio_coll(int mpio_coll_chunk_multi_ratio_c
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME, mpio_coll_chunk_multi_ratio_coll)
@@ -3625,8 +3625,8 @@ H5CX_test_set_mpio_coll_chunk_multi_ratio_ind(int mpio_coll_chunk_multi_ratio_in
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME, mpio_coll_chunk_multi_ratio_ind)
@@ -3658,8 +3658,8 @@ H5CX_test_set_mpio_coll_rank0_bcast(hbool_t mpio_coll_rank0_bcast)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_RANK0_BCAST_NAME, mpio_coll_rank0_bcast)
@@ -3691,8 +3691,8 @@ H5CX_set_no_selection_io_cause(uint32_t no_selection_io_cause)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert((*head)->ctx.dxpl_id != H5P_DEFAULT);
+ assert(head && *head);
+ assert((*head)->ctx.dxpl_id != H5P_DEFAULT);
/* If we're using the default DXPL, don't modify it */
if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT) {
@@ -3725,10 +3725,10 @@ H5CX_get_ohdr_flags(uint8_t *ohdr_flags)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(ohdr_flags);
+ assert(ohdr_flags);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
H5CX_RETRIEVE_PROP_VALID(dcpl, H5P_DATASET_CREATE_DEFAULT, H5O_CRT_OHDR_FLAGS_NAME, ohdr_flags)
@@ -3761,7 +3761,7 @@ H5CX__pop_common(hbool_t update_dxpl_props)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Check for cached DXPL properties to return to application */
if (update_dxpl_props) {
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index ed95bcd..3ad67a1 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -85,9 +85,9 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_name != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_name != NULL);
/* First, create a skip list */
if (NULL == (slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
@@ -101,7 +101,7 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (H5SL_insert(slist_ptr, entry_ptr, &(entry_ptr->addr)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "can't insert entry in skip list")
@@ -113,40 +113,40 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name)
* skip list -- scan the skip list generating the desired output.
*/
- HDfprintf(stdout, "\n\nDump of metadata cache \"%s\"\n", cache_name);
+ fprintf(stdout, "\n\nDump of metadata cache \"%s\"\n", cache_name);
/* Print header */
- HDfprintf(stdout, "Entry ");
- HDfprintf(stdout, "| Address ");
- HDfprintf(stdout, "| Tag ");
- HDfprintf(stdout, "| Size ");
- HDfprintf(stdout, "| Ring ");
- HDfprintf(stdout, "| Type ");
- HDfprintf(stdout, "| Prot/Pin/Dirty");
- HDfprintf(stdout, "\n");
-
- HDfprintf(stdout, "--------------------------------------------------------------------------------------"
- "--------------------------\n");
+ fprintf(stdout, "Entry ");
+ fprintf(stdout, "| Address ");
+ fprintf(stdout, "| Tag ");
+ fprintf(stdout, "| Size ");
+ fprintf(stdout, "| Ring ");
+ fprintf(stdout, "| Type ");
+ fprintf(stdout, "| Prot/Pin/Dirty");
+ fprintf(stdout, "\n");
+
+ fprintf(stdout, "--------------------------------------------------------------------------------------"
+ "--------------------------\n");
i = 0;
entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr);
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Print entry */
- HDfprintf(stdout, "%s%5d ", cache_ptr->prefix, i);
- HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr));
+ fprintf(stdout, "%s%5d ", cache_ptr->prefix, i);
+ fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr));
if (NULL == entry_ptr->tag_info)
- HDfprintf(stdout, " %16s ", "N/A");
+ fprintf(stdout, " %16s ", "N/A");
else
- HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag));
- HDfprintf(stdout, " %5lld ", (long long)(entry_ptr->size));
- HDfprintf(stdout, " %d ", (int)(entry_ptr->ring));
- HDfprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name));
- HDfprintf(stdout, " %d", (int)(entry_ptr->is_protected));
- HDfprintf(stdout, " %d", (int)(entry_ptr->is_pinned));
- HDfprintf(stdout, " %d", (int)(entry_ptr->is_dirty));
- HDfprintf(stdout, "\n");
+ fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag));
+ fprintf(stdout, " %5lld ", (long long)(entry_ptr->size));
+ fprintf(stdout, " %d ", (int)(entry_ptr->ring));
+ fprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name));
+ fprintf(stdout, " %d", (int)(entry_ptr->is_protected));
+ fprintf(stdout, " %d", (int)(entry_ptr->is_pinned));
+ fprintf(stdout, " %d", (int)(entry_ptr->is_dirty));
+ fprintf(stdout, "\n");
/* remove the next (first) item in the skip list */
entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr);
@@ -154,10 +154,10 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name)
i++;
} /* end while */
- HDfprintf(stdout, "\n\n");
+ fprintf(stdout, "\n\n");
/* Verify that all the entries were removed from the skip list */
- HDassert(H5SL_count(slist_ptr) == 0);
+ assert(H5SL_count(slist_ptr) == 0);
done:
/* Discard the skip list */
@@ -192,55 +192,55 @@ H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_name != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_name != NULL);
- HDfprintf(stdout, "\n\nDump of metadata cache LRU \"%s\"\n", cache_name);
- HDfprintf(stdout, "LRU len = %d, LRU size = %d\n", cache_ptr->LRU_list_len,
- (int)(cache_ptr->LRU_list_size));
- HDfprintf(stdout, "index_size = %d, max_cache_size = %d, delta = %d\n\n", (int)(cache_ptr->index_size),
- (int)(cache_ptr->max_cache_size),
- (int)(cache_ptr->max_cache_size) - (int)(cache_ptr->index_size));
+ fprintf(stdout, "\n\nDump of metadata cache LRU \"%s\"\n", cache_name);
+ fprintf(stdout, "LRU len = %d, LRU size = %d\n", cache_ptr->LRU_list_len,
+ (int)(cache_ptr->LRU_list_size));
+ fprintf(stdout, "index_size = %d, max_cache_size = %d, delta = %d\n\n", (int)(cache_ptr->index_size),
+ (int)(cache_ptr->max_cache_size),
+ (int)(cache_ptr->max_cache_size) - (int)(cache_ptr->index_size));
/* Print header */
- HDfprintf(stdout, "Entry ");
- HDfprintf(stdout, "| Address ");
- HDfprintf(stdout, "| Tag ");
- HDfprintf(stdout, "| Size ");
- HDfprintf(stdout, "| Ring ");
- HDfprintf(stdout, "| Type ");
- HDfprintf(stdout, "| Dirty");
- HDfprintf(stdout, "\n");
-
- HDfprintf(stdout, "--------------------------------------------------------------------------------------"
- "--------------------------\n");
+ fprintf(stdout, "Entry ");
+ fprintf(stdout, "| Address ");
+ fprintf(stdout, "| Tag ");
+ fprintf(stdout, "| Size ");
+ fprintf(stdout, "| Ring ");
+ fprintf(stdout, "| Type ");
+ fprintf(stdout, "| Dirty");
+ fprintf(stdout, "\n");
+
+ fprintf(stdout, "--------------------------------------------------------------------------------------"
+ "--------------------------\n");
entry_ptr = cache_ptr->LRU_head_ptr;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Print entry */
- HDfprintf(stdout, "%s%5d ", cache_ptr->prefix, i);
- HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr));
+ fprintf(stdout, "%s%5d ", cache_ptr->prefix, i);
+ fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr));
if (NULL == entry_ptr->tag_info)
- HDfprintf(stdout, " %16s ", "N/A");
+ fprintf(stdout, " %16s ", "N/A");
else
- HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag));
+ fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag));
- HDfprintf(stdout, " %5lld ", (long long)(entry_ptr->size));
- HDfprintf(stdout, " %d ", (int)(entry_ptr->ring));
- HDfprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name));
- HDfprintf(stdout, " %d", (int)(entry_ptr->is_dirty));
- HDfprintf(stdout, "\n");
+ fprintf(stdout, " %5lld ", (long long)(entry_ptr->size));
+ fprintf(stdout, " %d ", (int)(entry_ptr->ring));
+ fprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name));
+ fprintf(stdout, " %d", (int)(entry_ptr->is_dirty));
+ fprintf(stdout, "\n");
i++;
entry_ptr = entry_ptr->next;
} /* end while */
- HDfprintf(stdout, "--------------------------------------------------------------------------------------"
- "--------------------------\n");
+ fprintf(stdout, "--------------------------------------------------------------------------------------"
+ "--------------------------\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5C_dump_cache_LRU() */
@@ -272,21 +272,21 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn)
FUNC_ENTER_NOAPI_NOERR
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(calling_fcn != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(calling_fcn != NULL);
- HDfprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn);
- HDfprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled");
- HDfprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len);
- HDfprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size);
+ fprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn);
+ fprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled");
+ fprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len);
+ fprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size);
if (cache_ptr->slist_len > 0) {
/* If we get this far, all entries in the cache are listed in the
* skip list -- scan the skip list generating the desired output.
*/
- HDfprintf(stdout, "Num: Addr: Len: Prot/Pind: Dirty: Type:\n");
+ fprintf(stdout, "Num: Addr: Len: Prot/Pind: Dirty: Type:\n");
i = 0;
@@ -297,12 +297,12 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn)
entry_ptr = NULL;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDfprintf(stdout, "%s%d 0x%016llx %4lld %d/%d %d %s\n", cache_ptr->prefix, i,
- (long long)(entry_ptr->addr), (long long)(entry_ptr->size),
- (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty),
- entry_ptr->type->name);
- HDfprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr));
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ fprintf(stdout, "%s%d 0x%016llx %4lld %d/%d %d %s\n", cache_ptr->prefix, i,
+ (long long)(entry_ptr->addr), (long long)(entry_ptr->size),
+ (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty),
+ entry_ptr->type->name);
+ fprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr));
/* increment node_ptr before we delete its target */
node_ptr = H5SL_next(node_ptr);
@@ -315,7 +315,7 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn)
} /* end while */
} /* end if */
- HDfprintf(stdout, "\n\n");
+ fprintf(stdout, "\n\n");
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_dump_cache_skip_list() */
@@ -416,7 +416,7 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* This would normally be an assert, but we need to use an HGOTO_ERROR
* call to shut up the compiler.
@@ -481,157 +481,154 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
average_failed_search_depth =
((double)(cache_ptr->total_failed_ht_search_depth)) / ((double)(cache_ptr->failed_ht_searches));
- HDfprintf(stdout, "\n%sH5C: cache statistics for %s\n", cache_ptr->prefix, cache_name);
+ fprintf(stdout, "\n%sH5C: cache statistics for %s\n", cache_ptr->prefix, cache_name);
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
- HDfprintf(stdout, "%s hash table insertion / deletions = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->total_ht_insertions), (long)(cache_ptr->total_ht_deletions));
+ fprintf(stdout, "%s hash table insertion / deletions = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->total_ht_insertions), (long)(cache_ptr->total_ht_deletions));
- HDfprintf(stdout, "%s HT successful / failed searches = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->successful_ht_searches), (long)(cache_ptr->failed_ht_searches));
+ fprintf(stdout, "%s HT successful / failed searches = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->successful_ht_searches), (long)(cache_ptr->failed_ht_searches));
- HDfprintf(stdout, "%s Av. HT suc / failed search depth = %f / %f\n", cache_ptr->prefix,
- average_successful_search_depth, average_failed_search_depth);
+ fprintf(stdout, "%s Av. HT suc / failed search depth = %f / %f\n", cache_ptr->prefix,
+ average_successful_search_depth, average_failed_search_depth);
- HDfprintf(stdout, "%s current (max) index size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
- (long)(cache_ptr->index_size), (long)(cache_ptr->max_index_size),
- (unsigned long)(cache_ptr->index_len), (unsigned long)(cache_ptr->max_index_len));
+ fprintf(stdout, "%s current (max) index size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
+ (long)(cache_ptr->index_size), (long)(cache_ptr->max_index_size),
+ (unsigned long)(cache_ptr->index_len), (unsigned long)(cache_ptr->max_index_len));
- HDfprintf(stdout, "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n", cache_ptr->prefix,
- (long)(cache_ptr->clean_index_size), (long)(cache_ptr->max_clean_index_size),
- (long)(cache_ptr->dirty_index_size), (long)(cache_ptr->max_dirty_index_size));
+ fprintf(stdout, "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n", cache_ptr->prefix,
+ (long)(cache_ptr->clean_index_size), (long)(cache_ptr->max_clean_index_size),
+ (long)(cache_ptr->dirty_index_size), (long)(cache_ptr->max_dirty_index_size));
- HDfprintf(stdout, "%s current (max) slist size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
- (long)(cache_ptr->slist_size), (long)(cache_ptr->max_slist_size),
- (unsigned long)(cache_ptr->slist_len), (unsigned long)(cache_ptr->max_slist_len));
+ fprintf(stdout, "%s current (max) slist size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
+ (long)(cache_ptr->slist_size), (long)(cache_ptr->max_slist_size),
+ (unsigned long)(cache_ptr->slist_len), (unsigned long)(cache_ptr->max_slist_len));
- HDfprintf(stdout, "%s current (max) PL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
- (long)(cache_ptr->pl_size), (long)(cache_ptr->max_pl_size), (unsigned long)(cache_ptr->pl_len),
- (unsigned long)(cache_ptr->max_pl_len));
+ fprintf(stdout, "%s current (max) PL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
+ (long)(cache_ptr->pl_size), (long)(cache_ptr->max_pl_size), (unsigned long)(cache_ptr->pl_len),
+ (unsigned long)(cache_ptr->max_pl_len));
- HDfprintf(stdout, "%s current (max) PEL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
- (long)(cache_ptr->pel_size), (long)(cache_ptr->max_pel_size),
- (unsigned long)(cache_ptr->pel_len), (unsigned long)(cache_ptr->max_pel_len));
+ fprintf(stdout, "%s current (max) PEL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
+ (long)(cache_ptr->pel_size), (long)(cache_ptr->max_pel_size), (unsigned long)(cache_ptr->pel_len),
+ (unsigned long)(cache_ptr->max_pel_len));
- HDfprintf(stdout, "%s current LRU list size / length = %ld / %lu\n", cache_ptr->prefix,
- (long)(cache_ptr->LRU_list_size), (unsigned long)(cache_ptr->LRU_list_len));
+ fprintf(stdout, "%s current LRU list size / length = %ld / %lu\n", cache_ptr->prefix,
+ (long)(cache_ptr->LRU_list_size), (unsigned long)(cache_ptr->LRU_list_len));
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- HDfprintf(stdout, "%s current clean LRU size / length = %ld / %lu\n", cache_ptr->prefix,
- (long)(cache_ptr->cLRU_list_size), (unsigned long)(cache_ptr->cLRU_list_len));
+ fprintf(stdout, "%s current clean LRU size / length = %ld / %lu\n", cache_ptr->prefix,
+ (long)(cache_ptr->cLRU_list_size), (unsigned long)(cache_ptr->cLRU_list_len));
- HDfprintf(stdout, "%s current dirty LRU size / length = %ld / %lu\n", cache_ptr->prefix,
- (long)(cache_ptr->dLRU_list_size), (unsigned long)(cache_ptr->dLRU_list_len));
+ fprintf(stdout, "%s current dirty LRU size / length = %ld / %lu\n", cache_ptr->prefix,
+ (long)(cache_ptr->dLRU_list_size), (unsigned long)(cache_ptr->dLRU_list_len));
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
- HDfprintf(stdout, "%s Total hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
- (long)total_hits, (long)total_misses, hit_rate);
+ fprintf(stdout, "%s Total hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
+ (long)total_hits, (long)total_misses, hit_rate);
- HDfprintf(stdout, "%s Total write / read (max) protects = %ld / %ld (%ld)\n", cache_ptr->prefix,
- (long)total_write_protects, (long)total_read_protects, (long)max_read_protects);
+ fprintf(stdout, "%s Total write / read (max) protects = %ld / %ld (%ld)\n", cache_ptr->prefix,
+ (long)total_write_protects, (long)total_read_protects, (long)max_read_protects);
- HDfprintf(stdout, "%s Total clears / flushes = %ld / %ld\n", cache_ptr->prefix,
- (long)total_clears, (long)total_flushes);
+ fprintf(stdout, "%s Total clears / flushes = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_clears, (long)total_flushes);
- HDfprintf(stdout, "%s Total evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix,
- (long)total_evictions, (long)total_take_ownerships);
+ fprintf(stdout, "%s Total evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_evictions, (long)total_take_ownerships);
- HDfprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
- (long)total_insertions, (long)total_pinned_insertions, (long)total_moves);
+ fprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
+ (long)total_insertions, (long)total_pinned_insertions, (long)total_moves);
- HDfprintf(stdout, "%s Total entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
- (long)total_entry_flush_moves, (long)total_cache_flush_moves);
+ fprintf(stdout, "%s Total entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_entry_flush_moves, (long)total_cache_flush_moves);
- HDfprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n", cache_ptr->prefix,
- (long)total_size_increases, (long)total_size_decreases);
+ fprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_size_increases, (long)total_size_decreases);
- HDfprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
- (long)total_entry_flush_size_changes, (long)total_cache_flush_size_changes);
+ fprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_entry_flush_size_changes, (long)total_cache_flush_size_changes);
- HDfprintf(stdout, "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n", cache_ptr->prefix,
- (long)total_pins, (long)total_dirty_pins, (long)total_unpins);
+ fprintf(stdout, "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n", cache_ptr->prefix,
+ (long)total_pins, (long)total_dirty_pins, (long)total_unpins);
- HDfprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n", cache_ptr->prefix,
- (long)total_pinned_flushes, (long)total_pinned_clears);
+ fprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_pinned_flushes, (long)total_pinned_clears);
- HDfprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->calls_to_msic));
+ fprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->calls_to_msic));
if (cache_ptr->calls_to_msic > 0)
average_entries_skipped_per_calls_to_msic =
(((double)(cache_ptr->total_entries_skipped_in_msic)) / ((double)(cache_ptr->calls_to_msic)));
- HDfprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n", cache_ptr->prefix,
- (double)average_entries_skipped_per_calls_to_msic,
- (long)(cache_ptr->max_entries_skipped_in_msic));
+ fprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n", cache_ptr->prefix,
+ (double)average_entries_skipped_per_calls_to_msic,
+ (long)(cache_ptr->max_entries_skipped_in_msic));
if (cache_ptr->calls_to_msic > 0)
average_dirty_pf_entries_skipped_per_call_to_msic =
(((double)(cache_ptr->total_dirty_pf_entries_skipped_in_msic)) /
((double)(cache_ptr->calls_to_msic)));
- HDfprintf(stdout, "%s MSIC: Average/max dirty pf entries skipped = %lf / %ld\n", cache_ptr->prefix,
- average_dirty_pf_entries_skipped_per_call_to_msic,
- (long)(cache_ptr->max_dirty_pf_entries_skipped_in_msic));
+ fprintf(stdout, "%s MSIC: Average/max dirty pf entries skipped = %lf / %ld\n", cache_ptr->prefix,
+ average_dirty_pf_entries_skipped_per_call_to_msic,
+ (long)(cache_ptr->max_dirty_pf_entries_skipped_in_msic));
if (cache_ptr->calls_to_msic > 0)
average_entries_scanned_per_calls_to_msic =
(((double)(cache_ptr->total_entries_scanned_in_msic)) / ((double)(cache_ptr->calls_to_msic)));
- HDfprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n", cache_ptr->prefix,
- (double)average_entries_scanned_per_calls_to_msic,
- (long)(cache_ptr->max_entries_scanned_in_msic));
+ fprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n", cache_ptr->prefix,
+ (double)average_entries_scanned_per_calls_to_msic,
+ (long)(cache_ptr->max_entries_scanned_in_msic));
- HDfprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->entries_scanned_to_make_space));
+ fprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->entries_scanned_to_make_space));
- HDfprintf(
- stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space));
+ fprintf(stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space));
- HDfprintf(stdout, "%s slist/LRU/index scan restarts = %lld / %lld / %lld.\n", cache_ptr->prefix,
- (long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts),
- (long long)(cache_ptr->index_scan_restarts));
+ fprintf(stdout, "%s slist/LRU/index scan restarts = %lld / %lld / %lld.\n", cache_ptr->prefix,
+ (long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts),
+ (long long)(cache_ptr->index_scan_restarts));
- HDfprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n",
- cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded,
- cache_ptr->last_image_size);
+ fprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n",
+ cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded,
+ cache_ptr->last_image_size);
- HDfprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches));
+ fprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches));
- HDfprintf(stdout, "%s prefetch hits/flushes/evictions = %lld / %lld / %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->prefetch_hits),
- (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]),
- (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]));
+ fprintf(stdout, "%s prefetch hits/flushes/evictions = %lld / %lld / %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->prefetch_hits), (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]),
+ (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]));
if (cache_ptr->prefetches > 0)
prefetch_use_rate = 100.0 * ((double)(cache_ptr->prefetch_hits)) / ((double)(cache_ptr->prefetches));
else
prefetch_use_rate = 0.0;
- HDfprintf(stdout, "%s prefetched entry use rate = %lf\n", cache_ptr->prefix, prefetch_use_rate);
+ fprintf(stdout, "%s prefetched entry use rate = %lf\n", cache_ptr->prefix, prefetch_use_rate);
#if H5C_COLLECT_CACHE_ENTRY_STATS
- HDfprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", cache_ptr->prefix,
- (int)aggregate_max_accesses, (int)aggregate_min_accesses);
+ fprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", cache_ptr->prefix,
+ (int)aggregate_max_accesses, (int)aggregate_min_accesses);
- HDfprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
- (int)aggregate_max_clears, (int)aggregate_max_flushes);
+ fprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
+ (int)aggregate_max_clears, (int)aggregate_max_flushes);
- HDfprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n", cache_ptr->prefix,
- (int)aggregate_max_size, (int)aggregate_max_pins);
+ fprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n", cache_ptr->prefix,
+ (int)aggregate_max_size, (int)aggregate_max_pins);
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
if (display_detailed_stats) {
for (i = 0; i <= cache_ptr->max_type_id; i++) {
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
- HDfprintf(stdout, "%s Stats on %s:\n", cache_ptr->prefix,
- ((cache_ptr->class_table_ptr))[i]->name);
+ fprintf(stdout, "%s Stats on %s:\n", cache_ptr->prefix, ((cache_ptr->class_table_ptr))[i]->name);
if ((cache_ptr->hits[i] > 0) || (cache_ptr->misses[i] > 0))
hit_rate = 100.0 * ((double)(cache_ptr->hits[i])) /
@@ -639,56 +636,56 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
else
hit_rate = 0.0;
- HDfprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
- (long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]), hit_rate);
+ fprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
+ (long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]), hit_rate);
- HDfprintf(stdout, "%s write / read (max) protects = %ld / %ld (%d)\n", cache_ptr->prefix,
- (long)(cache_ptr->write_protects[i]), (long)(cache_ptr->read_protects[i]),
- (int)(cache_ptr->max_read_protects[i]));
+ fprintf(stdout, "%s write / read (max) protects = %ld / %ld (%d)\n", cache_ptr->prefix,
+ (long)(cache_ptr->write_protects[i]), (long)(cache_ptr->read_protects[i]),
+ (int)(cache_ptr->max_read_protects[i]));
- HDfprintf(stdout, "%s clears / flushes = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->clears[i]), (long)(cache_ptr->flushes[i]));
+ fprintf(stdout, "%s clears / flushes = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->clears[i]), (long)(cache_ptr->flushes[i]));
- HDfprintf(stdout, "%s evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->evictions[i]), (long)(cache_ptr->take_ownerships[i]));
+ fprintf(stdout, "%s evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->evictions[i]), (long)(cache_ptr->take_ownerships[i]));
- HDfprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->insertions[i]), (long)(cache_ptr->pinned_insertions[i]),
- (long)(cache_ptr->moves[i]));
+ fprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->insertions[i]), (long)(cache_ptr->pinned_insertions[i]),
+ (long)(cache_ptr->moves[i]));
- HDfprintf(stdout, "%s entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->entry_flush_moves[i]), (long)(cache_ptr->cache_flush_moves[i]));
+ fprintf(stdout, "%s entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->entry_flush_moves[i]), (long)(cache_ptr->cache_flush_moves[i]));
- HDfprintf(stdout, "%s size increases / decreases = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->size_increases[i]), (long)(cache_ptr->size_decreases[i]));
+ fprintf(stdout, "%s size increases / decreases = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->size_increases[i]), (long)(cache_ptr->size_decreases[i]));
- HDfprintf(stdout, "%s entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->entry_flush_size_changes[i]),
- (long)(cache_ptr->cache_flush_size_changes[i]));
+ fprintf(stdout, "%s entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->entry_flush_size_changes[i]),
+ (long)(cache_ptr->cache_flush_size_changes[i]));
- HDfprintf(stdout, "%s entry pins / unpins = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->pins[i]), (long)(cache_ptr->unpins[i]));
+ fprintf(stdout, "%s entry pins / unpins = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->pins[i]), (long)(cache_ptr->unpins[i]));
- HDfprintf(stdout, "%s entry dirty pins/pin'd flushes = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->dirty_pins[i]), (long)(cache_ptr->pinned_flushes[i]));
+ fprintf(stdout, "%s entry dirty pins/pin'd flushes = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->dirty_pins[i]), (long)(cache_ptr->pinned_flushes[i]));
#if H5C_COLLECT_CACHE_ENTRY_STATS
- HDfprintf(stdout, "%s entry max / min accesses = %d / %d\n", cache_ptr->prefix,
- cache_ptr->max_accesses[i], cache_ptr->min_accesses[i]);
+ fprintf(stdout, "%s entry max / min accesses = %d / %d\n", cache_ptr->prefix,
+ cache_ptr->max_accesses[i], cache_ptr->min_accesses[i]);
- HDfprintf(stdout, "%s entry max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
- cache_ptr->max_clears[i], cache_ptr->max_flushes[i]);
+ fprintf(stdout, "%s entry max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
+ cache_ptr->max_clears[i], cache_ptr->max_flushes[i]);
- HDfprintf(stdout, "%s entry max_size / max_pins = %d / %d\n", cache_ptr->prefix,
- (int)(cache_ptr->max_size[i]), (int)(cache_ptr->max_pins[i]));
+ fprintf(stdout, "%s entry max_size / max_pins = %d / %d\n", cache_ptr->prefix,
+ (int)(cache_ptr->max_size[i]), (int)(cache_ptr->max_pins[i]));
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
} /* end for */
} /* end if */
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -723,8 +720,8 @@ H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr)
int i;
#endif /* H5C_COLLECT_CACHE_STATS */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
#if H5C_COLLECT_CACHE_STATS
for (i = 0; i <= cache_ptr->max_type_id; i++) {
@@ -847,29 +844,29 @@ H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, haddr_t child
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(parent_addr));
- HDassert(H5F_addr_defined(child_addr));
- HDassert(fd_exists_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(parent_addr));
+ assert(H5F_addr_defined(child_addr));
+ assert(fd_exists_ptr);
H5C__SEARCH_INDEX(cache_ptr, parent_addr, parent_ptr, FAIL)
H5C__SEARCH_INDEX(cache_ptr, child_addr, child_ptr, FAIL)
if (parent_ptr && child_ptr) {
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(child_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(child_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (child_ptr->flush_dep_nparents > 0) {
unsigned u; /* Local index variable */
- HDassert(child_ptr->flush_dep_parent);
- HDassert(child_ptr->flush_dep_parent_nalloc >= child_ptr->flush_dep_nparents);
+ assert(child_ptr->flush_dep_parent);
+ assert(child_ptr->flush_dep_parent_nalloc >= child_ptr->flush_dep_nparents);
for (u = 0; u < child_ptr->flush_dep_nparents; u++) {
if (child_ptr->flush_dep_parent[u] == parent_ptr) {
fd_exists = TRUE;
- HDassert(parent_ptr->flush_dep_nchildren > 0);
+ assert(parent_ptr->flush_dep_nchildren > 0);
break;
} /* end if */
} /* end for */
@@ -918,8 +915,8 @@ H5C_validate_index_list(H5C_t *cache_ptr)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
for (i = 0; i < H5C_RING_NTYPES; i++) {
index_ring_len[i] = 0;
@@ -952,8 +949,8 @@ H5C_validate_index_list(H5C_t *cache_ptr)
((entry_ptr->il_next == NULL) || (entry_ptr->il_next->il_prev != entry_ptr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list pointers for entry are invalid")
- HDassert(entry_ptr->ring > 0);
- HDassert(entry_ptr->ring < H5C_RING_NTYPES);
+ assert(entry_ptr->ring > 0);
+ assert(entry_ptr->ring < H5C_RING_NTYPES);
len++;
index_ring_len[entry_ptr->ring] += 1;
@@ -993,7 +990,7 @@ H5C_validate_index_list(H5C_t *cache_ptr)
done:
if (ret_value != SUCCEED)
- HDassert(0);
+ assert(0);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_validate_index_list() */
@@ -1045,10 +1042,10 @@ H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr, void **entry_ptr_ptr
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
- HDassert(entry_ptr_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
+ assert(entry_ptr_ptr);
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
@@ -1089,8 +1086,8 @@ H5C_get_serialization_in_progress(const H5C_t *cache_ptr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
FUNC_LEAVE_NOAPI(cache_ptr->serialization_in_progress)
} /* H5C_get_serialization_in_progress() */
@@ -1123,10 +1120,10 @@ H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(inner_ring >= H5C_RING_USER);
- HDassert(inner_ring <= H5C_RING_SB);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(inner_ring >= H5C_RING_USER);
+ assert(inner_ring <= H5C_RING_SB);
while (ring <= inner_ring) {
if (cache_ptr->dirty_index_ring_size[ring] > 0)
@@ -1176,12 +1173,12 @@ H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expecte
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
- HDassert(expected_type);
- HDassert(in_cache_ptr);
- HDassert(type_ok_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
+ assert(expected_type);
+ assert(in_cache_ptr);
+ assert(type_ok_ptr);
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index b8f46f1..b6e5712 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -95,13 +95,13 @@
#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_READ(cache_ptr) \
{ \
/* make sure image len is still good */ \
- HDassert((cache_ptr)->image_len > 0); \
+ assert((cache_ptr)->image_len > 0); \
(cache_ptr)->images_read++; \
}
#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_LOAD(cache_ptr) \
{ \
/* make sure image len is still good */ \
- HDassert((cache_ptr)->image_len > 0); \
+ assert((cache_ptr)->image_len > 0); \
(cache_ptr)->images_loaded++; \
(cache_ptr)->last_image_size = (cache_ptr)->image_len; \
}
@@ -195,8 +195,8 @@ H5C_cache_image_pending(const H5C_t *cache_ptr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
ret_value = (cache_ptr->load_image && !cache_ptr->image_loaded);
@@ -233,13 +233,13 @@ H5C_cache_image_status(H5F_t *f, hbool_t *load_ci_ptr, hbool_t *write_ci_ptr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(load_ci_ptr);
- HDassert(write_ci_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(load_ci_ptr);
+ assert(write_ci_ptr);
*load_ci_ptr = cache_ptr->load_image || cache_ptr->image_loaded;
*write_ci_ptr = cache_ptr->image_ctl.generate_image;
@@ -274,17 +274,17 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->image_ctl.generate_image);
- HDassert(cache_ptr->num_entries_in_image > 0);
- HDassert(cache_ptr->index_len == 0);
- HDassert(cache_ptr->image_data_len > 0);
- HDassert(cache_ptr->image_data_len <= cache_ptr->image_len);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->image_ctl.generate_image);
+ assert(cache_ptr->num_entries_in_image > 0);
+ assert(cache_ptr->index_len == 0);
+ assert(cache_ptr->image_data_len > 0);
+ assert(cache_ptr->image_data_len <= cache_ptr->image_len);
/* Allocate the buffer in which to construct the cache image block */
if (NULL == (cache_ptr->image_buffer = H5MM_malloc(cache_ptr->image_len + 1)))
@@ -294,13 +294,13 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
p = (uint8_t *)cache_ptr->image_buffer;
if (H5C__encode_cache_image_header(f, cache_ptr, &p) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTENCODE, FAIL, "header image construction failed")
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_data_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_data_len);
/* Construct the cache entry images */
for (u = 0; u < cache_ptr->num_entries_in_image; u++)
if (H5C__encode_cache_image_entry(f, cache_ptr, &p, u) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTENCODE, FAIL, "entry image construction failed")
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_data_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_data_len);
/* Construct the adaptive resize status image -- not yet */
@@ -308,8 +308,8 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
chksum = H5_checksum_metadata(cache_ptr->image_buffer,
(size_t)(cache_ptr->image_data_len - H5F_SIZEOF_CHKSUM), 0);
UINT32ENCODE(p, chksum);
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) == cache_ptr->image_data_len);
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) <= cache_ptr->image_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) == cache_ptr->image_data_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) <= cache_ptr->image_len);
#ifndef NDEBUG
/* validate the metadata cache image we just constructed by decoding it
@@ -323,21 +323,21 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
herr_t status; /* Status from decoding */
fake_cache_ptr = (H5C_t *)H5MM_malloc(sizeof(H5C_t));
- HDassert(fake_cache_ptr);
+ assert(fake_cache_ptr);
fake_cache_ptr->magic = H5C__H5C_T_MAGIC;
/* needed for sanity checks */
fake_cache_ptr->image_len = cache_ptr->image_len;
q = (const uint8_t *)cache_ptr->image_buffer;
status = H5C__decode_cache_image_header(f, fake_cache_ptr, &q);
- HDassert(status >= 0);
+ assert(status >= 0);
- HDassert(NULL != p);
- HDassert(fake_cache_ptr->num_entries_in_image == cache_ptr->num_entries_in_image);
+ assert(NULL != p);
+ assert(fake_cache_ptr->num_entries_in_image == cache_ptr->num_entries_in_image);
fake_cache_ptr->image_entries = (H5C_image_entry_t *)H5MM_malloc(
sizeof(H5C_image_entry_t) * (size_t)(fake_cache_ptr->num_entries_in_image + 1));
- HDassert(fake_cache_ptr->image_entries);
+ assert(fake_cache_ptr->image_entries);
for (u = 0; u < fake_cache_ptr->num_entries_in_image; u++) {
fake_cache_ptr->image_entries[u].magic = H5C_IMAGE_ENTRY_T_MAGIC;
@@ -346,58 +346,58 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
/* touch up f->shared->cache to satisfy sanity checks... */
f->shared->cache = fake_cache_ptr;
status = H5C__decode_cache_image_entry(f, fake_cache_ptr, &q, u);
- HDassert(status >= 0);
+ assert(status >= 0);
/* ...and then return f->shared->cache to its correct value */
f->shared->cache = cache_ptr;
/* verify expected contents */
- HDassert(cache_ptr->image_entries[u].addr == fake_cache_ptr->image_entries[u].addr);
- HDassert(cache_ptr->image_entries[u].size == fake_cache_ptr->image_entries[u].size);
- HDassert(cache_ptr->image_entries[u].type_id == fake_cache_ptr->image_entries[u].type_id);
- HDassert(cache_ptr->image_entries[u].lru_rank == fake_cache_ptr->image_entries[u].lru_rank);
- HDassert(cache_ptr->image_entries[u].is_dirty == fake_cache_ptr->image_entries[u].is_dirty);
+ assert(cache_ptr->image_entries[u].addr == fake_cache_ptr->image_entries[u].addr);
+ assert(cache_ptr->image_entries[u].size == fake_cache_ptr->image_entries[u].size);
+ assert(cache_ptr->image_entries[u].type_id == fake_cache_ptr->image_entries[u].type_id);
+ assert(cache_ptr->image_entries[u].lru_rank == fake_cache_ptr->image_entries[u].lru_rank);
+ assert(cache_ptr->image_entries[u].is_dirty == fake_cache_ptr->image_entries[u].is_dirty);
/* don't check image_fd_height as it is not stored in
* the metadata cache image block.
*/
- HDassert(cache_ptr->image_entries[u].fd_child_count ==
- fake_cache_ptr->image_entries[u].fd_child_count);
- HDassert(cache_ptr->image_entries[u].fd_dirty_child_count ==
- fake_cache_ptr->image_entries[u].fd_dirty_child_count);
- HDassert(cache_ptr->image_entries[u].fd_parent_count ==
- fake_cache_ptr->image_entries[u].fd_parent_count);
+ assert(cache_ptr->image_entries[u].fd_child_count ==
+ fake_cache_ptr->image_entries[u].fd_child_count);
+ assert(cache_ptr->image_entries[u].fd_dirty_child_count ==
+ fake_cache_ptr->image_entries[u].fd_dirty_child_count);
+ assert(cache_ptr->image_entries[u].fd_parent_count ==
+ fake_cache_ptr->image_entries[u].fd_parent_count);
for (v = 0; v < cache_ptr->image_entries[u].fd_parent_count; v++)
- HDassert(cache_ptr->image_entries[u].fd_parent_addrs[v] ==
- fake_cache_ptr->image_entries[u].fd_parent_addrs[v]);
+ assert(cache_ptr->image_entries[u].fd_parent_addrs[v] ==
+ fake_cache_ptr->image_entries[u].fd_parent_addrs[v]);
/* free the fd_parent_addrs array if it exists */
if (fake_cache_ptr->image_entries[u].fd_parent_addrs) {
- HDassert(fake_cache_ptr->image_entries[u].fd_parent_count > 0);
+ assert(fake_cache_ptr->image_entries[u].fd_parent_count > 0);
fake_cache_ptr->image_entries[u].fd_parent_addrs =
(haddr_t *)H5MM_xfree(fake_cache_ptr->image_entries[u].fd_parent_addrs);
fake_cache_ptr->image_entries[u].fd_parent_count = 0;
} /* end if */
else
- HDassert(fake_cache_ptr->image_entries[u].fd_parent_count == 0);
+ assert(fake_cache_ptr->image_entries[u].fd_parent_count == 0);
- HDassert(cache_ptr->image_entries[u].image_ptr);
- HDassert(fake_cache_ptr->image_entries[u].image_ptr);
- HDassert(!HDmemcmp(cache_ptr->image_entries[u].image_ptr,
- fake_cache_ptr->image_entries[u].image_ptr, cache_ptr->image_entries[u].size));
+ assert(cache_ptr->image_entries[u].image_ptr);
+ assert(fake_cache_ptr->image_entries[u].image_ptr);
+ assert(!memcmp(cache_ptr->image_entries[u].image_ptr, fake_cache_ptr->image_entries[u].image_ptr,
+ cache_ptr->image_entries[u].size));
fake_cache_ptr->image_entries[u].image_ptr =
H5MM_xfree(fake_cache_ptr->image_entries[u].image_ptr);
} /* end for */
- HDassert((size_t)(q - (const uint8_t *)cache_ptr->image_buffer) ==
- cache_ptr->image_data_len - H5F_SIZEOF_CHKSUM);
+ assert((size_t)(q - (const uint8_t *)cache_ptr->image_buffer) ==
+ cache_ptr->image_data_len - H5F_SIZEOF_CHKSUM);
/* compute the checksum */
old_chksum = chksum;
chksum = H5_checksum_metadata(cache_ptr->image_buffer,
(size_t)(cache_ptr->image_data_len - H5F_SIZEOF_CHKSUM), 0);
- HDassert(chksum == old_chksum);
+ assert(chksum == old_chksum);
fake_cache_ptr->image_entries = (H5C_image_entry_t *)H5MM_xfree(fake_cache_ptr->image_entries);
fake_cache_ptr = (H5C_t *)H5MM_xfree(fake_cache_ptr);
@@ -429,11 +429,11 @@ H5C__generate_cache_image(H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Construct cache image */
if (H5C__construct_cache_image_buffer(f, cache_ptr) < 0)
@@ -452,7 +452,7 @@ H5C__generate_cache_image(H5F_t *f, H5C_t *cache_ptr)
} /* end if */
/* Free cache image buffer */
- HDassert(cache_ptr->image_buffer);
+ assert(cache_ptr->image_buffer);
cache_ptr->image_buffer = H5MM_xfree(cache_ptr->image_buffer);
done:
@@ -521,56 +521,56 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
FUNC_ENTER_PACKAGE
/* sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(f->shared->cache == cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(entry_ptr_ptr);
- HDassert(*entry_ptr_ptr);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(f->shared->cache == cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(entry_ptr_ptr);
+ assert(*entry_ptr_ptr);
pf_entry_ptr = *entry_ptr_ptr;
- HDassert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(pf_entry_ptr->type);
- HDassert(pf_entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
- HDassert(pf_entry_ptr->prefetched);
- HDassert(pf_entry_ptr->image_up_to_date);
- HDassert(pf_entry_ptr->image_ptr);
- HDassert(pf_entry_ptr->size > 0);
- HDassert(pf_entry_ptr->addr == addr);
- HDassert(type);
- HDassert(type->id == pf_entry_ptr->prefetch_type_id);
- HDassert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
+ assert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(pf_entry_ptr->type);
+ assert(pf_entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
+ assert(pf_entry_ptr->prefetched);
+ assert(pf_entry_ptr->image_up_to_date);
+ assert(pf_entry_ptr->image_ptr);
+ assert(pf_entry_ptr->size > 0);
+ assert(pf_entry_ptr->addr == addr);
+ assert(type);
+ assert(type->id == pf_entry_ptr->prefetch_type_id);
+ assert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
/* verify absence of prohibited or unsupported type flag combinations */
- HDassert(!(type->flags & H5C__CLASS_SKIP_READS));
+ assert(!(type->flags & H5C__CLASS_SKIP_READS));
/* Can't see how skip reads could be usefully combined with
* either the speculative read flag. Hence disallow.
*/
- HDassert(!((type->flags & H5C__CLASS_SKIP_READS) && (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)));
- HDassert(H5F_addr_defined(addr));
- HDassert(type->get_initial_load_size);
- HDassert(type->deserialize);
+ assert(!((type->flags & H5C__CLASS_SKIP_READS) && (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)));
+ assert(H5F_addr_defined(addr));
+ assert(type->get_initial_load_size);
+ assert(type->deserialize);
/* if *pf_entry_ptr is a flush dependency child, destroy all such
* relationships now. The client will restore the relationship(s) with
* the deserialized entry if appropriate.
*/
- HDassert(pf_entry_ptr->fd_parent_count == pf_entry_ptr->flush_dep_nparents);
+ assert(pf_entry_ptr->fd_parent_count == pf_entry_ptr->flush_dep_nparents);
for (i = (int)(pf_entry_ptr->fd_parent_count) - 1; i >= 0; i--) {
- HDassert(pf_entry_ptr->flush_dep_parent);
- HDassert(pf_entry_ptr->flush_dep_parent[i]);
- HDassert(pf_entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(pf_entry_ptr->flush_dep_parent[i]->flush_dep_nchildren > 0);
- HDassert(pf_entry_ptr->fd_parent_addrs);
- HDassert(pf_entry_ptr->flush_dep_parent[i]->addr == pf_entry_ptr->fd_parent_addrs[i]);
+ assert(pf_entry_ptr->flush_dep_parent);
+ assert(pf_entry_ptr->flush_dep_parent[i]);
+ assert(pf_entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(pf_entry_ptr->flush_dep_parent[i]->flush_dep_nchildren > 0);
+ assert(pf_entry_ptr->fd_parent_addrs);
+ assert(pf_entry_ptr->flush_dep_parent[i]->addr == pf_entry_ptr->fd_parent_addrs[i]);
if (H5C_destroy_flush_dependency(pf_entry_ptr->flush_dep_parent[i], pf_entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "can't destroy pf entry parent flush dependency")
pf_entry_ptr->fd_parent_addrs[i] = HADDR_UNDEF;
} /* end for */
- HDassert(pf_entry_ptr->flush_dep_nparents == 0);
+ assert(pf_entry_ptr->flush_dep_nparents == 0);
/* If *pf_entry_ptr is a flush dependency parent, destroy its flush
* dependency relationships with all its children (which must be
@@ -616,7 +616,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
*
* In the following assert:
*
- * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
+ * assert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
*
* note that type ids 5 & 6 are associated with object headers in the
* metadata cache.
@@ -633,13 +633,13 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
* hence the value assigned to ds_entry_ptr->is_dirty below.
*/
- HDassert((dirty == FALSE) || (type->id == 5 || type->id == 6));
+ assert((dirty == FALSE) || (type->id == 5 || type->id == 6));
ds_entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
ds_entry_ptr->cache_ptr = f->shared->cache;
ds_entry_ptr->addr = addr;
ds_entry_ptr->size = len;
- HDassert(ds_entry_ptr->size < H5C_MAX_ENTRY_SIZE);
+ assert(ds_entry_ptr->size < H5C_MAX_ENTRY_SIZE);
ds_entry_ptr->image_ptr = pf_entry_ptr->image_ptr;
ds_entry_ptr->image_up_to_date = !dirty;
ds_entry_ptr->type = type;
@@ -733,8 +733,8 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
pf_entry_ptr->image_ptr = NULL;
if (pf_entry_ptr->is_dirty) {
- HDassert(((cache_ptr->slist_enabled) && (pf_entry_ptr->in_slist)) ||
- ((!cache_ptr->slist_enabled) && (!pf_entry_ptr->in_slist)));
+ assert(((cache_ptr->slist_enabled) && (pf_entry_ptr->in_slist)) ||
+ ((!cache_ptr->slist_enabled) && (!pf_entry_ptr->in_slist)));
flush_flags |= H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG;
} /* end if */
@@ -745,13 +745,13 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
#ifndef NDEGUG /* verify deletion */
H5C__SEARCH_INDEX(cache_ptr, addr, pf_entry_ptr, FAIL);
- HDassert(NULL == pf_entry_ptr);
+ assert(NULL == pf_entry_ptr);
#endif /* NDEBUG */
/* Insert the deserialized entry into the cache. */
H5C__INSERT_IN_INDEX(cache_ptr, ds_entry_ptr, FAIL)
- HDassert(!ds_entry_ptr->in_slist);
+ assert(!ds_entry_ptr->in_slist);
if (ds_entry_ptr->is_dirty)
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, ds_entry_ptr, FAIL)
@@ -777,10 +777,10 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
ds_entry_ptr->is_protected = TRUE;
while (fd_children[i] != NULL) {
/* Sanity checks */
- HDassert((fd_children[i])->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert((fd_children[i])->prefetched);
- HDassert((fd_children[i])->fd_parent_count > 0);
- HDassert((fd_children[i])->fd_parent_addrs);
+ assert((fd_children[i])->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert((fd_children[i])->prefetched);
+ assert((fd_children[i])->fd_parent_count > 0);
+ assert((fd_children[i])->fd_parent_addrs);
#ifndef NDEBUG
{
@@ -795,7 +795,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
j++;
} /* end while */
- HDassert(found);
+ assert(found);
}
#endif /* NDEBUG */
@@ -808,7 +808,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, ds_entry_ptr, FAIL);
ds_entry_ptr->is_protected = FALSE;
} /* end if ( fd_children != NULL ) */
- HDassert((unsigned)i == ds_entry_ptr->fd_child_count);
+ assert((unsigned)i == ds_entry_ptr->fd_child_count);
ds_entry_ptr->fd_child_count = 0;
H5C__UPDATE_STATS_FOR_PREFETCH_HIT(cache_ptr)
@@ -851,11 +851,11 @@ H5C__free_image_entries_array(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->image_ctl.generate_image);
- HDassert(cache_ptr->index_len == 0);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->image_ctl.generate_image);
+ assert(cache_ptr->index_len == 0);
/* Check for entries to free */
if (cache_ptr->image_entries != NULL) {
@@ -868,18 +868,18 @@ H5C__free_image_entries_array(H5C_t *cache_ptr)
ie_ptr = &(cache_ptr->image_entries[u]);
/* Sanity checks */
- HDassert(ie_ptr);
- HDassert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
- HDassert(ie_ptr->image_ptr);
+ assert(ie_ptr);
+ assert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
+ assert(ie_ptr->image_ptr);
/* Free the parent addrs array if appropriate */
if (ie_ptr->fd_parent_addrs) {
- HDassert(ie_ptr->fd_parent_count > 0);
+ assert(ie_ptr->fd_parent_count > 0);
ie_ptr->fd_parent_addrs = (haddr_t *)H5MM_xfree(ie_ptr->fd_parent_addrs);
} /* end if */
else
- HDassert(ie_ptr->fd_parent_count == 0);
+ assert(ie_ptr->fd_parent_count == 0);
/* Free the image */
ie_ptr->image_ptr = H5MM_xfree(ie_ptr->image_ptr);
@@ -977,16 +977,15 @@ H5C_image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header)
prefetch_use_rate = 0.0;
if (print_header) {
- HDfprintf(stdout, "\nhit prefetches prefetch image pf hit\n");
- HDfprintf(stdout, "rate: total: dirty: hits: flshs: evct: size: rate:\n");
+ fprintf(stdout, "\nhit prefetches prefetch image pf hit\n");
+ fprintf(stdout, "rate: total: dirty: hits: flshs: evct: size: rate:\n");
} /* end if */
- HDfprintf(stdout, "%3.1lf %5lld %5lld %5lld %5lld %5lld %5lld %3.1lf\n", hit_rate,
- (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches),
- (long long)(cache_ptr->prefetch_hits),
- (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]),
- (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]),
- (long long)(cache_ptr->last_image_size), prefetch_use_rate);
+ fprintf(stdout, "%3.1lf %5lld %5lld %5lld %5lld %5lld %5lld %3.1lf\n", hit_rate,
+ (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches),
+ (long long)(cache_ptr->prefetch_hits), (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]),
+ (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]),
+ (long long)(cache_ptr->last_image_size), prefetch_use_rate);
#endif /* H5C_COLLECT_CACHE_STATS */
done:
@@ -1014,11 +1013,11 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(H5F_addr_defined(cache_ptr->image_addr));
- HDassert(cache_ptr->image_len > 0);
- HDassert(cache_ptr->image_buffer);
+ assert(f);
+ assert(cache_ptr);
+ assert(H5F_addr_defined(cache_ptr->image_addr));
+ assert(cache_ptr->image_len > 0);
+ assert(cache_ptr->image_buffer);
#ifdef H5_HAVE_PARALLEL
{
@@ -1026,7 +1025,7 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr)
int mpi_result;
if ((NULL == aux_ptr) || (aux_ptr->mpi_rank == 0)) {
- HDassert((NULL == aux_ptr) || (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC));
+ assert((NULL == aux_ptr) || (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC));
#endif /* H5_HAVE_PARALLEL */
/* Read the buffer (if serial access, or rank 0 of parallel access) */
@@ -1086,11 +1085,11 @@ H5C__load_cache_image(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* If the image address is defined, load the image, decode it,
* and insert its contents into the metadata cache.
@@ -1103,8 +1102,8 @@ H5C__load_cache_image(H5F_t *f)
*/
if (H5F_addr_defined(cache_ptr->image_addr)) {
/* Sanity checks */
- HDassert(cache_ptr->image_len > 0);
- HDassert(cache_ptr->image_buffer == NULL);
+ assert(cache_ptr->image_len > 0);
+ assert(cache_ptr->image_buffer == NULL);
/* Allocate space for the image */
if (NULL == (cache_ptr->image_buffer = H5MM_malloc(cache_ptr->image_len + 1)))
@@ -1181,11 +1180,11 @@ H5C_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool_
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Set information needed to load cache image */
cache_ptr->image_addr = addr;
@@ -1230,8 +1229,8 @@ H5C__image_entry_cmp(const void *_entry1, const void *_entry2)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry1);
- HDassert(entry2);
+ assert(entry1);
+ assert(entry2);
if (entry1->image_fd_height > entry2->image_fd_height)
ret_value = -1;
@@ -1239,8 +1238,8 @@ H5C__image_entry_cmp(const void *_entry1, const void *_entry2)
ret_value = 1;
else {
/* Sanity check */
- HDassert(entry1->lru_rank >= -1);
- HDassert(entry2->lru_rank >= -1);
+ assert(entry1->lru_rank >= -1);
+ assert(entry2->lru_rank >= -1);
if (entry1->lru_rank < entry2->lru_rank)
ret_value = -1;
@@ -1309,13 +1308,13 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(image_generated);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(image_generated);
/* If the file is opened and closed without any access to
* any group or data set, it is possible that the cache image (if
@@ -1346,7 +1345,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
H5C_cache_image_ctl_t default_image_ctl = H5C__DEFAULT_CACHE_IMAGE_CTL;
cache_ptr->image_ctl = default_image_ctl;
- HDassert(!(cache_ptr->image_ctl.generate_image));
+ assert(!(cache_ptr->image_ctl.generate_image));
} /* end if */
/* Generate the cache image, if requested */
@@ -1391,7 +1390,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
*/
if (H5C__prep_for_file_close__scan_entries(f, cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C__prep_for_file_close__scan_entries failed")
- HDassert(HADDR_UNDEF == cache_ptr->image_addr);
+ assert(HADDR_UNDEF == cache_ptr->image_addr);
#ifdef H5_HAVE_PARALLEL
/* In the parallel case, overwrite the image_len with the
@@ -1411,7 +1410,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
(mpi_result = MPI_Bcast(&p0_image_len, 1, MPI_UNSIGNED, 0, aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result)
- HDassert(p0_image_len == aux_ptr->p0_image_len);
+ assert(p0_image_len == aux_ptr->p0_image_len);
} /* end if */
else {
if (MPI_SUCCESS !=
@@ -1453,7 +1452,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
* shutdown the self referential free space managers after
* we destroy the metadata cache.
*/
- HDassert(HADDR_UNDEF == f->shared->eoa_post_mdci_fsalloc);
+ assert(HADDR_UNDEF == f->shared->eoa_post_mdci_fsalloc);
if (HADDR_UNDEF == (f->shared->eoa_post_mdci_fsalloc = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
@@ -1469,7 +1468,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
* a fragment on a cache image allocation, leave the following
* assertion in the code so we will find out.
*/
- HDassert((eoa_frag_size == 0) || (f->shared->alignment != 1));
+ assert((eoa_frag_size == 0) || (f->shared->alignment != 1));
/* Eventually it will be possible for the length of the cache image
* block on file to be greater than the size of the data it
@@ -1533,7 +1532,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
sizeof(H5C_image_entry_t), H5C__image_entry_cmp);
} /* end if */
else { /* cancel creation of metadata cache image */
- HDassert(cache_ptr->image_entries == NULL);
+ assert(cache_ptr->image_entries == NULL);
/* To avoid breaking the control flow tests, only delete
* the mdci superblock extension message if the
@@ -1592,9 +1591,9 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache == f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache == f->shared->cache);
/* Check arguments */
if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
@@ -1613,7 +1612,7 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl
H5C_cache_image_ctl_t default_image_ctl = H5C__DEFAULT_CACHE_IMAGE_CTL;
cache_ptr->image_ctl = default_image_ctl;
- HDassert(!(cache_ptr->image_ctl.generate_image));
+ assert(!(cache_ptr->image_ctl.generate_image));
} /* end if */
else {
#endif /* H5_HAVE_PARALLEL */
@@ -1635,7 +1634,7 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl
H5C_cache_image_ctl_t default_image_ctl = H5C__DEFAULT_CACHE_IMAGE_CTL;
cache_ptr->image_ctl = default_image_ctl;
- HDassert(!(cache_ptr->image_ctl.generate_image));
+ assert(!(cache_ptr->image_ctl.generate_image));
} /* end else */
#ifdef H5_HAVE_PARALLEL
} /* end else */
@@ -1794,16 +1793,16 @@ H5C__decode_cache_image_header(const H5F_t *f, H5C_t *cache_ptr, const uint8_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(buf);
- HDassert(*buf);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(buf);
+ assert(*buf);
/* Point to buffer to decode */
p = *buf;
/* Check signature */
- if (HDmemcmp(p, H5C__MDCI_BLOCK_SIGNATURE, (size_t)H5C__MDCI_BLOCK_SIGNATURE_LEN) != 0)
+ if (memcmp(p, H5C__MDCI_BLOCK_SIGNATURE, (size_t)H5C__MDCI_BLOCK_SIGNATURE_LEN) != 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache image header signature")
p += H5C__MDCI_BLOCK_SIGNATURE_LEN;
@@ -1891,17 +1890,17 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(buf);
- HDassert(*buf);
- HDassert(entry_num < cache_ptr->num_entries_in_image);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(buf);
+ assert(*buf);
+ assert(entry_num < cache_ptr->num_entries_in_image);
ie_ptr = &(cache_ptr->image_entries[entry_num]);
- HDassert(ie_ptr);
- HDassert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
+ assert(ie_ptr);
+ assert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
/* Get pointer to buffer */
p = *buf;
@@ -1922,15 +1921,15 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint
/* Decode ring */
ring = *p++;
- HDassert(ring > (uint8_t)(H5C_RING_UNDEFINED));
- HDassert(ring < (uint8_t)(H5C_RING_NTYPES));
+ assert(ring > (uint8_t)(H5C_RING_UNDEFINED));
+ assert(ring < (uint8_t)(H5C_RING_NTYPES));
/* Decode age */
age = *p++;
/* Decode dependency child count */
UINT16DECODE(p, fd_child_count);
- HDassert((is_fd_parent && fd_child_count > 0) || (!is_fd_parent && fd_child_count == 0));
+ assert((is_fd_parent && fd_child_count > 0) || (!is_fd_parent && fd_child_count == 0));
/* Decode dirty dependency child count */
UINT16DECODE(p, fd_dirty_child_count);
@@ -1939,11 +1938,11 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint
/* Decode dependency parent count */
UINT16DECODE(p, fd_parent_count);
- HDassert((is_fd_child && fd_parent_count > 0) || (!is_fd_child && fd_parent_count == 0));
+ assert((is_fd_child && fd_parent_count > 0) || (!is_fd_child && fd_parent_count == 0));
/* Decode index in LRU */
INT32DECODE(p, lru_rank);
- HDassert((in_lru && lru_rank >= 0) || (!in_lru && lru_rank == -1));
+ assert((in_lru && lru_rank >= 0) || (!in_lru && lru_rank == -1));
/* Decode entry offset */
H5F_addr_decode(f, &p, &addr);
@@ -2047,20 +2046,20 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(pf_entry_ptr);
- HDassert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(pf_entry_ptr->type);
- HDassert(pf_entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
- HDassert(pf_entry_ptr->prefetched);
- HDassert(pf_entry_ptr->fd_child_count > 0);
- HDassert(fd_children);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(pf_entry_ptr);
+ assert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(pf_entry_ptr->type);
+ assert(pf_entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
+ assert(pf_entry_ptr->prefetched);
+ assert(pf_entry_ptr->fd_child_count > 0);
+ assert(fd_children);
/* Scan each entry on the index list */
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Here we look at entry_ptr->flush_dep_nparents and not
* entry_ptr->fd_parent_count as it is possible that some
@@ -2075,17 +2074,17 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
found = FALSE;
/* Sanity checks */
- HDassert(entry_ptr->type);
- HDassert(entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
- HDassert(entry_ptr->fd_parent_count >= entry_ptr->flush_dep_nparents);
- HDassert(entry_ptr->fd_parent_addrs);
- HDassert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->type);
+ assert(entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
+ assert(entry_ptr->fd_parent_count >= entry_ptr->flush_dep_nparents);
+ assert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->flush_dep_parent);
/* Look for correct entry */
while (!found && (u < entry_ptr->fd_parent_count)) {
/* Sanity check entry */
- HDassert(entry_ptr->flush_dep_parent[u]);
- HDassert(entry_ptr->flush_dep_parent[u]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->flush_dep_parent[u]);
+ assert(entry_ptr->flush_dep_parent[u]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Correct entry? */
if (pf_entry_ptr == entry_ptr->flush_dep_parent[u])
@@ -2095,7 +2094,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
} /* end while */
if (found) {
- HDassert(NULL == fd_children[fd_children_found]);
+ assert(NULL == fd_children[fd_children_found]);
/* Remove flush dependency */
fd_children[fd_children_found] = entry_ptr;
@@ -2118,7 +2117,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
found = TRUE;
u++;
} /* end while */
- HDassert(found);
+ assert(found);
#endif /* NDEBUG */
} /* end if */
} /* end if */
@@ -2128,10 +2127,10 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
} /* end while */
/* Post-op sanity checks */
- HDassert(NULL == fd_children[fd_children_found]);
- HDassert((unsigned)fd_children_found == pf_entry_ptr->fd_child_count);
- HDassert(entries_visited == cache_ptr->index_len);
- HDassert(!pf_entry_ptr->is_pinned);
+ assert(NULL == fd_children[fd_children_found]);
+ assert((unsigned)fd_children_found == pf_entry_ptr->fd_child_count);
+ assert(entries_visited == cache_ptr->index_len);
+ assert(!pf_entry_ptr->is_pinned);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2163,15 +2162,15 @@ H5C__encode_cache_image_header(const H5F_t *f, const H5C_t *cache_ptr, uint8_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->image_ctl.generate_image);
- HDassert(cache_ptr->index_len == 0);
- HDassert(cache_ptr->image_data_len > 0);
- HDassert(cache_ptr->image_data_len <= cache_ptr->image_len);
- HDassert(buf);
- HDassert(*buf);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->image_ctl.generate_image);
+ assert(cache_ptr->index_len == 0);
+ assert(cache_ptr->image_data_len > 0);
+ assert(cache_ptr->image_data_len <= cache_ptr->image_len);
+ assert(buf);
+ assert(*buf);
/* Set pointer into buffer */
p = *buf;
@@ -2186,7 +2185,7 @@ H5C__encode_cache_image_header(const H5F_t *f, const H5C_t *cache_ptr, uint8_t *
/* setup and write flags */
/* at present we don't support saving resize status */
- HDassert(!cache_ptr->image_ctl.save_resize_status);
+ assert(!cache_ptr->image_ctl.save_resize_status);
if (cache_ptr->image_ctl.save_resize_status)
flags |= H5C__MDCI_HEADER_HAVE_RESIZE_STATUS;
@@ -2194,7 +2193,7 @@ H5C__encode_cache_image_header(const H5F_t *f, const H5C_t *cache_ptr, uint8_t *
/* Encode image data length */
/* this must be true at present */
- HDassert(cache_ptr->image_len == cache_ptr->image_data_len);
+ assert(cache_ptr->image_len == cache_ptr->image_data_len);
H5F_ENCODE_LENGTH(f, p, cache_ptr->image_data_len);
/* write num entries */
@@ -2239,19 +2238,19 @@ H5C__encode_cache_image_entry(H5F_t *f, H5C_t *cache_ptr, uint8_t **buf, unsigne
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->image_ctl.generate_image);
- HDassert(cache_ptr->index_len == 0);
- HDassert(buf);
- HDassert(*buf);
- HDassert(entry_num < cache_ptr->num_entries_in_image);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->image_ctl.generate_image);
+ assert(cache_ptr->index_len == 0);
+ assert(buf);
+ assert(*buf);
+ assert(entry_num < cache_ptr->num_entries_in_image);
ie_ptr = &(cache_ptr->image_entries[entry_num]);
- HDassert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
+ assert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
/* Get pointer to buffer to encode into */
p = *buf;
@@ -2384,8 +2383,8 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Remove from the cache image all dirty entries that are
* flush dependency children of dirty entries that are not in the
@@ -2399,17 +2398,17 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
done = TRUE;
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Should this entry be in the image */
if (entry_ptr->image_dirty && entry_ptr->include_in_image && (entry_ptr->fd_parent_count > 0)) {
- HDassert(entry_ptr->flush_dep_parent != NULL);
+ assert(entry_ptr->flush_dep_parent != NULL);
for (u = 0; u < entry_ptr->flush_dep_nparents; u++) {
parent_ptr = entry_ptr->flush_dep_parent[u];
/* Sanity check parent */
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring == parent_ptr->ring);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring == parent_ptr->ring);
if (parent_ptr->is_dirty && !parent_ptr->include_in_image &&
entry_ptr->include_in_image) {
@@ -2431,7 +2430,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
* so. Note that this will change when we start aging entries out
* of the cache image.
*/
- HDassert(entries_removed_from_image == 0);
+ assert(entries_removed_from_image == 0);
/* Next, remove from entries in the cache image, references to
* flush dependency parents or children that are not in the cache image.
@@ -2439,22 +2438,22 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
if (!entry_ptr->include_in_image && entry_ptr->flush_dep_nparents > 0) {
- HDassert(entry_ptr->flush_dep_parent != NULL);
+ assert(entry_ptr->flush_dep_parent != NULL);
for (u = 0; u < entry_ptr->flush_dep_nparents; u++) {
parent_ptr = entry_ptr->flush_dep_parent[u];
/* Sanity check parent */
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring == parent_ptr->ring);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring == parent_ptr->ring);
if (parent_ptr->include_in_image) {
/* Must remove reference to child */
- HDassert(parent_ptr->fd_child_count > 0);
+ assert(parent_ptr->fd_child_count > 0);
parent_ptr->fd_child_count--;
if (entry_ptr->is_dirty) {
- HDassert(parent_ptr->fd_dirty_child_count > 0);
+ assert(parent_ptr->fd_dirty_child_count > 0);
parent_ptr->fd_dirty_child_count--;
} /* end if */
@@ -2464,23 +2463,23 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
} /* end if */
else if (entry_ptr->include_in_image && entry_ptr->flush_dep_nparents > 0) {
/* Sanity checks */
- HDassert(entry_ptr->flush_dep_parent != NULL);
- HDassert(entry_ptr->flush_dep_nparents == entry_ptr->fd_parent_count);
- HDassert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->flush_dep_parent != NULL);
+ assert(entry_ptr->flush_dep_nparents == entry_ptr->fd_parent_count);
+ assert(entry_ptr->fd_parent_addrs);
for (u = 0; u < entry_ptr->flush_dep_nparents; u++) {
parent_ptr = entry_ptr->flush_dep_parent[u];
/* Sanity check parent */
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring == parent_ptr->ring);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring == parent_ptr->ring);
if (!parent_ptr->include_in_image) {
/* Must remove reference to parent */
- HDassert(entry_ptr->fd_parent_count > 0);
+ assert(entry_ptr->fd_parent_count > 0);
parent_ptr->fd_child_count--;
- HDassert(parent_ptr->addr == entry_ptr->fd_parent_addrs[u]);
+ assert(parent_ptr->addr == entry_ptr->fd_parent_addrs[u]);
entry_ptr->fd_parent_addrs[u] = HADDR_UNDEF;
external_parent_fd_refs_removed++;
@@ -2509,7 +2508,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
} /* end if */
} /* end for */
- HDassert(v == entry_ptr->fd_parent_count);
+ assert(v == entry_ptr->fd_parent_count);
} /* end else-if */
} /* end else-if */
@@ -2520,8 +2519,8 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
* should exist -- hence the following assertions. This will change
* if we support ageout of entries in the cache image.
*/
- HDassert(external_child_fd_refs_removed == 0);
- HDassert(external_parent_fd_refs_removed == 0);
+ assert(external_child_fd_refs_removed == 0);
+ assert(external_parent_fd_refs_removed == 0);
/* At this point we should have removed all flush dependencies that
* cross cache image boundaries. Now compute the flush dependency
@@ -2539,7 +2538,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
for (u = 0; u < entry_ptr->fd_parent_count; u++) {
parent_ptr = entry_ptr->flush_dep_parent[u];
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (parent_ptr->include_in_image && parent_ptr->image_fd_height <= 0)
H5C__prep_for_file_close__compute_fd_heights_real(parent_ptr, 1);
} /* end for */
@@ -2606,23 +2605,23 @@ H5C__prep_for_file_close__compute_fd_heights_real(H5C_cache_entry_t *entry_ptr,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->include_in_image);
- HDassert((entry_ptr->image_fd_height == 0) || (entry_ptr->image_fd_height < fd_height));
- HDassert(((fd_height == 0) && (entry_ptr->fd_child_count == 0)) ||
- ((fd_height > 0) && (entry_ptr->fd_child_count > 0)));
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->include_in_image);
+ assert((entry_ptr->image_fd_height == 0) || (entry_ptr->image_fd_height < fd_height));
+ assert(((fd_height == 0) && (entry_ptr->fd_child_count == 0)) ||
+ ((fd_height > 0) && (entry_ptr->fd_child_count > 0)));
entry_ptr->image_fd_height = fd_height;
if (entry_ptr->flush_dep_nparents > 0) {
unsigned u;
- HDassert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->flush_dep_parent);
for (u = 0; u < entry_ptr->fd_parent_count; u++) {
H5C_cache_entry_t *parent_ptr;
parent_ptr = entry_ptr->flush_dep_parent[u];
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (parent_ptr->include_in_image && parent_ptr->image_fd_height <= fd_height)
H5C__prep_for_file_close__compute_fd_heights_real(parent_ptr, fd_height + 1);
@@ -2658,12 +2657,12 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->pl_len == 0);
- HDassert(cache_ptr->num_entries_in_image > 0);
- HDassert(cache_ptr->image_entries == NULL);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->pl_len == 0);
+ assert(cache_ptr->num_entries_in_image > 0);
+ assert(cache_ptr->image_entries == NULL);
/* Allocate and initialize image_entries array */
if (NULL == (image_entries = (H5C_image_entry_t *)H5MM_calloc(
@@ -2682,15 +2681,15 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
u = 0;
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (entry_ptr->include_in_image) {
/* Since we have already serialized the cache, the following
* should hold.
*/
- HDassert(entry_ptr->image_up_to_date);
- HDassert(entry_ptr->image_ptr);
- HDassert(entry_ptr->type);
+ assert(entry_ptr->image_up_to_date);
+ assert(entry_ptr->image_ptr);
+ assert(entry_ptr->type);
image_entries[u].addr = entry_ptr->addr;
image_entries[u].size = entry_ptr->size;
@@ -2733,7 +2732,7 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
u++;
- HDassert(u <= cache_ptr->num_entries_in_image);
+ assert(u <= cache_ptr->num_entries_in_image);
} /* end if */
entries_visited++;
@@ -2742,11 +2741,11 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
} /* end while */
/* Sanity checks */
- HDassert(entries_visited == cache_ptr->index_len);
- HDassert(u == cache_ptr->num_entries_in_image);
+ assert(entries_visited == cache_ptr->index_len);
+ assert(u == cache_ptr->num_entries_in_image);
- HDassert(image_entries[u].fd_parent_addrs == NULL);
- HDassert(image_entries[u].image_ptr == NULL);
+ assert(image_entries[u].fd_parent_addrs == NULL);
+ assert(image_entries[u].image_ptr == NULL);
cache_ptr->image_entries = image_entries;
@@ -2801,13 +2800,13 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->pl_len == 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->pl_len == 0);
/* Initialize image len to the size of the metadata cache image block
* header.
@@ -2818,13 +2817,13 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
/* Scan each entry on the index list */
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Since we have already serialized the cache, the following
* should hold.
*/
- HDassert(entry_ptr->image_up_to_date);
- HDassert(entry_ptr->image_ptr);
+ assert(entry_ptr->image_up_to_date);
+ assert(entry_ptr->image_ptr);
/* Initially, we mark all entries in the rings included
* in the cache image as being included in the in the
@@ -2854,15 +2853,15 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
/* parent addresses array should already be allocated
* and of the correct size.
*/
- HDassert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->fd_parent_addrs);
} /* end if */
else if (entry_ptr->fd_parent_count > 0) {
- HDassert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->fd_parent_addrs);
entry_ptr->fd_parent_addrs = (haddr_t *)H5MM_xfree(entry_ptr->fd_parent_addrs);
} /* end else-if */
else {
- HDassert(entry_ptr->fd_parent_count == 0);
- HDassert(entry_ptr->fd_parent_addrs == NULL);
+ assert(entry_ptr->fd_parent_count == 0);
+ assert(entry_ptr->fd_parent_addrs == NULL);
} /* end else */
entry_ptr->fd_parent_count = entry_ptr->flush_dep_nparents;
@@ -2874,15 +2873,15 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
for (int i = 0; i < (int)(entry_ptr->fd_parent_count); i++) {
entry_ptr->fd_parent_addrs[i] = entry_ptr->flush_dep_parent[i]->addr;
- HDassert(H5F_addr_defined(entry_ptr->fd_parent_addrs[i]));
+ assert(H5F_addr_defined(entry_ptr->fd_parent_addrs[i]));
} /* end for */
} /* end if */
else if (entry_ptr->fd_parent_count > 0) {
- HDassert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->fd_parent_addrs);
entry_ptr->fd_parent_addrs = (haddr_t *)H5MM_xfree(entry_ptr->fd_parent_addrs);
} /* end else-if */
else
- HDassert(entry_ptr->fd_parent_addrs == NULL);
+ assert(entry_ptr->fd_parent_addrs == NULL);
/* Initially, all flush dependency children are included int
* the count of flush dependency child relationships to be
@@ -2903,7 +2902,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
entries_visited++;
entry_ptr = entry_ptr->il_next;
} /* end while */
- HDassert(entries_visited == cache_ptr->index_len);
+ assert(entries_visited == cache_ptr->index_len);
/* Now compute the flush dependency heights of all flush dependency
* relationships to be represented in the image.
@@ -2938,7 +2937,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
entries_visited = 0;
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (entry_ptr->include_in_image) {
if (entry_ptr->fd_parent_count > 0)
@@ -2953,8 +2952,8 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
entries_visited++;
entry_ptr = entry_ptr->il_next;
} /* end while */
- HDassert(entries_visited == cache_ptr->index_len);
- HDassert(num_entries_in_image <= num_entries_tentatively_in_image);
+ assert(entries_visited == cache_ptr->index_len);
+ assert(num_entries_in_image <= num_entries_tentatively_in_image);
#ifndef NDEBUG
{
@@ -2963,7 +2962,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
j += cache_ptr->index_ring_len[i];
/* This will change */
- HDassert(entries_visited == (num_entries_tentatively_in_image + j));
+ assert(entries_visited == (num_entries_tentatively_in_image + j));
}
#endif
@@ -2982,8 +2981,8 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
*/
entry_ptr = cache_ptr->LRU_head_ptr;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->type != NULL);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->type != NULL);
/* to avoid confusion, don't set lru_rank on epoch markers.
* Note that we still increment the lru_rank, so that the holes
@@ -3004,7 +3003,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
entries_visited++;
entry_ptr = entry_ptr->next;
} /* end while */
- HDassert(entries_visited == cache_ptr->LRU_list_len);
+ assert(entries_visited == cache_ptr->LRU_list_len);
image_len += H5F_SIZEOF_CHKSUM;
cache_ptr->image_data_len = image_len;
@@ -3041,24 +3040,24 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->image_buffer);
- HDassert(cache_ptr->image_len > 0);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->image_buffer);
+ assert(cache_ptr->image_len > 0);
/* Decode metadata cache image header */
p = (uint8_t *)cache_ptr->image_buffer;
if (H5C__decode_cache_image_header(f, cache_ptr, &p) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDECODE, FAIL, "cache image header decode failed")
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_len);
/* The image_data_len and # of entries should be defined now */
- HDassert(cache_ptr->image_data_len > 0);
- HDassert(cache_ptr->image_data_len <= cache_ptr->image_len);
- HDassert(cache_ptr->num_entries_in_image > 0);
+ assert(cache_ptr->image_data_len > 0);
+ assert(cache_ptr->image_data_len <= cache_ptr->image_len);
+ assert(cache_ptr->num_entries_in_image > 0);
/* Reconstruct entries in image */
for (u = 0; u < cache_ptr->num_entries_in_image; u++) {
@@ -3093,8 +3092,8 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
*/
for (v = 0; v < pf_entry_ptr->fd_parent_count; v++) {
/* Sanity checks */
- HDassert(pf_entry_ptr->fd_parent_addrs);
- HDassert(H5F_addr_defined(pf_entry_ptr->fd_parent_addrs[v]));
+ assert(pf_entry_ptr->fd_parent_addrs);
+ assert(H5F_addr_defined(pf_entry_ptr->fd_parent_addrs[v]));
/* Find the parent entry */
parent_ptr = NULL;
@@ -3103,9 +3102,9 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "fd parent not in cache?!?")
/* Sanity checks */
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(parent_ptr->addr == pf_entry_ptr->fd_parent_addrs[v]);
- HDassert(parent_ptr->lru_rank == -1);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->addr == pf_entry_ptr->fd_parent_addrs[v]);
+ assert(parent_ptr->lru_rank == -1);
/* Must protect parent entry to set up a flush dependency.
* Do this now, and then uprotect when done.
@@ -3129,24 +3128,24 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
*/
pf_entry_ptr = cache_ptr->il_head;
while (pf_entry_ptr != NULL) {
- HDassert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert((pf_entry_ptr->prefetched && pf_entry_ptr->type == H5AC_PREFETCHED_ENTRY) ||
- (!pf_entry_ptr->prefetched && pf_entry_ptr->type != H5AC_PREFETCHED_ENTRY));
+ assert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert((pf_entry_ptr->prefetched && pf_entry_ptr->type == H5AC_PREFETCHED_ENTRY) ||
+ (!pf_entry_ptr->prefetched && pf_entry_ptr->type != H5AC_PREFETCHED_ENTRY));
if (pf_entry_ptr->type == H5AC_PREFETCHED_ENTRY)
- HDassert(pf_entry_ptr->fd_parent_count == pf_entry_ptr->flush_dep_nparents);
+ assert(pf_entry_ptr->fd_parent_count == pf_entry_ptr->flush_dep_nparents);
for (v = 0; v < pf_entry_ptr->fd_parent_count; v++) {
parent_ptr = pf_entry_ptr->flush_dep_parent[v];
- HDassert(parent_ptr);
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(pf_entry_ptr->fd_parent_addrs);
- HDassert(pf_entry_ptr->fd_parent_addrs[v] == parent_ptr->addr);
- HDassert(parent_ptr->flush_dep_nchildren > 0);
+ assert(parent_ptr);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(pf_entry_ptr->fd_parent_addrs);
+ assert(pf_entry_ptr->fd_parent_addrs[v] == parent_ptr->addr);
+ assert(parent_ptr->flush_dep_nchildren > 0);
} /* end for */
if (pf_entry_ptr->type == H5AC_PREFETCHED_ENTRY) {
- HDassert(pf_entry_ptr->fd_child_count == pf_entry_ptr->flush_dep_nchildren);
- HDassert(pf_entry_ptr->fd_dirty_child_count == pf_entry_ptr->flush_dep_ndirty_children);
+ assert(pf_entry_ptr->fd_child_count == pf_entry_ptr->flush_dep_nchildren);
+ assert(pf_entry_ptr->fd_dirty_child_count == pf_entry_ptr->flush_dep_ndirty_children);
} /* end if */
pf_entry_ptr = pf_entry_ptr->il_next;
@@ -3163,12 +3162,12 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
i = -1;
entry_ptr = cache_ptr->LRU_head_ptr;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->type != NULL);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->type != NULL);
if (entry_ptr->prefetched) {
- HDassert(entry_ptr->lru_rank != 0);
- HDassert((entry_ptr->lru_rank == -1) || (entry_ptr->lru_rank > i));
+ assert(entry_ptr->lru_rank != 0);
+ assert((entry_ptr->lru_rank == -1) || (entry_ptr->lru_rank > i));
if ((entry_ptr->lru_rank > 1) && (entry_ptr->lru_rank > i + 1))
lru_rank_holes += entry_ptr->lru_rank - (i + 1);
@@ -3184,7 +3183,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
* the following sanity check will have to be revised when
* we add code to store and restore adaptive resize status.
*/
- HDassert(lru_rank_holes <= H5C__MAX_EPOCH_MARKERS);
+ assert(lru_rank_holes <= H5C__MAX_EPOCH_MARKERS);
} /* end block */
#endif /* NDEBUG */
@@ -3245,10 +3244,10 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->num_entries_in_image > 0);
- HDassert(buf && *buf);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->num_entries_in_image > 0);
+ assert(buf && *buf);
/* Key R/W access off of whether the image will be deleted */
file_is_rw = cache_ptr->delete_image;
@@ -3292,16 +3291,16 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
/* Decode ring */
pf_entry_ptr->ring = *p++;
- HDassert(pf_entry_ptr->ring > (uint8_t)(H5C_RING_UNDEFINED));
- HDassert(pf_entry_ptr->ring < (uint8_t)(H5C_RING_NTYPES));
+ assert(pf_entry_ptr->ring > (uint8_t)(H5C_RING_UNDEFINED));
+ assert(pf_entry_ptr->ring < (uint8_t)(H5C_RING_NTYPES));
/* Decode age */
pf_entry_ptr->age = *p++;
/* Decode dependency child count */
UINT16DECODE(p, pf_entry_ptr->fd_child_count);
- HDassert((is_fd_parent && pf_entry_ptr->fd_child_count > 0) ||
- (!is_fd_parent && pf_entry_ptr->fd_child_count == 0));
+ assert((is_fd_parent && pf_entry_ptr->fd_child_count > 0) ||
+ (!is_fd_parent && pf_entry_ptr->fd_child_count == 0));
/* Decode dirty dependency child count */
UINT16DECODE(p, pf_entry_ptr->fd_dirty_child_count);
@@ -3312,12 +3311,12 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
/* Decode dependency parent count */
UINT16DECODE(p, pf_entry_ptr->fd_parent_count);
- HDassert((is_fd_child && pf_entry_ptr->fd_parent_count > 0) ||
- (!is_fd_child && pf_entry_ptr->fd_parent_count == 0));
+ assert((is_fd_child && pf_entry_ptr->fd_parent_count > 0) ||
+ (!is_fd_child && pf_entry_ptr->fd_parent_count == 0));
/* Decode index in LRU */
INT32DECODE(p, pf_entry_ptr->lru_rank);
- HDassert((in_lru && pf_entry_ptr->lru_rank >= 0) || (!in_lru && pf_entry_ptr->lru_rank == -1));
+ assert((in_lru && pf_entry_ptr->lru_rank >= 0) || (!in_lru && pf_entry_ptr->lru_rank == -1));
/* Decode entry offset */
H5F_addr_decode(f, &p, &pf_entry_ptr->addr);
@@ -3371,7 +3370,7 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
pf_entry_ptr->prefetched_dirty = is_dirty && (!file_is_rw);
/* Sanity checks */
- HDassert(pf_entry_ptr->size > 0 && pf_entry_ptr->size < H5C_MAX_ENTRY_SIZE);
+ assert(pf_entry_ptr->size > 0 && pf_entry_ptr->size < H5C_MAX_ENTRY_SIZE);
/* Update buffer pointer */
*buf = p;
@@ -3415,13 +3414,13 @@ H5C__write_cache_image_superblock_msg(H5F_t *f, hbool_t create)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
/* Write data into the metadata cache image superblock extension message.
* Note that this data will be bogus when we first create the message.
@@ -3433,7 +3432,7 @@ H5C__write_cache_image_superblock_msg(H5F_t *f, hbool_t create)
H5AC_aux_t *aux_ptr;
aux_ptr = (H5AC_aux_t *)cache_ptr->aux_ptr;
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
mdci_msg.size = aux_ptr->p0_image_len;
} /* end if */
else
@@ -3470,18 +3469,18 @@ H5C__write_cache_image(H5F_t *f, const H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(H5F_addr_defined(cache_ptr->image_addr));
- HDassert(cache_ptr->image_len > 0);
- HDassert(cache_ptr->image_buffer);
+ assert(f);
+ assert(cache_ptr);
+ assert(H5F_addr_defined(cache_ptr->image_addr));
+ assert(cache_ptr->image_len > 0);
+ assert(cache_ptr->image_buffer);
#ifdef H5_HAVE_PARALLEL
{
H5AC_aux_t *aux_ptr = (H5AC_aux_t *)cache_ptr->aux_ptr;
if ((NULL == aux_ptr) || (aux_ptr->mpi_rank == 0)) {
- HDassert((NULL == aux_ptr) || (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC));
+ assert((NULL == aux_ptr) || (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC));
#endif /* H5_HAVE_PARALLEL */
/* Write the buffer (if serial access, or rank 0 for parallel access) */
diff --git a/src/H5Clog.c b/src/H5Clog.c
index 25b3cf0..579fdb3 100644
--- a/src/H5Clog.c
+++ b/src/H5Clog.c
@@ -83,8 +83,8 @@ H5C_log_set_up(H5C_t *cache, const char log_location[], H5C_log_style_t style, h
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
- HDassert(log_location);
+ assert(cache);
+ assert(log_location);
/* Check logging flags */
if (cache->log_info->enabled)
@@ -143,7 +143,7 @@ H5C_log_tear_down(H5C_t *cache)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Check logging flags */
if (FALSE == cache->log_info->enabled)
@@ -186,7 +186,7 @@ H5C_start_logging(H5C_t *cache)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Check logging flags */
if (FALSE == cache->log_info->enabled)
@@ -229,7 +229,7 @@ H5C_stop_logging(H5C_t *cache)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Check logging flags */
if (FALSE == cache->log_info->enabled)
@@ -273,9 +273,9 @@ H5C_get_logging_status(const H5C_t *cache, hbool_t *is_enabled, hbool_t *is_curr
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cache);
- HDassert(is_enabled);
- HDassert(is_currently_logging);
+ assert(cache);
+ assert(is_enabled);
+ assert(is_currently_logging);
/* Get logging flags */
*is_enabled = cache->log_info->enabled;
@@ -304,7 +304,7 @@ H5C_log_write_create_cache_msg(H5C_t *cache, herr_t fxn_ret_value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_create_cache_log_msg)
@@ -339,7 +339,7 @@ H5C_log_write_destroy_cache_msg(H5C_t *cache)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_destroy_cache_log_msg)
@@ -370,7 +370,7 @@ H5C_log_write_evict_cache_msg(H5C_t *cache, herr_t fxn_ret_value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_evict_cache_log_msg)
@@ -401,7 +401,7 @@ H5C_log_write_expunge_entry_msg(H5C_t *cache, haddr_t address, int type_id, herr
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_expunge_entry_log_msg)
@@ -433,7 +433,7 @@ H5C_log_write_flush_cache_msg(H5C_t *cache, herr_t fxn_ret_value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_flush_cache_log_msg)
@@ -465,7 +465,7 @@ H5C_log_write_insert_entry_msg(H5C_t *cache, haddr_t address, int type_id, unsig
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_insert_entry_log_msg)
@@ -497,10 +497,10 @@ H5C_log_write_mark_entry_dirty_msg(H5C_t *cache, const H5C_cache_entry_t *entry,
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_mark_entry_dirty_log_msg)
if (cache->log_info->cls->write_mark_entry_dirty_log_msg(cache->log_info->udata, entry,
fxn_ret_value) < 0)
@@ -530,10 +530,10 @@ H5C_log_write_mark_entry_clean_msg(H5C_t *cache, const H5C_cache_entry_t *entry,
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_mark_entry_clean_log_msg)
if (cache->log_info->cls->write_mark_entry_clean_log_msg(cache->log_info->udata, entry,
fxn_ret_value) < 0)
@@ -563,10 +563,10 @@ H5C_log_write_mark_unserialized_entry_msg(H5C_t *cache, const H5C_cache_entry_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_mark_unserialized_entry_log_msg)
if (cache->log_info->cls->write_mark_unserialized_entry_log_msg(cache->log_info->udata, entry,
fxn_ret_value) < 0)
@@ -596,10 +596,10 @@ H5C_log_write_mark_serialized_entry_msg(H5C_t *cache, const H5C_cache_entry_t *e
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_mark_serialized_entry_log_msg)
if (cache->log_info->cls->write_mark_serialized_entry_log_msg(cache->log_info->udata, entry,
fxn_ret_value) < 0)
@@ -630,7 +630,7 @@ H5C_log_write_move_entry_msg(H5C_t *cache, haddr_t old_addr, haddr_t new_addr, i
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_move_entry_log_msg)
@@ -662,10 +662,10 @@ H5C_log_write_pin_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, herr_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_pin_entry_log_msg)
if (cache->log_info->cls->write_pin_entry_log_msg(cache->log_info->udata, entry, fxn_ret_value) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific pin entry call failed")
@@ -696,11 +696,11 @@ H5C_log_write_create_fd_msg(H5C_t *cache, const H5C_cache_entry_t *parent, const
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(parent);
- HDassert(child);
+ assert(parent);
+ assert(child);
if (cache->log_info->cls->write_create_fd_log_msg)
if (cache->log_info->cls->write_create_fd_log_msg(cache->log_info->udata, parent, child,
fxn_ret_value) < 0)
@@ -731,10 +731,10 @@ H5C_log_write_protect_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, in
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_protect_entry_log_msg)
if (cache->log_info->cls->write_protect_entry_log_msg(cache->log_info->udata, entry, type_id, flags,
fxn_ret_value) < 0)
@@ -765,10 +765,10 @@ H5C_log_write_resize_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, siz
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_resize_entry_log_msg)
if (cache->log_info->cls->write_resize_entry_log_msg(cache->log_info->udata, entry, new_size,
fxn_ret_value) < 0)
@@ -798,10 +798,10 @@ H5C_log_write_unpin_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, herr
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_unpin_entry_log_msg)
if (cache->log_info->cls->write_unpin_entry_log_msg(cache->log_info->udata, entry, fxn_ret_value) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific unpin entry call failed")
@@ -832,11 +832,11 @@ H5C_log_write_destroy_fd_msg(H5C_t *cache, const H5C_cache_entry_t *parent, cons
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(parent);
- HDassert(child);
+ assert(parent);
+ assert(child);
if (cache->log_info->cls->write_destroy_fd_log_msg)
if (cache->log_info->cls->write_destroy_fd_log_msg(cache->log_info->udata, parent, child,
fxn_ret_value) < 0)
@@ -867,7 +867,7 @@ H5C_log_write_unprotect_entry_msg(H5C_t *cache, haddr_t address, int type_id, un
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_unprotect_entry_log_msg)
@@ -899,10 +899,10 @@ H5C_log_write_set_cache_config_msg(H5C_t *cache, const H5AC_cache_config_t *conf
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(config);
+ assert(config);
if (cache->log_info->cls->write_set_cache_config_log_msg)
if (cache->log_info->cls->write_set_cache_config_log_msg(cache->log_info->udata, config,
fxn_ret_value) < 0)
@@ -932,10 +932,10 @@ H5C_log_write_remove_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, her
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_remove_entry_log_msg)
if (cache->log_info->cls->write_remove_entry_log_msg(cache->log_info->udata, entry, fxn_ret_value) <
0)
diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c
index ad27c94..d5a45be 100644
--- a/src/H5Clog_json.c
+++ b/src/H5Clog_json.c
@@ -166,15 +166,15 @@ H5C__json_write_log_message(H5C_log_json_udata_t *json_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->outfile);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->outfile);
+ assert(json_udata->message);
/* Write the log message and flush */
n_chars = HDstrlen(json_udata->message);
- if ((int)n_chars != HDfprintf(json_udata->outfile, "%s", json_udata->message))
+ if ((int)n_chars != fprintf(json_udata->outfile, "%s", json_udata->message))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message")
- HDmemset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char)));
+ memset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char)));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -215,8 +215,8 @@ H5C_log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(log_info);
- HDassert(log_location);
+ assert(log_info);
+ assert(log_location);
/* Set up the class struct */
log_info->cls = &H5C_json_log_class_g;
@@ -249,7 +249,7 @@ H5C_log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi
HDsnprintf(file_name, n_chars, "RANK_%d.%s", mpi_rank, log_location);
/* Open log file and set it to be unbuffered */
- if (NULL == (json_udata->outfile = HDfopen(file_name, "w")))
+ if (NULL == (json_udata->outfile = fopen(file_name, "w")))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "can't create mdc log file")
HDsetbuf(json_udata->outfile, NULL);
@@ -294,7 +294,7 @@ H5C__json_tear_down_logging(H5C_log_info_t *log_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(log_info);
+ assert(log_info);
/* Alias */
json_udata = (H5C_log_json_udata_t *)(log_info->udata);
@@ -339,8 +339,8 @@ H5C__json_write_start_log_msg(void *udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string (opens the JSON array) */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -382,8 +382,8 @@ H5C__json_write_stop_log_msg(void *udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string (closes the JSON array) */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -424,8 +424,8 @@ H5C__json_write_create_cache_log_msg(void *udata, herr_t fxn_ret_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -466,8 +466,8 @@ H5C__json_write_destroy_cache_log_msg(void *udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -507,8 +507,8 @@ H5C__json_write_evict_cache_log_msg(void *udata, herr_t fxn_ret_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -549,8 +549,8 @@ H5C__json_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -593,8 +593,8 @@ H5C__json_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -636,8 +636,8 @@ H5C__json_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -683,9 +683,9 @@ H5C__json_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *e
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -727,9 +727,9 @@ H5C__json_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *e
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -772,9 +772,9 @@ H5C__json_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_ent
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -817,9 +817,9 @@ H5C__json_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -862,8 +862,8 @@ H5C__json_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_ad
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -908,9 +908,9 @@ H5C__json_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, h
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -954,10 +954,10 @@ H5C__json_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(parent);
- HDassert(child);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(parent);
+ assert(child);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1003,9 +1003,9 @@ H5C__json_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
if (H5C__READ_ONLY_FLAG == flags)
HDstrcpy(rw_s, "READ");
@@ -1057,9 +1057,9 @@ H5C__json_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1102,9 +1102,9 @@ H5C__json_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1148,10 +1148,10 @@ H5C__json_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(parent);
- HDassert(child);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(parent);
+ assert(child);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1196,8 +1196,8 @@ H5C__json_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_i
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1242,9 +1242,9 @@ H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(config);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(config);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1285,9 +1285,9 @@ H5C__json_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
diff --git a/src/H5Clog_trace.c b/src/H5Clog_trace.c
index 74f33ed..d9e7be7 100644
--- a/src/H5Clog_trace.c
+++ b/src/H5Clog_trace.c
@@ -161,15 +161,15 @@ H5C__trace_write_log_message(H5C_log_trace_udata_t *trace_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->outfile);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->outfile);
+ assert(trace_udata->message);
/* Write the log message and flush */
n_chars = HDstrlen(trace_udata->message);
- if ((int)n_chars != HDfprintf(trace_udata->outfile, "%s", trace_udata->message))
+ if ((int)n_chars != fprintf(trace_udata->outfile, "%s", trace_udata->message))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message")
- HDmemset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char)));
+ memset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char)));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -210,8 +210,8 @@ H5C_log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int mp
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(log_info);
- HDassert(log_location);
+ assert(log_info);
+ assert(log_location);
/* Set up the class struct */
log_info->cls = &H5C_trace_log_class_g;
@@ -244,12 +244,12 @@ H5C_log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int mp
HDsnprintf(file_name, n_chars, "%s.%d", log_location, mpi_rank);
/* Open log file and set it to be unbuffered */
- if (NULL == (trace_udata->outfile = HDfopen(file_name, "w")))
+ if (NULL == (trace_udata->outfile = fopen(file_name, "w")))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "can't create mdc log file")
HDsetbuf(trace_udata->outfile, NULL);
/* Write the header */
- HDfprintf(trace_udata->outfile, "### HDF5 metadata cache trace file version 1 ###\n");
+ fprintf(trace_udata->outfile, "### HDF5 metadata cache trace file version 1 ###\n");
done:
if (file_name)
@@ -292,7 +292,7 @@ H5C__trace_tear_down_logging(H5C_log_info_t *log_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(log_info);
+ assert(log_info);
/* Alias */
trace_udata = (H5C_log_trace_udata_t *)(log_info->udata);
@@ -337,8 +337,8 @@ H5C__trace_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_expunge_entry 0x%lx %d %d\n",
@@ -373,8 +373,8 @@ H5C__trace_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_flush %d\n", (int)fxn_ret_value);
@@ -409,8 +409,8 @@ H5C__trace_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_insert_entry 0x%lx %d 0x%x %d %d\n",
@@ -445,9 +445,9 @@ H5C__trace_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_dirty 0x%lx %d\n",
@@ -482,9 +482,9 @@ H5C__trace_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_clean 0x%lx %d\n",
@@ -520,9 +520,9 @@ H5C__trace_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_en
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_unserialized 0x%lx %d\n",
@@ -558,9 +558,9 @@ H5C__trace_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entr
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_serialized 0x%lx %d\n",
@@ -596,8 +596,8 @@ H5C__trace_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_a
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_move_entry 0x%lx 0x%lx %d %d\n",
@@ -632,9 +632,9 @@ H5C__trace_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_pin_protected_entry 0x%lx %d\n",
@@ -671,10 +671,10 @@ H5C__trace_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(parent);
- HDassert(child);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(parent);
+ assert(child);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
@@ -711,9 +711,9 @@ H5C__trace_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *ent
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_protect 0x%lx %d 0x%x %d %d\n",
@@ -749,9 +749,9 @@ H5C__trace_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_resize_entry 0x%lx %d %d\n",
@@ -786,9 +786,9 @@ H5C__trace_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_unpin_entry 0x%lx %d\n",
@@ -825,10 +825,10 @@ H5C__trace_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(parent);
- HDassert(child);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(parent);
+ assert(child);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
@@ -865,8 +865,8 @@ H5C__trace_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_unprotect 0x%lx %d 0x%x %d\n",
@@ -902,9 +902,9 @@ H5C__trace_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(config);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(config);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
@@ -951,9 +951,9 @@ H5C__trace_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_remove_entry 0x%lx %d\n",
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index a92ac10..82b0705 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -181,34 +181,34 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(num_candidates > 0);
- HDassert((!cache_ptr->slist_enabled) || (num_candidates <= cache_ptr->slist_len));
- HDassert(candidates_list_ptr != NULL);
- HDassert(0 <= mpi_rank);
- HDassert(mpi_rank < mpi_size);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(num_candidates > 0);
+ assert((!cache_ptr->slist_enabled) || (num_candidates <= cache_ptr->slist_len));
+ assert(candidates_list_ptr != NULL);
+ assert(0 <= mpi_rank);
+ assert(mpi_rank < mpi_size);
/* Initialize the entries_to_flush and entries_to_clear arrays */
- HDmemset(entries_to_flush, 0, sizeof(entries_to_flush));
- HDmemset(entries_to_clear, 0, sizeof(entries_to_clear));
+ memset(entries_to_flush, 0, sizeof(entries_to_flush));
+ memset(entries_to_clear, 0, sizeof(entries_to_clear));
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: setting up candidate assignment table.\n", __func__, mpi_rank);
+ fprintf(stdout, "%s:%d: setting up candidate assignment table.\n", __func__, mpi_rank);
- HDmemset(tbl_buf, 0, sizeof(tbl_buf));
+ memset(tbl_buf, 0, sizeof(tbl_buf));
HDsnprintf(tbl_buf, sizeof(tbl_buf), "candidate list = ");
for (u = 0; u < num_candidates; u++)
HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + u)));
HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
- HDfprintf(stdout, "%s", tbl_buf);
+ fprintf(stdout, "%s", tbl_buf);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
if (f->shared->coll_md_write) {
/* Sanity check */
- HDassert(NULL == cache_ptr->coll_write_list);
+ assert(NULL == cache_ptr->coll_write_list);
/* Create skip list of entries for collective write */
if (NULL == (cache_ptr->coll_write_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
@@ -242,7 +242,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
candidate_assignment_table[u] = candidate_assignment_table[u - 1] + n;
} /* end else */
} /* end else */
- HDassert((candidate_assignment_table[mpi_size - 1] + n) == num_candidates);
+ assert((candidate_assignment_table[mpi_size - 1] + n) == num_candidates);
#ifdef H5C_DO_SANITY_CHECKS
/* Verify that the candidate assignment table has the expected form */
@@ -252,9 +252,9 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
a = candidate_assignment_table[u] - candidate_assignment_table[u - 1];
b = candidate_assignment_table[u + 1] - candidate_assignment_table[u];
- HDassert(n + 1 >= a);
- HDassert(a >= b);
- HDassert(b >= n);
+ assert(n + 1 >= a);
+ assert(a >= b);
+ assert(b >= n);
}
#endif /* H5C_DO_SANITY_CHECKS */
@@ -268,17 +268,17 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
for (u = 0; u <= (unsigned)mpi_size; u++)
HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %u", candidate_assignment_table[u]);
HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
- HDfprintf(stdout, "%s", tbl_buf);
+ fprintf(stdout, "%s", tbl_buf);
- HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n", __func__, mpi_rank, first_entry_to_flush,
- last_entry_to_flush);
+ fprintf(stdout, "%s:%d: flush entries [%u, %u].\n", __func__, mpi_rank, first_entry_to_flush,
+ last_entry_to_flush);
- HDfprintf(stdout, "%s:%d: marking entries.\n", __func__, mpi_rank);
+ fprintf(stdout, "%s:%d: marking entries.\n", __func__, mpi_rank);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
for (u = 0; u < num_candidates; u++) {
addr = candidates_list_ptr[u];
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
#ifdef H5C_DO_SANITY_CHECKS
if (u > 0) {
@@ -304,11 +304,11 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?")
/* Sanity checks */
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring >= H5C_RING_USER);
- HDassert(entry_ptr->ring <= H5C_RING_SB);
- HDassert(!entry_ptr->flush_immediately);
- HDassert(!entry_ptr->clear_on_unprotect);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring >= H5C_RING_USER);
+ assert(entry_ptr->ring <= H5C_RING_SB);
+ assert(!entry_ptr->flush_immediately);
+ assert(!entry_ptr->clear_on_unprotect);
/* Determine whether the entry is to be cleared or flushed,
* and mark it accordingly. We will scan the protected and
@@ -346,13 +346,13 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
n += entries_to_clear[u];
} /* end if */
- HDassert((unsigned)m == total_entries_to_flush);
- HDassert(n == total_entries_to_clear);
+ assert((unsigned)m == total_entries_to_flush);
+ assert(n == total_entries_to_clear);
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n", __func__, mpi_rank,
- num_candidates, total_entries_to_clear, total_entries_to_flush);
+ fprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n", __func__, mpi_rank,
+ num_candidates, total_entries_to_clear, total_entries_to_flush);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
/* We have now marked all the entries on the candidate list for
@@ -371,7 +371,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
/* If we've deferred writing to do it collectively, take care of that now */
if (f->shared->coll_md_write) {
/* Sanity check */
- HDassert(cache_ptr->coll_write_list);
+ assert(cache_ptr->coll_write_list);
/* Write collective list */
if (H5C__collective_write(f) < 0)
@@ -416,8 +416,8 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* As a sanity check, set space needed to the dirty_index_size. This
* should be the sum total of the sizes of all the dirty entries
@@ -426,14 +426,14 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
*/
space_needed = cache_ptr->dirty_index_size;
- HDassert((!cache_ptr->slist_enabled) || (space_needed == cache_ptr->slist_size));
+ assert((!cache_ptr->slist_enabled) || (space_needed == cache_ptr->slist_size));
/* We shouldn't have any protected entries at this point, but it is
* possible that some dirty entries may reside on the pinned list.
*/
- HDassert(cache_ptr->dirty_index_size <= (cache_ptr->dLRU_list_size + cache_ptr->pel_size));
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_len <= (cache_ptr->dLRU_list_len + cache_ptr->pel_len)));
+ assert(cache_ptr->dirty_index_size <= (cache_ptr->dLRU_list_size + cache_ptr->pel_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_len <= (cache_ptr->dLRU_list_len + cache_ptr->pel_len)));
if (space_needed > 0) {
H5C_cache_entry_t *entry_ptr;
@@ -441,7 +441,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
size_t nominated_entries_size = 0;
haddr_t nominated_addr;
- HDassert((!cache_ptr->slist_enabled) || (cache_ptr->slist_len > 0));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_len > 0));
/* Scan the dirty LRU list from tail forward and nominate sufficient
* entries to free up the necessary space.
@@ -450,11 +450,11 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
while ((nominated_entries_size < space_needed) &&
((!cache_ptr->slist_enabled) || (nominated_entries_count < cache_ptr->slist_len)) &&
(entry_ptr != NULL)) {
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert(entry_ptr->ro_ref_count == 0);
- HDassert(entry_ptr->is_dirty);
- HDassert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert(entry_ptr->ro_ref_count == 0);
+ assert(entry_ptr->is_dirty);
+ assert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
nominated_addr = entry_ptr->addr;
if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
@@ -466,7 +466,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
entry_ptr = entry_ptr->aux_prev;
} /* end while */
- HDassert(entry_ptr == NULL);
+ assert(entry_ptr == NULL);
/* it is possible that there are some dirty entries on the
* protected entry list as well -- scan it too if necessary
@@ -476,11 +476,11 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
((!cache_ptr->slist_enabled) || (nominated_entries_count < cache_ptr->slist_len)) &&
(entry_ptr != NULL)) {
if (entry_ptr->is_dirty) {
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert(entry_ptr->ro_ref_count == 0);
- HDassert(entry_ptr->is_dirty);
- HDassert(entry_ptr->in_slist);
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert(entry_ptr->ro_ref_count == 0);
+ assert(entry_ptr->is_dirty);
+ assert(entry_ptr->in_slist);
nominated_addr = entry_ptr->addr;
if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
@@ -493,8 +493,8 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
entry_ptr = entry_ptr->next;
} /* end while */
- HDassert((!cache_ptr->slist_enabled) || (nominated_entries_count == cache_ptr->slist_len));
- HDassert(nominated_entries_size == space_needed);
+ assert((!cache_ptr->slist_enabled) || (nominated_entries_count == cache_ptr->slist_len));
+ assert(nominated_entries_size == space_needed);
} /* end if */
done:
@@ -527,8 +527,8 @@ H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* compute the number of bytes (if any) that must be flushed to get the
* cache back within its min clean constraints.
@@ -554,7 +554,7 @@ H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr)
unsigned nominated_entries_count = 0;
size_t nominated_entries_size = 0;
- HDassert((!cache_ptr->slist_enabled) || (cache_ptr->slist_len > 0));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_len > 0));
/* Scan the dirty LRU list from tail forward and nominate sufficient
* entries to free up the necessary space.
@@ -565,11 +565,11 @@ H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr)
(entry_ptr != NULL) && (!entry_ptr->flush_me_last)) {
haddr_t nominated_addr;
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert(entry_ptr->ro_ref_count == 0);
- HDassert(entry_ptr->is_dirty);
- HDassert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert(entry_ptr->ro_ref_count == 0);
+ assert(entry_ptr->is_dirty);
+ assert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
nominated_addr = entry_ptr->addr;
if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
@@ -581,9 +581,9 @@ H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr)
entry_ptr = entry_ptr->aux_prev;
} /* end while */
- HDassert((!cache_ptr->slist_enabled) || (nominated_entries_count <= cache_ptr->slist_len));
- HDassert(nominated_entries_size <= cache_ptr->dirty_index_size);
- HDassert(nominated_entries_size >= space_needed);
+ assert((!cache_ptr->slist_enabled) || (nominated_entries_count <= cache_ptr->slist_len));
+ assert(nominated_entries_size <= cache_ptr->dirty_index_size);
+ assert(nominated_entries_size >= space_needed);
} /* end if */
done:
@@ -644,14 +644,14 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(ce_array_len > 0);
- HDassert(ce_array_ptr != NULL);
+ assert(ce_array_len > 0);
+ assert(ce_array_ptr != NULL);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -679,20 +679,19 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
#endif /* H5C_DO_SANITY_CHECKS */
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
if (entry_ptr == NULL) {
#ifdef H5C_DO_SANITY_CHECKS
- HDfprintf(stdout, "H5C_mark_entries_as_clean: entry[%u] = %" PRIuHADDR " not in cache.\n", u,
- addr);
+ fprintf(stdout, "H5C_mark_entries_as_clean: entry[%u] = %" PRIuHADDR " not in cache.\n", u, addr);
#endif /* H5C_DO_SANITY_CHECKS */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not in cache?!?!?")
} /* end if */
else if (!entry_ptr->is_dirty) {
#ifdef H5C_DO_SANITY_CHECKS
- HDfprintf(stdout, "H5C_mark_entries_as_clean: entry %" PRIuHADDR " is not dirty!?!\n", addr);
+ fprintf(stdout, "H5C_mark_entries_as_clean: entry %" PRIuHADDR " is not dirty!?!\n", addr);
#endif /* H5C_DO_SANITY_CHECKS */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?")
} /* end else-if */
@@ -762,7 +761,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
} /* end while */
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(entries_cleared == other_entries_marked);
+ assert(entries_cleared == other_entries_marked);
#endif /* H5C_DO_SANITY_CHECKS */
/* It is also possible that some of the cleared entries are on the
@@ -793,11 +792,11 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
} /* end while */
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(entries_cleared == pinned_entries_marked + other_entries_marked);
- HDassert(entries_cleared + protected_entries_marked == ce_array_len);
+ assert(entries_cleared == pinned_entries_marked + other_entries_marked);
+ assert(entries_cleared + protected_entries_marked == ce_array_len);
#endif /* H5C_DO_SANITY_CHECKS */
- HDassert((entries_cleared == ce_array_len) || ((ce_array_len - entries_cleared) <= cache_ptr->pl_len));
+ assert((entries_cleared == ce_array_len) || ((ce_array_len - entries_cleared) <= cache_ptr->pl_len));
#ifdef H5C_DO_SANITY_CHECKS
u = 0;
@@ -807,7 +806,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
u++;
entry_ptr = entry_ptr->next;
}
- HDassert((entries_cleared + u) == ce_array_len);
+ assert((entries_cleared + u) == ce_array_len);
#endif /* H5C_DO_SANITY_CHECKS */
done:
@@ -853,7 +852,7 @@ H5C_clear_coll_entries(H5C_t *cache_ptr, hbool_t partial)
H5C_cache_entry_t *prev_ptr = entry_ptr->coll_prev;
/* Sanity check */
- HDassert(entry_ptr->coll_access);
+ assert(entry_ptr->coll_access);
/* Mark entry as independent */
entry_ptr->coll_access = FALSE;
@@ -901,10 +900,10 @@ H5C__collective_write(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->coll_write_list != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->coll_write_list != NULL);
/* Get original transfer mode */
if (H5CX_get_io_xfer_mode(&orig_xfer_mode) < 0)
@@ -935,12 +934,12 @@ H5C__collective_write(H5F_t *f)
/* Fill arrays */
node = H5SL_first(cache_ptr->coll_write_list);
- HDassert(node);
+ assert(node);
if (NULL == (entry_ptr = (H5C_cache_entry_t *)H5SL_item(node)))
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't retrieve skip list item")
/* Set up initial array position & buffer base address */
- HDassert(entry_ptr->type);
+ assert(entry_ptr->type);
base_buf = entry_ptr->image_ptr;
addrs[0] = entry_ptr->addr;
sizes[0] = entry_ptr->size;
@@ -958,7 +957,7 @@ H5C__collective_write(H5F_t *f)
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't retrieve skip list item")
/* Set up array position */
- HDassert(entry_ptr->type);
+ assert(entry_ptr->type);
addrs[i] = entry_ptr->addr;
sizes[i] = entry_ptr->size;
bufs[i] = entry_ptr->image_ptr;
@@ -1051,25 +1050,25 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
- HDassert(entries_to_flush[H5C_RING_UNDEFINED] == 0);
- HDassert(entries_to_clear[H5C_RING_UNDEFINED] == 0);
+ assert(entries_to_flush[H5C_RING_UNDEFINED] == 0);
+ assert(entries_to_clear[H5C_RING_UNDEFINED] == 0);
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
for (i = H5C_RING_USER; i < H5C_RING_NTYPES; i++) {
index_len += cache_ptr->index_ring_len[i];
@@ -1081,12 +1080,12 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
- HDassert(cache_ptr->index_len == index_len);
- HDassert(cache_ptr->index_size == index_size);
- HDassert(cache_ptr->clean_index_size == clean_index_size);
- HDassert(cache_ptr->dirty_index_size == dirty_index_size);
- HDassert(cache_ptr->slist_len == slist_len);
- HDassert(cache_ptr->slist_size == slist_size);
+ assert(cache_ptr->index_len == index_len);
+ assert(cache_ptr->index_size == index_size);
+ assert(cache_ptr->clean_index_size == clean_index_size);
+ assert(cache_ptr->dirty_index_size == dirty_index_size);
+ assert(cache_ptr->slist_len == slist_len);
+ assert(cache_ptr->slist_size == slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
@@ -1172,14 +1171,14 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
- HDassert(ring > H5C_RING_UNDEFINED);
- HDassert(ring < H5C_RING_NTYPES);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
+ assert(ring > H5C_RING_UNDEFINED);
+ assert(ring < H5C_RING_NTYPES);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
@@ -1209,7 +1208,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
H5C_cache_entry_t *next_ptr;
/* Entries in the LRU must not have flush dependency children */
- HDassert(entry_ptr->flush_dep_nchildren == 0);
+ assert(entry_ptr->flush_dep_nchildren == 0);
/* Remember dirty state of entry to advance to */
if (entry_ptr->prev != NULL)
@@ -1219,7 +1218,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
if (entry_ptr->ring == ring) {
/* If this process needs to clear this entry. */
if (entry_ptr->clear_on_unprotect) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
/* Set entry and flags for operation */
op_ptr = entry_ptr;
@@ -1233,7 +1232,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
entries_cleared++;
} /* end if */
else if (entry_ptr->flush_immediately) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
/* Set entry and flags for operation */
op_ptr = entry_ptr;
@@ -1306,13 +1305,13 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
* present. Hence the following assertion which should be
* removed if the above changes.
*/
- HDassert(!restart_scan);
- HDassert(entry_ptr->is_dirty == prev_is_dirty);
- HDassert(entry_ptr->next == next_ptr);
- HDassert(!entry_ptr->is_protected);
- HDassert(!entry_ptr->is_pinned);
+ assert(!restart_scan);
+ assert(entry_ptr->is_dirty == prev_is_dirty);
+ assert(entry_ptr->next == next_ptr);
+ assert(!entry_ptr->is_protected);
+ assert(!entry_ptr->is_pinned);
- HDassert(FALSE); /* see comment above */
+ assert(FALSE); /* see comment above */
restart_scan = FALSE;
entry_ptr = cache_ptr->LRU_tail_ptr;
@@ -1351,7 +1350,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
H5C_cache_entry_t *prev_ptr;
hbool_t next_is_dirty = FALSE;
- HDassert(entry_ptr->is_pinned);
+ assert(entry_ptr->is_pinned);
/* Remember dirty state of entry to advance to */
if (entry_ptr->next != NULL)
@@ -1359,7 +1358,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
if (entry_ptr->ring == ring && entry_ptr->flush_dep_ndirty_children == 0) {
if (entry_ptr->clear_on_unprotect) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
/* Set entry and flags for operation */
op_ptr = entry_ptr;
@@ -1371,7 +1370,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
progress = TRUE;
} /* end if */
else if (entry_ptr->flush_immediately) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
/* Set entry and flags for operation */
op_ptr = entry_ptr;
@@ -1431,11 +1430,11 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
* over from the head.
*/
- HDassert(!restart_scan);
- HDassert(entry_ptr->is_dirty == next_is_dirty);
- HDassert(entry_ptr->prev == prev_ptr);
- HDassert(!entry_ptr->is_protected);
- HDassert(entry_ptr->is_pinned);
+ assert(!restart_scan);
+ assert(entry_ptr->is_dirty == next_is_dirty);
+ assert(entry_ptr->prev == prev_ptr);
+ assert(!entry_ptr->is_protected);
+ assert(entry_ptr->is_pinned);
/* This code should be un-reachable at present,
* as all the operations by entries on flush that could cause
@@ -1443,7 +1442,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
* present. Hence the following assertion which should be
* removed if the above changes.
*/
- HDassert(FALSE);
+ assert(FALSE);
restart_scan = FALSE;
@@ -1467,14 +1466,14 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
*/
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(init_index_len == cache_ptr->index_len);
+ assert(init_index_len == cache_ptr->index_len);
#endif /* H5C_DO_SANITY_CHECKS */
if (entries_flushed != entries_to_flush || entries_cleared != entries_to_clear) {
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(!entry_ptr->clear_on_unprotect || (entry_ptr->ring > ring));
- HDassert(!entry_ptr->flush_immediately || (entry_ptr->ring > ring));
+ assert(!entry_ptr->clear_on_unprotect || (entry_ptr->ring > ring));
+ assert(!entry_ptr->flush_immediately || (entry_ptr->ring > ring));
entry_ptr = entry_ptr->il_next;
} /* end while */
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 7bd7087..095dc8b 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -1173,7 +1173,7 @@ if ( ( (cache_ptr)->index_size != \
} \
if((entry_ptr)->flush_me_last) { \
(cache_ptr)->num_last_entries++; \
- HDassert((cache_ptr)->num_last_entries <= 2); \
+ assert((cache_ptr)->num_last_entries <= 2); \
} \
H5C__IL_DLL_APPEND((entry_ptr), (cache_ptr)->il_head, \
(cache_ptr)->il_tail, (cache_ptr)->il_len, \
@@ -1211,7 +1211,7 @@ if ( ( (cache_ptr)->index_size != \
} \
if((entry_ptr)->flush_me_last) { \
(cache_ptr)->num_last_entries--; \
- HDassert((cache_ptr)->num_last_entries <= 1); \
+ assert((cache_ptr)->num_last_entries <= 1); \
} \
H5C__IL_DLL_REMOVE((entry_ptr), (cache_ptr)->il_head, \
(cache_ptr)->il_tail, (cache_ptr)->il_len, \
@@ -1233,7 +1233,7 @@ if ( ( (cache_ptr)->index_size != \
if(entry_ptr != ((cache_ptr)->index)[k]) { \
if((entry_ptr)->ht_next) \
(entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \
- HDassert((entry_ptr)->ht_prev != NULL); \
+ assert((entry_ptr)->ht_prev != NULL); \
(entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \
((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \
(entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
@@ -1353,21 +1353,21 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (entry_ptr) ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( H5F_addr_defined((entry_ptr)->addr) ); \
- HDassert( !((entry_ptr)->in_slist) ); \
- HDassert( ! H5C_ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr) ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( H5F_addr_defined((entry_ptr)->addr) ); \
+ assert( !((entry_ptr)->in_slist) ); \
+ assert( ! H5C_ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
\
if ( H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, \
@@ -1384,13 +1384,13 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->slist_len_increase++; \
(cache_ptr)->slist_size_increase += (int64_t)((entry_ptr)->size); \
\
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( (cache_ptr)->slist_size > 0 ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
+ assert( (cache_ptr)->slist_size > 0 ); \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__INSERT_ENTRY_IN_SLIST */
@@ -1398,23 +1398,23 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (entry_ptr) ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( ! H5C_ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \
- HDassert( H5F_addr_defined((entry_ptr)->addr) ); \
- HDassert( !((entry_ptr)->in_slist) ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr) ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( ! H5C_ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \
+ assert( H5F_addr_defined((entry_ptr)->addr) ); \
+ assert( !((entry_ptr)->in_slist) ); \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_ptr ); \
+ assert( (cache_ptr)->slist_ptr ); \
\
if ( H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, \
&((entry_ptr)->addr)) < 0) \
@@ -1428,13 +1428,13 @@ if ( ( (cache_ptr)->index_size != \
((cache_ptr)->slist_ring_len[(entry_ptr)->ring])++; \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) += (entry_ptr)->size;\
\
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( (cache_ptr)->slist_size > 0 ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
+ assert( (cache_ptr)->slist_size > 0 ); \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__INSERT_ENTRY_IN_SLIST */
@@ -1459,38 +1459,38 @@ if ( ( (cache_ptr)->index_size != \
#ifdef H5C_DO_SANITY_CHECKS
#define H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, during_flush) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( (entry_ptr)->in_slist ); \
- HDassert( (cache_ptr)->slist_ptr ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( (entry_ptr)->in_slist ); \
+ assert( (cache_ptr)->slist_ptr ); \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
+ assert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
\
if ( H5SL_remove((cache_ptr)->slist_ptr, &(entry_ptr)->addr) \
!= (entry_ptr) ) \
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, \
"can't delete entry from skip list") \
\
- HDassert( (cache_ptr)->slist_len > 0 ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
if(!(during_flush)) \
(cache_ptr)->slist_changed = TRUE; \
(cache_ptr)->slist_len--; \
- HDassert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
+ assert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
(cache_ptr)->slist_size -= (entry_ptr)->size; \
((cache_ptr)->slist_ring_len[(entry_ptr)->ring])--; \
- HDassert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
+ assert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
(entry_ptr)->size ); \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) -= (entry_ptr)->size;\
(cache_ptr)->slist_len_increase--; \
@@ -1499,8 +1499,8 @@ if ( ( (cache_ptr)->index_size != \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__REMOVE_ENTRY_FROM_SLIST */
@@ -1508,21 +1508,21 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, during_flush) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->in_slist ); \
- HDassert( (cache_ptr)->slist_ptr ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->in_slist ); \
+ assert( (cache_ptr)->slist_ptr ); \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
\
if ( H5SL_remove((cache_ptr)->slist_ptr, &(entry_ptr)->addr) \
@@ -1530,22 +1530,22 @@ if ( ( (cache_ptr)->index_size != \
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, \
"can't delete entry from skip list") \
\
- HDassert( (cache_ptr)->slist_len > 0 ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
if(!(during_flush)) \
(cache_ptr)->slist_changed = TRUE; \
(cache_ptr)->slist_len--; \
- HDassert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
+ assert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
(cache_ptr)->slist_size -= (entry_ptr)->size; \
((cache_ptr)->slist_ring_len[(entry_ptr)->ring])--; \
- HDassert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
+ assert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
(entry_ptr)->size ); \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) -= (entry_ptr)->size;\
(entry_ptr)->in_slist = FALSE; \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__REMOVE_ENTRY_FROM_SLIST */
@@ -1570,28 +1570,28 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (old_size) > 0 ); \
- HDassert( (new_size) > 0 ); \
- HDassert( (old_size) <= (cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( ((cache_ptr)->slist_len > 1) || \
+ assert( (old_size) > 0 ); \
+ assert( (new_size) > 0 ); \
+ assert( (old_size) <= (cache_ptr)->slist_size ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
+ assert( ((cache_ptr)->slist_len > 1) || \
( (cache_ptr)->slist_size == (old_size) ) ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
\
(cache_ptr)->slist_size -= (old_size); \
(cache_ptr)->slist_size += (new_size); \
\
- HDassert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] \
+ assert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] \
>= (old_size) ); \
\
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) -= (old_size); \
@@ -1600,14 +1600,14 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->slist_size_increase -= (int64_t)(old_size); \
(cache_ptr)->slist_size_increase += (int64_t)(new_size); \
\
- HDassert( (new_size) <= (cache_ptr)->slist_size ); \
- HDassert( ( (cache_ptr)->slist_len > 1 ) || \
+ assert( (new_size) <= (cache_ptr)->slist_size ); \
+ assert( ( (cache_ptr)->slist_len > 1 ) || \
( (cache_ptr)->slist_size == (new_size) ) ); \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__UPDATE_SLIST_FOR_SIZE_CHANGE */
@@ -1615,40 +1615,40 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (old_size) > 0 ); \
- HDassert( (new_size) > 0 ); \
- HDassert( (old_size) <= (cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( ((cache_ptr)->slist_len > 1) || \
+ assert( (old_size) > 0 ); \
+ assert( (new_size) > 0 ); \
+ assert( (old_size) <= (cache_ptr)->slist_size ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
+ assert( ((cache_ptr)->slist_len > 1) || \
( (cache_ptr)->slist_size == (old_size) ) ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
\
(cache_ptr)->slist_size -= (old_size); \
(cache_ptr)->slist_size += (new_size); \
\
- HDassert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
+ assert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
(old_size) ); \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) -= (old_size); \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) += (new_size); \
\
- HDassert( (new_size) <= (cache_ptr)->slist_size ); \
- HDassert( ( (cache_ptr)->slist_len > 1 ) || \
+ assert( (new_size) <= (cache_ptr)->slist_size ); \
+ assert( ( (cache_ptr)->slist_len > 1 ) || \
( (cache_ptr)->slist_size == (new_size) ) ); \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__UPDATE_SLIST_FOR_SIZE_CHANGE */
@@ -1684,14 +1684,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( !((entry_ptr)->is_pinned) ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( !((entry_ptr)->is_pinned) ); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* modified LRU specific code */ \
\
@@ -1726,14 +1726,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( !((entry_ptr)->is_pinned) ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( !((entry_ptr)->is_pinned) ); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* modified LRU specific code */ \
\
@@ -1771,13 +1771,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( ! ((entry_ptr)->is_pinned) ) { \
\
@@ -1833,13 +1833,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( ! ((entry_ptr)->is_pinned) ) { \
\
@@ -1897,13 +1897,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_INSERT_APPEND(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -1947,13 +1947,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_INSERT_APPEND(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2003,13 +2003,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2053,13 +2053,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2113,13 +2113,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2175,13 +2175,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2240,12 +2240,12 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) && ! ( ((entry_ptr)->is_protected ) ) ) {\
\
@@ -2317,12 +2317,12 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) && ! ( ((entry_ptr)->is_protected ) ) ) {\
\
@@ -2378,14 +2378,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( new_size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( new_size > 0 ); \
\
if ( (entry_ptr)->coll_access ) { \
\
@@ -2443,14 +2443,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( new_size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( new_size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2505,14 +2505,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->is_pinned); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->is_pinned); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* Regardless of the replacement policy, remove the entry from the \
* pinned entry list. \
@@ -2561,14 +2561,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->is_pinned); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->is_pinned); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* Regardless of the replacement policy, remove the entry from the \
* pinned entry list. \
@@ -2620,11 +2620,11 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( (entry_ptr)->is_protected); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( (entry_ptr)->is_protected); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* Regardless of the replacement policy, remove the entry from the \
* protected list. \
@@ -2679,11 +2679,11 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( (entry_ptr)->is_protected); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( (entry_ptr)->is_protected); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* Regardless of the replacement policy, remove the entry from the \
* protected list. \
@@ -2873,9 +2873,9 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__INSERT_IN_COLL_LIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
\
/* insert the entry at the head of the list. */ \
\
@@ -2903,9 +2903,9 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
\
/* remove the entry from the list. */ \
\
@@ -2933,9 +2933,9 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__MOVE_TO_TOP_IN_COLL_LIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert((cache_ptr)); \
- HDassert((cache_ptr)->magic == H5C__H5C_T_MAGIC); \
- HDassert((entry_ptr)); \
+ assert((cache_ptr)); \
+ assert((cache_ptr)->magic == H5C__H5C_T_MAGIC); \
+ assert((entry_ptr)); \
\
/* Remove entry and insert at the head of the list. */ \
H5C__COLL_DLL_REMOVE((entry_ptr), (cache_ptr)->coll_head_ptr, \
@@ -3314,7 +3314,7 @@ typedef struct H5C_tag_info_t {
* Note: At this time, the this field will only be applied to
* two types of entries: the superblock and the file driver info
* message. The code utilizing these flags is protected with
- * HDasserts to enforce this.
+ * asserts to enforce this.
*
* The cache must deal with the case in which entries may be dirtied, moved,
* or have their sizes changed during a flush. To allow sanity checks in this
diff --git a/src/H5Cprefetched.c b/src/H5Cprefetched.c
index 8ce9419..ccaccad 100644
--- a/src/H5Cprefetched.c
+++ b/src/H5Cprefetched.c
@@ -210,9 +210,9 @@ H5C__prefetched_entry_notify(H5C_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->prefetched);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->prefetched);
switch (action) {
case H5C_NOTIFY_ACTION_AFTER_INSERT:
@@ -232,11 +232,11 @@ H5C__prefetched_entry_notify(H5C_notify_action_t action, void *_thing)
H5C_cache_entry_t *parent_ptr;
/* Sanity checks */
- HDassert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->flush_dep_parent);
parent_ptr = entry_ptr->flush_dep_parent[u];
- HDassert(parent_ptr);
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(parent_ptr->flush_dep_nchildren > 0);
+ assert(parent_ptr);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->flush_dep_nchildren > 0);
/* Destroy flush dependency with flush dependency parent */
if (H5C_destroy_flush_dependency(parent_ptr, entry_ptr) < 0)
@@ -249,7 +249,7 @@ H5C__prefetched_entry_notify(H5C_notify_action_t action, void *_thing)
* field to reflect the destruction of the flush
* dependency relationship.
*/
- HDassert(parent_ptr->fd_child_count > 0);
+ assert(parent_ptr->fd_child_count > 0);
(parent_ptr->fd_child_count)--;
} /* end if */
} /* end for */
@@ -288,17 +288,17 @@ H5C__prefetched_entry_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(entry_ptr->prefetched);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(entry_ptr->prefetched);
/* Release array for flush dependency parent addresses */
if (entry_ptr->fd_parent_addrs != NULL) {
- HDassert(entry_ptr->fd_parent_count > 0);
+ assert(entry_ptr->fd_parent_count > 0);
entry_ptr->fd_parent_addrs = (haddr_t *)H5MM_xfree((void *)entry_ptr->fd_parent_addrs);
} /* end if */
else
- HDassert(entry_ptr->fd_parent_count == 0);
+ assert(entry_ptr->fd_parent_count == 0);
if (entry_ptr->image_ptr != NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "prefetched entry image buffer still attached?")
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index a5330ce..b678392 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -1112,7 +1112,7 @@ typedef int H5C_ring_t;
* Note: At this time, the flush_me_last flag will only be applied to
* two types of entries: the superblock and the file driver info
* message. The code utilizing these flags is protected with
- * HDasserts to enforce this.
+ * asserts to enforce this.
*
* clear_on_unprotect: Boolean flag used only in PHDF5. When H5C is used
* to implement the metadata cache In the parallel case, only
diff --git a/src/H5Cquery.c b/src/H5Cquery.c
index db73d65..c8fc954 100644
--- a/src/H5Cquery.c
+++ b/src/H5Cquery.c
@@ -194,8 +194,8 @@ H5C_get_cache_hit_rate(const H5C_t *cache_ptr, double *hit_rate_ptr)
if (hit_rate_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad hit_rate_ptr on entry.")
- HDassert(cache_ptr->cache_hits >= 0);
- HDassert(cache_ptr->cache_accesses >= cache_ptr->cache_hits);
+ assert(cache_ptr->cache_hits >= 0);
+ assert(cache_ptr->cache_accesses >= cache_ptr->cache_hits);
if (cache_ptr->cache_accesses > 0)
*hit_rate_ptr = ((double)(cache_ptr->cache_hits)) / ((double)(cache_ptr->cache_accesses));
@@ -241,15 +241,15 @@ H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
- HDassert(in_cache_ptr != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
+ assert(in_cache_ptr != NULL);
/* this test duplicates two of the above asserts, but we need an
* invocation of HGOTO_ERROR to keep the compiler happy.
@@ -342,8 +342,8 @@ H5C_get_aux_ptr(const H5C_t *cache_ptr)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
FUNC_LEAVE_NOAPI(cache_ptr->aux_ptr)
} /* H5C_get_aux_ptr() */
@@ -373,12 +373,12 @@ H5C_get_entry_ring(const H5F_t *f, haddr_t addr, H5C_ring_t *ring)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
/* Locate the entry at the address */
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index 10089e4..4fbc5d4 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -126,8 +126,8 @@ H5C_ignore_tags(H5C_t *cache)
FUNC_ENTER_NOAPI_NOERR
/* Assertions */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Set variable to ignore tag values upon assignment */
cache->ignore_tags = TRUE;
@@ -154,8 +154,8 @@ H5C_get_ignore_tags(const H5C_t *cache)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Return ignore tag value */
FUNC_LEAVE_NOAPI(cache->ignore_tags)
@@ -179,8 +179,8 @@ H5C_get_num_objs_corked(const H5C_t *cache)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Return value for num_objs_corked */
FUNC_LEAVE_NOAPI(cache->num_objs_corked)
@@ -212,9 +212,9 @@ H5C__tag_entry(H5C_t *cache, H5C_cache_entry_t *entry)
FUNC_ENTER_PACKAGE
/* Assertions */
- HDassert(cache != NULL);
- HDassert(entry != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(entry != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Get the tag */
tag = H5CX_get_tag();
@@ -254,12 +254,12 @@ H5C__tag_entry(H5C_t *cache, H5C_cache_entry_t *entry)
HASH_ADD(hh, cache->tag_list, tag, sizeof(haddr_t), tag_info);
}
else
- HDassert(tag_info->corked || (tag_info->entry_cnt > 0 && tag_info->head));
+ assert(tag_info->corked || (tag_info->entry_cnt > 0 && tag_info->head));
/* Sanity check entry, to avoid double insertions, etc */
- HDassert(entry->tl_next == NULL);
- HDassert(entry->tl_prev == NULL);
- HDassert(entry->tag_info == NULL);
+ assert(entry->tl_next == NULL);
+ assert(entry->tl_prev == NULL);
+ assert(entry->tag_info == NULL);
/* Add the entry to the list for the tagged object */
entry->tl_next = tag_info->head;
@@ -296,9 +296,9 @@ H5C__untag_entry(H5C_t *cache, H5C_cache_entry_t *entry)
FUNC_ENTER_PACKAGE_NOERR
/* Assertions */
- HDassert(cache != NULL);
- HDassert(entry != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(entry != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Get the entry's tag info struct */
if (NULL != (tag_info = entry->tag_info)) {
@@ -319,14 +319,14 @@ H5C__untag_entry(H5C_t *cache, H5C_cache_entry_t *entry)
/* Remove the tag info from the tag list, if there's no more entries with this tag */
if (!tag_info->corked && 0 == tag_info->entry_cnt) {
/* Sanity check */
- HDassert(NULL == tag_info->head);
+ assert(NULL == tag_info->head);
/* Release the tag info */
HASH_DELETE(hh, cache->tag_list, tag_info);
tag_info = H5FL_FREE(H5C_tag_info_t, tag_info);
}
else
- HDassert(tag_info->corked || NULL != tag_info->head);
+ assert(tag_info->corked || NULL != tag_info->head);
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -355,8 +355,8 @@ H5C__iter_tagged_entries_real(H5C_t *cache, haddr_t tag, H5C_tag_iter_cb_t cb, v
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Search the list of tagged object addresses in the cache */
HASH_FIND(hh, cache->tag_list, &tag, sizeof(haddr_t), tag_info);
@@ -367,8 +367,8 @@ H5C__iter_tagged_entries_real(H5C_t *cache, haddr_t tag, H5C_tag_iter_cb_t cb, v
H5C_cache_entry_t *next_entry; /* Pointer to next entry in hash bucket chain */
/* Sanity check */
- HDassert(tag_info->head);
- HDassert(tag_info->entry_cnt > 0);
+ assert(tag_info->head);
+ assert(tag_info->entry_cnt > 0);
/* Iterate over the entries for this tag */
entry = tag_info->head;
@@ -411,8 +411,8 @@ H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, hbool_t match_global, H5C_ta
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Iterate over the entries for this tag */
if (H5C__iter_tagged_entries_real(cache, tag, cb, cb_ctx) < 0)
@@ -456,8 +456,8 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx)
FUNC_ENTER_PACKAGE
/* Santify checks */
- HDassert(entry);
- HDassert(ctx);
+ assert(entry);
+ assert(ctx);
/* Attempt to evict entry */
if (entry->is_protected)
@@ -508,11 +508,11 @@ H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache = f->shared->cache; /* Get cache pointer */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Construct context for iterator callbacks */
ctx.f = f;
@@ -583,7 +583,7 @@ H5C__mark_tagged_entries_cb(H5C_cache_entry_t *entry, void H5_ATTR_UNUSED *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
/* We only want to set the flush marker on entries that
* actually need flushed (i.e., dirty ones) */
@@ -616,8 +616,8 @@ H5C__mark_tagged_entries(H5C_t *cache, haddr_t tag)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Iterate through hash table entries, marking those with specified tag, as
* well as any major global entries which should always be flushed
@@ -725,8 +725,8 @@ H5C_flush_tagged_entries(H5F_t *f, haddr_t tag)
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Get cache pointer */
cache = f->shared->cache;
@@ -767,7 +767,7 @@ H5C_retag_entries(H5C_t *cache, haddr_t src_tag, haddr_t dest_tag)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(cache);
+ assert(cache);
/* Remove tag info from tag list */
HASH_FIND(hh, cache->tag_list, &src_tag, sizeof(haddr_t), tag_info);
@@ -809,8 +809,8 @@ H5C__expunge_tag_type_metadata_cb(H5C_cache_entry_t *entry, void *_ctx)
FUNC_ENTER_PACKAGE
/* Santify checks */
- HDassert(entry);
- HDassert(ctx);
+ assert(entry);
+ assert(ctx);
/* Found one with the same tag and type id */
if (entry->type->id == ctx->type_id)
@@ -846,11 +846,11 @@ H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache = f->shared->cache; /* Get cache pointer */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Construct context for iterator callbacks */
ctx.f = f;
@@ -885,9 +885,9 @@ H5C_get_tag(const void *thing, haddr_t *tag)
FUNC_ENTER_NOAPI_NOERR
- HDassert(entry);
- HDassert(entry->tag_info);
- HDassert(tag);
+ assert(entry);
+ assert(entry->tag_info);
+ assert(tag);
/* Return the tag */
*tag = entry->tag_info->tag;
diff --git a/src/H5Ctest.c b/src/H5Ctest.c
index 6097e25..d0be0f9 100644
--- a/src/H5Ctest.c
+++ b/src/H5Ctest.c
@@ -93,8 +93,8 @@ H5C__verify_cork_tag_test_cb(H5C_cache_entry_t *entry, void *_ctx)
FUNC_ENTER_PACKAGE
/* Santify checks */
- HDassert(entry);
- HDassert(ctx);
+ assert(entry);
+ assert(ctx);
/* Retrieve corked status for entry */
is_corked = entry->tag_info ? entry->tag_info->corked : FALSE;
diff --git a/src/H5D.c b/src/H5D.c
index 66e3541..f9b17c5 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1755,14 +1755,14 @@ H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf
if (0 ==
(nelmts_gathered = H5D__gather_mem(src_buf, iter, MIN(dst_buf_nelmts, (size_t)nelmts), dst_buf)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "gather failed")
- HDassert(nelmts_gathered == MIN(dst_buf_nelmts, (size_t)nelmts));
+ assert(nelmts_gathered == MIN(dst_buf_nelmts, (size_t)nelmts));
/* Make callback to process dst_buf */
if (op && op(dst_buf, nelmts_gathered * type_size, op_data) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CALLBACK, FAIL, "callback operator returned failure")
nelmts -= (hssize_t)nelmts_gathered;
- HDassert(op || (nelmts == 0));
+ assert(op || (nelmts == 0));
} /* end while */
done:
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index a9dfad6..d45632a 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -203,10 +203,10 @@ H5D__btree_get_shared(const H5F_t H5_ATTR_UNUSED *f, const void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(udata);
- HDassert(udata->storage);
- HDassert(udata->storage->idx_type == H5D_CHUNK_IDX_BTREE);
- HDassert(udata->storage->u.btree.shared);
+ assert(udata);
+ assert(udata->storage);
+ assert(udata->storage->idx_type == H5D_CHUNK_IDX_BTREE);
+ assert(udata->storage->u.btree.shared);
/* Return the pointer to the ref-count object */
FUNC_LEAVE_NOAPI(udata->storage->u.btree.shared)
@@ -243,16 +243,16 @@ H5D__btree_new_node(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5B_ins_t op, void *_lt_key,
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(lt_key);
- HDassert(rt_key);
- HDassert(udata);
- HDassert(udata->common.layout->ndims > 0 && udata->common.layout->ndims < H5O_LAYOUT_NDIMS);
- HDassert(addr_p);
+ assert(f);
+ assert(lt_key);
+ assert(rt_key);
+ assert(udata);
+ assert(udata->common.layout->ndims > 0 && udata->common.layout->ndims < H5O_LAYOUT_NDIMS);
+ assert(addr_p);
/* Set address */
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
- HDassert(udata->chunk_block.length > 0);
+ assert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(udata->chunk_block.length > 0);
*addr_p = udata->chunk_block.offset;
/*
@@ -272,7 +272,7 @@ H5D__btree_new_node(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5B_ins_t op, void *_lt_key,
rt_key->nbytes = 0;
rt_key->filter_mask = 0;
for (u = 0; u < udata->common.layout->ndims; u++) {
- HDassert(udata->common.scaled[u] + 1 > udata->common.scaled[u]);
+ assert(udata->common.scaled[u] + 1 > udata->common.scaled[u]);
rt_key->scaled[u] = udata->common.scaled[u] + 1;
} /* end if */
} /* end if */
@@ -309,10 +309,10 @@ H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(lt_key);
- HDassert(rt_key);
- HDassert(udata);
- HDassert(udata->layout->ndims > 0 && udata->layout->ndims <= H5O_LAYOUT_NDIMS);
+ assert(lt_key);
+ assert(rt_key);
+ assert(udata);
+ assert(udata->layout->ndims > 0 && udata->layout->ndims <= H5O_LAYOUT_NDIMS);
/* Compare the offsets but ignore the other fields */
ret_value = H5VM_vector_cmp_u(udata->layout->ndims, lt_key->scaled, rt_key->scaled);
@@ -357,10 +357,10 @@ H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(lt_key);
- HDassert(rt_key);
- HDassert(udata);
- HDassert(udata->layout->ndims > 0 && udata->layout->ndims <= H5O_LAYOUT_NDIMS);
+ assert(lt_key);
+ assert(rt_key);
+ assert(udata);
+ assert(udata->layout->ndims > 0 && udata->layout->ndims <= H5O_LAYOUT_NDIMS);
/* Special case for faster checks on 1-D chunks */
/* (Checking for ndims==2 because last dimension is the datatype size) */
@@ -422,11 +422,11 @@ H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, hbo
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(lt_key);
- HDassert(found);
- HDassert(udata);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(lt_key);
+ assert(found);
+ assert(udata);
/* Is this *really* the requested chunk? */
for (u = 0; u < udata->common.layout->ndims; u++)
@@ -436,7 +436,7 @@ H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, hbo
}
/* Initialize return values */
- HDassert(lt_key->nbytes > 0);
+ assert(lt_key->nbytes > 0);
udata->chunk_block.offset = addr;
udata->chunk_block.length = lt_key->nbytes;
udata->filter_mask = lt_key->filter_mask;
@@ -470,9 +470,9 @@ H5D__chunk_disjoint(unsigned n, const hsize_t *scaled1, const hsize_t *scaled2)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(n);
- HDassert(scaled1);
- HDassert(scaled2);
+ assert(n);
+ assert(scaled1);
+ assert(scaled2);
/* Loop over two chunks, detecting disjointness and getting out quickly */
for (u = 0; u < n; u++)
@@ -527,17 +527,17 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(lt_key);
- HDassert(lt_key_changed);
- HDassert(md_key);
- HDassert(udata);
- HDassert(rt_key);
- HDassert(new_node_p);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(lt_key);
+ assert(lt_key_changed);
+ assert(md_key);
+ assert(udata);
+ assert(rt_key);
+ assert(new_node_p);
cmp = H5D__btree_cmp3(lt_key, udata, rt_key);
- HDassert(cmp <= 0);
+ assert(cmp <= 0);
if (cmp < 0) {
/* Negative indices not supported yet */
@@ -551,7 +551,7 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
*/
if (lt_key->nbytes != udata->chunk_block.length) {
/* Set node's address (already re-allocated by main chunk routines) */
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(H5F_addr_defined(udata->chunk_block.offset));
*new_node_p = udata->chunk_block.offset;
H5_CHECKED_ASSIGN(lt_key->nbytes, uint32_t, udata->chunk_block.length, hsize_t);
lt_key->filter_mask = udata->filter_mask;
@@ -560,12 +560,12 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
}
else {
/* Already have address in udata, from main chunk routines */
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(H5F_addr_defined(udata->chunk_block.offset));
ret_value = H5B_INS_NOOP;
}
}
else if (H5D__chunk_disjoint(udata->common.layout->ndims, lt_key->scaled, udata->common.scaled)) {
- HDassert(H5D__chunk_disjoint(udata->common.layout->ndims, rt_key->scaled, udata->common.scaled));
+ assert(H5D__chunk_disjoint(udata->common.layout->ndims, rt_key->scaled, udata->common.scaled));
/*
* Split this node, inserting the new new node to the right of the
* current node. The MD_KEY is where the split occurs.
@@ -575,7 +575,7 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
for (u = 0; u < udata->common.layout->ndims; u++)
md_key->scaled[u] = udata->common.scaled[u];
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(H5F_addr_defined(udata->chunk_block.offset));
*new_node_p = udata->chunk_block.offset;
ret_value = H5B_INS_RIGHT;
}
@@ -640,11 +640,11 @@ H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key
FUNC_ENTER_PACKAGE
- HDassert(shared);
- HDassert(raw);
- HDassert(key);
+ assert(shared);
+ assert(raw);
+ assert(key);
layout = (const H5O_layout_chunk_t *)shared->udata;
- HDassert(layout);
+ assert(layout);
if (layout->ndims > H5O_LAYOUT_NDIMS)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "bad number of dimensions")
@@ -691,12 +691,12 @@ H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(shared);
- HDassert(raw);
- HDassert(key);
+ assert(shared);
+ assert(raw);
+ assert(key);
layout = (const H5O_layout_chunk_t *)shared->udata;
- HDassert(layout);
- HDassert(layout->ndims > 0 && layout->ndims <= H5O_LAYOUT_NDIMS);
+ assert(layout);
+ assert(layout->ndims > 0 && layout->ndims <= H5O_LAYOUT_NDIMS);
/* encode */
UINT32ENCODE(raw, key->nbytes);
@@ -731,13 +731,13 @@ H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key, con
FUNC_ENTER_PACKAGE_NOERR
- HDassert(key);
+ assert(key);
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)key->nbytes);
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask);
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
+ fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)key->nbytes);
+ fprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask);
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for (u = 0; u < udata->ndims; u++)
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", (key->scaled[u] * udata->common.layout->dim[u]));
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", (key->scaled[u] * udata->common.layout->dim[u]));
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -844,12 +844,12 @@ H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNUS
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(dset_ohdr_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(dset_ohdr_addr));
idx_info->storage->u.btree.dset_ohdr_addr = dset_ohdr_addr;
@@ -888,12 +888,12 @@ H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
/* Initialize "user" data for B-tree callbacks, etc. */
udata.layout = idx_info->layout;
@@ -925,7 +925,7 @@ H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__btree_idx_is_space_alloc() */
@@ -950,13 +950,13 @@ H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
FUNC_ENTER_PACKAGE
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/*
* Create the chunk it if it doesn't exist, or reallocate the chunk if
@@ -991,14 +991,14 @@ H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udat
FUNC_ENTER_PACKAGE
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->layout->ndims > 0);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->layout->ndims > 0);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Go get the chunk information from the B-tree */
found = FALSE;
@@ -1075,17 +1075,17 @@ H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t c
FUNC_ENTER_PACKAGE_NOERR
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(chunk_cb);
- HDassert(chunk_udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(chunk_cb);
+ assert(chunk_udata);
/* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
udata.cb = chunk_cb;
@@ -1118,13 +1118,13 @@ H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
FUNC_ENTER_PACKAGE
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Remove the chunk from the v1 B-tree index and release the space for the
* chunk (in the B-tree callback).
@@ -1158,11 +1158,11 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Check if the index data structure has been allocated */
if (H5F_addr_defined(idx_info->storage->idx_addr)) {
@@ -1177,7 +1177,7 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
/* Set up B-tree user data */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.layout = idx_info->layout;
udata.storage = &tmp_storage;
@@ -1215,17 +1215,17 @@ H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_
FUNC_ENTER_PACKAGE_TAG(H5AC__COPIED_TAG)
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
- HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
+ assert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Create shared B-tree info for each file */
if (H5D__btree_shared_create(idx_info_src->f, idx_info_src->storage, idx_info_src->layout) < 0)
@@ -1237,7 +1237,7 @@ H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_
/* Create the root of the B-tree that describes chunked storage in the dest. file */
if (H5D__btree_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
- HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
@@ -1262,8 +1262,8 @@ H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk
FUNC_ENTER_PACKAGE
- HDassert(storage_src);
- HDassert(storage_dst);
+ assert(storage_src);
+ assert(storage_dst);
/* Decrement refcount on shared B-tree info */
if (H5UC_DEC(storage_src->u.btree.shared) < 0)
@@ -1298,15 +1298,15 @@ H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(index_size);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(index_size);
/* Initialize B-tree node user-data */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.layout = idx_info->layout;
udata.storage = idx_info->storage;
@@ -1338,7 +1338,7 @@ H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -1365,10 +1365,10 @@ H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__btree_idx_dump() */
@@ -1392,11 +1392,11 @@ H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Free the raw B-tree node buffer */
if (NULL == idx_info->storage->u.btree.shared)
@@ -1434,11 +1434,11 @@ H5D_btree_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, un
FUNC_ENTER_NOAPI(FAIL)
/* Reset "fake" storage info */
- HDmemset(&storage, 0, sizeof(storage));
+ memset(&storage, 0, sizeof(storage));
storage.idx_type = H5D_CHUNK_IDX_BTREE;
/* Reset "fake" layout info */
- HDmemset(&layout, 0, sizeof(layout));
+ memset(&layout, 0, sizeof(layout));
layout.ndims = ndims;
for (u = 0; u < ndims; u++)
layout.dim[u] = dim[u];
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index c9f5ee9..104673e 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -221,9 +221,9 @@ H5D__bt2_crt_context(void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->ndims > 0 && udata->ndims < H5O_LAYOUT_NDIMS);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->ndims > 0 && udata->ndims < H5O_LAYOUT_NDIMS);
/* Allocate callback context */
if (NULL == (ctx = H5FL_MALLOC(H5D_bt2_ctx_t)))
@@ -275,7 +275,7 @@ H5D__bt2_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Free array for chunk dimension sizes */
if (ctx->dim)
@@ -336,8 +336,8 @@ H5D__bt2_compare(const void *_udata, const void *_rec2, int *result)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(rec1);
- HDassert(rec2);
+ assert(rec1);
+ assert(rec2);
/* Compare the offsets but ignore the other fields */
*result = H5VM_vector_cmp_u(udata->ndims, rec1->scaled, rec2->scaled);
@@ -368,7 +368,7 @@ H5D__bt2_unfilt_encode(uint8_t *raw, const void *_record, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, record->chunk_addr);
@@ -402,7 +402,7 @@ H5D__bt2_unfilt_decode(const uint8_t *raw, void *_record, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &record->chunk_addr);
@@ -436,15 +436,15 @@ H5D__bt2_unfilt_debug(FILE *stream, int indent, int fwidth, const void *_record,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(record);
- HDassert(ctx->chunk_size == record->nbytes);
- HDassert(0 == record->filter_mask);
+ assert(record);
+ assert(ctx->chunk_size == record->nbytes);
+ assert(0 == record->filter_mask);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for (u = 0; u < ctx->ndims; u++)
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -473,10 +473,10 @@ H5D__bt2_filt_encode(uint8_t *raw, const void *_record, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
- HDassert(record);
- HDassert(H5F_addr_defined(record->chunk_addr));
- HDassert(0 != record->nbytes);
+ assert(ctx);
+ assert(record);
+ assert(H5F_addr_defined(record->chunk_addr));
+ assert(0 != record->nbytes);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, record->chunk_addr);
@@ -511,8 +511,8 @@ H5D__bt2_filt_decode(const uint8_t *raw, void *_record, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
- HDassert(record);
+ assert(ctx);
+ assert(record);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &record->chunk_addr);
@@ -522,8 +522,8 @@ H5D__bt2_filt_decode(const uint8_t *raw, void *_record, void *_ctx)
UINT64DECODE(raw, record->scaled[u]);
/* Sanity checks */
- HDassert(H5F_addr_defined(record->chunk_addr));
- HDassert(0 != record->nbytes);
+ assert(H5F_addr_defined(record->chunk_addr));
+ assert(0 != record->nbytes);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__bt2_filt_decode() */
@@ -550,17 +550,17 @@ H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth, const void *_record, c
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(record);
- HDassert(H5F_addr_defined(record->chunk_addr));
- HDassert(0 != record->nbytes);
+ assert(record);
+ assert(H5F_addr_defined(record->chunk_addr));
+ assert(0 != record->nbytes);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)record->nbytes);
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", record->filter_mask);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
+ fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)record->nbytes);
+ fprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", record->filter_mask);
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for (u = 0; u < ctx->ndims; u++)
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -585,7 +585,7 @@ H5D__bt2_idx_init(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, const H5S_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(H5F_addr_defined(dset_ohdr_addr));
+ assert(H5F_addr_defined(dset_ohdr_addr));
idx_info->storage->u.btree2.dset_ohdr_addr = dset_ohdr_addr;
@@ -617,16 +617,16 @@ H5D__btree2_idx_depend(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_BT2 == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_BT2 == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(idx_info->storage->u.btree2.bt2);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_BT2 == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_BT2 == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info->storage->u.btree2.bt2);
/* Set up object header location for dataset */
H5O_loc_reset(&oloc);
@@ -680,14 +680,14 @@ H5D__bt2_idx_open(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_BT2 == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.btree2.bt2);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_BT2 == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.btree2.bt2);
/* Set up the user data */
u_ctx.f = idx_info->f;
@@ -731,12 +731,12 @@ H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
bt2_cparam.rrec_size = H5F_SIZEOF_ADDR(idx_info->f) /* Address of chunk */
+ (idx_info->layout->ndims - 1) * 8; /* # of dimensions x 64-bit chunk offsets */
@@ -804,7 +804,7 @@ H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__bt2_idx_is_space_alloc() */
@@ -837,7 +837,7 @@ H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed)
unsigned u; /* Local index variable */
for (u = 0; u < op_data->ndims; u++)
- HDassert(record->scaled[u] == op_data->rec.scaled[u]);
+ assert(record->scaled[u] == op_data->rec.scaled[u]);
}
#endif /* NDEBUG */
@@ -880,14 +880,14 @@ H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
+ assert(H5F_addr_defined(udata->chunk_block.offset));
/* Check if the v2 B-tree is open yet */
if (NULL == idx_info->storage->u.btree2.bt2) {
@@ -974,14 +974,14 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->layout->ndims > 0);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->layout->ndims > 0);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the v2 B-tree is open yet */
if (NULL == idx_info->storage->u.btree2.bt2) {
@@ -1017,7 +1017,7 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
/* Check if chunk was found */
if (found) {
/* Sanity check */
- HDassert(0 != found_rec.nbytes);
+ assert(0 != found_rec.nbytes);
/* Set common info for the chunk */
udata->chunk_block.offset = found_rec.chunk_addr;
@@ -1096,14 +1096,14 @@ H5D__bt2_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chu
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(chunk_cb);
- HDassert(chunk_udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(chunk_cb);
+ assert(chunk_udata);
/* Check if the v2 B-tree is open yet */
if (NULL == idx_info->storage->u.btree2.bt2) {
@@ -1155,7 +1155,7 @@ H5D__bt2_remove_cb(const void *_record, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
+ assert(f);
/* Free the space in the file for the object being removed */
H5_CHECK_OVERFLOW(record->nbytes, uint32_t, hsize_t);
@@ -1188,13 +1188,13 @@ H5D__bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *u
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the v2 B-tree is open yet */
if (NULL == idx_info->storage->u.btree2.bt2) {
@@ -1250,11 +1250,11 @@ H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Check if the index data structure has been allocated */
if (H5F_addr_defined(idx_info->storage->idx_addr)) {
@@ -1301,19 +1301,19 @@ H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_id
FUNC_ENTER_PACKAGE
/* Source file */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
/* Destination file */
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
- HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
+ assert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Check if the source v2 B-tree is open yet */
if (NULL == idx_info_src->storage->u.btree2.bt2)
@@ -1326,7 +1326,7 @@ H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_id
/* Create v2 B-tree that describes the chunked dataset in the destination file */
if (H5D__bt2_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
- HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Reset metadata tag */
H5_END_TAG
@@ -1354,10 +1354,10 @@ H5D__bt2_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(storage_src);
- HDassert(storage_src->u.btree2.bt2);
- HDassert(storage_dst);
- HDassert(storage_dst->u.btree2.bt2);
+ assert(storage_src);
+ assert(storage_src->u.btree2.bt2);
+ assert(storage_dst);
+ assert(storage_dst->u.btree2.bt2);
/* Close v2 B-tree for source file */
if (H5B2_close(storage_src->u.btree2.bt2) < 0)
@@ -1394,13 +1394,13 @@ H5D__bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(index_size);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(index_size);
/* Open v2 B-tree */
if (H5D__bt2_idx_open(idx_info) < 0)
@@ -1439,7 +1439,7 @@ H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -1466,10 +1466,10 @@ H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__bt2_idx_dump() */
@@ -1493,9 +1493,9 @@ H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->storage);
/* Check if the v2-btree is open */
if (idx_info->storage->u.btree2.bt2) {
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 0ab4da1..239f58c 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -79,12 +79,12 @@
/* Sanity check on chunk index types: commonly used by a lot of routines in this file */
#define H5D_CHUNK_STORAGE_INDEX_CHK(storage) \
- HDassert((H5D_CHUNK_IDX_EARRAY == (storage)->idx_type && H5D_COPS_EARRAY == (storage)->ops) || \
- (H5D_CHUNK_IDX_FARRAY == (storage)->idx_type && H5D_COPS_FARRAY == (storage)->ops) || \
- (H5D_CHUNK_IDX_BT2 == (storage)->idx_type && H5D_COPS_BT2 == (storage)->ops) || \
- (H5D_CHUNK_IDX_BTREE == (storage)->idx_type && H5D_COPS_BTREE == (storage)->ops) || \
- (H5D_CHUNK_IDX_SINGLE == (storage)->idx_type && H5D_COPS_SINGLE == (storage)->ops) || \
- (H5D_CHUNK_IDX_NONE == (storage)->idx_type && H5D_COPS_NONE == (storage)->ops));
+ assert((H5D_CHUNK_IDX_EARRAY == (storage)->idx_type && H5D_COPS_EARRAY == (storage)->ops) || \
+ (H5D_CHUNK_IDX_FARRAY == (storage)->idx_type && H5D_COPS_FARRAY == (storage)->ops) || \
+ (H5D_CHUNK_IDX_BT2 == (storage)->idx_type && H5D_COPS_BT2 == (storage)->ops) || \
+ (H5D_CHUNK_IDX_BTREE == (storage)->idx_type && H5D_COPS_BTREE == (storage)->ops) || \
+ (H5D_CHUNK_IDX_SINGLE == (storage)->idx_type && H5D_COPS_SINGLE == (storage)->ops) || \
+ (H5D_CHUNK_IDX_NONE == (storage)->idx_type && H5D_COPS_NONE == (storage)->ops));
/*
* Feature: If this constant is defined then every cache preemption and load
@@ -392,7 +392,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Sanity checks */
- HDassert(layout->type == H5D_CHUNKED);
+ assert(layout->type == H5D_CHUNKED);
/* Allocate dataspace and initialize it if it hasn't been. */
if (!H5D__chunk_is_space_alloc(&layout->storage))
@@ -408,8 +408,8 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Set the file block information for the old chunk */
/* (Which is only defined when overwriting an existing chunk) */
@@ -498,10 +498,10 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(offset);
- HDassert(filters);
- HDassert(buf);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(offset);
+ assert(filters);
+ assert(buf);
*filters = 0;
@@ -524,8 +524,8 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Check if the requested chunk exists in the chunk cache */
if (UINT_MAX != udata.idx_hint) {
@@ -533,8 +533,8 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo
hbool_t flush;
/* Sanity checks */
- HDassert(udata.idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata.idx_hint]);
+ assert(udata.idx_hint < rdcc->nslots);
+ assert(rdcc->slot[udata.idx_hint]);
flush = (ent->dirty == TRUE) ? TRUE : FALSE;
@@ -593,9 +593,9 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(offset);
- HDassert(storage_size);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(offset);
+ assert(storage_size);
/* Allocate dataspace and initialize it if it hasn't been. */
if (!(*layout->ops->is_space_alloc)(&layout->storage))
@@ -615,8 +615,8 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* The requested chunk is not in cache or on disk */
if (!H5F_addr_defined(udata.chunk_block.offset) && UINT_MAX == udata.idx_hint)
@@ -629,8 +629,8 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage
H5D_rdcc_ent_t *ent = rdcc->slot[udata.idx_hint];
/* Sanity checks */
- HDassert(udata.idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata.idx_hint]);
+ assert(udata.idx_hint < rdcc->nslots);
+ assert(rdcc->slot[udata.idx_hint]);
/* If the cached chunk is dirty, it must be flushed to get accurate size */
if (ent->dirty == TRUE) {
@@ -680,8 +680,8 @@ H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, const hsize
FUNC_ENTER_PACKAGE
- HDassert(layout);
- HDassert(curr_dims);
+ assert(layout);
+ assert(curr_dims);
/* Can happen when corrupt files are parsed */
if (ndims == 0)
@@ -736,7 +736,7 @@ H5D__chunk_set_info(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
+ assert(dset);
/* Set the base layout information */
if (H5D__chunk_set_info_real(&dset->shared->layout.u.chunk, dset->shared->ndims, dset->shared->curr_dims,
@@ -775,7 +775,7 @@ H5D__chunk_set_sizes(H5D_t *dset)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(dset);
+ assert(dset);
/* Increment # of chunk dimensions, to account for datatype size as last element */
dset->shared->layout.u.chunk.ndims++;
@@ -796,7 +796,7 @@ H5D__chunk_set_sizes(H5D_t *dset)
if (enc_bytes_per_dim > max_enc_bytes_per_dim)
max_enc_bytes_per_dim = enc_bytes_per_dim;
} /* end for */
- HDassert(max_enc_bytes_per_dim > 0 && max_enc_bytes_per_dim <= 8);
+ assert(max_enc_bytes_per_dim > 0 && max_enc_bytes_per_dim <= 8);
dset->shared->layout.u.chunk.enc_bytes_per_dim = max_enc_bytes_per_dim;
/* Compute and store the total size of a chunk */
@@ -837,8 +837,8 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/* Check for invalid chunk dimension rank */
if (0 == dset->shared->layout.u.chunk.ndims)
@@ -849,7 +849,7 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
/* Set chunk sizes */
if (H5D__chunk_set_sizes(dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes")
- HDassert((unsigned)(dset->shared->layout.u.chunk.ndims) <= NELMTS(dset->shared->layout.u.chunk.dim));
+ assert((unsigned)(dset->shared->layout.u.chunk.ndims) <= NELMTS(dset->shared->layout.u.chunk.dim));
/* Chunked storage is not compatible with external storage (currently) */
if (dset->shared->dcpl_cache.efl.nused > 0)
@@ -905,8 +905,8 @@ H5D__chunk_init(H5F_t *f, const H5D_t *const dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
if (NULL == (dapl = (H5P_genplist_t *)H5I_object(dapl_id)))
@@ -1005,7 +1005,7 @@ H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Query index layer */
@@ -1032,7 +1032,7 @@ H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(shared_dset);
+ assert(shared_dset);
FUNC_LEAVE_NOAPI(shared_dset->cache.chunk.nused > 0)
} /* end H5D__chunk_is_data_cached() */
@@ -1169,12 +1169,12 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
- HDassert(io_info);
- HDassert(dinfo);
+ assert(io_info);
+ assert(dinfo);
/* Set convenience pointers */
fm = dinfo->layout_io_info.chunk_map;
- HDassert(fm);
+ assert(fm);
dataset = dinfo->dset;
mem_type = dinfo->type_info.mem_type;
@@ -1204,14 +1204,14 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to set all selection")
} /* end if */
fm->single_space = dataset->shared->cache.chunk.single_space;
- HDassert(fm->single_space);
+ assert(fm->single_space);
/* Allocate the single chunk information */
if (NULL == dataset->shared->cache.chunk.single_piece_info)
if (NULL == (dataset->shared->cache.chunk.single_piece_info = H5FL_MALLOC(H5D_piece_info_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info")
fm->single_piece_info = dataset->shared->cache.chunk.single_piece_info;
- HDassert(fm->single_piece_info);
+ assert(fm->single_piece_info);
/* Reset chunk template information */
fm->mchunk_tmpl = NULL;
@@ -1229,7 +1229,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
if (NULL == (dataset->shared->cache.chunk.sel_chunks = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create skip list for chunk selections")
fm->dset_sel_pieces = dataset->shared->cache.chunk.sel_chunks;
- HDassert(fm->dset_sel_pieces);
+ assert(fm->dset_sel_pieces);
/* We are not using single element mode */
fm->use_single = FALSE;
@@ -1255,7 +1255,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
} /* end if */
else {
/* Sanity check */
- HDassert(fm->fsel_type == H5S_SEL_HYPERSLABS);
+ assert(fm->fsel_type == H5S_SEL_HYPERSLABS);
if (H5D__create_piece_file_map_hyper(dinfo, io_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections")
@@ -1379,7 +1379,7 @@ H5D__chunk_mem_alloc(size_t size, void *pline)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(size);
+ assert(size);
if (_pline && _pline->nused)
ret_value = H5MM_malloc(size);
@@ -1454,8 +1454,8 @@ H5D__chunk_mem_realloc(void *chk, size_t size, const H5O_pline_t *pline)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(size);
- HDassert(pline);
+ assert(size);
+ assert(pline);
if (pline->nused > 0)
ret_value = H5MM_realloc(chk, size);
@@ -1492,7 +1492,7 @@ H5D__free_piece_info(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE_NOERR
- HDassert(piece_info);
+ assert(piece_info);
/* Close the piece's file dataspace, if it's not shared */
if (!piece_info->fspace_shared)
@@ -1539,8 +1539,8 @@ H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
fm = di->layout_io_info.chunk_map;
/* Sanity checks */
- HDassert(fm);
- HDassert(fm->f_ndims > 0);
+ assert(fm);
+ assert(fm->f_ndims > 0);
/* Get coordinate for selection */
if (H5S_SELECT_BOUNDS(di->file_space, sel_start, sel_end) < 0)
@@ -1555,7 +1555,7 @@ H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
/* Validate this chunk dimension */
if (di->layout->u.chunk.dim[u] == 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", u)
- HDassert(sel_start[u] == sel_end[u]);
+ assert(sel_start[u] == sel_end[u]);
piece_info->scaled[u] = sel_start[u] / di->layout->u.chunk.dim[u];
coords[u] = piece_info->scaled[u] * di->layout->u.chunk.dim[u];
} /* end for */
@@ -1637,8 +1637,8 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
fm = di->layout_io_info.chunk_map;
/* Sanity checks */
- HDassert(fm);
- HDassert(fm->f_ndims > 0);
+ assert(fm);
+ assert(fm->f_ndims > 0);
/* Get number of elements selected in file */
sel_points = di->nelmts;
@@ -1649,7 +1649,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
/* Set initial chunk location, partial dimensions, etc */
num_partial_dims = 0;
- HDmemset(zeros, 0, sizeof(zeros));
+ memset(zeros, 0, sizeof(zeros));
for (u = 0; u < fm->f_ndims; u++) {
/* Validate this chunk dimension */
if (di->layout->u.chunk.dim[u] == 0)
@@ -1764,7 +1764,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
/* Check for previous partial chunk in this dimension */
if (is_partial_dim[curr_dim] && end[curr_dim] < file_dims[curr_dim]) {
/* Sanity check */
- HDassert(num_partial_dims > 0);
+ assert(num_partial_dims > 0);
/* Reset partial chunk information for this dimension */
curr_partial_clip[curr_dim] = fm->chunk_dim[curr_dim];
@@ -1795,7 +1795,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
num_partial_dims++;
/* Sanity check */
- HDassert(num_partial_dims <= fm->f_ndims);
+ assert(num_partial_dims <= fm->f_ndims);
} /* end if */
} /* end if */
} /* end if */
@@ -1845,8 +1845,8 @@ H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *dinfo, H5D_io_info_t *io_in
fm = dinfo->layout_io_info.chunk_map;
/* Sanity checks */
- HDassert(fm);
- HDassert(fm->f_ndims > 0);
+ assert(fm);
+ assert(fm->f_ndims > 0);
/* Get number of elements selected in file */
sel_points = dinfo->nelmts;
@@ -2022,7 +2022,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dinfo->layout_io_info.chunk_map->f_ndims > 0);
+ assert(dinfo->layout_io_info.chunk_map->f_ndims > 0);
/* Set convenience pointer */
fm = dinfo->layout_io_info.chunk_map;
@@ -2034,7 +2034,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
/* Get pointer to piece's information */
piece_info = (H5D_piece_info_t *)H5SL_item(curr_node);
- HDassert(piece_info);
+ assert(piece_info);
/* Just point at the memory dataspace & selection */
piece_info->mspace = dinfo->mem_space;
@@ -2052,7 +2052,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info")
/* Calculate the adjustment for memory selection from file selection */
- HDassert(fm->m_ndims == fm->f_ndims);
+ assert(fm->m_ndims == fm->f_ndims);
for (u = 0; u < fm->f_ndims; u++) {
H5_CHECK_OVERFLOW(file_sel_start[u], hsize_t, hssize_t);
H5_CHECK_OVERFLOW(mem_sel_start[u], hsize_t, hssize_t);
@@ -2060,7 +2060,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
} /* end for */
/* Iterate over each chunk in the chunk list */
- HDassert(fm->dset_sel_pieces);
+ assert(fm->dset_sel_pieces);
curr_node = H5SL_first(fm->dset_sel_pieces);
while (curr_node) {
hsize_t coords[H5S_MAX_RANK]; /* Current coordinates of chunk */
@@ -2069,7 +2069,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
/* Get pointer to piece's information */
piece_info = (H5D_piece_info_t *)H5SL_item(curr_node);
- HDassert(piece_info);
+ assert(piece_info);
/* Compute the chunk coordinates from the scaled coordinates */
for (u = 0; u < fm->f_ndims; u++)
@@ -2098,7 +2098,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
} /* end if */
else {
/* Sanity check */
- HDassert(H5S_SEL_HYPERSLABS == chunk_sel_type);
+ assert(H5S_SEL_HYPERSLABS == chunk_sel_type);
/* Copy the file chunk's selection */
if (H5S_SELECT_COPY(piece_info->mspace, piece_info->fspace, FALSE) < 0)
@@ -2149,11 +2149,11 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dinfo->layout_io_info.chunk_map->f_ndims > 0);
+ assert(dinfo->layout_io_info.chunk_map->f_ndims > 0);
/* Set convenience pointer */
fm = dinfo->layout_io_info.chunk_map;
- HDassert(fm);
+ assert(fm);
/* Check for all I/O going to a single chunk */
if (H5SL_count(fm->dset_sel_pieces) == 1) {
@@ -2162,7 +2162,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
/* Get pointer to chunk's information */
piece_info = (H5D_piece_info_t *)H5SL_item(curr_node);
- HDassert(piece_info);
+ assert(piece_info);
/* Just point at the memory dataspace & selection */
piece_info->mspace = dinfo->mem_space;
@@ -2174,7 +2174,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
hsize_t mem_sel_start[H5S_MAX_RANK]; /* Offset of low bound of file selection */
hsize_t mem_sel_end[H5S_MAX_RANK]; /* Offset of high bound of file selection */
- HDassert(fm->m_ndims == 1);
+ assert(fm->m_ndims == 1);
if (H5S_SELECT_BOUNDS(dinfo->mem_space, mem_sel_start, mem_sel_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info")
@@ -2187,7 +2187,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
/* Get pointer to chunk's information */
piece_info = (H5D_piece_info_t *)H5SL_item(curr_node);
- HDassert(piece_info);
+ assert(piece_info);
/* Copy the memory dataspace */
if ((piece_info->mspace = H5S_copy(dinfo->mem_space, TRUE, FALSE)) == NULL)
@@ -2457,8 +2457,8 @@ H5D__chunk_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
/* Add piece to MDIO operation if it has a file address */
if (H5F_addr_defined(piece_info->faddr)) {
- HDassert(io_info->sel_pieces);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->sel_pieces);
+ assert(io_info->pieces_added < io_info->piece_count);
/* Add to sel_pieces and update pieces_added */
io_info->sel_pieces[io_info->pieces_added++] = piece_info;
@@ -2496,9 +2496,9 @@ H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dse
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset_info);
+ assert(dset_info);
dataset = dset_info->dset;
- HDassert(dataset);
+ assert(dataset);
/* Must bring the whole chunk in if there are any filters on the chunk.
* Make sure to check if filters are on the dataset but disabled for the
@@ -2586,11 +2586,11 @@ H5D__chunk_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *d
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
+ assert(io_info);
+ assert(dset_info);
dataset = dset_info->dset;
- HDassert(dataset);
+ assert(dataset);
/* Don't use selection I/O if there are filters on the dataset (for now) */
if (dataset->shared->dcpl_cache.pline.nused > 0) {
@@ -2669,9 +2669,9 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->buf.vp);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->buf.vp);
/* Set up "nonexistent" I/O info object */
H5MM_memcpy(&nonexistent_io_info, io_info, sizeof(nonexistent_io_info));
@@ -2711,10 +2711,10 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Allocate arrays of dataspaces and offsets for use with selection I/O,
* or point to local buffers */
- HDassert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
- sizeof(chunk_file_spaces_local) / sizeof(chunk_file_spaces_local[0]));
- HDassert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
- sizeof(chunk_addrs_local) / sizeof(chunk_addrs_local[0]));
+ assert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
+ sizeof(chunk_file_spaces_local) / sizeof(chunk_file_spaces_local[0]));
+ assert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
+ sizeof(chunk_addrs_local) / sizeof(chunk_addrs_local[0]));
if (num_chunks > (sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]))) {
if (NULL == (chunk_mem_spaces = H5MM_malloc(num_chunks * sizeof(H5S_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
@@ -2750,11 +2750,11 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* There should be no chunks cached */
- HDassert(UINT_MAX == udata.idx_hint);
+ assert(UINT_MAX == udata.idx_hint);
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Check for non-existent chunk & skip it if appropriate */
if (H5F_addr_defined(udata.chunk_block.offset)) {
@@ -2767,12 +2767,12 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
} /* end if */
else {
/* Add to mdset selection I/O arrays */
- HDassert(io_info->mem_spaces);
- HDassert(io_info->file_spaces);
- HDassert(io_info->addrs);
- HDassert(io_info->element_sizes);
- HDassert(io_info->rbufs);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->mem_spaces);
+ assert(io_info->file_spaces);
+ assert(io_info->addrs);
+ assert(io_info->element_sizes);
+ assert(io_info->rbufs);
+ assert(io_info->pieces_added < io_info->piece_count);
io_info->mem_spaces[io_info->pieces_added] = chunk_info->mspace;
io_info->file_spaces[io_info->pieces_added] = chunk_info->fspace;
@@ -2812,8 +2812,8 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Clean up memory */
if (chunk_mem_spaces != chunk_mem_spaces_local) {
- HDassert(chunk_file_spaces != chunk_file_spaces_local);
- HDassert(chunk_addrs != chunk_addrs_local);
+ assert(chunk_file_spaces != chunk_file_spaces_local);
+ assert(chunk_addrs != chunk_addrs_local);
chunk_mem_spaces = H5MM_xfree(chunk_mem_spaces);
chunk_file_spaces = H5MM_xfree(chunk_file_spaces);
chunk_addrs = H5MM_xfree(chunk_addrs);
@@ -2835,7 +2835,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up contiguous I/O info object */
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- HDmemcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
+ memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
ctg_dset_info.store = &ctg_store;
ctg_dset_info.layout_ops = *H5D_LOPS_CONTIG;
ctg_io_info.dsets_info = &ctg_dset_info;
@@ -2847,7 +2847,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up compact I/O info object */
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- HDmemcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
+ memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
cpt_dset_info.store = &cpt_store;
cpt_dset_info.layout_ops = *H5D_LOPS_COMPACT;
cpt_io_info.dsets_info = &cpt_dset_info;
@@ -2871,8 +2871,8 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Check for non-existent chunk & skip it if appropriate */
if (H5F_addr_defined(udata.chunk_block.offset) || UINT_MAX != udata.idx_hint ||
@@ -2919,7 +2919,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
} /* end else */
/* Perform the actual read operation */
- HDassert(chk_io_info->count == 1);
+ assert(chk_io_info->count == 1);
chk_io_info->dsets_info[0].file_space = chunk_info->fspace;
chk_io_info->dsets_info[0].mem_space = chunk_info->mspace;
chk_io_info->dsets_info[0].nelmts = chunk_info->piece_points;
@@ -2949,9 +2949,9 @@ done:
} /* end if */
/* Make sure we cleaned up */
- HDassert(!chunk_mem_spaces || chunk_mem_spaces == chunk_mem_spaces_local);
- HDassert(!chunk_file_spaces || chunk_file_spaces == chunk_file_spaces_local);
- HDassert(!chunk_addrs || chunk_addrs == chunk_addrs_local);
+ assert(!chunk_mem_spaces || chunk_mem_spaces == chunk_mem_spaces_local);
+ assert(!chunk_file_spaces || chunk_file_spaces == chunk_file_spaces_local);
+ assert(!chunk_addrs || chunk_addrs == chunk_addrs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_read() */
@@ -2991,13 +2991,13 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->buf.cvp);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->buf.cvp);
/* Set up contiguous I/O info object */
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- HDmemcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
+ memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
ctg_dset_info.store = &ctg_store;
ctg_dset_info.layout_ops = *H5D_LOPS_CONTIG;
ctg_io_info.dsets_info = &ctg_dset_info;
@@ -3009,7 +3009,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up compact I/O info object */
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- HDmemcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
+ memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
cpt_dset_info.store = &cpt_store;
cpt_dset_info.layout_ops = *H5D_LOPS_COMPACT;
cpt_io_info.dsets_info = &cpt_dset_info;
@@ -3032,10 +3032,10 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Allocate arrays of dataspaces and offsets for use with selection I/O,
* or point to local buffers */
- HDassert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
- sizeof(chunk_file_spaces_local) / sizeof(chunk_file_spaces_local[0]));
- HDassert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
- sizeof(chunk_addrs_local) / sizeof(chunk_addrs_local[0]));
+ assert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
+ sizeof(chunk_file_spaces_local) / sizeof(chunk_file_spaces_local[0]));
+ assert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
+ sizeof(chunk_addrs_local) / sizeof(chunk_addrs_local[0]));
if (num_chunks > (sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]))) {
if (NULL == (chunk_mem_spaces = H5MM_malloc(num_chunks * sizeof(H5S_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
@@ -3074,11 +3074,11 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* There should be no chunks cached */
- HDassert(UINT_MAX == udata.idx_hint);
+ assert(UINT_MAX == udata.idx_hint);
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Set chunk's [scaled] coordinates */
dset_info->store->chunk.scaled = chunk_info->scaled;
@@ -3165,12 +3165,12 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
} /* end if */
else {
/* Add to mdset selection I/O arrays */
- HDassert(io_info->mem_spaces);
- HDassert(io_info->file_spaces);
- HDassert(io_info->addrs);
- HDassert(io_info->element_sizes);
- HDassert(io_info->wbufs);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->mem_spaces);
+ assert(io_info->file_spaces);
+ assert(io_info->addrs);
+ assert(io_info->element_sizes);
+ assert(io_info->wbufs);
+ assert(io_info->pieces_added < io_info->piece_count);
io_info->mem_spaces[io_info->pieces_added] = chunk_info->mspace;
io_info->file_spaces[io_info->pieces_added] = chunk_info->fspace;
@@ -3201,8 +3201,8 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Clean up memory */
if (chunk_mem_spaces != chunk_mem_spaces_local) {
- HDassert(chunk_file_spaces != chunk_file_spaces_local);
- HDassert(chunk_addrs != chunk_addrs_local);
+ assert(chunk_file_spaces != chunk_file_spaces_local);
+ assert(chunk_addrs != chunk_addrs_local);
chunk_mem_spaces = H5MM_xfree(chunk_mem_spaces);
chunk_file_spaces = H5MM_xfree(chunk_file_spaces);
chunk_addrs = H5MM_xfree(chunk_addrs);
@@ -3235,8 +3235,8 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Set chunk's [scaled] coordinates */
dset_info->store->chunk.scaled = chunk_info->scaled;
@@ -3309,7 +3309,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
} /* end else */
/* Perform the actual write operation */
- HDassert(chk_io_info->count == 1);
+ assert(chk_io_info->count == 1);
chk_io_info->dsets_info[0].file_space = chunk_info->fspace;
chk_io_info->dsets_info[0].mem_space = chunk_info->mspace;
chk_io_info->dsets_info[0].nelmts = chunk_info->piece_points;
@@ -3346,9 +3346,9 @@ done:
} /* end if */
/* Make sure we cleaned up */
- HDassert(!chunk_mem_spaces || chunk_mem_spaces == chunk_mem_spaces_local);
- HDassert(!chunk_file_spaces || chunk_file_spaces == chunk_file_spaces_local);
- HDassert(!chunk_addrs || chunk_addrs == chunk_addrs_local);
+ assert(!chunk_mem_spaces || chunk_mem_spaces == chunk_mem_spaces_local);
+ assert(!chunk_file_spaces || chunk_file_spaces == chunk_file_spaces_local);
+ assert(!chunk_addrs || chunk_addrs == chunk_addrs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_write() */
@@ -3377,7 +3377,7 @@ H5D__chunk_flush(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Loop over all entries in the chunk cache */
for (ent = rdcc->head; ent; ent = next) {
@@ -3411,7 +3411,7 @@ H5D__chunk_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *di
FUNC_ENTER_PACKAGE
- HDassert(di);
+ assert(di);
/* Set convenience pointer */
fm = di->layout_io_info.chunk_map;
@@ -3419,11 +3419,11 @@ H5D__chunk_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *di
/* Single element I/O vs. multiple element I/O cleanup */
if (fm->use_single) {
/* Sanity checks */
- HDassert(fm->dset_sel_pieces == NULL);
- HDassert(fm->last_piece_info == NULL);
- HDassert(fm->single_piece_info);
- HDassert(fm->single_piece_info->fspace_shared);
- HDassert(fm->single_piece_info->mspace_shared);
+ assert(fm->dset_sel_pieces == NULL);
+ assert(fm->last_piece_info == NULL);
+ assert(fm->single_piece_info);
+ assert(fm->single_piece_info->fspace_shared);
+ assert(fm->single_piece_info->mspace_shared);
/* Reset the selection for the single element I/O */
H5S_select_all(fm->single_space, TRUE);
@@ -3480,7 +3480,7 @@ H5D__chunk_dest(H5D_t *dset)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Sanity checks */
- HDassert(dset);
+ assert(dset);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Flush all the cached chunks */
@@ -3497,7 +3497,7 @@ H5D__chunk_dest(H5D_t *dset)
/* Release cache structures */
if (rdcc->slot)
rdcc->slot = H5FL_SEQ_FREE(H5D_rdcc_ent_ptr_t, rdcc->slot);
- HDmemset(rdcc, 0, sizeof(H5D_rdcc_t));
+ memset(rdcc, 0, sizeof(H5D_rdcc_t));
/* Compose chunked index info struct */
idx_info.f = dset->oloc.file;
@@ -3533,8 +3533,8 @@ H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(storage);
- HDassert(storage->ops);
+ assert(storage);
+ assert(storage->ops);
H5D_CHUNK_STORAGE_INDEX_CHK(storage);
/* Reset index structures */
@@ -3563,7 +3563,7 @@ H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(last);
+ assert(last);
/* Indicate that the cached info is not valid */
last->valid = FALSE;
@@ -3589,10 +3589,10 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(last);
- HDassert(udata);
- HDassert(udata->common.layout);
- HDassert(udata->common.scaled);
+ assert(last);
+ assert(udata);
+ assert(udata->common.layout);
+ assert(udata->common.scaled);
/* Stored the information to cache */
H5MM_memcpy(last->scaled, udata->common.scaled, sizeof(hsize_t) * udata->common.layout->ndims);
@@ -3627,10 +3627,10 @@ H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *uda
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(last);
- HDassert(udata);
- HDassert(udata->common.layout);
- HDassert(udata->common.scaled);
+ assert(last);
+ assert(udata);
+ assert(udata->common.layout);
+ assert(udata->common.scaled);
/* Check if the cached information is what is desired */
if (last->valid) {
@@ -3680,10 +3680,9 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset);
- HDassert(H5D_CHUNKED == dset->shared->layout.type);
- HDassert(dset->shared->layout.u.chunk.ndims > 0 &&
- dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset);
+ assert(H5D_CHUNKED == dset->shared->layout.type);
+ assert(dset->shared->layout.u.chunk.ndims > 0 && dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
#ifndef NDEBUG
@@ -3691,7 +3690,7 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/)
unsigned u; /* Local index variable */
for (u = 0; u < dset->shared->layout.u.chunk.ndims; u++)
- HDassert(dset->shared->layout.u.chunk.dim[u] > 0);
+ assert(dset->shared->layout.u.chunk.dim[u] > 0);
}
#endif
@@ -3732,8 +3731,8 @@ H5D__chunk_hash_val(const H5D_shared_t *shared, const hsize_t *scaled)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(shared);
- HDassert(scaled);
+ assert(shared);
+ assert(scaled);
/* If the fastest changing dimension doesn't have enough entropy, use
* other dimensions too
@@ -3780,11 +3779,11 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udat
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
- HDassert(dset->shared->layout.u.chunk.ndims > 0);
+ assert(dset);
+ assert(dset->shared->layout.u.chunk.ndims > 0);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
- HDassert(scaled);
- HDassert(udata);
+ assert(scaled);
+ assert(udata);
/* Initialize the query information about the chunk we are looking for */
udata->common.layout = &(dset->shared->layout.u.chunk);
@@ -3928,11 +3927,11 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
FUNC_ENTER_PACKAGE
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
- HDassert(ent);
- HDassert(!ent->locked);
+ assert(ent);
+ assert(!ent->locked);
buf = ent->chunk;
if (ent->dirty) {
@@ -4017,7 +4016,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
ent->edge_chunk_state &= ~H5D_RDCC_NEWLY_DISABLED_FILTERS;
} /* end else */
- HDassert(!(ent->edge_chunk_state & H5D_RDCC_NEWLY_DISABLED_FILTERS));
+ assert(!(ent->edge_chunk_state & H5D_RDCC_NEWLY_DISABLED_FILTERS));
/* Check if the chunk needs to be allocated (it also could exist already
* and the chunk alloc operation could resize it)
@@ -4042,7 +4041,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
} /* end if */
/* Write the data to the file */
- HDassert(H5F_addr_defined(udata.chunk_block.offset));
+ assert(H5F_addr_defined(udata.chunk_block.offset));
H5_CHECK_OVERFLOW(udata.chunk_block.length, hsize_t, size_t);
if (H5F_shared_block_write(H5F_SHARED(dset->oloc.file), H5FD_MEM_DRAW, udata.chunk_block.offset,
(size_t)udata.chunk_block.length, buf) < 0)
@@ -4118,10 +4117,10 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
- HDassert(ent);
- HDassert(!ent->locked);
- HDassert(ent->idx < rdcc->nslots);
+ assert(dset);
+ assert(ent);
+ assert(!ent->locked);
+ assert(ent->idx < rdcc->nslots);
if (flush) {
/* Flush */
@@ -4150,7 +4149,7 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
/* Unlink from temporary list */
if (ent->tmp_prev) {
- HDassert(rdcc->tmp_head->tmp_next);
+ assert(rdcc->tmp_head->tmp_next);
ent->tmp_prev->tmp_next = ent->tmp_next;
if (ent->tmp_next) {
ent->tmp_next->tmp_prev = ent->tmp_prev;
@@ -4164,7 +4163,7 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
rdcc->slot[ent->idx] = NULL;
/* Remove from cache */
- HDassert(rdcc->slot[ent->idx] != ent);
+ assert(rdcc->slot[ent->idx] != ent);
ent->idx = UINT_MAX;
rdcc->nbytes_used -= dset->shared->layout.u.chunk.size;
--rdcc->nused;
@@ -4331,13 +4330,13 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->store);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->store);
dset = dset_info->dset;
- HDassert(dset);
- HDassert(udata);
- HDassert(!(udata->new_unfilt_chunk && prev_unfilt_chunk));
+ assert(dset);
+ assert(udata);
+ assert(!(udata->new_unfilt_chunk && prev_unfilt_chunk));
/* Set convenience pointers */
pline = &(dset->shared->dcpl_cache.pline);
@@ -4346,17 +4345,17 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
fill = &(dset->shared->dcpl_cache.fill);
rdcc = &(dset->shared->cache.chunk);
- HDassert(!rdcc->tmp_head);
+ assert(!rdcc->tmp_head);
/* Get the chunk's size */
- HDassert(layout->u.chunk.size > 0);
+ assert(layout->u.chunk.size > 0);
H5_CHECKED_ASSIGN(chunk_size, size_t, layout->u.chunk.size, uint32_t);
/* Check if the chunk is in the cache */
if (UINT_MAX != udata->idx_hint) {
/* Sanity check */
- HDassert(udata->idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata->idx_hint]);
+ assert(udata->idx_hint < rdcc->nslots);
+ assert(rdcc->slot[udata->idx_hint]);
/* Get the entry */
ent = rdcc->slot[udata->idx_hint];
@@ -4367,7 +4366,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* Make sure this is the right chunk */
for (u = 0; u < layout->u.chunk.ndims - 1; u++)
- HDassert(dset_info->store->chunk.scaled[u] == ent->scaled[u]);
+ assert(dset_info->store->chunk.scaled[u] == ent->scaled[u]);
}
#endif /* NDEBUG */
@@ -4384,9 +4383,9 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* If this flag is set then partial chunk filters must be
* disabled, and the chunk must not have previously been a
* partial chunk (with disabled filters) */
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
- HDassert(!(ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS));
- HDassert(old_pline->nused);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(!(ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS));
+ assert(old_pline->nused);
/* Disable filters. Set pline to NULL instead of just the
* default pipeline to make a quick failure more likely if the
@@ -4412,9 +4411,9 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* If this flag is set then partial chunk filters must be
* disabled, and the chunk must have previously been a partial
* chunk (with disabled filters) */
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
- HDassert((ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS));
- HDassert(pline->nused);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert((ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS));
+ assert(pline->nused);
/* Mark the old pipeline as having been disabled */
old_pline = NULL;
@@ -4466,14 +4465,14 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* Check if we should disable filters on this chunk */
if (pline->nused) {
if (udata->new_unfilt_chunk) {
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
/* Disable the filters for writing */
disable_filters = TRUE;
pline = NULL;
} /* end if */
else if (prev_unfilt_chunk) {
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
/* Mark the filters as having been previously disabled (for the
* chunk as currently on disk) - disable the filters for reading
@@ -4507,7 +4506,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* In the case that some dataset functions look through this data,
* clear it to all 0s. */
- HDmemset(chunk, 0, chunk_size);
+ memset(chunk, 0, chunk_size);
} /* end if */
else {
/*
@@ -4565,7 +4564,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
H5D_fill_value_t fill_status;
/* Sanity check */
- HDassert(fill->alloc_time != H5D_ALLOC_TIME_EARLY);
+ assert(fill->alloc_time != H5D_ALLOC_TIME_EARLY);
/* Chunk size on disk isn't [likely] the same size as the final chunk
* size in memory, so allocate memory big enough. */
@@ -4599,7 +4598,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, NULL, "can't refill fill value buffer")
} /* end if */
else
- HDmemset(chunk, 0, chunk_size);
+ memset(chunk, 0, chunk_size);
/* Increment # of creations */
rdcc->stats.ninits++;
@@ -4640,7 +4639,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
ent->chunk = (uint8_t *)chunk;
/* Add it to the cache */
- HDassert(NULL == rdcc->slot[udata->idx_hint]);
+ assert(NULL == rdcc->slot[udata->idx_hint]);
rdcc->slot[udata->idx_hint] = ent;
ent->idx = udata->idx_hint;
rdcc->nbytes_used += chunk_size;
@@ -4668,7 +4667,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* Lock the chunk into the cache */
if (ent) {
- HDassert(!ent->locked);
+ assert(!ent->locked);
ent->locked = TRUE;
chunk = ent->chunk;
} /* end if */
@@ -4730,9 +4729,9 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(udata);
+ assert(io_info);
+ assert(dset_info);
+ assert(udata);
/* Set convenience pointers */
layout = &(dset_info->dset->shared->layout);
@@ -4748,7 +4747,7 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
/* Check if we should disable filters on this chunk */
if (udata->new_unfilt_chunk) {
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
is_unfiltered_edge_chunk = TRUE;
} /* end if */
@@ -4762,14 +4761,14 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
if (dirty) {
H5D_rdcc_ent_t fake_ent; /* "fake" chunk cache entry */
- HDmemset(&fake_ent, 0, sizeof(fake_ent));
+ memset(&fake_ent, 0, sizeof(fake_ent));
fake_ent.dirty = TRUE;
if (is_unfiltered_edge_chunk)
fake_ent.edge_chunk_state = H5D_RDCC_DISABLE_FILTERS;
if (udata->new_unfilt_chunk)
fake_ent.edge_chunk_state |= H5D_RDCC_NEWLY_DISABLED_FILTERS;
H5MM_memcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
- HDassert(layout->u.chunk.size > 0);
+ assert(layout->u.chunk.size > 0);
fake_ent.chunk_idx = udata->chunk_idx;
fake_ent.chunk_block.offset = udata->chunk_block.offset;
fake_ent.chunk_block.length = udata->chunk_block.length;
@@ -4788,15 +4787,15 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
H5D_rdcc_ent_t *ent; /* Chunk's entry in the cache */
/* Sanity check */
- HDassert(udata->idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata->idx_hint]);
- HDassert(rdcc->slot[udata->idx_hint]->chunk == chunk);
+ assert(udata->idx_hint < rdcc->nslots);
+ assert(rdcc->slot[udata->idx_hint]);
+ assert(rdcc->slot[udata->idx_hint]->chunk == chunk);
/*
* It's in the cache so unlock it.
*/
ent = rdcc->slot[udata->idx_hint];
- HDassert(ent->locked);
+ assert(ent->locked);
if (dirty) {
ent->dirty = TRUE;
ent->wr_count -= MIN(ent->wr_count, naccessed);
@@ -4861,8 +4860,8 @@ H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes)
FUNC_ENTER_PACKAGE
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Search for cached chunks that haven't been written out */
@@ -4949,8 +4948,8 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Retrieve the dataset dimensions */
@@ -5113,7 +5112,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
continue;
else {
/* Reset the chunk offset indices */
- HDmemset(scaled, 0, (space_ndims * sizeof(scaled[0])));
+ memset(scaled, 0, (space_ndims * sizeof(scaled[0])));
scaled[op_dim] = min_unalloc[op_dim];
if (has_unfilt_edge_chunks) {
@@ -5125,8 +5124,8 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
/* Initialize chunk_size and fill_buf */
if (should_fill && !fb_info.has_vlen_fill_type) {
- HDassert(fb_info_init);
- HDassert(unfilt_fill_buf);
+ assert(fb_info_init);
+ assert(unfilt_fill_buf);
if (nunfilt_edge_chunk_dims) {
fill_buf = &unfilt_fill_buf;
chunk_size = layout->u.chunk.size;
@@ -5150,7 +5149,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
#ifndef NDEBUG
/* None of the chunks should be allocated */
if (H5D_CHUNK_IDX_NONE != sc->idx_type)
- HDassert(!H5F_addr_defined(udata.chunk_block.offset));
+ assert(!H5F_addr_defined(udata.chunk_block.offset));
/* Make sure the chunk is really in the dataset and outside the
* original dimensions */
@@ -5159,21 +5158,21 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
hbool_t outside_orig = FALSE;
for (v = 0; v < space_ndims; v++) {
- HDassert((scaled[v] * chunk_dim[v]) < space_dim[v]);
+ assert((scaled[v] * chunk_dim[v]) < space_dim[v]);
if ((scaled[v] * chunk_dim[v]) >= old_dim[v])
outside_orig = TRUE;
} /* end for */
- HDassert(outside_orig);
+ assert(outside_orig);
} /* end block */
#endif /* NDEBUG */
/* Check for VL datatype & non-default fill value */
if (fb_info_init && fb_info.has_vlen_fill_type) {
/* Sanity check */
- HDassert(should_fill);
- HDassert(!unfilt_fill_buf);
+ assert(should_fill);
+ assert(!unfilt_fill_buf);
#ifdef H5_HAVE_PARALLEL
- HDassert(!using_mpi); /* Can't write VL datatypes in parallel currently */
+ assert(!using_mpi); /* Can't write VL datatypes in parallel currently */
#endif
/* Check to make sure the buffer is large enough. It is
@@ -5221,7 +5220,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
else
chunk_size = layout->u.chunk.size;
- HDassert(*fill_buf == fb_info.fill_buf);
+ assert(*fill_buf == fb_info.fill_buf);
} /* end if */
/* Initialize the chunk information */
@@ -5235,13 +5234,13 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
/* Allocate the chunk (with all processes) */
if (H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, scaled) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
- HDassert(H5F_addr_defined(udata.chunk_block.offset));
+ assert(H5F_addr_defined(udata.chunk_block.offset));
/* Check if fill values should be written to chunks */
if (should_fill) {
/* Sanity check */
- HDassert(fb_info_init);
- HDassert(udata.chunk_block.length == chunk_size);
+ assert(fb_info_init);
+ assert(udata.chunk_block.length == chunk_size);
#ifdef H5_HAVE_PARALLEL
/* Check if this file is accessed with an MPI-capable file driver */
@@ -5302,7 +5301,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
scaled[i] < edge_chunk_scaled[i]) {
nunfilt_edge_chunk_dims--;
if (should_fill && nunfilt_edge_chunk_dims == 0 && !fb_info.has_vlen_fill_type) {
- HDassert(
+ assert(
!H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, scaled, space_dim));
fill_buf = &fb_info.fill_buf;
chunk_size = orig_chunk_size;
@@ -5312,10 +5311,10 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
else {
/* Check if we just entered the edge in this dimension */
if (unfilt_edge_chunk_dim[i] && scaled[i] == edge_chunk_scaled[i]) {
- HDassert(edge_chunk_scaled[i] == max_unalloc[i]);
+ assert(edge_chunk_scaled[i] == max_unalloc[i]);
nunfilt_edge_chunk_dims++;
if (should_fill && nunfilt_edge_chunk_dims == 1 && !fb_info.has_vlen_fill_type) {
- HDassert(
+ assert(
H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, scaled, space_dim));
fill_buf = &unfilt_fill_buf;
chunk_size = layout->u.chunk.size;
@@ -5405,11 +5404,11 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
H5D_CHUNK_STORAGE_INDEX_CHK(&layout->storage.u.chunk);
- HDassert(dset->shared->dcpl_cache.pline.nused > 0);
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(dset->shared->dcpl_cache.pline.nused > 0);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
/* Retrieve the dataset dimensions */
space_dim = dset->shared->curr_dims;
@@ -5477,10 +5476,10 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
if (!new_full_dim[op_dim])
continue;
else {
- HDassert(max_edge_chunk_sc[op_dim] == old_edge_chunk_sc[op_dim]);
+ assert(max_edge_chunk_sc[op_dim] == old_edge_chunk_sc[op_dim]);
/* Reset the chunk offset indices */
- HDmemset(chunk_sc, 0, (space_ndims * sizeof(chunk_sc[0])));
+ memset(chunk_sc, 0, (space_ndims * sizeof(chunk_sc[0])));
chunk_sc[op_dim] = old_edge_chunk_sc[op_dim];
carry = FALSE;
@@ -5490,8 +5489,8 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
int i; /* Local index variable */
/* Make sure the chunk is really a former edge chunk */
- HDassert(H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, old_dim) &&
- !H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, space_dim));
+ assert(H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, old_dim) &&
+ !H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, space_dim));
/* Lookup the chunk */
if (H5D__chunk_lookup(dset, chunk_sc, &chk_udata) < 0)
@@ -5586,7 +5585,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
* that the "don't filter partial edge chunks" flag is set.
*/
if (partial_chunk_fill_buf)
- HDassert(dset->shared->layout.u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(dset->shared->layout.u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
/* Get the MPI communicator */
if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file)))
@@ -5683,7 +5682,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
H5_CHECKED_ASSIGN(block_lens[i], int, chunk_fill_info->chunk_info[idx].chunk_size, size_t);
if (chunk_fill_info->chunk_info[idx].unfiltered_partial_chunk) {
- HDassert(partial_chunk_fill_buf);
+ assert(partial_chunk_fill_buf);
block_disps[i] = partial_fill_buf_disp;
}
} /* end for */
@@ -5702,7 +5701,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
size_t);
if (chunk_fill_info->chunk_info[(blocks * mpi_size) + mpi_rank].unfiltered_partial_chunk) {
- HDassert(partial_chunk_fill_buf);
+ assert(partial_chunk_fill_buf);
block_disps[blocks] = partial_fill_buf_disp;
}
@@ -5743,9 +5742,9 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
* Currently, different block lengths implies that there are partial
* edge chunks and the "don't filter partial edge chunks" flag is set.
*/
- HDassert(partial_chunk_fill_buf);
- HDassert(block_lens);
- HDassert(block_disps);
+ assert(partial_chunk_fill_buf);
+ assert(block_lens);
+ assert(block_disps);
mpi_code = MPI_Type_create_hindexed(blocks, block_lens, chunk_disp_array, MPI_BYTE, &file_type);
if (mpi_code != MPI_SUCCESS)
@@ -5856,7 +5855,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
FUNC_ENTER_PACKAGE
/* Get the chunk's size */
- HDassert(layout->u.chunk.size > 0);
+ assert(layout->u.chunk.size > 0);
H5_CHECKED_ASSIGN(chunk_size, size_t, layout->u.chunk.size, uint32_t);
/* Get the info for the chunk in the file */
@@ -5881,7 +5880,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
/* Compute the # of elements to leave with existing value, in each dimension */
for (u = 0; u < rank; u++) {
count[u] = MIN(layout->u.chunk.dim[u], (udata->space_dim[u] - (scaled[u] * layout->u.chunk.dim[u])));
- HDassert(count[u] > 0);
+ assert(count[u] > 0);
} /* end for */
/* Select all elements in chunk, to begin with */
@@ -6082,8 +6081,8 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Go get the rank & dimensions (including the element size) */
@@ -6119,7 +6118,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Reset hyperslab start array */
/* (hyperslabs will always start from origin) */
- HDmemset(hyper_start, 0, sizeof(hyper_start));
+ memset(hyper_start, 0, sizeof(hyper_start));
/* Set up chunked I/O info object, for operations on chunks (in callback)
* Note that we only need to set scaled once, as the array's address
@@ -6141,7 +6140,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Initialize the user data for the iteration */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = &layout->u.chunk;
udata.common.storage = sc;
udata.common.scaled = scaled;
@@ -6166,8 +6165,8 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/*
* Determine the chunks which need to be filled or removed
*/
- HDmemset(min_mod_chunk_sc, 0, sizeof(min_mod_chunk_sc));
- HDmemset(max_mod_chunk_sc, 0, sizeof(max_mod_chunk_sc));
+ memset(min_mod_chunk_sc, 0, sizeof(min_mod_chunk_sc));
+ memset(max_mod_chunk_sc, 0, sizeof(max_mod_chunk_sc));
for (op_dim = 0; op_dim < (unsigned)space_ndims; op_dim++) {
/* Validate this chunk dimension */
if (chunk_dim[op_dim] == 0)
@@ -6230,10 +6229,10 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
if (!shrunk_dim[op_dim])
continue;
else {
- HDassert(max_mod_chunk_sc[op_dim] >= min_mod_chunk_sc[op_dim]);
+ assert(max_mod_chunk_sc[op_dim] >= min_mod_chunk_sc[op_dim]);
/* Reset the chunk offset indices */
- HDmemset(scaled, 0, (space_ndims * sizeof(scaled[0])));
+ memset(scaled, 0, (space_ndims * sizeof(scaled[0])));
scaled[op_dim] = min_mod_chunk_sc[op_dim];
/* Initialize "dims_outside_fill" array */
@@ -6254,12 +6253,11 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
udata.common.scaled = scaled;
if (0 == ndims_outside_fill) {
- HDassert(fill_dim[op_dim]);
- HDassert(scaled[op_dim] == min_mod_chunk_sc[op_dim]);
+ assert(fill_dim[op_dim]);
+ assert(scaled[op_dim] == min_mod_chunk_sc[op_dim]);
/* Make sure this is an edge chunk */
- HDassert(
- H5D__chunk_is_partial_edge_chunk(space_ndims, layout->u.chunk.dim, scaled, space_dim));
+ assert(H5D__chunk_is_partial_edge_chunk(space_ndims, layout->u.chunk.dim, scaled, space_dim));
/* Determine if the chunk just became an unfiltered chunk */
if (new_unfilt_dim[op_dim]) {
@@ -6273,10 +6271,10 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Make sure that, if we think this is a new unfiltered chunk,
* it was previously not an edge chunk */
- HDassert(!new_unfilt_dim[op_dim] ||
- (!new_unfilt_chunk != !H5D__chunk_is_partial_edge_chunk(
- space_ndims, layout->u.chunk.dim, scaled, old_dim)));
- HDassert(!new_unfilt_chunk || new_unfilt_dim[op_dim]);
+ assert(!new_unfilt_dim[op_dim] ||
+ (!new_unfilt_chunk != !H5D__chunk_is_partial_edge_chunk(
+ space_ndims, layout->u.chunk.dim, scaled, old_dim)));
+ assert(!new_unfilt_chunk || new_unfilt_dim[op_dim]);
/* Fill the unused parts of the chunk */
if (H5D__chunk_prune_fill(&udata, new_unfilt_chunk) < 0)
@@ -6295,7 +6293,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
outside_dim = TRUE;
break;
} /* end if */
- HDassert(outside_dim);
+ assert(outside_dim);
} /* end block */
#endif /* NDEBUG */
@@ -6436,14 +6434,14 @@ H5D__chunk_addrmap(const H5D_t *dset, haddr_t chunk_addr[])
FUNC_ENTER_PACKAGE
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
sc = &(dset->shared->layout.storage.u.chunk);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
- HDassert(chunk_addr);
+ assert(chunk_addr);
/* Set up user data for B-tree callback */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
udata.common.layout = &dset->shared->layout.u.chunk;
udata.common.storage = sc;
udata.chunk_addr = chunk_addr;
@@ -6490,9 +6488,9 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(oh);
- HDassert(storage);
+ assert(f);
+ assert(oh);
+ assert(storage);
H5D_CHUNK_STORAGE_INDEX_CHK(&storage->u.chunk);
/* Check for I/O pipeline message */
@@ -6504,7 +6502,7 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
pline_read = TRUE;
} /* end else if */
else
- HDmemset(&pline, 0, sizeof(pline));
+ memset(&pline, 0, sizeof(pline));
/* Retrieve dataset layout message */
if ((exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0)
@@ -6565,15 +6563,14 @@ H5D__chunk_update_cache(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CHUNKED == dset->shared->layout.type);
- HDassert(dset->shared->layout.u.chunk.ndims > 0 &&
- dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset && H5D_CHUNKED == dset->shared->layout.type);
+ assert(dset->shared->layout.u.chunk.ndims > 0 && dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
/* Check the rank */
- HDassert((dset->shared->layout.u.chunk.ndims - 1) > 1);
+ assert((dset->shared->layout.u.chunk.ndims - 1) > 1);
/* Add temporary entry list to rdcc */
- (void)HDmemset(&tmp_head, 0, sizeof(tmp_head));
+ (void)memset(&tmp_head, 0, sizeof(tmp_head));
rdcc->tmp_head = &tmp_head;
tmp_tail = &tmp_head;
@@ -6594,14 +6591,14 @@ H5D__chunk_update_cache(H5D_t *dset)
/* Check if there is already a chunk at this chunk's new location */
old_ent = rdcc->slot[ent->idx];
if (old_ent != NULL) {
- HDassert(old_ent->locked == FALSE);
- HDassert(old_ent->deleted == FALSE);
+ assert(old_ent->locked == FALSE);
+ assert(old_ent->deleted == FALSE);
/* Insert the old entry into the temporary list, but do not
* evict (yet). Make sure we do not make any calls to the index
* until all chunks have updated indices! */
- HDassert(!old_ent->tmp_next);
- HDassert(!old_ent->tmp_prev);
+ assert(!old_ent->tmp_next);
+ assert(!old_ent->tmp_prev);
tmp_tail->tmp_next = old_ent;
old_ent->tmp_prev = tmp_tail;
tmp_tail = old_ent;
@@ -6614,15 +6611,15 @@ H5D__chunk_update_cache(H5D_t *dset)
* not in the hash table, remove it from the temporary list.
* Otherwise clear the old hash table slot. */
if (ent->tmp_prev) {
- HDassert(tmp_head.tmp_next);
- HDassert(tmp_tail != &tmp_head);
+ assert(tmp_head.tmp_next);
+ assert(tmp_tail != &tmp_head);
ent->tmp_prev->tmp_next = ent->tmp_next;
if (ent->tmp_next) {
ent->tmp_next->tmp_prev = ent->tmp_prev;
ent->tmp_next = NULL;
} /* end if */
else {
- HDassert(tmp_tail == ent);
+ assert(tmp_tail == ent);
tmp_tail = ent->tmp_prev;
} /* end else */
ent->tmp_prev = NULL;
@@ -6731,7 +6728,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
"memory allocation failed for raw data chunk")
udata->bkg = new_buf;
if (!udata->cpy_info->expand_ref)
- HDmemset((uint8_t *)udata->bkg + buf_size, 0, (size_t)(nbytes - buf_size));
+ memset((uint8_t *)udata->bkg + buf_size, 0, (size_t)(nbytes - buf_size));
bkg = udata->bkg;
} /* end if */
@@ -6741,7 +6738,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
} /* end if */
if (udata->chunk_in_cache && udata->chunk) {
- HDassert(!H5F_addr_defined(chunk_rec->chunk_addr));
+ assert(!H5F_addr_defined(chunk_rec->chunk_addr));
H5MM_memcpy(buf, udata->chunk, nbytes);
udata->chunk = NULL;
}
@@ -6776,8 +6773,8 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
if (NULL == ent)
HGOTO_ERROR(H5E_IO, H5E_BADVALUE, H5_ITER_ERROR, "NULL chunk entry pointer")
- HDassert(H5F_addr_defined(chunk_rec->chunk_addr));
- HDassert(H5F_addr_defined(ent->chunk_block.offset));
+ assert(H5F_addr_defined(chunk_rec->chunk_addr));
+ assert(H5F_addr_defined(ent->chunk_block.offset));
H5_CHECKED_ASSIGN(nbytes, size_t, shared_fo->layout.u.chunk.size, uint32_t);
H5MM_memcpy(buf, ent->chunk, nbytes);
@@ -6820,7 +6817,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5MM_memcpy(reclaim_buf, buf, reclaim_buf_size);
/* Set background buffer to all zeros */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, udata->nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
@@ -6880,7 +6877,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
/* Write chunk data to destination file */
- HDassert(H5F_addr_defined(udata_dst.chunk_block.offset));
+ assert(H5F_addr_defined(udata_dst.chunk_block.offset));
if (H5F_block_write(udata->idx_info_dst->f, H5FD_MEM_DRAW, udata_dst.chunk_block.offset, nbytes, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to write raw data to file")
@@ -6945,19 +6942,19 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f_src);
- HDassert(storage_src);
+ assert(f_src);
+ assert(storage_src);
H5D_CHUNK_STORAGE_INDEX_CHK(storage_src);
- HDassert(layout_src);
- HDassert(f_dst);
- HDassert(storage_dst);
+ assert(layout_src);
+ assert(f_dst);
+ assert(storage_dst);
H5D_CHUNK_STORAGE_INDEX_CHK(storage_dst);
- HDassert(ds_extent_src);
- HDassert(dt_src);
+ assert(ds_extent_src);
+ assert(dt_src);
/* Initialize the temporary pipeline info */
if (NULL == pline_src) {
- HDmemset(&_pline, 0, sizeof(_pline));
+ memset(&_pline, 0, sizeof(_pline));
pline = &_pline;
} /* end if */
else
@@ -7094,7 +7091,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
/* Check for reference datatype and no expanding references & clear background buffer */
if (!cpy_info->expand_ref && ((H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) && (f_src != f_dst)))
/* Reset value to zero */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
} /* end if */
/* Allocate memory for copying the chunk */
@@ -7102,7 +7099,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk")
/* Initialize the callback structure for the source */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = layout_src;
udata.common.storage = storage_src;
udata.file_src = f_src;
@@ -7211,12 +7208,12 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(layout);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(layout);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
- HDassert(index_size);
+ assert(index_size);
/* Check for I/O pipeline message */
if ((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
@@ -7227,7 +7224,7 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_
pline_read = TRUE;
} /* end else if */
else
- HDmemset(&pline, 0, sizeof(pline));
+ memset(&pline, 0, sizeof(pline));
/* Compose chunked index info struct */
idx_info.f = loc->file;
@@ -7287,20 +7284,19 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
/* Print header if not already displayed */
if (!udata->header_displayed) {
- HDfprintf(udata->stream, " Flags Bytes Address Logical Offset\n");
- HDfprintf(udata->stream,
- " ========== ======== ========== ==============================\n");
+ fprintf(udata->stream, " Flags Bytes Address Logical Offset\n");
+ fprintf(udata->stream, " ========== ======== ========== ==============================\n");
/* Set flag that the headers has been printed */
udata->header_displayed = TRUE;
} /* end if */
/* Print information about this chunk */
- HDfprintf(udata->stream, " 0x%08x %8" PRIu32 " %10" PRIuHADDR " [", chunk_rec->filter_mask,
- chunk_rec->nbytes, chunk_rec->chunk_addr);
+ fprintf(udata->stream, " 0x%08x %8" PRIu32 " %10" PRIuHADDR " [", chunk_rec->filter_mask,
+ chunk_rec->nbytes, chunk_rec->chunk_addr);
for (u = 0; u < udata->ndims; u++)
- HDfprintf(udata->stream, "%s%" PRIuHSIZE, (u ? ", " : ""),
- (chunk_rec->scaled[u] * udata->chunk_dim[u]));
+ fprintf(udata->stream, "%s%" PRIuHSIZE, (u ? ", " : ""),
+ (chunk_rec->scaled[u] * udata->chunk_dim[u]));
HDfputs("]\n", udata->stream);
} /* end if */
@@ -7330,7 +7326,7 @@ H5D__chunk_dump_index(H5D_t *dset, FILE *stream)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Only display info if stream is defined */
@@ -7394,11 +7390,11 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
HGOTO_DONE(SUCCEED)
if (headers) {
- HDfprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
- HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n", "Layer", "Hits", "Misses", "MissRate",
- "Inits", "Flushes");
- HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n", "-----", "----", "------", "--------",
- "-----", "-------");
+ fprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
+ fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n", "Layer", "Hits", "Misses", "MissRate",
+ "Inits", "Flushes");
+ fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n", "-----", "----", "------", "--------",
+ "-----", "-------");
}
#ifdef H5AC_DEBUG
@@ -7420,9 +7416,9 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
HDsnprintf(ascii, sizeof(ascii), "%7.2f%%", miss_rate);
}
- HDfprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n", "raw data chunks", rdcc->stats.nhits,
- rdcc->stats.nmisses, ascii, rdcc->stats.ninits,
- (long)(rdcc->stats.nflushes) - (long)(rdcc->stats.ninits));
+ fprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n", "raw data chunks", rdcc->stats.nhits,
+ rdcc->stats.nmisses, ascii, rdcc->stats.ninits,
+ (long)(rdcc->stats.nflushes) - (long)(rdcc->stats.ninits));
}
done:
@@ -7509,13 +7505,13 @@ H5D__nonexistent_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info,
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(chunk_curr_seq);
- HDassert(chunk_len_arr);
- HDassert(chunk_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(chunk_curr_seq);
+ assert(chunk_len_arr);
+ assert(chunk_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Set up user data for H5VM_opvv() */
udata.rbuf = (unsigned char *)dset_info->buf.vp;
@@ -7555,10 +7551,10 @@ H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(scaled);
- HDassert(dset_ndims > 0);
- HDassert(dset_dims);
- HDassert(chunk_dims);
+ assert(scaled);
+ assert(dset_ndims > 0);
+ assert(dset_dims);
+ assert(chunk_dims);
/* check if this is a partial edge chunk */
for (u = 0; u < dset_ndims; u++)
@@ -7593,20 +7589,20 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(new_chunk);
- HDassert(need_insert);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(new_chunk);
+ assert(need_insert);
*need_insert = FALSE;
/* Check for filters on chunks */
if (idx_info->pline->nused > 0) {
/* Sanity/error checking block */
- HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
+ assert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
{
unsigned allow_chunk_size_len; /* Allowed size of encoded chunk size */
unsigned new_chunk_size_len; /* Size of encoded chunk size */
@@ -7630,8 +7626,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
if (old_chunk && H5F_addr_defined(old_chunk->offset)) {
/* Sanity check */
- HDassert(!H5F_addr_defined(new_chunk->offset) ||
- H5F_addr_eq(new_chunk->offset, old_chunk->offset));
+ assert(!H5F_addr_defined(new_chunk->offset) || H5F_addr_eq(new_chunk->offset, old_chunk->offset));
/* Check for chunk being same size */
if (new_chunk->length != old_chunk->length) {
@@ -7652,13 +7647,13 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
} /* end else */
} /* end if */
else {
- HDassert(!H5F_addr_defined(new_chunk->offset));
+ assert(!H5F_addr_defined(new_chunk->offset));
alloc_chunk = TRUE;
} /* end else */
} /* end if */
else {
- HDassert(!H5F_addr_defined(new_chunk->offset));
- HDassert(new_chunk->length == idx_info->layout->size);
+ assert(!H5F_addr_defined(new_chunk->offset));
+ assert(new_chunk->length == idx_info->layout->size);
alloc_chunk = TRUE;
} /* end else */
@@ -7672,7 +7667,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
if ((idx_info->storage->ops->get_addr)(idx_info, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query chunk address")
new_chunk->offset = udata.chunk_block.offset;
- HDassert(new_chunk->length == udata.chunk_block.length);
+ assert(new_chunk->length == udata.chunk_block.length);
break;
}
@@ -7681,7 +7676,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
case H5D_CHUNK_IDX_BT2:
case H5D_CHUNK_IDX_BTREE:
case H5D_CHUNK_IDX_SINGLE:
- HDassert(new_chunk->length > 0);
+ assert(new_chunk->length > 0);
H5_CHECK_OVERFLOW(new_chunk->length, /*From: */ uint32_t, /*To: */ hsize_t);
new_chunk->offset = H5MF_alloc(idx_info->f, H5FD_MEM_DRAW, (hsize_t)new_chunk->length);
if (!H5F_addr_defined(new_chunk->offset))
@@ -7691,12 +7686,12 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
case H5D_CHUNK_IDX_NTYPES:
default:
- HDassert(0 && "This should never be executed!");
+ assert(0 && "This should never be executed!");
break;
} /* end switch */
} /* end if */
- HDassert(H5F_addr_defined(new_chunk->offset));
+ assert(H5F_addr_defined(new_chunk->offset));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -7746,7 +7741,7 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5Z_cb_t filter_cb; /* Filter failure callback struct */
size_t read_size = nbytes; /* Bytes to read */
- HDassert(read_size == new_idx_info->layout->size);
+ assert(read_size == new_idx_info->layout->size);
/* Initialize the filter callback struct */
filter_cb.op_data = NULL;
@@ -7775,7 +7770,7 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
/* Allocate space for the filtered chunk */
if ((chunk_addr = H5MF_alloc(new_idx_info->f, H5FD_MEM_DRAW, (hsize_t)nbytes)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, H5_ITER_ERROR, "file allocation failed for filtered chunk")
- HDassert(H5F_addr_defined(chunk_addr));
+ assert(H5F_addr_defined(chunk_addr));
/* Write the filtered chunk to disk */
if (H5F_block_write(new_idx_info->f, H5FD_MEM_DRAW, chunk_addr, nbytes, buf) < 0)
@@ -7823,7 +7818,7 @@ H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset);
+ assert(dset);
/* Set up user data */
udata.new_idx_info = new_idx_info;
@@ -7889,12 +7884,12 @@ H5D__chunk_index_empty(const H5D_t *dset, hbool_t *empty)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(empty);
+ assert(dset);
+ assert(dset->shared);
+ assert(empty);
rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */
- HDassert(rdcc);
+ assert(rdcc);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -7946,7 +7941,7 @@ H5D__get_num_chunks_cb(const H5D_chunk_rec_t H5_ATTR_UNUSED *chunk_rec, void *_u
FUNC_ENTER_PACKAGE_NOERR
- HDassert(num_chunks);
+ assert(num_chunks);
(*num_chunks)++;
@@ -7980,13 +7975,13 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(space);
- HDassert(nchunks);
+ assert(dset);
+ assert(dset->shared);
+ assert(space);
+ assert(nchunks);
rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */
- HDassert(rdcc);
+ assert(rdcc);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -8039,8 +8034,8 @@ H5D__get_chunk_info_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(chunk_rec);
- HDassert(chunk_info);
+ assert(chunk_rec);
+ assert(chunk_info);
/* If this is the queried chunk, retrieve its info and stop iterating */
if (chunk_info->curr_idx == chunk_info->chunk_idx) {
@@ -8094,13 +8089,13 @@ H5D__get_chunk_info(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(space);
+ assert(dset);
+ assert(dset->shared);
+ assert(space);
/* Get the raw data chunk cache */
rdcc = &(dset->shared->cache.chunk);
- HDassert(rdcc);
+ assert(rdcc);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -8180,8 +8175,8 @@ H5D__get_chunk_info_by_coord_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(chunk_rec);
- HDassert(chunk_info);
+ assert(chunk_rec);
+ assert(chunk_info);
/* Going through the scaled, stop when a mismatch is found */
for (ii = 0; ii < chunk_info->ndims && !different; ii++)
@@ -8230,16 +8225,16 @@ H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *offset, unsigned
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(offset);
+ assert(dset);
+ assert(dset->shared);
+ assert(offset);
/* Get dataset layout and raw data chunk cache */
layout = &(dset->shared->layout);
rdcc = &(dset->shared->cache.chunk);
- HDassert(layout);
- HDassert(rdcc);
- HDassert(H5D_CHUNKED == layout->type);
+ assert(layout);
+ assert(rdcc);
+ assert(H5D_CHUNKED == layout->type);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -8356,15 +8351,15 @@ H5D__chunk_iter(H5D_t *dset, H5D_chunk_iter_op_t op, void *op_data)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
/* Get dataset layout and raw data chunk cache */
layout = &(dset->shared->layout);
rdcc = &(dset->shared->cache.chunk);
- HDassert(layout);
- HDassert(rdcc);
- HDassert(H5D_CHUNKED == layout->type);
+ assert(layout);
+ assert(rdcc);
+ assert(H5D_CHUNKED == layout->type);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -8417,15 +8412,15 @@ H5D__chunk_get_offset_copy(const H5D_t *dset, const hsize_t *offset, hsize_t *of
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dset);
- HDassert(offset);
- HDassert(offset_copy);
+ assert(dset);
+ assert(offset);
+ assert(offset_copy);
/* The library's chunking code requires the offset to terminate with a zero.
* So transfer the offset array to an internal offset array that we
* can properly terminate (handled via the memset call).
*/
- HDmemset(offset_copy, 0, H5O_LAYOUT_NDIMS * sizeof(hsize_t));
+ memset(offset_copy, 0, H5O_LAYOUT_NDIMS * sizeof(hsize_t));
for (u = 0; u < dset->shared->ndims; u++) {
/* Make sure the offset doesn't exceed the dataset's dimensions */
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 5f45da4..f9742ff 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -125,10 +125,10 @@ H5D__compact_fill(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_COMPACT == dset->shared->layout.type);
- HDassert(dset->shared->layout.storage.u.compact.buf);
- HDassert(dset->shared->type);
- HDassert(dset->shared->space);
+ assert(dset && H5D_COMPACT == dset->shared->layout.type);
+ assert(dset->shared->layout.storage.u.compact.buf);
+ assert(dset->shared->type);
+ assert(dset->shared->space);
/* Initialize the fill value buffer */
/* (use the compact dataset storage buffer as the fill value buffer) */
@@ -176,8 +176,8 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/* Check for invalid dataset dimensions */
for (u = 0; u < dset->shared->ndims; u++)
@@ -189,9 +189,9 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset)
* layout.
*/
stmp_size = H5S_GET_EXTENT_NPOINTS(dset->shared->space);
- HDassert(stmp_size >= 0);
+ assert(stmp_size >= 0);
tmp_size = H5T_get_size(dset->shared->type);
- HDassert(tmp_size > 0);
+ assert(tmp_size > 0);
tmp_size = tmp_size * (hsize_t)stmp_size;
H5_CHECKED_ASSIGN(dset->shared->layout.storage.u.compact.size, size_t, tmp_size, hssize_t);
@@ -225,7 +225,7 @@ H5D__compact_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
/* Compact storage is currently always allocated */
FUNC_LEAVE_NOAPI(TRUE)
@@ -328,8 +328,8 @@ H5D__compact_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
FUNC_ENTER_PACKAGE
- HDassert(io_info);
- HDassert(dset_info);
+ assert(io_info);
+ assert(dset_info);
/* Check if file driver wishes to do its own memory management */
if (H5F_SHARED_HAS_FEATURE(io_info->f_sh, H5FD_FEAT_MEMMANAGE)) {
@@ -389,8 +389,8 @@ H5D__compact_writevv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dse
FUNC_ENTER_PACKAGE
- HDassert(io_info);
- HDassert(dset_info);
+ assert(io_info);
+ assert(dset_info);
/* Check if file driver wishes to do its own memory management */
if (H5F_SHARED_HAS_FEATURE(io_info->f_sh, H5FD_FEAT_MEMMANAGE)) {
@@ -442,7 +442,7 @@ H5D__compact_flush(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Check if the buffered compact information is dirty */
if (dset->shared->layout.storage.u.compact.dirty) {
@@ -475,7 +475,7 @@ H5D__compact_dest(H5D_t *dset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Free the buffer for the raw data for compact datasets */
dset->shared->layout.storage.u.compact.buf = H5MM_xfree(dset->shared->layout.storage.u.compact.buf);
@@ -514,12 +514,12 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f_src);
- HDassert(storage_src);
- HDassert(f_dst);
- HDassert(storage_dst);
- HDassert(storage_dst->buf);
- HDassert(dt_src);
+ assert(f_src);
+ assert(storage_src);
+ assert(f_dst);
+ assert(storage_dst);
+ assert(storage_dst->buf);
+ assert(dt_src);
/* If the dataset is open in the file, point to "layout" in the shared struct */
if (shared_fo != NULL)
@@ -620,7 +620,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
H5MM_memcpy(reclaim_buf, buf, buf_size);
/* Set background buffer to all zeros */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
@@ -643,7 +643,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
} /* end if */
else
/* Reset value to zero */
- HDmemset(storage_dst->buf, 0, storage_src->size);
+ memset(storage_dst->buf, 0, storage_src->size);
} /* end if */
else
/* Type conversion not necessary */
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index c8c7ee7..24d8de2 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -163,8 +163,8 @@ H5D__contig_alloc(H5F_t *f, H5O_storage_contig_t *storage /*out */)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(storage);
+ assert(f);
+ assert(storage);
/* Allocate space for the contiguous data */
if (HADDR_UNDEF == (storage->addr = H5MF_alloc(f, H5FD_MEM_DRAW, storage->size)))
@@ -211,11 +211,11 @@ H5D__contig_fill(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CONTIGUOUS == dset->shared->layout.type);
- HDassert(H5F_addr_defined(dset->shared->layout.storage.u.contig.addr));
- HDassert(dset->shared->layout.storage.u.contig.size > 0);
- HDassert(dset->shared->space);
- HDassert(dset->shared->type);
+ assert(dset && H5D_CONTIGUOUS == dset->shared->layout.type);
+ assert(H5F_addr_defined(dset->shared->layout.storage.u.contig.addr));
+ assert(dset->shared->layout.storage.u.contig.size > 0);
+ assert(dset->shared->space);
+ assert(dset->shared->type);
#ifdef H5_HAVE_PARALLEL
/* Retrieve MPI parameters */
@@ -359,8 +359,8 @@ H5D__contig_delete(H5F_t *f, const H5O_storage_t *storage)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(storage);
+ assert(f);
+ assert(storage);
/* Free the file space for the chunk */
if (H5MF_xfree(f, H5FD_MEM_DRAW, storage->u.contig.addr, storage->u.contig.size) < 0)
@@ -396,8 +396,8 @@ H5D__contig_construct(H5F_t *f, H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/*
* The maximum size of the dataset cannot exceed the storage size.
@@ -467,8 +467,8 @@ H5D__contig_init(H5F_t H5_ATTR_UNUSED *f, const H5D_t *dset, hid_t H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/* Compute the size of the contiguous storage for versions of the
* layout message less than version 3 because versions 1 & 2 would
@@ -535,7 +535,7 @@ H5D__contig_is_space_alloc(const H5O_storage_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
/* Set return value */
ret_value = (hbool_t)H5F_addr_defined(storage->u.contig.addr);
@@ -561,7 +561,7 @@ H5D__contig_is_data_cached(const H5D_shared_t *shared_dset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(shared_dset);
+ assert(shared_dset);
FUNC_LEAVE_NOAPI(shared_dset->cache.contig.sieve_size > 0)
} /* end H5D__contig_is_data_cached() */
@@ -721,8 +721,8 @@ H5D__contig_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
/* Add piece if it exists */
if (dinfo->layout_io_info.contig_piece_info) {
- HDassert(io_info->sel_pieces);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->sel_pieces);
+ assert(io_info->pieces_added < io_info->piece_count);
/* Add contiguous data block to sel_pieces */
io_info->sel_pieces[io_info->pieces_added] = dinfo->layout_io_info.contig_piece_info;
@@ -757,10 +757,10 @@ H5D__contig_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->dset);
- HDassert(op_type == H5D_IO_OP_READ || op_type == H5D_IO_OP_WRITE);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->dset);
+ assert(op_type == H5D_IO_OP_READ || op_type == H5D_IO_OP_WRITE);
dataset = dset_info->dset;
@@ -782,7 +782,7 @@ H5D__contig_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *
else {
hbool_t page_buf_enabled;
- HDassert(dset_info->layout_ops.writevv == H5D__contig_writevv);
+ assert(dset_info->layout_ops.writevv == H5D__contig_writevv);
/* Check if the page buffer is enabled */
if (H5PB_enabled(io_info->f_sh, H5FD_MEM_DRAW, &page_buf_enabled) < 0)
@@ -817,11 +817,11 @@ H5D__contig_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dinfo);
- HDassert(dinfo->buf.vp);
- HDassert(dinfo->mem_space);
- HDassert(dinfo->file_space);
+ assert(io_info);
+ assert(dinfo);
+ assert(dinfo->buf.vp);
+ assert(dinfo->mem_space);
+ assert(dinfo->file_space);
if (io_info->use_select_io == H5D_SELECTION_IO_MODE_ON) {
/* Only perform I/O if not performing multi dataset I/O or type conversion,
@@ -842,12 +842,12 @@ H5D__contig_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
else {
if (dinfo->layout_io_info.contig_piece_info) {
/* Add to mdset selection I/O arrays */
- HDassert(io_info->mem_spaces);
- HDassert(io_info->file_spaces);
- HDassert(io_info->addrs);
- HDassert(io_info->element_sizes);
- HDassert(io_info->rbufs);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->mem_spaces);
+ assert(io_info->file_spaces);
+ assert(io_info->addrs);
+ assert(io_info->element_sizes);
+ assert(io_info->rbufs);
+ assert(io_info->pieces_added < io_info->piece_count);
io_info->mem_spaces[io_info->pieces_added] = dinfo->mem_space;
io_info->file_spaces[io_info->pieces_added] = dinfo->file_space;
@@ -894,11 +894,11 @@ H5D__contig_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dinfo);
- HDassert(dinfo->buf.cvp);
- HDassert(dinfo->mem_space);
- HDassert(dinfo->file_space);
+ assert(io_info);
+ assert(dinfo);
+ assert(dinfo->buf.cvp);
+ assert(dinfo->mem_space);
+ assert(dinfo->file_space);
if (io_info->use_select_io == H5D_SELECTION_IO_MODE_ON) {
/* Only perform I/O if not performing multi dataset I/O or type conversion,
@@ -919,12 +919,12 @@ H5D__contig_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
else {
if (dinfo->layout_io_info.contig_piece_info) {
/* Add to mdset selection I/O arrays */
- HDassert(io_info->mem_spaces);
- HDassert(io_info->file_spaces);
- HDassert(io_info->addrs);
- HDassert(io_info->element_sizes);
- HDassert(io_info->wbufs);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->mem_spaces);
+ assert(io_info->file_spaces);
+ assert(io_info->addrs);
+ assert(io_info->element_sizes);
+ assert(io_info->wbufs);
+ assert(io_info->pieces_added < io_info->piece_count);
io_info->mem_spaces[io_info->pieces_added] = dinfo->mem_space;
io_info->file_spaces[io_info->pieces_added] = dinfo->file_space;
@@ -978,7 +978,7 @@ H5D__contig_write_one(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hsi
FUNC_ENTER_PACKAGE
- HDassert(io_info);
+ assert(io_info);
if (H5D__contig_writevv(io_info, dset_info, (size_t)1, &dset_curr_seq, &dset_len, &dset_off, (size_t)1,
&mem_curr_seq, &mem_len, &mem_off) < 0)
@@ -1212,14 +1212,14 @@ H5D__contig_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_curr_seq);
- HDassert(dset_len_arr);
- HDassert(dset_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_curr_seq);
+ assert(dset_len_arr);
+ assert(dset_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Check if data sieving is enabled */
if (H5F_SHARED_HAS_FEATURE(io_info->f_sh, H5FD_FEAT_DATA_SIEVE)) {
@@ -1316,7 +1316,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
/* Clear memory */
if (dset_contig->sieve_size > len)
- HDmemset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
+ memset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
/* Determine the new sieve buffer size & location */
dset_contig->sieve_loc = addr;
@@ -1531,14 +1531,14 @@ H5D__contig_writevv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_curr_seq);
- HDassert(dset_len_arr);
- HDassert(dset_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_curr_seq);
+ assert(dset_len_arr);
+ assert(dset_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Check if data sieving is enabled */
if (H5F_SHARED_HAS_FEATURE(io_info->f_sh, H5FD_FEAT_DATA_SIEVE)) {
@@ -1595,7 +1595,7 @@ H5D__contig_flush(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Flush any data in sieve buffer */
if (H5D__flush_sieve_buf(dset) < 0)
@@ -1621,7 +1621,7 @@ H5D__contig_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *d
FUNC_ENTER_PACKAGE
- HDassert(di);
+ assert(di);
/* Free piece info */
if (di->layout_io_info.contig_piece_info) {
@@ -1686,11 +1686,11 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f_src);
- HDassert(storage_src);
- HDassert(f_dst);
- HDassert(storage_dst);
- HDassert(dt_src);
+ assert(f_src);
+ assert(storage_src);
+ assert(f_dst);
+ assert(storage_dst);
+ assert(dt_src);
/* Allocate space for destination raw data */
if (H5D__contig_alloc(f_dst, storage_dst) < 0)
@@ -1787,7 +1787,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
} /* end else */
/* Allocate space for copy buffer */
- HDassert(buf_size);
+ assert(buf_size);
if (NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer")
@@ -1859,7 +1859,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
H5MM_memcpy(reclaim_buf, buf, mem_nbytes);
/* Set background buffer to all zeros */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
@@ -1881,7 +1881,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
} /* end if */
else
/* Reset value to zero */
- HDmemset(buf, 0, src_nbytes);
+ memset(buf, 0, src_nbytes);
} /* end if */
/* Write raw data to destination file */
diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c
index 0dc6bd7..569dad9 100644
--- a/src/H5Ddbg.c
+++ b/src/H5Ddbg.c
@@ -77,8 +77,7 @@ H5Ddebug(hid_t dset_id)
if (H5D_CHUNKED == dset->shared->layout.type)
(void)H5D__chunk_dump_index(dset, stdout);
else if (H5D_CONTIGUOUS == dset->shared->layout.type)
- HDfprintf(stdout, " %-10s %" PRIuHADDR "\n",
- "Address:", dset->shared->layout.storage.u.contig.addr);
+ fprintf(stdout, " %-10s %" PRIuHADDR "\n", "Address:", dset->shared->layout.storage.u.contig.addr);
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index d334d28..f8467b2 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -221,9 +221,9 @@ H5D__earray_crt_context(void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->chunk_size > 0);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->chunk_size > 0);
/* Allocate new context structure */
if (NULL == (ctx = H5FL_MALLOC(H5D_earray_ctx_t)))
@@ -268,7 +268,7 @@ H5D__earray_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(ctx);
+ assert(ctx);
/* Release context structure */
ctx = H5FL_FREE(H5D_earray_ctx_t, ctx);
@@ -297,8 +297,8 @@ H5D__earray_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
+ assert(nat_blk);
+ assert(nelmts);
H5VM_array_fill(nat_blk, &fill_val, H5EA_CLS_CHUNK->nat_elmt_size, nelmts);
@@ -327,10 +327,10 @@ H5D__earray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(ctx);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(ctx);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -371,9 +371,9 @@ H5D__earray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -412,12 +412,12 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_debug() */
@@ -443,9 +443,9 @@ H5D__earray_filt_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
- HDassert(sizeof(fill_val) == H5EA_CLS_FILT_CHUNK->nat_elmt_size);
+ assert(nat_blk);
+ assert(nelmts);
+ assert(sizeof(fill_val) == H5EA_CLS_FILT_CHUNK->nat_elmt_size);
H5VM_array_fill(nat_blk, &fill_val, H5EA_CLS_FILT_CHUNK->nat_elmt_size, nelmts);
@@ -476,10 +476,10 @@ H5D__earray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(ctx);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(ctx);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -523,9 +523,9 @@ H5D__earray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -568,13 +568,13 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
- elmt->nbytes, elmt->filter_mask);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
+ elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_debug() */
@@ -604,8 +604,8 @@ H5D__earray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(obj_addr));
/* Allocate context for debugging callback */
if (NULL == (dbg_ctx = H5FL_MALLOC(H5D_earray_ctx_ud_t)))
@@ -675,7 +675,7 @@ H5D__earray_dst_dbg_context(void *_dbg_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dbg_ctx);
+ assert(dbg_ctx);
/* Release context structure */
dbg_ctx = H5FL_FREE(H5D_earray_ctx_ud_t, dbg_ctx);
@@ -708,16 +708,16 @@ H5D__earray_idx_depend(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(idx_info->storage->u.earray.ea);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_EARRAY == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_EARRAY == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info->storage->u.earray.ea);
/* Set up object header location for dataset */
H5O_loc_reset(&oloc);
@@ -772,15 +772,15 @@ H5D__earray_idx_open(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.earray.ea);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_EARRAY == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_EARRAY == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.earray.ea);
/* Set up the user data */
udata.f = idx_info->f;
@@ -826,13 +826,13 @@ H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, had
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(space);
- HDassert(H5F_addr_defined(dset_ohdr_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(space);
+ assert(H5F_addr_defined(dset_ohdr_addr));
/* Get the dim info for dataset */
if ((sndims = H5S_get_simple_extent_dims(space, NULL, max_dims)) < 0)
@@ -895,13 +895,13 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.earray.ea);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.earray.ea);
/* General parameters */
if (idx_info->pline->nused > 0) {
@@ -922,15 +922,15 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
cparam.raw_elmt_size = (uint8_t)H5F_SIZEOF_ADDR(idx_info->f);
} /* end else */
cparam.max_nelmts_bits = idx_info->layout->u.earray.cparam.max_nelmts_bits;
- HDassert(cparam.max_nelmts_bits > 0);
+ assert(cparam.max_nelmts_bits > 0);
cparam.idx_blk_elmts = idx_info->layout->u.earray.cparam.idx_blk_elmts;
- HDassert(cparam.idx_blk_elmts > 0);
+ assert(cparam.idx_blk_elmts > 0);
cparam.sup_blk_min_data_ptrs = idx_info->layout->u.earray.cparam.sup_blk_min_data_ptrs;
- HDassert(cparam.sup_blk_min_data_ptrs > 0);
+ assert(cparam.sup_blk_min_data_ptrs > 0);
cparam.data_blk_min_elmts = idx_info->layout->u.earray.cparam.data_blk_min_elmts;
- HDassert(cparam.data_blk_min_elmts > 0);
+ assert(cparam.data_blk_min_elmts > 0);
cparam.max_dblk_page_nelmts_bits = idx_info->layout->u.earray.cparam.max_dblk_page_nelmts_bits;
- HDassert(cparam.max_dblk_page_nelmts_bits > 0);
+ assert(cparam.max_dblk_page_nelmts_bits > 0);
/* Set up the user data */
udata.f = idx_info->f;
@@ -972,7 +972,7 @@ H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__earray_idx_is_space_alloc() */
@@ -998,13 +998,13 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the extensible array is open yet */
if (NULL == idx_info->storage->u.earray.ea) {
@@ -1069,13 +1069,13 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the extensible array is open yet */
if (NULL == idx_info->storage->u.earray.ea) {
@@ -1162,7 +1162,7 @@ H5D__earray_idx_resize(H5O_layout_chunk_t *layout)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(layout);
+ assert(layout);
/* "Swizzle" constant dimensions for this dataset */
if (layout->u.earray.unlim_dim > 0) {
@@ -1232,7 +1232,7 @@ H5D__earray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
/* Update coordinates of chunk in dataset */
ndims = udata->common.layout->ndims - 1;
- HDassert(ndims > 0);
+ assert(ndims > 0);
curr_dim = (int)(ndims - 1);
while (curr_dim >= 0) {
/* Increment coordinate in current dimension */
@@ -1278,14 +1278,14 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(chunk_cb);
- HDassert(chunk_udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(chunk_cb);
+ assert(chunk_udata);
/* Check if the extensible array is open yet */
if (NULL == idx_info->storage->u.earray.ea) {
@@ -1307,10 +1307,10 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
H5D_earray_it_ud_t udata; /* User data for iteration callback */
/* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
- HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
+ memset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if (!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
@@ -1350,13 +1350,13 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the extensible array is open yet */
if (NULL == idx_info->storage->u.earray.ea) {
@@ -1402,7 +1402,7 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info")
/* Remove raw data chunk from file if not doing SWMR writes */
- HDassert(H5F_addr_defined(elmt.addr));
+ assert(H5F_addr_defined(elmt.addr));
if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)) {
H5_CHECK_OVERFLOW(elmt.nbytes, /*From: */ uint32_t, /*To: */ hsize_t);
if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, elmt.addr, (hsize_t)elmt.nbytes) < 0)
@@ -1424,7 +1424,7 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
/* Remove raw data chunk from file if not doing SWMR writes */
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)) {
H5_CHECK_OVERFLOW(idx_info->layout->size, /*From: */ uint32_t, /*To: */ hsize_t);
if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, addr, (hsize_t)idx_info->layout->size) < 0)
@@ -1463,10 +1463,10 @@ H5D__earray_idx_delete_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(chunk_rec);
- HDassert(H5F_addr_defined(chunk_rec->chunk_addr));
- HDassert(chunk_rec->nbytes > 0);
- HDassert(f);
+ assert(chunk_rec);
+ assert(H5F_addr_defined(chunk_rec->chunk_addr));
+ assert(chunk_rec->nbytes > 0);
+ assert(f);
/* Remove raw data chunk from file */
H5_CHECK_OVERFLOW(chunk_rec->nbytes, /*From: */ uint32_t, /*To: */ hsize_t);
@@ -1503,11 +1503,11 @@ H5D__earray_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Check if the index data structure has been allocated */
if (H5F_addr_defined(idx_info->storage->idx_addr)) {
@@ -1532,7 +1532,7 @@ H5D__earray_idx_delete(const H5D_chk_idx_info_t *idx_info)
idx_info->storage->idx_addr = HADDR_UNDEF;
} /* end if */
else
- HDassert(NULL == idx_info->storage->u.earray.ea);
+ assert(NULL == idx_info->storage->u.earray.ea);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1558,17 +1558,17 @@ H5D__earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
- HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
+ assert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Check if the source extensible array is open yet */
if (NULL == idx_info_src->storage->u.earray.ea)
@@ -1582,7 +1582,7 @@ H5D__earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
/* Create the extensible array that describes chunked storage in the dest. file */
if (H5D__earray_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
- HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Reset metadata tag */
H5_END_TAG
@@ -1611,10 +1611,10 @@ H5D__earray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chun
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(storage_src);
- HDassert(storage_src->u.earray.ea);
- HDassert(storage_dst);
- HDassert(storage_dst->u.earray.ea);
+ assert(storage_src);
+ assert(storage_src->u.earray.ea);
+ assert(storage_dst);
+ assert(storage_dst->u.earray.ea);
/* Close extensible arrays */
if (H5EA_close(storage_src->u.earray.ea) < 0)
@@ -1651,13 +1651,13 @@ H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(index_size);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(index_size);
/* Open the extensible array in file */
if (H5D__earray_idx_open(idx_info) < 0)
@@ -1702,7 +1702,7 @@ H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr) {
@@ -1732,10 +1732,10 @@ H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_idx_dump() */
@@ -1760,9 +1760,9 @@ H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->storage);
/* Check if the extensible array is open */
if (idx_info->storage->u.earray.ea) {
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 7509df7..ecd97a4 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -126,8 +126,8 @@ H5D__efl_construct(H5F_t *f, H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/*
* The maximum size of the dataset cannot exceed the storage size.
@@ -158,7 +158,7 @@ H5D__efl_construct(H5F_t *f, H5D_t *dset)
/* Compute the total size of dataset */
stmp_size = H5S_GET_EXTENT_NPOINTS(dset->shared->space);
- HDassert(stmp_size >= 0);
+ assert(stmp_size >= 0);
tmp_size = (hsize_t)stmp_size * dt_size;
H5_CHECKED_ASSIGN(dset->shared->layout.storage.u.contig.size, hsize_t, tmp_size, hssize_t);
@@ -187,7 +187,7 @@ H5D__efl_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
/* EFL storage is currently always treated as allocated */
FUNC_LEAVE_NOAPI(TRUE)
@@ -252,10 +252,10 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(efl && efl->nused > 0);
- HDassert(H5F_addr_defined(addr));
- HDassert(size < SIZE_MAX);
- HDassert(buf || 0 == size);
+ assert(efl && efl->nused > 0);
+ assert(H5F_addr_defined(addr));
+ assert(size < SIZE_MAX);
+ assert(buf || 0 == size);
/* Find the first efl member from which to read */
for (u = 0, cur = 0; u < efl->nused; u++) {
@@ -268,7 +268,7 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
/* Read the data */
while (size) {
- HDassert(buf);
+ assert(buf);
if (u >= efl->nused)
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "read past logical end of file")
if (H5F_OVERFLOW_HSIZET2OFFT((hsize_t)efl->slot[u].offset + skip))
@@ -289,7 +289,7 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
if ((n = HDread(fd, buf, to_read)) < 0)
HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file")
else if ((size_t)n < to_read)
- HDmemset(buf + n, 0, to_read - (size_t)n);
+ memset(buf + n, 0, to_read - (size_t)n);
full_name = (char *)H5MM_xfree(full_name);
HDclose(fd);
fd = -1;
@@ -340,10 +340,10 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(efl && efl->nused > 0);
- HDassert(H5F_addr_defined(addr));
- HDassert(size < SIZE_MAX);
- HDassert(buf || 0 == size);
+ assert(efl && efl->nused > 0);
+ assert(H5F_addr_defined(addr));
+ assert(size < SIZE_MAX);
+ assert(buf || 0 == size);
/* Find the first efl member in which to write */
for (u = 0, cur = 0; u < efl->nused; u++) {
@@ -356,7 +356,7 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz
/* Write the data */
while (size) {
- HDassert(buf);
+ assert(buf);
if (u >= efl->nused)
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "write past logical end of file")
if (H5F_OVERFLOW_HSIZET2OFFT((hsize_t)efl->slot[u].offset + skip))
@@ -452,18 +452,18 @@ H5D__efl_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->store->efl.nused > 0);
- HDassert(dset_info->buf.vp);
- HDassert(dset_info->dset);
- HDassert(dset_info->dset->shared);
- HDassert(dset_curr_seq);
- HDassert(dset_len_arr);
- HDassert(dset_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->store->efl.nused > 0);
+ assert(dset_info->buf.vp);
+ assert(dset_info->dset);
+ assert(dset_info->dset->shared);
+ assert(dset_curr_seq);
+ assert(dset_len_arr);
+ assert(dset_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Set up user data for H5VM_opvv() */
udata.efl = &(dset_info->store->efl);
@@ -533,18 +533,18 @@ H5D__efl_writevv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_d
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->store->efl.nused > 0);
- HDassert(dset_info->buf.cvp);
- HDassert(dset_info->dset);
- HDassert(dset_info->dset->shared);
- HDassert(dset_curr_seq);
- HDassert(dset_len_arr);
- HDassert(dset_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->store->efl.nused > 0);
+ assert(dset_info->buf.cvp);
+ assert(dset_info->dset);
+ assert(dset_info->dset->shared);
+ assert(dset_curr_seq);
+ assert(dset_len_arr);
+ assert(dset_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Set up user data for H5VM_opvv() */
udata.efl = &(dset_info->store->efl);
@@ -580,10 +580,10 @@ H5D__efl_bh_info(H5F_t *f, H5O_efl_t *efl, hsize_t *heap_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(efl);
- HDassert(H5F_addr_defined(efl->heap_addr));
- HDassert(heap_size);
+ assert(f);
+ assert(efl);
+ assert(H5F_addr_defined(efl->heap_addr));
+ assert(heap_size);
/* Get the size of the local heap for EFL's file list */
if (H5HL_heapsize(f, efl->heap_addr, heap_size) < 0)
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index c0d58b2..0aa1dc6 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -220,9 +220,9 @@ H5D__farray_crt_context(void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->chunk_size > 0);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->chunk_size > 0);
/* Allocate new context structure */
if (NULL == (ctx = H5FL_MALLOC(H5D_farray_ctx_t)))
@@ -266,7 +266,7 @@ H5D__farray_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(ctx);
+ assert(ctx);
/* Release context structure */
ctx = H5FL_FREE(H5D_farray_ctx_t, ctx);
@@ -295,8 +295,8 @@ H5D__farray_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
+ assert(nat_blk);
+ assert(nelmts);
H5VM_array_fill(nat_blk, &fill_val, H5FA_CLS_CHUNK->nat_elmt_size, nelmts);
@@ -325,10 +325,10 @@ H5D__farray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(ctx);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(ctx);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -369,9 +369,9 @@ H5D__farray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -410,12 +410,12 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_debug() */
@@ -446,8 +446,8 @@ H5D__farray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(obj_addr));
/* Allocate context for debugging callback */
if (NULL == (dbg_ctx = H5FL_MALLOC(H5D_farray_ctx_ud_t)))
@@ -516,7 +516,7 @@ H5D__farray_dst_dbg_context(void *_dbg_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dbg_ctx);
+ assert(dbg_ctx);
/* Release context structure */
dbg_ctx = H5FL_FREE(H5D_farray_ctx_ud_t, dbg_ctx);
@@ -545,9 +545,9 @@ H5D__farray_filt_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
- HDassert(sizeof(fill_val) == H5FA_CLS_FILT_CHUNK->nat_elmt_size);
+ assert(nat_blk);
+ assert(nelmts);
+ assert(sizeof(fill_val) == H5FA_CLS_FILT_CHUNK->nat_elmt_size);
H5VM_array_fill(nat_blk, &fill_val, H5FA_CLS_FILT_CHUNK->nat_elmt_size, nelmts);
@@ -578,10 +578,10 @@ H5D__farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(ctx);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(ctx);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -625,9 +625,9 @@ H5D__farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -670,13 +670,13 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
- elmt->nbytes, elmt->filter_mask);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
+ elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_debug() */
@@ -706,16 +706,16 @@ H5D__farray_idx_depend(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(idx_info->storage->u.farray.fa);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_FARRAY == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_FARRAY == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info->storage->u.farray.fa);
/* Set up object header location for dataset */
H5O_loc_reset(&oloc);
@@ -762,9 +762,9 @@ H5D__farray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(dset_ohdr_addr));
+ assert(idx_info);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(dset_ohdr_addr));
idx_info->storage->u.farray.dset_ohdr_addr = dset_ohdr_addr;
@@ -794,15 +794,15 @@ H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.farray.fa);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_FARRAY == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_FARRAY == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.farray.fa);
/* Set up the user data */
udata.f = idx_info->f;
@@ -851,14 +851,14 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.farray.fa);
- HDassert(idx_info->layout->nchunks);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.farray.fa);
+ assert(idx_info->layout->nchunks);
/* General parameters */
if (idx_info->pline->nused > 0) {
@@ -879,7 +879,7 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
cparam.raw_elmt_size = (uint8_t)H5F_SIZEOF_ADDR(idx_info->f);
} /* end else */
cparam.max_dblk_page_nelmts_bits = idx_info->layout->u.farray.cparam.max_dblk_page_nelmts_bits;
- HDassert(cparam.max_dblk_page_nelmts_bits > 0);
+ assert(cparam.max_dblk_page_nelmts_bits > 0);
cparam.nelmts = idx_info->layout->max_nchunks;
/* Set up the user data */
@@ -922,7 +922,7 @@ H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__farray_idx_is_space_alloc() */
@@ -948,13 +948,13 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the fixed array is open yet */
if (NULL == idx_info->storage->u.farray.fa) {
@@ -1019,13 +1019,13 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the fixed array is open yet */
if (NULL == idx_info->storage->u.farray.fa) {
@@ -1115,7 +1115,7 @@ H5D__farray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
/* Update coordinates of chunk in dataset */
ndims = udata->common.layout->ndims - 1;
- HDassert(ndims > 0);
+ assert(ndims > 0);
curr_dim = (int)(ndims - 1);
while (curr_dim >= 0) {
/* Increment coordinate in current dimension */
@@ -1157,14 +1157,14 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(chunk_cb);
- HDassert(chunk_udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(chunk_cb);
+ assert(chunk_udata);
/* Check if the fixed array is open yet */
if (NULL == idx_info->storage->u.farray.fa) {
@@ -1187,10 +1187,10 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
H5D_farray_it_ud_t udata; /* User data for iteration callback */
/* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
- HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
+ memset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if (!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
@@ -1230,13 +1230,13 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the fixed array is open yet */
if (NULL == idx_info->storage->u.farray.fa) {
@@ -1264,7 +1264,7 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info")
/* Remove raw data chunk from file if not doing SWMR writes */
- HDassert(H5F_addr_defined(elmt.addr));
+ assert(H5F_addr_defined(elmt.addr));
if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)) {
H5_CHECK_OVERFLOW(elmt.nbytes, /*From: */ uint32_t, /*To: */ hsize_t);
if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, elmt.addr, (hsize_t)elmt.nbytes) < 0)
@@ -1286,7 +1286,7 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
/* Remove raw data chunk from file if not doing SWMR writes */
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)) {
H5_CHECK_OVERFLOW(idx_info->layout->size, /*From: */ uint32_t, /*To: */ hsize_t);
if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, addr, (hsize_t)idx_info->layout->size) < 0)
@@ -1325,10 +1325,10 @@ H5D__farray_idx_delete_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(chunk_rec);
- HDassert(H5F_addr_defined(chunk_rec->chunk_addr));
- HDassert(chunk_rec->nbytes > 0);
- HDassert(f);
+ assert(chunk_rec);
+ assert(H5F_addr_defined(chunk_rec->chunk_addr));
+ assert(chunk_rec->nbytes > 0);
+ assert(f);
/* Remove raw data chunk from file */
H5_CHECK_OVERFLOW(chunk_rec->nbytes, /*From: */ uint32_t, /*To: */ hsize_t);
@@ -1361,11 +1361,11 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Check if the index data structure has been allocated */
if (H5F_addr_defined(idx_info->storage->idx_addr)) {
@@ -1390,7 +1390,7 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info)
idx_info->storage->idx_addr = HADDR_UNDEF;
} /* end if */
else
- HDassert(NULL == idx_info->storage->u.farray.fa);
+ assert(NULL == idx_info->storage->u.farray.fa);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1416,17 +1416,17 @@ H5D__farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
- HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
+ assert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Check if the source fixed array is open yet */
if (NULL == idx_info_src->storage->u.farray.fa)
@@ -1440,7 +1440,7 @@ H5D__farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
/* Create the fixed array that describes chunked storage in the dest. file */
if (H5D__farray_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
- HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Reset metadata tag */
H5_END_TAG
@@ -1469,10 +1469,10 @@ H5D__farray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chun
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(storage_src);
- HDassert(storage_src->u.farray.fa);
- HDassert(storage_dst);
- HDassert(storage_dst->u.farray.fa);
+ assert(storage_src);
+ assert(storage_src->u.farray.fa);
+ assert(storage_dst);
+ assert(storage_dst->u.farray.fa);
/* Close fixed arrays */
if (H5FA_close(storage_src->u.farray.fa) < 0)
@@ -1509,13 +1509,13 @@ H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(index_size);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(index_size);
/* Open the fixed array in file */
if (H5D__farray_idx_open(idx_info) < 0)
@@ -1559,7 +1559,7 @@ H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -1587,10 +1587,10 @@ H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_idx_dump() */
@@ -1615,9 +1615,9 @@ H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->storage);
/* Check if the fixed array is open */
if (idx_info->storage->u.farray.fa) {
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index 5275323..bfcad71 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -128,10 +128,10 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(fill_type);
- HDassert(buf);
- HDassert(buf_type);
- HDassert(space);
+ assert(fill_type);
+ assert(buf);
+ assert(buf_type);
+ assert(space);
/* Make sure the dataspace has an extent set (or is NULL) */
if (!(H5S_has_extent(space)))
@@ -313,13 +313,13 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(fb_info);
- HDassert(fill);
- HDassert(dset_type);
- HDassert(dset_type_id > 0);
+ assert(fb_info);
+ assert(fill);
+ assert(dset_type);
+ assert(dset_type_id > 0);
/* Reset fill buffer information */
- HDmemset(fb_info, 0, sizeof(*fb_info));
+ memset(fb_info, 0, sizeof(*fb_info));
/* Cache constant information from the dataset */
fb_info->fill = fill;
@@ -349,9 +349,9 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
/* Retrieve sizes of memory & file datatypes */
fb_info->mem_elmt_size = H5T_get_size(fb_info->mem_type);
- HDassert(fb_info->mem_elmt_size > 0);
+ assert(fb_info->mem_elmt_size > 0);
fb_info->file_elmt_size = H5T_get_size(dset_type);
- HDassert(fb_info->file_elmt_size == (size_t)fill->size);
+ assert(fb_info->file_elmt_size == (size_t)fill->size);
/* If fill value is not library default, use it to set the element size */
fb_info->max_elmt_size = MAX(fb_info->mem_elmt_size, fb_info->file_elmt_size);
@@ -361,7 +361,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size)));
else
fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size;
- HDassert(fb_info->elmts_per_buf > 0);
+ assert(fb_info->elmts_per_buf > 0);
/* Compute the buffer size to use */
fb_info->fill_buf_size = MIN(max_buf_size, (fb_info->elmts_per_buf * fb_info->max_elmt_size));
@@ -406,7 +406,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
} /* end if */
else {
/* If fill value is not library default, use it to set the element size */
- HDassert(fill->size >= 0);
+ assert(fill->size >= 0);
fb_info->max_elmt_size = fb_info->file_elmt_size = fb_info->mem_elmt_size = (size_t)fill->size;
/* Compute the number of elements that fit within a buffer to write */
@@ -414,7 +414,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size)));
else
fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size;
- HDassert(fb_info->elmts_per_buf > 0);
+ assert(fb_info->elmts_per_buf > 0);
/* Compute the buffer size to use */
fb_info->fill_buf_size = MIN(max_buf_size, fb_info->elmts_per_buf * fb_info->max_elmt_size);
@@ -440,14 +440,14 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
else { /* Fill the buffer with the default fill value */
/* Retrieve size of elements */
fb_info->max_elmt_size = fb_info->file_elmt_size = fb_info->mem_elmt_size = H5T_get_size(dset_type);
- HDassert(fb_info->max_elmt_size > 0);
+ assert(fb_info->max_elmt_size > 0);
/* Compute the number of elements that fit within a buffer to write */
if (total_nelmts > 0)
fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size)));
else
fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size;
- HDassert(fb_info->elmts_per_buf > 0);
+ assert(fb_info->elmts_per_buf > 0);
/* Compute the buffer size to use */
fb_info->fill_buf_size = MIN(max_buf_size, (fb_info->elmts_per_buf * fb_info->max_elmt_size));
@@ -457,19 +457,19 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
fb_info->fill_buf = caller_fill_buf;
fb_info->use_caller_fill_buf = TRUE;
- HDmemset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
+ memset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
} /* end if */
else {
if (alloc_func) {
fb_info->fill_buf = alloc_func(fb_info->fill_buf_size, alloc_info);
- HDmemset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
+ memset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
} /* end if */
else {
htri_t buf_avail = H5FL_BLK_AVAIL(
zero_fill,
fb_info->fill_buf_size); /* Check if there is an already zeroed out buffer available */
- HDassert(buf_avail != FAIL);
+ assert(buf_avail != FAIL);
/* Allocate temporary buffer (zeroing it if no buffer is available) */
if (!buf_avail)
@@ -512,16 +512,16 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(fb_info);
- HDassert(fb_info->has_vlen_fill_type);
- HDassert(fb_info->fill_buf);
+ assert(fb_info);
+ assert(fb_info->has_vlen_fill_type);
+ assert(fb_info->fill_buf);
/* Make a copy of the (disk-based) fill value into the buffer */
H5MM_memcpy(fb_info->fill_buf, fb_info->fill->buf, fb_info->file_elmt_size);
/* Reset first element of background buffer, if necessary */
if (H5T_path_bkg(fb_info->fill_to_mem_tpath))
- HDmemset(fb_info->bkg_buf, 0, fb_info->max_elmt_size);
+ memset(fb_info->bkg_buf, 0, fb_info->max_elmt_size);
/* Type convert the dataset buffer, to copy any VL components */
if (H5T_convert(fb_info->fill_to_mem_tpath, fb_info->file_tid, fb_info->mem_tid, (size_t)1, (size_t)0,
@@ -535,7 +535,7 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
/* Reset the entire background buffer, if necessary */
if (H5T_path_bkg(fb_info->mem_to_dset_tpath))
- HDmemset(fb_info->bkg_buf, 0, fb_info->bkg_buf_size);
+ memset(fb_info->bkg_buf, 0, fb_info->bkg_buf_size);
/* Make a copy of the fill buffer so we can free dynamic elements after conversion */
if (fb_info->fill_alloc_func)
@@ -592,8 +592,8 @@ H5D__fill_release(H5D_fill_buf_info_t *fb_info)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(fb_info);
- HDassert(fb_info->fill);
+ assert(fb_info);
+ assert(fb_info->fill);
/* Free the buffer for fill values */
if (!fb_info->use_caller_fill_buf && fb_info->fill_buf) {
@@ -629,7 +629,7 @@ H5D__fill_term(H5D_fill_buf_info_t *fb_info)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(fb_info);
+ assert(fb_info);
/* Free the buffer for fill values */
H5D__fill_release(fb_info);
diff --git a/src/H5Dint.c b/src/H5Dint.c
index e930c6a..041fd58 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -166,7 +166,7 @@ H5D_init(void)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* Reset the "default dataset" information */
- HDmemset(&H5D_def_dset, 0, sizeof(H5D_shared_t));
+ memset(&H5D_def_dset, 0, sizeof(H5D_shared_t));
H5D_def_dset.type_id = H5I_INVALID_HID;
H5D_def_dset.dapl_id = H5I_INVALID_HID;
H5D_def_dset.dcpl_id = H5I_INVALID_HID;
@@ -265,7 +265,7 @@ H5D_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_DATASET));
+ assert(0 == H5I_nmembers(H5I_DATASET));
/* Destroy the dataset object id group */
n += (H5I_dec_type_ref(H5I_DATASET) > 0);
@@ -290,7 +290,7 @@ H5D__close_cb(H5VL_object_t *dset_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset_vol_obj);
+ assert(dset_vol_obj);
/* Close the dataset */
if (H5VL_dataset_close(dset_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
@@ -325,13 +325,13 @@ H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, const H
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(type_id != H5P_DEFAULT);
- HDassert(space);
- HDassert(lcpl_id != H5P_DEFAULT);
- HDassert(dcpl_id != H5P_DEFAULT);
- HDassert(dapl_id != H5P_DEFAULT);
+ assert(loc);
+ assert(name && *name);
+ assert(type_id != H5P_DEFAULT);
+ assert(space);
+ assert(lcpl_id != H5P_DEFAULT);
+ assert(dcpl_id != H5P_DEFAULT);
+ assert(dapl_id != H5P_DEFAULT);
/* Set up dataset creation info */
dcrt_info.type_id = type_id;
@@ -347,7 +347,7 @@ H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, const H
/* Create the new dataset and link it to its parent group */
if (H5L_link_object(loc, name, &ocrt_info, lcpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create and link to dataset")
- HDassert(ocrt_info.new_obj);
+ assert(ocrt_info.new_obj);
/* Set the return value */
ret_value = (H5D_t *)ocrt_info.new_obj;
@@ -373,7 +373,7 @@ H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation)
FUNC_ENTER_PACKAGE
- HDassert(dset);
+ assert(dset);
/* Check for chunked layout */
if (dset->shared->layout.type == H5D_CHUNKED) {
@@ -384,7 +384,7 @@ H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,
"unable to retrieve number of allocated chunks in dataset")
- HDassert(n_chunks_alloc <= n_chunks_total);
+ assert(n_chunks_alloc <= n_chunks_total);
if (n_chunks_alloc == 0)
*allocation = H5D_SPACE_STATUS_NOT_ALLOCATED;
@@ -497,9 +497,9 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, H5T_t *type)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(file);
- HDassert(dset);
- HDassert(type);
+ assert(file);
+ assert(dset);
+ assert(type);
/* Check whether the datatype is relocatable */
if ((relocatable = H5T_is_relocatable(type)) < 0)
@@ -569,7 +569,7 @@ H5D__cache_dataspace_info(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(dset);
+ assert(dset);
/* Cache info for dataset's dataspace */
if ((sndims = H5S_get_simple_extent_dims(dset->shared->space, dset->shared->curr_dims,
@@ -608,9 +608,9 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(file);
- HDassert(dset);
- HDassert(space);
+ assert(file);
+ assert(dset);
+ assert(space);
/* Copy dataspace for dataset */
if (NULL == (dset->shared->space = H5S_copy(space, FALSE, TRUE)))
@@ -653,8 +653,8 @@ H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(minimize);
+ assert(file);
+ assert(minimize);
/* Get the dataset object header minimize flag for this call */
if (H5CX_get_dset_min_ohdr_flag(minimize) < 0)
@@ -694,9 +694,9 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(dset);
- HDassert(ohdr);
+ assert(file);
+ assert(dset);
+ assert(ohdr);
type = dset->shared->type;
fill_prop = &(dset->shared->dcpl_cache.fill);
@@ -774,7 +774,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr)
/* Modification Time message size */
if (H5O_HDR_STORE_TIMES & H5O_OH_GET_FLAGS(ohdr)) {
- HDassert(H5O_OH_GET_VERSION(ohdr) >= 1); /* 1 :: H5O_VERSION_1 (H5Opkg.h) */
+ assert(H5O_OH_GET_VERSION(ohdr) >= 1); /* 1 :: H5O_VERSION_1 (H5Opkg.h) */
if (H5O_OH_GET_VERSION(ohdr) == 1) {
/* v1 object headers store modification time as a message */
@@ -812,9 +812,9 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(dset);
- HDassert(oloc);
+ assert(file);
+ assert(dset);
+ assert(oloc);
oh = H5O_create_ohdr(file, dset->shared->dcpl_id);
if (NULL == oh)
@@ -860,8 +860,8 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(file);
- HDassert(dset);
+ assert(file);
+ assert(dset);
/* Set some local variables, for convenience */
oloc = &dset->oloc;
@@ -916,7 +916,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
H5P_genplist_t *dc_plist; /* Dataset's creation property list */
/* Get dataset's property list object */
- HDassert(dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT);
+ assert(dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT);
if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
@@ -944,7 +944,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset object header")
} /* if using default/minimized object headers */
- HDassert(file == dset->oloc.file);
+ assert(file == dset->oloc.file);
/* Pin the object header */
if (NULL == (oh = H5O_pin(oloc)))
@@ -1062,10 +1062,10 @@ H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char **
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
- HDassert(dset->oloc.file);
+ assert(dset);
+ assert(dset->oloc.file);
filepath = H5F_EXTPATH(dset->oloc.file);
- HDassert(filepath);
+ assert(filepath);
/* XXX: Future thread-safety note - getenv is not required
* to be reentrant.
@@ -1153,10 +1153,10 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file);
- HDassert(H5I_DATATYPE == H5I_get_type(type_id));
- HDassert(space);
- HDassert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
+ assert(file);
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
+ assert(space);
+ assert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
/* Get the dataset's datatype */
if (NULL == (dt = (H5T_t *)H5I_object(type_id)))
@@ -1410,8 +1410,8 @@ H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Set up dataset location to fill in */
dset_loc.oloc = &oloc;
@@ -1467,7 +1467,7 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(loc);
+ assert(loc);
/* Allocate the dataset structure */
if (NULL == (dataset = H5FL_CALLOC(H5D_t)))
@@ -1600,11 +1600,11 @@ H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
/* Set default append flush values */
- HDmemset(&dset->shared->append_flush, 0, sizeof(dset->shared->append_flush));
+ memset(&dset->shared->append_flush, 0, sizeof(dset->shared->append_flush));
/* If the dataset is chunked and there is a non-default DAPL */
if (dapl_id != H5P_DATASET_ACCESS_DEFAULT && dset->shared->layout.type == H5D_CHUNKED) {
@@ -1679,7 +1679,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr)
/* check args */
- HDassert(dataset);
+ assert(dataset);
/* (Set the 'vl_type' parameter to FALSE since it doesn't matter from here) */
if (NULL == (dataset->shared = H5D__new(H5P_DATASET_CREATE_DEFAULT, dapl_id, FALSE, FALSE)))
@@ -1732,7 +1732,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
size_t dset_type_size = H5T_GET_SIZE(dataset->shared->type);
size_t dset_data_size = 0;
- HDassert(H5D_COMPACT == dataset->shared->layout.storage.type);
+ assert(H5D_COMPACT == dataset->shared->layout.storage.type);
if ((dset_nelemts = H5S_GET_EXTENT_NPOINTS(dataset->shared->space)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get number of elements in dataset's dataspace")
@@ -1870,8 +1870,8 @@ H5D_close(H5D_t *dataset)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(dataset && dataset->oloc.file && dataset->shared);
- HDassert(dataset->shared->fo_count > 0);
+ assert(dataset && dataset->oloc.file && dataset->shared);
+ assert(dataset->shared->fo_count > 0);
/* Dump debugging info */
#ifdef H5D_CHUNK_DEBUG
@@ -1903,7 +1903,7 @@ H5D_close(H5D_t *dataset)
case H5D_CHUNKED:
/* Check for skip list for iterating over chunks during I/O to close */
if (dataset->shared->cache.chunk.sel_chunks) {
- HDassert(H5SL_count(dataset->shared->cache.chunk.sel_chunks) == 0);
+ assert(H5SL_count(dataset->shared->cache.chunk.sel_chunks) == 0);
H5SL_close(dataset->shared->cache.chunk.sel_chunks);
dataset->shared->cache.chunk.sel_chunks = NULL;
} /* end if */
@@ -1929,14 +1929,14 @@ H5D_close(H5D_t *dataset)
case H5D_VIRTUAL: {
size_t i, j;
- HDassert(dataset->shared->layout.storage.u.virt.list ||
- (dataset->shared->layout.storage.u.virt.list_nused == 0));
+ assert(dataset->shared->layout.storage.u.virt.list ||
+ (dataset->shared->layout.storage.u.virt.list_nused == 0));
/* Close source datasets */
for (i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) {
/* Close source dataset */
if (dataset->shared->layout.storage.u.virt.list[i].source_dset.dset) {
- HDassert(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset != dataset);
+ assert(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset != dataset);
if (H5D_close(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset")
dataset->shared->layout.storage.u.virt.list[i].source_dset.dset = NULL;
@@ -1945,8 +1945,8 @@ H5D_close(H5D_t *dataset)
/* Close sub datasets */
for (j = 0; j < dataset->shared->layout.storage.u.virt.list[i].sub_dset_nused; j++)
if (dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) {
- HDassert(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset !=
- dataset);
+ assert(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset !=
+ dataset);
if (H5D_close(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) <
0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
@@ -1960,7 +1960,7 @@ H5D_close(H5D_t *dataset)
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
#endif /* NDEBUG */
@@ -2019,7 +2019,7 @@ H5D_close(H5D_t *dataset)
/*
* Free memory. Before freeing the memory set the file pointer to NULL.
* We always check for a null file pointer in other H5D functions to be
- * sure we're not accessing an already freed dataset (see the HDassert()
+ * sure we're not accessing an already freed dataset (see the assert()
* above).
*/
dataset->oloc.file = NULL;
@@ -2079,10 +2079,10 @@ H5D_mult_refresh_close(hid_t dset_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* check args */
- HDassert(dataset);
- HDassert(dataset->oloc.file);
- HDassert(dataset->shared);
- HDassert(dataset->shared->fo_count > 0);
+ assert(dataset);
+ assert(dataset->oloc.file);
+ assert(dataset->shared);
+ assert(dataset->shared->fo_count > 0);
if (dataset->shared->fo_count > 1) {
/* Free cached information for each kind of dataset */
@@ -2097,7 +2097,7 @@ H5D_mult_refresh_close(hid_t dset_id)
case H5D_CHUNKED:
/* Check for skip list for iterating over chunks during I/O to close */
if (dataset->shared->cache.chunk.sel_chunks) {
- HDassert(H5SL_count(dataset->shared->cache.chunk.sel_chunks) == 0);
+ assert(H5SL_count(dataset->shared->cache.chunk.sel_chunks) == 0);
H5SL_close(dataset->shared->cache.chunk.sel_chunks);
dataset->shared->cache.chunk.sel_chunks = NULL;
} /* end if */
@@ -2124,7 +2124,7 @@ H5D_mult_refresh_close(hid_t dset_id)
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
#endif /* NDEBUG */
@@ -2156,8 +2156,8 @@ H5D_mult_refresh_reopen(H5D_t *dataset)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(dataset && dataset->oloc.file && dataset->shared);
- HDassert(dataset->shared->fo_count > 0);
+ assert(dataset && dataset->oloc.file && dataset->shared);
+ assert(dataset->shared->fo_count > 0);
if (dataset->shared->fo_count > 1) {
/* Release dataspace info */
@@ -2241,9 +2241,9 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(dset);
+ assert(dset);
f = dset->oloc.file;
- HDassert(f);
+ assert(f);
/* If the data is stored in external files, don't set an address for the layout
* We assume that external storage is already
@@ -2308,7 +2308,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"unable to allocate memory for compact dataset")
if (!full_overwrite)
- HDmemset(layout->storage.u.compact.buf, 0, layout->storage.u.compact.size);
+ memset(layout->storage.u.compact.buf, 0, layout->storage.u.compact.size);
layout->storage.u.compact.dirty = TRUE;
/* Indicate that we should initialize storage space */
@@ -2333,7 +2333,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
#endif /* NDEBUG */
@@ -2409,7 +2409,7 @@ H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[])
FUNC_ENTER_PACKAGE
- HDassert(dset);
+ assert(dset);
switch (dset->shared->layout.type) {
case H5D_COMPACT:
@@ -2454,7 +2454,7 @@ H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[])
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
#endif /* NDEBUG */
@@ -2538,7 +2538,7 @@ H5D__get_offset(const H5D_t *dset)
FUNC_ENTER_PACKAGE
- HDassert(dset);
+ assert(dset);
switch (dset->shared->layout.type) {
case H5D_VIRTUAL:
@@ -2624,9 +2624,9 @@ H5D__vlen_get_buf_size_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned H5_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(H5I_DATATYPE == H5I_get_type(type_id));
- HDassert(point);
- HDassert(op_data);
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
+ assert(point);
+ assert(op_data);
/* Select point to read in */
if (H5S_select_elements(vlen_bufsize->fspace, H5S_SELECT_SET, (size_t)1, point) < 0)
@@ -2777,8 +2777,8 @@ H5D__vlen_get_buf_size_gen_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(point);
- HDassert(op_data);
+ assert(point);
+ assert(op_data);
/* Check args */
if (NULL == (dt = (H5T_t *)H5I_object(type_id)))
@@ -2938,7 +2938,7 @@ H5D__check_filters(H5D_t *dataset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dataset);
+ assert(dataset);
/* Check if the filters in the DCPL will need to encode, and if so, can they?
*
@@ -2991,8 +2991,8 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset);
- HDassert(size);
+ assert(dset);
+ assert(size);
/* Check if we are allowed to modify this file */
if (0 == (H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR))
@@ -3175,12 +3175,12 @@ H5D__flush_sieve_buf(H5D_t *dataset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dataset);
+ assert(dataset);
/* Flush the raw data buffer, if we have a dirty one */
if (dataset->shared->cache.contig.sieve_buf && dataset->shared->cache.contig.sieve_dirty) {
- HDassert(dataset->shared->layout.type !=
- H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
+ assert(dataset->shared->layout.type !=
+ H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
/* Write dirty data sieve buffer to file */
if (H5F_shared_block_write(
@@ -3213,8 +3213,8 @@ H5D__flush_real(H5D_t *dataset)
FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr)
/* Check args */
- HDassert(dataset);
- HDassert(dataset->shared);
+ assert(dataset);
+ assert(dataset->shared);
/* Avoid flushing the dataset (again) if it's closing */
if (!dataset->shared->closing)
@@ -3243,8 +3243,8 @@ H5D__flush(H5D_t *dset, hid_t dset_id)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
/* Currently, H5Oflush causes H5Fclose to trigger an assertion failure in metadata cache.
* Leave this situation for the future solution */
@@ -3287,11 +3287,11 @@ H5D__format_convert(H5D_t *dataset)
FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr)
/* Check args */
- HDassert(dataset);
+ assert(dataset);
switch (dataset->shared->layout.type) {
case H5D_CHUNKED:
- HDassert(dataset->shared->layout.u.chunk.idx_type != H5D_CHUNK_IDX_BTREE);
+ assert(dataset->shared->layout.u.chunk.idx_type != H5D_CHUNK_IDX_BTREE);
if (NULL == (newlayout = (H5O_layout_t *)H5MM_calloc(sizeof(H5O_layout_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate buffer")
@@ -3362,7 +3362,7 @@ H5D__format_convert(H5D_t *dataset)
case H5D_CONTIGUOUS:
case H5D_COMPACT:
- HDassert(dataset->shared->layout.version > H5O_LAYOUT_VERSION_DEFAULT);
+ assert(dataset->shared->layout.version > H5O_LAYOUT_VERSION_DEFAULT);
dataset->shared->layout.version = H5O_LAYOUT_VERSION_DEFAULT;
if (H5O_msg_write(&(dataset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME,
&(dataset->shared->layout)) < 0)
@@ -3436,8 +3436,8 @@ H5D__mark(const H5D_t *dataset, unsigned flags)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dataset);
- HDassert(!(flags & (unsigned)~(H5D_MARK_SPACE | H5D_MARK_LAYOUT)));
+ assert(dataset);
+ assert(!(flags & (unsigned)~(H5D_MARK_SPACE | H5D_MARK_LAYOUT)));
/* Mark aspects of the dataset as dirty */
if (flags) {
@@ -3466,7 +3466,7 @@ H5D__mark(const H5D_t *dataset, unsigned flags)
} /* end if */
/* _Somebody_ should have update the modification time! */
- HDassert(update_flags == 0);
+ assert(update_flags == 0);
} /* end if */
done:
@@ -3497,8 +3497,8 @@ H5D__flush_all_cb(void *_dataset, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dataset);
- HDassert(f);
+ assert(dataset);
+ assert(f);
/* Check for dataset in same file */
if (f == dataset->oloc.file)
@@ -3527,7 +3527,7 @@ H5D_flush_all(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
+ assert(f);
/* Iterate over all the open datasets */
if (H5I_iterate(H5I_DATASET, H5D__flush_all_cb, f, FALSE) < 0)
@@ -3584,7 +3584,7 @@ H5D_get_create_plist(const H5D_t *dset)
switch (copied_layout.type) {
case H5D_COMPACT:
copied_layout.storage.u.compact.buf = H5MM_xfree(copied_layout.storage.u.compact.buf);
- HDmemset(&copied_layout.storage.u.compact, 0, sizeof(copied_layout.storage.u.compact));
+ memset(&copied_layout.storage.u.compact, 0, sizeof(copied_layout.storage.u.compact));
break;
case H5D_CONTIGUOUS:
@@ -3615,7 +3615,7 @@ H5D_get_create_plist(const H5D_t *dset)
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
} /* end switch */
/* Set back the (possibly modified) layout property to property list */
@@ -3948,8 +3948,8 @@ H5D__refresh(H5D_t *dset, hid_t dset_id)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
/* If the layout is virtual... */
if (dset->shared->layout.type == H5D_VIRTUAL) {
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 1cd5835..e313a3e 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -215,7 +215,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
(unsigned)H5S_GET_EXTENT_NDIMS(dset_info[i].file_space),
(hsize_t)dset_info[i].type_info.dst_type_size, &buf_adj) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to construct projected memory dataspace")
- HDassert(dset_info[i].mem_space);
+ assert(dset_info[i].mem_space);
/* Adjust the buffer by the given amount */
dset_info[i].buf.vp = (void *)(((uint8_t *)dset_info[i].buf.vp) + buf_adj);
@@ -264,7 +264,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
/* Sanity check that space is allocated, if there are elements */
if (dset_info[i].nelmts > 0)
- HDassert(
+ assert(
(*dset_info[i].dset->shared->layout.ops->is_space_alloc)(
&dset_info[i].dset->shared->layout.storage) ||
(dset_info[i].dset->shared->layout.ops->is_data_cached &&
@@ -284,7 +284,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
}
} /* end of for loop */
- HDassert(io_op_init + io_skipped == count);
+ assert(io_op_init + io_skipped == count);
/* If no datasets have I/O, we're done */
if (io_op_init == 0)
@@ -312,8 +312,8 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
if (io_info.md_io_ops.multi_read_md) {
/* Create sel_pieces array if any pieces are selected */
if (io_info.piece_count > 0) {
- HDassert(!io_info.sel_pieces);
- HDassert(io_info.pieces_added == 0);
+ assert(!io_info.sel_pieces);
+ assert(io_info.pieces_added == 0);
/* Allocate sel_pieces array */
if (NULL ==
@@ -632,7 +632,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
(unsigned)H5S_GET_EXTENT_NDIMS(dset_info[i].file_space),
dset_info[i].type_info.src_type_size, &buf_adj) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to construct projected memory dataspace")
- HDassert(dset_info[i].mem_space);
+ assert(dset_info[i].mem_space);
/* Adjust the buffer by the given amount */
dset_info[i].buf.cvp = (const void *)(((const uint8_t *)dset_info[i].buf.cvp) + buf_adj);
@@ -692,7 +692,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
H5AC_tag(prev_tag, NULL);
} /* end of for loop */
- HDassert(io_op_init == count);
+ assert(io_op_init == count);
/* Perform second phase of type info initialization */
if (H5D__typeinfo_init_phase2(&io_info) < 0)
@@ -716,8 +716,8 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (io_info.md_io_ops.multi_write_md) {
/* Create sel_pieces array if any pieces are selected */
if (io_info.piece_count > 0) {
- HDassert(!io_info.sel_pieces);
- HDassert(io_info.pieces_added == 0);
+ assert(!io_info.sel_pieces);
+ assert(io_info.pieces_added == 0);
/* Allocate sel_pieces array */
if (NULL ==
@@ -773,7 +773,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
/* loop with serial & single-dset write IO path */
for (i = 0; i < count; i++) {
- HDassert(!dset_info[i].skip_io);
+ assert(!dset_info[i].skip_io);
/* set metadata tagging with dset oheader addr */
H5AC_tag(dset_info->dset->oloc.addr, &prev_tag);
@@ -848,7 +848,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
done:
/* Shut down the I/O op information */
for (i = 0; i < io_op_init; i++) {
- HDassert(!dset_info[i].skip_io);
+ assert(!dset_info[i].skip_io);
if (dset_info[i].layout_ops.io_term &&
(*dset_info[i].layout_ops.io_term)(&io_info, &(dset_info[i])) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down I/O op info")
@@ -908,13 +908,13 @@ H5D__ioinfo_init(size_t count, H5D_io_op_type_t op_type, H5D_dset_io_info_t *dse
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(count > 0);
- HDassert(dset_info);
- HDassert(dset_info[0].dset->oloc.file);
- HDassert(io_info);
+ assert(count > 0);
+ assert(dset_info);
+ assert(dset_info[0].dset->oloc.file);
+ assert(io_info);
/* Zero out struct */
- HDmemset(io_info, 0, sizeof(*io_info));
+ memset(io_info, 0, sizeof(*io_info));
/* Set up simple fields */
io_info->op_type = op_type;
@@ -970,9 +970,9 @@ H5D__dset_ioinfo_init(H5D_t *dset, H5D_dset_io_info_t *dset_info, H5D_storage_t
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(dset);
- HDassert(dset->oloc.file);
- HDassert(dset_info->type_info.tpath);
+ assert(dset);
+ assert(dset->oloc.file);
+ assert(dset_info->type_info.tpath);
/* Set up "normal" I/O fields */
dset_info->dset = dset;
@@ -1032,20 +1032,20 @@ H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hid_t
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(io_info);
- HDassert(dset_info);
+ assert(io_info);
+ assert(dset_info);
/* Set convenience pointers */
type_info = &dset_info->type_info;
dset = dset_info->dset;
- HDassert(dset);
+ assert(dset);
/* Patch the top level file pointer for dt->shared->u.vlen.f if needed */
if (H5T_patch_vlen_file(dset->shared->type, H5F_VOL_OBJ(dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer")
/* Initialize type info safely */
- HDmemset(type_info, 0, sizeof(*type_info));
+ memset(type_info, 0, sizeof(*type_info));
/* Get the memory & dataset datatypes */
if (NULL == (type_info->mem_type = (const H5T_t *)H5I_object_verify(mem_type_id, H5I_DATATYPE)))
@@ -1144,7 +1144,7 @@ H5D__typeinfo_init_phase2(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(io_info);
+ assert(io_info);
/* If selection I/O mode is default (auto), enable it here if the VFD supports it (it will be turned off
* later if something else conflicts), otherwise disable it. If we're using the MPIO VFD, the automatic
@@ -1232,12 +1232,12 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(io_info);
+ assert(io_info);
/* check the first dset, should exist either single or multi dset cases */
- HDassert(io_info->dsets_info[0].dset);
+ assert(io_info->dsets_info[0].dset);
dset0 = io_info->dsets_info[0].dset;
- HDassert(dset0->oloc.file);
+ assert(dset0->oloc.file);
/* Reset the actual io mode properties to the default values in case
* the DXPL (if it's non-default) was previously used in a collective
@@ -1367,7 +1367,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(io_info);
+ assert(io_info);
/* Check if we need to allocate a shared type conversion buffer */
if (io_info->max_tconv_type_size) {
@@ -1411,7 +1411,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
size_t i;
/* Make sure selection I/O is disabled (DEFAULT should have been handled by now) */
- HDassert(io_info->use_select_io == H5D_SELECTION_IO_MODE_OFF);
+ assert(io_info->use_select_io == H5D_SELECTION_IO_MODE_OFF);
/* Get max buffer size from API context */
if (H5CX_get_max_temp_buf(&max_temp_buf) < 0)
@@ -1497,11 +1497,11 @@ H5D__typeinfo_term(H5D_io_info_t *io_info)
/* Check for releasing datatype conversion & background buffers */
if (io_info->tconv_buf_allocated) {
- HDassert(io_info->tconv_buf);
+ assert(io_info->tconv_buf);
(void)H5FL_BLK_FREE(type_conv, io_info->tconv_buf);
} /* end if */
if (io_info->bkg_buf_allocated) {
- HDassert(io_info->bkg_buf);
+ assert(io_info->bkg_buf);
(void)H5FL_BLK_FREE(type_conv, io_info->bkg_buf);
} /* end if */
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 804054e..75e3d0b 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -79,7 +79,7 @@ H5D__layout_set_io_ops(const H5D_t *dataset)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(dataset);
+ assert(dataset);
/* Set the I/O functions for each layout type */
switch (dataset->shared->layout.type) {
@@ -121,7 +121,7 @@ H5D__layout_set_io_ops(const H5D_t *dataset)
case H5D_CHUNK_IDX_NTYPES:
default:
- HDassert(0 && "Unknown chunk index method!");
+ assert(0 && "Unknown chunk index method!");
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown chunk index method")
} /* end switch */
break;
@@ -167,8 +167,8 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(layout);
+ assert(f);
+ assert(layout);
ret_value = 1 + /* Version number */
1; /* layout class type */
@@ -191,7 +191,7 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
case H5D_CHUNKED:
if (layout->version < H5O_LAYOUT_VERSION_4) {
/* Number of dimensions (1 byte) */
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
ret_value++;
/* B-tree address */
@@ -205,11 +205,11 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
ret_value++;
/* Number of dimensions (1 byte) */
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
ret_value++;
/* Encoded # of bytes for each chunk dimension */
- HDassert(layout->u.chunk.enc_bytes_per_dim > 0 && layout->u.chunk.enc_bytes_per_dim <= 8);
+ assert(layout->u.chunk.enc_bytes_per_dim > 0 && layout->u.chunk.enc_bytes_per_dim <= 8);
ret_value++;
/* Dimension sizes */
@@ -295,8 +295,8 @@ H5D__layout_set_version(H5F_t *f, H5O_layout_t *layout)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(layout);
- HDassert(f);
+ assert(layout);
+ assert(f);
/* Upgrade to the version indicated by the file's low bound if higher */
version = MAX(layout->version, H5O_layout_ver_bounds[H5F_LOW_BOUND(f)]);
@@ -332,9 +332,9 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, const
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(layout);
- HDassert(space);
- HDassert(dcpl_cache);
+ assert(layout);
+ assert(space);
+ assert(dcpl_cache);
/* The indexing methods only apply to chunked datasets (currently) */
if (layout->type == H5D_CHUNKED) {
@@ -460,9 +460,9 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Sanity checking */
- HDassert(file);
- HDassert(oh);
- HDassert(dset);
+ assert(file);
+ assert(oh);
+ assert(dset);
/* Set some local variables, for convenience */
layout = &dset->shared->layout;
@@ -596,8 +596,8 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(dataset);
- HDassert(plist);
+ assert(dataset);
+ assert(plist);
/* Get the optional filters message */
if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_PLINE_ID)) < 0)
@@ -640,7 +640,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist)
} /* end if */
/* Sanity check that the layout operations are set up */
- HDassert(dataset->shared->layout.ops);
+ assert(dataset->shared->layout.ops);
/* Initialize the layout information for the dataset */
if (dataset->shared->layout.ops->init &&
@@ -697,8 +697,8 @@ H5D__layout_oh_write(const H5D_t *dataset, H5O_t *oh, unsigned update_flags)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(dataset);
- HDassert(oh);
+ assert(dataset);
+ assert(oh);
/* Check if the layout message has been added to the dataset's header */
if ((msg_exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0)
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 29410f8..921142b 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -100,7 +100,7 @@
*/
#define H5D_MPIO_INIT_CHUNK_UD_INFO(chunk_ud, index_info_ptr) \
do { \
- HDmemset(&chunk_ud, 0, sizeof(H5D_chunk_ud_t)); \
+ memset(&chunk_ud, 0, sizeof(H5D_chunk_ud_t)); \
chunk_ud.common.layout = (index_info_ptr)->layout; \
chunk_ud.common.storage = (index_info_ptr)->storage; \
} while (0)
@@ -409,8 +409,8 @@ static FILE *debug_stream = NULL;
#define H5D_MPIO_DEBUG(rank, string) \
do { \
if (debug_stream && H5D_MPIO_DEBUG_THIS_RANK(rank)) { \
- HDfprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank); \
- HDfflush(debug_stream); \
+ fprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank); \
+ fflush(debug_stream); \
} \
} while (0)
@@ -418,8 +418,8 @@ static FILE *debug_stream = NULL;
#define H5D_MPIO_DEBUG_VA(rank, string, ...) \
do { \
if (debug_stream && H5D_MPIO_DEBUG_THIS_RANK(rank)) { \
- HDfprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank, __VA_ARGS__); \
- HDfflush(debug_stream); \
+ fprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank, __VA_ARGS__); \
+ fflush(debug_stream); \
} \
} while (0)
@@ -474,7 +474,7 @@ H5D__mpio_parse_debug_str(const char *s)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(s);
+ assert(s);
while (*s) {
int c = (int)(*s);
@@ -521,10 +521,10 @@ H5D__mpio_debug_init(void)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(!H5D_mpio_debug_inited);
+ assert(!H5D_mpio_debug_inited);
/* Clear the debug flag buffer */
- HDmemset(H5D_mpio_debug_flags_s, 0, sizeof(H5D_mpio_debug_flags_s));
+ memset(H5D_mpio_debug_flags_s, 0, sizeof(H5D_mpio_debug_flags_s));
/* Retrieve and parse the H5Dmpio debug string */
debug_str = HDgetenv("H5D_mpio_Debug");
@@ -573,11 +573,11 @@ H5D__mpio_opt_possible(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
+ assert(io_info);
for (i = 0; i < io_info->count; i++) {
- HDassert(io_info->dsets_info[i].file_space);
- HDassert(io_info->dsets_info[i].mem_space);
+ assert(io_info->dsets_info[i].file_space);
+ assert(io_info->dsets_info[i].mem_space);
}
/* For independent I/O, get out quickly and don't try to form consensus */
@@ -648,7 +648,7 @@ H5D__mpio_opt_possible(H5D_io_info_t *io_info)
if ((io_info->use_select_io == H5D_SELECTION_IO_MODE_OFF) && local_cause[0] &&
!(local_cause[0] &
~((unsigned)H5D_MPIO_DATATYPE_CONVERSION | (unsigned)H5D_MPIO_DATA_TRANSFORMS))) {
- HDassert(io_info->no_selection_io_cause & H5D_MPIO_NO_SELECTION_IO_CAUSES);
+ assert(io_info->no_selection_io_cause & H5D_MPIO_NO_SELECTION_IO_CAUSES);
local_cause[0] |= H5D_MPIO_NO_SELECTION_IO;
}
@@ -718,8 +718,8 @@ H5D__mpio_opt_possible(H5D_io_info_t *io_info)
* selection I/O and re-enable collective I/O since it's supported by selection I/O */
if (global_cause[0] && !(global_cause[0] & ~((unsigned)H5D_MPIO_DATATYPE_CONVERSION |
(unsigned)H5D_MPIO_DATA_TRANSFORMS))) {
- HDassert(!(local_cause[0] &
- ~((unsigned)H5D_MPIO_DATATYPE_CONVERSION | (unsigned)H5D_MPIO_DATA_TRANSFORMS)));
+ assert(!(local_cause[0] &
+ ~((unsigned)H5D_MPIO_DATATYPE_CONVERSION | (unsigned)H5D_MPIO_DATA_TRANSFORMS)));
local_cause[0] = 0;
global_cause[0] = 0;
io_info->use_select_io = H5D_SELECTION_IO_MODE_ON;
@@ -777,7 +777,7 @@ H5D__mpio_get_no_coll_cause_strings(char *local_cause, size_t local_cause_len, c
FUNC_ENTER_PACKAGE
- HDassert((local_cause && local_cause_len > 0) || (global_cause && global_cause_len > 0));
+ assert((local_cause && local_cause_len > 0) || (global_cause && global_cause_len > 0));
/*
* Use compile-time assertion so this routine is updated
@@ -844,7 +844,7 @@ H5D__mpio_get_no_coll_cause_strings(char *local_cause, size_t local_cause_len, c
case H5D_MPIO_COLLECTIVE:
case H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE:
default:
- HDassert(0 && "invalid no collective cause reason");
+ assert(0 && "invalid no collective cause reason");
break;
}
@@ -1026,7 +1026,7 @@ H5D__mpio_get_sum_chunk_dset(const H5D_io_info_t *io_info, const H5D_dset_io_inf
/* Check for non-chunked dataset, in this case we know the number of "chunks"
* is simply the mpi size */
- HDassert(dset_info->layout->type == H5D_CHUNKED);
+ assert(dset_info->layout->type == H5D_CHUNKED);
/* Get the number of chunks to perform I/O on */
num_chunkf = 0;
@@ -1099,9 +1099,9 @@ H5D__piece_io(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(io_info);
- HDassert(io_info->using_mpi_vfd);
- HDassert(io_info->count > 0);
+ assert(io_info);
+ assert(io_info->using_mpi_vfd);
+ assert(io_info->count > 0);
/* Obtain the current rank of the process and the number of ranks */
if ((mpi_rank = H5F_mpi_get_rank(io_info->dsets_info[0].dset->oloc.file)) < 0)
@@ -1122,12 +1122,12 @@ H5D__piece_io(H5D_io_info_t *io_info)
HDsnprintf(debug_log_filename, 1024, "H5Dmpio_debug.rank%d", mpi_rank);
- if (NULL == (debug_log_file = HDfopen(debug_log_filename, "a")))
+ if (NULL == (debug_log_file = fopen(debug_log_filename, "a")))
HGOTO_ERROR(H5E_IO, H5E_OPENERROR, FAIL, "couldn't open debugging log file")
/* Print a short header for this I/O operation */
time_now = HDtime(NULL);
- HDfprintf(debug_log_file, "##### %s", HDasctime(HDlocaltime(&time_now)));
+ fprintf(debug_log_file, "##### %s", HDasctime(HDlocaltime(&time_now)));
debug_stream = debug_log_file;
}
@@ -1221,7 +1221,7 @@ H5D__piece_io(H5D_io_info_t *io_info)
}
else {
/* Chunked I/O path */
- HDassert(io_info->dsets_info[i].layout->type == H5D_CHUNKED);
+ assert(io_info->dsets_info[i].layout->type == H5D_CHUNKED);
/* Recalculate io_option if necessary */
if (recalc_io_option) {
@@ -1333,7 +1333,7 @@ done:
#ifdef H5Dmpio_DEBUG
/* Close debugging log file */
if (debug_log_file) {
- HDfprintf(debug_log_file, "##############\n\n");
+ fprintf(debug_log_file, "##############\n\n");
if (EOF == HDfclose(debug_log_file))
HDONE_ERROR(H5E_IO, H5E_CLOSEERROR, FAIL, "couldn't close debugging log file")
debug_stream = H5DEBUG(D);
@@ -1449,7 +1449,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
/* set actual_io_mode */
for (i = 0; i < io_info->count; i++) {
- HDassert(io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused == 0);
+ assert(io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused == 0);
if (io_info->dsets_info[i].layout->type == H5D_CHUNKED)
actual_io_mode |= H5D_MPIO_CHUNK_COLLECTIVE;
else if (io_info->dsets_info[i].layout->type == H5D_CONTIGUOUS)
@@ -1489,9 +1489,9 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
hbool_t need_sort = FALSE;
/* Check if sel_pieces array is sorted */
- HDassert(io_info->sel_pieces[0]->faddr != HADDR_UNDEF);
+ assert(io_info->sel_pieces[0]->faddr != HADDR_UNDEF);
for (i = 1; i < num_chunk; i++) {
- HDassert(io_info->sel_pieces[i]->faddr != HADDR_UNDEF);
+ assert(io_info->sel_pieces[i]->faddr != HADDR_UNDEF);
if (io_info->sel_pieces[i]->faddr < io_info->sel_pieces[i - 1]->faddr) {
need_sort = TRUE;
@@ -1572,7 +1572,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
/* Sanity check */
if (is_permuted)
- HDassert(permute_map);
+ assert(permute_map);
if (H5S_mpio_space_type(piece_info->mspace, piece_info->dset_info->type_info.dst_type_size,
&chunk_mtype[i], &chunk_mpi_mem_counts[i],
&(chunk_mbt_is_derived_array[i]), FALSE, /* this is a memory
@@ -1592,7 +1592,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buf type")
/* Sanity check */
if (is_permuted)
- HDassert(!permute_map);
+ assert(!permute_map);
/* Piece address relative to the first piece addr
* Assign piece address to MPI displacement
@@ -1790,7 +1790,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
FUNC_ENTER_PACKAGE_TAG(dset_info->dset->oloc.addr)
- HDassert(io_info);
+ assert(io_info);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -1837,7 +1837,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
"unable to send chunk modification data between MPI ranks")
/* Make sure the local chunk list was updated correctly */
- HDassert(chunk_list_num_entries == rank_chunks_assigned_map[mpi_rank]);
+ assert(chunk_list_num_entries == rank_chunks_assigned_map[mpi_rank]);
}
/* Proceed to update all the chunks this rank owns with its own
@@ -1989,7 +1989,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
FUNC_ENTER_PACKAGE_TAG(dset_info->dset->oloc.addr)
- HDassert(dset_info->layout->type == H5D_CHUNKED);
+ assert(dset_info->layout->type == H5D_CHUNKED);
/* Get the current I/O collective opt mode so we can restore it later */
if (H5CX_get_mpio_coll_opt(&orig_coll_opt_mode) < 0)
@@ -2000,7 +2000,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
/* Retrieve total # of chunks in dataset */
H5_CHECKED_ASSIGN(total_chunk, size_t, dset_info->layout->u.chunk.nchunks, hsize_t);
- HDassert(total_chunk != 0);
+ assert(total_chunk != 0);
/* Allocate memories */
chunk_io_option = (uint8_t *)H5MM_calloc(total_chunk);
@@ -2045,8 +2045,8 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
/* Check if this chunk is the next chunk in the skip list, if there are
* selected chunks left to process */
- HDassert(!num_chunk || next_chunk_info);
- HDassert(!num_chunk || next_chunk_info->index >= u);
+ assert(!num_chunk || next_chunk_info);
+ assert(!num_chunk || next_chunk_info->index >= u);
if (num_chunk && next_chunk_info->index == u) {
/* Next chunk is this chunk */
chunk_info = next_chunk_info;
@@ -2116,7 +2116,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
u);
#endif
- HDassert(chunk_io_option[u] == 0);
+ assert(chunk_io_option[u] == 0);
/* Set the file & memory dataspaces */
if (chunk_info) {
@@ -2266,7 +2266,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
FUNC_ENTER_PACKAGE_TAG(dset_info->dset->oloc.addr)
- HDassert(io_info);
+ assert(io_info);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -2495,7 +2495,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI rank")
#endif
- HDassert(io_info);
+ assert(io_info);
if ((file_space != NULL) && (mem_space != NULL)) {
int mpi_file_count; /* Number of file "objects" to transfer */
@@ -2505,7 +2505,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
point selection of the file space */
hbool_t is_permuted = FALSE;
- HDassert(di);
+ assert(di);
/* Obtain disk and memory MPI derived datatype */
/* NOTE: The permute_map array can be allocated within H5S_mpio_space_type
@@ -2527,7 +2527,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI file type")
/* Sanity check */
if (is_permuted)
- HDassert(permute_map);
+ assert(permute_map);
if (H5S_mpio_space_type(mem_space, di->type_info.src_type_size, &mpi_buf_type, &mpi_buf_count,
&mbt_is_derived, /* OUT: datatype created */
FALSE, /* this is a memory space, so if
@@ -2546,7 +2546,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buffer type")
/* Sanity check */
if (is_permuted)
- HDassert(!permute_map);
+ assert(!permute_map);
} /* end if */
else {
/* For non-selection, participate with a none MPI derived datatype, the count is 0. */
@@ -2875,7 +2875,7 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as
FUNC_ENTER_PACKAGE
- HDassert(di->layout->type == H5D_CHUNKED);
+ assert(di->layout->type == H5D_CHUNKED);
/* Assign the rank 0 to the root */
root = 0;
@@ -3015,7 +3015,7 @@ done:
if (mergebuf)
H5MM_free(mergebuf);
if (recv_io_mode_info) {
- HDassert(mpi_rank == root);
+ assert(mpi_rank == root);
H5MM_free(recv_io_mode_info);
} /* end if */
@@ -3051,16 +3051,16 @@ H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const
FUNC_ENTER_PACKAGE
- HDassert(io_info);
- HDassert(di);
- HDassert(chunk_list);
- HDassert(num_entries);
+ assert(io_info);
+ assert(di);
+ assert(chunk_list);
+ assert(num_entries);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
H5D_MPIO_TIME_START(mpi_rank, "Filtered Collective I/O Setup");
#endif
- HDassert(di->layout->type == H5D_CHUNKED);
+ assert(di->layout->type == H5D_CHUNKED);
/* Each rank builds a local list of the chunks they have selected */
if ((num_chunks_selected = H5SL_count(di->layout_io_info.chunk_map->dset_sel_pieces))) {
@@ -3270,9 +3270,9 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
- HDassert(mpi_size > 1); /* No chunk sharing is possible for MPI Comm size of 1 */
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
+ assert(mpi_size > 1); /* No chunk sharing is possible for MPI Comm size of 1 */
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -3413,10 +3413,10 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
FUNC_ENTER_PACKAGE
- HDassert(num_chunks_assigned_map);
- HDassert(chunk_list || 0 == num_chunks_assigned_map[mpi_rank]);
- HDassert(io_info);
- HDassert(mpi_size > 1);
+ assert(num_chunks_assigned_map);
+ assert(chunk_list || 0 == num_chunks_assigned_map[mpi_rank]);
+ assert(io_info);
+ assert(mpi_size > 1);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -3501,7 +3501,7 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
int new_chunk_owner;
/* Clear the mapping from rank value -> number of assigned chunks */
- HDmemset(num_chunks_assigned_map, 0, (size_t)mpi_size * sizeof(*num_chunks_assigned_map));
+ memset(num_chunks_assigned_map, 0, (size_t)mpi_size * sizeof(*num_chunks_assigned_map));
/* Sort collective chunk list according to chunk index */
HDqsort(coll_chunk_list, coll_chunk_list_num_entries, sizeof(H5D_chunk_redistribute_info_t),
@@ -3554,7 +3554,7 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
} while (++i < coll_chunk_list_num_entries && chunk_entry->chunk_idx == curr_chunk_idx);
/* We should never have more writers to a chunk than the number of MPI ranks */
- HDassert(num_writers <= mpi_size);
+ assert(num_writers <= mpi_size);
/* Set all processed chunk entries' "new_owner" and "num_writers" fields */
for (; set_begin_index < i; set_begin_index++) {
@@ -3749,13 +3749,13 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
FUNC_ENTER_PACKAGE
- HDassert(chunk_list_num_entries);
- HDassert(chunk_list || 0 == *chunk_list_num_entries);
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(mpi_size > 1);
- HDassert(chunk_msg_bufs);
- HDassert(chunk_msg_bufs_len);
+ assert(chunk_list_num_entries);
+ assert(chunk_list || 0 == *chunk_list_num_entries);
+ assert(io_info);
+ assert(dset_info);
+ assert(mpi_size > 1);
+ assert(chunk_msg_bufs);
+ assert(chunk_msg_bufs_len);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -3852,7 +3852,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
mod_data_p = msg_send_bufs[num_send_requests];
/* Store the chunk's index into the buffer */
- HDmemcpy(mod_data_p, &chunk_entry->index_info.chunk_idx, sizeof(hsize_t));
+ memcpy(mod_data_p, &chunk_entry->index_info.chunk_idx, sizeof(hsize_t));
mod_data_p += sizeof(hsize_t);
/* Serialize the chunk's file dataspace into the buffer */
@@ -3967,7 +3967,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
if (msg_size <= 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "invalid chunk modification message size")
- HDassert((num_recv_requests + 1) <= num_msgs_incoming);
+ assert((num_recv_requests + 1) <= num_msgs_incoming);
if (NULL ==
(msg_recv_bufs[num_recv_requests] = H5MM_malloc((size_t)msg_size * sizeof(unsigned char))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
@@ -4153,8 +4153,8 @@ H5D__mpio_collective_filtered_chunk_common_io(H5D_filtered_collective_io_info_t
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
/* Initialize temporary I/O info */
coll_io_info = *io_info;
@@ -4175,7 +4175,7 @@ H5D__mpio_collective_filtered_chunk_common_io(H5D_filtered_collective_io_info_t
*/
if (io_info->op_type == H5D_IO_OP_READ) {
for (i = 0, num_chunks = 0; i < chunk_list_num_entries; i++) {
- HDassert(chunk_list[i].buf);
+ assert(chunk_list[i].buf);
if (chunk_list[i].need_read) {
if (!H5F_addr_defined(base_read_offset))
@@ -4274,9 +4274,9 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
- HDassert(di);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
+ assert(di);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -4319,7 +4319,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
* chunk size would of course be bad.
*/
for (i = 0; i < chunk_list_num_entries; i++) {
- HDassert(chunk_list[i].need_read);
+ assert(chunk_list[i].need_read);
chunk_list[i].chunk_buf_size = MAX(chunk_list[i].chunk_current.length, file_chunk_size);
@@ -4356,7 +4356,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
if (!fb_info_init) {
hsize_t chunk_dims[H5S_MAX_RANK];
- HDassert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
+ assert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
for (size_t j = 0; j < di->dset->shared->layout.u.chunk.ndims - 1; j++)
chunk_dims[j] = (hsize_t)di->dset->shared->layout.u.chunk.dim[j];
@@ -4377,7 +4377,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
}
/* Write fill value to memory buffer */
- HDassert(fb_info.fill_buf);
+ assert(fb_info.fill_buf);
if (H5D__fill(fb_info.fill_buf, di->dset->shared->type, chunk_list[i].buf,
di->type_info.mem_type, fill_space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't fill chunk buffer with fill value")
@@ -4497,10 +4497,10 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert((chunk_msg_bufs && chunk_hash_table) || 0 == chunk_msg_bufs_len);
- HDassert(io_info);
- HDassert(di);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert((chunk_msg_bufs && chunk_hash_table) || 0 == chunk_msg_bufs_len);
+ assert(io_info);
+ assert(di);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -4509,7 +4509,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
/* Set convenience pointers */
type_info = &(di->type_info);
- HDassert(type_info);
+ assert(type_info);
if (chunk_list_num_entries) {
/* Retrieve filter settings from API context */
@@ -4547,7 +4547,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
* chunk size would of course be bad.
*/
for (i = 0; i < chunk_list_num_entries; i++) {
- HDassert(mpi_rank == chunk_list[i].new_owner);
+ assert(mpi_rank == chunk_list[i].new_owner);
chunk_list[i].chunk_buf_size = MAX(chunk_list[i].chunk_current.length, file_chunk_size);
@@ -4596,7 +4596,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
if (!fb_info_init) {
hsize_t chunk_dims[H5S_MAX_RANK];
- HDassert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
+ assert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
for (size_t j = 0; j < di->dset->shared->layout.u.chunk.ndims - 1; j++)
chunk_dims[j] = (hsize_t)di->dset->shared->layout.u.chunk.dim[j];
@@ -4619,7 +4619,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
}
/* Write fill value to memory buffer */
- HDassert(fb_info.fill_buf);
+ assert(fb_info.fill_buf);
if (H5D__fill(fb_info.fill_buf, di->dset->shared->type, chunk_list[i].buf,
type_info->mem_type, fill_space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
@@ -4670,7 +4670,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
/* Process all chunks with data from the owning rank first */
for (i = 0; i < chunk_list_num_entries; i++) {
- HDassert(mpi_rank == chunk_list[i].new_owner);
+ assert(mpi_rank == chunk_list[i].new_owner);
chunk_info = chunk_list[i].chunk_info;
@@ -4705,7 +4705,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
if (msg_ptr) {
/* Retrieve the chunk's index value */
- HDmemcpy(&chunk_idx, msg_ptr, sizeof(hsize_t));
+ memcpy(&chunk_idx, msg_ptr, sizeof(hsize_t));
msg_ptr += sizeof(hsize_t);
/* Find the chunk entry according to its chunk index */
@@ -4842,10 +4842,10 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
- HDassert(idx_info);
- HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
+ assert(idx_info);
+ assert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -4941,8 +4941,8 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
local_chunk = &chunk_list[num_local_chunks_processed];
/* Sanity check that this chunk is actually local */
- HDassert(mpi_rank == local_chunk->orig_owner);
- HDassert(mpi_rank == local_chunk->new_owner);
+ assert(mpi_rank == local_chunk->orig_owner);
+ assert(mpi_rank == local_chunk->new_owner);
local_chunk->chunk_new = coll_entry->chunk_new;
local_chunk->index_info.need_insert = need_insert;
@@ -4956,7 +4956,7 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
haddr_t curr_chunk_offset = local_chunk->chunk_new.offset;
haddr_t prev_chunk_offset = chunk_list[num_local_chunks_processed - 1].chunk_new.offset;
- HDassert(H5F_addr_defined(prev_chunk_offset) && H5F_addr_defined(curr_chunk_offset));
+ assert(H5F_addr_defined(prev_chunk_offset) && H5F_addr_defined(curr_chunk_offset));
if (curr_chunk_offset < prev_chunk_offset)
need_sort = TRUE;
}
@@ -4965,7 +4965,7 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
}
}
- HDassert(chunk_list_num_entries == num_local_chunks_processed);
+ assert(chunk_list_num_entries == num_local_chunks_processed);
/*
* Ensure this rank's local chunk list is sorted in
@@ -5032,10 +5032,10 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
- HDassert(di);
- HDassert(idx_info);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
+ assert(di);
+ assert(idx_info);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -5167,11 +5167,11 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
*/
for (size_t dbg_idx = 0; dbg_idx < chunk_list_num_entries; dbg_idx++) {
if (coll_entry->index_info.chunk_idx == chunk_list[dbg_idx].index_info.chunk_idx) {
- hbool_t coords_match = !HDmemcmp(scaled_coords, chunk_list[dbg_idx].chunk_info->scaled,
- di->dset->shared->ndims * sizeof(hsize_t));
+ hbool_t coords_match = !memcmp(scaled_coords, chunk_list[dbg_idx].chunk_info->scaled,
+ di->dset->shared->ndims * sizeof(hsize_t));
- HDassert(coords_match && "Calculated scaled coordinates for chunk didn't match "
- "chunk's actual scaled coordinates!");
+ assert(coords_match && "Calculated scaled coordinates for chunk didn't match "
+ "chunk's actual scaled coordinates!");
break;
}
}
@@ -5243,10 +5243,10 @@ H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t *
FUNC_ENTER_PACKAGE
- HDassert(contig_type);
- HDassert(contig_type_derived);
- HDassert(resized_type);
- HDassert(resized_type_derived);
+ assert(contig_type);
+ assert(contig_type_derived);
+ assert(resized_type);
+ assert(resized_type_derived);
*contig_type_derived = FALSE;
*resized_type_derived = FALSE;
@@ -5256,7 +5256,7 @@ H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t *
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description")
field_count = 5;
- HDassert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
+ assert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
/*
* Create structure type to pack chunk H5F_block_t structure
@@ -5384,10 +5384,10 @@ H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_
FUNC_ENTER_PACKAGE
- HDassert(contig_type);
- HDassert(contig_type_derived);
- HDassert(resized_type);
- HDassert(resized_type_derived);
+ assert(contig_type);
+ assert(contig_type_derived);
+ assert(resized_type);
+ assert(resized_type_derived);
*contig_type_derived = FALSE;
*resized_type_derived = FALSE;
@@ -5397,7 +5397,7 @@ H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description")
field_count = 3;
- HDassert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
+ assert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
/*
* Create structure type to pack both chunk H5F_block_t structures
@@ -5515,10 +5515,10 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig
FUNC_ENTER_PACKAGE
- HDassert(contig_type);
- HDassert(contig_type_derived);
- HDassert(resized_type);
- HDassert(resized_type_derived);
+ assert(contig_type);
+ assert(contig_type_derived);
+ assert(resized_type);
+ assert(resized_type_derived);
*contig_type_derived = FALSE;
*resized_type_derived = FALSE;
@@ -5528,7 +5528,7 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description")
field_count = 4;
- HDassert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
+ assert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
/*
* Create struct type to pack information into memory as follows:
@@ -5641,11 +5641,11 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == num_entries);
- HDassert(new_mem_type);
- HDassert(mem_type_derived);
- HDassert(new_file_type);
- HDassert(file_type_derived);
+ assert(chunk_list || 0 == num_entries);
+ assert(new_mem_type);
+ assert(mem_type_derived);
+ assert(new_file_type);
+ assert(file_type_derived);
*mem_type_derived = FALSE;
*file_type_derived = FALSE;
@@ -5745,7 +5745,7 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l
* Set the current chunk entry's offset in the file, relative to
* the first chunk entry
*/
- HDassert(H5F_addr_defined(chunk_block->offset));
+ assert(H5F_addr_defined(chunk_block->offset));
file_offset_array[chunk_count] = (MPI_Aint)(chunk_block->offset - base_offset);
/*
@@ -5753,7 +5753,7 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l
* offset in the file
*/
if (chunk_count)
- HDassert(file_offset_array[chunk_count] > file_offset_array[chunk_count - 1]);
+ assert(file_offset_array[chunk_count] > file_offset_array[chunk_count - 1]);
/* Set the current chunk entry's size for the I/O operation */
H5_CHECK_OVERFLOW(chunk_block->length, hsize_t, int);
@@ -5814,9 +5814,9 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
}
else {
- HDassert(file_offset_array);
- HDassert(length_array);
- HDassert(io_buf_array);
+ assert(file_offset_array);
+ assert(length_array);
+ assert(io_buf_array);
/* Multiple chunks - use an hindexed type for both memory and file */
@@ -5884,7 +5884,7 @@ H5D__mpio_dump_collective_filtered_chunk_list(H5D_filtered_collective_io_info_t
chunk_entry = &chunk_list[i];
- HDassert(chunk_entry->chunk_info);
+ assert(chunk_entry->chunk_info);
chunk_rank = (unsigned)H5S_GET_EXTENT_NDIMS(chunk_entry->chunk_info->fspace);
H5D_MPIO_DEBUG(mpi_rank, " {");
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index 5d24092..94ad831 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -119,14 +119,14 @@ H5D__none_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->pline->nused == 0); /* Shouldn't have filter defined on entering here */
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(idx_info->layout->max_nchunks);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr)); /* address of data shouldn't be defined */
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->pline->nused == 0); /* Shouldn't have filter defined on entering here */
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(idx_info->layout->max_nchunks);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr)); /* address of data shouldn't be defined */
/* Calculate size of max dataset chunks */
nbytes = idx_info->layout->max_nchunks * idx_info->layout->size;
@@ -160,7 +160,7 @@ H5D__none_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__none_idx_is_space_alloc() */
@@ -183,14 +183,14 @@ H5D__none_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->pline->nused == 0);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(udata);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->pline->nused == 0);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(udata);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
/* Calculate the index of this chunk */
udata->chunk_idx = H5VM_array_offset_pre((idx_info->layout->ndims - 1), idx_info->layout->max_down_chunks,
@@ -231,23 +231,23 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t ch
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(!idx_info->pline->nused);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(chunk_cb);
- HDassert(chunk_udata);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(!idx_info->pline->nused);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(chunk_cb);
+ assert(chunk_udata);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
/* Initialize generic chunk record */
- HDmemset(&chunk_rec, 0, sizeof(chunk_rec));
+ memset(&chunk_rec, 0, sizeof(chunk_rec));
chunk_rec.nbytes = idx_info->layout->size;
chunk_rec.filter_mask = 0;
ndims = idx_info->layout->ndims - 1;
- HDassert(ndims > 0);
+ assert(ndims > 0);
/* Iterate over all the chunks in the dataset's dataspace */
for (u = 0; u < idx_info->layout->nchunks && ret_value == H5_ITER_CONT; u++) {
@@ -330,13 +330,13 @@ H5D__none_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(!idx_info->pline->nused); /* Shouldn't have filter defined on entering here */
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr)); /* should be defined */
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(!idx_info->pline->nused); /* Shouldn't have filter defined on entering here */
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr)); /* should be defined */
/* chunk size * max # of chunks */
nbytes = idx_info->layout->max_nchunks * idx_info->layout->size;
@@ -369,20 +369,20 @@ H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_inf
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(!idx_info_src->pline->nused);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(H5F_addr_defined(idx_info_src->storage->idx_addr));
-
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(!idx_info_dst->pline->nused);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(!idx_info_src->pline->nused);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(H5F_addr_defined(idx_info_src->storage->idx_addr));
+
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(!idx_info_dst->pline->nused);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
/* Set copied metadata tag */
H5_BEGIN_TAG(H5AC__COPIED_TAG);
@@ -416,7 +416,7 @@ H5D__none_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t *i
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(index_size);
+ assert(index_size);
*index_size = 0;
@@ -440,7 +440,7 @@ H5D__none_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -466,10 +466,10 @@ H5D__none_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__none_idx_dump() */
diff --git a/src/H5Doh.c b/src/H5Doh.c
index 42cb543..6877f5c 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -129,7 +129,7 @@ H5O__dset_free_copy_file_udata(void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(udata);
+ assert(udata);
/* Release copy of dataset's dataspace extent, if it was set */
if (udata->src_space_extent)
@@ -174,7 +174,7 @@ H5O__dset_isa(const H5O_t *oh)
FUNC_ENTER_PACKAGE
- HDassert(oh);
+ assert(oh);
/* Datatype */
if ((exists = H5O_msg_exists_oh(oh, H5O_DTYPE_ID)) < 0)
@@ -214,7 +214,7 @@ H5O__dset_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
FUNC_ENTER_PACKAGE
- HDassert(obj_loc);
+ assert(obj_loc);
*opened_type = H5I_DATASET;
@@ -278,9 +278,9 @@ H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(crt_info);
- HDassert(obj_loc);
+ assert(f);
+ assert(crt_info);
+ assert(obj_loc);
/* Create the dataset */
if (NULL ==
@@ -364,11 +364,11 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(oh);
- HDassert(bh_info);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(oh);
+ assert(bh_info);
/* Get the layout message from the object header */
if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_LAYOUT_ID, &layout))
@@ -399,7 +399,7 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
if (exists && H5D__efl_is_space_alloc(&layout.storage)) {
/* Start with clean EFL info */
- HDmemset(&efl, 0, sizeof(efl));
+ memset(&efl, 0, sizeof(efl));
/* Get External File List message from the object header */
if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_EFL_ID, &efl))
@@ -443,8 +443,8 @@ H5O__dset_flush(void *_obj_ptr)
FUNC_ENTER_PACKAGE
- HDassert(dset);
- HDassert(&dset->oloc);
+ assert(dset);
+ assert(&dset->oloc);
/* Check that the object found is the correct type */
if (H5O_obj_type(&dset->oloc, &obj_type) < 0)
diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c
index 802544c..6f30ae6 100644
--- a/src/H5Dscatgath.c
+++ b/src/H5Dscatgath.c
@@ -105,17 +105,17 @@ H5D__scatter_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(_io_info);
- HDassert(_dset_info);
- HDassert(_dset_info->dset);
- HDassert(_dset_info->store);
- HDassert(iter);
- HDassert(nelmts > 0);
- HDassert(_buf);
+ assert(_io_info);
+ assert(_dset_info);
+ assert(_dset_info->dset);
+ assert(_dset_info->store);
+ assert(iter);
+ assert(nelmts > 0);
+ assert(_buf);
/* Set up temporary I/O info object */
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
- HDmemcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
+ memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
tmp_io_info.op_type = H5D_IO_OP_WRITE;
tmp_dset_info.buf.cvp = _buf;
tmp_io_info.dsets_info = &tmp_dset_info;
@@ -209,17 +209,17 @@ H5D__gather_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(_io_info);
- HDassert(_dset_info);
- HDassert(_dset_info->dset);
- HDassert(_dset_info->store);
- HDassert(iter);
- HDassert(nelmts > 0);
- HDassert(_buf);
+ assert(_io_info);
+ assert(_dset_info);
+ assert(_dset_info->dset);
+ assert(_dset_info->store);
+ assert(iter);
+ assert(nelmts > 0);
+ assert(_buf);
/* Set up temporary I/O info object */
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
- HDmemcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
+ memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
tmp_io_info.op_type = H5D_IO_OP_READ;
tmp_dset_info.buf.vp = _buf;
tmp_io_info.dsets_info = &tmp_dset_info;
@@ -304,10 +304,10 @@ H5D__scatter_mem(const void *_tscat_buf, H5S_sel_iter_t *iter, size_t nelmts, vo
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(tscat_buf);
- HDassert(iter);
- HDassert(nelmts > 0);
- HDassert(buf);
+ assert(tscat_buf);
+ assert(iter);
+ assert(nelmts > 0);
+ assert(buf);
/* Get info from API context */
if (H5CX_get_vec_size(&dxpl_vec_size) < 0)
@@ -389,10 +389,10 @@ H5D__gather_mem(const void *_buf, H5S_sel_iter_t *iter, size_t nelmts, void *_tg
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(buf);
- HDassert(iter);
- HDassert(nelmts > 0);
- HDassert(tgath_buf);
+ assert(buf);
+ assert(iter);
+ assert(nelmts > 0);
+ assert(tgath_buf);
/* Get info from API context */
if (H5CX_get_vec_size(&dxpl_vec_size) < 0)
@@ -468,11 +468,11 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->mem_space);
- HDassert(dset_info->file_space);
- HDassert(dset_info->buf.vp);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->mem_space);
+ assert(dset_info->file_space);
+ assert(dset_info->buf.vp);
/* Set buf pointer */
buf = dset_info->buf.vp;
@@ -506,7 +506,7 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
size_t n; /* Elements operated on */
/* Go figure out how many elements to read from the file */
- HDassert(H5S_SELECT_ITER_NELMTS(file_iter) == (dset_info->nelmts - smine_start));
+ assert(H5S_SELECT_ITER_NELMTS(file_iter) == (dset_info->nelmts - smine_start));
smine_nelmts = (size_t)MIN(dset_info->type_info.request_nelmts, (dset_info->nelmts - smine_start));
/*
@@ -613,11 +613,11 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->mem_space);
- HDassert(dset_info->file_space);
- HDassert(dset_info->buf.vp);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->mem_space);
+ assert(dset_info->file_space);
+ assert(dset_info->buf.vp);
/* Set buf pointer */
buf = dset_info->buf.cvp;
@@ -652,7 +652,7 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
size_t n; /* Elements operated on */
/* Go figure out how many elements to read from the file */
- HDassert(H5S_SELECT_ITER_NELMTS(file_iter) == (dset_info->nelmts - smine_start));
+ assert(H5S_SELECT_ITER_NELMTS(file_iter) == (dset_info->nelmts - smine_start));
smine_nelmts = (size_t)MIN(dset_info->type_info.request_nelmts, (dset_info->nelmts - smine_start));
/*
@@ -755,13 +755,13 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(io_info->count > 0);
- HDassert(io_info->mem_spaces || io_info->pieces_added == 0);
- HDassert(io_info->file_spaces || io_info->pieces_added == 0);
- HDassert(io_info->addrs || io_info->pieces_added == 0);
- HDassert(io_info->element_sizes || io_info->pieces_added == 0);
- HDassert(io_info->rbufs || io_info->pieces_added == 0);
+ assert(io_info);
+ assert(io_info->count > 0);
+ assert(io_info->mem_spaces || io_info->pieces_added == 0);
+ assert(io_info->file_spaces || io_info->pieces_added == 0);
+ assert(io_info->addrs || io_info->pieces_added == 0);
+ assert(io_info->element_sizes || io_info->pieces_added == 0);
+ assert(io_info->rbufs || io_info->pieces_added == 0);
/* Allocate list of buffers (within the tconv buf) */
if (NULL == (tmp_bufs = H5MM_malloc(io_info->pieces_added * sizeof(void *))))
@@ -782,7 +782,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
for (i = 0; i < io_info->pieces_added; i++) {
H5D_dset_io_info_t *dset_info = io_info->sel_pieces[i]->dset_info;
- HDassert(io_info->sel_pieces[i]->piece_points > 0);
+ assert(io_info->sel_pieces[i]->piece_points > 0);
/* Check if this piece is involved in type conversion */
if (dset_info->type_info.is_xform_noop && dset_info->type_info.is_conv_noop) {
@@ -794,7 +794,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
/* Create block memory space */
if (NULL ==
(tmp_mem_spaces[i] = H5S_create_simple(1, &io_info->sel_pieces[i]->piece_points, NULL))) {
- HDmemset(&tmp_mem_spaces[i], 0, (io_info->pieces_added - i) * sizeof(tmp_mem_spaces[0]));
+ memset(&tmp_mem_spaces[i], 0, (io_info->pieces_added - i) * sizeof(tmp_mem_spaces[0]));
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create simple memory dataspace")
}
@@ -808,7 +808,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
tconv_bytes_used +=
io_info->sel_pieces[i]->piece_points *
MAX(dset_info->type_info.src_type_size, dset_info->type_info.dst_type_size);
- HDassert(tconv_bytes_used <= io_info->tconv_buf_size);
+ assert(tconv_bytes_used <= io_info->tconv_buf_size);
}
/* Fill background buffer here unless we will use H5D__compound_opt_read(). Must do this before
@@ -816,18 +816,18 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
if (!H5D__SCATGATH_USE_CMPD_OPT_READ(dset_info, io_info->sel_pieces[i])) {
/* Check for background buffer */
if (dset_info->type_info.need_bkg) {
- HDassert(io_info->bkg_buf);
+ assert(io_info->bkg_buf);
/* Calculate background buffer position */
tmp_bkg_buf = io_info->bkg_buf + bkg_bytes_used;
bkg_bytes_used +=
io_info->sel_pieces[i]->piece_points * dset_info->type_info.dst_type_size;
- HDassert(bkg_bytes_used <= io_info->bkg_buf_size);
+ assert(bkg_bytes_used <= io_info->bkg_buf_size);
/* Gather data from read buffer to background buffer if necessary */
if (H5T_BKG_YES == dset_info->type_info.need_bkg) {
/* Initialize memory iterator */
- HDassert(!mem_iter_init);
+ assert(!mem_iter_init);
if (H5S_select_iter_init(mem_iter, io_info->mem_spaces[i],
dset_info->type_info.dst_type_size, 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
@@ -841,7 +841,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "mem gather failed")
/* Reset selection iterator */
- HDassert(mem_iter_init);
+ assert(mem_iter_init);
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
mem_iter_init = FALSE;
@@ -864,14 +864,14 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
for (i = 0; i < io_info->pieces_added; i++) {
H5D_dset_io_info_t *dset_info = io_info->sel_pieces[i]->dset_info;
- HDassert(tmp_mem_spaces[i]);
+ assert(tmp_mem_spaces[i]);
/* Check if this piece is involved in type conversion */
if (tmp_mem_spaces[i] != io_info->mem_spaces[i]) {
H5_CHECK_OVERFLOW(io_info->sel_pieces[i]->piece_points, hsize_t, size_t);
/* Initialize memory iterator */
- HDassert(!mem_iter_init);
+ assert(!mem_iter_init);
if (H5S_select_iter_init(mem_iter, io_info->mem_spaces[i], dset_info->type_info.dst_type_size,
0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
@@ -890,13 +890,13 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
else {
/* Check for background buffer */
if (dset_info->type_info.need_bkg) {
- HDassert(io_info->bkg_buf);
+ assert(io_info->bkg_buf);
/* Calculate background buffer position */
tmp_bkg_buf = io_info->bkg_buf + bkg_bytes_used;
bkg_bytes_used +=
io_info->sel_pieces[i]->piece_points * dset_info->type_info.dst_type_size;
- HDassert(bkg_bytes_used <= io_info->bkg_buf_size);
+ assert(bkg_bytes_used <= io_info->bkg_buf_size);
}
/*
@@ -930,7 +930,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
}
/* Release selection iterator */
- HDassert(mem_iter_init);
+ assert(mem_iter_init);
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
mem_iter_init = FALSE;
@@ -992,13 +992,13 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(io_info->count > 0);
- HDassert(io_info->mem_spaces || io_info->pieces_added == 0);
- HDassert(io_info->file_spaces || io_info->pieces_added == 0);
- HDassert(io_info->addrs || io_info->pieces_added == 0);
- HDassert(io_info->element_sizes || io_info->pieces_added == 0);
- HDassert(io_info->wbufs || io_info->pieces_added == 0);
+ assert(io_info);
+ assert(io_info->count > 0);
+ assert(io_info->mem_spaces || io_info->pieces_added == 0);
+ assert(io_info->file_spaces || io_info->pieces_added == 0);
+ assert(io_info->addrs || io_info->pieces_added == 0);
+ assert(io_info->element_sizes || io_info->pieces_added == 0);
+ assert(io_info->wbufs || io_info->pieces_added == 0);
/* Allocate list of buffers (within the tconv buf) */
if (NULL == (write_bufs = (const void **)H5MM_malloc(io_info->pieces_added * sizeof(const void *))))
@@ -1019,7 +1019,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
for (i = 0; i < io_info->pieces_added; i++) {
H5D_dset_io_info_t *dset_info = io_info->sel_pieces[i]->dset_info;
- HDassert(io_info->sel_pieces[i]->piece_points > 0);
+ assert(io_info->sel_pieces[i]->piece_points > 0);
/* Check if this piece is involved in type conversion */
if (dset_info->type_info.is_xform_noop && dset_info->type_info.is_conv_noop) {
@@ -1035,7 +1035,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
H5_CHECK_OVERFLOW(io_info->sel_pieces[i]->piece_points, hsize_t, size_t);
/* Initialize memory iterator */
- HDassert(!mem_iter_init);
+ assert(!mem_iter_init);
if (H5S_select_iter_init(mem_iter, io_info->mem_spaces[i], dset_info->type_info.src_type_size,
0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
@@ -1064,7 +1064,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
tconv_bytes_used +=
io_info->sel_pieces[i]->piece_points *
MAX(dset_info->type_info.src_type_size, dset_info->type_info.dst_type_size);
- HDassert(tconv_bytes_used <= io_info->tconv_buf_size);
+ assert(tconv_bytes_used <= io_info->tconv_buf_size);
/* Gather data from application buffer into the datatype conversion buffer */
if ((size_t)io_info->sel_pieces[i]->piece_points !=
@@ -1098,22 +1098,22 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
else {
/* Check for background buffer */
if (dset_info->type_info.need_bkg) {
- HDassert(io_info->bkg_buf);
+ assert(io_info->bkg_buf);
/* Calculate background buffer position */
tmp_bkg_buf = io_info->bkg_buf + bkg_bytes_used;
bkg_bytes_used +=
io_info->sel_pieces[i]->piece_points * dset_info->type_info.dst_type_size;
- HDassert(bkg_bytes_used <= io_info->bkg_buf_size);
+ assert(bkg_bytes_used <= io_info->bkg_buf_size);
}
/* Set up background buffer read operation if necessary */
if (H5T_BKG_YES == dset_info->type_info.need_bkg) {
- HDassert(io_info->must_fill_bkg);
+ assert(io_info->must_fill_bkg);
/* Allocate arrays of parameters for selection read to background buffer if necessary */
if (!bkg_mem_spaces) {
- HDassert(!bkg_file_spaces && !bkg_addrs && !bkg_element_sizes && !bkg_bufs);
+ assert(!bkg_file_spaces && !bkg_addrs && !bkg_element_sizes && !bkg_bufs);
if (NULL == (bkg_mem_spaces = H5MM_malloc(io_info->pieces_added * sizeof(H5S_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"memory allocation failed for memory space list")
@@ -1133,7 +1133,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
/* Use same (block) memory space, file space, address, and element size as write operation
*/
- HDassert(bkg_mem_spaces && bkg_file_spaces && bkg_addrs && bkg_element_sizes && bkg_bufs);
+ assert(bkg_mem_spaces && bkg_file_spaces && bkg_addrs && bkg_element_sizes && bkg_bufs);
bkg_mem_spaces[bkg_pieces] = write_mem_spaces[i];
bkg_file_spaces[bkg_pieces] = io_info->file_spaces[i];
bkg_addrs[bkg_pieces] = io_info->addrs[i];
@@ -1175,14 +1175,14 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
}
/* Release selection iterator */
- HDassert(mem_iter_init);
+ assert(mem_iter_init);
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
mem_iter_init = FALSE;
}
}
- HDassert(spaces_added == io_info->pieces_added);
+ assert(spaces_added == io_info->pieces_added);
/* Gather data to background buffer if necessary */
if (io_info->must_fill_bkg) {
@@ -1224,7 +1224,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
/*
* Perform datatype conversion.
*/
- HDassert(j < bkg_pieces);
+ assert(j < bkg_pieces);
if (H5T_convert(dset_info->type_info.tpath, dset_info->type_info.src_type_id,
dset_info->type_info.dst_type_id,
(size_t)io_info->sel_pieces[i]->piece_points, (size_t)0, (size_t)0,
@@ -1236,7 +1236,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
}
}
- HDassert(j == bkg_pieces);
+ assert(j == bkg_pieces);
}
/* Write data to disk */
@@ -1260,7 +1260,7 @@ done:
/* Clear and free write_mem_spaces */
if (write_mem_spaces) {
for (i = 0; i < spaces_added; i++) {
- HDassert(write_mem_spaces[i]);
+ assert(write_mem_spaces[i]);
if (write_mem_spaces[i] != io_info->mem_spaces[i] && H5S_close(write_mem_spaces[i]) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "Can't close dataspace")
}
@@ -1331,13 +1331,13 @@ H5D__compound_opt_read(size_t nelmts, H5S_sel_iter_t *iter, const H5D_type_info_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(nelmts > 0);
- HDassert(iter);
- HDassert(type_info);
- HDassert(type_info->cmpd_subset);
- HDassert(H5T_SUBSET_SRC == type_info->cmpd_subset->subset ||
- H5T_SUBSET_DST == type_info->cmpd_subset->subset);
- HDassert(user_buf);
+ assert(nelmts > 0);
+ assert(iter);
+ assert(type_info);
+ assert(type_info->cmpd_subset);
+ assert(H5T_SUBSET_SRC == type_info->cmpd_subset->subset ||
+ H5T_SUBSET_DST == type_info->cmpd_subset->subset);
+ assert(user_buf);
/* Get info from API context */
if (H5CX_get_vec_size(&dxpl_vec_size) < 0)
@@ -1455,8 +1455,8 @@ H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info, uint8_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(nelmts > 0);
- HDassert(type_info);
+ assert(nelmts > 0);
+ assert(type_info);
/* Initialize values for loop */
src_stride = type_info->src_type_size;
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index 924104e..dfc8557 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -99,10 +99,10 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info->dset);
- HDassert(dset_info->store);
- HDassert(dset_info->buf.vp);
+ assert(io_info);
+ assert(dset_info->dset);
+ assert(dset_info->store);
+ assert(dset_info->buf.vp);
if (elmt_size == 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "invalid elmt_size of 0")
@@ -138,7 +138,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
} /* end if */
else {
- HDassert(io_info->op_type == H5D_IO_OP_WRITE);
+ assert(io_info->op_type == H5D_IO_OP_WRITE);
if ((tmp_file_len = (*dset_info->layout_ops.writevv)(
io_info, dset_info, file_nseq, &curr_file_seq, &single_file_len, &single_file_off,
mem_nseq, &curr_mem_seq, &single_mem_len, &single_mem_off)) < 0)
@@ -146,7 +146,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
} /* end else */
/* Decrement number of elements left to process */
- HDassert(((size_t)tmp_file_len % elmt_size) == 0);
+ assert(((size_t)tmp_file_len % elmt_size) == 0);
} /* end if */
else {
size_t mem_nelem; /* Number of elements used in memory sequences */
@@ -223,7 +223,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
} /* end if */
else {
- HDassert(io_info->op_type == H5D_IO_OP_WRITE);
+ assert(io_info->op_type == H5D_IO_OP_WRITE);
if ((tmp_file_len = (*dset_info->layout_ops.writevv)(
io_info, dset_info, file_nseq, &curr_file_seq, file_len, file_off, mem_nseq,
&curr_mem_seq, mem_len, mem_off)) < 0)
@@ -231,7 +231,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
} /* end else */
/* Decrement number of elements left to process */
- HDassert(((size_t)tmp_file_len % elmt_size) == 0);
+ assert(((size_t)tmp_file_len % elmt_size) == 0);
nelmts -= ((size_t)tmp_file_len / elmt_size);
} /* end while */
} /* end else */
@@ -299,10 +299,10 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dst_buf);
- HDassert(dst_space);
- HDassert(src_buf);
- HDassert(src_space);
+ assert(dst_buf);
+ assert(dst_space);
+ assert(src_buf);
+ assert(src_space);
if (elmt_size == 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "invalid elmt_size of 0")
@@ -333,7 +333,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s
src_nseq, &curr_src_seq, &single_src_len, &single_src_off)) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed")
- HDassert(((size_t)bytes_copied % elmt_size) == 0);
+ assert(((size_t)bytes_copied % elmt_size) == 0);
}
else {
unsigned sel_iter_flags = H5S_SEL_ITER_GET_SEQ_LIST_SORTED | H5S_SEL_ITER_SHARE_WITH_DATASPACE;
@@ -409,7 +409,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed")
/* Decrement number of elements left to process */
- HDassert(((size_t)bytes_copied % elmt_size) == 0);
+ assert(((size_t)bytes_copied % elmt_size) == 0);
nelmts -= ((size_t)bytes_copied / elmt_size);
}
}
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index f845074..23b24c5 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -118,11 +118,11 @@ H5D__single_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
if (idx_info->pline->nused) {
idx_info->layout->flags |= H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER;
@@ -156,19 +156,19 @@ H5D__single_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(idx_info->layout->max_nchunks == idx_info->layout->nchunks);
- HDassert(idx_info->layout->nchunks == 1);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(idx_info->layout->max_nchunks == idx_info->layout->nchunks);
+ assert(idx_info->layout->nchunks == 1);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
if (idx_info->pline->nused)
- HDassert(idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER);
+ assert(idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER);
else
- HDassert(!(idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER));
+ assert(!(idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__single_idx_create() */
@@ -190,7 +190,7 @@ H5D__single_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__single_idx_is_space_alloc() */
@@ -214,17 +214,17 @@ H5D__single_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(idx_info->layout->nchunks == 1);
- HDassert(idx_info->layout->max_nchunks == 1);
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(idx_info->layout->nchunks == 1);
+ assert(idx_info->layout->max_nchunks == 1);
+ assert(udata);
/* Set the address for the chunk */
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(H5F_addr_defined(udata->chunk_block.offset));
idx_info->storage->idx_addr = udata->chunk_block.offset;
if (idx_info->pline->nused > 0) {
@@ -260,14 +260,14 @@ H5D__single_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(idx_info->layout->nchunks == 1);
- HDassert(idx_info->layout->max_nchunks == 1);
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(idx_info->layout->nchunks == 1);
+ assert(idx_info->layout->max_nchunks == 1);
+ assert(udata);
udata->chunk_block.offset = idx_info->storage->idx_addr;
if (idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
@@ -304,17 +304,17 @@ H5D__single_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(chunk_cb);
- HDassert(chunk_udata);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(chunk_cb);
+ assert(chunk_udata);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
/* Initialize generic chunk record */
- HDmemset(&chunk_rec, 0, sizeof(chunk_rec));
+ memset(&chunk_rec, 0, sizeof(chunk_rec));
chunk_rec.chunk_addr = idx_info->storage->idx_addr;
if (idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
@@ -353,12 +353,12 @@ H5D__single_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
if (idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER)
nbytes = idx_info->storage->u.single.nbytes;
@@ -394,16 +394,16 @@ H5D__single_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
if (H5F_addr_defined(idx_info->storage->idx_addr))
ret_value = H5D__single_idx_remove(idx_info, NULL);
else
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__single_idx_delete() */
@@ -428,18 +428,18 @@ H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_i
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(H5F_addr_defined(idx_info_src->storage->idx_addr));
-
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(H5F_addr_defined(idx_info_src->storage->idx_addr));
+
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
/* Set copied metadata tag */
H5_BEGIN_TAG(H5AC__COPIED_TAG);
@@ -473,7 +473,7 @@ H5D__single_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(index_size);
+ assert(index_size);
*index_size = 0;
@@ -497,7 +497,7 @@ H5D__single_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -523,10 +523,10 @@ H5D__single_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__single_idx_dump() */
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index 1d9d2ca..d6e57c1 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -122,7 +122,7 @@ H5D__layout_contig_size_test(hid_t did, hsize_t *size)
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
if (size) {
- HDassert(dset->shared->layout.type == H5D_CONTIGUOUS);
+ assert(dset->shared->layout.type == H5D_CONTIGUOUS);
*size = dset->shared->layout.storage.u.contig.size;
} /* end if */
@@ -162,7 +162,7 @@ H5D__layout_compact_dirty_test(hid_t did, hbool_t *dirty)
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
if (dirty) {
- HDassert(dset->shared->layout.type == H5D_COMPACT);
+ assert(dset->shared->layout.type == H5D_COMPACT);
*dirty = dset->shared->layout.storage.u.compact.dirty;
} /* end if */
@@ -197,7 +197,7 @@ H5D__layout_type_test(hid_t did, H5D_layout_t *layout_type)
FUNC_ENTER_PACKAGE
- HDassert(layout_type);
+ assert(layout_type);
/* Check args */
if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET)))
@@ -282,12 +282,12 @@ H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
if (nbytes_used) {
- HDassert(dset->shared->layout.type == H5D_CHUNKED);
+ assert(dset->shared->layout.type == H5D_CHUNKED);
*nbytes_used = dset->shared->cache.chunk.nbytes_used;
} /* end if */
if (nused) {
- HDassert(dset->shared->layout.type == H5D_CHUNKED);
+ assert(dset->shared->layout.type == H5D_CHUNKED);
*nused = dset->shared->cache.chunk.nused;
} /* end if */
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 6695c02..8958918 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -320,9 +320,9 @@ H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(layout);
- HDassert(layout->type == H5D_VIRTUAL);
- HDassert(idx < virt->list_nalloc);
+ assert(layout);
+ assert(layout->type == H5D_VIRTUAL);
+ assert(idx < virt->list_nalloc);
/* Get type of selection */
if (H5S_SEL_ERROR == (sel_type = H5S_GET_SELECT_TYPE(ent->source_dset.virtual_select)))
@@ -373,9 +373,9 @@ H5D_virtual_check_min_dims(const H5D_t *dset)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(dset->shared->layout.type == H5D_VIRTUAL);
+ assert(dset);
+ assert(dset->shared);
+ assert(dset->shared->layout.type == H5D_VIRTUAL);
/* Get rank of dataspace */
if ((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0)
@@ -429,9 +429,9 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(f);
- HDassert(layout);
- HDassert(virt->serial_list_hobjid.addr == HADDR_UNDEF);
+ assert(f);
+ assert(layout);
+ assert(virt->serial_list_hobjid.addr == HADDR_UNDEF);
/* Create block if # of used entries > 0 */
if (virt->list_nused > 0) {
@@ -455,10 +455,10 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout)
H5O_storage_virtual_ent_t *ent = &virt->list[i];
hssize_t select_serial_size; /* Size of serialized selection */
- HDassert(ent->source_file_name);
- HDassert(ent->source_dset_name);
- HDassert(ent->source_select);
- HDassert(ent->source_dset.virtual_select);
+ assert(ent->source_file_name);
+ assert(ent->source_dset_name);
+ assert(ent->source_select);
+ assert(ent->source_dset.virtual_select);
/* Source file name */
str_size[2 * i] = HDstrlen(ent->source_file_name) + (size_t)1;
@@ -562,8 +562,8 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
FUNC_ENTER_PACKAGE
- HDassert(layout);
- HDassert(layout->type == H5D_VIRTUAL);
+ assert(layout);
+ assert(layout->type == H5D_VIRTUAL);
/* Save original entry list and top-level property lists and reset in layout
* so the originals aren't closed on error */
@@ -576,7 +576,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
/* Copy entry list */
if (virt->list_nused > 0) {
- HDassert(orig_list);
+ assert(orig_list);
/* Allocate memory for the list */
if (NULL == (virt->list = H5MM_calloc(virt->list_nused * sizeof(virt->list[0]))))
@@ -630,8 +630,8 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
else if (orig_list[i].parsed_source_file_name &&
(orig_list[i].source_dset.file_name !=
orig_list[i].parsed_source_file_name->name_segment)) {
- HDassert(ent->parsed_source_file_name);
- HDassert(ent->parsed_source_file_name->name_segment);
+ assert(ent->parsed_source_file_name);
+ assert(ent->parsed_source_file_name->name_segment);
ent->source_dset.file_name = ent->parsed_source_file_name->name_segment;
} /* end if */
else if (NULL ==
@@ -644,8 +644,8 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
else if (orig_list[i].parsed_source_dset_name &&
(orig_list[i].source_dset.dset_name !=
orig_list[i].parsed_source_dset_name->name_segment)) {
- HDassert(ent->parsed_source_dset_name);
- HDassert(ent->parsed_source_dset_name->name_segment);
+ assert(ent->parsed_source_dset_name);
+ assert(ent->parsed_source_dset_name->name_segment);
ent->source_dset.dset_name = ent->parsed_source_dset_name->name_segment;
} /* end if */
else if (NULL ==
@@ -721,8 +721,8 @@ H5D__virtual_reset_layout(H5O_layout_t *layout)
FUNC_ENTER_PACKAGE
- HDassert(layout);
- HDassert(layout->type == H5D_VIRTUAL);
+ assert(layout);
+ assert(layout->type == H5D_VIRTUAL);
/* Free the list entries. Note we always attempt to free everything even in
* the case of a failure. Because of this, and because we free the list
@@ -759,7 +759,7 @@ H5D__virtual_reset_layout(H5O_layout_t *layout)
virt->list = H5MM_xfree(virt->list);
virt->list_nalloc = (size_t)0;
virt->list_nused = (size_t)0;
- (void)HDmemset(virt->min_dims, 0, sizeof(virt->min_dims));
+ (void)memset(virt->min_dims, 0, sizeof(virt->min_dims));
/* Close access property lists */
if (virt->source_fapl >= 0) {
@@ -846,9 +846,9 @@ H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(storage);
- HDassert(storage->type == H5D_VIRTUAL);
+ assert(f);
+ assert(storage);
+ assert(storage->type == H5D_VIRTUAL);
/* Check for global heap block */
if (storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF) {
@@ -894,11 +894,11 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(vdset);
- HDassert(source_dset);
- HDassert(!source_dset->dset);
- HDassert(source_dset->file_name);
- HDassert(source_dset->dset_name);
+ assert(vdset);
+ assert(source_dset);
+ assert(!source_dset->dset);
+ assert(source_dset->file_name);
+ assert(source_dset->dset_name);
/* Check if we need to open the source file */
if (HDstrcmp(source_dset->file_name, ".") != 0) {
@@ -986,7 +986,7 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(source_dset);
+ assert(source_dset);
/* Free dataset */
if (source_dset->dset) {
@@ -1000,20 +1000,20 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent,
(source_dset->file_name != virtual_ent->parsed_source_file_name->name_segment))
source_dset->file_name = (char *)H5MM_xfree(source_dset->file_name);
else
- HDassert((source_dset->file_name == virtual_ent->source_file_name) ||
- (virtual_ent->parsed_source_file_name &&
- (source_dset->file_name == virtual_ent->parsed_source_file_name->name_segment)) ||
- !source_dset->file_name);
+ assert((source_dset->file_name == virtual_ent->source_file_name) ||
+ (virtual_ent->parsed_source_file_name &&
+ (source_dset->file_name == virtual_ent->parsed_source_file_name->name_segment)) ||
+ !source_dset->file_name);
/* Free dataset name */
if (virtual_ent->parsed_source_dset_name &&
(source_dset->dset_name != virtual_ent->parsed_source_dset_name->name_segment))
source_dset->dset_name = (char *)H5MM_xfree(source_dset->dset_name);
else
- HDassert((source_dset->dset_name == virtual_ent->source_dset_name) ||
- (virtual_ent->parsed_source_dset_name &&
- (source_dset->dset_name == virtual_ent->parsed_source_dset_name->name_segment)) ||
- !source_dset->dset_name);
+ assert((source_dset->dset_name == virtual_ent->source_dset_name) ||
+ (virtual_ent->parsed_source_dset_name &&
+ (source_dset->dset_name == virtual_ent->parsed_source_dset_name->name_segment)) ||
+ !source_dset->dset_name);
/* Free clipped virtual selection */
if (source_dset->clipped_virtual_select) {
@@ -1040,7 +1040,7 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent,
/* The projected memory space should never exist when this function is
* called */
- HDassert(!source_dset->projected_mem_space);
+ assert(!source_dset->projected_mem_space);
/* Note the lack of a done: label. This is because there are no HGOTO_ERROR
* calls. If one is added, a done: label must also be added */
@@ -1068,17 +1068,17 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, s
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(src);
- HDassert(src_len > 0);
- HDassert(p);
- HDassert(buf);
- HDassert(*p >= *buf);
- HDassert(buf_size);
+ assert(src);
+ assert(src_len > 0);
+ assert(p);
+ assert(buf);
+ assert(*p >= *buf);
+ assert(buf_size);
/* Allocate or extend buffer if necessary */
if (!*buf) {
- HDassert(!*p);
- HDassert(*buf_size == 0);
+ assert(!*p);
+ assert(*buf_size == 0);
/* Allocate buffer */
if (NULL == (*buf = (char *)H5MM_malloc(src_len + (size_t)1)))
@@ -1150,10 +1150,10 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(source_name);
- HDassert(parsed_name);
- HDassert(static_strlen);
- HDassert(nsubs);
+ assert(source_name);
+ assert(parsed_name);
+ assert(static_strlen);
+ assert(nsubs);
/* Initialize p and tmp_static_strlen */
p = source_name;
@@ -1163,7 +1163,7 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_
/* Note this will not work with UTF-8! We should support this eventually
* -NAF 5/18/2015 */
while ((pct = HDstrchr(p, '%'))) {
- HDassert(pct >= p);
+ assert(pct >= p);
/* Allocate name segment struct if necessary */
if (!*tmp_parsed_name_p)
@@ -1204,11 +1204,11 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_
/* Copy last segment of name, if any, unless the parsed name was not
* allocated */
if (tmp_parsed_name) {
- HDassert(p >= source_name);
+ assert(p >= source_name);
if (*p == '\0')
- HDassert((size_t)(p - source_name) == tmp_strlen);
+ assert((size_t)(p - source_name) == tmp_strlen);
else {
- HDassert((size_t)(p - source_name) < tmp_strlen);
+ assert((size_t)(p - source_name) < tmp_strlen);
/* Allocate name segment struct if necessary */
if (!*tmp_parsed_name_p)
@@ -1230,7 +1230,7 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_
done:
if (tmp_parsed_name) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
H5D_virtual_free_parsed_name(tmp_parsed_name);
} /* end if */
@@ -1260,7 +1260,7 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, H5O_storage_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dst);
+ assert(dst);
/* Walk over parsed name, duplicating it */
while (p_src) {
@@ -1285,7 +1285,7 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, H5O_storage_
done:
if (tmp_dst) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
H5D_virtual_free_parsed_name(tmp_dst);
} /* end if */
@@ -1345,8 +1345,8 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(source_name);
- HDassert(built_name);
+ assert(source_name);
+ assert(built_name);
/* Check for static name */
if (nsubs == 0) {
@@ -1365,7 +1365,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
size_t seg_len;
size_t nsubs_rem = nsubs;
- HDassert(parsed_name);
+ assert(parsed_name);
/* Calculate length of printed block number */
do {
@@ -1388,8 +1388,8 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
/* Add name segment */
if (name_seg->name_segment) {
seg_len = HDstrlen(name_seg->name_segment);
- HDassert(seg_len > 0);
- HDassert(seg_len < name_len_rem);
+ assert(seg_len > 0);
+ assert(seg_len < name_len_rem);
HDstrncpy(p, name_seg->name_segment, name_len_rem);
name_len_rem -= seg_len;
p += seg_len;
@@ -1397,7 +1397,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
/* Add block number */
if (nsubs_rem > 0) {
- HDassert(blockno_len < name_len_rem);
+ assert(blockno_len < name_len_rem);
if (HDsnprintf(p, name_len_rem, "%llu", (long long unsigned)blockno) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write block number to string")
name_len_rem -= blockno_len;
@@ -1416,7 +1416,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
done:
if (tmp_name) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
H5MM_free(tmp_name);
} /* end if */
@@ -1453,10 +1453,10 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
- HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL);
+ assert(dset);
+ assert(dset->shared->layout.storage.type == H5D_VIRTUAL);
storage = &dset->shared->layout.storage.u.virt;
- HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
+ assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
/* Get rank of VDS */
if ((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0)
@@ -1518,8 +1518,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Close previous clipped virtual selection, if
* any */
if (storage->list[i].source_dset.clipped_virtual_select) {
- HDassert(storage->list[i].source_dset.clipped_virtual_select !=
- storage->list[i].source_dset.virtual_select);
+ assert(storage->list[i].source_dset.clipped_virtual_select !=
+ storage->list[i].source_dset.virtual_select);
if (H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped virtual dataspace")
@@ -1541,8 +1541,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Close previous clipped source selection, if any
*/
if (storage->list[i].source_dset.clipped_source_select) {
- HDassert(storage->list[i].source_dset.clipped_source_select !=
- storage->list[i].source_select);
+ assert(storage->list[i].source_dset.clipped_source_select !=
+ storage->list[i].source_select);
if (H5S_close(storage->list[i].source_dset.clipped_source_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped source dataspace")
@@ -1576,7 +1576,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
0; /* First missing dataset in the current block of missing datasets */
/* Search for source datasets */
- HDassert(storage->printf_gap != HSIZE_UNDEF);
+ assert(storage->printf_gap != HSIZE_UNDEF);
for (j = 0; j <= (storage->printf_gap + first_missing); j++) {
/* Check for running out of space in sub_dset array */
if (j >= (hsize_t)storage->list[i].sub_dset_nalloc) {
@@ -1602,9 +1602,9 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
storage->list[i].sub_dset = tmp_sub_dset;
/* Clear new space in sub_dset */
- (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
- storage->list[i].sub_dset_nalloc *
- sizeof(H5O_storage_virtual_srcdset_t));
+ (void)memset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
+ storage->list[i].sub_dset_nalloc *
+ sizeof(H5O_storage_virtual_srcdset_t));
/* Update sub_dset_nalloc */
storage->list[i].sub_dset_nalloc *= 2;
@@ -1766,8 +1766,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Non-printf mapping */
/* Close previous clipped virtual selection, if any */
if (storage->list[i].source_dset.clipped_virtual_select) {
- HDassert(storage->list[i].source_dset.clipped_virtual_select !=
- storage->list[i].source_dset.virtual_select);
+ assert(storage->list[i].source_dset.clipped_virtual_select !=
+ storage->list[i].source_dset.virtual_select);
if (H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped virtual dataspace")
@@ -1793,8 +1793,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
if (clip_size != storage->list[i].clip_size_source) {
/* Close previous clipped source selection, if any */
if (storage->list[i].source_dset.clipped_source_select) {
- HDassert(storage->list[i].source_dset.clipped_source_select !=
- storage->list[i].source_select);
+ assert(storage->list[i].source_dset.clipped_source_select !=
+ storage->list[i].source_select);
if (H5S_close(storage->list[i].source_dset.clipped_source_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped source dataspace")
@@ -1896,7 +1896,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
} /* end if */
else
- HDassert(!storage->list[i].sub_dset[j].clipped_virtual_select);
+ assert(!storage->list[i].sub_dset[j].clipped_virtual_select);
} /* end for */
} /* end if */
@@ -1935,10 +1935,10 @@ H5D__virtual_init_all(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
- HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL);
+ assert(dset);
+ assert(dset->shared->layout.storage.type == H5D_VIRTUAL);
storage = &dset->shared->layout.storage.u.virt;
- HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
+ assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
/* Get current VDS dimensions */
if (H5S_get_simple_extent_dims(dset->shared->space, virtual_dims, NULL) < 0)
@@ -1977,8 +1977,8 @@ H5D__virtual_init_all(const H5D_t *dset)
/* Close previous clipped virtual selection, if any */
if (storage->list[i].source_dset.clipped_virtual_select) {
- HDassert(storage->list[i].source_dset.clipped_virtual_select !=
- storage->list[i].source_dset.virtual_select);
+ assert(storage->list[i].source_dset.clipped_virtual_select !=
+ storage->list[i].source_dset.virtual_select);
if (H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped virtual dataspace")
@@ -1991,8 +1991,8 @@ H5D__virtual_init_all(const H5D_t *dset)
/* Close previous clipped source selection, if any */
if (storage->list[i].source_dset.clipped_source_select) {
- HDassert(storage->list[i].source_dset.clipped_source_select !=
- storage->list[i].source_select);
+ assert(storage->list[i].source_dset.clipped_source_select !=
+ storage->list[i].source_select);
if (H5S_close(storage->list[i].source_dset.clipped_source_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped source dataspace")
@@ -2036,8 +2036,8 @@ H5D__virtual_init_all(const H5D_t *dset)
} /* end else */
} /* end if */
else {
- HDassert(!storage->list[i].source_dset.clipped_virtual_select);
- HDassert(!storage->list[i].source_dset.clipped_source_select);
+ assert(!storage->list[i].source_dset.clipped_virtual_select);
+ assert(!storage->list[i].source_dset.clipped_source_select);
} /* end else */
} /* end if */
else {
@@ -2073,9 +2073,9 @@ H5D__virtual_init_all(const H5D_t *dset)
storage->list[i].sub_dset = tmp_sub_dset;
/* Clear new space in sub_dset */
- (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
- (sub_dset_max - storage->list[i].sub_dset_nalloc) *
- sizeof(H5O_storage_virtual_srcdset_t));
+ (void)memset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
+ (sub_dset_max - storage->list[i].sub_dset_nalloc) *
+ sizeof(H5O_storage_virtual_srcdset_t));
/* Update sub_dset_nalloc */
storage->list[i].sub_dset_nalloc = sub_dset_max;
@@ -2153,8 +2153,8 @@ H5D__virtual_init_all(const H5D_t *dset)
else {
/* Limited mapping, just make sure the clipped selections were
* already set. Again, no need to open the source file. */
- HDassert(storage->list[i].source_dset.clipped_virtual_select);
- HDassert(storage->list[i].source_dset.clipped_source_select);
+ assert(storage->list[i].source_dset.clipped_virtual_select);
+ assert(storage->list[i].source_dset.clipped_source_select);
} /* end else */
/* Mark layout as fully initialized */
@@ -2189,9 +2189,9 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
storage = &dset->shared->layout.storage.u.virt;
- HDassert(storage->list || (storage->list_nused == 0));
+ assert(storage->list || (storage->list_nused == 0));
/* Check that the dimensions of the VDS are large enough */
if (H5D_virtual_check_min_dims(dset) < 0)
@@ -2208,7 +2208,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
* source_space_status and virtual_space_status because others will be based
* on these and should therefore already have been normalized. */
for (i = 0; i < storage->list_nused; i++) {
- HDassert(storage->list[i].sub_dset_nalloc == 0);
+ assert(storage->list[i].sub_dset_nalloc == 0);
/* Patch extent */
if (H5S_extent_copy(storage->list[i].source_dset.virtual_select, dset->shared->space) < 0)
@@ -2270,7 +2270,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
if (H5P_get(source_fapl, H5F_ACS_CLOSE_DEGREE_NAME, &close_degree) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file close degree")
- HDassert(close_degree == H5F_CLOSE_WEAK);
+ assert(close_degree == H5F_CLOSE_WEAK);
} /* end else */
#endif /* NDEBUG */
@@ -2340,7 +2340,7 @@ H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(shared_dset);
+ assert(shared_dset);
storage = &shared_dset->layout.storage.u.virt;
/* Iterate over mappings */
@@ -2421,10 +2421,10 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(storage);
- HDassert(mem_space);
- HDassert(file_space);
- HDassert(tot_nelmts);
+ assert(storage);
+ assert(mem_space);
+ assert(file_space);
+ assert(tot_nelmts);
/* Initialize layout if necessary */
if (!storage->init)
@@ -2437,13 +2437,13 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
/* Iterate over mappings */
for (i = 0; i < storage->list_nused; i++) {
/* Sanity check that the virtual space has been patched by now */
- HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
+ assert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
/* Check for "printf" source dataset resolution */
if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) {
hbool_t partial_block;
- HDassert(storage->list[i].unlim_dim_virtual >= 0);
+ assert(storage->list[i].unlim_dim_virtual >= 0);
/* Get selection bounds if necessary */
if (!bounds_init) {
@@ -2484,12 +2484,12 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
if (!storage->list[i].sub_dset[j].clipped_virtual_select) {
hsize_t start[H5S_MAX_RANK];
/* This should only be NULL if this is a partial block */
- HDassert((j == (storage->list[i].sub_dset_io_end - 1)) && partial_block);
+ assert((j == (storage->list[i].sub_dset_io_end - 1)) && partial_block);
/* If the source space status is not correct, we must try to
* open the source dataset to patch it */
if (storage->list[i].source_space_status != H5O_VIRTUAL_STATUS_CORRECT) {
- HDassert(!storage->list[i].sub_dset[j].dset);
+ assert(!storage->list[i].sub_dset[j].dset);
if (H5D__virtual_open_source_dset(dset, &storage->list[i],
&storage->list[i].sub_dset[j]) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset")
@@ -2509,7 +2509,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
vbounds_end) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds")
- HDassert(bounds_init);
+ assert(bounds_init);
/* Convert bounds to extent (add 1) */
for (k = 0; k < (size_t)rank; k++)
@@ -2529,7 +2529,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
/* Clip virtual selection to real virtual extent */
- (void)HDmemset(start, 0, sizeof(start));
+ (void)memset(start, 0, sizeof(start));
if (H5S_select_hyperslab(storage->list[i].sub_dset[j].clipped_virtual_select,
H5S_SELECT_AND, start, NULL, tmp_dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to clip hyperslab")
@@ -2646,8 +2646,8 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
* H5Dget_space(). Do not attempt to open it as this might
* affect the extent and we are not going to recalculate it
* here. */
- HDassert(storage->list[i].unlim_dim_virtual >= 0);
- HDassert(!storage->list[i].source_dset.dset);
+ assert(storage->list[i].unlim_dim_virtual >= 0);
+ assert(!storage->list[i].source_dset.dset);
} /* end else */
} /* end else */
} /* end for */
@@ -2677,7 +2677,7 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(storage);
+ assert(storage);
/* Iterate over mappings */
for (i = 0; i < storage->list_nused; i++)
@@ -2726,14 +2726,14 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset
FUNC_ENTER_PACKAGE
- HDassert(source_dset);
+ assert(source_dset);
/* Only perform I/O if there is a projected memory space, otherwise there
* were no elements in the projection or the source dataset could not be
* opened */
if (source_dset->projected_mem_space) {
- HDassert(source_dset->dset);
- HDassert(source_dset->clipped_source_select);
+ assert(source_dset->dset);
+ assert(source_dset->clipped_source_select);
/* Project intersection of file space and mapping virtual space onto
* mapping source space */
@@ -2765,7 +2765,7 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset
done:
/* Release allocated resources */
if (projected_src_space) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5S_close(projected_src_space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space")
} /* end if */
@@ -2798,14 +2798,14 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->buf.vp);
- HDassert(dset_info->mem_space);
- HDassert(dset_info->file_space);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->buf.vp);
+ assert(dset_info->mem_space);
+ assert(dset_info->file_space);
storage = &(dset_info->dset->shared->layout.storage.u.virt);
- HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
+ assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
/* Initialize nelmts */
nelmts = H5S_GET_SELECT_NPOINTS(dset_info->file_space);
@@ -2823,7 +2823,7 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info
/* Iterate over mappings */
for (i = 0; i < storage->list_nused; i++) {
/* Sanity check that the virtual space has been patched by now */
- HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
+ assert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
/* Check for "printf" source dataset resolution */
if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) {
@@ -2887,7 +2887,7 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info
/* Verify number of elements is correct. Note that since we
* don't check for overlap we can't assert that these are equal
*/
- HDassert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts);
+ assert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts);
} /* end block */
#endif /* NDEBUG */
} /* end if */
@@ -2927,13 +2927,13 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse
FUNC_ENTER_PACKAGE
- HDassert(source_dset);
+ assert(source_dset);
/* Only perform I/O if there is a projected memory space, otherwise there
* were no elements in the projection */
if (source_dset->projected_mem_space) {
- HDassert(source_dset->dset);
- HDassert(source_dset->clipped_source_select);
+ assert(source_dset->dset);
+ assert(source_dset->clipped_source_select);
/* In the future we may wish to extent this implementation to extend
* source datasets if a write to a virtual dataset goes past the current
@@ -2968,7 +2968,7 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse
done:
/* Release allocated resources */
if (projected_src_space) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5S_close(projected_src_space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space")
} /* end if */
@@ -3000,14 +3000,14 @@ H5D__virtual_write(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_inf
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->buf.cvp);
- HDassert(dset_info->mem_space);
- HDassert(dset_info->file_space);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->buf.cvp);
+ assert(dset_info->mem_space);
+ assert(dset_info->file_space);
storage = &(dset_info->dset->shared->layout.storage.u.virt);
- HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
+ assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
/* Initialize nelmts */
nelmts = H5S_GET_SELECT_NPOINTS(dset_info->file_space);
@@ -3031,7 +3031,7 @@ H5D__virtual_write(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_inf
/* Iterate over mappings */
for (i = 0; i < storage->list_nused; i++) {
/* Sanity check that virtual space has been patched by now */
- HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
+ assert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
/* Check for "printf" source dataset resolution */
if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) {
@@ -3076,7 +3076,7 @@ H5D__virtual_flush(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
storage = &dset->shared->layout.storage.u.virt;
@@ -3123,8 +3123,8 @@ H5D__virtual_hold_source_dset_files(const H5D_t *dset, H5D_virtual_held_file_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
- HDassert(head && NULL == *head);
+ assert(dset);
+ assert(head && NULL == *head);
/* Set the convenience pointer */
storage = &dset->shared->layout.storage.u.virt;
@@ -3196,7 +3196,7 @@ H5D__virtual_refresh_source_dset(H5D_t **dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset && *dset);
+ assert(dset && *dset);
/* Get a temporary identifier for this source dataset */
if ((temp_id = H5VL_wrap_register(H5I_DATASET, *dset, FALSE)) < 0)
@@ -3242,7 +3242,7 @@ H5D__virtual_refresh_source_dsets(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Set convenience pointer */
storage = &dset->shared->layout.storage.u.virt;
diff --git a/src/H5E.c b/src/H5E.c
index 4de5c5b..1c82e5d 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -169,7 +169,7 @@ H5E_init(void)
#endif /* H5_HAVE_THREADSAFE */
/* Allocate the HDF5 error class */
- HDassert(H5E_ERR_CLS_g == (-1));
+ assert(H5E_ERR_CLS_g == (-1));
HDsnprintf(lib_vers, sizeof(lib_vers), "%u.%u.%u%s", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
(HDstrlen(H5_VERS_SUBRELEASE) > 0 ? "-" H5_VERS_SUBRELEASE : ""));
if (NULL == (cls = H5E__register_class(H5E_CLS_NAME, H5E_CLS_LIB_NAME, lib_vers)))
@@ -333,12 +333,12 @@ H5E__get_stack(void)
/* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
estack = (H5E_t *)LocalAlloc(LPTR, sizeof(H5E_t));
#else
- /* Use HDmalloc here since this has to match the HDfree in the
+ /* Use malloc here since this has to match the free in the
* destructor and we want to avoid the codestack there.
*/
- estack = (H5E_t *)HDmalloc(sizeof(H5E_t));
+ estack = (H5E_t *)malloc(sizeof(H5E_t));
#endif /* H5_HAVE_WIN_THREADS */
- HDassert(estack);
+ assert(estack);
/* Set the thread-specific info */
estack->nused = 0;
@@ -374,7 +374,7 @@ H5E__free_class(H5E_cls_t *cls)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(cls);
+ assert(cls);
/* Free error class structure */
cls->cls_name = (char *)H5MM_xfree((void *)cls->cls_name);
@@ -445,9 +445,9 @@ H5E__register_class(const char *cls_name, const char *lib_name, const char *vers
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(cls_name);
- HDassert(lib_name);
- HDassert(version);
+ assert(cls_name);
+ assert(lib_name);
+ assert(version);
/* Allocate space for new error class */
if (NULL == (cls = H5FL_CALLOC(H5E_cls_t)))
@@ -527,7 +527,7 @@ H5E__unregister_class(H5E_cls_t *cls, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(cls);
+ assert(cls);
/* Iterate over all the messages and delete those in this error class */
if (H5I_iterate(H5I_ERROR_MSG, H5E__close_msg_cb, cls, FALSE) < 0)
@@ -596,7 +596,7 @@ H5E__get_class_name(const H5E_cls_t *cls, char *name, size_t size)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(cls);
+ assert(cls);
/* Get the class's name */
len = (ssize_t)HDstrlen(cls->cls_name);
@@ -636,7 +636,7 @@ H5E__close_msg_cb(void *obj_ptr, hid_t obj_id, void *udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(err_msg);
+ assert(err_msg);
/* Close the message if it is in the class being closed */
if (err_msg->cls == cls) {
@@ -700,7 +700,7 @@ H5E__close_msg(H5E_msg_t *err, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(err);
+ assert(err);
/* Release message */
err->msg = (char *)H5MM_xfree((void *)err->msg);
@@ -777,9 +777,9 @@ H5E__create_msg(H5E_cls_t *cls, H5E_type_t msg_type, const char *msg_str)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(cls);
- HDassert(msg_type == H5E_MAJOR || msg_type == H5E_MINOR);
- HDassert(msg_str);
+ assert(cls);
+ assert(msg_type == H5E_MAJOR || msg_type == H5E_MINOR);
+ assert(msg_str);
/* Allocate new message object */
if (NULL == (msg = H5FL_MALLOC(H5E_msg_t)))
@@ -1052,7 +1052,7 @@ H5E__set_current_stack(H5E_t *estack)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(estack);
+ assert(estack);
/* Get a pointer to the current error stack */
if (NULL == (current_stack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean'
@@ -1150,7 +1150,7 @@ H5E__close_stack(H5E_t *estack, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(estack);
+ assert(estack);
/* Release the stack's error information */
H5E_clear_stack(estack);
@@ -1225,7 +1225,7 @@ H5E__get_num(const H5E_t *estack)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(estack);
+ assert(estack);
FUNC_LEAVE_NOAPI((ssize_t)estack->nused)
} /* end H5E__get_num() */
@@ -1332,7 +1332,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid
*/
/* Format the description */
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
va_started = TRUE;
/* Use the vasprintf() routine, since it does what we're trying to do below */
@@ -1345,12 +1345,12 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid
done:
if (va_started)
- HDva_end(ap);
+ va_end(ap);
/* Memory was allocated with HDvasprintf so it needs to be freed
- * with HDfree
+ * with free
*/
if (tmp)
- HDfree(tmp);
+ free(tmp);
FUNC_LEAVE_API(ret_value)
} /* end H5Epush2() */
@@ -1757,8 +1757,8 @@ H5E__append_stack(H5E_t *dst_stack, const H5E_t *src_stack)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dst_stack);
- HDassert(src_stack);
+ assert(dst_stack);
+ assert(src_stack);
/* Copy the errors from the source stack to the destination stack */
for (u = 0; u < src_stack->nused; u++) {
diff --git a/src/H5EA.c b/src/H5EA.c
index 94b4336..0220413 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -122,8 +122,8 @@ H5EA__new(H5F_t *f, haddr_t ea_addr, hbool_t from_open, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(ea_addr));
+ assert(f);
+ assert(H5F_addr_defined(ea_addr));
/* Allocate extensible array wrapper */
if (NULL == (ea = H5FL_CALLOC(H5EA_t)))
@@ -187,8 +187,8 @@ H5EA_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* H5EA interface sanity check */
HDcompile_assert(H5EA_NUM_CLS_ID == NELMTS(H5EA_client_class_g));
@@ -235,8 +235,8 @@ H5EA_open(H5F_t *f, haddr_t ea_addr, void *ctx_udata)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(ea_addr));
+ assert(f);
+ assert(H5F_addr_defined(ea_addr));
/* Allocate and initialize new extensible array wrapper */
if (NULL == (ea = H5EA__new(f, ea_addr, TRUE, ctx_udata)))
@@ -272,8 +272,8 @@ H5EA_get_nelmts(const H5EA_t *ea, hsize_t *nelmts)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(ea);
- HDassert(nelmts);
+ assert(ea);
+ assert(nelmts);
/* Retrieve the max. index set */
*nelmts = ea->hdr->stats.stored.max_idx_set;
@@ -299,9 +299,9 @@ H5EA_get_addr(const H5EA_t *ea, haddr_t *addr)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(ea);
- HDassert(ea->hdr);
- HDassert(addr);
+ assert(ea);
+ assert(ea->hdr);
+ assert(addr);
/* Retrieve the address of the extensible array's header */
*addr = ea->hdr->addr;
@@ -341,14 +341,14 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(ea);
- HDassert(hdr);
- HDassert(thing);
- HDassert(thing_elmt_buf);
- HDassert(thing_unprot_func);
+ assert(ea);
+ assert(hdr);
+ assert(thing);
+ assert(thing_elmt_buf);
+ assert(thing_unprot_func);
/* only the H5AC__READ_ONLY_FLAG may be set in thing_acc */
- HDassert((thing_acc & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((thing_acc & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set the shared array header's file context for this operation */
hdr->f = ea->f;
@@ -403,7 +403,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
/* Compute the data block index in index block */
dblk_idx = (size_t)(hdr->sblk_info[sblk_idx].start_dblk +
(elmt_idx / hdr->sblk_info[sblk_idx].dblk_nelmts));
- HDassert(dblk_idx < iblock->ndblk_addrs);
+ assert(dblk_idx < iblock->ndblk_addrs);
/* Check if the data block has been allocated on disk yet */
if (!H5F_addr_defined(iblock->dblk_addrs[dblk_idx])) {
@@ -490,7 +490,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
/* Compute the data block index in super block */
dblk_idx = (size_t)(elmt_idx / sblock->dblk_nelmts);
- HDassert(dblk_idx < sblock->ndblks);
+ assert(dblk_idx < sblock->ndblks);
/* Check if the data block has been allocated on disk yet */
if (!H5F_addr_defined(sblock->dblk_addrs[dblk_idx])) {
@@ -616,8 +616,8 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
} /* end else */
/* Sanity checks */
- HDassert(*thing != NULL);
- HDassert(*thing_unprot_func != NULL);
+ assert(*thing != NULL);
+ assert(*thing_unprot_func != NULL);
done:
/* Reset 'thing' info on error */
@@ -679,8 +679,8 @@ H5EA_set(const H5EA_t *ea, hsize_t idx, const void *elmt)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(ea);
- HDassert(hdr);
+ assert(ea);
+ assert(hdr);
/* Set the shared array header's file context for this operation */
hdr->f = ea->f;
@@ -692,9 +692,9 @@ H5EA_set(const H5EA_t *ea, hsize_t idx, const void *elmt)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect array metadata")
/* Sanity check */
- HDassert(thing);
- HDassert(thing_elmt_buf);
- HDassert(thing_unprot_func);
+ assert(thing);
+ assert(thing_elmt_buf);
+ assert(thing_unprot_func);
/* Set element in thing's element buffer */
H5MM_memcpy(thing_elmt_buf + (hdr->cparam.cls->nat_elmt_size * thing_elmt_idx), elmt,
@@ -742,8 +742,8 @@ H5EA_get(const H5EA_t *ea, hsize_t idx, void *elmt)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(ea);
- HDassert(hdr);
+ assert(ea);
+ assert(hdr);
/* Check for element beyond max. element in array */
if (idx >= hdr->stats.stored.max_idx_set) {
@@ -805,9 +805,9 @@ H5EA_depend(H5EA_t *ea, H5AC_proxy_entry_t *parent)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(ea);
- HDassert(hdr);
- HDassert(parent);
+ assert(ea);
+ assert(hdr);
+ assert(parent);
/*
* Check to see if a flush dependency between the extensible array
@@ -816,7 +816,7 @@ H5EA_depend(H5EA_t *ea, H5AC_proxy_entry_t *parent)
*/
if (NULL == hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Set the shared array header's file context for this operation */
hdr->f = ea->f;
@@ -853,7 +853,7 @@ H5EA_close(H5EA_t *ea)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(ea);
+ assert(ea);
/* Close the header, if it was set */
if (ea->hdr) {
@@ -889,9 +889,9 @@ H5EA_close(H5EA_t *ea)
"unable to check metadata cache status for extensible array header")
/* Sanity checks on header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PINNED);
- HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PINNED);
+ assert(!(hdr_status & H5AC_ES__IS_PROTECTED));
}
#endif /* NDEBUG */
@@ -954,8 +954,8 @@ H5EA_delete(H5F_t *f, haddr_t ea_addr, void *ctx_udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(ea_addr));
+ assert(f);
+ assert(H5F_addr_defined(ea_addr));
/* Lock the array header into memory */
if (NULL == (hdr = H5EA__hdr_protect(f, ea_addr, ctx_udata, H5AC__NO_FLAGS_SET)))
@@ -1005,9 +1005,9 @@ H5EA_iterate(H5EA_t *ea, H5EA_operator_t op, void *udata)
FUNC_ENTER_NOAPI(H5_ITER_ERROR)
/* Check arguments */
- HDassert(ea);
- HDassert(op);
- HDassert(udata);
+ assert(ea);
+ assert(op);
+ assert(udata);
/* Allocate space for a native array element */
if (NULL == (elmt = H5FL_BLK_MALLOC(ea_native_elmt, ea->hdr->cparam.cls->nat_elmt_size)))
@@ -1052,8 +1052,8 @@ H5EA_patch_file(H5EA_t *ea, H5F_t *f)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(ea);
- HDassert(f);
+ assert(ea);
+ assert(f);
if (ea->f != f || ea->hdr->f != f)
ea->f = ea->hdr->f = f;
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index 968a933..40e5faa 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -228,9 +228,9 @@ H5EA__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5EA_HEADER_SIZE_FILE(udata->f);
@@ -262,7 +262,7 @@ H5EA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -299,10 +299,10 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
- HDassert(H5F_addr_defined(udata->addr));
+ assert(image);
+ assert(udata);
+ assert(udata->f);
+ assert(H5F_addr_defined(udata->addr));
/* Allocate space for the extensible array data structure */
if (NULL == (hdr = H5EA__hdr_alloc(udata->f)))
@@ -313,7 +313,7 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
hdr->addr = udata->addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header signature")
image += H5_SIZEOF_MAGIC;
@@ -373,7 +373,7 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* checksum verification already done in verify_chksum cb */
@@ -381,12 +381,12 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == len);
+ assert((size_t)(image - (const uint8_t *)_image) == len);
/* Finish initializing extensible array header */
if (H5EA__hdr_init(hdr, udata->ctx_udata) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, "initialization failed for extensible array header")
- HDassert(hdr->size == len);
+ assert(hdr->size == len);
/* Set return value */
ret_value = hdr;
@@ -420,8 +420,8 @@ H5EA__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(image_len);
+ assert(hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = hdr->size;
@@ -451,9 +451,9 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(hdr);
+ assert(f);
+ assert(image);
+ assert(hdr);
/* Magic number */
H5MM_memcpy(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -463,7 +463,7 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5EA_HDR_VERSION;
/* Extensible array type */
- HDassert(hdr->cparam.cls->id <= 255);
+ assert(hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)hdr->cparam.cls->id;
/* General array creation/configuration information */
@@ -495,7 +495,7 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5EA__cache_hdr_serialize() */
@@ -521,7 +521,7 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Check if the file was opened with SWMR-write access */
if (hdr->swmr_write) {
@@ -545,7 +545,7 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
*/
if (hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Destroy flush dependency on object header proxy */
if (H5AC_proxy_entry_remove_child((H5AC_proxy_entry_t *)hdr->parent,
@@ -569,12 +569,12 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == hdr->parent);
+ assert(NULL == hdr->parent);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -601,7 +601,7 @@ H5EA__cache_hdr_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array header */
if (H5EA__hdr_dest((H5EA_hdr_t *)thing) < 0)
@@ -632,11 +632,11 @@ H5EA__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(image_len);
+ assert(hdr);
+ assert(image_len);
/* Set up fake index block for computing size on disk */
- HDmemset(&iblock, 0, sizeof(iblock));
+ memset(&iblock, 0, sizeof(iblock));
iblock.hdr = (H5EA_hdr_t *)hdr;
iblock.nsblks = H5EA_SBLK_FIRST_IDX(hdr->cparam.sup_blk_min_data_ptrs);
iblock.ndblk_addrs = 2 * ((size_t)hdr->cparam.sup_blk_min_data_ptrs - 1);
@@ -672,7 +672,7 @@ H5EA__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -710,8 +710,8 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(hdr);
+ assert(image);
+ assert(hdr);
/* Allocate the extensible array index block */
if (NULL == (iblock = H5EA__iblock_alloc(hdr)))
@@ -722,7 +722,7 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
iblock->addr = hdr->idx_blk_addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array index block signature")
image += H5_SIZEOF_MAGIC;
@@ -766,7 +766,7 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* Save the index block's size */
iblock->size = len;
@@ -777,7 +777,7 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == iblock->size);
+ assert((size_t)(image - (const uint8_t *)_image) == iblock->size);
/* Set return value */
ret_value = iblock;
@@ -811,8 +811,8 @@ H5EA__cache_iblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(iblock);
- HDassert(image_len);
+ assert(iblock);
+ assert(image_len);
/* Set the image length size */
*image_len = iblock->size;
@@ -843,10 +843,10 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(iblock);
- HDassert(iblock->hdr);
+ assert(f);
+ assert(image);
+ assert(iblock);
+ assert(iblock->hdr);
/* Get temporary pointer to serialized info */
@@ -858,7 +858,7 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_IBLOCK_VERSION;
/* Extensible array type */
- HDassert(iblock->hdr->cparam.cls->id <= 255);
+ assert(iblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)iblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -900,7 +900,7 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -927,7 +927,7 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Determine which action to take */
switch (action) {
@@ -973,7 +973,7 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -1002,7 +1002,7 @@ H5EA__cache_iblock_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array index block */
if (H5EA__iblock_dest((H5EA_iblock_t *)thing) < 0)
@@ -1033,15 +1033,15 @@ H5EA__cache_sblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->sblk_idx > 0);
- HDassert(H5F_addr_defined(udata->sblk_addr));
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->sblk_idx > 0);
+ assert(H5F_addr_defined(udata->sblk_addr));
+ assert(image_len);
/* Set up fake super block for computing size on disk */
/* (Note: extracted from H5EA__sblock_alloc) */
- HDmemset(&sblock, 0, sizeof(sblock));
+ memset(&sblock, 0, sizeof(sblock));
sblock.hdr = udata->hdr;
sblock.ndblks = udata->hdr->sblk_info[udata->sblk_idx].ndblks;
sblock.dblk_nelmts = udata->hdr->sblk_info[udata->sblk_idx].dblk_nelmts;
@@ -1052,14 +1052,14 @@ H5EA__cache_sblock_get_initial_load_size(void *_udata, size_t *image_len)
sblock.dblk_npages = sblock.dblk_nelmts / udata->hdr->dblk_page_nelmts;
/* Sanity check that we have at least 2 pages in data block */
- HDassert(sblock.dblk_npages > 1);
+ assert(sblock.dblk_npages > 1);
/* Sanity check for integer truncation */
- HDassert((sblock.dblk_npages * udata->hdr->dblk_page_nelmts) == sblock.dblk_nelmts);
+ assert((sblock.dblk_npages * udata->hdr->dblk_page_nelmts) == sblock.dblk_nelmts);
/* Compute size of buffer for each data block's 'page init' bitmask */
sblock.dblk_page_init_size = ((sblock.dblk_npages) + 7) / 8;
- HDassert(sblock.dblk_page_init_size > 0);
+ assert(sblock.dblk_page_init_size > 0);
} /* end if */
/* Set the image length size */
@@ -1092,7 +1092,7 @@ H5EA__cache_sblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -1130,11 +1130,11 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->parent);
- HDassert(udata->sblk_idx > 0);
- HDassert(H5F_addr_defined(udata->sblk_addr));
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->parent);
+ assert(udata->sblk_idx > 0);
+ assert(H5F_addr_defined(udata->sblk_addr));
/* Allocate the extensible array super block */
if (NULL == (sblock = H5EA__sblock_alloc(udata->hdr, udata->parent, udata->sblk_idx)))
@@ -1145,7 +1145,7 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
sblock->addr = udata->sblk_addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array super block signature")
image += H5_SIZEOF_MAGIC;
@@ -1183,7 +1183,7 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* Save the super block's size */
sblock->size = len;
@@ -1194,7 +1194,7 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == sblock->size);
+ assert((size_t)(image - (const uint8_t *)_image) == sblock->size);
/* Set return value */
ret_value = sblock;
@@ -1228,8 +1228,8 @@ H5EA__cache_sblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(sblock);
- HDassert(image_len);
+ assert(sblock);
+ assert(image_len);
/* Set the image length size */
*image_len = sblock->size;
@@ -1260,10 +1260,10 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(sblock);
- HDassert(sblock->hdr);
+ assert(f);
+ assert(image);
+ assert(sblock);
+ assert(sblock->hdr);
/* Magic number */
H5MM_memcpy(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -1273,7 +1273,7 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_SBLOCK_VERSION;
/* Extensible array type */
- HDassert(sblock->hdr->cparam.cls->id <= 255);
+ assert(sblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)sblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -1305,7 +1305,7 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5EA__cache_sblock_serialize() */
@@ -1331,7 +1331,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sblock);
+ assert(sblock);
/* Determine which action to take */
switch (action) {
@@ -1398,7 +1398,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -1427,7 +1427,7 @@ H5EA__cache_sblock_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array super block */
if (H5EA__sblock_dest((H5EA_sblock_t *)thing) < 0)
@@ -1458,14 +1458,14 @@ H5EA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->nelmts > 0);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->nelmts > 0);
+ assert(image_len);
/* Set up fake data block for computing size on disk */
/* (Note: extracted from H5EA__dblock_alloc) */
- HDmemset(&dblock, 0, sizeof(dblock));
+ memset(&dblock, 0, sizeof(dblock));
/* need to set:
*
@@ -1482,7 +1482,7 @@ H5EA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
if (udata->nelmts > udata->hdr->dblk_page_nelmts) {
/* Set the # of pages in the direct block */
dblock.npages = udata->nelmts / udata->hdr->dblk_page_nelmts;
- HDassert(udata->nelmts == (dblock.npages * udata->hdr->dblk_page_nelmts));
+ assert(udata->nelmts == (dblock.npages * udata->hdr->dblk_page_nelmts));
} /* end if */
/* Set the image length size */
@@ -1518,7 +1518,7 @@ H5EA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -1556,25 +1556,25 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->parent);
- HDassert(udata->nelmts > 0);
- HDassert(H5F_addr_defined(udata->dblk_addr));
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->parent);
+ assert(udata->nelmts > 0);
+ assert(H5F_addr_defined(udata->dblk_addr));
/* Allocate the extensible array data block */
if (NULL == (dblock = H5EA__dblock_alloc(udata->hdr, udata->parent, udata->nelmts)))
HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL,
"memory allocation failed for extensible array data block")
- HDassert(((!dblock->npages) && (len == H5EA_DBLOCK_SIZE(dblock))) ||
- (len == H5EA_DBLOCK_PREFIX_SIZE(dblock)));
+ assert(((!dblock->npages) && (len == H5EA_DBLOCK_SIZE(dblock))) ||
+ (len == H5EA_DBLOCK_PREFIX_SIZE(dblock)));
/* Set the extensible array data block's information */
dblock->addr = udata->dblk_addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array data block signature")
image += H5_SIZEOF_MAGIC;
@@ -1607,7 +1607,7 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* Set the data block's size */
/* (Note: This is not the same as the image length, for paged data blocks) */
@@ -1619,7 +1619,7 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == len);
+ assert((size_t)(image - (const uint8_t *)_image) == len);
/* Set return value */
ret_value = dblock;
@@ -1654,8 +1654,8 @@ H5EA__cache_dblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblock);
- HDassert(image_len);
+ assert(dblock);
+ assert(image_len);
/* Set the image length size */
if (!dblock->npages)
@@ -1689,10 +1689,10 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(dblock);
- HDassert(dblock->hdr);
+ assert(f);
+ assert(image);
+ assert(dblock);
+ assert(dblock->hdr);
/* Magic number */
H5MM_memcpy(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -1702,7 +1702,7 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_DBLOCK_VERSION;
/* Extensible array type */
- HDassert(dblock->hdr->cparam.cls->id <= 255);
+ assert(dblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)dblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -1730,7 +1730,7 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1757,7 +1757,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(dblock);
+ assert(dblock);
/* Determine which action to take */
switch (action) {
@@ -1823,7 +1823,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -1852,7 +1852,7 @@ H5EA__cache_dblock_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array data block */
if (H5EA__dblock_dest((H5EA_dblock_t *)thing) < 0)
@@ -1899,10 +1899,10 @@ H5EA__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_EARRAY_DBLOCK);
- HDassert(fsf_size);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_EARRAY_DBLOCK);
+ assert(fsf_size);
*fsf_size = dblock->size;
@@ -1929,9 +1929,9 @@ H5EA__cache_dblk_page_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5EA_DBLK_PAGE_SIZE(udata->hdr);
@@ -1963,7 +1963,7 @@ H5EA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -2000,10 +2000,10 @@ H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->parent);
- HDassert(H5F_addr_defined(udata->dblk_page_addr));
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->parent);
+ assert(H5F_addr_defined(udata->dblk_page_addr));
/* Allocate the extensible array data block page */
if (NULL == (dblk_page = H5EA__dblk_page_alloc(udata->hdr, udata->parent)))
@@ -2024,7 +2024,7 @@ H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* Set the data block page's size */
dblk_page->size = len;
@@ -2035,7 +2035,7 @@ H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == dblk_page->size);
+ assert((size_t)(image - (const uint8_t *)_image) == dblk_page->size);
/* Set return value */
ret_value = dblk_page;
@@ -2068,8 +2068,8 @@ H5EA__cache_dblk_page_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblk_page);
- HDassert(image_len);
+ assert(dblk_page);
+ assert(image_len);
/* Set the image length size */
*image_len = dblk_page->size;
@@ -2101,10 +2101,10 @@ H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(dblk_page);
- HDassert(dblk_page->hdr);
+ assert(f);
+ assert(image);
+ assert(dblk_page);
+ assert(dblk_page->hdr);
/* Internal information */
@@ -2123,7 +2123,7 @@ H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2150,7 +2150,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Determine which action to take */
switch (action) {
@@ -2217,7 +2217,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -2246,7 +2246,7 @@ H5EA__cache_dblk_page_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array data block page */
if (H5EA__dblk_page_dest((H5EA_dblk_page_t *)thing) < 0)
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index c881582..ec1293b 100644
--- a/src/H5EAdbg.c
+++ b/src/H5EAdbg.c
@@ -90,13 +90,13 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -109,35 +109,35 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header")
/* Print opening message */
- HDfprintf(stream, "%*sExtensible Array Header...\n", indent, "");
+ fprintf(stream, "%*sExtensible Array Header...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Log2(Max. # of elements in array):", (unsigned)hdr->cparam.max_nelmts_bits);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of elements in index block:", (unsigned)hdr->cparam.idx_blk_elmts);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. # of elements per data block:", (unsigned)hdr->cparam.data_blk_min_elmts);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. # of data block pointers for a super block:",
- (unsigned)hdr->cparam.sup_blk_min_data_ptrs);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Log2(Max. # of elements in data block page):",
- (unsigned)hdr->cparam.max_dblk_page_nelmts_bits);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Highest element index stored (+1):", hdr->stats.stored.max_idx_set);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of super blocks created:", hdr->stats.stored.nsuper_blks);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of data blocks created:", hdr->stats.stored.ndata_blks);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of elements 'realized':", hdr->stats.stored.nelmts);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Index Block Address:", hdr->idx_blk_addr);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Log2(Max. # of elements in array):", (unsigned)hdr->cparam.max_nelmts_bits);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "# of elements in index block:", (unsigned)hdr->cparam.idx_blk_elmts);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Min. # of elements per data block:", (unsigned)hdr->cparam.data_blk_min_elmts);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Min. # of data block pointers for a super block:", (unsigned)hdr->cparam.sup_blk_min_data_ptrs);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Log2(Max. # of elements in data block page):", (unsigned)hdr->cparam.max_dblk_page_nelmts_bits);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Highest element index stored (+1):", hdr->stats.stored.max_idx_set);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of super blocks created:", hdr->stats.stored.nsuper_blks);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of data blocks created:", hdr->stats.stored.ndata_blks);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of elements 'realized':", hdr->stats.stored.nelmts);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Index Block Address:", hdr->idx_blk_addr);
done:
if (dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
@@ -173,14 +173,14 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -193,7 +193,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header")
/* Sanity check */
- HDassert(H5F_addr_eq(hdr->idx_blk_addr, addr));
+ assert(H5F_addr_eq(hdr->idx_blk_addr, addr));
/* Protect index block */
if (NULL == (iblock = H5EA__iblock_protect(hdr, H5AC__READ_ONLY_FLAG)))
@@ -202,22 +202,22 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
(unsigned long long)hdr->idx_blk_addr)
/* Print opening message */
- HDfprintf(stream, "%*sExtensible Array Index Block...\n", indent, "");
+ fprintf(stream, "%*sExtensible Array Index Block...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Index Block size:", iblock->size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "# of data block addresses in index block:", iblock->ndblk_addrs);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "# of super block addresses in index block:", iblock->nsblk_addrs);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Index Block size:", iblock->size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "# of data block addresses in index block:", iblock->ndblk_addrs);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "# of super block addresses in index block:", iblock->nsblk_addrs);
/* Check if there are any elements in index block */
if (hdr->cparam.idx_blk_elmts > 0) {
unsigned u; /* Local index variable */
/* Print the elements in the index block */
- HDfprintf(stream, "%*sElements in Index Block:\n", indent, "");
+ fprintf(stream, "%*sElements in Index Block:\n", indent, "");
for (u = 0; u < hdr->cparam.idx_blk_elmts; u++) {
/* Call the class's 'debug' callback */
if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
@@ -233,12 +233,12 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
unsigned u; /* Local index variable */
/* Print the data block addresses in the index block */
- HDfprintf(stream, "%*sData Block Addresses in Index Block:\n", indent, "");
+ fprintf(stream, "%*sData Block Addresses in Index Block:\n", indent, "");
for (u = 0; u < iblock->ndblk_addrs; u++) {
/* Print address */
HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
- iblock->dblk_addrs[u]);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
+ iblock->dblk_addrs[u]);
} /* end for */
} /* end if */
@@ -248,12 +248,12 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
unsigned u; /* Local index variable */
/* Print the super block addresses in the index block */
- HDfprintf(stream, "%*sSuper Block Addresses in Index Block:\n", indent, "");
+ fprintf(stream, "%*sSuper Block Addresses in Index Block:\n", indent, "");
for (u = 0; u < iblock->nsblk_addrs; u++) {
/* Print address */
HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
- iblock->sblk_addrs[u]);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
+ iblock->sblk_addrs[u]);
} /* end for */
} /* end if */
@@ -293,14 +293,14 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -321,15 +321,15 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
(unsigned long long)addr)
/* Print opening message */
- HDfprintf(stream, "%*sExtensible Array Super Block...\n", indent, "");
+ fprintf(stream, "%*sExtensible Array Super Block...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Super Block size:", sblock->size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "# of data block addresses in super block:", sblock->ndblks);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "# of elements in data blocks from this super block:", sblock->dblk_nelmts);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Super Block size:", sblock->size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "# of data block addresses in super block:", sblock->ndblks);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "# of elements in data blocks from this super block:", sblock->dblk_nelmts);
/* Check if there are any data block addresses in super block */
if (sblock->ndblks > 0) {
@@ -337,12 +337,12 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
unsigned u; /* Local index variable */
/* Print the data block addresses in the super block */
- HDfprintf(stream, "%*sData Block Addresses in Super Block:\n", indent, "");
+ fprintf(stream, "%*sData Block Addresses in Super Block:\n", indent, "");
for (u = 0; u < sblock->ndblks; u++) {
/* Print address */
HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
- sblock->dblk_addrs[u]);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
+ sblock->dblk_addrs[u]);
} /* end for */
} /* end if */
@@ -383,15 +383,15 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(dblk_nelmts > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(dblk_nelmts > 0);
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -410,14 +410,14 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
"unable to protect extensible array data block, address = %" PRIuHADDR, addr)
/* Print opening message */
- HDfprintf(stream, "%*sExtensible Array data Block...\n", indent, "");
+ fprintf(stream, "%*sExtensible Array data Block...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Block size:", dblock->size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Block size:", dblock->size);
/* Print the elements in the index block */
- HDfprintf(stream, "%*sElements:\n", indent, "");
+ fprintf(stream, "%*sElements:\n", indent, "");
for (u = 0; u < dblk_nelmts; u++) {
/* Call the class's 'debug' callback */
if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c
index c6d4fbb..5a7cb96 100644
--- a/src/H5EAdblkpage.c
+++ b/src/H5EAdblkpage.c
@@ -92,7 +92,7 @@ H5EA__dblk_page_alloc(H5EA_hdr_t *hdr, H5EA_sblock_t *parent)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Allocate memory for the data block */
if (NULL == (dblk_page = H5FL_CALLOC(H5EA_dblk_page_t)))
@@ -145,7 +145,7 @@ H5EA__dblk_page_create(H5EA_hdr_t *hdr, H5EA_sblock_t *parent, haddr_t addr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Allocate the data block page */
if (NULL == (dblk_page = H5EA__dblk_page_alloc(hdr, parent)))
@@ -215,11 +215,11 @@ H5EA__dblk_page_protect(H5EA_hdr_t *hdr, H5EA_sblock_t *parent, haddr_t dblk_pag
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_page_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_page_addr));
/* only the H5AC__READ_ONLY_FLAG may be set */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -279,7 +279,7 @@ H5EA__dblk_page_unprotect(H5EA_dblk_page_t *dblk_page, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Unprotect the data block page */
if (H5AC_unprotect(dblk_page->hdr->f, H5AC_EARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, cache_flags) < 0)
@@ -311,8 +311,8 @@ H5EA__dblk_page_dest(H5EA_dblk_page_t *dblk_page)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
- HDassert(!dblk_page->has_hdr_depend);
+ assert(dblk_page);
+ assert(!dblk_page->has_hdr_depend);
/* Check if header field has been initialized */
if (dblk_page->hdr) {
@@ -333,7 +333,7 @@ H5EA__dblk_page_dest(H5EA_dblk_page_t *dblk_page)
} /* end if */
/* Sanity check */
- HDassert(NULL == dblk_page->top_proxy);
+ assert(NULL == dblk_page->top_proxy);
/* Free the data block page itself */
dblk_page = H5FL_FREE(H5EA_dblk_page_t, dblk_page);
diff --git a/src/H5EAdblock.c b/src/H5EAdblock.c
index 005de76..5075543 100644
--- a/src/H5EAdblock.c
+++ b/src/H5EAdblock.c
@@ -93,9 +93,9 @@ H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent, size_t nelmts)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(parent);
- HDassert(nelmts > 0);
+ assert(hdr);
+ assert(parent);
+ assert(nelmts > 0);
/* Allocate memory for the data block */
if (NULL == (dblock = H5FL_CALLOC(H5EA_dblock_t)))
@@ -115,7 +115,7 @@ H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent, size_t nelmts)
if (nelmts > hdr->dblk_page_nelmts) {
/* Set the # of pages in the direct block */
dblock->npages = nelmts / hdr->dblk_page_nelmts;
- HDassert(nelmts == (dblock->npages * hdr->dblk_page_nelmts));
+ assert(nelmts == (dblock->npages * hdr->dblk_page_nelmts));
} /* end if */
else {
/* Allocate buffer for elements in data block */
@@ -158,9 +158,9 @@ H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, hbool_t *stats_changed, hsize
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(stats_changed);
- HDassert(nelmts > 0);
+ assert(hdr);
+ assert(stats_changed);
+ assert(nelmts > 0);
/* Allocate the data block */
if (NULL == (dblock = H5EA__dblock_alloc(hdr, parent, nelmts)))
@@ -257,8 +257,8 @@ H5EA__dblock_sblk_idx(const H5EA_hdr_t *hdr, hsize_t idx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(idx >= hdr->cparam.idx_blk_elmts);
+ assert(hdr);
+ assert(idx >= hdr->cparam.idx_blk_elmts);
/* Adjust index for elements in index block */
idx -= hdr->cparam.idx_blk_elmts;
@@ -292,12 +292,12 @@ H5EA__dblock_protect(H5EA_hdr_t *hdr, void *parent, haddr_t dblk_addr, size_t db
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_addr));
- HDassert(dblk_nelmts);
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_addr));
+ assert(dblk_nelmts);
/* only the H5AC__READ_ONLY_FLAG may be set */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -359,7 +359,7 @@ H5EA__dblock_unprotect(H5EA_dblock_t *dblock, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
+ assert(dblock);
/* Unprotect the data block */
if (H5AC_unprotect(dblock->hdr->f, H5AC_EARRAY_DBLOCK, dblock->addr, dblock, cache_flags) < 0)
@@ -393,10 +393,10 @@ H5EA__dblock_delete(H5EA_hdr_t *hdr, void *parent, haddr_t dblk_addr, size_t dbl
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(parent);
- HDassert(H5F_addr_defined(dblk_addr));
- HDassert(dblk_nelmts > 0);
+ assert(hdr);
+ assert(parent);
+ assert(H5F_addr_defined(dblk_addr));
+ assert(dblk_nelmts > 0);
/* Protect data block */
if (NULL == (dblock = H5EA__dblock_protect(hdr, parent, dblk_addr, dblk_nelmts, H5AC__NO_FLAGS_SET)))
@@ -457,15 +457,15 @@ H5EA__dblock_dest(H5EA_dblock_t *dblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
- HDassert(!dblock->has_hdr_depend);
+ assert(dblock);
+ assert(!dblock->has_hdr_depend);
/* Check if shared header field has been initialized */
if (dblock->hdr) {
/* Check if we've got elements in the data block */
if (dblock->elmts && !dblock->npages) {
/* Free buffer for data block elements */
- HDassert(dblock->nelmts > 0);
+ assert(dblock->nelmts > 0);
if (H5EA__hdr_free_elmts(dblock->hdr, dblock->nelmts, dblock->elmts) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL,
"unable to free extensible array data block element buffer")
@@ -481,7 +481,7 @@ H5EA__dblock_dest(H5EA_dblock_t *dblock)
} /* end if */
/* Sanity check */
- HDassert(NULL == dblock->top_proxy);
+ assert(NULL == dblock->top_proxy);
/* Free the data block itself */
dblock = H5FL_FREE(H5EA_dblock_t, dblock);
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index 7b5aff5..53825a9 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -110,7 +110,7 @@ H5EA__hdr_alloc(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
+ assert(f);
/* Allocate space for the shared information */
if (NULL == (hdr = H5FL_CALLOC(H5EA_hdr_t)))
@@ -183,10 +183,10 @@ H5EA__hdr_init(H5EA_hdr_t *hdr, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->cparam.max_nelmts_bits);
- HDassert(hdr->cparam.data_blk_min_elmts);
- HDassert(hdr->cparam.sup_blk_min_data_ptrs);
+ assert(hdr);
+ assert(hdr->cparam.max_nelmts_bits);
+ assert(hdr->cparam.data_blk_min_elmts);
+ assert(hdr->cparam.sup_blk_min_data_ptrs);
/* Compute general information */
hdr->nsblks = 1 + (hdr->cparam.max_nelmts_bits - H5VM_log2_of2(hdr->cparam.data_blk_min_elmts));
@@ -247,8 +247,8 @@ H5EA__hdr_alloc_elmts(H5EA_hdr_t *hdr, size_t nelmts)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(nelmts > 0);
+ assert(hdr);
+ assert(nelmts > 0);
/* Compute the index of the element buffer factory */
H5_CHECK_OVERFLOW(nelmts, /*From:*/ size_t, /*To:*/ uint32_t);
@@ -266,8 +266,8 @@ H5EA__hdr_alloc_elmts(H5EA_hdr_t *hdr, size_t nelmts)
"memory allocation failed for data block data element buffer factory array")
/* Zero out new elements allocated */
- HDmemset(new_fac + hdr->elmt_fac.nalloc, 0,
- (new_nalloc - hdr->elmt_fac.nalloc) * sizeof(H5FL_fac_head_ptr_t));
+ memset(new_fac + hdr->elmt_fac.nalloc, 0,
+ (new_nalloc - hdr->elmt_fac.nalloc) * sizeof(H5FL_fac_head_ptr_t));
/* Update information about element factories in header */
hdr->elmt_fac.nalloc = new_nalloc;
@@ -316,17 +316,17 @@ H5EA__hdr_free_elmts(H5EA_hdr_t *hdr, size_t nelmts, void *elmts)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(nelmts > 0);
- HDassert(elmts);
+ assert(hdr);
+ assert(nelmts > 0);
+ assert(elmts);
/* Compute the index of the element buffer factory */
H5_CHECK_OVERFLOW(nelmts, /*From:*/ size_t, /*To:*/ uint32_t);
idx = H5VM_log2_of2((uint32_t)nelmts) - H5VM_log2_of2((uint32_t)hdr->cparam.data_blk_min_elmts);
/* Free buffer for elements in index block */
- HDassert(idx < hdr->elmt_fac.nalloc);
- HDassert(hdr->elmt_fac.fac[idx]);
+ assert(idx < hdr->elmt_fac.nalloc);
+ assert(hdr->elmt_fac.fac[idx]);
elmts = H5FL_FAC_FREE(hdr->elmt_fac.fac[idx], elmts);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -355,8 +355,8 @@ H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
#ifndef NDEBUG
{
@@ -484,7 +484,7 @@ H5EA__hdr_incr(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as un-evictable when something is depending on it */
if (hdr->rc == 0)
@@ -518,15 +518,15 @@ H5EA__hdr_decr(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->rc);
+ assert(hdr);
+ assert(hdr->rc);
/* Decrement reference count on shared header */
hdr->rc--;
/* Mark header as evictable again when nothing depend on it */
if (hdr->rc == 0) {
- HDassert(hdr->file_rc == 0);
+ assert(hdr->file_rc == 0);
if (H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPIN, FAIL, "unable to unpin extensible array header")
}
@@ -553,7 +553,7 @@ H5EA__hdr_fuse_incr(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Increment file reference count on shared header */
hdr->file_rc++;
@@ -582,8 +582,8 @@ H5EA__hdr_fuse_decr(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->file_rc);
+ assert(hdr);
+ assert(hdr->file_rc);
/* Decrement file reference count on shared header */
hdr->file_rc--;
@@ -614,8 +614,8 @@ H5EA__hdr_modified(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->f);
+ assert(hdr);
+ assert(hdr->f);
/* Mark header as dirty in cache */
if (H5AC_mark_entry_dirty(hdr) < 0)
@@ -647,11 +647,11 @@ H5EA__hdr_protect(H5F_t *f, haddr_t ea_addr, void *ctx_udata, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(ea_addr));
+ assert(f);
+ assert(H5F_addr_defined(ea_addr));
/* only the H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for cache callbacks */
udata.f = f;
@@ -703,7 +703,7 @@ H5EA__hdr_unprotect(H5EA_hdr_t *hdr, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Unprotect the header */
if (H5AC_unprotect(hdr->f, H5AC_EARRAY_HDR, hdr->addr, hdr, cache_flags) < 0)
@@ -735,8 +735,8 @@ H5EA__hdr_delete(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(!hdr->file_rc);
+ assert(hdr);
+ assert(!hdr->file_rc);
#ifndef NDEBUG
unsigned hdr_status = 0; /* Array header's status in the metadata cache */
@@ -746,8 +746,8 @@ H5EA__hdr_delete(H5EA_hdr_t *hdr)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to check metadata cache status for array header")
/* Sanity checks on array header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PROTECTED);
#endif /* NDEBUG */
/* Check for index block */
@@ -789,8 +789,8 @@ H5EA__hdr_dest(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(hdr->rc == 0);
+ assert(hdr);
+ assert(hdr->rc == 0);
/* Destroy the callback context */
if (hdr->cb_ctx) {
@@ -805,7 +805,7 @@ H5EA__hdr_dest(H5EA_hdr_t *hdr)
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(hdr->elmt_fac.nalloc > 0);
+ assert(hdr->elmt_fac.nalloc > 0);
/* Iterate over factories, shutting them down */
for (u = 0; u < hdr->elmt_fac.nalloc; u++) {
diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c
index d0cdb7e..2a472e5 100644
--- a/src/H5EAiblock.c
+++ b/src/H5EAiblock.c
@@ -99,7 +99,7 @@ H5EA__iblock_alloc(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Allocate memory for the index block */
if (NULL == (iblock = H5FL_CALLOC(H5EA_iblock_t)))
@@ -172,8 +172,8 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(stats_changed);
+ assert(hdr);
+ assert(stats_changed);
/* Allocate the index block */
if (NULL == (iblock = H5EA__iblock_alloc(hdr)))
@@ -228,8 +228,8 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed)
} /* end if */
/* Update extensible array index block statistics */
- HDassert(0 == hdr->stats.computed.nindex_blks);
- HDassert(0 == hdr->stats.computed.index_blk_size);
+ assert(0 == hdr->stats.computed.nindex_blks);
+ assert(0 == hdr->stats.computed.index_blk_size);
hdr->stats.computed.nindex_blks = 1;
hdr->stats.computed.index_blk_size = iblock->size;
@@ -287,10 +287,10 @@ H5EA__iblock_protect(H5EA_hdr_t *hdr, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* only the H5AC__READ_ONLY_FLAG may be set */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Protect the index block */
if (NULL ==
@@ -345,7 +345,7 @@ H5EA__iblock_unprotect(H5EA_iblock_t *iblock, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Unprotect the index block */
if (H5AC_unprotect(iblock->hdr->f, H5AC_EARRAY_IBLOCK, iblock->addr, iblock, cache_flags) < 0)
@@ -378,8 +378,8 @@ H5EA__iblock_delete(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->idx_blk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->idx_blk_addr));
/* Protect index block */
if (NULL == (iblock = H5EA__iblock_protect(hdr, H5AC__NO_FLAGS_SET)))
@@ -464,21 +464,21 @@ H5EA__iblock_dest(H5EA_iblock_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Check if shared header field has been initialized */
if (iblock->hdr) {
/* Check if we've got elements in the index block */
if (iblock->elmts) {
/* Free buffer for index block elements */
- HDassert(iblock->hdr->cparam.idx_blk_elmts > 0);
+ assert(iblock->hdr->cparam.idx_blk_elmts > 0);
iblock->elmts = H5FL_BLK_FREE(idx_blk_elmt_buf, iblock->elmts);
} /* end if */
/* Check if we've got data block addresses in the index block */
if (iblock->dblk_addrs) {
/* Free buffer for index block data block addresses */
- HDassert(iblock->ndblk_addrs > 0);
+ assert(iblock->ndblk_addrs > 0);
iblock->dblk_addrs = H5FL_SEQ_FREE(haddr_t, iblock->dblk_addrs);
iblock->ndblk_addrs = 0;
} /* end if */
@@ -486,7 +486,7 @@ H5EA__iblock_dest(H5EA_iblock_t *iblock)
/* Check if we've got super block addresses in the index block */
if (iblock->sblk_addrs) {
/* Free buffer for index block super block addresses */
- HDassert(iblock->nsblk_addrs > 0);
+ assert(iblock->nsblk_addrs > 0);
iblock->sblk_addrs = H5FL_SEQ_FREE(haddr_t, iblock->sblk_addrs);
iblock->nsblk_addrs = 0;
} /* end if */
@@ -499,7 +499,7 @@ H5EA__iblock_dest(H5EA_iblock_t *iblock)
} /* end if */
/* Sanity check */
- HDassert(NULL == iblock->top_proxy);
+ assert(NULL == iblock->top_proxy);
/* Free the index block itself */
iblock = H5FL_FREE(H5EA_iblock_t, iblock);
diff --git a/src/H5EAint.c b/src/H5EAint.c
index 6dabeeb..73b1158 100644
--- a/src/H5EAint.c
+++ b/src/H5EAint.c
@@ -86,8 +86,8 @@ H5EA__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Create a flush dependency between parent and child entry */
if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0)
@@ -117,8 +117,8 @@ H5EA__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Destroy a flush dependency between parent and child entry */
if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0)
diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c
index 0ba1fca..176a8e2 100644
--- a/src/H5EAsblock.c
+++ b/src/H5EAsblock.c
@@ -99,7 +99,7 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Allocate memory for the index block */
if (NULL == (sblock = H5FL_CALLOC(H5EA_sblock_t)))
@@ -118,7 +118,7 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx)
/* Compute/cache information */
sblock->idx = sblk_idx;
sblock->ndblks = hdr->sblk_info[sblk_idx].ndblks;
- HDassert(sblock->ndblks);
+ assert(sblock->ndblks);
sblock->dblk_nelmts = hdr->sblk_info[sblk_idx].dblk_nelmts;
/* Allocate buffer for data block addresses in super block */
@@ -132,14 +132,14 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx)
sblock->dblk_npages = sblock->dblk_nelmts / hdr->dblk_page_nelmts;
/* Sanity check that we have at least 2 pages in data block */
- HDassert(sblock->dblk_npages > 1);
+ assert(sblock->dblk_npages > 1);
/* Sanity check for integer truncation */
- HDassert((sblock->dblk_npages * hdr->dblk_page_nelmts) == sblock->dblk_nelmts);
+ assert((sblock->dblk_npages * hdr->dblk_page_nelmts) == sblock->dblk_nelmts);
/* Compute size of buffer for each data block's 'page init' bitmask */
sblock->dblk_page_init_size = ((sblock->dblk_npages) + 7) / 8;
- HDassert(sblock->dblk_page_init_size > 0);
+ assert(sblock->dblk_page_init_size > 0);
/* Allocate buffer for all 'page init' bitmasks in super block */
if (NULL ==
@@ -186,8 +186,8 @@ H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, hbool_t *stats_chang
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(stats_changed);
+ assert(hdr);
+ assert(stats_changed);
/* Allocate the super block */
if (NULL == (sblock = H5EA__sblock_alloc(hdr, parent, sblk_idx)))
@@ -280,11 +280,11 @@ H5EA__sblock_protect(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, haddr_t sblk_addr,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(sblk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(sblk_addr));
/* only the H5AC__READ_ONLY_FLAG may be set */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -345,7 +345,7 @@ H5EA__sblock_unprotect(H5EA_sblock_t *sblock, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sblock);
+ assert(sblock);
/* Unprotect the super block */
if (H5AC_unprotect(sblock->hdr->f, H5AC_EARRAY_SBLOCK, sblock->addr, sblock, cache_flags) < 0)
@@ -379,8 +379,8 @@ H5EA__sblock_delete(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, haddr_t sblk_addr, u
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(sblk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(sblk_addr));
/* Protect super block */
if (NULL == (sblock = H5EA__sblock_protect(hdr, parent, sblk_addr, sblk_idx, H5AC__NO_FLAGS_SET)))
@@ -428,8 +428,8 @@ H5EA__sblock_dest(H5EA_sblock_t *sblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sblock);
- HDassert(!sblock->has_hdr_depend);
+ assert(sblock);
+ assert(!sblock->has_hdr_depend);
/* Check if shared header field has been initialized */
if (sblock->hdr) {
@@ -439,7 +439,7 @@ H5EA__sblock_dest(H5EA_sblock_t *sblock)
/* Free buffer for super block 'page init' bitmask, if there is one */
if (sblock->page_init) {
- HDassert(sblock->dblk_npages > 0);
+ assert(sblock->dblk_npages > 0);
sblock->page_init = H5FL_BLK_FREE(page_init, sblock->page_init);
} /* end if */
@@ -451,7 +451,7 @@ H5EA__sblock_dest(H5EA_sblock_t *sblock)
} /* end if */
/* Sanity check */
- HDassert(NULL == sblock->top_proxy);
+ assert(NULL == sblock->top_proxy);
/* Free the super block itself */
sblock = H5FL_FREE(H5EA_sblock_t, sblock);
diff --git a/src/H5EAstat.c b/src/H5EAstat.c
index 2f955ff..7c8ef1f 100644
--- a/src/H5EAstat.c
+++ b/src/H5EAstat.c
@@ -85,8 +85,8 @@ H5EA_get_stats(const H5EA_t *ea, H5EA_stat_t *stats)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(ea);
- HDassert(stats);
+ assert(ea);
+ assert(stats);
/* Copy extensible array statistics */
H5MM_memcpy(stats, &ea->hdr->stats, sizeof(ea->hdr->stats));
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 474e925..6167954 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -164,7 +164,7 @@ H5EA__test_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
/* Release context structure */
ctx = H5FL_FREE(H5EA__test_ctx_t, ctx);
@@ -193,8 +193,8 @@ H5EA__test_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
+ assert(nat_blk);
+ assert(nelmts);
H5VM_array_fill(nat_blk, &fill_val, sizeof(uint64_t), nelmts);
@@ -224,10 +224,10 @@ H5EA__test_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
/* Check for callback action */
if (ctx->cb) {
@@ -276,10 +276,10 @@ H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_NDE
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -317,13 +317,13 @@ H5EA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx);
- HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
- (unsigned long long)*(const uint64_t *)elmt);
+ fprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
+ (unsigned long long)*(const uint64_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5EA__test_debug() */
@@ -379,7 +379,7 @@ H5EA__test_dst_dbg_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(_ctx);
+ assert(_ctx);
/* Release context structure */
ctx = H5FL_FREE(H5EA__ctx_cb_t, ctx);
@@ -406,8 +406,8 @@ H5EA__get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(ea);
- HDassert(cparam);
+ assert(ea);
+ assert(cparam);
/* Get extensible array creation parameters */
cparam->raw_elmt_size = ea->hdr->cparam.raw_elmt_size;
@@ -441,8 +441,8 @@ H5EA__cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(cparam1);
- HDassert(cparam2);
+ assert(cparam1);
+ assert(cparam2);
/* Compare creation parameters for array */
if (cparam1->raw_elmt_size < cparam2->raw_elmt_size)
diff --git a/src/H5ESevent.c b/src/H5ESevent.c
index abd7fbf..c91d052 100644
--- a/src/H5ESevent.c
+++ b/src/H5ESevent.c
@@ -93,8 +93,8 @@ H5ES__event_new(H5VL_t *connector, void *token)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(connector);
- HDassert(token);
+ assert(connector);
+ assert(token);
/* Create vol object for token */
if (NULL == (request = H5VL_create_object(token, connector))) {
@@ -137,7 +137,7 @@ H5ES__event_free(H5ES_event_t *ev)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
+ assert(ev);
/* The 'app_func_name', 'app_file_name', and 'api_name' strings are statically allocated (by the compiler)
* and are not allocated, so there's no need to free them.
@@ -183,7 +183,7 @@ H5ES__event_completed(H5ES_event_t *ev, H5ES_event_list_t *el)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
+ assert(ev);
/* Remove the event from the event list */
H5ES__list_remove(el, ev);
diff --git a/src/H5ESint.c b/src/H5ESint.c
index f820850..192db85 100644
--- a/src/H5ESint.c
+++ b/src/H5ESint.c
@@ -195,7 +195,7 @@ H5ES__close_cb(void *_es, void H5_ATTR_UNUSED **rt)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
+ assert(es);
/* Close the event set object */
if (H5ES__close(es) < 0)
@@ -264,7 +264,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
+ assert(es);
/* Create new event */
if (NULL == (ev = H5ES__event_new(connector, request_token)))
@@ -291,7 +291,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app
* there's no need to duplicate it.
*/
ev->op_info.api_name = caller;
- HDassert(ev->op_info.api_args == NULL);
+ assert(ev->op_info.api_args == NULL);
if (api_args && NULL == (ev->op_info.api_args = H5MM_xstrdup(api_args)))
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, FAIL, "can't copy API routine arguments")
@@ -345,10 +345,10 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(connector);
- HDassert(token);
- HDassert(caller);
- HDassert(caller_args);
+ assert(connector);
+ assert(token);
+ assert(caller);
+ assert(caller_args);
/* Get event set */
if (NULL == (es = (H5ES_t *)H5I_object_verify(es_id, H5I_EVENTSET)))
@@ -359,16 +359,16 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "event set has failed operations")
/* Start working on the API routines arguments */
- HDva_start(ap, caller_args);
+ va_start(ap, caller_args);
arg_started = TRUE;
/* Copy the app source information */
- (void)HDva_arg(ap, char *); /* Toss the 'app_file' parameter name */
- app_file = HDva_arg(ap, char *);
- (void)HDva_arg(ap, char *); /* Toss the 'app_func' parameter name */
- app_func = HDva_arg(ap, char *);
- (void)HDva_arg(ap, char *); /* Toss the 'app_line' parameter name */
- app_line = HDva_arg(ap, unsigned);
+ (void)va_arg(ap, char *); /* Toss the 'app_file' parameter name */
+ app_file = va_arg(ap, char *);
+ (void)va_arg(ap, char *); /* Toss the 'app_func' parameter name */
+ app_func = va_arg(ap, char *);
+ (void)va_arg(ap, char *); /* Toss the 'app_line' parameter name */
+ app_line = va_arg(ap, unsigned);
/* Create the string for the API routine's arguments */
if (NULL == (rs = H5RS_create(NULL)))
@@ -376,7 +376,7 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
/* Copy the string for the API routine's arguments */
/* (skip the six characters from the app's file, function and line # arguments) */
- HDassert(0 == HDstrncmp(caller_args, "*s*sIu", 6));
+ assert(0 == HDstrncmp(caller_args, "*s*sIu", 6));
if (H5_trace_args(rs, caller_args + 6, ap) < 0)
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTSET, FAIL, "can't create formatted API arguments")
if (NULL == (api_args = H5RS_get_str(rs)))
@@ -389,7 +389,7 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
done:
/* Clean up */
if (arg_started)
- HDva_end(ap);
+ va_end(ap);
if (rs)
H5RS_decr(rs);
@@ -416,9 +416,9 @@ H5ES__insert_request(H5ES_t *es, H5VL_t *connector, void *token)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(connector);
- HDassert(token);
+ assert(es);
+ assert(connector);
+ assert(token);
/* Insert an 'anonymous' operation into the event set */
if (H5ES__insert(es, connector, token, NULL, NULL, 0, NULL, NULL) < 0)
@@ -450,9 +450,9 @@ H5ES__get_requests_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ev);
- HDassert(ctx);
- HDassert(ctx->i < ctx->array_len);
+ assert(ev);
+ assert(ctx);
+ assert(ctx->i < ctx->array_len);
/* Get the connector ID for the event */
if (ctx->connector_ids)
@@ -490,9 +490,9 @@ H5ES__get_requests(H5ES_t *es, H5_iter_order_t order, hid_t *connector_ids, void
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(array_len > 0);
- HDassert(requests || connector_ids);
+ assert(es);
+ assert(array_len > 0);
+ assert(requests || connector_ids);
/* Set up context for iterator callbacks */
ctx.connector_ids = connector_ids;
@@ -526,9 +526,9 @@ H5ES__handle_fail(H5ES_t *es, H5ES_event_t *ev)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(es);
- HDassert(es->active.head);
- HDassert(ev);
+ assert(es);
+ assert(es->active.head);
+ assert(ev);
/* Set error flag for event set */
es->err_occurred = TRUE;
@@ -564,10 +564,10 @@ H5ES__op_complete(H5ES_t *es, H5ES_event_t *ev, H5VL_request_status_t ev_status)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(ev);
- HDassert(H5VL_REQUEST_STATUS_SUCCEED == ev_status || H5VL_REQUEST_STATUS_FAIL == ev_status ||
- H5VL_REQUEST_STATUS_CANCELED == ev_status);
+ assert(es);
+ assert(ev);
+ assert(H5VL_REQUEST_STATUS_SUCCEED == ev_status || H5VL_REQUEST_STATUS_FAIL == ev_status ||
+ H5VL_REQUEST_STATUS_CANCELED == ev_status);
/* Handle each form of event completion */
if (H5VL_REQUEST_STATUS_SUCCEED == ev_status || H5VL_REQUEST_STATUS_CANCELED == ev_status) {
@@ -660,8 +660,8 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
- HDassert(ctx);
+ assert(ev);
+ assert(ctx);
/* Wait on the request */
if (ctx->timeout != H5ES_WAIT_NONE && ctx->timeout != H5ES_WAIT_FOREVER)
@@ -694,7 +694,7 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx)
"received \"can't cancel\" status for operation")
else {
/* Sanity check */
- HDassert(ev_status == H5VL_REQUEST_STATUS_IN_PROGRESS);
+ assert(ev_status == H5VL_REQUEST_STATUS_IN_PROGRESS);
/* Increment "in progress operation" counter */
(*ctx->num_in_progress)++;
@@ -736,9 +736,9 @@ H5ES__wait(H5ES_t *es, uint64_t timeout, size_t *num_in_progress, hbool_t *op_fa
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(num_in_progress);
- HDassert(op_failed);
+ assert(es);
+ assert(num_in_progress);
+ assert(op_failed);
/* Set user's parameters to known values */
*num_in_progress = 0;
@@ -780,8 +780,8 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
- HDassert(ctx);
+ assert(ev);
+ assert(ctx);
/* Attempt to cancel the request */
if (H5VL_request_cancel(ev->request, &ev_status) < 0)
@@ -813,7 +813,7 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx)
} /* end else-if */
else {
/* Sanity check */
- HDassert(ev_status == H5VL_REQUEST_STATUS_CANCELED);
+ assert(ev_status == H5VL_REQUEST_STATUS_CANCELED);
/* Handle event completion */
if (H5ES__op_complete(ctx->es, ev, ev_status) < 0)
@@ -845,9 +845,9 @@ H5ES__cancel(H5ES_t *es, size_t *num_not_canceled, hbool_t *op_failed)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(num_not_canceled);
- HDassert(op_failed);
+ assert(es);
+ assert(num_not_canceled);
+ assert(op_failed);
/* Set user's parameters to known values */
*num_not_canceled = 0;
@@ -888,8 +888,8 @@ H5ES__get_err_info_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
- HDassert(ctx);
+ assert(ev);
+ assert(ctx);
/* Copy operation info for event */
/* The 'app_func_name', 'app_file_name', and 'api_name' strings are statically allocated (by the compiler)
@@ -961,10 +961,10 @@ H5ES__get_err_info(H5ES_t *es, size_t num_err_info, H5ES_err_info_t err_info[],
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(num_err_info);
- HDassert(err_info);
- HDassert(num_cleared);
+ assert(es);
+ assert(num_err_info);
+ assert(err_info);
+ assert(num_cleared);
/* Set up context for iterator callbacks */
ctx.es = es;
@@ -1004,8 +1004,8 @@ H5ES__close_failed_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
- HDassert(es);
+ assert(ev);
+ assert(es);
/* Remove event from event set's failed list */
H5ES__list_remove(&es->failed, ev);
@@ -1038,7 +1038,7 @@ H5ES__close(H5ES_t *es)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
+ assert(es);
/* Fail if active operations still present */
if (H5ES__list_count(&es->active) > 0)
diff --git a/src/H5ESlist.c b/src/H5ESlist.c
index 61a9dd1..e9cedbf 100644
--- a/src/H5ESlist.c
+++ b/src/H5ESlist.c
@@ -85,8 +85,8 @@ H5ES__list_append(H5ES_event_list_t *el, H5ES_event_t *ev)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(el);
- HDassert(ev);
+ assert(el);
+ assert(ev);
ev->next = NULL;
@@ -123,7 +123,7 @@ H5ES__list_count(const H5ES_event_list_t *el)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(el);
+ assert(el);
FUNC_LEAVE_NOAPI(el->count)
} /* end H5ES__list_count() */
@@ -156,8 +156,8 @@ H5ES__list_iterate(H5ES_event_list_t *el, H5_iter_order_t order, H5ES_list_iter_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(el);
- HDassert(cb);
+ assert(el);
+ assert(cb);
/* Iterate over events in list */
ev = (order == H5_ITER_DEC) ? el->tail : el->head;
@@ -199,9 +199,9 @@ H5ES__list_remove(H5ES_event_list_t *el, const H5ES_event_t *ev)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(el);
- HDassert(el->head);
- HDassert(ev);
+ assert(el);
+ assert(el->head);
+ assert(ev);
/* Stitch event out of list */
if (ev == el->head)
diff --git a/src/H5Eint.c b/src/H5Eint.c
index b1f11bd..788a083 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -121,7 +121,7 @@ H5E__get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(msg);
+ assert(msg);
/* Get the length of the message string */
len = (ssize_t)HDstrlen(msg->msg);
@@ -192,7 +192,7 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(err_desc);
+ assert(err_desc);
/* If no client data was passed, output to stderr */
if (!client_data)
@@ -226,10 +226,10 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
if (cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
- (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
- (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
- (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
+ fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
+ (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
+ (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
/* try show the process or thread id in multiple processes cases*/
#ifdef H5_HAVE_PARALLEL
@@ -241,15 +241,15 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
if (mpi_initialized && !mpi_finalized) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDfprintf(stream, "MPI-process %d", mpi_rank);
+ fprintf(stream, "MPI-process %d", mpi_rank);
} /* end if */
else
- HDfprintf(stream, "thread 0");
+ fprintf(stream, "thread 0");
} /* end block */
#else
- HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id());
+ fprintf(stream, "thread %" PRIu64, H5TS_thread_id());
#endif
- HDfprintf(stream, ":\n");
+ fprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
@@ -257,11 +257,10 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
have_desc = 0;
/* Print error message */
- HDfprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
- err_desc->line, err_desc->func_name, (have_desc ? ": " : ""),
- (have_desc ? err_desc->desc : ""));
- HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ fprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
+ err_desc->line, err_desc->func_name, (have_desc ? ": " : ""), (have_desc ? err_desc->desc : ""));
+ fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -315,7 +314,7 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(err_desc);
+ assert(err_desc);
/* If no client data was passed, output to stderr */
if (!client_data)
@@ -354,10 +353,10 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
if (cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
- (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
- (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
- (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
+ fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
+ (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
+ (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
/* try show the process or thread id in multiple processes cases*/
#ifdef H5_HAVE_PARALLEL
@@ -369,15 +368,15 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
if (mpi_initialized && !mpi_finalized) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDfprintf(stream, "MPI-process %d", mpi_rank);
+ fprintf(stream, "MPI-process %d", mpi_rank);
} /* end if */
else
- HDfprintf(stream, "thread 0");
+ fprintf(stream, "thread 0");
} /* end block */
#else
- HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id());
+ fprintf(stream, "thread %" PRIu64, H5TS_thread_id());
#endif
- HDfprintf(stream, ":\n");
+ fprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
@@ -385,11 +384,10 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
have_desc = 0;
/* Print error message */
- HDfprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
- err_desc->line, err_desc->func_name, (have_desc ? ": " : ""),
- (have_desc ? err_desc->desc : ""));
- HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ fprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
+ err_desc->line, err_desc->func_name, (have_desc ? ": " : ""), (have_desc ? err_desc->desc : ""));
+ fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -421,7 +419,7 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(estack);
+ assert(estack);
/* If no stream was given, use stderr */
if (!stream)
@@ -430,7 +428,7 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
eprint.stream = stream;
/* Reset the original error class information */
- HDmemset(&eprint.cls, 0, sizeof(H5E_cls_t));
+ memset(&eprint.cls, 0, sizeof(H5E_cls_t));
/* Walk the error stack */
if (bk_compatible) {
@@ -440,7 +438,7 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
if (H5E__walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void *)&eprint) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
#else /* H5_NO_DEPRECATED_SYMBOLS */
- HDassert(0 && "version 1 error stack print without deprecated symbols!");
+ assert(0 && "version 1 error stack print without deprecated symbols!");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* end if */
else {
@@ -493,8 +491,8 @@ H5E__walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *o
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(estack);
- HDassert(op);
+ assert(estack);
+ assert(op);
/* check args, but rather than failing use some default value */
if (direction != H5E_WALK_UPWARD && direction != H5E_WALK_DOWNWARD)
@@ -539,11 +537,11 @@ H5E__walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *o
HERROR(H5E_ERROR, H5E_CANTLIST, "can't walk error stack");
} /* end if */
#else /* H5_NO_DEPRECATED_SYMBOLS */
- HDassert(0 && "version 1 error stack walk without deprecated symbols!");
+ assert(0 && "version 1 error stack walk without deprecated symbols!");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* end if */
else {
- HDassert(op->vers == 2);
+ assert(op->vers == 2);
if (op->u.func2) {
ret_value = SUCCEED;
if (H5E_WALK_UPWARD == direction) {
@@ -585,7 +583,7 @@ H5E__get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **client_data)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(estack);
+ assert(estack);
/* Retrieve the requested information */
if (op)
@@ -624,7 +622,7 @@ H5E__set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(estack);
+ assert(estack);
/* Set the automatic error reporting info */
estack->auto_op = *op;
@@ -664,10 +662,10 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(cls_id > 0);
- HDassert(maj_id > 0);
- HDassert(min_id > 0);
- HDassert(fmt);
+ assert(cls_id > 0);
+ assert(maj_id > 0);
+ assert(min_id > 0);
+ assert(fmt);
/* Note that the variable-argument parsing for the format is identical in
* the H5Epush2() routine - correct errors and make changes in both
@@ -675,7 +673,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
*/
/* Start the variable-argument parsing */
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
va_started = TRUE;
/* Use the vasprintf() routine, since it does what we're trying to do below */
@@ -688,12 +686,12 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
done:
if (va_started)
- HDva_end(ap);
+ va_end(ap);
/* Memory was allocated with HDvasprintf so it needs to be freed
- * with HDfree
+ * with free
*/
if (tmp)
- HDfree(tmp);
+ free(tmp);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_printf_stack() */
@@ -734,9 +732,9 @@ H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(cls_id > 0);
- HDassert(maj_id > 0);
- HDassert(min_id > 0);
+ assert(cls_id > 0);
+ assert(maj_id > 0);
+ assert(min_id > 0);
/* Check for 'default' error stack */
if (estack == NULL)
@@ -758,7 +756,7 @@ H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line
/*
* Push the error if there's room. Otherwise just forget it.
*/
- HDassert(estack);
+ assert(estack);
if (estack->nused < H5E_NSLOTS) {
/* Increment the IDs to indicate that they are used in this stack */
@@ -809,8 +807,8 @@ H5E__clear_entries(H5E_t *estack, size_t nentries)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(estack);
- HDassert(estack->nused >= nentries);
+ assert(estack);
+ assert(estack->nused >= nentries);
/* Empty the error stack from the top down */
for (u = 0; nentries > 0; nentries--, u++) {
@@ -869,7 +867,7 @@ H5E_clear_stack(H5E_t *estack)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Empty the error stack */
- HDassert(estack);
+ assert(estack);
if (estack->nused)
if (H5E__clear_entries(estack, estack->nused) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack")
@@ -899,8 +897,8 @@ H5E__pop(H5E_t *estack, size_t count)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(estack);
- HDassert(estack->nused >= count);
+ assert(estack);
+ assert(estack->nused >= count);
/* Remove the entries from the error stack */
if (H5E__clear_entries(estack, count) < 0)
@@ -935,7 +933,7 @@ H5E_dump_api_stack(hbool_t is_api)
if (is_api) {
H5E_t *estack = H5E__get_my_stack();
- HDassert(estack);
+ assert(estack);
#ifdef H5_NO_DEPRECATED_SYMBOLS
if (estack->auto_op.func2)
diff --git a/src/H5F.c b/src/H5F.c
index f533a8d..7b88519 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1259,7 +1259,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "can't create VOL object for root group")
} /* end if */
else {
- HDassert(H5I_GROUP == loc_type);
+ assert(H5I_GROUP == loc_type);
if (NULL == (loc_vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get location object")
} /* end else */
@@ -1292,7 +1292,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
done:
/* Clean up if we temporarily opened the root group for a file */
if (grp) {
- HDassert(loc_vol_obj);
+ assert(loc_vol_obj);
if (H5VL_group_close(loc_vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, FAIL, "unable to release group")
if (H5VL_free_object(loc_vol_obj) < 0)
@@ -1369,7 +1369,7 @@ H5Funmount(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "can't create VOL object for root group")
} /* end if */
else {
- HDassert(H5I_GROUP == loc_type);
+ assert(H5I_GROUP == loc_type);
if (NULL == (loc_vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get location object")
} /* end else */
@@ -1388,7 +1388,7 @@ H5Funmount(hid_t loc_id, const char *name)
done:
/* Clean up if we temporarily opened the root group for a file */
if (grp) {
- HDassert(loc_vol_obj);
+ assert(loc_vol_obj);
if (H5VL_group_close(loc_vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, FAIL, "unable to release group")
if (H5VL_free_object(loc_vol_obj) < 0)
diff --git a/src/H5FA.c b/src/H5FA.c
index 59ec66f..1efc749 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -111,8 +111,8 @@ H5FA__new(H5F_t *f, haddr_t fa_addr, hbool_t from_open, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(fa_addr));
+ assert(f);
+ assert(H5F_addr_defined(fa_addr));
/* Allocate fixed array wrapper */
if (NULL == (fa = H5FL_CALLOC(H5FA_t)))
@@ -175,8 +175,8 @@ H5FA_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* H5FA interface sanity check */
HDcompile_assert(H5FA_NUM_CLS_ID == NELMTS(H5FA_client_class_g));
@@ -223,8 +223,8 @@ H5FA_open(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(fa_addr));
+ assert(f);
+ assert(H5F_addr_defined(fa_addr));
/* Allocate and initialize new fixed array wrapper */
if (NULL == (fa = H5FA__new(f, fa_addr, TRUE, ctx_udata)))
@@ -260,8 +260,8 @@ H5FA_get_nelmts(const H5FA_t *fa, hsize_t *nelmts)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(fa);
- HDassert(nelmts);
+ assert(fa);
+ assert(nelmts);
/* Retrieve the current number of elements in the fixed array */
*nelmts = fa->hdr->stats.nelmts;
@@ -287,9 +287,9 @@ H5FA_get_addr(const H5FA_t *fa, haddr_t *addr)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(fa);
- HDassert(fa->hdr);
- HDassert(addr);
+ assert(fa);
+ assert(fa->hdr);
+ assert(addr);
/* Retrieve the address of the fixed array's header */
*addr = fa->hdr->addr;
@@ -324,8 +324,8 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(fa);
- HDassert(fa->hdr);
+ assert(fa);
+ assert(fa->hdr);
/* Set the shared array header's file context for this operation */
hdr->f = fa->f;
@@ -338,7 +338,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create fixed array data block")
}
- HDassert(idx < hdr->cparam.nelmts);
+ assert(idx < hdr->cparam.nelmts);
/* Protect data block */
if (NULL == (dblock = H5FA__dblock_protect(hdr, hdr->dblk_addr, H5AC__NO_FLAGS_SET)))
@@ -435,8 +435,8 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(fa);
- HDassert(fa->hdr);
+ assert(fa);
+ assert(fa->hdr);
/* Set the shared array header's file context for this operation */
hdr->f = fa->f;
@@ -449,7 +449,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
} /* end if */
else {
/* Get the data block */
- HDassert(H5F_addr_defined(hdr->dblk_addr));
+ assert(H5F_addr_defined(hdr->dblk_addr));
if (NULL == (dblock = H5FA__dblock_protect(hdr, hdr->dblk_addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL,
"unable to protect fixed array data block, address = %llu",
@@ -538,7 +538,7 @@ H5FA_close(H5FA_t *fa)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(fa);
+ assert(fa);
/* Close the header if it was set */
if (fa->hdr) {
@@ -574,9 +574,9 @@ H5FA_close(H5FA_t *fa)
"unable to check metadata cache status for fixed array header")
/* Sanity checks on header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PINNED);
- HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PINNED);
+ assert(!(hdr_status & H5AC_ES__IS_PROTECTED));
}
#endif /* NDEBUG */
@@ -639,8 +639,8 @@ H5FA_delete(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(fa_addr));
+ assert(f);
+ assert(H5F_addr_defined(fa_addr));
/* Lock the array header into memory */
if (NULL == (hdr = H5FA__hdr_protect(f, fa_addr, ctx_udata, H5AC__NO_FLAGS_SET)))
@@ -693,9 +693,9 @@ H5FA_iterate(H5FA_t *fa, H5FA_operator_t op, void *udata)
FUNC_ENTER_NOAPI(H5_ITER_ERROR)
/* Check arguments */
- HDassert(fa);
- HDassert(op);
- HDassert(udata);
+ assert(fa);
+ assert(op);
+ assert(udata);
/* Allocate space for a native array element */
if (NULL == (elmt = H5FL_BLK_MALLOC(fa_native_elmt, fa->hdr->cparam.cls->nat_elmt_size)))
@@ -744,9 +744,9 @@ H5FA_depend(H5FA_t *fa, H5AC_proxy_entry_t *parent)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(fa);
- HDassert(hdr);
- HDassert(parent);
+ assert(fa);
+ assert(hdr);
+ assert(parent);
/*
* Check to see if a flush dependency between the fixed array
@@ -755,7 +755,7 @@ H5FA_depend(H5FA_t *fa, H5AC_proxy_entry_t *parent)
*/
if (NULL == hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Set the shared array header's file context for this operation */
hdr->f = fa->f;
@@ -788,8 +788,8 @@ H5FA_patch_file(H5FA_t *fa, H5F_t *f)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(fa);
- HDassert(f);
+ assert(fa);
+ assert(f);
if (fa->f != f || fa->hdr->f != f)
fa->f = fa->hdr->f = f;
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index fdd56ff..562c56a 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -174,9 +174,9 @@ H5FA__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5FA_HEADER_SIZE_FILE(udata->f);
@@ -208,7 +208,7 @@ H5FA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -246,9 +246,9 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(H5F_addr_defined(udata->addr));
+ assert(udata);
+ assert(udata->f);
+ assert(H5F_addr_defined(udata->addr));
/* Allocate space for the fixed array data structure */
if (NULL == (hdr = H5FA__hdr_alloc(udata->f)))
@@ -258,7 +258,7 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
hdr->addr = udata->addr;
/* Magic number */
- if (HDmemcmp(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array header signature")
image += H5_SIZEOF_MAGIC;
@@ -305,7 +305,7 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
/* checksum verification already done in verify_chksum cb */
@@ -313,12 +313,12 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == len);
+ assert((size_t)(image - (const uint8_t *)_image) == len);
/* Finish initializing fixed array header */
if (H5FA__hdr_init(hdr, udata->ctx_udata) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, "initialization failed for fixed array header")
- HDassert(hdr->size == len);
+ assert(hdr->size == len);
/* Set return value */
ret_value = hdr;
@@ -352,8 +352,8 @@ H5FA__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(image_len);
+ assert(hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = hdr->size;
@@ -383,9 +383,9 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(hdr);
+ assert(f);
+ assert(image);
+ assert(hdr);
/* Magic number */
H5MM_memcpy(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -395,7 +395,7 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5FA_HDR_VERSION;
/* Fixed array type */
- HDassert(hdr->cparam.cls->id <= 255);
+ assert(hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)hdr->cparam.cls->id;
/* General array creation/configuration information */
@@ -417,7 +417,7 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FA__cache_hdr_serialize() */
@@ -443,7 +443,7 @@ H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Check if the file was opened with SWMR-write access */
if (hdr->swmr_write) {
@@ -467,7 +467,7 @@ H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
*/
if (hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Destroy flush dependency on object header proxy */
if (H5AC_proxy_entry_remove_child((H5AC_proxy_entry_t *)hdr->parent,
@@ -491,12 +491,12 @@ H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == hdr->parent);
+ assert(NULL == hdr->parent);
done:
@@ -524,7 +524,7 @@ H5FA__cache_hdr_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array header */
if (H5FA__hdr_dest((H5FA_hdr_t *)thing) < 0)
@@ -556,13 +556,13 @@ H5FA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(image_len);
/* Set up fake data block for computing size on disk */
/* (Note: extracted from H5FA__dblock_alloc) */
- HDmemset(&dblock, 0, sizeof(dblock));
+ memset(&dblock, 0, sizeof(dblock));
/* Set up fake data block for computing size on disk
*
@@ -610,7 +610,7 @@ H5FA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -648,21 +648,21 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(udata);
- HDassert(udata->hdr);
+ assert(udata);
+ assert(udata->hdr);
/* Allocate the fixed array data block */
if (NULL == (dblock = H5FA__dblock_alloc(udata->hdr)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array data block")
- HDassert(((!dblock->npages) && (len == (size_t)H5FA_DBLOCK_SIZE(dblock))) ||
- (len == (size_t)H5FA_DBLOCK_PREFIX_SIZE(dblock)));
+ assert(((!dblock->npages) && (len == (size_t)H5FA_DBLOCK_SIZE(dblock))) ||
+ (len == (size_t)H5FA_DBLOCK_PREFIX_SIZE(dblock)));
/* Set the fixed array data block's information */
dblock->addr = udata->dblk_addr;
/* Magic number */
- if (HDmemcmp(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array data block signature")
image += H5_SIZEOF_MAGIC;
@@ -697,7 +697,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
/* Set the data block's size */
dblock->size = H5FA_DBLOCK_SIZE(dblock);
@@ -708,7 +708,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == len);
+ assert((size_t)(image - (const uint8_t *)_image) == len);
/* Set return value */
ret_value = dblock;
@@ -742,8 +742,8 @@ H5FA__cache_dblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblock);
- HDassert(image_len);
+ assert(dblock);
+ assert(image_len);
/* Set the image length size */
if (!dblock->npages)
@@ -777,10 +777,10 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(dblock);
- HDassert(dblock->hdr);
+ assert(f);
+ assert(image);
+ assert(dblock);
+ assert(dblock->hdr);
/* Magic number */
H5MM_memcpy(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -790,7 +790,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5FA_DBLOCK_VERSION;
/* Fixed array type */
- HDassert(dblock->hdr->cparam.cls->id <= 255);
+ assert(dblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)dblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -822,7 +822,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -849,7 +849,7 @@ H5FA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
+ assert(dblock);
/* Check if the file was opened with SWMR-write access */
if (dblock->hdr->swmr_write) {
@@ -893,7 +893,7 @@ H5FA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif
} /* end switch */
} /* end if */
@@ -924,7 +924,7 @@ H5FA__cache_dblock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(dblock);
+ assert(dblock);
/* Release the fixed array data block */
if (H5FA__dblock_dest(dblock) < 0)
@@ -971,10 +971,10 @@ H5FA__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FARRAY_DBLOCK);
- HDassert(fsf_size);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FARRAY_DBLOCK);
+ assert(fsf_size);
*fsf_size = dblock->size;
@@ -1001,10 +1001,10 @@ H5FA__cache_dblk_page_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->nelmts > 0);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->nelmts > 0);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5FA_DBLK_PAGE_SIZE(udata->hdr, udata->nelmts);
@@ -1036,7 +1036,7 @@ H5FA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -1073,10 +1073,10 @@ H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
/* Sanity check */
FUNC_ENTER_PACKAGE
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->nelmts > 0);
- HDassert(H5F_addr_defined(udata->dblk_page_addr));
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->nelmts > 0);
+ assert(H5F_addr_defined(udata->dblk_page_addr));
/* Allocate the fixed array data block page */
if (NULL == (dblk_page = H5FA__dblk_page_alloc(udata->hdr, udata->nelmts)))
@@ -1096,7 +1096,7 @@ H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
/* Set the data block page's size */
dblk_page->size = len;
@@ -1107,7 +1107,7 @@ H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == dblk_page->size);
+ assert((size_t)(image - (const uint8_t *)_image) == dblk_page->size);
/* Set return value */
ret_value = dblk_page;
@@ -1142,8 +1142,8 @@ H5FA__cache_dblk_page_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblk_page);
- HDassert(image_len);
+ assert(dblk_page);
+ assert(image_len);
/* Set the image length size */
*image_len = dblk_page->size;
@@ -1175,10 +1175,10 @@ H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(image);
- HDassert(dblk_page);
- HDassert(dblk_page->hdr);
+ assert(f);
+ assert(image);
+ assert(dblk_page);
+ assert(dblk_page->hdr);
/* Internal information */
@@ -1197,7 +1197,7 @@ H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1224,7 +1224,7 @@ H5FA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Determine which action to take */
switch (action) {
@@ -1258,7 +1258,7 @@ H5FA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -1287,7 +1287,7 @@ H5FA__cache_dblk_page_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the fixed array data block page */
if (H5FA__dblk_page_dest((H5FA_dblk_page_t *)thing) < 0)
diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c
index 2ec1463..713e671 100644
--- a/src/H5FAdbg.c
+++ b/src/H5FAdbg.c
@@ -90,13 +90,13 @@ H5FA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -109,24 +109,24 @@ H5FA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to load fixed array header")
/* Print opening message */
- HDfprintf(stream, "%*sFixed Array Header...\n", indent, "");
+ fprintf(stream, "%*sFixed Array Header...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of elements in data block page:",
- (unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits));
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of elements in data block page:",
+ (unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits));
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of elements in Fixed Array:", hdr->stats.nelmts);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of elements in Fixed Array:", hdr->stats.nelmts);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Fixed Array Data Block Address:", hdr->dblk_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Fixed Array Data Block Address:", hdr->dblk_addr);
done:
if (dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
@@ -163,14 +163,14 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -188,24 +188,24 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
"unable to protect fixed array data block, address = %llu", (unsigned long long)addr)
/* Print opening message */
- HDfprintf(stream, "%*sFixed Array data Block...\n", indent, "");
+ fprintf(stream, "%*sFixed Array data Block...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of Data Block:", dblock->addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Data Block size:", dblock->size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of elements in Data Block:", hdr->cparam.nelmts);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Number of pages in Data Block:", dblock->npages);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Number of elements per Data Block page:", dblock->dblk_page_nelmts);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of Data Block:", dblock->addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Data Block size:", dblock->size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of elements in Data Block:", hdr->cparam.nelmts);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Number of pages in Data Block:", dblock->npages);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Number of elements per Data Block page:", dblock->dblk_page_nelmts);
if (dblock->npages) { /* paging */
size_t dblk_page_nelmts; /* # of elements in a data block page */
haddr_t dblk_page_addr; /* Address of a data block page */
size_t page_idx; /* Page index within data block */
- HDfprintf(stream, "%*sPaging:\n", indent, "");
+ fprintf(stream, "%*sPaging:\n", indent, "");
/* Iterate over the pages */
dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock);
@@ -214,7 +214,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Read and print each page's elements in the data block */
for (page_idx = 0; page_idx < dblock->npages; page_idx++) {
if (!H5VM_bit_get(dblock->dblk_page_init, page_idx)) {
- HDfprintf(stream, "%*s%-*s %zu %s\n", indent, "", fwidth, "Page %zu:", page_idx, "empty");
+ fprintf(stream, "%*s%-*s %zu %s\n", indent, "", fwidth, "Page %zu:", page_idx, "empty");
} /* end if */
else { /* get the page */
@@ -232,7 +232,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
"unable to protect fixed array data block page, address = %llu",
(unsigned long long)dblk_page_addr)
- HDfprintf(stream, "%*sElements in page %zu:\n", indent, "", page_idx);
+ fprintf(stream, "%*sElements in page %zu:\n", indent, "", page_idx);
for (u = 0; u < dblk_page_nelmts; u++) {
/* Call the class's 'debug' callback */
if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
@@ -251,7 +251,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
} /* end if */
else { /* not paging */
/* Print the elements in the data block */
- HDfprintf(stream, "%*sElements:\n", indent, "");
+ fprintf(stream, "%*sElements:\n", indent, "");
for (u = 0; u < hdr->cparam.nelmts; u++) {
/* Call the class's 'debug' callback */
if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c
index 35d79ae..4af1fd4 100644
--- a/src/H5FAdblkpage.c
+++ b/src/H5FAdblkpage.c
@@ -92,7 +92,7 @@ H5FA__dblk_page_alloc(H5FA_hdr_t *hdr, size_t nelmts)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Allocate memory for the data block */
if (NULL == (dblk_page = H5FL_CALLOC(H5FA_dblk_page_t)))
@@ -146,11 +146,11 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts)
FUNC_ENTER_PACKAGE
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called, addr = %" PRIuHADDR "\n", __func__, addr);
+ fprintf(stderr, "%s: Called, addr = %" PRIuHADDR "\n", __func__, addr);
#endif /* H5FA_DEBUG */
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Allocate the data block page */
if (NULL == (dblk_page = H5FA__dblk_page_alloc(hdr, nelmts)))
@@ -161,7 +161,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts)
dblk_page->addr = addr;
dblk_page->size = H5FA_DBLK_PAGE_SIZE(hdr, nelmts);
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: dblk_page->size = %Zu\n", __func__, dblk_page->size);
+ fprintf(stderr, "%s: dblk_page->size = %Zu\n", __func__, dblk_page->size);
#endif /* H5FA_DEBUG */
/* Clear any elements in data block page to fill value */
@@ -222,15 +222,15 @@ H5FA__dblk_page_protect(H5FA_hdr_t *hdr, haddr_t dblk_page_addr, size_t dblk_pag
FUNC_ENTER_PACKAGE
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called\n", __func__);
+ fprintf(stderr, "%s: Called\n", __func__);
#endif /* H5FA_DEBUG */
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_page_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_page_addr));
/* only the H5AC__READ_ONLY_FLAG is permitted */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -292,11 +292,11 @@ H5FA__dblk_page_unprotect(H5FA_dblk_page_t *dblk_page, unsigned cache_flags)
FUNC_ENTER_PACKAGE
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called\n", __func__);
+ fprintf(stderr, "%s: Called\n", __func__);
#endif /* H5FA_DEBUG */
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Unprotect the data block page */
if (H5AC_unprotect(dblk_page->hdr->f, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, cache_flags) < 0)
@@ -328,7 +328,7 @@ H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Check if header field has been initialized */
if (dblk_page->hdr) {
@@ -346,7 +346,7 @@ H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page)
} /* end if */
/* Sanity check */
- HDassert(NULL == dblk_page->top_proxy);
+ assert(NULL == dblk_page->top_proxy);
/* Free the data block page itself */
dblk_page = H5FL_FREE(H5FA_dblk_page_t, dblk_page);
diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c
index 8fe026f..c67e5d0 100644
--- a/src/H5FAdblock.c
+++ b/src/H5FAdblock.c
@@ -96,8 +96,8 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(hdr->cparam.nelmts > 0);
+ assert(hdr);
+ assert(hdr->cparam.nelmts > 0);
/* Allocate memory for the data block */
if (NULL == (dblock = H5FL_CALLOC(H5FA_dblock_t)))
@@ -120,11 +120,11 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr)
H5_CHECKED_ASSIGN(dblock->npages, size_t, npages, hsize_t);
/* Sanity check that we have at least 1 page */
- HDassert(dblock->npages > 0);
+ assert(dblock->npages > 0);
/* Compute size of 'page init' flag array, in bytes */
dblock->dblk_page_init_size = (dblock->npages + 7) / 8;
- HDassert(dblock->dblk_page_init_size > 0);
+ assert(dblock->dblk_page_init_size > 0);
/* Allocate space for 'page init' flags */
if (NULL == (dblock->dblk_page_init = H5FL_BLK_CALLOC(fa_page_init, dblock->dblk_page_init_size)))
@@ -183,8 +183,8 @@ H5FA__dblock_create(H5FA_hdr_t *hdr, hbool_t *hdr_dirty)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr_dirty);
+ assert(hdr);
+ assert(hdr_dirty);
/* Allocate the data block */
if (NULL == (dblock = H5FA__dblock_alloc(hdr)))
@@ -271,11 +271,11 @@ H5FA__dblock_protect(H5FA_hdr_t *hdr, haddr_t dblk_addr, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_addr));
/* only the H5AC__READ_ONLY_FLAG flag is permitted */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -332,7 +332,7 @@ H5FA__dblock_unprotect(H5FA_dblock_t *dblock, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
+ assert(dblock);
/* Unprotect the data block */
if (H5AC_unprotect(dblock->hdr->f, H5AC_FARRAY_DBLOCK, dblock->addr, dblock, cache_flags) < 0)
@@ -365,8 +365,8 @@ H5FA__dblock_delete(H5FA_hdr_t *hdr, haddr_t dblk_addr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_addr));
/* Protect data block */
if (NULL == (dblock = H5FA__dblock_protect(hdr, dblk_addr, H5AC__NO_FLAGS_SET)))
@@ -423,21 +423,21 @@ H5FA__dblock_dest(H5FA_dblock_t *dblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
+ assert(dblock);
/* Check if shared header field has been initialized */
if (dblock->hdr) {
/* Check if we've got elements in the data block */
if (dblock->elmts && !dblock->npages) {
/* Free buffer for data block elements */
- HDassert(dblock->hdr->cparam.nelmts > 0);
+ assert(dblock->hdr->cparam.nelmts > 0);
dblock->elmts = H5FL_BLK_FREE(chunk_elmts, dblock->elmts);
} /* end if */
/* Check if data block is paged */
if (dblock->npages) {
/* Free buffer for 'page init' bitmask, if there is one */
- HDassert(dblock->dblk_page_init_size > 0);
+ assert(dblock->dblk_page_init_size > 0);
if (dblock->dblk_page_init)
dblock->dblk_page_init = H5FL_BLK_FREE(fa_page_init, dblock->dblk_page_init);
} /* end if */
@@ -450,7 +450,7 @@ H5FA__dblock_dest(H5FA_dblock_t *dblock)
} /* end if */
/* Sanity check */
- HDassert(NULL == dblock->top_proxy);
+ assert(NULL == dblock->top_proxy);
/* Free the data block itself */
dblock = H5FL_FREE(H5FA_dblock_t, dblock);
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index ffa8a67..b15988c 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -90,7 +90,7 @@ H5FA__hdr_alloc(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
+ assert(f);
/* Allocate space for the shared information */
if (NULL == (hdr = H5FL_CALLOC(H5FA_hdr_t)))
@@ -135,7 +135,7 @@ H5FA__hdr_init(H5FA_hdr_t *hdr, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Set size of header on disk (locally and in statistics) */
hdr->stats.hdr_size = hdr->size = H5FA_HEADER_SIZE_HDR(hdr);
@@ -176,8 +176,8 @@ H5FA__hdr_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
#ifndef NDEBUG
{
@@ -271,7 +271,7 @@ H5FA__hdr_incr(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as un-evictable when something is depending on it */
if (hdr->rc == 0)
@@ -305,15 +305,15 @@ H5FA__hdr_decr(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->rc);
+ assert(hdr);
+ assert(hdr->rc);
/* Decrement reference count on shared header */
hdr->rc--;
/* Mark header as evictable again when nothing depend on it */
if (hdr->rc == 0) {
- HDassert(hdr->file_rc == 0);
+ assert(hdr->file_rc == 0);
if (H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNPIN, FAIL, "unable to unpin fixed array header")
}
@@ -340,7 +340,7 @@ H5FA__hdr_fuse_incr(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Increment file reference count on shared header */
hdr->file_rc++;
@@ -369,8 +369,8 @@ H5FA__hdr_fuse_decr(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->file_rc);
+ assert(hdr);
+ assert(hdr->file_rc);
/* Decrement file reference count on shared header */
hdr->file_rc--;
@@ -401,7 +401,7 @@ H5FA__hdr_modified(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as dirty in cache */
if (H5AC_mark_entry_dirty(hdr) < 0)
@@ -433,11 +433,11 @@ H5FA__hdr_protect(H5F_t *f, haddr_t fa_addr, void *ctx_udata, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(fa_addr));
+ assert(f);
+ assert(H5F_addr_defined(fa_addr));
/* only the H5AC__READ_ONLY_FLAG is permitted */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for cache callbacks */
udata.f = f;
@@ -489,7 +489,7 @@ H5FA__hdr_unprotect(H5FA_hdr_t *hdr, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Unprotect the header */
if (H5AC_unprotect(hdr->f, H5AC_FARRAY_HDR, hdr->addr, hdr, cache_flags) < 0)
@@ -521,8 +521,8 @@ H5FA__hdr_delete(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(!hdr->file_rc);
+ assert(hdr);
+ assert(!hdr->file_rc);
#ifndef NDEBUG
@@ -533,8 +533,8 @@ H5FA__hdr_delete(H5FA_hdr_t *hdr)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "unable to check metadata cache status for array header")
/* Sanity checks on array header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PROTECTED);
#endif /* NDEBUG */
@@ -576,8 +576,8 @@ H5FA__hdr_dest(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(hdr->rc == 0);
+ assert(hdr);
+ assert(hdr->rc == 0);
/* Destroy the callback context */
if (hdr->cb_ctx) {
diff --git a/src/H5FAint.c b/src/H5FAint.c
index 1a5ab75..0c12f38 100644
--- a/src/H5FAint.c
+++ b/src/H5FAint.c
@@ -86,8 +86,8 @@ H5FA__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Create a flush dependency between parent and child entry */
if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0)
@@ -117,8 +117,8 @@ H5FA__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Destroy a flush dependency between parent and child entry */
if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0)
diff --git a/src/H5FAstat.c b/src/H5FAstat.c
index 8238c19..9603648 100644
--- a/src/H5FAstat.c
+++ b/src/H5FAstat.c
@@ -83,12 +83,12 @@ H5FA_get_stats(const H5FA_t *fa, H5FA_stat_t *stats)
FUNC_ENTER_NOAPI_NOERR
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called\n", __func__);
+ fprintf(stderr, "%s: Called\n", __func__);
#endif /* H5FA_DEBUG */
/* Check arguments */
- HDassert(fa);
- HDassert(stats);
+ assert(fa);
+ assert(stats);
/* Copy fixed array statistics */
H5MM_memcpy(stats, &fa->hdr->stats, sizeof(fa->hdr->stats));
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index ffd064d..7159650 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -153,7 +153,7 @@ H5FA__test_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
/* Release context structure */
ctx = H5FL_FREE(H5FA__test_ctx_t, ctx);
@@ -181,8 +181,8 @@ H5FA__test_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
+ assert(nat_blk);
+ assert(nelmts);
H5VM_array_fill(nat_blk, &fill_val, sizeof(uint64_t), nelmts);
@@ -212,10 +212,10 @@ H5FA__test_encode(void *raw, const void *_elmt, size_t nelmts, void H5_ATTR_UNUS
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -257,10 +257,10 @@ H5FA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -298,13 +298,13 @@ H5FA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx);
- HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
- (unsigned long long)*(const uint64_t *)elmt);
+ fprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
+ (unsigned long long)*(const uint64_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FA__test_debug() */
@@ -362,8 +362,8 @@ H5FA__get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(fa);
- HDassert(cparam);
+ assert(fa);
+ assert(cparam);
/* Get fixed array creation parameters */
cparam->raw_elmt_size = fa->hdr->cparam.raw_elmt_size;
@@ -392,8 +392,8 @@ H5FA__cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(cparam1);
- HDassert(cparam2);
+ assert(cparam1);
+ assert(cparam2);
/* Compare creation parameters for array */
if (cparam1->raw_elmt_size < cparam2->raw_elmt_size)
diff --git a/src/H5FD.c b/src/H5FD.c
index 9de4ad9..d7cc876 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -169,7 +169,7 @@ H5FD__free_cls(H5FD_class_t *cls, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cls);
+ assert(cls);
/* If the file driver has a terminate callback, call it to give the file
* driver a chance to free singletons or other resources which will become
@@ -265,13 +265,13 @@ H5FD_register(const void *_cls, size_t size, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Sanity checks */
- HDassert(cls);
- HDassert(cls->open && cls->close);
- HDassert(cls->get_eoa && cls->set_eoa);
- HDassert(cls->get_eof);
- HDassert(cls->read && cls->write);
+ assert(cls);
+ assert(cls->open && cls->close);
+ assert(cls->get_eoa && cls->set_eoa);
+ assert(cls->get_eof);
+ assert(cls->read && cls->write);
for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++) {
- HDassert(cls->fl_map[type] >= H5FD_MEM_NOLIST && cls->fl_map[type] < H5FD_MEM_NTYPES);
+ assert(cls->fl_map[type] >= H5FD_MEM_NOLIST && cls->fl_map[type] < H5FD_MEM_NTYPES);
}
/* Copy the class structure so the caller can reuse or free it */
@@ -449,8 +449,8 @@ H5FD_sb_size(H5FD_t *file)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->sb_size)
@@ -481,8 +481,8 @@ H5FD_sb_encode(H5FD_t *file, char *name /*out*/, uint8_t *buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->sb_encode && (file->cls->sb_encode)(file, name /*out*/, buf /*out*/) < 0)
@@ -509,8 +509,8 @@ H5FD__sb_decode(H5FD_t *file, const char *name, const uint8_t *buf)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->sb_decode && (file->cls->sb_decode)(file, name, buf) < 0)
@@ -537,8 +537,8 @@ H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Check if driver matches driver information saved. Unfortunately, we can't push this
* function to each specific driver because we're checking if the driver is correct.
@@ -586,8 +586,8 @@ H5FD_fapl_get(H5FD_t *file)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->fapl_get)
@@ -757,8 +757,8 @@ H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file image info")
/* If an image is provided, make sure the driver supports this feature */
- HDassert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
- ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
+ assert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
+ ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
if ((file_image_info.buffer != NULL) && !(driver_flags & H5FD_FEAT_ALLOW_FILE_IMAGE))
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file image set, but not supported.")
@@ -860,8 +860,8 @@ H5FD_close(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Prepare to close file by clearing all public fields */
driver = file->cls;
@@ -871,7 +871,7 @@ H5FD_close(H5FD_t *file)
/* Dispatch to the driver for actual close. If the driver fails to
* close the file then the file will be in an unusable state.
*/
- HDassert(driver->close);
+ assert(driver->close);
if ((driver->close)(file) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "close failed")
@@ -1009,9 +1009,9 @@ H5FD__query(const H5FD_t *file, unsigned long *flags /*out*/)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(flags);
+ assert(file);
+ assert(file->cls);
+ assert(flags);
/* Dispatch to driver (if available) */
if (file->cls->query) {
@@ -1293,7 +1293,7 @@ H5FD_get_maxaddr(const H5FD_t *file)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Set return value */
ret_value = file->maxaddr;
@@ -1316,8 +1316,8 @@ H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(feature_flags);
+ assert(file);
+ assert(feature_flags);
/* Set feature flags to return */
*feature_flags = file->feature_flags;
@@ -1340,7 +1340,7 @@ H5FD_set_feature_flags(H5FD_t *file, unsigned long feature_flags)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Set the file's feature flags */
file->feature_flags = feature_flags;
@@ -1365,9 +1365,9 @@ H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type_map);
+ assert(file);
+ assert(file->cls);
+ assert(type_map);
/* Check for VFD class providing a type map retrieval routine */
if (file->cls->get_type_map) {
@@ -1893,8 +1893,8 @@ H5FD_flush(H5FD_t *file, hbool_t closing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->flush && (file->cls->flush)(file, H5CX_get_dxpl(), closing) < 0)
@@ -1959,8 +1959,8 @@ H5FD_truncate(H5FD_t *file, hbool_t closing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->truncate && (file->cls->truncate)(file, H5CX_get_dxpl(), closing) < 0)
@@ -2018,8 +2018,8 @@ H5FD_lock(H5FD_t *file, hbool_t rw)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->lock && (file->cls->lock)(file, rw) < 0)
@@ -2077,8 +2077,8 @@ H5FD_unlock(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->unlock && (file->cls->unlock)(file) < 0)
@@ -2166,8 +2166,8 @@ H5FD_ctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver if the ctl function exists.
*
@@ -2210,8 +2210,8 @@ H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(filenum);
+ assert(file);
+ assert(filenum);
/* Retrieve the file's serial number */
*filenum = file->fileno;
@@ -2277,9 +2277,9 @@ H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(file_handle);
+ assert(file);
+ assert(file->cls);
+ assert(file_handle);
/* Dispatch to driver */
if (NULL == file->cls->get_handle)
@@ -2306,8 +2306,8 @@ H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(H5F_addr_defined(base_addr));
+ assert(file);
+ assert(H5F_addr_defined(base_addr));
/* Set the file's base address */
file->base_addr = base_addr;
@@ -2331,7 +2331,7 @@ H5FD_get_base_addr(const H5FD_t *file)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Return the file's base address */
FUNC_LEAVE_NOAPI(file->base_addr)
@@ -2352,7 +2352,7 @@ H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Indicate whether paged aggregation for handling file space is enabled or not */
file->paged_aggr = paged;
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 163144d..c422801 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -224,9 +224,9 @@ H5FD__core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(file->dirty_list);
- HDassert(start <= end);
+ assert(file);
+ assert(file->dirty_list);
+ assert(start <= end);
/* Adjust the dirty region to the nearest block boundaries */
if (start % file->bstore_page_size != 0)
@@ -323,7 +323,7 @@ H5FD__core_destroy_dirty_list(H5FD_core_t *file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Destroy the list, including any remaining list elements */
if (file->dirty_list) {
@@ -361,7 +361,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
#ifndef H5_HAVE_PREADWRITE
/* Seek to the correct location (if we don't have pwrite) */
@@ -407,8 +407,8 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
(unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
- HDassert(bytes_wrote > 0);
- HDassert((size_t)bytes_wrote <= size);
+ assert(bytes_wrote > 0);
+ assert((size_t)bytes_wrote <= size);
size -= (size_t)bytes_wrote;
ptr = (unsigned char *)ptr + bytes_wrote;
@@ -545,7 +545,7 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
old_fa = H5FD__core_get_default_config();
/* Set VFD info values */
- HDmemset(&fa, 0, sizeof(H5FD_core_fapl_t));
+ memset(&fa, 0, sizeof(H5FD_core_fapl_t));
fa.increment = old_fa->increment;
fa.backing_store = old_fa->backing_store;
fa.write_tracking = is_enabled;
@@ -629,7 +629,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
/* Set VFD info values */
- HDmemset(&fa, 0, sizeof(H5FD_core_fapl_t));
+ memset(&fa, 0, sizeof(H5FD_core_fapl_t));
fa.increment = increment;
fa.backing_store = backing_store;
fa.write_tracking = H5FD_CORE_WRITE_TRACKING_FLAG;
@@ -757,7 +757,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
if (ADDR_OVERFLOW(maxaddr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "maxaddr overflow")
- HDassert(H5P_DEFAULT != fapl_id);
+ assert(H5P_DEFAULT != fapl_id);
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
if (NULL == (fa = (const H5FD_core_fapl_t *)H5P_peek_driver_info(plist)))
@@ -777,9 +777,9 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial file image info")
/* If the file image exists and this is an open, make sure the file doesn't exist */
- HDassert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
- ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
- HDmemset(&sb, 0, sizeof(sb));
+ assert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
+ ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
+ memset(&sb, 0, sizeof(sb));
if ((file_image_info.buffer != NULL) && !(H5F_ACC_CREAT & flags)) {
if (HDopen(name, o_flags, H5_POSIX_CREATE_MODE_RW) >= 0)
HGOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file already exists")
@@ -937,8 +937,8 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
(unsigned long long)bytes_read, (unsigned long long)offset);
} /* end if */
- HDassert(bytes_read >= 0);
- HDassert((size_t)bytes_read <= size);
+ assert(bytes_read >= 0);
+ assert((size_t)bytes_read <= size);
mem += bytes_read;
size -= (size_t)bytes_read;
@@ -1030,7 +1030,7 @@ H5FD__core_close(H5FD_t *_file)
else
H5MM_xfree(file->mem);
} /* end if */
- HDmemset(file, 0, sizeof(H5FD_core_t));
+ memset(file, 0, sizeof(H5FD_core_t));
H5MM_xfree(file);
done:
@@ -1092,9 +1092,9 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
@@ -1333,8 +1333,8 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (HADDR_UNDEF == addr)
@@ -1363,7 +1363,7 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
/* Read zeros for the part which is after the EOF markers */
if (size > 0)
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1392,8 +1392,8 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (REGION_OVERFLOW(addr, size))
@@ -1428,7 +1428,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
"unable to allocate memory block of %llu bytes", (unsigned long long)new_eof)
} /* end else */
- HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
+ memset(x + file->eof, 0, (size_t)(new_eof - file->eof));
file->mem = x;
file->eof = new_eof;
@@ -1561,7 +1561,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* if we are closing and not using backing store, do nothing */
if (!closing || file->backing_store) {
@@ -1592,7 +1592,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing
} /* end else */
if (file->eof < new_eof)
- HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
+ memset(x + file->eof, 0, (size_t)(new_eof - file->eof));
file->mem = x;
/* Update backing store, if using it and if closing */
@@ -1662,7 +1662,7 @@ H5FD__core_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Only set the lock if there is a file descriptor. If no file
* descriptor, this is a no-op.
@@ -1707,7 +1707,7 @@ H5FD__core_unlock(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (file->fd >= 0)
if (HDflock(file->fd, LOCK_UN) < 0) {
@@ -1743,7 +1743,7 @@ H5FD__core_delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index ccb8c85..a1449fe 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -349,9 +349,9 @@ H5FD__direct_populate_config(size_t boundary, size_t block_size, size_t cbuf_siz
FUNC_ENTER_PACKAGE
- HDassert(fa_out);
+ assert(fa_out);
- HDmemset(fa_out, 0, sizeof(H5FD_direct_fapl_t));
+ memset(fa_out, 0, sizeof(H5FD_direct_fapl_t));
if (boundary != 0)
fa_out->mboundary = boundary;
@@ -432,7 +432,7 @@ H5FD__direct_fapl_copy(const void *_old_fa)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(new_fa);
+ assert(new_fa);
/* Copy the general information */
H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_direct_fapl_t));
@@ -476,7 +476,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
FUNC_ENTER_PACKAGE
/* Sanity check on file offsets */
- HDassert(sizeof(HDoff_t) >= sizeof(size_t));
+ assert(sizeof(HDoff_t) >= sizeof(size_t));
/* Check arguments */
if (!name || !*name)
@@ -549,10 +549,10 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
* is to handle correctly the case that the file is in a different file system
* than the one where the program is running.
*/
- /* NOTE: Use HDmalloc and HDfree here to ensure compatibility with
+ /* NOTE: Use malloc and free here to ensure compatibility with
* HDposix_memalign.
*/
- buf1 = HDmalloc(sizeof(int));
+ buf1 = malloc(sizeof(int));
if (HDposix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "HDposix_memalign failed")
@@ -591,9 +591,9 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
}
if (buf1)
- HDfree(buf1);
+ free(buf1);
if (buf2)
- HDfree(buf2);
+ free(buf2);
/* Set return value */
ret_value = (H5FD_t *)file;
@@ -685,9 +685,9 @@ H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
@@ -882,8 +882,8 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (HADDR_UNDEF == addr)
@@ -921,11 +921,11 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
if (0 == nbytes) {
/* end of file but not end of format address space */
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
break;
}
- HDassert(nbytes >= 0);
- HDassert((size_t)nbytes <= size);
+ assert(nbytes >= 0);
+ assert((size_t)nbytes <= size);
H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
size -= (size_t)nbytes;
H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
@@ -943,12 +943,12 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
if (alloc_size > _cbsize)
alloc_size = _cbsize;
- HDassert(!(alloc_size % _fbsize));
+ assert(!(alloc_size % _fbsize));
if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
/* look for the aligned position for reading the data */
- HDassert(!(((addr / _fbsize) * _fbsize) % _fbsize));
+ assert(!(((addr / _fbsize) * _fbsize) % _fbsize));
if (HDlseek(file->fd, (HDoff_t)((addr / _fbsize) * _fbsize), SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
@@ -963,7 +963,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
* system calls and partial results like sec2 driver does because the
* data may no longer be aligned. It's especially true when the data in
* file is smaller than ALLOC_SIZE. */
- HDmemset(copy_buf, 0, alloc_size);
+ memset(copy_buf, 0, alloc_size);
/* Calculate how much data we have to read in this iteration
* (including unused parts of blocks) */
@@ -972,7 +972,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
else
read_size = alloc_size;
- HDassert(!(read_size % _fbsize));
+ assert(!(read_size % _fbsize));
do {
nbytes = HDread(file->fd, copy_buf, read_size);
} while (-1 == nbytes && EINTR == errno);
@@ -1003,8 +1003,8 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
addr = (haddr_t)(((addr + size - 1) / _fbsize + 1) * _fbsize);
if (copy_buf) {
- /* Free with HDfree since it came from posix_memalign */
- HDfree(copy_buf);
+ /* Free with free since it came from posix_memalign */
+ free(copy_buf);
copy_buf = NULL;
} /* end if */
}
@@ -1015,9 +1015,9 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
done:
if (ret_value < 0) {
- /* Free with HDfree since it came from posix_memalign */
+ /* Free with free since it came from posix_memalign */
if (copy_buf)
- HDfree(copy_buf);
+ free(copy_buf);
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
@@ -1065,8 +1065,8 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (HADDR_UNDEF == addr)
@@ -1101,8 +1101,8 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
} while (-1 == nbytes && EINTR == errno);
if (-1 == nbytes) /* error */
HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
- HDassert(nbytes > 0);
- HDassert((size_t)nbytes <= size);
+ assert(nbytes > 0);
+ assert((size_t)nbytes <= size);
H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
size -= (size_t)nbytes;
H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
@@ -1123,7 +1123,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
if (alloc_size > _cbsize)
alloc_size = _cbsize;
- HDassert(!(alloc_size % _fbsize));
+ assert(!(alloc_size % _fbsize));
if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
@@ -1150,11 +1150,11 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
* both ends are misaligned, otherwise only read the block on the
* misaligned end.
*/
- HDmemset(copy_buf, 0, _fbsize);
+ memset(copy_buf, 0, _fbsize);
if (copy_offset > 0) {
if ((write_addr + write_size) > (addr + size)) {
- HDassert((write_addr + write_size) - (addr + size) < _fbsize);
+ assert((write_addr + write_size) - (addr + size) < _fbsize);
read_size = write_size;
p1 = copy_buf;
} /* end if */
@@ -1164,12 +1164,12 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
} /* end else */
} /* end if */
else if ((write_addr + write_size) > (addr + size)) {
- HDassert((write_addr + write_size) - (addr + size) < _fbsize);
+ assert((write_addr + write_size) - (addr + size) < _fbsize);
read_size = _fbsize;
p1 = (unsigned char *)copy_buf + write_size - _fbsize;
/* Seek to the last block, for reading */
- HDassert(!((write_addr + write_size - _fbsize) % _fbsize));
+ assert(!((write_addr + write_size - _fbsize) % _fbsize));
if (HDlseek(file->fd, (HDoff_t)(write_addr + write_size - _fbsize), SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
} /* end if */
@@ -1177,7 +1177,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
p1 = NULL;
if (p1) {
- HDassert(!(read_size % _fbsize));
+ assert(!(read_size % _fbsize));
do {
nbytes = HDread(file->fd, p1, read_size);
} while (-1 == nbytes && EINTR == errno);
@@ -1205,7 +1205,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
} /* end else */
/*look for the aligned position for writing the data*/
- HDassert(!(write_addr % _fbsize));
+ assert(!(write_addr % _fbsize));
if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
@@ -1213,7 +1213,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
* Write the data. It doesn't truncate the extra data introduced by
* alignment because that step is done in H5FD_direct_flush.
*/
- HDassert(!(write_size % _fbsize));
+ assert(!(write_size % _fbsize));
do {
nbytes = HDwrite(file->fd, copy_buf, write_size);
} while (-1 == nbytes && EINTR == errno);
@@ -1230,8 +1230,8 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
buf = (const char *)buf + size;
if (copy_buf) {
- /* Free with HDfree since it came from posix_memalign */
- HDfree(copy_buf);
+ /* Free with free since it came from posix_memalign */
+ free(copy_buf);
copy_buf = NULL;
} /* end if */
}
@@ -1244,9 +1244,9 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
done:
if (ret_value < 0) {
- /* Free with HDfree since it came from posix_memalign */
+ /* Free with free since it came from posix_memalign */
if (copy_buf)
- HDfree(copy_buf);
+ free(copy_buf);
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
@@ -1279,7 +1279,7 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_AT
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Extend the file to make sure it's large enough */
if (file->eoa != file->eof) {
@@ -1343,7 +1343,7 @@ H5FD__direct_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Set exclusive or shared lock based on rw status */
lock_flags = rw ? LOCK_EX : LOCK_SH;
@@ -1383,7 +1383,7 @@ H5FD__direct_unlock(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (HDflock(file->fd, LOCK_UN) < 0) {
if (file->ignore_disabled_file_locks && ENOSYS == errno) {
@@ -1416,7 +1416,7 @@ H5FD__direct_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 82c65ec..d7a01d8 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -172,7 +172,7 @@ H5FD__family_get_default_config(H5FD_family_fapl_t *fa_out)
FUNC_ENTER_PACKAGE
- HDassert(fa_out);
+ assert(fa_out);
fa_out->memb_size = H5FD_FAM_DEF_MEM_SIZE;
@@ -226,7 +226,7 @@ H5FD__family_get_default_printf_filename(const char *old_filename)
FUNC_ENTER_PACKAGE
- HDassert(old_filename);
+ assert(old_filename);
old_filename_len = HDstrlen(old_filename);
if (0 == old_filename_len)
@@ -796,7 +796,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
unsigned n = MAX(64, 2 * file->amembs);
H5FD_t **x;
- HDassert(n > 0);
+ assert(n > 0);
if (NULL == (x = (H5FD_t **)H5MM_realloc(file->memb, n * sizeof(H5FD_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to reallocate members")
file->amembs = n;
@@ -942,8 +942,8 @@ H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f1->nmembs >= 1 && f1->memb[0]);
- HDassert(f2->nmembs >= 1 && f2->memb[0]);
+ assert(f1->nmembs >= 1 && f1->memb[0]);
+ assert(f2->nmembs >= 1 && f2->memb[0]);
ret_value = H5FDcmp(f1->memb[0], f2->memb[0]);
@@ -1137,7 +1137,7 @@ H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
* with `i' equal to that member. If all members have zero EOF then exit
* loop with i==0.
*/
- HDassert(file->nmembs > 0);
+ assert(file->nmembs > 0);
for (i = (int)file->nmembs - 1; i >= 0; --i) {
if ((eof = H5FD_get_eof(file->memb[i], type)) != 0)
break;
@@ -1252,7 +1252,7 @@ H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
tempreq = SIZE_MAX;
req = MIN(size, (size_t)tempreq);
- HDassert(u < file->nmembs);
+ assert(u < file->nmembs);
if (H5FDread(file->memb[u], type, dxpl_id, sub, req, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "member file read failed")
@@ -1317,7 +1317,7 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
tempreq = SIZE_MAX;
req = MIN(size, (size_t)tempreq);
- HDassert(u < file->nmembs);
+ assert(u < file->nmembs);
if (H5FDwrite(file->memb[u], type, dxpl_id, sub, req, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "member file write failed")
@@ -1500,7 +1500,7 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
/* Get the driver info (for the member fapl)
* The family_open call accepts H5P_DEFAULT, so we'll accept that here, too.
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index 2c64237..154802c 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -347,7 +347,7 @@ H5FD_hdfs_init(void)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (H5I_VFL != H5I_get_type(H5FD_HDFS_g))
@@ -388,7 +388,7 @@ H5FD__hdfs_term(void)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
/* Reset VFL ID */
@@ -422,7 +422,7 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (path == NULL || path[0] == '\0')
@@ -469,7 +469,7 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_
done:
if (ret_value == NULL && handle != NULL) {
/* error; clean up */
- HDassert(handle->magic == HDFS_HDFST_MAGIC);
+ assert(handle->magic == HDFS_HDFST_MAGIC);
handle->magic++;
if (handle->file != NULL)
if (FAIL == (hdfsCloseFile(handle->filesystem, handle->file)))
@@ -507,7 +507,7 @@ H5FD__hdfs_handle_close(hdfs_t *handle)
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (handle == NULL)
@@ -558,7 +558,7 @@ H5FD__hdfs_validate_config(const H5FD_hdfs_fapl_t *fa)
FUNC_ENTER_PACKAGE
- HDassert(fa != NULL);
+ assert(fa != NULL);
if (fa->version != H5FD__CURR_HDFS_FAPL_T_VERSION)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_hdfs_fapl_t version");
@@ -595,10 +595,10 @@ H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*#", fapl_id, fa);
- HDassert(fa != NULL);
+ assert(fa != NULL);
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
@@ -639,7 +639,7 @@ H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_dst /*out*/)
H5TRACE2("e", "ix", fapl_id, fa_dst);
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (fa_dst == NULL)
@@ -758,7 +758,7 @@ H5FD__hdfs_fapl_free(void *_fa)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fa != NULL); /* sanity check */
+ assert(fa != NULL); /* sanity check */
H5MM_xfree(fa);
@@ -796,7 +796,7 @@ hdfs__reset_stats(H5FD_hdfs_t *file)
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (file == NULL)
@@ -854,7 +854,7 @@ H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
/* Sanity check on file offsets */
@@ -879,7 +879,7 @@ H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr
if (handle == NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "could not open")
- HDassert(handle->magic == HDFS_HDFST_MAGIC);
+ assert(handle->magic == HDFS_HDFST_MAGIC);
/* Create new file struct */
file = H5FL_CALLOC(H5FD_hdfs_t);
@@ -1025,10 +1025,10 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
* PRINT OVERVIEW *
******************/
- HDfprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
- count_raw);
- HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
- bytes_raw);
+ fprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
+ count_raw);
+ fprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
+ bytes_raw);
if (count_raw + count_meta == 0)
goto done;
@@ -1037,60 +1037,60 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
* PRINT AGGREGATE STATS *
*************************/
- HDfprintf(stream, "SIZES meta raw\n");
- HDfprintf(stream, " min ");
+ fprintf(stream, "SIZES meta raw\n");
+ fprintf(stream, " min ");
if (count_meta == 0)
- HDfprintf(stream, " 0.000 ");
+ fprintf(stream, " 0.000 ");
else {
re_dub = (double)min_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
}
if (count_raw == 0)
- HDfprintf(stream, " 0.000 \n");
+ fprintf(stream, " 0.000 \n");
else {
re_dub = (double)min_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
}
- HDfprintf(stream, " avg ");
+ fprintf(stream, " avg ");
re_dub = (double)average_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)average_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
- HDfprintf(stream, " max ");
+ fprintf(stream, " max ");
re_dub = (double)max_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)max_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
/******************************
* PRINT INDIVIDUAL BIN STATS *
******************************/
- HDfprintf(stream, "BINS # of reads total bytes average size\n");
- HDfprintf(stream, " up-to meta raw meta raw meta raw\n");
+ fprintf(stream, "BINS # of reads total bytes average size\n");
+ fprintf(stream, " up-to meta raw meta raw meta raw\n");
for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
const hdfs_statsbin *m;
@@ -1114,51 +1114,51 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
if (i == HDFS_STATS_BIN_COUNT) {
range_end = hdfs_stats_boundaries[i - 1];
- HDfprintf(stream, ">");
+ fprintf(stream, ">");
}
else
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
bm_val = (double)m->bytes;
for (suffix_i = 0; bm_val >= 1024.0; suffix_i++)
bm_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
bm_suffix = suffixes[suffix_i];
br_val = (double)r->bytes;
for (suffix_i = 0; br_val >= 1024.0; suffix_i++)
br_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
br_suffix = suffixes[suffix_i];
if (m->count > 0)
am_val = (double)(m->bytes) / (double)(m->count);
for (suffix_i = 0; am_val >= 1024.0; suffix_i++)
am_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
am_suffix = suffixes[suffix_i];
if (r->count > 0)
ar_val = (double)(r->bytes) / (double)(r->count);
for (suffix_i = 0; ar_val >= 1024.0; suffix_i++)
ar_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
ar_suffix = suffixes[suffix_i];
re_dub = (double)range_end;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
-
- HDfprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
- suffixes[suffix_i], /* bin ceiling */
- m->count, /* metadata reads */
- r->count, /* raw data reads */
- bm_val, bm_suffix, /* metadata bytes */
- br_val, br_suffix, /* raw data bytes */
- am_val, am_suffix, /* metadata average */
- ar_val, ar_suffix); /* raw data average */
- HDfflush(stream);
+ assert(suffix_i < sizeof(suffixes));
+
+ fprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
+ suffixes[suffix_i], /* bin ceiling */
+ m->count, /* metadata reads */
+ r->count, /* raw data reads */
+ bm_val, bm_suffix, /* metadata bytes */
+ br_val, br_suffix, /* raw data bytes */
+ am_val, am_suffix, /* metadata average */
+ ar_val, ar_suffix); /* raw data average */
+ fflush(stream);
}
done:
@@ -1192,13 +1192,13 @@ H5FD__hdfs_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
/* Sanity checks */
- HDassert(file != NULL);
- HDassert(file->hdfs_handle != NULL);
- HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(file != NULL);
+ assert(file->hdfs_handle != NULL);
+ assert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
/* Close the underlying request handle */
if (file->hdfs_handle != NULL)
@@ -1248,18 +1248,18 @@ H5FD__hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
- HDassert(f1->hdfs_handle != NULL);
- HDassert(f2->hdfs_handle != NULL);
- HDassert(f1->hdfs_handle->magic == HDFS_HDFST_MAGIC);
- HDassert(f2->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(f1->hdfs_handle != NULL);
+ assert(f2->hdfs_handle != NULL);
+ assert(f1->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(f2->hdfs_handle->magic == HDFS_HDFST_MAGIC);
finfo1 = f1->hdfs_handle->fileinfo;
finfo2 = f2->hdfs_handle->fileinfo;
- HDassert(finfo1 != NULL);
- HDassert(finfo2 != NULL);
+ assert(finfo1 != NULL);
+ assert(finfo2 != NULL);
if (finfo1->mKind != finfo2->mKind) {
HGOTO_DONE(-1);
@@ -1321,7 +1321,7 @@ H5FD__hdfs_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (flags) {
@@ -1359,7 +1359,7 @@ H5FD__hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
FUNC_LEAVE_NOAPI(file->eoa)
@@ -1390,7 +1390,7 @@ H5FD__hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
file->eoa = addr;
@@ -1424,11 +1424,11 @@ H5FD__hdfs_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
- HDassert(file->hdfs_handle != NULL);
- HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(file->hdfs_handle != NULL);
+ assert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
FUNC_LEAVE_NOAPI((size_t)file->hdfs_handle->fileinfo->mSize)
} /* end H5FD__hdfs_get_eof() */
@@ -1459,7 +1459,7 @@ H5FD__hdfs_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
if (!file_handle)
@@ -1509,13 +1509,13 @@ H5FD__hdfs_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
- HDassert(file != NULL);
- HDassert(file->hdfs_handle != NULL);
- HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
- HDassert(buf != NULL);
+ assert(file != NULL);
+ assert(file->hdfs_handle != NULL);
+ assert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(buf != NULL);
filesize = (size_t)file->hdfs_handle->fileinfo->mSize;
@@ -1581,7 +1581,7 @@ H5FD__hdfs_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file")
@@ -1619,7 +1619,7 @@ H5FD__hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file")
diff --git a/src/H5FDint.c b/src/H5FDint.c
index 6d90aae..933acbf 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -155,8 +155,8 @@ H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
- HDassert(file);
- HDassert(sig_addr);
+ assert(file);
+ assert(sig_addr);
/* Find the least N such that 2^N is larger than the file size */
eof = H5FD_get_eof(file, H5FD_MEM_SUPER);
@@ -177,7 +177,7 @@ H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to set EOA value for file signature")
if (H5FD_read(file, H5FD_MEM_SUPER, addr, (size_t)H5F_SIGNATURE_LEN, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to read file signature")
- if (!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
+ if (!memcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
break;
}
@@ -215,9 +215,9 @@ H5FD_read(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /*
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(buf);
+ assert(file);
+ assert(file->cls);
+ assert(buf);
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -277,9 +277,9 @@ H5FD_write(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, const void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(buf);
+ assert(file);
+ assert(file->cls);
+ assert(buf);
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -364,18 +364,18 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -517,7 +517,7 @@ done:
/* undo the base addr offset to the addrs array if necessary */
if (addrs_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -581,18 +581,18 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -723,7 +723,7 @@ done:
/* undo the base addr offset to the addrs array if necessary */
if (addrs_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -793,13 +793,13 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Check if we're using vector I/O */
use_vector = file->cls->read_vector != NULL;
@@ -807,8 +807,8 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
if (count > 0) {
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert(element_sizes[0] != 0);
- HDassert(bufs[0] != NULL);
+ assert(element_sizes[0] != 0);
+ assert(bufs[0] != NULL);
/* Allocate sequence lists for memory and file spaces */
if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -867,7 +867,7 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
{
if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(mem_spaces[i])) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected")
- HDassert((hssize_t)nelmts == hss_nelmts);
+ assert((hssize_t)nelmts == hss_nelmts);
}
#endif /* NDEBUG */
@@ -885,23 +885,23 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
if (H5S_SELECT_ITER_GET_SEQ_LIST(file_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &file_nseq,
&seq_nelem, file_off, file_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(file_nseq > 0);
+ assert(file_nseq > 0);
nelmts -= seq_nelem;
file_seq_i = 0;
}
- HDassert(file_seq_i < file_nseq);
+ assert(file_seq_i < file_nseq);
/* Fill/refill memory sequence list if necessary */
if (mem_seq_i == H5FD_SEQ_LIST_LEN) {
if (H5S_SELECT_ITER_GET_SEQ_LIST(mem_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &mem_nseq, &seq_nelem,
mem_off, mem_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(mem_nseq > 0);
+ assert(mem_nseq > 0);
mem_seq_i = 0;
}
- HDassert(mem_seq_i < mem_nseq);
+ assert(mem_seq_i < mem_nseq);
/* Calculate length of this IO */
io_len = MIN(file_len[file_seq_i], mem_len[mem_seq_i]);
@@ -912,8 +912,8 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
if (vec_arr_nused == vec_arr_nalloc) {
/* Check if we're using the static arrays */
if (addrs == addrs_local) {
- HDassert(sizes == sizes_local);
- HDassert(vec_bufs == vec_bufs_local);
+ assert(sizes == sizes_local);
+ assert(vec_bufs == vec_bufs_local);
/* Allocate dynamic arrays */
if (NULL == (addrs = H5MM_malloc(sizeof(addrs_local) * 2)))
@@ -1036,9 +1036,9 @@ done:
}
/* Make sure we cleaned up */
- HDassert(!addrs || addrs == addrs_local);
- HDassert(!sizes || sizes == sizes_local);
- HDassert(!vec_bufs || vec_bufs == vec_bufs_local);
+ assert(!addrs || addrs == addrs_local);
+ assert(!sizes || sizes == sizes_local);
+ assert(!vec_bufs || vec_bufs == vec_bufs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__read_selection_translate() */
@@ -1099,18 +1099,18 @@ H5FD_read_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_s
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1203,7 +1203,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -1263,18 +1263,18 @@ H5FD_read_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_space_ids) || (count == 0));
- HDassert((file_space_ids) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_space_ids) || (count == 0));
+ assert((file_space_ids) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1365,7 +1365,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -1440,13 +1440,13 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Check if we're using vector I/O */
use_vector = file->cls->write_vector != NULL;
@@ -1454,8 +1454,8 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
if (count > 0) {
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert(element_sizes[0] != 0);
- HDassert(bufs[0] != NULL);
+ assert(element_sizes[0] != 0);
+ assert(bufs[0] != NULL);
/* Allocate sequence lists for memory and file spaces */
if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -1514,7 +1514,7 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
{
if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(mem_spaces[i])) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected")
- HDassert((hssize_t)nelmts == hss_nelmts);
+ assert((hssize_t)nelmts == hss_nelmts);
}
#endif /* NDEBUG */
@@ -1532,23 +1532,23 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
if (H5S_SELECT_ITER_GET_SEQ_LIST(file_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &file_nseq,
&seq_nelem, file_off, file_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(file_nseq > 0);
+ assert(file_nseq > 0);
nelmts -= seq_nelem;
file_seq_i = 0;
}
- HDassert(file_seq_i < file_nseq);
+ assert(file_seq_i < file_nseq);
/* Fill/refill memory sequence list if necessary */
if (mem_seq_i == H5FD_SEQ_LIST_LEN) {
if (H5S_SELECT_ITER_GET_SEQ_LIST(mem_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &mem_nseq, &seq_nelem,
mem_off, mem_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(mem_nseq > 0);
+ assert(mem_nseq > 0);
mem_seq_i = 0;
}
- HDassert(mem_seq_i < mem_nseq);
+ assert(mem_seq_i < mem_nseq);
/* Calculate length of this IO */
io_len = MIN(file_len[file_seq_i], mem_len[mem_seq_i]);
@@ -1559,8 +1559,8 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
if (vec_arr_nused == vec_arr_nalloc) {
/* Check if we're using the static arrays */
if (addrs == addrs_local) {
- HDassert(sizes == sizes_local);
- HDassert(vec_bufs == vec_bufs_local);
+ assert(sizes == sizes_local);
+ assert(vec_bufs == vec_bufs_local);
/* Allocate dynamic arrays */
if (NULL == (addrs = H5MM_malloc(sizeof(addrs_local) * 2)))
@@ -1683,9 +1683,9 @@ done:
}
/* Make sure we cleaned up */
- HDassert(!addrs || addrs == addrs_local);
- HDassert(!sizes || sizes == sizes_local);
- HDassert(!vec_bufs || vec_bufs == vec_bufs_local);
+ assert(!addrs || addrs == addrs_local);
+ assert(!sizes || sizes == sizes_local);
+ assert(!vec_bufs || vec_bufs == vec_bufs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__write_selection_translate() */
@@ -1744,18 +1744,18 @@ H5FD_write_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1842,7 +1842,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -1899,18 +1899,18 @@ H5FD_write_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_space_ids) || (count == 0));
- HDassert((file_space_ids) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_space_ids) || (count == 0));
+ assert((file_space_ids) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1995,7 +1995,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -2033,8 +2033,8 @@ H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file && file->cls);
- HDassert(H5F_addr_defined(addr) && addr <= file->maxaddr);
+ assert(file && file->cls);
+ assert(H5F_addr_defined(addr) && addr <= file->maxaddr);
/* Dispatch to driver, convert to absolute address */
if ((file->cls->set_eoa)(file, type, addr + file->base_addr) < 0)
@@ -2067,7 +2067,7 @@ H5FD_get_eoa(const H5FD_t *file, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(file && file->cls);
+ assert(file && file->cls);
/* Dispatch to driver */
if (HADDR_UNDEF == (ret_value = (file->cls->get_eoa)(file, type)))
@@ -2103,7 +2103,7 @@ H5FD_get_eof(const H5FD_t *file, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(file && file->cls);
+ assert(file && file->cls);
/* Dispatch to driver */
if (file->cls->get_eof) {
@@ -2139,8 +2139,8 @@ H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags /*out*/)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(driver);
- HDassert(flags);
+ assert(driver);
+ assert(flags);
/* Check for the driver to query and then query it */
if (driver->query)
@@ -2193,8 +2193,8 @@ H5FD__vsrt_tmp_cmp(const void *element_1, const void *element_2)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(H5F_addr_defined(addr_1));
- HDassert(H5F_addr_defined(addr_2));
+ assert(H5F_addr_defined(addr_1));
+ assert(H5F_addr_defined(addr_2));
/* Compare the addresses */
if (H5F_addr_gt(addr_1, addr_2))
@@ -2219,27 +2219,27 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
/* Sanity checks */
- HDassert(vector_was_sorted);
+ assert(vector_was_sorted);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
- HDassert((count == 0) || ((s_types_ptr) && (NULL == *s_types_ptr)));
- HDassert((count == 0) || ((s_addrs_ptr) && (NULL == *s_addrs_ptr)));
- HDassert((count == 0) || ((s_sizes_ptr) && (NULL == *s_sizes_ptr)));
- HDassert((count == 0) || ((s_bufs_ptr) && (NULL == *s_bufs_ptr)));
+ assert((count == 0) || ((s_types_ptr) && (NULL == *s_types_ptr)));
+ assert((count == 0) || ((s_addrs_ptr) && (NULL == *s_addrs_ptr)));
+ assert((count == 0) || ((s_sizes_ptr) && (NULL == *s_sizes_ptr)));
+ assert((count == 0) || ((s_bufs_ptr) && (NULL == *s_bufs_ptr)));
/* scan the addrs array to see if it is sorted */
for (i = 1; i < count; i++) {
- HDassert(H5F_addr_defined(addrs[i - 1]));
+ assert(H5F_addr_defined(addrs[i - 1]));
if (H5F_addr_gt(addrs[i - 1], addrs[i]))
break;
@@ -2282,7 +2282,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
srt_tmp_size = (count * sizeof(struct H5FD_vsrt_tmp_t));
- if (NULL == (srt_tmp = (H5FD_vsrt_tmp_t *)HDmalloc(srt_tmp_size)))
+ if (NULL == (srt_tmp = (H5FD_vsrt_tmp_t *)malloc(srt_tmp_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc srt_tmp")
@@ -2298,23 +2298,23 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
i = 1;
for (i = 1; i < count; i++) {
- HDassert(H5F_addr_lt(srt_tmp[i - 1].addr, srt_tmp[i].addr));
+ assert(H5F_addr_lt(srt_tmp[i - 1].addr, srt_tmp[i].addr));
if (H5F_addr_eq(addrs[i - 1], addrs[i]))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "duplicate addr in vector")
}
- if ((NULL == (*s_types_ptr = (H5FD_mem_t *)HDmalloc(count * sizeof(H5FD_mem_t)))) ||
- (NULL == (*s_addrs_ptr = (haddr_t *)HDmalloc(count * sizeof(haddr_t)))) ||
- (NULL == (*s_sizes_ptr = (size_t *)HDmalloc(count * sizeof(size_t)))) ||
+ if ((NULL == (*s_types_ptr = (H5FD_mem_t *)malloc(count * sizeof(H5FD_mem_t)))) ||
+ (NULL == (*s_addrs_ptr = (haddr_t *)malloc(count * sizeof(haddr_t)))) ||
+ (NULL == (*s_sizes_ptr = (size_t *)malloc(count * sizeof(size_t)))) ||
(NULL ==
- (*s_bufs_ptr = (H5_flexible_const_ptr_t *)HDmalloc(count * sizeof(H5_flexible_const_ptr_t))))) {
+ (*s_bufs_ptr = (H5_flexible_const_ptr_t *)malloc(count * sizeof(H5_flexible_const_ptr_t))))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sorted vector(s)")
}
- HDassert(sizes[0] != 0);
- HDassert(types[0] != H5FD_MEM_NOLIST);
+ assert(sizes[0] != 0);
+ assert(types[0] != H5FD_MEM_NOLIST);
/* Scan the sizes and types vectors to determine if the fixed size / type
* optimization is in use, and if so, to determine the index of the last
@@ -2329,8 +2329,8 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
fixed_type_index = i - 1;
}
- HDassert(fixed_size_index <= count);
- HDassert(fixed_type_index <= count);
+ assert(fixed_size_index <= count);
+ assert(fixed_type_index <= count);
/* Populate the sorted vectors. Note that the index stored in srt_tmp
* refers to the index in the unsorted array, while the position of
@@ -2349,7 +2349,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
done:
if (srt_tmp) {
- HDfree(srt_tmp);
+ free(srt_tmp);
srt_tmp = NULL;
}
@@ -2364,25 +2364,25 @@ done:
/* free space allocated for sorted vectors */
if (*s_types_ptr) {
- HDfree(*s_types_ptr);
+ free(*s_types_ptr);
*s_types_ptr = NULL;
}
if (*s_addrs_ptr) {
- HDfree(*s_addrs_ptr);
+ free(*s_addrs_ptr);
*s_addrs_ptr = NULL;
}
if (*s_sizes_ptr) {
- HDfree(*s_sizes_ptr);
+ free(*s_sizes_ptr);
*s_sizes_ptr = NULL;
}
if (*s_bufs_ptr) {
- HDfree(*s_bufs_ptr);
+ free(*s_bufs_ptr);
*s_bufs_ptr = NULL;
}
}
@@ -2412,7 +2412,7 @@ H5FD_delete(const char *filename, hid_t fapl_id)
/* Sanity checks */
- HDassert(filename);
+ assert(filename);
/* Get file access property list */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -2461,9 +2461,9 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t *
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cls);
- HDassert(key);
- HDassert(success);
+ assert(cls);
+ assert(key);
+ assert(success);
/* Which kind of key are we looking for? */
if (key->vfd.kind == H5FD_GET_DRIVER_BY_NAME) {
@@ -2473,7 +2473,7 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t *
}
else {
/* Sanity check */
- HDassert(key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
+ assert(key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
/* Check if plugin value matches VFD class value */
if (cls->value == key->vfd.u.value)
@@ -2510,7 +2510,7 @@ H5FD__get_driver_cb(void *obj, hid_t id, void *_op_data)
} /* end if */
} /* end if */
else {
- HDassert(H5FD_GET_DRIVER_BY_VALUE == op_data->key.kind);
+ assert(H5FD_GET_DRIVER_BY_VALUE == op_data->key.kind);
if (cls->value == op_data->key.u.value) {
op_data->found_id = id;
ret_value = H5_ITER_STOP;
@@ -2548,7 +2548,7 @@ H5FD_register_driver_by_name(const char *name, hbool_t app_ref)
/* If driver is already registered, increment ref count on ID and return ID */
if (driver_is_registered) {
- HDassert(driver_id >= 0);
+ assert(driver_id >= 0);
if (H5I_inc_ref(driver_id, app_ref) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFD")
@@ -2602,7 +2602,7 @@ H5FD_register_driver_by_value(H5FD_class_value_t value, hbool_t app_ref)
/* If driver is already registered, increment ref count on ID and return ID */
if (driver_is_registered) {
- HDassert(driver_id >= 0);
+ assert(driver_id >= 0);
if (H5I_inc_ref(driver_id, app_ref) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFD")
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 225c1a1..3c412c5 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -316,7 +316,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si
/* Do this first, so that we don't try to free a wild pointer if
* H5P_object_verify() fails.
*/
- HDmemset(&fa, 0, sizeof(H5FD_log_fapl_t));
+ memset(&fa, 0, sizeof(H5FD_log_fapl_t));
/* Check arguments */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
@@ -393,7 +393,7 @@ H5FD__log_fapl_copy(const void *_old_fa)
FUNC_ENTER_PACKAGE
- HDassert(old_fa);
+ assert(old_fa);
/* Allocate the new FAPL info */
if (NULL == (new_fa = (H5FD_log_fapl_t *)H5MM_calloc(sizeof(H5FD_log_fapl_t))))
@@ -586,20 +586,20 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->iosize = fa->buf_size;
if (file->fa.flags & H5FD_LOG_FILE_READ) {
file->nread = (unsigned char *)H5MM_calloc(file->iosize);
- HDassert(file->nread);
+ assert(file->nread);
}
if (file->fa.flags & H5FD_LOG_FILE_WRITE) {
file->nwrite = (unsigned char *)H5MM_calloc(file->iosize);
- HDassert(file->nwrite);
+ assert(file->nwrite);
}
if (file->fa.flags & H5FD_LOG_FLAVOR) {
file->flavor = (unsigned char *)H5MM_calloc(file->iosize);
- HDassert(file->flavor);
+ assert(file->flavor);
}
/* Set the log file pointer */
if (fa->logfile)
- file->logfp = HDfopen(fa->logfile, "w");
+ file->logfp = fopen(fa->logfile, "w");
else
file->logfp = stderr;
@@ -608,13 +608,13 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5_timevals_t open_times; /* Elapsed time for open() call */
H5_timer_get_times(open_timer, &open_times);
- HDfprintf(file->logfp, "Open took: (%f s)\n", open_times.elapsed);
+ fprintf(file->logfp, "Open took: (%f s)\n", open_times.elapsed);
}
if (file->fa.flags & H5FD_LOG_TIME_STAT) {
H5_timevals_t stat_times; /* Elapsed time for stat() call */
H5_timer_get_times(stat_timer, &stat_times);
- HDfprintf(file->logfp, "Stat took: (%f s)\n", stat_times.elapsed);
+ fprintf(file->logfp, "Stat took: (%f s)\n", stat_times.elapsed);
}
}
@@ -677,7 +677,7 @@ H5FD__log_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
+ assert(file);
/* Initialize timer */
H5_timer_init(&close_timer);
@@ -704,89 +704,89 @@ H5FD__log_close(H5FD_t *_file)
H5_timevals_t close_times; /* Elapsed time for close() call */
H5_timer_get_times(close_timer, &close_times);
- HDfprintf(file->logfp, "Close took: (%f s)\n", close_times.elapsed);
+ fprintf(file->logfp, "Close took: (%f s)\n", close_times.elapsed);
}
/* Dump the total number of seek/read/write operations */
if (file->fa.flags & H5FD_LOG_NUM_READ)
- HDfprintf(file->logfp, "Total number of read operations: %llu\n", file->total_read_ops);
+ fprintf(file->logfp, "Total number of read operations: %llu\n", file->total_read_ops);
if (file->fa.flags & H5FD_LOG_NUM_WRITE)
- HDfprintf(file->logfp, "Total number of write operations: %llu\n", file->total_write_ops);
+ fprintf(file->logfp, "Total number of write operations: %llu\n", file->total_write_ops);
if (file->fa.flags & H5FD_LOG_NUM_SEEK)
- HDfprintf(file->logfp, "Total number of seek operations: %llu\n", file->total_seek_ops);
+ fprintf(file->logfp, "Total number of seek operations: %llu\n", file->total_seek_ops);
if (file->fa.flags & H5FD_LOG_NUM_TRUNCATE)
- HDfprintf(file->logfp, "Total number of truncate operations: %llu\n", file->total_truncate_ops);
+ fprintf(file->logfp, "Total number of truncate operations: %llu\n", file->total_truncate_ops);
/* Dump the total time in seek/read/write */
if (file->fa.flags & H5FD_LOG_TIME_READ)
- HDfprintf(file->logfp, "Total time in read operations: %f s\n", file->total_read_time);
+ fprintf(file->logfp, "Total time in read operations: %f s\n", file->total_read_time);
if (file->fa.flags & H5FD_LOG_TIME_WRITE)
- HDfprintf(file->logfp, "Total time in write operations: %f s\n", file->total_write_time);
+ fprintf(file->logfp, "Total time in write operations: %f s\n", file->total_write_time);
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
- HDfprintf(file->logfp, "Total time in seek operations: %f s\n", file->total_seek_time);
+ fprintf(file->logfp, "Total time in seek operations: %f s\n", file->total_seek_time);
if (file->fa.flags & H5FD_LOG_TIME_TRUNCATE)
- HDfprintf(file->logfp, "Total time in truncate operations: %f s\n", file->total_truncate_time);
+ fprintf(file->logfp, "Total time in truncate operations: %f s\n", file->total_truncate_time);
/* Dump the write I/O information */
if (file->fa.flags & H5FD_LOG_FILE_WRITE) {
- HDfprintf(file->logfp, "Dumping write I/O information:\n");
+ fprintf(file->logfp, "Dumping write I/O information:\n");
last_val = file->nwrite[0];
last_addr = 0;
addr = 1;
while (addr < file->eoa) {
if (file->nwrite[addr] != last_val) {
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
last_val = file->nwrite[addr];
last_addr = addr;
}
addr++;
}
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
}
/* Dump the read I/O information */
if (file->fa.flags & H5FD_LOG_FILE_READ) {
- HDfprintf(file->logfp, "Dumping read I/O information:\n");
+ fprintf(file->logfp, "Dumping read I/O information:\n");
last_val = file->nread[0];
last_addr = 0;
addr = 1;
while (addr < file->eoa) {
if (file->nread[addr] != last_val) {
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
last_val = file->nread[addr];
last_addr = addr;
}
addr++;
}
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", last_addr,
+ (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
}
/* Dump the I/O flavor information */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDfprintf(file->logfp, "Dumping I/O flavor information:\n");
+ fprintf(file->logfp, "Dumping I/O flavor information:\n");
last_val = file->flavor[0];
last_addr = 0;
addr = 1;
while (addr < file->eoa) {
if (file->flavor[addr] != last_val) {
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
last_val = file->flavor[addr];
last_addr = addr;
}
addr++;
}
- HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
+ fprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
}
/* Free the logging information */
@@ -860,9 +860,9 @@ H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
@@ -950,15 +950,15 @@ H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hs
/* Retain the (first) flavor of the information written to the file */
if (file->fa.flags != 0) {
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDassert(addr < file->iosize);
+ assert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[addr], (int)type, (size_t)size);
+ memset(&file->flavor[addr], (int)type, (size_t)size);
}
if (file->fa.flags & H5FD_LOG_ALLOC)
- HDfprintf(file->logfp,
- "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", addr,
- (haddr_t)((addr + size) - 1), size, flavors[type]);
+ fprintf(file->logfp,
+ "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", addr,
+ (haddr_t)((addr + size) - 1), size, flavors[type]);
}
/* Set return value */
@@ -989,15 +989,15 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
if (file->fa.flags != 0) {
/* Reset the flavor of the information in the file */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDassert(addr < file->iosize);
+ assert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
+ memset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
}
/* Log the file memory freed */
if (file->fa.flags & H5FD_LOG_FREE)
- HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n",
- addr, (haddr_t)((addr + size) - 1), size, flavors[type]);
+ fprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n",
+ addr, (haddr_t)((addr + size) - 1), size, flavors[type]);
}
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1056,16 +1056,16 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
/* Retain the flavor of the space allocated by the extension */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDassert(addr < file->iosize);
+ assert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[file->eoa], (int)type, (size_t)size);
+ memset(&file->flavor[file->eoa], (int)type, (size_t)size);
}
/* Log the extension like an allocation */
if (file->fa.flags & H5FD_LOG_ALLOC)
- HDfprintf(file->logfp,
- "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n",
- file->eoa, addr, size, flavors[type]);
+ fprintf(file->logfp,
+ "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n",
+ file->eoa, addr, size, flavors[type]);
}
/* Check for decreasing file size */
@@ -1074,16 +1074,16 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
/* Reset the flavor of the space freed by the shrink */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDassert((addr + size) < file->iosize);
+ assert((addr + size) < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
+ memset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
}
/* Log the shrink like a free */
if (file->fa.flags & H5FD_LOG_FREE)
- HDfprintf(file->logfp,
- "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n",
- file->eoa, addr, size, flavors[type]);
+ fprintf(file->logfp,
+ "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", file->eoa,
+ addr, size, flavors[type]);
}
}
@@ -1178,8 +1178,8 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Initialize timer */
H5_timer_init(&read_timer);
@@ -1197,7 +1197,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
/* Log information about the number of times these locations are read */
if (file->fa.flags & H5FD_LOG_FILE_READ) {
- HDassert((addr + size) < file->iosize);
+ assert((addr + size) < file->iosize);
while (tmp_size-- > 0)
file->nread[tmp_addr++]++;
}
@@ -1235,16 +1235,16 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
/* Emit log string if we're tracking individual seek events. */
if (file->fa.flags & H5FD_LOG_LOC_SEEK) {
- HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
+ fprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
/* Add the seek time, if we're tracking that.
* Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
- HDfprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
}
#endif /* H5_HAVE_PREADWRITE */
@@ -1286,8 +1286,8 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
if (file->fa.flags & H5FD_LOG_LOC_READ)
- HDfprintf(file->logfp, "Error! Reading: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
- orig_addr, (orig_addr + orig_size) - 1, orig_size);
+ fprintf(file->logfp, "Error! Reading: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
+ orig_addr, (orig_addr + orig_size) - 1, orig_size);
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL,
"file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
@@ -1300,12 +1300,12 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
if (0 == bytes_read) {
/* End of file but not end of format address space */
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
break;
}
- HDassert(bytes_read >= 0);
- HDassert((size_t)bytes_read <= size);
+ assert(bytes_read >= 0);
+ assert((size_t)bytes_read <= size);
size -= (size_t)bytes_read;
addr += (haddr_t)bytes_read;
@@ -1328,16 +1328,16 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
/* Log information about the read */
if (file->fa.flags & H5FD_LOG_LOC_READ) {
- HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Read", orig_addr,
- (orig_addr + orig_size) - 1, orig_size, flavors[type]);
+ fprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Read", orig_addr,
+ (orig_addr + orig_size) - 1, orig_size, flavors[type]);
/* Verify that we are reading in the type of data we allocated in this location */
if (file->flavor) {
- HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[orig_addr] ||
- (H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT);
- HDassert(type == H5FD_MEM_DEFAULT ||
- type == (H5FD_mem_t)file->flavor[(orig_addr + orig_size) - 1] ||
- (H5FD_mem_t)file->flavor[(orig_addr + orig_size) - 1] == H5FD_MEM_DEFAULT);
+ assert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[orig_addr] ||
+ (H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT);
+ assert(type == H5FD_MEM_DEFAULT ||
+ type == (H5FD_mem_t)file->flavor[(orig_addr + orig_size) - 1] ||
+ (H5FD_mem_t)file->flavor[(orig_addr + orig_size) - 1] == H5FD_MEM_DEFAULT);
}
/* Add the read time, if we're tracking that.
@@ -1345,9 +1345,9 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_READ)
- HDfprintf(file->logfp, " (%fs @ %f)\n", read_times.elapsed, read_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", read_times.elapsed, read_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
/* Update current position */
@@ -1392,19 +1392,19 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(size > 0);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(size > 0);
+ assert(buf);
/* Initialize timer */
H5_timer_init(&write_timer);
/* Verify that we are writing out the type of data we allocated in this location */
if (file->flavor) {
- HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[addr] ||
- (H5FD_mem_t)file->flavor[addr] == H5FD_MEM_DEFAULT);
- HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[(addr + size) - 1] ||
- (H5FD_mem_t)file->flavor[(addr + size) - 1] == H5FD_MEM_DEFAULT);
+ assert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[addr] ||
+ (H5FD_mem_t)file->flavor[addr] == H5FD_MEM_DEFAULT);
+ assert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[(addr + size) - 1] ||
+ (H5FD_mem_t)file->flavor[(addr + size) - 1] == H5FD_MEM_DEFAULT);
}
/* Check for overflow conditions */
@@ -1420,7 +1420,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
haddr_t tmp_addr = addr;
/* Log information about the number of times these locations are read */
- HDassert((addr + size) < file->iosize);
+ assert((addr + size) < file->iosize);
while (tmp_size-- > 0)
file->nwrite[tmp_addr++]++;
}
@@ -1457,16 +1457,16 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
/* Emit log string if we're tracking individual seek events. */
if (file->fa.flags & H5FD_LOG_LOC_SEEK) {
- HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
+ fprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
/* Add the seek time, if we're tracking that.
* Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
- HDfprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
}
#endif /* H5_HAVE_PREADWRITE */
@@ -1508,8 +1508,8 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
if (file->fa.flags & H5FD_LOG_LOC_WRITE)
- HDfprintf(file->logfp, "Error! Writing: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
- orig_addr, (orig_addr + orig_size) - 1, orig_size);
+ fprintf(file->logfp, "Error! Writing: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
+ orig_addr, (orig_addr + orig_size) - 1, orig_size);
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
"file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
@@ -1520,8 +1520,8 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
(unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
- HDassert(bytes_wrote > 0);
- HDassert((size_t)bytes_wrote <= size);
+ assert(bytes_wrote > 0);
+ assert((size_t)bytes_wrote <= size);
size -= (size_t)bytes_wrote;
addr += (haddr_t)bytes_wrote;
@@ -1544,15 +1544,15 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
/* Log information about the write */
if (file->fa.flags & H5FD_LOG_LOC_WRITE) {
- HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Written", orig_addr,
- (orig_addr + orig_size) - 1, orig_size, flavors[type]);
+ fprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Written", orig_addr,
+ (orig_addr + orig_size) - 1, orig_size, flavors[type]);
/* Check if this is the first write into a "default" section, grabbed by the metadata aggregation
* algorithm */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
if ((H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT) {
- HDmemset(&file->flavor[orig_addr], (int)type, orig_size);
- HDfprintf(file->logfp, " (fresh)");
+ memset(&file->flavor[orig_addr], (int)type, orig_size);
+ fprintf(file->logfp, " (fresh)");
}
}
@@ -1561,9 +1561,9 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_WRITE)
- HDfprintf(file->logfp, " (%fs @ %f)\n", write_times.elapsed, write_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", write_times.elapsed, write_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
/* Update current position and eof */
@@ -1603,7 +1603,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Extend the file to make sure it's large enough */
if (!H5F_addr_eq(file->eoa, file->eof)) {
@@ -1666,16 +1666,16 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
/* Emit log string if we're tracking individual truncate events. */
if (file->fa.flags & H5FD_LOG_TRUNCATE) {
- HDfprintf(file->logfp, "Truncate: To %10" PRIuHADDR, file->eoa);
+ fprintf(file->logfp, "Truncate: To %10" PRIuHADDR, file->eoa);
/* Add the truncate time, if we're tracking that.
* Note that the truncate time is NOT emitted for when just H5FD_LOG_TIME_TRUNCATE
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_TRUNCATE)
- HDfprintf(file->logfp, " (%fs @ %f)\n", trunc_times.elapsed, trunc_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", trunc_times.elapsed, trunc_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
/* Update the eof value */
@@ -1712,7 +1712,7 @@ H5FD__log_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
+ assert(file);
/* Set exclusive or shared lock based on rw status */
lock_flags = rw ? LOCK_EX : LOCK_SH;
@@ -1752,7 +1752,7 @@ H5FD__log_unlock(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (HDflock(file->fd, LOCK_UN) < 0) {
if (file->ignore_disabled_file_locks && ENOSYS == errno) {
@@ -1785,7 +1785,7 @@ H5FD__log_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c
index 8c222d3..2467d92 100644
--- a/src/H5FDmirror.c
+++ b/src/H5FDmirror.c
@@ -81,48 +81,48 @@ typedef struct H5FD_mirror_t {
ssize_t bytes_written = 0; \
const unsigned char *b = NULL; \
\
- HDfprintf(stdout, "%s bytes:\n```\n", (label)); \
+ fprintf(stdout, "%s bytes:\n```\n", (label)); \
\
/* print whole lines */ \
while ((len - bytes_written) >= 32) { \
b = (const unsigned char *)(buf) + bytes_written; \
- HDfprintf(stdout, \
- "%04zX %02X%02X%02X%02X %02X%02X%02X%02X" \
- " %02X%02X%02X%02X %02X%02X%02X%02X" \
- " %02X%02X%02X%02X %02X%02X%02X%02X" \
- " %02X%02X%02X%02X %02X%02X%02X%02X\n", \
- bytes_written, b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], \
- b[11], b[12], b[13], b[14], b[15], b[16], b[17], b[18], b[19], b[20], b[21], b[22], \
- b[23], b[24], b[25], b[26], b[27], b[28], b[29], b[30], b[31]); \
+ fprintf(stdout, \
+ "%04zX %02X%02X%02X%02X %02X%02X%02X%02X" \
+ " %02X%02X%02X%02X %02X%02X%02X%02X" \
+ " %02X%02X%02X%02X %02X%02X%02X%02X" \
+ " %02X%02X%02X%02X %02X%02X%02X%02X\n", \
+ bytes_written, b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], \
+ b[12], b[13], b[14], b[15], b[16], b[17], b[18], b[19], b[20], b[21], b[22], b[23], \
+ b[24], b[25], b[26], b[27], b[28], b[29], b[30], b[31]); \
bytes_written += 32; \
} \
\
/* start partial line */ \
if (len > bytes_written) { \
- HDfprintf(stdout, "%04zX ", bytes_written); \
+ fprintf(stdout, "%04zX ", bytes_written); \
} \
\
/* partial line blocks */ \
while ((len - bytes_written) >= 4) { \
- HDfprintf(stdout, " %02X%02X%02X%02X", (buf)[bytes_written], (buf)[bytes_written + 1], \
- (buf)[bytes_written + 2], (buf)[bytes_written + 3]); \
+ fprintf(stdout, " %02X%02X%02X%02X", (buf)[bytes_written], (buf)[bytes_written + 1], \
+ (buf)[bytes_written + 2], (buf)[bytes_written + 3]); \
bytes_written += 4; \
} \
\
/* block separator before partial block */ \
if (len > bytes_written) { \
- HDfprintf(stdout, " "); \
+ fprintf(stdout, " "); \
} \
\
/* partial block individual bytes */ \
while (len > bytes_written) { \
- HDfprintf(stdout, "%02X", (buf)[bytes_written++]); \
+ fprintf(stdout, "%02X", (buf)[bytes_written++]); \
} \
\
/* end partial line */ \
- HDfprintf(stdout, "\n"); \
- HDfprintf(stdout, "```\n"); \
- HDfflush(stdout); \
+ fprintf(stdout, "\n"); \
+ fprintf(stdout, "```\n"); \
+ fflush(stdout); \
} while (0)
#else
#define LOG_XMIT_BYTES(label, buf, len) /* no-op */
@@ -131,8 +131,8 @@ typedef struct H5FD_mirror_t {
#if MIRROR_DEBUG_OP_CALLS
#define LOG_OP_CALL(name) \
do { \
- HDprintf("called %s()\n", (name)); \
- HDfflush(stdout); \
+ printf("called %s()\n", (name)); \
+ fflush(stdout); \
} while (0)
#else
#define LOG_OP_CALL(name) /* no-op */
@@ -282,7 +282,7 @@ H5FD__mirror_xmit_decode_uint16(uint16_t *out, const unsigned char *_buf)
LOG_OP_CALL(__func__);
- HDassert(_buf && out);
+ assert(_buf && out);
H5MM_memcpy(&n, _buf, sizeof(n));
*out = (uint16_t)HDntohs(n);
@@ -310,7 +310,7 @@ H5FD__mirror_xmit_decode_uint32(uint32_t *out, const unsigned char *_buf)
LOG_OP_CALL(__func__);
- HDassert(_buf && out);
+ assert(_buf && out);
H5MM_memcpy(&n, _buf, sizeof(n));
*out = (uint32_t)HDntohl(n);
@@ -369,7 +369,7 @@ H5FD__mirror_xmit_decode_uint64(uint64_t *out, const unsigned char *_buf)
LOG_OP_CALL(__func__);
- HDassert(_buf && out);
+ assert(_buf && out);
H5MM_memcpy(&n, _buf, sizeof(n));
if (TRUE == is_host_little_endian())
@@ -396,7 +396,7 @@ H5FD__mirror_xmit_decode_uint8(uint8_t *out, const unsigned char *_buf)
{
LOG_OP_CALL(__func__);
- HDassert(_buf && out);
+ assert(_buf && out);
H5MM_memcpy(out, _buf, sizeof(uint8_t));
@@ -422,7 +422,7 @@ H5FD__mirror_xmit_encode_uint16(unsigned char *_dest, uint16_t v)
LOG_OP_CALL(__func__);
- HDassert(_dest);
+ assert(_dest);
n = (uint16_t)HDhtons(v);
H5MM_memcpy(_dest, &n, sizeof(n));
@@ -449,7 +449,7 @@ H5FD__mirror_xmit_encode_uint32(unsigned char *_dest, uint32_t v)
LOG_OP_CALL(__func__);
- HDassert(_dest);
+ assert(_dest);
n = (uint32_t)HDhtonl(v);
H5MM_memcpy(_dest, &n, sizeof(n));
@@ -476,7 +476,7 @@ H5FD__mirror_xmit_encode_uint64(unsigned char *_dest, uint64_t v)
LOG_OP_CALL(__func__);
- HDassert(_dest);
+ assert(_dest);
if (TRUE == is_host_little_endian())
n = BSWAP_64(v);
@@ -503,7 +503,7 @@ H5FD__mirror_xmit_encode_uint8(unsigned char *dest, uint8_t v)
{
LOG_OP_CALL(__func__);
- HDassert(dest);
+ assert(dest);
H5MM_memcpy(dest, &v, sizeof(v));
@@ -536,14 +536,14 @@ H5FD_mirror_xmit_decode_header(H5FD_mirror_xmit_t *out, const unsigned char *buf
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->magic), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->version), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->session_token), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->xmit_count), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->op), &buf[n_eaten]);
- HDassert(n_eaten == H5FD_MIRROR_XMIT_HEADER_SIZE);
+ assert(n_eaten == H5FD_MIRROR_XMIT_HEADER_SIZE);
return n_eaten;
} /* end H5FD_mirror_xmit_decode_header() */
@@ -574,11 +574,11 @@ H5FD_mirror_xmit_decode_lock(H5FD_mirror_xmit_lock_t *out, const unsigned char *
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->rw), &buf[n_eaten]);
- HDassert(n_eaten == H5FD_MIRROR_XMIT_LOCK_SIZE);
+ assert(n_eaten == H5FD_MIRROR_XMIT_LOCK_SIZE);
return n_eaten;
} /* end H5FD_mirror_xmit_decode_lock() */
@@ -610,13 +610,13 @@ H5FD_mirror_xmit_decode_open(H5FD_mirror_xmit_open_t *out, const unsigned char *
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->flags), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->maxaddr), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->size_t_blob), &buf[n_eaten]);
- HDassert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_eaten);
+ assert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_eaten);
HDstrncpy(out->filename, (const char *)&buf[n_eaten], H5FD_MIRROR_XMIT_FILEPATH_MAX - 1);
out->filename[H5FD_MIRROR_XMIT_FILEPATH_MAX - 1] = 0; /* force final NULL */
@@ -650,11 +650,11 @@ H5FD_mirror_xmit_decode_reply(H5FD_mirror_xmit_reply_t *out, const unsigned char
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->status), &buf[n_eaten]);
- HDassert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_eaten);
+ assert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_eaten);
HDstrncpy(out->message, (const char *)&buf[n_eaten], H5FD_MIRROR_STATUS_MESSAGE_MAX - 1);
out->message[H5FD_MIRROR_STATUS_MESSAGE_MAX - 1] = 0; /* force NULL term */
@@ -687,12 +687,12 @@ H5FD_mirror_xmit_decode_set_eoa(H5FD_mirror_xmit_eoa_t *out, const unsigned char
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->type), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->eoa_addr), &buf[n_eaten]);
- HDassert(n_eaten == H5FD_MIRROR_XMIT_EOA_SIZE);
+ assert(n_eaten == H5FD_MIRROR_XMIT_EOA_SIZE);
return n_eaten;
} /* end H5FD_mirror_xmit_decode_set_eoa() */
@@ -723,13 +723,13 @@ H5FD_mirror_xmit_decode_write(H5FD_mirror_xmit_write_t *out, const unsigned char
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->type), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->offset), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->size), &buf[n_eaten]);
- HDassert(n_eaten == H5FD_MIRROR_XMIT_WRITE_SIZE);
+ assert(n_eaten == H5FD_MIRROR_XMIT_WRITE_SIZE);
return n_eaten;
} /* end H5FD_mirror_xmit_decode_write() */
@@ -755,14 +755,14 @@ H5FD_mirror_xmit_encode_header(unsigned char *dest, const H5FD_mirror_xmit_t *x)
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
n_writ += H5FD__mirror_xmit_encode_uint32((dest + n_writ), x->magic);
n_writ += H5FD__mirror_xmit_encode_uint8((dest + n_writ), x->version);
n_writ += H5FD__mirror_xmit_encode_uint32((dest + n_writ), x->session_token);
n_writ += H5FD__mirror_xmit_encode_uint32((dest + n_writ), x->xmit_count);
n_writ += H5FD__mirror_xmit_encode_uint8((dest + n_writ), x->op);
- HDassert(n_writ == H5FD_MIRROR_XMIT_HEADER_SIZE);
+ assert(n_writ == H5FD_MIRROR_XMIT_HEADER_SIZE);
return n_writ;
} /* end H5FD_mirror_xmit_encode_header() */
@@ -787,11 +787,11 @@ H5FD_mirror_xmit_encode_lock(unsigned char *dest, const H5FD_mirror_xmit_lock_t
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->rw);
- HDassert(n_writ == H5FD_MIRROR_XMIT_LOCK_SIZE);
+ assert(n_writ == H5FD_MIRROR_XMIT_LOCK_SIZE);
return n_writ;
} /* end H5FD_mirror_xmit_encode_lock() */
@@ -817,16 +817,16 @@ H5FD_mirror_xmit_encode_open(unsigned char *dest, const H5FD_mirror_xmit_open_t
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
/* clear entire structure, but especially its filepath string area */
- HDmemset(dest, 0, H5FD_MIRROR_XMIT_OPEN_SIZE);
+ memset(dest, 0, H5FD_MIRROR_XMIT_OPEN_SIZE);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint32(&dest[n_writ], x->flags);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->maxaddr);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->size_t_blob);
- HDassert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_writ);
+ assert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_writ);
HDstrncpy((char *)&dest[n_writ], x->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
return H5FD_MIRROR_XMIT_OPEN_SIZE;
@@ -854,14 +854,14 @@ H5FD_mirror_xmit_encode_reply(unsigned char *dest, const H5FD_mirror_xmit_reply_
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
/* clear entire structure, but especially its message string area */
- HDmemset(dest, 0, H5FD_MIRROR_XMIT_REPLY_SIZE);
+ memset(dest, 0, H5FD_MIRROR_XMIT_REPLY_SIZE);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint32(&dest[n_writ], x->status);
- HDassert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_writ);
+ assert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_writ);
HDstrncpy((char *)&dest[n_writ], x->message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
return H5FD_MIRROR_XMIT_REPLY_SIZE;
@@ -888,12 +888,12 @@ H5FD_mirror_xmit_encode_set_eoa(unsigned char *dest, const H5FD_mirror_xmit_eoa_
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint8(&dest[n_writ], x->type);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->eoa_addr);
- HDassert(n_writ == H5FD_MIRROR_XMIT_EOA_SIZE);
+ assert(n_writ == H5FD_MIRROR_XMIT_EOA_SIZE);
return n_writ;
} /* end H5FD_mirror_xmit_encode_set_eoa() */
@@ -919,13 +919,13 @@ H5FD_mirror_xmit_encode_write(unsigned char *dest, const H5FD_mirror_xmit_write_
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint8(&dest[n_writ], x->type);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->offset);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->size);
- HDassert(n_writ == H5FD_MIRROR_XMIT_WRITE_SIZE);
+ assert(n_writ == H5FD_MIRROR_XMIT_WRITE_SIZE);
return n_writ;
} /* end H5FD_mirror_xmit_encode_write() */
@@ -945,7 +945,7 @@ H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(xmit)) && (H5FD_MIRROR_OP_CLOSE == xmit->op))
return TRUE;
@@ -968,7 +968,7 @@ H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_LOCK == xmit->pub.op))
return TRUE;
@@ -991,7 +991,7 @@ H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_OPEN == xmit->pub.op))
@@ -1015,7 +1015,7 @@ H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_SET_EOA == xmit->pub.op))
return TRUE;
@@ -1038,7 +1038,7 @@ H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_REPLY == xmit->pub.op))
return TRUE;
@@ -1061,7 +1061,7 @@ H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_WRITE == xmit->pub.op))
return TRUE;
@@ -1084,7 +1084,7 @@ H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((H5FD_MIRROR_XMIT_MAGIC != xmit->magic) || (H5FD_MIRROR_XMIT_CURR_VERSION != xmit->version))
return FALSE;
@@ -1115,7 +1115,7 @@ H5FD__mirror_verify_reply(H5FD_mirror_t *file)
LOG_OP_CALL(__func__);
- HDassert(file && file->sock_fd);
+ assert(file && file->sock_fd);
xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
if (NULL == xmit_buf)
@@ -1239,8 +1239,8 @@ H5FD__mirror_fapl_free(void *_fa)
LOG_OP_CALL(__func__);
/* sanity check */
- HDassert(fa != NULL);
- HDassert(fa->magic == H5FD_MIRROR_FAPL_MAGIC);
+ assert(fa != NULL);
+ assert(fa->magic == H5FD_MIRROR_FAPL_MAGIC);
fa->magic += 1; /* invalidate */
H5MM_xfree(fa);
@@ -1282,7 +1282,7 @@ H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_dst /*out*/)
if (NULL == fa_src)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info");
- HDassert(fa_src->magic == H5FD_MIRROR_FAPL_MAGIC); /* sanity check */
+ assert(fa_src->magic == H5FD_MIRROR_FAPL_MAGIC); /* sanity check */
H5MM_memcpy(fa_dst, fa_src, sizeof(H5FD_mirror_fapl_t));
@@ -1387,7 +1387,7 @@ H5FD__mirror_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
target_addr.sin_family = AF_INET;
target_addr.sin_port = HDhtons((uint16_t)fa.handshake_port);
target_addr.sin_addr.s_addr = HDinet_addr(fa.remote_ip);
- HDmemset(target_addr.sin_zero, '\0', sizeof target_addr.sin_zero);
+ memset(target_addr.sin_zero, '\0', sizeof target_addr.sin_zero);
addr_size = sizeof(target_addr);
if (HDconnect(live_socket, (struct sockaddr *)&target_addr, addr_size) < 0)
@@ -1482,8 +1482,8 @@ H5FD__mirror_close(H5FD_t *_file)
LOG_OP_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->sock_fd >= 0);
+ assert(file);
+ assert(file->sock_fd >= 0);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_CLOSE;
@@ -1590,7 +1590,7 @@ H5FD__mirror_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
LOG_OP_CALL(__func__);
- HDassert(file);
+ assert(file);
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD__mirror_get_eoa() */
@@ -1617,7 +1617,7 @@ H5FD__mirror_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
LOG_OP_CALL(__func__);
- HDassert(file);
+ assert(file);
file->eoa = addr; /* local copy */
@@ -1672,7 +1672,7 @@ H5FD__mirror_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
LOG_OP_CALL(__func__);
- HDassert(file);
+ assert(file);
FUNC_LEAVE_NOAPI(file->eof)
} /* end H5FD__mirror_get_eof() */
@@ -1726,8 +1726,8 @@ H5FD__mirror_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
LOG_OP_CALL(__func__);
- HDassert(file);
- HDassert(buf);
+ assert(file);
+ assert(buf);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_WRITE;
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index b7b7489..af31907 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -53,16 +53,16 @@ H5FD_mpi_get_rank(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
+ assert(file);
cls = (const H5FD_class_t *)(file->cls);
- HDassert(cls);
- HDassert(cls->ctl); /* All MPI drivers must implement this */
+ assert(cls);
+ assert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
if ((cls->ctl)(file, H5FD_CTL_GET_MPI_RANK_OPCODE, flags, NULL, &rank_ptr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_rank request failed")
- HDassert(rank >= 0);
+ assert(rank >= 0);
ret_value = rank;
@@ -95,10 +95,10 @@ H5FD_mpi_get_size(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
+ assert(file);
cls = (const H5FD_class_t *)(file->cls);
- HDassert(cls);
- HDassert(cls->ctl); /* All MPI drivers must implement this */
+ assert(cls);
+ assert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
if ((cls->ctl)(file, H5FD_CTL_GET_MPI_SIZE_OPCODE, flags, NULL, &size_ptr) < 0)
@@ -138,10 +138,10 @@ H5FD_mpi_get_comm(H5FD_t *file)
FUNC_ENTER_NOAPI(MPI_COMM_NULL)
- HDassert(file);
+ assert(file);
cls = (const H5FD_class_t *)(file->cls);
- HDassert(cls);
- HDassert(cls->ctl); /* All MPI drivers must implement this */
+ assert(cls);
+ assert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
if ((cls->ctl)(file, H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE, flags, NULL, &comm_ptr) < 0)
@@ -208,7 +208,7 @@ H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off /*out*/)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(mpi_off);
+ assert(mpi_off);
/* Convert the HDF5 address into an MPI offset */
*mpi_off = (MPI_Offset)addr;
@@ -245,10 +245,10 @@ H5FD_mpi_get_file_sync_required(H5FD_t *file, hbool_t *file_sync_required)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
+ assert(file);
cls = (const H5FD_class_t *)(file->cls);
- HDassert(cls);
- HDassert(cls->ctl); /* All MPI drivers must implement this */
+ assert(cls);
+ assert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
if ((cls->ctl)(file, H5FD_CTL_GET_MPI_FILE_SYNC_OPCODE, flags, NULL, file_sync_required_ptr) < 0)
@@ -294,11 +294,11 @@ H5FD_mpio_wait_for_left_neighbor(H5FD_t *_file)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
/* Portably initialize MPI status variable */
- HDmemset(&rcvstat, 0, sizeof(MPI_Status));
+ memset(&rcvstat, 0, sizeof(MPI_Status));
/* p0 has no left neighbor; all other procs wait for msg */
if (file->mpi_rank != 0) {
@@ -344,8 +344,8 @@ H5FD_mpio_signal_right_neighbor(H5FD_t *_file)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
if (file->mpi_rank != (file->mpi_size - 1))
if (MPI_SUCCESS !=
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 50d3cff..886520b 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -192,7 +192,7 @@ H5FD__mpio_parse_debug_str(const char *s)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(s);
+ assert(s);
/* Set debug mask */
while (*s) {
@@ -297,7 +297,7 @@ H5FD_mpio_init(void)
#ifdef H5FDmpio_DEBUG
/* Clear the flag buffer */
- HDmemset(H5FD_mpio_debug_flags_s, 0, sizeof(H5FD_mpio_debug_flags_s));
+ memset(H5FD_mpio_debug_flags_s, 0, sizeof(H5FD_mpio_debug_flags_s));
/* Retrieve MPI-IO debugging environment variable */
s = HDgetenv("H5FD_mpio_Debug");
@@ -752,7 +752,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* set atomicity value */
@@ -762,7 +762,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -795,7 +795,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Get atomicity value */
@@ -810,7 +810,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -881,8 +881,8 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] &&
(H5FD_mpio_debug_rank_s < 0 || H5FD_mpio_debug_rank_s == mpi_rank));
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering - name = \"%s\", flags = 0x%x, fapl_id = %d, maxaddr = %lu\n",
- __func__, mpi_rank, name, flags, (int)fapl_id, (unsigned long)maxaddr);
+ fprintf(stderr, "%s: (%d) Entering - name = \"%s\", flags = 0x%x, fapl_id = %d, maxaddr = %lu\n",
+ __func__, mpi_rank, name, flags, (int)fapl_id, (unsigned long)maxaddr);
#endif
/* Convert HDF5 flags to MPI-IO flags */
@@ -1019,7 +1019,7 @@ done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1052,12 +1052,12 @@ H5FD__mpio_close(H5FD_t *_file)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
/* MPI_File_close sets argument to MPI_FILE_NULL */
if (MPI_SUCCESS != (mpi_code = MPI_File_close(&(file->f))))
@@ -1071,7 +1071,7 @@ H5FD__mpio_close(H5FD_t *_file)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1131,8 +1131,8 @@ H5FD__mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD__mpio_get_eoa() */
@@ -1159,8 +1159,8 @@ H5FD__mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
file->eoa = addr;
@@ -1201,8 +1201,8 @@ H5FD__mpio_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
FUNC_LEAVE_NOAPI(file->eof)
} /* end H5FD__mpio_get_eof() */
@@ -1291,16 +1291,16 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
- HDassert(buf);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
+ assert(buf);
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
+ memset(&mpi_stat, 0, sizeof(MPI_Status));
/* some numeric conversions */
if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off /*out*/) < 0)
@@ -1351,7 +1351,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
#endif
/* Get the collective_opt property to check whether the application wants to do IO individually. */
if (H5CX_get_mpio_coll_opt(&coll_opt_mode) < 0)
@@ -1360,13 +1360,13 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
#endif
/* Check whether we should read from rank 0 and broadcast to other ranks */
if (H5CX_get_mpio_rank0_bcast()) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", __func__, file->mpi_rank);
#endif
/* Indicate path we've taken */
rank0_bcast = TRUE;
@@ -1392,7 +1392,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
else {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent read operation */
@@ -1426,7 +1426,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent read operation */
@@ -1486,15 +1486,15 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_read = %lld type = %s\n", __func__, file->mpi_rank,
- (long)mpi_off, (long long)bytes_read, H5FD__mem_t_to_str(type));
+ fprintf(stderr, "%s: (%d) mpi_off = %ld bytes_read = %lld type = %s\n", __func__, file->mpi_rank,
+ (long)mpi_off, (long long)bytes_read, H5FD__mem_t_to_str(type));
#endif
/*
* This gives us zeroes beyond end of physical MPI file.
*/
if ((n = (io_size - bytes_read)) > 0)
- HDmemset((char *)buf + bytes_read, 0, (size_t)n);
+ memset((char *)buf + bytes_read, 0, (size_t)n);
done:
if (derived_type)
@@ -1502,7 +1502,7 @@ done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1561,19 +1561,19 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
- HDassert(buf);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
+ assert(buf);
/* Verify that no data is written when between MPI_Barrier()s during file flush */
- HDassert(!H5CX_get_mpi_file_flushing());
+ assert(!H5CX_get_mpi_file_flushing());
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
+ memset(&mpi_stat, 0, sizeof(MPI_Status));
/* some numeric conversions */
if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off) < 0)
@@ -1619,7 +1619,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
#endif
/* Get the collective_opt property to check whether the application wants to do IO individually. */
@@ -1629,7 +1629,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
#endif
/* Perform collective write operation */
if (MPI_SUCCESS !=
@@ -1649,7 +1649,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent write operation */
if (MPI_SUCCESS !=
@@ -1680,7 +1680,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent write operation */
@@ -1713,8 +1713,8 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_written = %lld type = %s\n", __func__,
- file->mpi_rank, (long)mpi_off, (long long)bytes_written, H5FD__mem_t_to_str(type));
+ fprintf(stderr, "%s: (%d) mpi_off = %ld bytes_written = %lld type = %s\n", __func__, file->mpi_rank,
+ (long)mpi_off, (long long)bytes_written, H5FD__mem_t_to_str(type));
#endif
/* Each process will keep track of its perceived EOF value locally, and
@@ -1734,7 +1734,7 @@ done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
+ fprintf(stderr, "%s: (%d) Leaving: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1781,20 +1781,20 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(s_sizes);
- HDassert(s_bufs);
- HDassert(vector_was_sorted);
- HDassert(*vector_was_sorted);
- HDassert(mpi_off);
- HDassert(mpi_bufs_base);
- HDassert(size_i);
- HDassert(buf_type);
- HDassert(buf_type_created);
- HDassert(!*buf_type_created);
- HDassert(file_type);
- HDassert(file_type_created);
- HDassert(!*file_type_created);
- HDassert(unused);
+ assert(s_sizes);
+ assert(s_bufs);
+ assert(vector_was_sorted);
+ assert(*vector_was_sorted);
+ assert(mpi_off);
+ assert(mpi_bufs_base);
+ assert(size_i);
+ assert(buf_type);
+ assert(buf_type_created);
+ assert(!*buf_type_created);
+ assert(file_type);
+ assert(file_type_created);
+ assert(!*file_type_created);
+ assert(unused);
/* Get bio I/O transition point (may be lower than 2G for testing) */
bigio_count = H5_mpi_get_bigio_count();
@@ -1850,9 +1850,9 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
s_sizes, s_bufs) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't sort vector I/O request")
- if ((NULL == (mpi_block_lengths = (int *)HDmalloc((size_t)count * sizeof(int)))) ||
- (NULL == (mpi_displacements = (MPI_Aint *)HDmalloc((size_t)count * sizeof(MPI_Aint)))) ||
- (NULL == (mpi_bufs = (MPI_Aint *)HDmalloc((size_t)count * sizeof(MPI_Aint))))) {
+ if ((NULL == (mpi_block_lengths = (int *)malloc((size_t)count * sizeof(int)))) ||
+ (NULL == (mpi_displacements = (MPI_Aint *)malloc((size_t)count * sizeof(MPI_Aint)))) ||
+ (NULL == (mpi_bufs = (MPI_Aint *)malloc((size_t)count * sizeof(MPI_Aint))))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc mpi block lengths / displacement")
}
@@ -1890,7 +1890,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
/* Determine size of this vector element */
if (!fixed_size) {
if ((*s_sizes)[i] == 0) {
- HDassert(vector_was_sorted);
+ assert(vector_was_sorted);
fixed_size = TRUE;
size = sizes[i - 1];
}
@@ -1924,11 +1924,11 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
/* Allocate arrays to keep track of types and whether they were created, if
* necessary */
if (!sub_types) {
- HDassert(!sub_types_created);
+ assert(!sub_types_created);
- if (NULL == (sub_types = HDmalloc((size_t)count * sizeof(MPI_Datatype))))
+ if (NULL == (sub_types = malloc((size_t)count * sizeof(MPI_Datatype))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sub types array")
- if (NULL == (sub_types_created = (uint8_t *)HDcalloc((size_t)count, 1))) {
+ if (NULL == (sub_types_created = (uint8_t *)calloc((size_t)count, 1))) {
H5MM_free(sub_types);
sub_types = NULL;
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sub types created array")
@@ -1938,7 +1938,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
for (j = 0; j < (int)count; j++)
sub_types[j] = MPI_BYTE;
}
- HDassert(sub_types_created);
+ assert(sub_types_created);
/* Create type for large block */
if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &sub_types[i]) < 0)
@@ -1949,7 +1949,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
mpi_block_lengths[i] = 1;
}
else
- HDassert(size == (size_t)mpi_block_lengths[i]);
+ assert(size == (size_t)mpi_block_lengths[i]);
}
/* create the memory MPI derived types */
@@ -1985,28 +1985,28 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit for file_type failed", mpi_code)
/* Free up memory used to build types */
- HDassert(mpi_block_lengths);
- HDfree(mpi_block_lengths);
+ assert(mpi_block_lengths);
+ free(mpi_block_lengths);
mpi_block_lengths = NULL;
- HDassert(mpi_displacements);
- HDfree(mpi_displacements);
+ assert(mpi_displacements);
+ free(mpi_displacements);
mpi_displacements = NULL;
- HDassert(mpi_bufs);
- HDfree(mpi_bufs);
+ assert(mpi_bufs);
+ free(mpi_bufs);
mpi_bufs = NULL;
if (sub_types) {
- HDassert(sub_types);
+ assert(sub_types);
for (i = 0; i < (int)count; i++)
if (sub_types_created[i])
MPI_Type_free(&sub_types[i]);
- HDfree(sub_types);
+ free(sub_types);
sub_types = NULL;
- HDfree(sub_types_created);
+ free(sub_types_created);
sub_types_created = NULL;
}
@@ -2034,47 +2034,47 @@ done:
/* free sorted vectors if they exist */
if (!vector_was_sorted)
if (s_types) {
- HDfree(s_types);
+ free(s_types);
s_types = NULL;
}
/* Clean up on error */
if (ret_value < 0) {
if (mpi_block_lengths) {
- HDfree(mpi_block_lengths);
+ free(mpi_block_lengths);
mpi_block_lengths = NULL;
}
if (mpi_displacements) {
- HDfree(mpi_displacements);
+ free(mpi_displacements);
mpi_displacements = NULL;
}
if (mpi_bufs) {
- HDfree(mpi_bufs);
+ free(mpi_bufs);
mpi_bufs = NULL;
}
if (sub_types) {
- HDassert(sub_types_created);
+ assert(sub_types_created);
for (i = 0; i < (int)count; i++)
if (sub_types_created[i])
MPI_Type_free(&sub_types[i]);
- HDfree(sub_types);
+ free(sub_types);
sub_types = NULL;
- HDfree(sub_types_created);
+ free(sub_types_created);
sub_types_created = NULL;
}
}
/* Make sure we cleaned up */
- HDassert(!mpi_block_lengths);
- HDassert(!mpi_displacements);
- HDassert(!mpi_bufs);
- HDassert(!sub_types);
- HDassert(!sub_types_created);
+ assert(!mpi_block_lengths);
+ assert(!mpi_displacements);
+ assert(!mpi_bufs);
+ assert(!sub_types);
+ assert(!sub_types_created);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__mpio_vector_build_types() */
@@ -2160,22 +2160,22 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Get the transfer mode from the API context
*
@@ -2200,16 +2200,16 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* free sorted addrs vector if it exists */
if (!vector_was_sorted)
if (s_addrs) {
- HDfree(s_addrs);
+ free(s_addrs);
s_addrs = NULL;
}
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(mpi_stat));
+ memset(&mpi_stat, 0, sizeof(mpi_stat));
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i);
+ fprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i);
#endif
/* Setup the file view. */
@@ -2230,18 +2230,18 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* Read the data. */
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: using MPIO collective mode\n", __func__);
+ fprintf(stdout, "%s: using MPIO collective mode\n", __func__);
#endif
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: doing MPI collective IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI collective IO\n", __func__);
#endif
/* Check whether we should read from rank 0 and broadcast to other ranks */
if (H5CX_get_mpio_rank0_bcast()) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: doing read-rank0-and-MPI_Bcast\n", __func__);
+ fprintf(stdout, "%s: doing read-rank0-and-MPI_Bcast\n", __func__);
#endif
/* Indicate path we've taken */
rank0_bcast = TRUE;
@@ -2261,7 +2261,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
else if (size_i > 0) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI independent IO\n", __func__);
#endif
if (MPI_SUCCESS !=
@@ -2326,7 +2326,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* Iterate over sorted array in reverse, filling in zeroes to
* sections of the buffers that were not read to */
do {
- HDassert(i >= 0);
+ assert(i >= 0);
#if MPI_VERSION >= 3
io_size = MIN(n, (MPI_Count)s_sizes[i]);
@@ -2335,9 +2335,9 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
io_size = MIN(n, (int)s_sizes[i]);
bytes_read = (int)s_sizes[i] - io_size;
#endif
- HDassert(bytes_read >= 0);
+ assert(bytes_read >= 0);
- HDmemset((char *)s_bufs[i] + bytes_read, 0, (size_t)io_size);
+ memset((char *)s_bufs[i] + bytes_read, 0, (size_t)io_size);
n -= io_size;
i--;
@@ -2365,7 +2365,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI independent IO\n", __func__);
#endif
/* Loop over vector elements */
@@ -2404,7 +2404,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* Check if we actually need to do I/O */
if (addrs[i] < max_addr) {
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(mpi_stat));
+ memset(&mpi_stat, 0, sizeof(mpi_stat));
/* Issue read */
if (MPI_SUCCESS !=
@@ -2437,13 +2437,13 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
* addresses.
*/
if ((n = (io_size - bytes_read)) > 0) {
- HDmemset((char *)bufs[i] + bytes_read, 0, (size_t)n);
+ memset((char *)bufs[i] + bytes_read, 0, (size_t)n);
max_addr = addrs[i] + (haddr_t)bytes_read;
}
}
else {
/* Read is past the max address, fill in zeroes */
- HDmemset((char *)bufs[i], 0, size);
+ memset((char *)bufs[i], 0, size);
}
}
}
@@ -2460,22 +2460,22 @@ done:
/* free sorted vectors if they exist */
if (!vector_was_sorted) {
if (s_addrs) {
- HDfree(s_addrs);
+ free(s_addrs);
s_addrs = NULL;
}
if (s_sizes) {
- HDfree(s_sizes);
+ free(s_sizes);
s_sizes = NULL;
}
if (s_bufs) {
- HDfree(s_bufs);
+ free(s_bufs);
s_bufs = NULL;
}
}
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
+ fprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -2552,26 +2552,26 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Verify that no data is written when between MPI_Barrier()s during file flush */
- HDassert(!H5CX_get_mpi_file_flushing());
+ assert(!H5CX_get_mpi_file_flushing());
/* Get the transfer mode from the API context
*
@@ -2600,25 +2600,25 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
/* free sorted vectors if they exist */
if (!vector_was_sorted) {
if (s_addrs) {
- HDfree(s_addrs);
+ free(s_addrs);
s_addrs = NULL;
}
if (s_sizes) {
- HDfree(s_sizes);
+ free(s_sizes);
s_sizes = NULL;
}
if (s_bufs) {
- HDfree(s_bufs);
+ free(s_bufs);
s_bufs = NULL;
}
}
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
+ memset(&mpi_stat, 0, sizeof(MPI_Status));
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i);
+ fprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i);
#endif
/* Setup the file view. */
@@ -2638,13 +2638,13 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
/* Write the data. */
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: using MPIO collective mode\n", __func__);
+ fprintf(stdout, "%s: using MPIO collective mode\n", __func__);
#endif
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: doing MPI collective IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI collective IO\n", __func__);
#endif
if (MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(file->f, mpi_off, mpi_bufs_base, size_i,
@@ -2660,7 +2660,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
else if (size_i > 0) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI independent IO\n", __func__);
#endif
if (MPI_SUCCESS !=
@@ -2693,7 +2693,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI independent IO\n", __func__);
#endif
/* Loop over vector elements */
@@ -2764,27 +2764,27 @@ done:
/* Cleanup on error */
if (ret_value < 0 && !vector_was_sorted) {
if (s_addrs) {
- HDfree(s_addrs);
+ free(s_addrs);
s_addrs = NULL;
}
if (s_sizes) {
- HDfree(s_sizes);
+ free(s_sizes);
s_sizes = NULL;
}
if (s_bufs) {
- HDfree(s_bufs);
+ free(s_bufs);
s_bufs = NULL;
}
}
/* Make sure we cleaned up */
- HDassert(vector_was_sorted || !s_addrs);
- HDassert(vector_was_sorted || !s_sizes);
- HDassert(vector_was_sorted || !s_bufs);
+ assert(vector_was_sorted || !s_addrs);
+ assert(vector_was_sorted || !s_sizes);
+ assert(vector_was_sorted || !s_bufs);
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
+ fprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -2816,12 +2816,12 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
/* Only sync the file if we are not going to immediately close it */
if (!closing)
@@ -2831,7 +2831,7 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -2873,12 +2873,12 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
if (!H5F_addr_eq(file->eoa, file->last_eoa)) {
int mpi_code; /* mpi return code */
@@ -2944,7 +2944,7 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -2971,11 +2971,11 @@ H5FD__mpio_delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- HDassert(H5FD_MPIO == H5P_peek_driver(plist));
+ assert(H5FD_MPIO == H5P_peek_driver(plist));
if (H5FD_mpi_self_initialized) {
comm = MPI_COMM_WORLD;
@@ -3059,32 +3059,32 @@ H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
switch (op_code) {
case H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((MPI_Comm **)output) = file->comm;
break;
case H5FD_CTL_GET_MPI_RANK_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((int **)output) = file->mpi_rank;
break;
case H5FD_CTL_GET_MPI_SIZE_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((int **)output) = file->mpi_size;
break;
case H5FD_CTL_GET_MPI_FILE_SYNC_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((hbool_t **)output) = file->mpi_file_sync_required;
break;
diff --git a/src/H5FDonion.c b/src/H5FDonion.c
index ad21e8f..ffee132 100644
--- a/src/H5FDonion.c
+++ b/src/H5FDonion.c
@@ -295,7 +295,7 @@ H5Pget_fapl_onion(hid_t fapl_id, H5FD_onion_fapl_info_t *fa_out)
if (NULL == (info_ptr = (const H5FD_onion_fapl_info_t *)H5P_peek_driver_info(plist)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad VFL driver info")
- HDmemcpy(fa_out, info_ptr, sizeof(H5FD_onion_fapl_info_t));
+ memcpy(fa_out, info_ptr, sizeof(H5FD_onion_fapl_info_t));
done:
FUNC_LEAVE_API(ret_value)
@@ -377,8 +377,8 @@ H5FD__onion_sb_size(H5FD_t *_file)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(file);
- HDassert(file->original_file);
+ assert(file);
+ assert(file->original_file);
if (file->original_file)
ret_value = H5FD_sb_size(file->original_file);
@@ -403,8 +403,8 @@ H5FD__onion_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*ou
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
- HDassert(file->original_file);
+ assert(file);
+ assert(file->original_file);
if (file->original_file && H5FD_sb_encode(file->original_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL, "unable to encode the superblock in R/W file")
@@ -430,8 +430,8 @@ H5FD__onion_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
- HDassert(file->original_file);
+ assert(file);
+ assert(file->original_file);
if (H5FD_sb_load(file->original_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode the superblock in R/W file")
@@ -494,7 +494,7 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file)
if (history->n_revisions == 0) {
unsigned char *ptr = buf; /* re-use buffer space to compute checksum */
- HDassert(history->record_locs == NULL);
+ assert(history->record_locs == NULL);
history->n_revisions = 1;
if (NULL == (history->record_locs = H5MM_calloc(sizeof(H5FD_onion_record_loc_t))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate temporary record pointer list")
@@ -510,11 +510,11 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file)
else {
unsigned char *ptr = buf; /* re-use buffer space to compute checksum */
- HDassert(history->record_locs != NULL);
+ assert(history->record_locs != NULL);
if (NULL == (new_list = H5MM_calloc((history->n_revisions + 1) * sizeof(H5FD_onion_record_loc_t))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to resize record pointer list")
- HDmemcpy(new_list, history->record_locs, sizeof(H5FD_onion_record_loc_t) * history->n_revisions);
+ memcpy(new_list, history->record_locs, sizeof(H5FD_onion_record_loc_t) * history->n_revisions);
H5MM_xfree(history->record_locs);
history->record_locs = new_list;
new_list = NULL;
@@ -554,15 +554,15 @@ H5FD__onion_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (H5FD_ONION_STORE_TARGET_ONION == file->fa.store_target) {
- HDassert(file->onion_file);
+ assert(file->onion_file);
if (file->is_open_rw) {
- HDassert(file->recovery_file);
+ assert(file->recovery_file);
if (H5FD__onion_commit_new_revision_record(file) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "Can't write revision record to backing store")
@@ -695,7 +695,7 @@ H5FD__onion_create_truncate_onion(H5FD_onion_t *file, const char *filename, cons
FUNC_ENTER_PACKAGE;
- HDassert(file != NULL);
+ assert(file != NULL);
hdr = &file->header;
history = &file->history;
@@ -926,7 +926,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
if (0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
- HDassert(H5P_DEFAULT != fapl_id);
+ assert(H5P_DEFAULT != fapl_id);
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
@@ -980,7 +980,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
/* Initialize file structure fields */
- HDmemcpy(&(file->fa), fa, sizeof(H5FD_onion_fapl_info_t));
+ memcpy(&(file->fa), fa, sizeof(H5FD_onion_fapl_info_t));
file->header.version = H5FD_ONION_HEADER_VERSION_CURR;
file->header.page_size = file->fa.page_size; /* guarded on FAPL-set */
@@ -1043,7 +1043,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
size_t size = 0;
size_t saved_size = 0;
- HDassert(file != NULL);
+ assert(file != NULL);
hdr = &file->header;
history = &file->history;
@@ -1348,8 +1348,8 @@ H5FD__onion_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
FUNC_ENTER_PACKAGE
- HDassert(file != NULL);
- HDassert(buf_out != NULL);
+ assert(file != NULL);
+ assert(buf_out != NULL);
if ((uint64_t)(offset + len) > file->logical_eoa)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Read extends beyond addressed space")
@@ -1422,7 +1422,7 @@ H5FD__onion_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
bytes_to_read -= page_readsize;
} /* end for each page in range */
- HDassert(0 == bytes_to_read);
+ assert(0 == bytes_to_read);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -1472,10 +1472,10 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
FUNC_ENTER_PACKAGE
- HDassert(file != NULL);
- HDassert(buf != NULL);
- HDassert(file->rev_index != NULL);
- HDassert((uint64_t)(offset + len) <= file->logical_eoa);
+ assert(file != NULL);
+ assert(buf != NULL);
+ assert(file->rev_index != NULL);
+ assert((uint64_t)(offset + len) <= file->logical_eoa);
if (FALSE == file->is_open_rw)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Write not allowed if file not opened in write mode")
@@ -1523,7 +1523,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
if (H5FD_read(file->onion_file, H5FD_MEM_DRAW, entry_out->phys_addr, page_size, page_buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get working file data")
/* Overlay delta from input buffer onto page buffer. */
- HDmemcpy(page_buf + page_gap_head, buf, page_n_used);
+ memcpy(page_buf + page_gap_head, buf, page_n_used);
write_buf = page_buf;
} /* end if partial page */
@@ -1570,8 +1570,8 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
} /* end if page exists in neither index */
/* Copy input buffer to temporary page buffer */
- HDassert((page_size - page_gap_head) >= page_n_used);
- HDmemcpy(page_buf + page_gap_head, buf, page_n_used);
+ assert((page_size - page_gap_head) >= page_n_used);
+ memcpy(page_buf + page_gap_head, buf, page_n_used);
write_buf = page_buf;
} /* end if data range does not span entire page */
@@ -1594,7 +1594,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
} /* end for each page to write */
- HDassert(0 == bytes_to_write);
+ assert(0 == bytes_to_write);
file->logical_eof = MAX(file->logical_eof, (offset + len));
@@ -1631,7 +1631,7 @@ H5FD__onion_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_A
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
+ assert(file);
switch (op_code) {
case H5FD_CTL_GET_NUM_REVISIONS:
@@ -1714,8 +1714,8 @@ H5FD__get_onion_revision_count(H5FD_t *file, uint64_t *revision_count)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(revision_count);
+ assert(file);
+ assert(revision_count);
op_code = H5FD_CTL_GET_NUM_REVISIONS;
flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG;
diff --git a/src/H5FDonion_header.c b/src/H5FDonion_header.c
index f71f168..e882af2 100644
--- a/src/H5FDonion_header.c
+++ b/src/H5FDonion_header.c
@@ -129,9 +129,9 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header)
FUNC_ENTER_PACKAGE;
- HDassert(buf != NULL);
- HDassert(header != NULL);
- HDassert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
+ assert(buf != NULL);
+ assert(header != NULL);
+ assert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
if (HDstrncmp((const char *)buf, H5FD_ONION_HEADER_SIGNATURE, 4))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid header signature")
@@ -141,34 +141,34 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header)
ptr = buf + 5;
ui32 = 0;
- HDmemcpy(&ui32, ptr, 3);
+ memcpy(&ui32, ptr, 3);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->flags);
ptr += 3;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->page_size);
ptr += 4;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->origin_eof);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->history_addr);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->history_size);
ptr += 8;
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->checksum);
ptr += 4;
@@ -207,15 +207,15 @@ H5FD__onion_header_encode(H5FD_onion_header_t *header, unsigned char *buf, uint3
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(buf != NULL);
- HDassert(checksum != NULL);
- HDassert(header != NULL);
- HDassert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
- HDassert(0 == (header->flags & 0xFF000000)); /* max three bits long */
+ assert(buf != NULL);
+ assert(checksum != NULL);
+ assert(header != NULL);
+ assert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
+ assert(0 == (header->flags & 0xFF000000)); /* max three bits long */
- HDmemcpy(ptr, H5FD_ONION_HEADER_SIGNATURE, 4);
+ memcpy(ptr, H5FD_ONION_HEADER_SIGNATURE, 4);
ptr += 4;
- HDmemcpy(ptr, (unsigned char *)&header->version, 1);
+ memcpy(ptr, (unsigned char *)&header->version, 1);
ptr += 1;
UINT32ENCODE(ptr, header->flags);
ptr -= 1; /* truncate to three bytes */
diff --git a/src/H5FDonion_history.c b/src/H5FDonion_history.c
index b44021b..b4c9fd2 100644
--- a/src/H5FDonion_history.c
+++ b/src/H5FDonion_history.c
@@ -44,8 +44,8 @@ H5FD__onion_ingest_history(H5FD_onion_history_t *history_out, H5FD_t *raw_file,
FUNC_ENTER_PACKAGE;
- HDassert(history_out);
- HDassert(raw_file);
+ assert(history_out);
+ assert(raw_file);
/* Set early so we can clean up properly on errors */
history_out->record_locs = NULL;
@@ -167,9 +167,9 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
FUNC_ENTER_PACKAGE;
- HDassert(buf != NULL);
- HDassert(history != NULL);
- HDassert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
+ assert(buf != NULL);
+ assert(history != NULL);
+ assert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
if (HDstrncmp((const char *)buf, H5FD_ONION_HISTORY_SIGNATURE, 4))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid signature")
@@ -179,7 +179,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
ptr = buf + 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, n_revisions);
ptr += 8;
@@ -206,19 +206,19 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
uint64_t record_size;
uint64_t phys_addr;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, phys_addr);
H5_CHECKED_ASSIGN(rloc->phys_addr, haddr_t, phys_addr, uint64_t);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record_size);
H5_CHECKED_ASSIGN(rloc->record_size, hsize_t, record_size, uint64_t);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, rloc->checksum);
ptr += 4;
@@ -227,7 +227,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, history->checksum);
ptr += 4;
@@ -269,17 +269,17 @@ H5FD__onion_history_encode(H5FD_onion_history_t *history, unsigned char *buf, ui
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(history != NULL);
- HDassert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
- HDassert(buf != NULL);
- HDassert(checksum != NULL);
+ assert(history != NULL);
+ assert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
+ assert(buf != NULL);
+ assert(checksum != NULL);
- HDmemcpy(ptr, H5FD_ONION_HISTORY_SIGNATURE, 4);
+ memcpy(ptr, H5FD_ONION_HISTORY_SIGNATURE, 4);
ptr += 4;
UINT32ENCODE(ptr, vers_u32);
UINT64ENCODE(ptr, history->n_revisions);
if (history->n_revisions > 0) {
- HDassert(history->record_locs != NULL);
+ assert(history->record_locs != NULL);
for (uint64_t i = 0; i < history->n_revisions; i++) {
H5FD_onion_record_loc_t *rloc = &history->record_locs[i];
diff --git a/src/H5FDonion_index.c b/src/H5FDonion_index.c
index c9e9a15..a164e91 100644
--- a/src/H5FDonion_index.c
+++ b/src/H5FDonion_index.c
@@ -53,11 +53,11 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t *
FUNC_ENTER_PACKAGE;
- HDassert(r_out);
- HDassert(raw_file);
- HDassert(history);
- HDassert(history->record_locs);
- HDassert(history->n_revisions > 0);
+ assert(r_out);
+ assert(raw_file);
+ assert(history);
+ assert(history->record_locs);
+ assert(history->n_revisions > 0);
high = history->n_revisions - 1;
range = high;
@@ -185,7 +185,7 @@ H5FD__onion_archival_index_is_valid(const H5FD_onion_archival_index_t *aix)
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(aix);
+ assert(aix);
if (H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR != aix->version)
HGOTO_DONE(FALSE)
@@ -229,11 +229,11 @@ H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *aix, uint64_t
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(aix);
- HDassert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == aix->version);
- HDassert(entry_out);
+ assert(aix);
+ assert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == aix->version);
+ assert(entry_out);
if (aix->n_entries != 0)
- HDassert(aix->list);
+ assert(aix->list);
high = aix->n_entries - 1;
range = high;
@@ -249,7 +249,7 @@ H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *aix, uint64_t
/* Winnow down to first of found or one element */
while (range > 0) {
- HDassert(high < aix->n_entries);
+ assert(high < aix->n_entries);
n = low + (range / 2);
x = &(aix->list[n]);
if (x->logical_page == logical_page) {
@@ -266,7 +266,7 @@ H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *aix, uint64_t
range = high - low;
}
- HDassert(high == low); /* one element */
+ assert(high == low); /* one element */
/* n == low/high check because we may have tested it already above */
if ((n != low || n != high) && (aix->list[low].logical_page == logical_page)) {
@@ -293,8 +293,8 @@ H5FD__onion_revision_index_destroy(H5FD_onion_revision_index_t *rix)
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(rix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(rix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
for (size_t i = 0; 0 < rix->_hash_table_n_keys_populated && i < rix->_hash_table_size; i++) {
H5FD_onion_revision_index_hash_chain_node_t *next = NULL;
@@ -304,7 +304,7 @@ H5FD__onion_revision_index_destroy(H5FD_onion_revision_index_t *rix)
rix->_hash_table_n_keys_populated -= 1;
while (node != NULL) {
- HDassert(H5FD_ONION_REVISION_INDEX_HASH_CHAIN_NODE_VERSION_CURR == node->version);
+ assert(H5FD_ONION_REVISION_INDEX_HASH_CHAIN_NODE_VERSION_CURR == node->version);
next = node->next;
H5MM_xfree(node);
@@ -337,8 +337,8 @@ H5FD__onion_revision_index_init(uint32_t page_size)
FUNC_ENTER_PACKAGE;
- HDassert(0 != page_size);
- HDassert(POWER_OF_TWO(page_size));
+ assert(0 != page_size);
+ assert(POWER_OF_TWO(page_size));
if (NULL == (rix = H5MM_calloc(sizeof(H5FD_onion_revision_index_t))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "cannot allocate index")
@@ -391,9 +391,9 @@ H5FD__onion_revision_index_resize(H5FD_onion_revision_index_t *rix)
FUNC_ENTER_PACKAGE;
- HDassert(rix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
- HDassert(rix->_hash_table);
+ assert(rix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(rix->_hash_table);
if (NULL == (new_table = H5MM_calloc(new_size * sizeof(H5FD_onion_revision_index_hash_chain_node_t *))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new hash table")
@@ -453,9 +453,9 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
FUNC_ENTER_PACKAGE;
- HDassert(rix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
- HDassert(entry);
+ assert(rix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(entry);
/* Resize and re-hash table if necessary */
if (rix->n_entries >= (rix->_hash_table_size * 2) ||
@@ -465,7 +465,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
}
key = entry->logical_page & (rix->_hash_table_size - 1);
- HDassert(key < rix->_hash_table_size);
+ assert(key < rix->_hash_table_size);
if (NULL == rix->_hash_table[key]) {
/* Key maps to empty bucket */
@@ -482,7 +482,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
if (entry->phys_addr != node->entry_data.phys_addr) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "physical address mismatch");
}
- HDmemcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
+ memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
append_dest = NULL; /* Node updated, do not append */
break;
}
@@ -495,7 +495,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new ash chain node")
node->version = H5FD_ONION_REVISION_INDEX_HASH_CHAIN_NODE_VERSION_CURR;
node->next = NULL;
- HDmemcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
+ memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
*append_dest = node;
rix->n_entries++;
}
@@ -526,13 +526,13 @@ H5FD__onion_revision_index_find(const H5FD_onion_revision_index_t *rix, uint64_t
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(rix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
- HDassert(rix->_hash_table);
- HDassert(entry_out);
+ assert(rix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(rix->_hash_table);
+ assert(entry_out);
key = logical_page & (rix->_hash_table_size - 1);
- HDassert(key < rix->_hash_table_size);
+ assert(key < rix->_hash_table_size);
if (rix->_hash_table[key] != NULL) {
H5FD_onion_revision_index_hash_chain_node_t *node = NULL;
@@ -598,10 +598,10 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
FUNC_ENTER_PACKAGE;
- HDassert(buf != NULL);
- HDassert(record != NULL);
- HDassert(H5FD_ONION_REVISION_RECORD_VERSION_CURR == record->version);
- HDassert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == record->archival_index.version);
+ assert(buf != NULL);
+ assert(record != NULL);
+ assert(H5FD_ONION_REVISION_RECORD_VERSION_CURR == record->version);
+ assert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == record->archival_index.version);
if (HDstrncmp((const char *)buf, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid signature")
@@ -611,25 +611,25 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
ptr = buf + 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->revision_num);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->parent_revision_num);
ptr += 8;
- HDmemcpy(record->time_of_creation, ptr, 16);
+ memcpy(record->time_of_creation, ptr, 16);
ptr += 16;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->logical_eof);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, page_size);
ptr += 4;
@@ -644,12 +644,12 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
record->archival_index.page_size_log2++)
;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, n_entries);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, comment_size);
ptr += 4;
@@ -670,7 +670,7 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
for (size_t i = 0; i < n_entries; i++) {
entry = &record->archival_index.list[i];
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, entry->logical_page);
ptr += 8;
@@ -681,12 +681,12 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
entry->logical_page = entry->logical_page >> record->archival_index.page_size_log2;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, entry->phys_addr);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, sum);
ptr += 4;
@@ -705,13 +705,13 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
else {
if (record->comment == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "no comment pointer")
- HDmemcpy(record->comment, ptr, comment_size);
+ memcpy(record->comment, ptr, comment_size);
}
ptr += comment_size;
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, record->checksum);
ptr += 4;
@@ -755,21 +755,21 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(checksum != NULL);
- HDassert(buf != NULL);
- HDassert(record != NULL);
- HDassert(vers_u32 < 0x100);
- HDassert(H5FD_ONION_REVISION_RECORD_VERSION_CURR == record->version);
- HDassert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == record->archival_index.version);
+ assert(checksum != NULL);
+ assert(buf != NULL);
+ assert(record != NULL);
+ assert(vers_u32 < 0x100);
+ assert(H5FD_ONION_REVISION_RECORD_VERSION_CURR == record->version);
+ assert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == record->archival_index.version);
page_size = (uint32_t)(1 << record->archival_index.page_size_log2);
- HDmemcpy(ptr, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4);
+ memcpy(ptr, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4);
ptr += 4;
UINT32ENCODE(ptr, vers_u32);
UINT64ENCODE(ptr, record->revision_num);
UINT64ENCODE(ptr, record->parent_revision_num);
- HDmemcpy(ptr, record->time_of_creation, 16);
+ memcpy(ptr, record->time_of_creation, 16);
ptr += 16;
UINT64ENCODE(ptr, record->logical_eof);
UINT32ENCODE(ptr, page_size);
@@ -779,7 +779,7 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
if (record->archival_index.n_entries > 0) {
uint64_t page_size_log2 = record->archival_index.page_size_log2;
- HDassert(record->archival_index.list != NULL);
+ assert(record->archival_index.list != NULL);
for (uint64_t i = 0; i < record->archival_index.n_entries; i++) {
uint32_t sum = 0;
H5FD_onion_index_entry_t *entry = NULL;
@@ -796,8 +796,8 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
}
if (record->comment_size > 0) {
- HDassert(record->comment != NULL && *record->comment != '\0');
- HDmemcpy(ptr, record->comment, record->comment_size);
+ assert(record->comment != NULL && *record->comment != '\0');
+ memcpy(ptr, record->comment, record->comment_size);
ptr += record->comment_size;
}
@@ -855,11 +855,11 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
FUNC_ENTER_PACKAGE;
- HDassert(rix);
- HDassert(aix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
- HDassert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == aix->version);
- HDassert(aix->page_size_log2 == rix->page_size_log2);
+ assert(rix);
+ assert(aix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == aix->version);
+ assert(aix->page_size_log2 == rix->page_size_log2);
/* If the revision index is empty there is nothing to archive */
if (rix->n_entries == 0)
@@ -875,7 +875,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
const H5FD_onion_revision_index_hash_chain_node_t *node = NULL;
for (node = rix->_hash_table[i]; node != NULL; node = node->next) {
- HDmemcpy(&new_aix.list[new_aix.n_entries], &node->entry_data, sizeof(H5FD_onion_index_entry_t));
+ memcpy(&new_aix.list[new_aix.n_entries], &node->entry_data, sizeof(H5FD_onion_index_entry_t));
new_aix.n_entries++;
}
}
@@ -900,7 +900,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
/* Add only if page not already added from revision index */
if (H5FD__onion_archival_index_find(&new_aix, aix->list[i].logical_page, &entry) == 0) {
- HDmemcpy(&kept_list[n_kept], &aix->list[i], sizeof(H5FD_onion_index_entry_t));
+ memcpy(&kept_list[n_kept], &aix->list[i], sizeof(H5FD_onion_index_entry_t));
n_kept++;
}
}
@@ -913,12 +913,12 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate exact-size archival index list")
/* Copy (new) revision list entries to replacement list */
- HDmemcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries);
+ memcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries);
aix->n_entries = new_aix.n_entries;
/* Copy (old) kept archival list entries to replacement list */
if (n_kept > 0) {
- HDmemcpy(&aix->list[aix->n_entries], kept_list, sizeof(H5FD_onion_index_entry_t) * n_kept);
+ memcpy(&aix->list[aix->n_entries], kept_list, sizeof(H5FD_onion_index_entry_t) * n_kept);
aix->n_entries += n_kept;
}
diff --git a/src/H5FDros3.c b/src/H5FDros3.c
index 9a529d6..05ba257 100644
--- a/src/H5FDros3.c
+++ b/src/H5FDros3.c
@@ -306,7 +306,7 @@ H5FD_ros3_init(void)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_init() called.\n");
+ fprintf(stdout, "H5FD_ros3_init() called.\n");
#endif
if (H5I_VFL != H5I_get_type(H5FD_ROS3_g)) {
@@ -350,7 +350,7 @@ H5FD__ros3_term(void)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_term() called.\n");
+ fprintf(stdout, "H5FD__ros3_term() called.\n");
#endif
/* Reset VFL ID */
@@ -383,10 +383,10 @@ H5Pset_fapl_ros3(hid_t fapl_id, const H5FD_ros3_fapl_t *fa)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*#", fapl_id, fa);
- HDassert(fa != NULL);
+ assert(fa != NULL);
#if ROS3_DEBUG
- HDfprintf(stdout, "H5Pset_fapl_ros3() called.\n");
+ fprintf(stdout, "H5Pset_fapl_ros3() called.\n");
#endif
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
@@ -429,7 +429,7 @@ H5FD__ros3_validate_config(const H5FD_ros3_fapl_t *fa)
FUNC_ENTER_PACKAGE
- HDassert(fa != NULL);
+ assert(fa != NULL);
if (fa->version != H5FD_CURR_ROS3_FAPL_T_VERSION)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_ros3_fapl_t version");
@@ -469,7 +469,7 @@ H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_dst /*out*/)
H5TRACE2("e", "ix", fapl_id, fa_dst);
#if ROS3_DEBUG
- HDfprintf(stdout, "H5Pget_fapl_ros3() called.\n");
+ fprintf(stdout, "H5Pget_fapl_ros3() called.\n");
#endif
if (fa_dst == NULL)
@@ -592,7 +592,7 @@ H5FD__ros3_fapl_free(void *_fa)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fa != NULL); /* sanity check */
+ assert(fa != NULL); /* sanity check */
H5MM_xfree(fa);
@@ -630,7 +630,7 @@ ros3_reset_stats(H5FD_ros3_t *file)
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDprintf("ros3_reset_stats() called\n");
+ printf("ros3_reset_stats() called\n");
#endif
if (file == NULL)
@@ -698,7 +698,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_open() called.\n");
+ fprintf(stdout, "H5FD__ros3_open() called.\n");
#endif
/* Sanity check on file offsets */
@@ -729,7 +729,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
* find way to re-use/share
*/
now = gmnow();
- HDassert(now != NULL);
+ assert(now != NULL);
if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem while writing iso8601 timestamp")
if (FAIL == H5FD_s3comms_signing_key(signing_key, (const char *)fa.secret_key,
@@ -868,20 +868,20 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
* PRINT FILENAME *
******************/
- HDfprintf(stream, "stats for %s://%s", purl->scheme, purl->host);
+ fprintf(stream, "stats for %s://%s", purl->scheme, purl->host);
if (purl->port != NULL && purl->port[0] != '\0')
- HDfprintf(stream, ":%s", purl->port);
+ fprintf(stream, ":%s", purl->port);
if (purl->query != NULL && purl->query[0] != '\0') {
if (purl->path != NULL && purl->path[0] != '\0')
- HDfprintf(stream, "/%s", purl->path);
+ fprintf(stream, "/%s", purl->path);
else
- HDfprintf(stream, "/");
- HDfprintf(stream, "?%s", purl->query);
+ fprintf(stream, "/");
+ fprintf(stream, "?%s", purl->query);
}
else if (purl->path != NULL && purl->path[0] != '\0') {
- HDfprintf(stream, "/%s", purl->path);
+ fprintf(stream, "/%s", purl->path);
}
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
/*******************
* AGGREGATE STATS *
@@ -914,10 +914,10 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
* PRINT OVERVIEW *
******************/
- HDfprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
- count_raw);
- HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
- bytes_raw);
+ fprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
+ count_raw);
+ fprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
+ bytes_raw);
if (count_raw + count_meta == 0)
goto done;
@@ -926,60 +926,60 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
* PRINT AGGREGATE STATS *
*************************/
- HDfprintf(stream, "SIZES meta raw\n");
- HDfprintf(stream, " min ");
+ fprintf(stream, "SIZES meta raw\n");
+ fprintf(stream, " min ");
if (count_meta == 0)
- HDfprintf(stream, " 0.000 ");
+ fprintf(stream, " 0.000 ");
else {
re_dub = (double)min_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
}
if (count_raw == 0)
- HDfprintf(stream, " 0.000 \n");
+ fprintf(stream, " 0.000 \n");
else {
re_dub = (double)min_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
}
- HDfprintf(stream, " avg ");
+ fprintf(stream, " avg ");
re_dub = (double)average_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)average_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
- HDfprintf(stream, " max ");
+ fprintf(stream, " max ");
re_dub = (double)max_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)max_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
/******************************
* PRINT INDIVIDUAL BIN STATS *
******************************/
- HDfprintf(stream, "BINS # of reads total bytes average size\n");
- HDfprintf(stream, " up-to meta raw meta raw meta raw\n");
+ fprintf(stream, "BINS # of reads total bytes average size\n");
+ fprintf(stream, " up-to meta raw meta raw meta raw\n");
for (i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
const ros3_statsbin *m;
@@ -1003,52 +1003,52 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
if (i == ROS3_STATS_BIN_COUNT) {
range_end = ros3_stats_boundaries[i - 1];
- HDfprintf(stream, ">");
+ fprintf(stream, ">");
}
else
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
bm_val = (double)m->bytes;
for (suffix_i = 0; bm_val >= 1024.0; suffix_i++)
bm_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
bm_suffix = suffixes[suffix_i];
br_val = (double)r->bytes;
for (suffix_i = 0; br_val >= 1024.0; suffix_i++)
br_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
br_suffix = suffixes[suffix_i];
if (m->count > 0)
am_val = (double)(m->bytes) / (double)(m->count);
for (suffix_i = 0; am_val >= 1024.0; suffix_i++)
am_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
am_suffix = suffixes[suffix_i];
if (r->count > 0)
ar_val = (double)(r->bytes) / (double)(r->count);
for (suffix_i = 0; ar_val >= 1024.0; suffix_i++)
ar_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
ar_suffix = suffixes[suffix_i];
re_dub = (double)range_end;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
-
- HDfprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
- suffixes[suffix_i], /* bin ceiling */
- m->count, /* metadata reads */
- r->count, /* raw data reads */
- bm_val, bm_suffix, /* metadata bytes */
- br_val, br_suffix, /* raw data bytes */
- am_val, am_suffix, /* metadata average */
- ar_val, ar_suffix); /* raw data average */
-
- HDfflush(stream);
+ assert(suffix_i < sizeof(suffixes));
+
+ fprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
+ suffixes[suffix_i], /* bin ceiling */
+ m->count, /* metadata reads */
+ r->count, /* raw data reads */
+ bm_val, bm_suffix, /* metadata bytes */
+ br_val, br_suffix, /* raw data bytes */
+ am_val, am_suffix, /* metadata average */
+ ar_val, ar_suffix); /* raw data average */
+
+ fflush(stream);
}
done:
@@ -1083,12 +1083,12 @@ H5FD__ros3_close(H5FD_t H5_ATTR_UNUSED *_file)
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_close() called.\n");
+ fprintf(stdout, "H5FD__ros3_close() called.\n");
#endif
/* Sanity checks */
- HDassert(file != NULL);
- HDassert(file->s3r_handle != NULL);
+ assert(file != NULL);
+ assert(file->s3r_handle != NULL);
/* Close the underlying request handle
*/
@@ -1152,20 +1152,20 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_cmp() called.\n");
+ fprintf(stdout, "H5FD__ros3_cmp() called.\n");
#endif
- HDassert(f1->s3r_handle != NULL);
- HDassert(f2->s3r_handle != NULL);
+ assert(f1->s3r_handle != NULL);
+ assert(f2->s3r_handle != NULL);
purl1 = (const parsed_url_t *)f1->s3r_handle->purl;
purl2 = (const parsed_url_t *)f2->s3r_handle->purl;
- HDassert(purl1 != NULL);
- HDassert(purl2 != NULL);
- HDassert(purl1->scheme != NULL);
- HDassert(purl2->scheme != NULL);
- HDassert(purl1->host != NULL);
- HDassert(purl2->host != NULL);
+ assert(purl1 != NULL);
+ assert(purl2 != NULL);
+ assert(purl1->scheme != NULL);
+ assert(purl2->scheme != NULL);
+ assert(purl1->host != NULL);
+ assert(purl2->host != NULL);
/* URL: SCHEME */
if (HDstrcmp(purl1->scheme, purl2->scheme))
@@ -1264,7 +1264,7 @@ H5FD__ros3_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_query() called.\n");
+ fprintf(stdout, "H5FD__ros3_query() called.\n");
#endif
/* Set the VFL feature flags that this driver supports */
@@ -1304,7 +1304,7 @@ H5FD__ros3_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_get_eoa() called.\n");
+ fprintf(stdout, "H5FD__ros3_get_eoa() called.\n");
#endif
FUNC_LEAVE_NOAPI(file->eoa)
@@ -1335,7 +1335,7 @@ H5FD__ros3_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_set_eoa() called.\n");
+ fprintf(stdout, "H5FD__ros3_set_eoa() called.\n");
#endif
file->eoa = addr;
@@ -1369,7 +1369,7 @@ H5FD__ros3_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_get_eof() called.\n");
+ fprintf(stdout, "H5FD__ros3_get_eof() called.\n");
#endif
FUNC_LEAVE_NOAPI(H5FD_s3comms_s3r_get_filesize(file->s3r_handle))
@@ -1401,7 +1401,7 @@ H5FD__ros3_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_get_handle() called.\n");
+ fprintf(stdout, "H5FD__ros3_get_handle() called.\n");
#endif
if (!file_handle)
@@ -1451,12 +1451,12 @@ H5FD__ros3_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_read() called.\n");
+ fprintf(stdout, "H5FD__ros3_read() called.\n");
#endif
- HDassert(file != NULL);
- HDassert(file->s3r_handle != NULL);
- HDassert(buf != NULL);
+ assert(file != NULL);
+ assert(file->s3r_handle != NULL);
+ assert(buf != NULL);
filesize = H5FD_s3comms_s3r_get_filesize(file->s3r_handle);
@@ -1521,7 +1521,7 @@ H5FD__ros3_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_write() called.\n");
+ fprintf(stdout, "H5FD__ros3_write() called.\n");
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file.")
@@ -1559,7 +1559,7 @@ H5FD__ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_truncate() called.\n");
+ fprintf(stdout, "H5FD__ros3_truncate() called.\n");
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file.")
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index 628c55a..d1cae0e 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -222,14 +222,14 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_hrb_node_set.");
- HDprintf("NAME: %s\n", name);
- HDprintf("VALUE: %s\n", value);
- HDprintf("LIST:\n->");
+ fprintf(stdout, "called H5FD_s3comms_hrb_node_set.");
+ printf("NAME: %s\n", name);
+ printf("VALUE: %s\n", value);
+ printf("LIST:\n->");
for (node_ptr = (*L); node_ptr != NULL; node_ptr = node_ptr->next)
- HDfprintf(stdout, "{%s}\n->", node_ptr->cat);
- HDprintf("(null)\n");
- HDfflush(stdout);
+ fprintf(stdout, "{%s}\n->", node_ptr->cat);
+ printf("(null)\n");
+ fflush(stdout);
node_ptr = NULL;
#endif
@@ -276,7 +276,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
ret = HDsnprintf(nvcat, catwrite, "%s: %s", name, value);
if (ret < 0 || (size_t)ret > catlen)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot concatenate `%s: %s", name, value);
- HDassert(catlen == HDstrlen(nvcat));
+ assert(catlen == HDstrlen(nvcat));
/* create new_node, should we need it
*/
@@ -301,8 +301,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list")
else {
#if S3COMMS_DEBUG
- HDprintf("CREATE NEW\n");
- HDfflush(stdout);
+ printf("CREATE NEW\n");
+ fflush(stdout);
#endif
/*******************
* CREATE NEW LIST *
@@ -320,8 +320,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
/* sanity-check pointer passed in
*/
- HDassert((*L) != NULL);
- HDassert((*L)->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert((*L) != NULL);
+ assert((*L)->magic == S3COMMS_HRB_NODE_MAGIC);
node_ptr = (*L);
/* Check whether to modify/remove first node in list
@@ -332,8 +332,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
if (value == NULL) {
#if S3COMMS_DEBUG
- HDprintf("REMOVE HEAD\n");
- HDfflush(stdout);
+ printf("REMOVE HEAD\n");
+ fflush(stdout);
#endif
/***************
* REMOVE HEAD *
@@ -342,48 +342,48 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
*L = node_ptr->next;
#if S3COMMS_DEBUG
- HDprintf("FREEING CAT (node)\n");
- HDfflush(stdout);
+ printf("FREEING CAT (node)\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr->cat);
#if S3COMMS_DEBUG
- HDprintf("FREEING LOWERNAME (node)\n");
- HDfflush(stdout);
+ printf("FREEING LOWERNAME (node)\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr->lowername);
#if S3COMMS_DEBUG
- HDprintf("FREEING NAME (node)\n");
- HDfflush(stdout);
+ printf("FREEING NAME (node)\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr->name);
#if S3COMMS_DEBUG
- HDprintf("FREEING VALUE (node)\n");
- HDfflush(stdout);
+ printf("FREEING VALUE (node)\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr->value);
#if S3COMMS_DEBUG
- HDprintf("MAGIC OK? %s\n", (node_ptr->magic == S3COMMS_HRB_NODE_MAGIC) ? "YES" : "NO");
- HDfflush(stdout);
+ printf("MAGIC OK? %s\n", (node_ptr->magic == S3COMMS_HRB_NODE_MAGIC) ? "YES" : "NO");
+ fflush(stdout);
#endif
- HDassert(node_ptr->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(node_ptr->magic == S3COMMS_HRB_NODE_MAGIC);
node_ptr->magic += 1ul;
#if S3COMMS_DEBUG
- HDprintf("FREEING POINTER\n");
- HDfflush(stdout);
+ printf("FREEING POINTER\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr);
#if S3COMMS_DEBUG
- HDprintf("FREEING WORKING LOWERNAME\n");
- HDfflush(stdout);
+ printf("FREEING WORKING LOWERNAME\n");
+ fflush(stdout);
#endif
H5MM_xfree(lowername);
lowername = NULL;
}
else {
#if S3COMMS_DEBUG
- HDprintf("MODIFY HEAD\n");
- HDfflush(stdout);
+ printf("MODIFY HEAD\n");
+ fflush(stdout);
#endif
/***************
* MODIFY HEAD *
@@ -412,8 +412,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head")
else {
#if S3COMMS_DEBUG
- HDprintf("PREPEND NEW HEAD\n");
- HDfflush(stdout);
+ printf("PREPEND NEW HEAD\n");
+ fflush(stdout);
#endif
/*******************
* INSERT NEW HEAD *
@@ -441,14 +441,14 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
else {
#if S3COMMS_DEBUG
- HDprintf("APPEND A NODE\n");
- HDfflush(stdout);
+ printf("APPEND A NODE\n");
+ fflush(stdout);
#endif
/*******************
* APPEND NEW NODE *
*******************/
- HDassert(HDstrcmp(lowername, node_ptr->lowername) > 0);
+ assert(HDstrcmp(lowername, node_ptr->lowername) > 0);
new_node->name = namecpy;
new_node->value = valuecpy;
new_node->lowername = lowername;
@@ -464,14 +464,14 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
else {
#if S3COMMS_DEBUG
- HDprintf("INSERT A NODE\n");
- HDfflush(stdout);
+ printf("INSERT A NODE\n");
+ fflush(stdout);
#endif
/*******************
* INSERT NEW NODE *
*******************/
- HDassert(HDstrcmp(lowername, node_ptr->lowername) > 0);
+ assert(HDstrcmp(lowername, node_ptr->lowername) > 0);
new_node->name = namecpy;
new_node->value = valuecpy;
new_node->lowername = lowername;
@@ -493,15 +493,15 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
node_ptr->next = tmp->next;
#if S3COMMS_DEBUG
- HDprintf("REMOVE A NODE\n");
- HDfflush(stdout);
+ printf("REMOVE A NODE\n");
+ fflush(stdout);
#endif
H5MM_xfree(tmp->cat);
H5MM_xfree(tmp->lowername);
H5MM_xfree(tmp->name);
H5MM_xfree(tmp->value);
- HDassert(tmp->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(tmp->magic == S3COMMS_HRB_NODE_MAGIC);
tmp->magic += 1ul;
H5MM_xfree(tmp);
@@ -510,8 +510,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
}
else {
#if S3COMMS_DEBUG
- HDprintf("MODIFY A NODE\n");
- HDfflush(stdout);
+ printf("MODIFY A NODE\n");
+ fflush(stdout);
#endif
/*****************
* MODIFY A NODE *
@@ -522,7 +522,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
H5MM_xfree(node_ptr->value);
H5MM_xfree(node_ptr->cat);
- HDassert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
new_node->magic += 1ul;
H5MM_xfree(new_node);
H5MM_xfree(lowername);
@@ -555,7 +555,7 @@ done:
if (valuecpy != NULL)
H5MM_xfree(valuecpy);
if (new_node != NULL) {
- HDassert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
new_node->magic += 1ul;
H5MM_xfree(new_node);
}
@@ -609,7 +609,7 @@ H5FD_s3comms_hrb_destroy(hrb_t **_buf)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_hrb_destroy.\n");
+ fprintf(stdout, "called H5FD_s3comms_hrb_destroy.\n");
#endif
if (_buf != NULL && *_buf != NULL) {
@@ -673,7 +673,7 @@ H5FD_s3comms_hrb_init_request(const char *_verb, const char *_resource, const ch
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_hrb_init_request.\n");
+ fprintf(stdout, "called H5FD_s3comms_hrb_init_request.\n");
#endif
if (_resource == NULL)
@@ -709,7 +709,7 @@ H5FD_s3comms_hrb_init_request(const char *_verb, const char *_resource, const ch
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for resource string");
*res = '/';
H5MM_memcpy((&res[1]), _resource, (reslen + 1));
- HDassert((reslen + 1) == HDstrlen(res));
+ assert((reslen + 1) == HDstrlen(res));
} /* end if (else resource string not starting with '/') */
verblen = HDstrlen(_verb) + 1;
@@ -780,7 +780,7 @@ H5FD_s3comms_s3r_close(s3r_t *handle)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_s3r_close.\n");
+ fprintf(stdout, "called H5FD_s3comms_s3r_close.\n");
#endif
if (handle == NULL)
@@ -794,7 +794,7 @@ H5FD_s3comms_s3r_close(s3r_t *handle)
H5MM_xfree(handle->region);
H5MM_xfree(handle->signing_key);
- HDassert(handle->httpverb != NULL);
+ assert(handle->httpverb != NULL);
H5MM_xfree(handle->httpverb);
if (FAIL == H5FD_s3comms_free_purl(handle->purl))
@@ -885,7 +885,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_s3r_getsize.\n");
+ fprintf(stdout, "called H5FD_s3comms_s3r_getsize.\n");
#endif
if (handle == NULL)
@@ -906,7 +906,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HEADERDATA, &sds))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_HEADERDATA).");
- HDassert(handle->httpverb == NULL);
+ assert(handle->httpverb == NULL);
handle->httpverb = (char *)H5MM_malloc(sizeof(char) * 16);
if (handle->httpverb == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "unable to allocate space for S3 request HTTP verb");
@@ -934,7 +934,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata")
#if S3COMMS_DEBUG
else
- HDfprintf(stderr, "GETSIZE: OK\n");
+ fprintf(stderr, "GETSIZE: OK\n");
#endif
/******************
@@ -1034,7 +1034,7 @@ H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_s3r_open.\n");
+ fprintf(stdout, "called H5FD_s3comms_s3r_open.\n");
#endif
if (url == NULL || url[0] == '\0')
@@ -1044,8 +1044,8 @@ H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const
/* probably a malformed url, but could be internal error */
HGOTO_ERROR(H5E_ARGS, H5E_CANTCREATE, NULL, "unable to create parsed url structure");
- HDassert(purl != NULL); /* if above passes, this must be true */
- HDassert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
+ assert(purl != NULL); /* if above passes, this must be true */
+ assert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
handle = (s3r_t *)H5MM_malloc(sizeof(s3r_t));
if (handle == NULL)
@@ -1137,7 +1137,7 @@ H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const
* FINAL PREPARATION *
*********************/
- HDassert(handle->httpverb != NULL);
+ assert(handle->httpverb != NULL);
H5MM_memcpy(handle->httpverb, "GET", 4);
ret_value = handle;
@@ -1221,7 +1221,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_s3r_read.\n");
+ fprintf(stdout, "called H5FD_s3comms_s3r_read.\n");
#endif
/**************************************
@@ -1236,7 +1236,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.")
if (handle->purl == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) url.")
- HDassert(handle->purl->magic == S3COMMS_PARSED_URL_MAGIC);
+ assert(handle->purl->magic == S3COMMS_PARSED_URL_MAGIC);
if (offset > handle->filesize || (len + offset) > handle->filesize)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to read past EoF")
@@ -1292,9 +1292,9 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
char *bytesrange_ptr = NULL; /* pointer past "bytes=" portion */
bytesrange_ptr = HDstrchr(rangebytesstr, '=');
- HDassert(bytesrange_ptr != NULL);
+ assert(bytesrange_ptr != NULL);
bytesrange_ptr++; /* move to first char past '=' */
- HDassert(*bytesrange_ptr != '\0');
+ assert(*bytesrange_ptr != '\0');
if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, bytesrange_ptr))
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL,
@@ -1351,7 +1351,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
(const char *)handle->purl->path, "HTTP/1.1");
if (request == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not allocate hrb_t request.");
- HDassert(request->magic == S3COMMS_HRB_MAGIC);
+ assert(request->magic == S3COMMS_HRB_MAGIC);
now = gmnow();
if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1))
@@ -1361,27 +1361,27 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-date header")
if (headers == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
- HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "x-amz-content-sha256", (const char *)EMPTY_SHA256))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-content-sha256 header")
if (headers == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
- HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
if (rangebytesstr != NULL) {
if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "Range", rangebytesstr))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set range header")
if (headers == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
- HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
}
if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "Host", handle->purl->host))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set host header")
if (headers == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
- HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
request->first_header = headers;
@@ -1421,7 +1421,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
node = request->first_header;
while (node != NULL) {
- HDassert(node->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(node->magic == S3COMMS_HRB_NODE_MAGIC);
curlheaders = curl_slist_append(curlheaders, (const char *)node->cat);
if (curlheaders == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not append header to curl slist.");
@@ -1460,8 +1460,8 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
if (p_status != CURLE_OK) {
if (CURLE_OK != curl_easy_getinfo(curlh, CURLINFO_RESPONSE_CODE, &httpcode))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem getting response code")
- HDfprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode);
- HDfprintf(stderr, "%s\n", curl_easy_strerror(p_status));
+ fprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode);
+ fprintf(stderr, "%s\n", curl_easy_strerror(p_status));
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "problem while performing request.");
}
if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, NULL))
@@ -1476,19 +1476,19 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
#if S3COMMS_DEBUG
if (dest != NULL) {
- HDfprintf(stderr, "len: %d\n", (int)len);
- HDfprintf(stderr, "CHECKING FOR BUFFER OVERFLOW\n");
+ fprintf(stderr, "len: %d\n", (int)len);
+ fprintf(stderr, "CHECKING FOR BUFFER OVERFLOW\n");
if (sds == NULL)
- HDfprintf(stderr, "sds is NULL!\n");
+ fprintf(stderr, "sds is NULL!\n");
else {
- HDfprintf(stderr, "sds: 0x%lx\n", (long long)sds);
- HDfprintf(stderr, "sds->size: %d\n", (int)sds->size);
+ fprintf(stderr, "sds: 0x%lx\n", (long long)sds);
+ fprintf(stderr, "sds->size: %d\n", (int)sds->size);
if (len > sds->size)
- HDfprintf(stderr, "buffer overwrite\n");
+ fprintf(stderr, "buffer overwrite\n");
}
}
else
- HDfprintf(stderr, "performed on entire file\n");
+ fprintf(stderr, "performed on entire file\n");
#endif
done:
@@ -1510,10 +1510,10 @@ done:
while (headers != NULL)
if (FAIL == H5FD_s3comms_hrb_node_set(&headers, headers->name, NULL))
HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header node")
- HDassert(NULL == headers);
+ assert(NULL == headers);
if (FAIL == H5FD_s3comms_hrb_destroy(&request))
HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header request structure")
- HDassert(NULL == request);
+ assert(NULL == request);
}
if (curlh != NULL) {
@@ -1562,7 +1562,7 @@ gmnow(void)
if ((time_t)(-1) != HDtime(now_ptr))
ret_value = HDgmtime(now_ptr);
- HDassert(ret_value != NULL);
+ assert(ret_value != NULL);
return ret_value;
} /* end gmnow() */
@@ -1634,12 +1634,12 @@ H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, c
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_aws_canonical_request.\n");
+ fprintf(stdout, "called H5FD_s3comms_aws_canonical_request.\n");
#endif
if (http_request == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hrb object cannot be null.");
- HDassert(http_request->magic == S3COMMS_HRB_MAGIC);
+ assert(http_request->magic == S3COMMS_HRB_MAGIC);
if (canonical_request_dest == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request destination cannot be null.");
@@ -1662,7 +1662,7 @@ H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, c
node = http_request->first_header; /* assumed sorted */
while (node != NULL) {
- HDassert(node->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(node->magic == S3COMMS_HRB_NODE_MAGIC);
ret = HDsnprintf(tmpstr, 256, "%s:%s\n", node->lowername, node->value);
if (ret < 0 || ret >= 256)
@@ -1741,7 +1741,7 @@ H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len,
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_bytes_to_hex.\n");
+ fprintf(stdout, "called H5FD_s3comms_bytes_to_hex.\n");
#endif
if (dest == NULL)
@@ -1785,11 +1785,11 @@ H5FD_s3comms_free_purl(parsed_url_t *purl)
FUNC_ENTER_NOAPI_NOINIT_NOERR
#if S3COMMS_DEBUG
- HDprintf("called H5FD_s3comms_free_purl.\n");
+ printf("called H5FD_s3comms_free_purl.\n");
#endif
if (purl != NULL) {
- HDassert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
+ assert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
if (purl->scheme != NULL)
H5MM_xfree(purl->scheme);
if (purl->host != NULL)
@@ -1848,7 +1848,7 @@ H5FD_s3comms_HMAC_SHA256(const unsigned char *key, size_t key_len, const char *m
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_HMAC_SHA256.\n");
+ fprintf(stdout, "called H5FD_s3comms_HMAC_SHA256.\n");
#endif
if (dest == NULL)
@@ -1938,7 +1938,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha
FUNC_ENTER_PACKAGE
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called load_aws_creds_from_file.\n");
+ fprintf(stdout, "called load_aws_creds_from_file.\n");
#endif
/* format target line for start of profile */
@@ -2058,7 +2058,7 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_load_aws_profile.\n");
+ fprintf(stdout, "called H5FD_s3comms_load_aws_profile.\n");
#endif
#ifdef H5_HAVE_WIN32_API
@@ -2072,7 +2072,7 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *
if (ret < 0 || (size_t)ret >= 128)
HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format credentials path")
- credfile = HDfopen(filepath, "r");
+ credfile = fopen(filepath, "r");
if (credfile != NULL) {
if (H5FD__s3comms_load_aws_creds_from_file(credfile, profile_name, key_id_out, secret_access_key_out,
aws_region_out) == FAIL)
@@ -2085,7 +2085,7 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *
ret = HDsnprintf(filepath, 128, "%s%s", awspath, "config");
if (ret < 0 || (size_t)ret >= 128)
HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format config path")
- credfile = HDfopen(filepath, "r");
+ credfile = fopen(filepath, "r");
if (credfile != NULL) {
if (H5FD__s3comms_load_aws_creds_from_file(
credfile, profile_name, (*key_id_out == 0) ? key_id_out : NULL,
@@ -2143,7 +2143,7 @@ H5FD_s3comms_nlowercase(char *dest, const char *s, size_t len)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_nlowercase.\n");
+ fprintf(stdout, "called H5FD_s3comms_nlowercase.\n");
#endif
if (dest == NULL)
@@ -2206,7 +2206,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
FUNC_ENTER_NOAPI_NOINIT;
#if S3COMMS_DEBUG
- HDprintf("called H5FD_s3comms_parse_url.\n");
+ printf("called H5FD_s3comms_parse_url.\n");
#endif
if (str == NULL || *str == '\0')
@@ -2232,7 +2232,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
if (tmpstr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid SCHEME construction: probably not URL");
len = tmpstr - curstr;
- HDassert((0 <= len) && (len < urllen));
+ assert((0 <= len) && (len < urllen));
/* check for restrictions */
for (i = 0; i < len; i++) {
@@ -2422,7 +2422,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_percent_encode_char.\n");
+ fprintf(stdout, "called H5FD_s3comms_percent_encode_char.\n");
#endif
if (repr == NULL)
@@ -2430,8 +2430,8 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
#if S3COMMS_DEBUG
H5FD_s3comms_bytes_to_hex((char *)hex, s, 1, FALSE);
- HDfprintf(stdout, " CHAR: \'%s\'\n", s);
- HDfprintf(stdout, " CHAR-HEX: \"%s\"\n", hex);
+ fprintf(stdout, " CHAR: \'%s\'\n", s);
+ fprintf(stdout, " CHAR-HEX: \"%s\"\n", hex);
#endif
if (c <= (unsigned char)0x7f) {
@@ -2439,7 +2439,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
* and single percent-code
*/
#if S3COMMS_DEBUG
- HDfprintf(stdout, " SINGLE-BYTE\n");
+ fprintf(stdout, " SINGLE-BYTE\n");
#endif
*repr_len = 3;
chars_written = HDsnprintf(repr, 4, "%%%02X", c);
@@ -2454,7 +2454,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
unsigned int stack_size = 0;
unsigned char stack[4] = {0, 0, 0, 0};
#if S3COMMS_DEBUG
- HDfprintf(stdout, " MULTI-BYTE\n");
+ fprintf(stdout, " MULTI-BYTE\n");
#endif
stack_size = 0;
k = (unsigned int)c;
@@ -2474,13 +2474,13 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
*/
#if S3COMMS_DEBUG
- HDfprintf(stdout, " STACK:\n {\n");
+ fprintf(stdout, " STACK:\n {\n");
for (i = 0; i < stack_size; i++) {
H5FD_s3comms_bytes_to_hex((char *)hex, (&stack[i]), 1, FALSE);
hex[2] = 0;
- HDfprintf(stdout, " %s,\n", hex);
+ fprintf(stdout, " %s,\n", hex);
}
- HDfprintf(stdout, " }\n");
+ fprintf(stdout, " }\n");
#endif
/****************
@@ -2570,7 +2570,7 @@ H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *regi
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_signing_key.\n");
+ fprintf(stdout, "called H5FD_s3comms_signing_key.\n");
#endif
if (md == NULL)
@@ -2662,7 +2662,7 @@ H5FD_s3comms_tostringtosign(char *dest, const char *req, const char *now, const
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_tostringtosign.\n");
+ fprintf(stdout, "called H5FD_s3comms_tostringtosign.\n");
#endif
if (dest == NULL)
@@ -2749,7 +2749,7 @@ H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_trim.\n");
+ fprintf(stdout, "called H5FD_s3comms_trim.\n");
#endif
if (dest == NULL)
@@ -2839,7 +2839,7 @@ H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, hbool_t encode_s
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "H5FD_s3comms_uriencode called.\n");
+ fprintf(stdout, "H5FD_s3comms_uriencode called.\n");
#endif
if (s == NULL)
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 7c05677..a7c0ff0 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -435,7 +435,7 @@ H5FD__sec2_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
+ assert(file);
/* Close the underlying file */
if (HDclose(file->fd) < 0)
@@ -498,9 +498,9 @@ H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
if (f1->inode < f2->inode)
@@ -691,8 +691,8 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -749,12 +749,12 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
if (0 == bytes_read) {
/* end of file but not end of format address space */
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
break;
} /* end if */
- HDassert(bytes_read >= 0);
- HDassert((size_t)bytes_read <= size);
+ assert(bytes_read >= 0);
+ assert((size_t)bytes_read <= size);
size -= (size_t)bytes_read;
addr += (haddr_t)bytes_read;
@@ -799,8 +799,8 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -856,8 +856,8 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
(unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
- HDassert(bytes_wrote > 0);
- HDassert((size_t)bytes_wrote <= size);
+ assert(bytes_wrote > 0);
+ assert((size_t)bytes_wrote <= size);
size -= (size_t)bytes_wrote;
addr += (haddr_t)bytes_wrote;
@@ -901,7 +901,7 @@ H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Extend the file to make sure it's large enough */
if (!H5F_addr_eq(file->eoa, file->eof)) {
@@ -971,7 +971,7 @@ H5FD__sec2_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Set exclusive or shared lock based on rw status */
lock_flags = rw ? LOCK_EX : LOCK_SH;
@@ -1011,7 +1011,7 @@ H5FD__sec2_unlock(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (HDflock(file->fd, LOCK_UN) < 0) {
if (file->ignore_disabled_file_locks && ENOSYS == errno) {
@@ -1044,7 +1044,7 @@ H5FD__sec2_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index fe0606c..a3bff2b 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -96,10 +96,10 @@ H5FD__extend(H5FD_t *file, H5FD_mem_t type, hsize_t size)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Get current end-of-allocated space address */
eoa = file->cls->get_eoa(file, type);
@@ -147,14 +147,14 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr
FUNC_ENTER_PACKAGE
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size);
+ fprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size);
#endif /* H5FD_ALLOC_DEBUG */
/* check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Check for query driver and call it */
if (file->cls->query)
@@ -203,14 +203,14 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr
/* Post-condition sanity check */
if (!file->paged_aggr && file->alignment > 1 && orig_size >= file->threshold)
- HDassert(!(ret_value % file->alignment));
+ assert(!(ret_value % file->alignment));
/* Convert absolute file offset to relative address */
ret_value -= file->base_addr;
done:
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value);
+ fprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value);
#endif /* H5FD_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__alloc_real() */
@@ -241,10 +241,10 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, H5F_t *f, hsize_t size, haddr_t *frag_
FUNC_ENTER_NOAPI(HADDR_UNDEF)
/* check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Call the real 'alloc' routine */
ret_value = H5FD__alloc_real(file, type, size, frag_addr, frag_size);
@@ -280,14 +280,14 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__,
- (unsigned)type, addr, size);
+ fprintf(stderr, "%s: type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, (unsigned)type,
+ addr, size);
#endif /* H5FD_ALLOC_DEBUG */
/* Sanity checking */
@@ -304,7 +304,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
/* Check for file driver 'free' callback and call it if available */
if (file->cls->free) {
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Letting VFD free space\n", __func__);
+ fprintf(stderr, "%s: Letting VFD free space\n", __func__);
#endif /* H5FD_ALLOC_DEBUG */
if ((file->cls->free)(file, type, H5CX_get_dxpl(), addr, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed")
@@ -317,11 +317,11 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
eoa = file->cls->get_eoa(file, type);
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: eoa = %" PRIuHADDR "\n", __func__, eoa);
+ fprintf(stderr, "%s: eoa = %" PRIuHADDR "\n", __func__, eoa);
#endif /* H5FD_ALLOC_DEBUG */
if (eoa == (addr + size)) {
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Reducing file size to = %" PRIuHADDR "\n", __func__, addr);
+ fprintf(stderr, "%s: Reducing file size to = %" PRIuHADDR "\n", __func__, addr);
#endif /* H5FD_ALLOC_DEBUG */
if (file->cls->set_eoa(file, type, addr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "set end of space allocation request failed")
@@ -330,8 +330,8 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
else {
/* leak memory */
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
- __func__, (unsigned)type, addr, size);
+ fprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
+ __func__, (unsigned)type, addr, size);
#endif /* H5FD_ALLOC_DEBUG */
} /* end else */
@@ -365,10 +365,10 @@ H5FD_free(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t addr, hsize_t size)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Call the real 'free' routine */
if (H5FD__free_real(file, type, addr, size) < 0)
@@ -409,11 +409,11 @@ H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end, hsize_
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(extra_requested > 0);
- HDassert(f);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(extra_requested > 0);
+ assert(f);
/* Retrieve the end of the address space */
if (HADDR_UNDEF == (eoa = file->cls->get_eoa(file, type)))
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c
index faf5d29..edf9898 100644
--- a/src/H5FDsplitter.c
+++ b/src/H5FDsplitter.c
@@ -89,8 +89,8 @@ typedef struct H5FD_splitter_t {
#if H5FD_SPLITTER_DEBUG_OP_CALLS
#define H5FD_SPLITTER_LOG_CALL(name) \
do { \
- HDprintf("called %s()\n", (name)); \
- HDfflush(stdout); \
+ printf("called %s()\n", (name)); \
+ fflush(stdout); \
} while (0)
#else
#define H5FD_SPLITTER_LOG_CALL(name) /* no-op */
@@ -253,7 +253,7 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(id_out_ptr != NULL);
+ assert(id_out_ptr != NULL);
if (FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "not a file access property list");
@@ -404,9 +404,9 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
FUNC_ENTER_PACKAGE
- HDassert(fapl_out);
+ assert(fapl_out);
- HDmemset(fapl_out, 0, sizeof(H5FD_splitter_fapl_t));
+ memset(fapl_out, 0, sizeof(H5FD_splitter_fapl_t));
if (!vfd_config) {
vfd_config = H5MM_calloc(sizeof(H5FD_splitter_vfd_config_t));
@@ -523,8 +523,8 @@ H5FD__splitter_get_default_wo_path(char *new_path, size_t new_path_len, const ch
FUNC_ENTER_PACKAGE
- HDassert(new_path);
- HDassert(base_filename);
+ assert(new_path);
+ assert(base_filename);
/* Check that output buffer can hold base filename + `_wo` suffix */
old_filename_len = HDstrlen(base_filename);
@@ -612,8 +612,8 @@ H5FD__splitter_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -713,7 +713,7 @@ H5FD__splitter_fapl_copy(const void *_old_fa)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(old_fa_ptr);
+ assert(old_fa_ptr);
new_fa_ptr = H5FL_CALLOC(H5FD_splitter_fapl_t);
if (NULL == new_fa_ptr)
@@ -758,7 +758,7 @@ H5FD__splitter_fapl_free(void *_fapl)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(fapl);
+ assert(fapl);
if (H5I_dec_ref(fapl->rw_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close R/W FAPL ID")
@@ -849,7 +849,7 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha
*/
if (!file_ptr->logfp) {
if (file_ptr->fa.log_file_path[0] != '\0') {
- file_ptr->logfp = HDfopen(file_ptr->fa.log_file_path, "w");
+ file_ptr->logfp = fopen(file_ptr->fa.log_file_path, "w");
if (file_ptr->logfp == NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open log file")
} /* end if logfile path given */
@@ -908,7 +908,7 @@ H5FD__splitter_close(H5FD_t *_file)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
+ assert(file);
if (H5I_dec_ref(file->fa.rw_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_ARGS, FAIL, "can't close R/W FAPL")
@@ -959,8 +959,8 @@ H5FD__splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if ((ret_value = H5FD_get_eoa(file->rw_file, type)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, HADDR_UNDEF, "unable to get eoa")
@@ -990,9 +990,9 @@ H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t ad
H5FD_SPLITTER_LOG_CALL(__func__)
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
- HDassert(file->wo_file);
+ assert(file);
+ assert(file->rw_file);
+ assert(file->wo_file);
if (H5FD_set_eoa(file->rw_file, type, addr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "H5FDset_eoa failed for R/W file")
@@ -1027,8 +1027,8 @@ H5FD__splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (HADDR_UNDEF == (ret_value = H5FD_get_eof(file->rw_file, type)))
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, HADDR_UNDEF, "unable to get eof")
@@ -1055,9 +1055,9 @@ H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(file);
- HDassert(file->rw_file);
- HDassert(file->wo_file);
+ assert(file);
+ assert(file->rw_file);
+ assert(file->wo_file);
if (H5FDtruncate(file->rw_file, dxpl_id, closing) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate R/W file")
@@ -1094,8 +1094,8 @@ H5FD__splitter_sb_size(H5FD_t *_file)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (file->rw_file)
ret_value = H5FD_sb_size(file->rw_file);
@@ -1122,8 +1122,8 @@ H5FD__splitter_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (file->rw_file && H5FD_sb_encode(file->rw_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL, "unable to encode the superblock in R/W file")
@@ -1153,8 +1153,8 @@ H5FD__splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *b
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (H5FD_sb_load(file->rw_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode the superblock in R/W file")
@@ -1183,8 +1183,8 @@ H5FD__splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(f1);
- HDassert(f2);
+ assert(f1);
+ assert(f2);
ret_value = H5FD_cmp(f1->rw_file, f2->rw_file);
@@ -1211,9 +1211,9 @@ H5FD__splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
- HDassert(file_handle);
+ assert(file);
+ assert(file->rw_file);
+ assert(file_handle);
/* Only do for R/W channel */
if (H5FD_get_vfd_handle(file->rw_file, file->fa.rw_fapl_id, file_handle) < 0)
@@ -1241,8 +1241,8 @@ H5FD__splitter_lock(H5FD_t *_file, hbool_t rw)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
/* Place the lock on each file */
if (H5FD_lock(file->rw_file, rw) < 0)
@@ -1275,8 +1275,8 @@ H5FD__splitter_unlock(H5FD_t *_file)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
/* Remove the lock on each file */
if (H5FD_unlock(file->rw_file) < 0)
@@ -1320,7 +1320,7 @@ H5FD__splitter_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
+ assert(file);
switch (op_code) {
/* Unknown op code */
@@ -1366,8 +1366,8 @@ H5FD__splitter_query(const H5FD_t *_file, unsigned long *flags /* out */)
H5FD_SPLITTER_LOG_CALL(__func__);
if (file) {
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (H5FDquery(file->rw_file, flags) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTLOCK, FAIL, "unable to query R/W file");
@@ -1403,8 +1403,8 @@ H5FD__splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
/* Allocate memory for each file, only return the return value for R/W file. */
if ((ret_value = H5FDalloc(file->rw_file, type, dxpl_id, size)) == HADDR_UNDEF)
@@ -1437,8 +1437,8 @@ H5FD__splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
/* Retrieve memory type mapping for R/W channel only */
if (H5FD_get_fs_type_map(file->rw_file, type_map) < 0)
@@ -1467,8 +1467,8 @@ H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (H5FDfree(file->rw_file, type, dxpl_id, addr, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free for R/W file")
@@ -1499,7 +1499,7 @@ H5FD__splitter_delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
/* Get the driver info */
if (H5P_FILE_ACCESS_DEFAULT == fapl_id) {
@@ -1566,9 +1566,9 @@ H5FD__splitter_log_error(const H5FD_splitter_t *file, const char *atfunc, const
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(atfunc && *atfunc);
- HDassert(msg && *msg);
+ assert(file);
+ assert(atfunc && *atfunc);
+ assert(msg && *msg);
if (file->logfp != NULL) {
size_t size;
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c
index dff2d07..2e7e8a8 100644
--- a/src/H5FDsubfiling/H5FDioc.c
+++ b/src/H5FDsubfiling/H5FDioc.c
@@ -91,8 +91,8 @@ typedef struct H5FD_ioc_t {
#ifdef H5FD_IOC_DEBUG
#define H5FD_IOC_LOG_CALL(name) \
do { \
- HDprintf("called %s()\n", (name)); \
- HDfflush(stdout); \
+ printf("called %s()\n", (name)); \
+ fflush(stdout); \
} while (0)
#else
#define H5FD_IOC_LOG_CALL(name) /* no-op */
@@ -399,7 +399,7 @@ H5Pget_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *config_out)
}
else {
/* Copy the IOC fapl data out */
- HDmemcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t));
+ memcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t));
}
done:
@@ -422,9 +422,9 @@ H5FD__ioc_get_default_config(H5FD_ioc_config_t *config_out)
{
herr_t ret_value = SUCCEED;
- HDassert(config_out);
+ assert(config_out);
- HDmemset(config_out, 0, sizeof(*config_out));
+ memset(config_out, 0, sizeof(*config_out));
config_out->magic = H5FD_IOC_FAPL_MAGIC;
config_out->version = H5FD_IOC_CURR_FAPL_VERSION;
@@ -455,7 +455,7 @@ H5FD__ioc_validate_config(const H5FD_ioc_config_t *fa)
{
herr_t ret_value = SUCCEED;
- HDassert(fa != NULL);
+ assert(fa != NULL);
if (fa->version != H5FD_IOC_CURR_FAPL_VERSION)
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_ioc_config_t version");
@@ -660,13 +660,13 @@ H5FD__ioc_fapl_copy(const void *_old_fa)
H5FD_IOC_LOG_CALL(__func__);
- HDassert(old_fa_ptr);
+ assert(old_fa_ptr);
new_fa_ptr = H5FL_CALLOC(H5FD_ioc_config_t);
if (NULL == new_fa_ptr)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL");
- HDmemcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_ioc_config_t));
+ memcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_ioc_config_t));
ret_value = (void *)new_fa_ptr;
@@ -695,7 +695,7 @@ H5FD__ioc_fapl_free(void *_fapl)
H5FD_IOC_LOG_CALL(__func__);
/* Check arguments */
- HDassert(fapl);
+ assert(fapl);
/* Free the property list */
fapl = H5FL_FREE(H5FD_ioc_config_t, fapl);
@@ -790,7 +790,7 @@ H5FD__ioc_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
}
/* Fill in the file config values */
- HDmemcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_ioc_config_t));
+ memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_ioc_config_t));
/* Fully resolve the given filepath and get its dirname */
if (H5_resolve_pathname(name, file_ptr->comm, &file_ptr->file_path) < 0)
@@ -904,7 +904,7 @@ H5FD__ioc_close_int(H5FD_ioc_t *file_ptr)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(file_ptr);
+ assert(file_ptr);
if (MPI_SUCCESS != (mpi_code = MPI_Finalized(&mpi_finalized)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Finalized failed", mpi_code);
@@ -936,7 +936,7 @@ H5FD__ioc_close_int(H5FD_ioc_t *file_ptr)
}
done:
- HDfree(file_ptr->file_path);
+ free(file_ptr->file_path);
file_ptr->file_path = NULL;
H5MM_free(file_ptr->file_dir);
@@ -990,8 +990,8 @@ H5FD__ioc_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
H5FD_IOC_LOG_CALL(__func__);
- HDassert(f1);
- HDassert(f2);
+ assert(f1);
+ assert(f2);
ret_value = (f1->file_id > f2->file_id) - (f1->file_id < f2->file_id);
@@ -1108,7 +1108,7 @@ H5FD__ioc_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD_IOC_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
+ assert(file);
ret_value = file->eoa;
@@ -1134,7 +1134,7 @@ H5FD__ioc_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
H5FD_IOC_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
+ assert(file);
file->eoa = addr;
@@ -1163,7 +1163,7 @@ H5FD__ioc_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD_IOC_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
+ assert(file);
sf_context = H5_get_subfiling_object(file->context_id);
if (sf_context) {
@@ -1222,8 +1222,8 @@ H5FD__ioc_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUS
H5FD_IOC_LOG_CALL(__func__);
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -1382,7 +1382,7 @@ H5FD__ioc_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
H5FD_IOC_LOG_CALL(__func__);
- HDassert(file);
+ assert(file);
/* TODO: placeholder for now since Subfiling does the truncation */
if (!H5F_addr_eq(file->eoa, file->last_eoa)) {
@@ -1454,7 +1454,7 @@ H5FD__ioc_del(const char *name, hid_t fapl)
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
- HDassert(H5FD_IOC == H5P_peek_driver(plist));
+ assert(H5FD_IOC == H5P_peek_driver(plist));
if (H5FD_mpi_self_initialized) {
comm = MPI_COMM_WORLD;
@@ -1486,7 +1486,7 @@ H5FD__ioc_del(const char *name, hid_t fapl)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't get file dirname");
/* Try to open the subfiling configuration file and get the number of IOCs */
- if (NULL == (tmp_filename = HDmalloc(PATH_MAX)))
+ if (NULL == (tmp_filename = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate config file name buffer");
@@ -1498,10 +1498,10 @@ H5FD__ioc_del(const char *name, hid_t fapl)
HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE,
prefix_env ? prefix_env : file_dirname, base_filename, (uint64_t)st.st_ino);
- if (NULL == (config_file = HDfopen(tmp_filename, "r"))) {
+ if (NULL == (config_file = fopen(tmp_filename, "r"))) {
if (ENOENT == errno) {
#ifdef H5FD_IOC_DEBUG
- HDprintf("** WARNING: couldn't delete Subfiling configuration file '%s'\n", tmp_filename);
+ printf("** WARNING: couldn't delete Subfiling configuration file '%s'\n", tmp_filename);
#endif
H5_SUBFILING_GOTO_DONE(SUCCEED);
@@ -1540,7 +1540,7 @@ H5FD__ioc_del(const char *name, hid_t fapl)
if (HDremove(tmp_filename) < 0) {
#ifdef H5FD_IOC_DEBUG
- HDprintf("** WARNING: couldn't delete subfile '%s'\n", tmp_filename);
+ printf("** WARNING: couldn't delete subfile '%s'\n", tmp_filename);
#endif
if (ENOENT != errno)
@@ -1576,7 +1576,7 @@ done:
if (H5_mpi_info_free(&info) < 0)
H5_SUBFILING_DONE_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free MPI info object");
- HDfree(tmp_filename);
+ free(tmp_filename);
H5MM_free(file_dirname);
H5MM_free(base_filename);
@@ -1610,10 +1610,10 @@ H5FD__ioc_write_vector_internal(H5FD_t *_file, uint32_t count, H5FD_mem_t H5_ATT
int64_t sf_context_id = -1;
herr_t ret_value = SUCCEED;
- HDassert(_file);
- HDassert(addrs);
- HDassert(sizes);
- HDassert(bufs);
+ assert(_file);
+ assert(addrs);
+ assert(sizes);
+ assert(bufs);
if (count == 0)
H5_SUBFILING_GOTO_DONE(SUCCEED);
@@ -1622,7 +1622,7 @@ H5FD__ioc_write_vector_internal(H5FD_t *_file, uint32_t count, H5FD_mem_t H5_ATT
if (NULL == (sf_context = H5_get_subfiling_object(sf_context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't get subfiling context from ID");
- HDassert(sf_context->topology);
+ assert(sf_context->topology);
/*
* Allocate an array of I/O requests and an array twice that size for
@@ -1633,9 +1633,9 @@ H5FD__ioc_write_vector_internal(H5FD_t *_file, uint32_t count, H5FD_mem_t H5_ATT
* that blocking write calls do not return early before the data is
* actually written.
*/
- if (NULL == (sf_io_reqs = HDcalloc((size_t)count, sizeof(*sf_io_reqs))))
+ if (NULL == (sf_io_reqs = calloc((size_t)count, sizeof(*sf_io_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate I/O request array");
- if (NULL == (mpi_reqs = HDmalloc(2 * (size_t)count * sizeof(*mpi_reqs))))
+ if (NULL == (mpi_reqs = malloc(2 * (size_t)count * sizeof(*mpi_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate MPI request array");
/* Each pass thru the following should queue an MPI write
@@ -1669,12 +1669,12 @@ H5FD__ioc_write_vector_internal(H5FD_t *_file, uint32_t count, H5FD_mem_t H5_ATT
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't complete I/O requests");
done:
- HDfree(mpi_reqs);
+ free(mpi_reqs);
if (sf_io_reqs) {
for (size_t i = 0; i < count; i++)
- HDfree(sf_io_reqs[i]);
- HDfree(sf_io_reqs);
+ free(sf_io_reqs[i]);
+ free(sf_io_reqs);
}
H5_SUBFILING_FUNC_LEAVE;
@@ -1691,10 +1691,10 @@ H5FD__ioc_read_vector_internal(H5FD_t *_file, uint32_t count, haddr_t addrs[], s
int64_t sf_context_id = -1;
herr_t ret_value = SUCCEED;
- HDassert(_file);
- HDassert(addrs);
- HDassert(sizes);
- HDassert(bufs);
+ assert(_file);
+ assert(addrs);
+ assert(sizes);
+ assert(bufs);
if (count == 0)
H5_SUBFILING_GOTO_DONE(SUCCEED);
@@ -1703,7 +1703,7 @@ H5FD__ioc_read_vector_internal(H5FD_t *_file, uint32_t count, haddr_t addrs[], s
if (NULL == (sf_context = H5_get_subfiling_object(sf_context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't get subfiling context from ID");
- HDassert(sf_context->topology);
+ assert(sf_context->topology);
/*
* Allocate an array of I/O requests and an array for MPI_Request
@@ -1712,9 +1712,9 @@ H5FD__ioc_read_vector_internal(H5FD_t *_file, uint32_t count, haddr_t addrs[], s
* that the actual I/O call (currently, HDpread) has completed and
* the data read from the file has been transferred to the caller.
*/
- if (NULL == (sf_io_reqs = HDcalloc((size_t)count, sizeof(*sf_io_reqs))))
+ if (NULL == (sf_io_reqs = calloc((size_t)count, sizeof(*sf_io_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate I/O request array");
- if (NULL == (mpi_reqs = HDmalloc((size_t)count * sizeof(*mpi_reqs))))
+ if (NULL == (mpi_reqs = malloc((size_t)count * sizeof(*mpi_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate MPI request array");
for (size_t i = 0; i < (size_t)count; i++) {
@@ -1741,12 +1741,12 @@ H5FD__ioc_read_vector_internal(H5FD_t *_file, uint32_t count, haddr_t addrs[], s
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "can't complete I/O requests");
done:
- HDfree(mpi_reqs);
+ free(mpi_reqs);
if (sf_io_reqs) {
for (size_t i = 0; i < count; i++)
- HDfree(sf_io_reqs[i]);
- HDfree(sf_io_reqs);
+ free(sf_io_reqs[i]);
+ free(sf_io_reqs);
}
H5_SUBFILING_FUNC_LEAVE;
diff --git a/src/H5FDsubfiling/H5FDioc_int.c b/src/H5FDsubfiling/H5FDioc_int.c
index ce5a000..fdde752 100644
--- a/src/H5FDsubfiling/H5FDioc_int.c
+++ b/src/H5FDsubfiling/H5FDioc_int.c
@@ -32,12 +32,12 @@ calculate_target_ioc(int64_t file_offset, int64_t stripe_size, int num_io_concen
int64_t subfile_row;
int64_t subfile_idx;
- HDassert(stripe_size > 0);
- HDassert(num_io_concentrators > 0);
- HDassert(num_subfiles > 0);
- HDassert(target_ioc);
- HDassert(ioc_file_offset);
- HDassert(ioc_subfile_idx);
+ assert(stripe_size > 0);
+ assert(num_io_concentrators > 0);
+ assert(num_subfiles > 0);
+ assert(target_ioc);
+ assert(ioc_file_offset);
+ assert(ioc_subfile_idx);
stripe_idx = file_offset / stripe_size;
subfile_row = stripe_idx / num_subfiles;
@@ -111,12 +111,12 @@ ioc__write_independent_async(int64_t context_id, int64_t offset, int64_t element
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(io_req);
+ assert(io_req);
if (NULL == (sf_context = H5_get_subfiling_object(context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't get subfiling context from ID");
- HDassert(sf_context->topology);
- HDassert(sf_context->topology->io_concentrators);
+ assert(sf_context->topology);
+ assert(sf_context->topology->io_concentrators);
io_concentrators = sf_context->topology->io_concentrators;
num_io_concentrators = sf_context->topology->n_io_concentrators;
@@ -167,7 +167,7 @@ ioc__write_independent_async(int64_t context_id, int64_t offset, int64_t element
* Allocate the I/O request object that will
* be returned to the caller
*/
- if (NULL == (sf_io_request = HDmalloc(sizeof(io_req_t))))
+ if (NULL == (sf_io_request = malloc(sizeof(io_req_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, "couldn't allocate I/O request");
H5_CHECK_OVERFLOW(ioc_start, int64_t, int);
@@ -228,7 +228,7 @@ done:
}
}
- HDfree(sf_io_request);
+ free(sf_io_request);
*io_req = NULL;
}
@@ -283,14 +283,14 @@ ioc__read_independent_async(int64_t context_id, int64_t offset, int64_t elements
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(io_req);
+ assert(io_req);
H5_CHECK_OVERFLOW(elements, int64_t, int);
if (NULL == (sf_context = H5_get_subfiling_object(context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "can't get subfiling context from ID");
- HDassert(sf_context->topology);
- HDassert(sf_context->topology->io_concentrators);
+ assert(sf_context->topology);
+ assert(sf_context->topology->io_concentrators);
io_concentrators = sf_context->topology->io_concentrators;
num_io_concentrators = sf_context->topology->n_io_concentrators;
@@ -320,7 +320,7 @@ ioc__read_independent_async(int64_t context_id, int64_t offset, int64_t elements
* Allocate the I/O request object that will
* be returned to the caller
*/
- if (NULL == (sf_io_request = HDmalloc(sizeof(io_req_t))))
+ if (NULL == (sf_io_request = malloc(sizeof(io_req_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_READERROR, FAIL, "couldn't allocate I/O request");
H5_CHECK_OVERFLOW(ioc_start, int64_t, int);
@@ -402,7 +402,7 @@ done:
}
}
- HDfree(sf_io_request);
+ free(sf_io_request);
*io_req = NULL;
}
@@ -426,7 +426,7 @@ ioc__async_completion(MPI_Request *mpi_reqs, size_t num_reqs)
herr_t ret_value = SUCCEED;
int mpi_code;
- HDassert(mpi_reqs);
+ assert(mpi_reqs);
H5_CHECK_OVERFLOW(num_reqs, size_t, int);
if (MPI_SUCCESS != (mpi_code = MPI_Waitall((int)num_reqs, mpi_reqs, MPI_STATUSES_IGNORE)))
diff --git a/src/H5FDsubfiling/H5FDioc_priv.h b/src/H5FDsubfiling/H5FDioc_priv.h
index 8dec1a8..cac2806 100644
--- a/src/H5FDsubfiling/H5FDioc_priv.h
+++ b/src/H5FDsubfiling/H5FDioc_priv.h
@@ -79,15 +79,15 @@
#define H5FD_IOC__Q_APPEND(q_ptr, entry_ptr) \
do { \
- HDassert(q_ptr); \
- HDassert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \
- HDassert((((q_ptr)->q_len == 0) && ((q_ptr)->q_head == NULL) && ((q_ptr)->q_tail == NULL)) || \
+ assert(q_ptr); \
+ assert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \
+ assert((((q_ptr)->q_len == 0) && ((q_ptr)->q_head == NULL) && ((q_ptr)->q_tail == NULL)) || \
(((q_ptr)->q_len > 0) && ((q_ptr)->q_head != NULL) && ((q_ptr)->q_tail != NULL))); \
- HDassert(entry_ptr); \
- HDassert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
- HDassert((entry_ptr)->next == NULL); \
- HDassert((entry_ptr)->prev == NULL); \
- HDassert((entry_ptr)->in_progress == FALSE); \
+ assert(entry_ptr); \
+ assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
+ assert((entry_ptr)->next == NULL); \
+ assert((entry_ptr)->prev == NULL); \
+ assert((entry_ptr)->in_progress == FALSE); \
\
if ( ((q_ptr)->q_head) == NULL ) \
{ \
@@ -105,15 +105,15 @@ do {
#define H5FD_IOC__Q_REMOVE(q_ptr, entry_ptr) \
do { \
- HDassert(q_ptr); \
- HDassert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \
- HDassert((((q_ptr)->q_len == 1) && ((q_ptr)->q_head ==((q_ptr)->q_tail)) && ((q_ptr)->q_head == (entry_ptr))) || \
+ assert(q_ptr); \
+ assert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \
+ assert((((q_ptr)->q_len == 1) && ((q_ptr)->q_head ==((q_ptr)->q_tail)) && ((q_ptr)->q_head == (entry_ptr))) || \
(((q_ptr)->q_len > 0) && ((q_ptr)->q_head != NULL) && ((q_ptr)->q_tail != NULL))); \
- HDassert(entry_ptr); \
- HDassert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
- HDassert((((q_ptr)->q_len == 1) && ((entry_ptr)->next == NULL) && ((entry_ptr)->prev == NULL)) || \
+ assert(entry_ptr); \
+ assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
+ assert((((q_ptr)->q_len == 1) && ((entry_ptr)->next == NULL) && ((entry_ptr)->prev == NULL)) || \
(((q_ptr)->q_len > 1) && (((entry_ptr)->next != NULL) || ((entry_ptr)->prev != NULL)))); \
- HDassert((entry_ptr)->in_progress == TRUE); \
+ assert((entry_ptr)->in_progress == TRUE); \
\
{ \
if ( (((q_ptr)->q_head)) == (entry_ptr) ) \
diff --git a/src/H5FDsubfiling/H5FDioc_threads.c b/src/H5FDsubfiling/H5FDioc_threads.c
index abf816d..4e72d39 100644
--- a/src/H5FDsubfiling/H5FDioc_threads.c
+++ b/src/H5FDsubfiling/H5FDioc_threads.c
@@ -119,13 +119,13 @@ initialize_ioc_threads(void *_sf_context)
double t_start = 0.0, t_end = 0.0;
#endif
- HDassert(sf_context);
+ assert(sf_context);
/*
* Allocate and initialize IOC data that will be passed
* to the IOC main thread
*/
- if (NULL == (ioc_data = HDmalloc(sizeof(*ioc_data))))
+ if (NULL == (ioc_data = malloc(sizeof(*ioc_data))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, (-1),
"can't allocate IOC data for IOC main thread");
ioc_data->sf_context_id = sf_context->sf_context_id;
@@ -171,7 +171,7 @@ initialize_ioc_threads(void *_sf_context)
/* Allow experimentation with the number of helper threads */
if ((env_value = HDgetenv(H5FD_IOC_THREAD_POOL_SIZE)) != NULL) {
- int value_check = HDatoi(env_value);
+ int value_check = atoi(env_value);
if (value_check > 0) {
thread_pool_size = (unsigned int)value_check;
}
@@ -195,8 +195,8 @@ initialize_ioc_threads(void *_sf_context)
#ifdef H5FD_IOC_DEBUG
if (sf_context->topology->ioc_idx == 0) {
- HDprintf("%s: time = %lf seconds\n", __func__, (t_end - t_start));
- HDfflush(stdout);
+ printf("%s: time = %lf seconds\n", __func__, (t_end - t_start));
+ fflush(stdout);
}
#endif
@@ -213,12 +213,12 @@ finalize_ioc_threads(void *_sf_context)
ioc_data_t *ioc_data = NULL;
int ret_value = 0;
- HDassert(sf_context);
- HDassert(sf_context->topology->rank_is_ioc);
+ assert(sf_context);
+ assert(sf_context->topology->rank_is_ioc);
ioc_data = sf_context->ioc_data;
if (ioc_data) {
- HDassert(0 == atomic_load(&ioc_data->sf_shutdown_flag));
+ assert(0 == atomic_load(&ioc_data->sf_shutdown_flag));
/* Shutdown the main IOC thread */
atomic_store(&ioc_data->sf_shutdown_flag, 1);
@@ -229,7 +229,7 @@ finalize_ioc_threads(void *_sf_context)
} while (0 != atomic_load(&ioc_data->sf_shutdown_flag));
/* Tear down IOC worker thread pool */
- HDassert(0 == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(0 == atomic_load(&ioc_data->sf_io_ops_pending));
hg_thread_pool_destroy(ioc_data->io_thread_pool);
hg_thread_mutex_destroy(&ioc_data->io_queue.q_mutex);
@@ -242,7 +242,7 @@ finalize_ioc_threads(void *_sf_context)
H5_SUBFILING_DONE_ERROR(H5E_IO, H5E_CLOSEERROR, -1, "%" PRId32 " I/O requests failed",
ioc_data->io_queue.num_failed);
- HDfree(ioc_data);
+ free(ioc_data);
sf_context->ioc_data = NULL;
H5_SUBFILING_FUNC_LEAVE;
@@ -345,10 +345,10 @@ ioc_main(ioc_data_t *ioc_data)
int shutdown_requested;
int ret_value = 0;
- HDassert(ioc_data);
+ assert(ioc_data);
context = H5_get_subfiling_object(ioc_data->sf_context_id);
- HDassert(context);
+ assert(context);
/* We can't have opened any files at this point..
* The file open approach has changed so that the normal
@@ -398,7 +398,7 @@ ioc_main(ioc_data_t *ioc_data)
* Zero out work request, since the received message should
* be smaller than sizeof(sf_work_request_t)
*/
- HDmemset(&wk_req, 0, sizeof(sf_work_request_t));
+ memset(&wk_req, 0, sizeof(sf_work_request_t));
if (MPI_SUCCESS != (mpi_code = MPI_Recv(&wk_req, count, MPI_BYTE, source, tag,
context->sf_msg_comm, MPI_STATUS_IGNORE)))
@@ -416,7 +416,7 @@ ioc_main(ioc_data_t *ioc_data)
ioc_io_queue_add_entry(ioc_data, &wk_req);
- HDassert(atomic_load(&ioc_data->sf_io_ops_pending) >= 0);
+ assert(atomic_load(&ioc_data->sf_io_ops_pending) >= 0);
}
else {
struct timespec sleep_spec = {0, IOC_MAIN_SLEEP_DELAY};
@@ -501,15 +501,15 @@ handle_work_request(void *arg)
int op_ret;
hg_thread_ret_t ret_value = 0;
- HDassert(q_entry_ptr);
- HDassert(q_entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
- HDassert(q_entry_ptr->in_progress);
+ assert(q_entry_ptr);
+ assert(q_entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(q_entry_ptr->in_progress);
sf_context = H5_get_subfiling_object(file_context_id);
- HDassert(sf_context);
+ assert(sf_context);
ioc_data = sf_context->ioc_data;
- HDassert(ioc_data);
+ assert(ioc_data);
atomic_fetch_add(&ioc_data->sf_work_pending, 1);
@@ -559,14 +559,14 @@ handle_work_request(void *arg)
#ifdef H5FD_IOC_DEBUG
{
int curr_io_ops_pending = atomic_load(&ioc_data->sf_io_ops_pending);
- HDassert(curr_io_ops_pending > 0);
+ assert(curr_io_ops_pending > 0);
}
#endif
/* complete the I/O request */
ioc_io_queue_complete_entry(ioc_data, q_entry_ptr);
- HDassert(atomic_load(&ioc_data->sf_io_ops_pending) >= 0);
+ assert(atomic_load(&ioc_data->sf_io_ops_pending) >= 0);
/* Check the I/O Queue to see if there are any dispatchable entries */
ioc_io_queue_dispatch_eligible_entries(ioc_data, 1);
@@ -617,7 +617,7 @@ send_ack_to_client(int ack_val, int dest_rank, int source_rank, int msg_tag, MPI
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(ack_val > 0);
+ assert(ack_val > 0);
(void)source_rank;
@@ -697,7 +697,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
int mpi_code;
int ret_value = 0;
- HDassert(msg);
+ assert(msg);
file_context_id = msg->context_id;
@@ -712,7 +712,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
}
sf_context = H5_get_subfiling_object(file_context_id);
- HDassert(sf_context);
+ assert(sf_context);
stripe_id = file_offset + data_size;
sf_eof = (haddr_t)(stripe_id % sf_context->sf_stripe_size);
@@ -739,7 +739,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
#endif
/* Allocate space to receive data sent from the client */
- if (NULL == (recv_buf = HDmalloc((size_t)data_size))) {
+ if (NULL == (recv_buf = malloc((size_t)data_size))) {
send_nack = TRUE;
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, -1, "couldn't allocate receive buffer for data");
}
@@ -751,7 +751,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
* allows us to distinguish between multiple concurrent
* writes from a single rank.
*/
- HDassert(H5FD_IOC_tag_ub_val_ptr && (*H5FD_IOC_tag_ub_val_ptr >= IO_TAG_BASE));
+ assert(H5FD_IOC_tag_ub_val_ptr && (*H5FD_IOC_tag_ub_val_ptr >= IO_TAG_BASE));
rcv_tag = (int)(counter % (INT_MAX - IO_TAG_BASE));
rcv_tag %= (*H5FD_IOC_tag_ub_val_ptr - IO_TAG_BASE);
rcv_tag += IO_TAG_BASE;
@@ -787,7 +787,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
#endif
- HDassert(subfile_idx < sf_context->sf_num_fids);
+ assert(subfile_idx < sf_context->sf_num_fids);
sf_fid = sf_context->sf_fids[subfile_idx];
#ifdef H5_SUBFILING_DEBUG
@@ -836,7 +836,7 @@ done:
H5_SUBFILING_DONE_ERROR(H5E_IO, H5E_WRITEERROR, -1, "couldn't send NACK to client");
}
- HDfree(recv_buf);
+ free(recv_buf);
H5_SUBFILING_FUNC_LEAVE;
} /* ioc_file_queue_write_indep() */
@@ -883,12 +883,12 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
int mpi_code;
int ret_value = 0;
- HDassert(msg);
+ assert(msg);
file_context_id = msg->context_id;
sf_context = H5_get_subfiling_object(file_context_id);
- HDassert(sf_context);
+ assert(sf_context);
/*
* If we are using 1 subfile per IOC, we can optimize reads
@@ -935,7 +935,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
#endif
/* Allocate space to send data read from file to client */
- if (NULL == (send_buf = HDmalloc((size_t)data_size))) {
+ if (NULL == (send_buf = malloc((size_t)data_size))) {
if (need_data_tag) {
send_nack = TRUE;
send_empty_buf = FALSE;
@@ -952,7 +952,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
* reads from a single rank, which can happen when a rank
* owns multiple subfiles.
*/
- HDassert(H5FD_IOC_tag_ub_val_ptr && (*H5FD_IOC_tag_ub_val_ptr >= IO_TAG_BASE));
+ assert(H5FD_IOC_tag_ub_val_ptr && (*H5FD_IOC_tag_ub_val_ptr >= IO_TAG_BASE));
send_tag = (int)(counter % (INT_MAX - IO_TAG_BASE));
send_tag %= (*H5FD_IOC_tag_ub_val_ptr - IO_TAG_BASE);
send_tag += IO_TAG_BASE;
@@ -964,7 +964,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
}
/* Read data from the subfile */
- HDassert(subfile_idx < sf_context->sf_num_fids);
+ assert(subfile_idx < sf_context->sf_num_fids);
sf_fid = sf_context->sf_fids[subfile_idx];
if (sf_fid < 0)
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_BADVALUE, -1, "subfile file descriptor %d is invalid", sf_fid);
@@ -1010,7 +1010,7 @@ done:
H5_SUBFILING_MPI_DONE_ERROR(-1, "MPI_Send failed", mpi_code);
}
- HDfree(send_buf);
+ free(send_buf);
return ret_value;
} /* end ioc_file_queue_read_indep() */
@@ -1047,8 +1047,8 @@ ioc_file_write_data(int fd, int64_t file_offset, void *data_buffer, int64_t data
bytes_remaining -= bytes_written;
#ifdef H5FD_IOC_DEBUG
- HDprintf("[ioc(%d) %s]: wrote %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx,
- __func__, bytes_written, bytes_remaining, file_offset);
+ printf("[ioc(%d) %s]: wrote %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx,
+ __func__, bytes_written, bytes_remaining, file_offset);
#endif
this_data += bytes_written;
@@ -1099,25 +1099,25 @@ ioc_file_read_data(int fd, int64_t file_offset, void *data_buffer, int64_t data_
bytes_remaining -= bytes_read;
#ifdef H5FD_IOC_DEBUG
- HDprintf("[ioc(%d) %s]: read %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx,
- __func__, bytes_read, bytes_remaining, file_offset);
+ printf("[ioc(%d) %s]: read %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx,
+ __func__, bytes_read, bytes_remaining, file_offset);
#endif
this_buffer += bytes_read;
file_offset += bytes_read;
}
else if (bytes_read == 0) {
- HDassert(bytes_remaining > 0);
+ assert(bytes_remaining > 0);
/* end of file but not end of format address space */
- HDmemset(this_buffer, 0, (size_t)bytes_remaining);
+ memset(this_buffer, 0, (size_t)bytes_remaining);
break;
}
else {
if (retries == 0) {
#ifdef H5FD_IOC_DEBUG
- HDprintf("[ioc(%d) %s]: TIMEOUT: file_offset=%" PRId64 ", data_size=%ld\n", ioc_idx, __func__,
- file_offset, data_size);
+ printf("[ioc(%d) %s]: TIMEOUT: file_offset=%" PRId64 ", data_size=%ld\n", ioc_idx, __func__,
+ file_offset, data_size);
#endif
H5_SUBFILING_SYS_GOTO_ERROR(H5E_IO, H5E_READERROR, -1, "HDpread failed");
@@ -1145,7 +1145,7 @@ ioc_file_truncate(sf_work_request_t *msg)
int mpi_code;
int ret_value = 0;
- HDassert(msg);
+ assert(msg);
file_context_id = msg->context_id;
ioc_idx = msg->ioc_idx;
@@ -1160,7 +1160,7 @@ ioc_file_truncate(sf_work_request_t *msg)
if (NULL == (sf_context = H5_get_subfiling_object(file_context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_CANTGET, -1, "couldn't retrieve subfiling context");
- HDassert(subfile_idx < sf_context->sf_num_fids);
+ assert(subfile_idx < sf_context->sf_num_fids);
fd = sf_context->sf_fids[subfile_idx];
@@ -1176,9 +1176,9 @@ ioc_file_truncate(sf_work_request_t *msg)
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Send failed", mpi_code);
#ifdef H5FD_IOC_DEBUG
- HDprintf("[ioc(%d) %s]: truncated subfile to %lld bytes. ret = %d\n", ioc_idx, __func__,
- (long long)length, errno);
- HDfflush(stdout);
+ printf("[ioc(%d) %s]: truncated subfile to %lld bytes. ret = %d\n", ioc_idx, __func__, (long long)length,
+ errno);
+ fflush(stdout);
#endif
done:
@@ -1219,7 +1219,7 @@ ioc_file_report_eof(sf_work_request_t *msg, MPI_Comm comm)
int mpi_code;
int ret_value = 0;
- HDassert(msg);
+ assert(msg);
file_context_id = msg->context_id;
source = msg->source;
@@ -1230,7 +1230,7 @@ ioc_file_report_eof(sf_work_request_t *msg, MPI_Comm comm)
if (NULL == (sf_context = H5_get_subfiling_object(file_context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_CANTGET, -1, "couldn't retrieve subfiling context");
- HDassert(subfile_idx < sf_context->sf_num_fids);
+ assert(subfile_idx < sf_context->sf_num_fids);
fd = sf_context->sf_fids[subfile_idx];
@@ -1273,7 +1273,7 @@ ioc_io_queue_alloc_entry(void)
{
ioc_io_queue_entry_t *q_entry_ptr = NULL;
- q_entry_ptr = (ioc_io_queue_entry_t *)HDmalloc(sizeof(ioc_io_queue_entry_t));
+ q_entry_ptr = (ioc_io_queue_entry_t *)malloc(sizeof(ioc_io_queue_entry_t));
if (q_entry_ptr) {
@@ -1326,21 +1326,21 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr)
{
ioc_io_queue_entry_t *entry_ptr = NULL;
- HDassert(ioc_data);
- HDassert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
- HDassert(wk_req_ptr);
+ assert(ioc_data);
+ assert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
+ assert(wk_req_ptr);
entry_ptr = ioc_io_queue_alloc_entry();
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
- HDmemcpy((void *)(&(entry_ptr->wk_req)), (const void *)wk_req_ptr, sizeof(sf_work_request_t));
+ memcpy((void *)(&(entry_ptr->wk_req)), (const void *)wk_req_ptr, sizeof(sf_work_request_t));
/* must obtain io_queue mutex before appending */
hg_thread_mutex_lock(&ioc_data->io_queue.q_mutex);
- HDassert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
entry_ptr->counter = ioc_data->io_queue.req_counter++;
@@ -1360,7 +1360,7 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr)
atomic_load(&ioc_data->sf_io_ops_pending));
#endif
- HDassert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
+ assert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
#ifdef H5FD_IOC_COLLECT_STATS
entry_ptr->q_time = H5_now_usec();
@@ -1398,7 +1398,7 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr)
}
#endif
- HDassert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
hg_thread_mutex_unlock(&ioc_data->io_queue.q_mutex);
@@ -1457,8 +1457,8 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
ioc_io_queue_entry_t *entry_ptr = NULL;
ioc_io_queue_entry_t *scan_ptr = NULL;
- HDassert(ioc_data);
- HDassert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
+ assert(ioc_data);
+ assert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
if (try_lock) {
if (hg_thread_mutex_try_lock(&ioc_data->io_queue.q_mutex) < 0)
@@ -1470,11 +1470,11 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
entry_ptr = ioc_data->io_queue.q_head;
/* sanity check on first element in the I/O queue */
- HDassert((entry_ptr == NULL) || (entry_ptr->prev == NULL));
+ assert((entry_ptr == NULL) || (entry_ptr->prev == NULL));
while ((entry_ptr) && (ioc_data->io_queue.num_pending > 0)) {
- HDassert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
/* Check for a get EOF or truncate operation at head of queue */
if (ioc_data->io_queue.q_head->in_progress) {
@@ -1499,7 +1499,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
scan_ptr = entry_ptr->prev;
- HDassert((scan_ptr == NULL) || (scan_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC));
+ assert((scan_ptr == NULL) || (scan_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC));
if ((entry_ptr->wk_req.tag == TRUNC_OP) || (entry_ptr->wk_req.tag == GET_EOF_OP)) {
@@ -1539,18 +1539,18 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
if (!conflict_detected) { /* dispatch I/O request */
- HDassert(scan_ptr == NULL);
- HDassert(!entry_ptr->in_progress);
+ assert(scan_ptr == NULL);
+ assert(!entry_ptr->in_progress);
entry_ptr->in_progress = TRUE;
- HDassert(ioc_data->io_queue.num_pending > 0);
+ assert(ioc_data->io_queue.num_pending > 0);
ioc_data->io_queue.num_pending--;
ioc_data->io_queue.num_in_progress++;
- HDassert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress ==
- ioc_data->io_queue.q_len);
+ assert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress ==
+ ioc_data->io_queue.q_len);
entry_ptr->thread_wk.func = handle_work_request;
entry_ptr->thread_wk.args = entry_ptr;
@@ -1583,7 +1583,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
entry_ptr = entry_ptr->next;
}
- HDassert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
hg_thread_mutex_unlock(&ioc_data->io_queue.q_mutex);
} /* ioc_io_queue_dispatch_eligible_entries() */
@@ -1616,16 +1616,16 @@ ioc_io_queue_complete_entry(ioc_data_t *ioc_data, ioc_io_queue_entry_t *entry_pt
uint64_t execution_time;
#endif
- HDassert(ioc_data);
- HDassert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(ioc_data);
+ assert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
/* must obtain io_queue mutex before deleting and updating stats */
hg_thread_mutex_lock(&ioc_data->io_queue.q_mutex);
- HDassert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
- HDassert(ioc_data->io_queue.num_in_progress > 0);
+ assert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
+ assert(ioc_data->io_queue.num_in_progress > 0);
if (entry_ptr->wk_ret < 0)
ioc_data->io_queue.num_failed++;
@@ -1634,7 +1634,7 @@ ioc_io_queue_complete_entry(ioc_data_t *ioc_data, ioc_io_queue_entry_t *entry_pt
ioc_data->io_queue.num_in_progress--;
- HDassert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
+ assert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
atomic_fetch_sub(&ioc_data->sf_io_ops_pending, 1);
@@ -1652,10 +1652,10 @@ ioc_io_queue_complete_entry(ioc_data_t *ioc_data, ioc_io_queue_entry_t *entry_pt
* there aren't other operations in progress
*/
if ((entry_ptr->wk_req.tag == GET_EOF_OP) || (entry_ptr->wk_req.tag == TRUNC_OP))
- HDassert(ioc_data->io_queue.num_in_progress == 0);
+ assert(ioc_data->io_queue.num_in_progress == 0);
#endif
- HDassert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
#ifdef H5FD_IOC_COLLECT_STATS
/* Compute the queued and execution time */
@@ -1696,14 +1696,14 @@ static void
ioc_io_queue_free_entry(ioc_io_queue_entry_t *q_entry_ptr)
{
/* use assertions for error checking, since the following should never fail. */
- HDassert(q_entry_ptr);
- HDassert(q_entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
- HDassert(q_entry_ptr->next == NULL);
- HDassert(q_entry_ptr->prev == NULL);
+ assert(q_entry_ptr);
+ assert(q_entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(q_entry_ptr->next == NULL);
+ assert(q_entry_ptr->prev == NULL);
q_entry_ptr->magic = 0;
- HDfree(q_entry_ptr);
+ free(q_entry_ptr);
q_entry_ptr = NULL;
diff --git a/src/H5FDsubfiling/H5FDsubfile_int.c b/src/H5FDsubfiling/H5FDsubfile_int.c
index 4c583e8..b8b2725 100644
--- a/src/H5FDsubfiling/H5FDsubfile_int.c
+++ b/src/H5FDsubfiling/H5FDsubfile_int.c
@@ -101,10 +101,10 @@ H5FD__subfiling__truncate_sub_files(hid_t context_id, int64_t logical_file_eof,
num_subfiles_owned = sf_context->sf_num_fids;
- if (NULL == (recv_reqs = HDmalloc((size_t)num_subfiles_owned * sizeof(*recv_reqs))))
+ if (NULL == (recv_reqs = malloc((size_t)num_subfiles_owned * sizeof(*recv_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate receive requests array");
- if (NULL == (recv_msgs = HDmalloc((size_t)num_subfiles_owned * 3 * sizeof(*recv_msgs))))
+ if (NULL == (recv_msgs = malloc((size_t)num_subfiles_owned * 3 * sizeof(*recv_msgs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate message array");
/*
@@ -175,7 +175,7 @@ H5FD__subfiling__truncate_sub_files(hid_t context_id, int64_t logical_file_eof,
}
}
- HDassert(test_file_eof == logical_file_eof);
+ assert(test_file_eof == logical_file_eof);
}
#endif /* NDEBUG */
}
@@ -186,8 +186,8 @@ H5FD__subfiling__truncate_sub_files(hid_t context_id, int64_t logical_file_eof,
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code);
done:
- HDfree(recv_msgs);
- HDfree(recv_reqs);
+ free(recv_msgs);
+ free(recv_reqs);
H5_SUBFILING_FUNC_LEAVE;
} /* H5FD__subfiling__truncate_sub_files() */
@@ -295,24 +295,24 @@ H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_eof_ptr)
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(logical_eof_ptr);
+ assert(logical_eof_ptr);
if (NULL == (sf_context = (subfiling_context_t *)H5_get_subfiling_object(context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "can't get subfile context");
- HDassert(sf_context->topology);
+ assert(sf_context->topology);
n_io_concentrators = sf_context->topology->n_io_concentrators;
num_subfiles = sf_context->sf_num_subfiles;
- HDassert(n_io_concentrators > 0);
- HDassert(num_subfiles >= n_io_concentrators);
+ assert(n_io_concentrators > 0);
+ assert(num_subfiles >= n_io_concentrators);
- if (NULL == (sf_eofs = HDmalloc((size_t)num_subfiles * sizeof(int64_t))))
+ if (NULL == (sf_eofs = malloc((size_t)num_subfiles * sizeof(int64_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate subfile EOFs array");
- if (NULL == (recv_reqs = HDmalloc((size_t)num_subfiles * sizeof(*recv_reqs))))
+ if (NULL == (recv_reqs = malloc((size_t)num_subfiles * sizeof(*recv_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate receive requests array");
- if (NULL == (recv_msg = HDmalloc((size_t)num_subfiles * sizeof(msg))))
+ if (NULL == (recv_msg = malloc((size_t)num_subfiles * sizeof(msg))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate message array");
for (int i = 0; i < num_subfiles; i++) {
@@ -352,9 +352,9 @@ H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_eof_ptr)
for (int i = 0; i < num_subfiles; i++) {
int ioc_rank = (int)recv_msg[3 * i];
- HDassert(ioc_rank >= 0);
- HDassert(ioc_rank < n_io_concentrators);
- HDassert(sf_eofs[i] == -1);
+ assert(ioc_rank >= 0);
+ assert(ioc_rank < n_io_concentrators);
+ assert(sf_eofs[i] == -1);
sf_eofs[i] = recv_msg[(3 * i) + 1];
}
@@ -405,9 +405,9 @@ done:
}
}
- HDfree(recv_msg);
- HDfree(recv_reqs);
- HDfree(sf_eofs);
+ free(recv_msg);
+ free(recv_reqs);
+ free(sf_eofs);
H5_SUBFILING_FUNC_LEAVE;
} /* H5FD__subfiling__get_real_eof() */
diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c
index 64c92ed..2371895 100644
--- a/src/H5FDsubfiling/H5FDsubfiling.c
+++ b/src/H5FDsubfiling/H5FDsubfiling.c
@@ -393,8 +393,8 @@ H5FD__subfiling_term(void)
}
#ifdef H5FD_SUBFILING_DEBUG
else
- HDprintf("** WARNING **: HDF5 is terminating the Subfiling VFD after MPI_Finalize() was "
- "called - an HDF5 ID was probably left unclosed\n");
+ printf("** WARNING **: HDF5 is terminating the Subfiling VFD after MPI_Finalize() was "
+ "called - an HDF5 ID was probably left unclosed\n");
#endif
}
@@ -468,7 +468,7 @@ H5Pset_fapl_subfiling(hid_t fapl_id, const H5FD_subfiling_config_t *vfd_config)
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (vfd_config == NULL) {
- if (NULL == (subfiling_conf = HDcalloc(1, sizeof(*subfiling_conf))))
+ if (NULL == (subfiling_conf = calloc(1, sizeof(*subfiling_conf))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfiling VFD configuration");
subfiling_conf->ioc_fapl_id = H5I_INVALID_HID;
@@ -516,7 +516,7 @@ done:
if (subfiling_conf) {
if (subfiling_conf->ioc_fapl_id >= 0 && H5I_dec_ref(subfiling_conf->ioc_fapl_id) < 0)
H5_SUBFILING_DONE_ERROR(H5E_PLIST, H5E_CANTDEC, FAIL, "can't close IOC FAPL");
- HDfree(subfiling_conf);
+ free(subfiling_conf);
}
H5_SUBFILING_FUNC_LEAVE_API;
@@ -566,7 +566,7 @@ H5Pget_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *config_out)
}
else {
/* Copy the subfiling fapl data out */
- HDmemcpy(config_out, config_ptr, sizeof(H5FD_subfiling_config_t));
+ memcpy(config_out, config_ptr, sizeof(H5FD_subfiling_config_t));
/* Copy the driver info value */
if (H5FD__copy_plist(config_ptr->ioc_fapl_id, &(config_out->ioc_fapl_id)) < 0)
@@ -585,9 +585,9 @@ H5FD__subfiling_get_default_config(hid_t fapl_id, H5FD_subfiling_config_t *confi
char *h5_require_ioc;
herr_t ret_value = SUCCEED;
- HDassert(config_out);
+ assert(config_out);
- HDmemset(config_out, 0, sizeof(*config_out));
+ memset(config_out, 0, sizeof(*config_out));
config_out->magic = H5FD_SUBFILING_FAPL_MAGIC;
config_out->version = H5FD_SUBFILING_CURR_FAPL_VERSION;
@@ -599,7 +599,7 @@ H5FD__subfiling_get_default_config(hid_t fapl_id, H5FD_subfiling_config_t *confi
config_out->shared_cfg.stripe_count = H5FD_SUBFILING_DEFAULT_STRIPE_COUNT;
if ((h5_require_ioc = HDgetenv("H5_REQUIRE_IOC")) != NULL) {
- int value_check = HDatoi(h5_require_ioc);
+ int value_check = atoi(h5_require_ioc);
if (value_check == 0)
config_out->require_ioc = FALSE;
}
@@ -668,7 +668,7 @@ H5FD__subfiling_validate_config(const H5FD_subfiling_config_t *fa)
{
herr_t ret_value = SUCCEED;
- HDassert(fa != NULL);
+ assert(fa != NULL);
if (fa->version != H5FD_SUBFILING_CURR_FAPL_VERSION)
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown H5FD_subfiling_config_t version");
@@ -706,7 +706,7 @@ H5FD__subfiling_sb_size(H5FD_t *_file)
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file;
hsize_t ret_value = 0;
- HDassert(file);
+ assert(file);
/* Configuration structure magic number */
ret_value += sizeof(uint32_t);
@@ -824,7 +824,7 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
/* Encode config file prefix string */
if (sf_context->config_file_prefix) {
- HDmemcpy(p, sf_context->config_file_prefix, prefix_len);
+ memcpy(p, sf_context->config_file_prefix, prefix_len);
p += prefix_len;
}
@@ -832,14 +832,14 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
if (file->sf_file) {
char ioc_name[9];
- HDmemset(ioc_name, 0, sizeof(ioc_name));
+ memset(ioc_name, 0, sizeof(ioc_name));
if (H5FD_sb_encode(file->sf_file, ioc_name, p + 9) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL,
"unable to encode IOC VFD's superblock information");
/* Copy the IOC VFD's name into our buffer */
- HDmemcpy(p, ioc_name, 9);
+ memcpy(p, ioc_name, 9);
}
done:
@@ -902,11 +902,11 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
/* Decode config file prefix string */
if (tmpu64 > 0) {
if (!sf_context->config_file_prefix) {
- if (NULL == (sf_context->config_file_prefix = HDmalloc(tmpu64)))
+ if (NULL == (sf_context->config_file_prefix = malloc(tmpu64)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate space for config file prefix string");
- HDmemcpy(sf_context->config_file_prefix, p, tmpu64);
+ memcpy(sf_context->config_file_prefix, p, tmpu64);
/* Just in case.. */
sf_context->config_file_prefix[tmpu64 - 1] = '\0';
@@ -918,7 +918,7 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
if (file->sf_file) {
char ioc_name[9];
- HDmemcpy(ioc_name, p, 9);
+ memcpy(ioc_name, p, 9);
p += 9;
if (H5FD_sb_load(file->sf_file, ioc_name, p) < 0)
@@ -976,7 +976,7 @@ H5FD__subfiling_fapl_get(H5FD_t *_file)
}
/* Copy the fields of the structure */
- HDmemcpy(fa, &(file->fa), sizeof(H5FD_subfiling_config_t));
+ memcpy(fa, &(file->fa), sizeof(H5FD_subfiling_config_t));
/* Copy the driver info value */
if (H5FD__copy_plist(file->fa.ioc_fapl_id, &(fa->ioc_fapl_id)) < 0)
@@ -1012,7 +1012,7 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr)
int ret_value = 0;
H5P_genplist_t *plist_ptr = NULL;
- HDassert(id_out_ptr != NULL);
+ assert(id_out_ptr != NULL);
if (FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "not a file access property list");
@@ -1055,7 +1055,7 @@ H5FD__subfiling_fapl_copy(const void *_old_fa)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
}
- HDmemcpy(new_fa, old_fa, sizeof(H5FD_subfiling_config_t));
+ memcpy(new_fa, old_fa, sizeof(H5FD_subfiling_config_t));
if (H5FD__copy_plist(old_fa->ioc_fapl_id, &(new_fa->ioc_fapl_id)) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy the IOC FAPL");
@@ -1091,7 +1091,7 @@ H5FD__subfiling_fapl_free(void *_fa)
H5FD_subfiling_config_t *fa = (H5FD_subfiling_config_t *)_fa;
herr_t ret_value = SUCCEED;
- HDassert(fa != NULL); /* sanity check */
+ assert(fa != NULL); /* sanity check */
if (fa->ioc_fapl_id >= 0 && H5I_dec_ref(fa->ioc_fapl_id) < 0)
H5_SUBFILING_DONE_ERROR(H5E_PLIST, H5E_CANTDEC, FAIL, "can't close IOC FAPL");
@@ -1193,7 +1193,7 @@ H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t ma
config_ptr = &default_config;
}
- HDmemcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_subfiling_config_t));
+ memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_subfiling_config_t));
if (H5FD__copy_plist(config_ptr->ioc_fapl_id, &(file_ptr->fa.ioc_fapl_id)) < 0) {
file_ptr->fa.ioc_fapl_id = H5I_INVALID_HID;
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy FAPL");
@@ -1318,7 +1318,7 @@ H5FD__subfiling_close_int(H5FD_subfiling_t *file_ptr)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(file_ptr);
+ assert(file_ptr);
if (MPI_SUCCESS != (mpi_code = MPI_Finalized(&mpi_finalized)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Finalized failed", mpi_code);
@@ -1346,7 +1346,7 @@ H5FD__subfiling_close_int(H5FD_subfiling_t *file_ptr)
file_ptr->fail_to_encode = FALSE;
done:
- HDfree(file_ptr->file_path);
+ free(file_ptr->file_path);
file_ptr->file_path = NULL;
H5MM_free(file_ptr->file_dir);
@@ -1404,8 +1404,8 @@ H5FD__subfiling_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_subfiling_t *f2 = (const H5FD_subfiling_t *)_f2;
int ret_value = 0;
- HDassert(f1);
- HDassert(f2);
+ assert(f1);
+ assert(f2);
ret_value = H5FD_cmp(f1->sf_file, f2->sf_file);
@@ -1585,8 +1585,8 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
int num_subfiles;
herr_t ret_value = SUCCEED;
- HDassert(file_ptr && file_ptr->pub.cls);
- HDassert(buf);
+ assert(file_ptr && file_ptr->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -1636,8 +1636,8 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
* underlying I/O operations.
*/
sf_context = (subfiling_context_t *)H5_get_subfiling_object(file_ptr->context_id);
- HDassert(sf_context);
- HDassert(sf_context->topology);
+ assert(sf_context);
+ assert(sf_context->topology);
num_subfiles = sf_context->sf_num_subfiles;
@@ -1675,14 +1675,14 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
* to contain the translation of the I/O request into a collection of
* I/O requests.
*/
- if (NULL == (source_data_offset =
- HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*source_data_offset))))
+ if (NULL ==
+ (source_data_offset = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*source_data_offset))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate source data offset I/O vector");
- if (NULL == (sf_data_size = HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_data_size))))
+ if (NULL == (sf_data_size = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_data_size))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile data size I/O vector");
- if (NULL == (sf_offset = HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_offset))))
+ if (NULL == (sf_offset = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_offset))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile offset I/O vector");
@@ -1713,16 +1713,16 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
H5_CHECKED_ASSIGN(vector_len, uint32_t, num_subfiles_used, int);
/* Allocate I/O vectors */
- if (NULL == (io_types = HDmalloc(vector_len * sizeof(*io_types))))
+ if (NULL == (io_types = malloc(vector_len * sizeof(*io_types))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O types vector");
- if (NULL == (io_addrs = HDmalloc(vector_len * sizeof(*io_addrs))))
+ if (NULL == (io_addrs = malloc(vector_len * sizeof(*io_addrs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O addresses vector");
- if (NULL == (io_sizes = HDmalloc(vector_len * sizeof(*io_sizes))))
+ if (NULL == (io_sizes = malloc(vector_len * sizeof(*io_sizes))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O sizes vector");
- if (NULL == (io_bufs = HDmalloc(vector_len * sizeof(*io_bufs))))
+ if (NULL == (io_bufs = malloc(vector_len * sizeof(*io_bufs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O buffers vector");
@@ -1774,13 +1774,13 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
file_ptr->op = OP_READ;
done:
- HDfree(io_bufs);
- HDfree(io_sizes);
- HDfree(io_addrs);
- HDfree(io_types);
- HDfree(sf_offset);
- HDfree(sf_data_size);
- HDfree(source_data_offset);
+ free(io_bufs);
+ free(io_sizes);
+ free(io_addrs);
+ free(io_types);
+ free(sf_offset);
+ free(sf_data_size);
+ free(source_data_offset);
if (ret_value < 0) {
/* Reset last file I/O information */
@@ -1820,8 +1820,8 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
int num_subfiles;
herr_t ret_value = SUCCEED;
- HDassert(file_ptr && file_ptr->pub.cls);
- HDassert(buf);
+ assert(file_ptr && file_ptr->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -1868,8 +1868,8 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
* underlying I/O operations.
*/
sf_context = (subfiling_context_t *)H5_get_subfiling_object(file_ptr->context_id);
- HDassert(sf_context);
- HDassert(sf_context->topology);
+ assert(sf_context);
+ assert(sf_context->topology);
num_subfiles = sf_context->sf_num_subfiles;
@@ -1918,14 +1918,14 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
* to contain the translation of the I/O request into a collection of
* I/O requests.
*/
- if (NULL == (source_data_offset =
- HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*source_data_offset))))
+ if (NULL ==
+ (source_data_offset = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*source_data_offset))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate source data offset I/O vector");
- if (NULL == (sf_data_size = HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_data_size))))
+ if (NULL == (sf_data_size = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_data_size))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile data size I/O vector");
- if (NULL == (sf_offset = HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_offset))))
+ if (NULL == (sf_offset = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_offset))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile offset I/O vector");
@@ -1956,16 +1956,16 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
H5_CHECKED_ASSIGN(vector_len, uint32_t, num_subfiles_used, int);
/* Allocate I/O vectors */
- if (NULL == (io_types = HDmalloc(vector_len * sizeof(*io_types))))
+ if (NULL == (io_types = malloc(vector_len * sizeof(*io_types))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O types vector");
- if (NULL == (io_addrs = HDmalloc(vector_len * sizeof(*io_addrs))))
+ if (NULL == (io_addrs = malloc(vector_len * sizeof(*io_addrs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O addresses vector");
- if (NULL == (io_sizes = HDmalloc(vector_len * sizeof(*io_sizes))))
+ if (NULL == (io_sizes = malloc(vector_len * sizeof(*io_sizes))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O sizes vector");
- if (NULL == (io_bufs = HDmalloc(vector_len * sizeof(*io_bufs))))
+ if (NULL == (io_bufs = malloc(vector_len * sizeof(*io_bufs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O buffers vector");
@@ -2031,13 +2031,13 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
file_ptr->local_eof = file_ptr->pos;
done:
- HDfree(io_bufs);
- HDfree(io_sizes);
- HDfree(io_addrs);
- HDfree(io_types);
- HDfree(sf_offset);
- HDfree(sf_data_size);
- HDfree(source_data_offset);
+ free(io_bufs);
+ free(io_sizes);
+ free(io_addrs);
+ free(io_types);
+ free(sf_offset);
+ free(sf_data_size);
+ free(source_data_offset);
if (ret_value < 0) {
/* Reset last file I/O information */
@@ -2137,8 +2137,8 @@ H5FD__subfiling_read_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_m
H5FD_mem_t type;
haddr_t eoa;
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
if (H5CX_get_io_xfer_mode(&xfer_mode) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL,
@@ -2254,7 +2254,7 @@ H5FD__subfiling_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_
H5FD_mpio_xfer_t xfer_mode = H5FD_MPIO_INDEPENDENT;
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(file_ptr != NULL); /* sanity check */
+ assert(file_ptr != NULL); /* sanity check */
/* Check arguments
* RAW - Do we really need to check arguments once again?
@@ -2297,8 +2297,8 @@ H5FD__subfiling_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_
H5FD_mem_t type;
haddr_t eoa;
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
if (H5CX_get_io_xfer_mode(&xfer_mode) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL,
@@ -2390,7 +2390,7 @@ H5FD__subfiling_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(file);
+ assert(file);
/* Extend the file to make sure it's large enough */
if (!H5F_addr_eq(file->eoa, file->last_eoa)) {
@@ -2469,7 +2469,7 @@ H5FD__subfiling_lock(H5FD_t *_file, hbool_t rw)
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(file);
+ assert(file);
if (file->fa.require_ioc) {
#ifdef VERBOSE
@@ -2502,7 +2502,7 @@ H5FD__subfiling_unlock(H5FD_t *_file)
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(file);
+ assert(file);
if (H5FD_unlock(file->sf_file) < 0)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to lock file");
@@ -2581,14 +2581,14 @@ H5FD__subfiling_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void
herr_t ret_value = SUCCEED; /* Return value */
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_SUBFILING == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_SUBFILING == file->pub.driver_id);
switch (op_code) {
case H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
/*
* Return a separate MPI communicator to the caller so
@@ -2603,14 +2603,14 @@ H5FD__subfiling_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void
break;
case H5FD_CTL_GET_MPI_RANK_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((int **)output) = file->mpi_rank;
break;
case H5FD_CTL_GET_MPI_SIZE_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((int **)output) = file->mpi_size;
break;
@@ -2740,17 +2740,17 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
int num_subfiles = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(sf_context->sf_stripe_size > 0);
- HDassert(sf_context->sf_blocksize_per_stripe > 0);
- HDassert(sf_context->sf_num_subfiles > 0);
- HDassert(sf_context->topology);
- HDassert(mem_buf_offset);
- HDassert(target_file_offset);
- HDassert(io_block_len);
- HDassert(first_subfile_index);
- HDassert(n_subfiles_used);
- HDassert(max_io_req_per_subfile);
+ assert(sf_context);
+ assert(sf_context->sf_stripe_size > 0);
+ assert(sf_context->sf_blocksize_per_stripe > 0);
+ assert(sf_context->sf_num_subfiles > 0);
+ assert(sf_context->topology);
+ assert(mem_buf_offset);
+ assert(target_file_offset);
+ assert(io_block_len);
+ assert(first_subfile_index);
+ assert(n_subfiles_used);
+ assert(max_io_req_per_subfile);
*first_subfile_index = 0;
*n_subfiles_used = 0;
@@ -2808,8 +2808,8 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
/* Determine the size of data written to the first and last stripes */
start_length = MIN(data_size, (stripe_size - offset_in_stripe));
final_length = (start_length == data_size ? 0 : final_offset % stripe_size);
- HDassert(start_length <= stripe_size);
- HDassert(final_length <= stripe_size);
+ assert(start_length <= stripe_size);
+ assert(final_length <= stripe_size);
/*
* Determine which subfile the I/O request begins in and which
@@ -2895,9 +2895,9 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
_target_file_offset = target_file_offset + output_offset;
_io_block_len = io_block_len + output_offset;
- HDmemset(_mem_buf_offset, 0, (max_iovec_len * sizeof(*_mem_buf_offset)));
- HDmemset(_target_file_offset, 0, (max_iovec_len * sizeof(*_target_file_offset)));
- HDmemset(_io_block_len, 0, (max_iovec_len * sizeof(*_io_block_len)));
+ memset(_mem_buf_offset, 0, (max_iovec_len * sizeof(*_mem_buf_offset)));
+ memset(_target_file_offset, 0, (max_iovec_len * sizeof(*_target_file_offset)));
+ memset(_io_block_len, 0, (max_iovec_len * sizeof(*_io_block_len)));
if (total_bytes == data_size) {
*n_subfiles_used = i;
@@ -2960,8 +2960,8 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
}
if (thin_uniform_section) {
- HDassert(iovec_depth > 1);
- HDassert(num_full_stripes > 1);
+ assert(iovec_depth > 1);
+ assert(num_full_stripes > 1);
iovec_depth--;
num_full_stripes--;
@@ -3033,7 +3033,7 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
row_offset += block_size;
}
- HDassert(offset_in_block <= block_size);
+ assert(offset_in_block <= block_size);
}
if (total_bytes != data_size)
@@ -3077,11 +3077,11 @@ iovec_fill_first(subfiling_context_t *sf_context, int64_t iovec_depth, int64_t t
int64_t total_bytes = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(mem_offset_out);
- HDassert(target_file_offset_out);
- HDassert(io_block_len_out);
- HDassert(iovec_depth > 0);
+ assert(sf_context);
+ assert(mem_offset_out);
+ assert(target_file_offset_out);
+ assert(io_block_len_out);
+ assert(iovec_depth > 0);
stripe_size = sf_context->sf_stripe_size;
block_size = sf_context->sf_blocksize_per_stripe;
@@ -3176,11 +3176,11 @@ iovec_fill_last(subfiling_context_t *sf_context, int64_t iovec_depth, int64_t ta
int64_t total_bytes = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(mem_offset_out);
- HDassert(target_file_offset_out);
- HDassert(io_block_len_out);
- HDassert(iovec_depth > 0);
+ assert(sf_context);
+ assert(mem_offset_out);
+ assert(target_file_offset_out);
+ assert(io_block_len_out);
+ assert(iovec_depth > 0);
stripe_size = sf_context->sf_stripe_size;
block_size = sf_context->sf_blocksize_per_stripe;
@@ -3308,11 +3308,11 @@ iovec_fill_first_last(subfiling_context_t *sf_context, int64_t iovec_depth, int6
int64_t total_bytes = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(mem_offset_out);
- HDassert(target_file_offset_out);
- HDassert(io_block_len_out);
- HDassert(iovec_depth > 0);
+ assert(sf_context);
+ assert(mem_offset_out);
+ assert(target_file_offset_out);
+ assert(io_block_len_out);
+ assert(iovec_depth > 0);
stripe_size = sf_context->sf_stripe_size;
block_size = sf_context->sf_blocksize_per_stripe;
@@ -3418,11 +3418,11 @@ iovec_fill_uniform(subfiling_context_t *sf_context, int64_t iovec_depth, int64_t
int64_t total_bytes = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(mem_offset_out);
- HDassert(target_file_offset_out);
- HDassert(io_block_len_out);
- HDassert((iovec_depth > 0) || (target_datasize == 0));
+ assert(sf_context);
+ assert(mem_offset_out);
+ assert(target_file_offset_out);
+ assert(io_block_len_out);
+ assert((iovec_depth > 0) || (target_datasize == 0));
stripe_size = sf_context->sf_stripe_size;
block_size = sf_context->sf_blocksize_per_stripe;
diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c
index 131f3ce..ea9bafb 100644
--- a/src/H5FDsubfiling/H5subfiling_common.c
+++ b/src/H5FDsubfiling/H5subfiling_common.c
@@ -154,7 +154,7 @@ H5_get_subfiling_object(int64_t object_id)
/* Create subfiling context cache if it doesn't exist */
if (!sf_context_cache) {
- if (NULL == (sf_context_cache = HDcalloc(DEFAULT_CONTEXT_CACHE_SIZE, sizeof(*sf_context_cache))))
+ if (NULL == (sf_context_cache = calloc(DEFAULT_CONTEXT_CACHE_SIZE, sizeof(*sf_context_cache))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate space for subfiling context cache");
sf_context_cache_size = DEFAULT_CONTEXT_CACHE_SIZE;
@@ -171,7 +171,7 @@ H5_get_subfiling_object(int64_t object_id)
new_size = (sf_context_cache_size * 3) / 2;
- if (NULL == (tmp_realloc = HDrealloc(sf_context_cache, new_size * sizeof(*sf_context_cache))))
+ if (NULL == (tmp_realloc = realloc(sf_context_cache, new_size * sizeof(*sf_context_cache))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate space for subfiling context cache");
@@ -179,14 +179,14 @@ H5_get_subfiling_object(int64_t object_id)
sf_context_cache_size = new_size;
/* Clear newly-allocated entries */
- HDmemset(&sf_context_cache[old_num_entries], 0,
- (sf_context_cache_size - old_num_entries) * sizeof(*sf_context_cache));
+ memset(&sf_context_cache[old_num_entries], 0,
+ (sf_context_cache_size - old_num_entries) * sizeof(*sf_context_cache));
/*
* If we had to make more space, the given object index
* should always fall within range after a single re-allocation
*/
- HDassert((size_t)obj_index < sf_context_cache_size);
+ assert((size_t)obj_index < sf_context_cache_size);
}
/*
@@ -194,14 +194,14 @@ H5_get_subfiling_object(int64_t object_id)
* application exit, context entry indices should just be
* consecutive
*/
- HDassert((size_t)obj_index <= sf_context_cache_num_entries);
+ assert((size_t)obj_index <= sf_context_cache_num_entries);
if ((size_t)obj_index < sf_context_cache_num_entries)
ret_value = sf_context_cache[obj_index];
else {
- HDassert(!sf_context_cache[sf_context_cache_num_entries]);
+ assert(!sf_context_cache[sf_context_cache_num_entries]);
/* Allocate a new subfiling context object */
- if (NULL == (ret_value = HDcalloc(1, sizeof(subfiling_context_t))))
+ if (NULL == (ret_value = calloc(1, sizeof(subfiling_context_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate subfiling context object");
@@ -211,8 +211,7 @@ H5_get_subfiling_object(int64_t object_id)
else if (obj_type == SF_TOPOLOGY) {
/* Create subfiling topology cache if it doesn't exist */
if (!sf_topology_cache) {
- if (NULL ==
- (sf_topology_cache = HDcalloc(DEFAULT_TOPOLOGY_CACHE_SIZE, sizeof(*sf_topology_cache))))
+ if (NULL == (sf_topology_cache = calloc(DEFAULT_TOPOLOGY_CACHE_SIZE, sizeof(*sf_topology_cache))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate space for subfiling topology cache");
sf_topology_cache_size = DEFAULT_TOPOLOGY_CACHE_SIZE;
@@ -229,7 +228,7 @@ H5_get_subfiling_object(int64_t object_id)
new_size = (sf_topology_cache_size * 3) / 2;
- if (NULL == (tmp_realloc = HDrealloc(sf_topology_cache, new_size * sizeof(*sf_topology_cache))))
+ if (NULL == (tmp_realloc = realloc(sf_topology_cache, new_size * sizeof(*sf_topology_cache))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate space for subfiling topology cache");
@@ -237,14 +236,14 @@ H5_get_subfiling_object(int64_t object_id)
sf_topology_cache_size = new_size;
/* Clear newly-allocated entries */
- HDmemset(&sf_topology_cache[old_num_entries], 0,
- (sf_topology_cache_size - old_num_entries) * sizeof(*sf_topology_cache));
+ memset(&sf_topology_cache[old_num_entries], 0,
+ (sf_topology_cache_size - old_num_entries) * sizeof(*sf_topology_cache));
/*
* If we had to make more space, the given object index
* should always fall within range after a single re-allocation
*/
- HDassert((size_t)obj_index < sf_topology_cache_size);
+ assert((size_t)obj_index < sf_topology_cache_size);
}
/*
@@ -252,14 +251,14 @@ H5_get_subfiling_object(int64_t object_id)
* application exit, topology entry indices should just be
* consecutive
*/
- HDassert((size_t)obj_index <= sf_topology_cache_num_entries);
+ assert((size_t)obj_index <= sf_topology_cache_num_entries);
if ((size_t)obj_index < sf_topology_cache_num_entries)
ret_value = sf_topology_cache[obj_index];
else {
- HDassert(!sf_topology_cache[sf_topology_cache_num_entries]);
+ assert(!sf_topology_cache[sf_topology_cache_num_entries]);
/* Allocate a new subfiling topology object */
- if (NULL == (ret_value = HDmalloc(sizeof(sf_topology_t))))
+ if (NULL == (ret_value = malloc(sizeof(sf_topology_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate subfiling topology object");
@@ -268,7 +267,7 @@ H5_get_subfiling_object(int64_t object_id)
}
#ifdef H5_SUBFILING_DEBUG
else
- HDprintf("%s: Unknown subfiling object type for ID %" PRId64 "\n", __func__, object_id);
+ printf("%s: Unknown subfiling object type for ID %" PRId64 "\n", __func__, object_id);
#endif
done:
@@ -308,15 +307,15 @@ H5_free_subfiling_object(int64_t object_id)
if (H5_free_subfiling_object_int(sf_context) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "couldn't free subfiling object");
- HDassert(sf_context_cache_num_entries > 0);
- HDassert(sf_context == sf_context_cache[sf_context_cache_num_entries - 1]);
+ assert(sf_context_cache_num_entries > 0);
+ assert(sf_context == sf_context_cache[sf_context_cache_num_entries - 1]);
sf_context_cache[sf_context_cache_num_entries - 1] = NULL;
sf_context_cache_num_entries--;
}
else {
sf_topology_t *sf_topology;
- HDassert(obj_type == SF_TOPOLOGY);
+ assert(obj_type == SF_TOPOLOGY);
if (NULL == (sf_topology = H5_get_subfiling_object(object_id)))
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL,
@@ -325,8 +324,8 @@ H5_free_subfiling_object(int64_t object_id)
if (H5_free_subfiling_topology(sf_topology) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "couldn't free subfiling topology");
- HDassert(sf_topology_cache_num_entries > 0);
- HDassert(sf_topology == sf_topology_cache[sf_topology_cache_num_entries - 1]);
+ assert(sf_topology_cache_num_entries > 0);
+ assert(sf_topology == sf_topology_cache[sf_topology_cache_num_entries - 1]);
sf_topology_cache[sf_topology_cache_num_entries - 1] = NULL;
sf_topology_cache_num_entries--;
}
@@ -342,7 +341,7 @@ H5_free_subfiling_object_int(subfiling_context_t *sf_context)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
+ assert(sf_context);
if (MPI_SUCCESS != (mpi_code = MPI_Finalized(&mpi_finalized))) {
/* Assume MPI is finalized or worse, and try to clean up what we can */
@@ -400,16 +399,16 @@ H5_free_subfiling_object_int(subfiling_context_t *sf_context)
sf_context->sf_group_size = -1;
sf_context->sf_group_rank = -1;
- HDfree(sf_context->subfile_prefix);
+ free(sf_context->subfile_prefix);
sf_context->subfile_prefix = NULL;
- HDfree(sf_context->config_file_prefix);
+ free(sf_context->config_file_prefix);
sf_context->config_file_prefix = NULL;
- HDfree(sf_context->h5_filename);
+ free(sf_context->h5_filename);
sf_context->h5_filename = NULL;
- HDfree(sf_context->sf_fids);
+ free(sf_context->sf_fids);
sf_context->sf_fids = NULL;
/*
@@ -420,7 +419,7 @@ H5_free_subfiling_object_int(subfiling_context_t *sf_context)
*/
sf_context->topology = NULL;
- HDfree(sf_context);
+ free(sf_context);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -432,7 +431,7 @@ H5_free_subfiling_topology(sf_topology_t *topology)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(topology);
+ assert(topology);
if (MPI_SUCCESS != (mpi_code = MPI_Finalized(&mpi_finalized))) {
/* Assume MPI is finalized or worse, but clean up what we can */
@@ -448,7 +447,7 @@ H5_free_subfiling_topology(sf_topology_t *topology)
for (size_t i = 0; i < sf_topology_cache_num_entries; i++)
if (topology == sf_topology_cache[i])
topology_cached = TRUE;
- HDassert(topology_cached);
+ assert(topology_cached);
}
#endif
@@ -456,25 +455,25 @@ H5_free_subfiling_topology(sf_topology_t *topology)
topology->n_io_concentrators = 0;
if (topology->app_layout) {
- HDfree(topology->app_layout->layout);
+ free(topology->app_layout->layout);
topology->app_layout->layout = NULL;
- HDfree(topology->app_layout->node_ranks);
+ free(topology->app_layout->node_ranks);
topology->app_layout->node_ranks = NULL;
- HDfree(topology->app_layout);
+ free(topology->app_layout);
}
topology->app_layout = NULL;
- HDfree(topology->io_concentrators);
+ free(topology->io_concentrators);
topology->io_concentrators = NULL;
if (!mpi_finalized)
if (H5_mpi_comm_free(&topology->app_comm) < 0)
H5_SUBFILING_DONE_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "can't free MPI communicator");
- HDfree(topology);
+ free(topology);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -674,7 +673,7 @@ H5_open_subfiles(const char *base_filename, uint64_t file_id, H5FD_subfiling_par
HDsnprintf(sf_context->sf_logfile_name, PATH_MAX, "%s.log.%d", sf_context->h5_filename, mpi_rank);
- if (NULL == (sf_context->sf_logfile = HDfopen(sf_context->sf_logfile_name, "a")))
+ if (NULL == (sf_context->sf_logfile = fopen(sf_context->sf_logfile_name, "a")))
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL,
"couldn't open subfiling debug logfile");
@@ -758,7 +757,7 @@ init_subfiling(const char *base_filename, uint64_t file_id, H5FD_subfiling_param
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(context_id_out);
+ assert(context_id_out);
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(comm, &mpi_rank)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Comm_rank failed", mpi_code);
@@ -960,11 +959,11 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(subfiling_config);
- HDassert(MPI_COMM_NULL != comm);
- HDassert(MPI_COMM_NULL != node_comm);
- HDassert(app_topology_out);
- HDassert(!*app_topology_out);
+ assert(subfiling_config);
+ assert(MPI_COMM_NULL != comm);
+ assert(MPI_COMM_NULL != node_comm);
+ assert(app_topology_out);
+ assert(!*app_topology_out);
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(comm, &comm_rank)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Comm_rank failed", mpi_code);
@@ -990,7 +989,7 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
errno = 0;
ioc_select_val = HDstrtol(env_value, NULL, 0);
if ((ERANGE == errno)) {
- HDprintf("invalid value '%s' for " H5FD_SUBFILING_IOC_PER_NODE "\n", env_value);
+ printf("invalid value '%s' for " H5FD_SUBFILING_IOC_PER_NODE "\n", env_value);
ioc_select_val = 1;
}
@@ -1017,9 +1016,9 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
errno = 0;
ioc_select_val = HDstrtol(ioc_sel_str, NULL, 0);
if ((ERANGE == errno) || (ioc_select_val <= 0)) {
- HDprintf("invalid IOC selection strategy string '%s' for strategy "
- "SELECT_IOC_EVERY_NTH_RANK; defaulting to SELECT_IOC_ONE_PER_NODE\n",
- ioc_sel_str);
+ printf("invalid IOC selection strategy string '%s' for strategy "
+ "SELECT_IOC_EVERY_NTH_RANK; defaulting to SELECT_IOC_ONE_PER_NODE\n",
+ ioc_sel_str);
ioc_select_val = 1;
ioc_selection_type = SELECT_IOC_ONE_PER_NODE;
@@ -1053,9 +1052,9 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
errno = 0;
ioc_select_val = HDstrtol(ioc_sel_str, NULL, 0);
if ((ERANGE == errno) || (ioc_select_val <= 0)) {
- HDprintf("invalid IOC selection strategy string '%s' for strategy SELECT_IOC_TOTAL; "
- "defaulting to SELECT_IOC_ONE_PER_NODE\n",
- ioc_sel_str);
+ printf("invalid IOC selection strategy string '%s' for strategy SELECT_IOC_TOTAL; "
+ "defaulting to SELECT_IOC_ONE_PER_NODE\n",
+ ioc_sel_str);
ioc_select_val = 1;
ioc_selection_type = SELECT_IOC_ONE_PER_NODE;
@@ -1099,7 +1098,7 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
if (find_cached_topology_info(comm, subfiling_config, iocs_per_node, &app_topology) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL,
"can't check for cached subfiling topology object");
- HDassert(!app_topology || (app_topology->selection_type == ioc_selection_type));
+ assert(!app_topology || (app_topology->selection_type == ioc_selection_type));
if (!app_topology) {
/* Generate an ID for the application topology object */
@@ -1122,10 +1121,10 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
if (init_app_layout(app_topology, comm, node_comm) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "couldn't initialize application layout");
- HDassert(app_topology->app_layout);
- HDassert(app_topology->app_layout->layout);
- HDassert(app_topology->app_layout->node_ranks);
- HDassert(app_topology->app_layout->node_count > 0);
+ assert(app_topology->app_layout);
+ assert(app_topology->app_layout->layout);
+ assert(app_topology->app_layout->node_ranks);
+ assert(app_topology->app_layout->node_count > 0);
/*
* Now that the application node count has been determined, adjust the
@@ -1187,8 +1186,8 @@ get_ioc_selection_criteria_from_env(H5FD_subfiling_ioc_select_t *ioc_selection_t
char *env_value = HDgetenv(H5FD_SUBFILING_IOC_SELECTION_CRITERIA);
herr_t ret_value = SUCCEED;
- HDassert(ioc_selection_type);
- HDassert(ioc_sel_info_str);
+ assert(ioc_selection_type);
+ assert(ioc_sel_info_str);
*ioc_sel_info_str = NULL;
@@ -1260,7 +1259,7 @@ find_cached_topology_info(MPI_Comm comm, H5FD_subfiling_params_t *subf_config, l
int32_t stripe_count;
herr_t ret_value = SUCCEED;
- HDassert(subf_config);
+ assert(subf_config);
ioc_selection_type = subf_config->ioc_selection;
stripe_count = subf_config->stripe_count;
@@ -1270,7 +1269,7 @@ find_cached_topology_info(MPI_Comm comm, H5FD_subfiling_params_t *subf_config, l
int result;
int mpi_code;
- HDassert(cached_topology);
+ assert(cached_topology);
/*
* If the selection types differ, just reject the cached topology
@@ -1290,8 +1289,8 @@ find_cached_topology_info(MPI_Comm comm, H5FD_subfiling_params_t *subf_config, l
}
if (cached_topology->selection_type == SELECT_IOC_ONE_PER_NODE) {
- HDassert(iocs_per_node >= 1);
- HDassert(cached_topology->app_layout->node_count > 0);
+ assert(iocs_per_node >= 1);
+ assert(cached_topology->app_layout->node_count > 0);
/*
* If a IOCs-per-node setting was set in the environment and would
@@ -1333,12 +1332,12 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(app_topology);
- HDassert(!app_topology->app_layout);
- HDassert(MPI_COMM_NULL != comm);
- HDassert(MPI_COMM_NULL != node_comm);
+ assert(app_topology);
+ assert(!app_topology->app_layout);
+ assert(MPI_COMM_NULL != comm);
+ assert(MPI_COMM_NULL != node_comm);
- if (NULL == (app_layout = HDcalloc(1, sizeof(*app_layout))))
+ if (NULL == (app_layout = calloc(1, sizeof(*app_layout))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate application layout structure");
@@ -1351,7 +1350,7 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
if (MPI_SUCCESS != (mpi_code = MPI_Comm_size(node_comm, &app_layout->node_local_size)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Comm_size failed", mpi_code);
- if (NULL == (app_layout->layout = HDmalloc((size_t)app_layout->world_size * sizeof(*app_layout->layout))))
+ if (NULL == (app_layout->layout = malloc((size_t)app_layout->world_size * sizeof(*app_layout->layout))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate application layout array");
@@ -1371,10 +1370,10 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
if (app_layout->layout[i].node_local_rank == 0)
app_layout->node_count++;
- HDassert(app_layout->node_count > 0);
+ assert(app_layout->node_count > 0);
if (NULL ==
- (app_layout->node_ranks = HDmalloc((size_t)app_layout->node_count * sizeof(*app_layout->node_ranks))))
+ (app_layout->node_ranks = malloc((size_t)app_layout->node_count * sizeof(*app_layout->node_ranks))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate application layout node rank array");
@@ -1384,7 +1383,7 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
*/
for (size_t i = 0, node_rank_index = 0; i < (size_t)app_layout->world_size; i++) {
if (app_layout->layout[i].node_local_rank == 0) {
- HDassert(node_rank_index < (size_t)app_layout->node_count);
+ assert(node_rank_index < (size_t)app_layout->node_count);
app_layout->node_ranks[node_rank_index++] = app_layout->layout[i].rank;
}
}
@@ -1394,9 +1393,9 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
done:
if (ret_value < 0) {
if (app_layout) {
- HDfree(app_layout->layout);
- HDfree(app_layout->node_ranks);
- HDfree(app_layout);
+ free(app_layout->layout);
+ free(app_layout->node_ranks);
+ free(app_layout);
}
}
@@ -1429,9 +1428,9 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(app_layout);
- HDassert(app_layout->layout);
- HDassert(MPI_COMM_NULL != comm);
+ assert(app_layout);
+ assert(app_layout->layout);
+ assert(MPI_COMM_NULL != comm);
sf_world_rank = app_layout->world_rank;
sf_world_size = app_layout->world_size;
@@ -1482,7 +1481,7 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
#else
int aggr_comm_size = 0;
- HDassert(MPI_COMM_NULL != intra_comm);
+ assert(MPI_COMM_NULL != intra_comm);
/* Split the file communicator into a sub-group of one rank per node */
if (MPI_SUCCESS != (mpi_code = MPI_Comm_split(comm, node_local_rank, sf_world_rank, &aggr_comm)))
@@ -1494,7 +1493,7 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
/* Allocate a partial layout info array to aggregate into from node-local ranks */
if (node_local_rank == 0) {
if (NULL ==
- (layout_info_partial = HDmalloc((size_t)node_local_size * sizeof(*layout_info_partial))))
+ (layout_info_partial = malloc((size_t)node_local_size * sizeof(*layout_info_partial))))
/* Push error, but participate in gather operation */
H5_SUBFILING_DONE_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate layout info array");
@@ -1509,10 +1508,10 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
if (node_local_rank == 0) {
int send_size = 4 * node_local_size;
- if (NULL == (recv_counts = HDmalloc((size_t)aggr_comm_size * sizeof(*recv_counts))))
+ if (NULL == (recv_counts = malloc((size_t)aggr_comm_size * sizeof(*recv_counts))))
H5_SUBFILING_DONE_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate receive counts array");
- if (NULL == (recv_displs = HDmalloc((size_t)aggr_comm_size * sizeof(*recv_displs))))
+ if (NULL == (recv_displs = malloc((size_t)aggr_comm_size * sizeof(*recv_displs))))
H5_SUBFILING_DONE_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate receive displacements array");
@@ -1529,8 +1528,8 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
recv_counts, recv_displs, MPI_INT, aggr_comm)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Allgatherv failed", mpi_code);
- HDfree(recv_displs);
- HDfree(recv_counts);
+ free(recv_displs);
+ free(recv_counts);
recv_displs = NULL;
recv_counts = NULL;
}
@@ -1546,9 +1545,9 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
}
done:
- HDfree(recv_displs);
- HDfree(recv_counts);
- HDfree(layout_info_partial);
+ free(recv_displs);
+ free(recv_counts);
+ free(layout_info_partial);
if (H5_mpi_comm_free(&aggr_comm) < 0)
H5_SUBFILING_DONE_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "can't free MPI communicator");
@@ -1613,19 +1612,19 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
int max_iocs = 0;
herr_t ret_value = SUCCEED;
- HDassert(app_topology);
- HDassert(!app_topology->io_concentrators);
- HDassert(app_topology->n_io_concentrators > 0);
- HDassert(app_topology->app_layout);
- HDassert(app_topology->app_layout->layout);
- HDassert(app_topology->app_layout->node_count > 0);
+ assert(app_topology);
+ assert(!app_topology->io_concentrators);
+ assert(app_topology->n_io_concentrators > 0);
+ assert(app_topology->app_layout);
+ assert(app_topology->app_layout->layout);
+ assert(app_topology->app_layout->node_count > 0);
app_layout = app_topology->app_layout;
max_iocs = app_topology->n_io_concentrators;
- if (NULL == (app_topology->io_concentrators =
- HDmalloc((size_t)max_iocs * sizeof(*app_topology->io_concentrators))))
+ if (NULL ==
+ (app_topology->io_concentrators = malloc((size_t)max_iocs * sizeof(*app_topology->io_concentrators))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate array of I/O concentrator ranks");
@@ -1639,13 +1638,13 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
if (app_topology->n_io_concentrators > app_layout->node_count)
iocs_per_node = app_topology->n_io_concentrators / app_layout->node_count;
- HDassert(app_layout->node_ranks);
+ assert(app_layout->node_ranks);
for (size_t i = 0; i < (size_t)app_layout->node_count; i++) {
int node_index = app_layout->node_ranks[i];
int local_size = app_layout->layout[node_index].node_local_size;
- HDassert(total_ioc_count < app_topology->n_io_concentrators);
+ assert(total_ioc_count < app_topology->n_io_concentrators);
io_concentrators[total_ioc_count] = app_layout->layout[node_index++].rank;
if (app_layout->world_rank == io_concentrators[total_ioc_count]) {
@@ -1661,7 +1660,7 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
if (j >= (size_t)local_size)
break;
- HDassert(total_ioc_count < app_topology->n_io_concentrators);
+ assert(total_ioc_count < app_topology->n_io_concentrators);
io_concentrators[total_ioc_count] = app_layout->layout[node_index++].rank;
if (app_layout->world_rank == io_concentrators[total_ioc_count]) {
@@ -1687,7 +1686,7 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
int num_iocs_assigned = 0;
int world_size = app_layout->world_size;
- HDassert(rank_stride > 0);
+ assert(rank_stride > 0);
for (int i = 0; num_iocs_assigned < max_iocs; num_iocs_assigned++) {
int ioc_index = rank_stride * i++;
@@ -1721,7 +1720,7 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
done:
if (ret_value < 0) {
if (app_topology)
- HDfree(app_topology->io_concentrators);
+ free(app_topology->io_concentrators);
}
H5_SUBFILING_FUNC_LEAVE;
@@ -1751,15 +1750,15 @@ init_subfiling_context(subfiling_context_t *sf_context, const char *base_filenam
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(sf_context->topology == NULL);
- HDassert(sf_context->sf_context_id >= 0);
- HDassert(base_filename);
- HDassert(file_id != UINT64_MAX);
- HDassert(subfiling_config);
- HDassert(app_topology);
- HDassert(app_topology->n_io_concentrators > 0);
- HDassert(MPI_COMM_NULL != file_comm);
+ assert(sf_context);
+ assert(sf_context->topology == NULL);
+ assert(sf_context->sf_context_id >= 0);
+ assert(base_filename);
+ assert(file_id != UINT64_MAX);
+ assert(subfiling_config);
+ assert(app_topology);
+ assert(app_topology->n_io_concentrators > 0);
+ assert(MPI_COMM_NULL != file_comm);
sf_context->h5_file_id = file_id;
sf_context->sf_fids = NULL;
@@ -1835,7 +1834,7 @@ init_subfiling_context(subfiling_context_t *sf_context, const char *base_filenam
sf_context->sf_num_fids++;
if (NULL ==
- (sf_context->sf_fids = HDmalloc((size_t)sf_context->sf_num_fids * sizeof(*sf_context->sf_fids))))
+ (sf_context->sf_fids = malloc((size_t)sf_context->sf_num_fids * sizeof(*sf_context->sf_fids))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate subfile IDs array");
for (int i = 0; i < sf_context->sf_num_fids; i++)
@@ -1890,7 +1889,7 @@ init_subfiling_context(subfiling_context_t *sf_context, const char *base_filenam
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid subfiling stripe count (%d)",
sf_context->sf_num_subfiles);
- HDassert(sf_context->sf_num_subfiles >= app_topology->n_io_concentrators);
+ assert(sf_context->sf_num_subfiles >= app_topology->n_io_concentrators);
done:
H5_SUBFILING_FUNC_LEAVE;
@@ -1934,8 +1933,8 @@ open_subfile_with_context(subfiling_context_t *sf_context, int file_acc_flags)
{
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(sf_context->h5_file_id != UINT64_MAX);
+ assert(sf_context);
+ assert(sf_context->h5_file_id != UINT64_MAX);
/*
* Save the HDF5 file ID (e.g., inode) to subfile context mapping.
@@ -1998,8 +1997,7 @@ record_fid_to_subfile(uint64_t file_id, int64_t subfile_context_id, int *next_in
herr_t ret_value = SUCCEED;
if (!sf_open_file_map) {
- if (NULL ==
- (sf_open_file_map = HDmalloc((size_t)DEFAULT_FILE_MAP_ENTRIES * sizeof(*sf_open_file_map))))
+ if (NULL == (sf_open_file_map = malloc((size_t)DEFAULT_FILE_MAP_ENTRIES * sizeof(*sf_open_file_map))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate open file mapping");
sf_file_map_size = DEFAULT_FILE_MAP_ENTRIES;
@@ -2028,8 +2026,8 @@ record_fid_to_subfile(uint64_t file_id, int64_t subfile_context_id, int *next_in
if (index == sf_file_map_size) {
void *tmp_realloc;
- if (NULL == (tmp_realloc = HDrealloc(sf_open_file_map,
- ((size_t)(sf_file_map_size * 2) * sizeof(*sf_open_file_map)))))
+ if (NULL == (tmp_realloc = realloc(sf_open_file_map,
+ ((size_t)(sf_file_map_size * 2) * sizeof(*sf_open_file_map)))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't reallocate open file mapping");
@@ -2133,13 +2131,13 @@ ioc_open_files(int64_t file_context_id, int file_acc_flags)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL,
"couldn't get subfiling object from context ID");
- HDassert(sf_context->h5_file_id != UINT64_MAX);
- HDassert(sf_context->h5_filename);
- HDassert(sf_context->sf_fids);
- HDassert(sf_context->sf_num_subfiles > 0);
- HDassert(sf_context->sf_num_fids > 0);
- HDassert(sf_context->topology);
- HDassert(sf_context->topology->ioc_idx >= 0); /* Only IOC ranks should be here */
+ assert(sf_context->h5_file_id != UINT64_MAX);
+ assert(sf_context->h5_filename);
+ assert(sf_context->sf_fids);
+ assert(sf_context->sf_num_subfiles > 0);
+ assert(sf_context->sf_num_fids > 0);
+ assert(sf_context->topology);
+ assert(sf_context->topology->ioc_idx >= 0); /* Only IOC ranks should be here */
/* Get the basename of the full HDF5 filename */
if (H5_basename(sf_context->h5_filename, &base) < 0)
@@ -2160,7 +2158,7 @@ ioc_open_files(int64_t file_context_id, int file_acc_flags)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't get HDF5 file dirname");
}
- if (NULL == (filepath = HDmalloc(PATH_MAX)))
+ if (NULL == (filepath = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for subfile filename");
@@ -2233,7 +2231,7 @@ done:
H5MM_free(base);
H5MM_free(subfile_dir);
- HDfree(filepath);
+ free(filepath);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -2266,10 +2264,10 @@ create_config_file(subfiling_context_t *sf_context, const char *base_filename, c
int ret = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(base_filename);
- HDassert(config_dir);
- HDassert(subfile_dir);
+ assert(sf_context);
+ assert(base_filename);
+ assert(config_dir);
+ assert(subfile_dir);
if (sf_context->h5_file_id == UINT64_MAX)
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "invalid HDF5 file ID %" PRIu64,
@@ -2282,7 +2280,7 @@ create_config_file(subfiling_context_t *sf_context, const char *base_filename, c
if (*subfile_dir == '\0')
subfile_dir = ".";
- if (NULL == (config_filename = HDmalloc(PATH_MAX)))
+ if (NULL == (config_filename = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for subfiling configuration filename");
@@ -2309,11 +2307,11 @@ create_config_file(subfiling_context_t *sf_context, const char *base_filename, c
int n_subfiles = sf_context->sf_num_subfiles;
int num_digits;
- if (NULL == (config_file = HDfopen(config_filename, "w+")))
+ if (NULL == (config_file = fopen(config_filename, "w+")))
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL,
"couldn't create/truncate subfiling configuration file");
- if (NULL == (line_buf = HDmalloc(PATH_MAX)))
+ if (NULL == (line_buf = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate buffer for writing to subfiling configuration file");
@@ -2366,8 +2364,8 @@ done:
"couldn't close subfiling configuration file");
}
- HDfree(line_buf);
- HDfree(config_filename);
+ free(line_buf);
+ free(config_filename);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -2396,11 +2394,11 @@ open_config_file(const char *base_filename, const char *config_dir, uint64_t fil
int ret = 0;
herr_t ret_value = SUCCEED;
- HDassert(base_filename);
- HDassert(config_dir);
- HDassert(file_id != UINT64_MAX);
- HDassert(mode);
- HDassert(config_file_out);
+ assert(base_filename);
+ assert(config_dir);
+ assert(file_id != UINT64_MAX);
+ assert(mode);
+ assert(config_file_out);
*config_file_out = NULL;
@@ -2410,7 +2408,7 @@ open_config_file(const char *base_filename, const char *config_dir, uint64_t fil
if (*config_dir == '\0')
config_dir = ".";
- if (NULL == (config_filename = HDmalloc(PATH_MAX)))
+ if (NULL == (config_filename = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for subfiling configuration filename");
@@ -2430,7 +2428,7 @@ open_config_file(const char *base_filename, const char *config_dir, uint64_t fil
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL,
"couldn't check existence of subfiling configuration file");
- if (NULL == (config_file = HDfopen(config_filename, mode)))
+ if (NULL == (config_file = fopen(config_filename, mode)))
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL,
"couldn't open subfiling configuration file");
@@ -2443,7 +2441,7 @@ done:
"couldn't close subfiling configuration file");
}
- HDfree(config_filename);
+ free(config_filename);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -2468,7 +2466,7 @@ H5_get_subfiling_config_from_file(FILE *config_file, int64_t *stripe_size, int64
long config_file_len = 0;
herr_t ret_value = SUCCEED;
- HDassert(config_file);
+ assert(config_file);
if (HDfseek(config_file, 0, SEEK_END) < 0)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_SEEKERROR, FAIL,
@@ -2482,7 +2480,7 @@ H5_get_subfiling_config_from_file(FILE *config_file, int64_t *stripe_size, int64
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_SEEKERROR, FAIL,
"couldn't seek to beginning of subfiling configuration file");
- if (NULL == (config_buf = HDmalloc((size_t)config_file_len + 1)))
+ if (NULL == (config_buf = malloc((size_t)config_file_len + 1)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for reading from subfiling configuration file");
@@ -2528,7 +2526,7 @@ H5_get_subfiling_config_from_file(FILE *config_file, int64_t *stripe_size, int64
}
done:
- HDfree(config_buf);
+ free(config_buf);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -2542,7 +2540,7 @@ done:
* between MPI ranks.
*
* The resolved filepath returned through `resolved_filepath`
- * must be freed by the caller with HDfree.
+ * must be freed by the caller with free.
*
* Return Non-negative on success/Negative on failure
*
@@ -2563,8 +2561,8 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(filepath);
- HDassert(resolved_filepath);
+ assert(filepath);
+ assert(resolved_filepath);
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(comm, &mpi_rank)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Comm_rank failed", mpi_code);
@@ -2579,12 +2577,12 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
/* If filepath is just the filename, set up path using CWD */
if (!HDstrcmp(file_dirname, ".")) {
- if (NULL == (resolved_path = HDmalloc(PATH_MAX)))
+ if (NULL == (resolved_path = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate buffer for filepath");
if (H5_basename(filepath, &file_basename) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't get file basename");
- if (NULL == (cwd = HDmalloc(PATH_MAX)))
+ if (NULL == (cwd = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate buffer for CWD");
@@ -2626,7 +2624,7 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "couldn't resolve filepath");
if (mpi_rank != 0) {
- if (NULL == (resolved_path = HDmalloc(path_len)))
+ if (NULL == (resolved_path = malloc(path_len)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate file name buffer");
}
@@ -2641,7 +2639,7 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
*resolved_filepath = resolved_path;
done:
- HDfree(cwd);
+ free(cwd);
H5MM_free(file_basename);
H5MM_free(file_dirname);
@@ -2656,7 +2654,7 @@ done:
H5_SUBFILING_MPI_DONE_ERROR(FAIL, "MPI_Bcast failed", mpi_code);
}
- HDfree(resolved_path);
+ free(resolved_path);
}
H5_SUBFILING_FUNC_LEAVE;
@@ -3086,7 +3084,7 @@ H5_subfiling_terminate(void)
sf_context_cache_size = 0;
sf_context_cache_num_entries = 0;
- HDfree(sf_context_cache);
+ free(sf_context_cache);
sf_context_cache = NULL;
}
if (sf_topology_cache) {
@@ -3100,13 +3098,13 @@ H5_subfiling_terminate(void)
sf_topology_cache_size = 0;
sf_topology_cache_num_entries = 0;
- HDfree(sf_topology_cache);
+ free(sf_topology_cache);
sf_topology_cache = NULL;
}
/* Clean up the file ID to context object mapping */
sf_file_map_size = 0;
- HDfree(sf_open_file_map);
+ free(sf_open_file_map);
sf_open_file_map = NULL;
done:
@@ -3124,7 +3122,7 @@ H5_subfiling_log(int64_t sf_context_id, const char *fmt, ...)
/* Retrieve the subfiling object for the newly-created context ID */
if (NULL == (sf_context = H5_get_subfiling_object(sf_context_id))) {
- HDprintf("%s: couldn't get subfiling object from context ID\n", __func__);
+ printf("%s: couldn't get subfiling object from context ID\n", __func__);
goto done;
}
@@ -3133,12 +3131,12 @@ H5_subfiling_log(int64_t sf_context_id, const char *fmt, ...)
if (sf_context->sf_logfile) {
HDvfprintf(sf_context->sf_logfile, fmt, log_args);
HDfputs("\n", sf_context->sf_logfile);
- HDfflush(sf_context->sf_logfile);
+ fflush(sf_context->sf_logfile);
}
else {
HDvprintf(fmt, log_args);
HDputs("");
- HDfflush(stdout);
+ fflush(stdout);
}
H5FD_ioc_end_thread_exclusive();
diff --git a/src/H5FL.c b/src/H5FL.c
index 9cc8dd2..1e4bdd5 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -198,9 +198,9 @@ H5FL_term_package(void)
/* Dump information about all the outstanding allocations */
while (trk != NULL) {
/* Print information about the outstanding block */
- HDfprintf(stderr, "%s: Outstanding allocation:\n", __func__);
- HDfprintf(stderr, "\tPtr: %p, File: %s, Function: %s, Line: %d\n",
- (((unsigned char *)trk) + sizeof(H5FL_track_t)), trk->file, trk->func, trk->line);
+ fprintf(stderr, "%s: Outstanding allocation:\n", __func__);
+ fprintf(stderr, "\tPtr: %p, File: %s, Function: %s, Line: %d\n",
+ (((unsigned char *)trk) + sizeof(H5FL_track_t)), trk->file, trk->func, trk->line);
H5CS_print_stack(trk->stack, stderr);
/* Advance to next node */
@@ -319,8 +319,8 @@ H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
- HDassert(obj);
+ assert(head);
+ assert(obj);
#ifdef H5FL_TRACK
{
@@ -349,11 +349,11 @@ H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
#endif /* H5FL_TRACK */
#ifdef H5FL_DEBUG
- HDmemset(obj, 255, head->size);
+ memset(obj, 255, head->size);
#endif /* H5FL_DEBUG */
/* Make certain that the free list is initialized */
- HDassert(head->init);
+ assert(head->init);
/* Link into the free list */
((H5FL_reg_node_t *)obj)->next = head->list;
@@ -403,7 +403,7 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* Make certain the list is initialized first */
if (!head->init)
@@ -436,7 +436,7 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
#ifdef H5FL_TRACK
/* Copy allocation location information */
((H5FL_track_t *)ret_value)->stack = H5CS_copy_stack();
- HDassert(((H5FL_track_t *)ret_value)->stack);
+ assert(((H5FL_track_t *)ret_value)->stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -480,7 +480,7 @@ H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* Allocate the block */
if (NULL == (ret_value = H5FL_reg_malloc(head H5FL_TRACK_INFO_INT)))
@@ -488,7 +488,7 @@ H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
/* Clear to zeros */
/* (Accommodate tracking information, if present) */
- HDmemset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
+ memset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -575,7 +575,7 @@ H5FL__reg_gc(void)
} /* end while */
/* Double check that all the memory on the free lists is recycled */
- HDassert(H5FL_reg_gc_head.mem_freed == 0);
+ assert(H5FL_reg_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -622,8 +622,8 @@ H5FL__reg_term(void)
tmp = H5FL_reg_gc_head.first->next;
#ifdef H5FL_DEBUG
- HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_reg_gc_head.first->list->name,
- (int)H5FL_reg_gc_head.first->list->allocated);
+ printf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_reg_gc_head.first->list->name,
+ (int)H5FL_reg_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
if (H5FL_reg_gc_head.first->list->allocated > 0) {
@@ -814,7 +814,7 @@ H5FL_blk_free_block_avail(H5FL_blk_head_t *head, size_t size)
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* check if there is a free list for blocks of this size */
/* and if there are any blocks available on the list */
@@ -852,8 +852,8 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(size);
+ assert(head);
+ assert(size);
/* Make certain the list is initialized first */
if (!head->init)
@@ -881,7 +881,7 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
if (NULL == free_list)
/* Create a new list node and insert it to the queue */
free_list = H5FL__blk_create_list(&(head->head), size);
- HDassert(free_list);
+ assert(free_list);
/* Allocate new node, with room for the page info header and the actual page data */
if (NULL ==
@@ -904,7 +904,7 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
#ifdef H5FL_TRACK
/* Copy allocation location information */
((H5FL_track_t *)ret_value)->stack = H5CS_copy_stack();
- HDassert(((H5FL_track_t *)ret_value)->stack);
+ assert(((H5FL_track_t *)ret_value)->stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -952,15 +952,15 @@ H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(size);
+ assert(head);
+ assert(size);
/* Allocate the block */
if (NULL == (ret_value = H5FL_blk_malloc(head, size H5FL_TRACK_INFO_INT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear the block to zeros */
- HDmemset(ret_value, 0, size);
+ memset(ret_value, 0, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -995,15 +995,15 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
- HDassert(block);
+ assert(head);
+ assert(block);
#ifdef H5FL_TRACK
{
unsigned char *block_ptr = ((unsigned char *)block) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Free tracking information about the allocation location */
H5CS_close_stack(trk.stack);
@@ -1025,7 +1025,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
trk.next->prev = trk.prev;
} /* end else */
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif /* H5FL_TRACK */
@@ -1039,7 +1039,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
free_size = temp->size;
#ifdef H5FL_DEBUG
- HDmemset(temp, 255, free_size + sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE);
+ memset(temp, 255, free_size + sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE);
#endif /* H5FL_DEBUG */
/* Check if there is a free list for native blocks of this size */
@@ -1099,8 +1099,8 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(new_size);
+ assert(head);
+ assert(new_size);
/* Check if we are actually re-allocating a block */
if (block != NULL) {
@@ -1128,7 +1128,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
unsigned char *block_ptr = ((unsigned char *)block) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Release previous tracking information */
H5CS_close_stack(trk.stack);
@@ -1140,7 +1140,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
/* Store new tracking information */
trk.stack = H5CS_copy_stack();
- HDassert(trk.stack);
+ assert(trk.stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -1148,7 +1148,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
trk.func = call_func;
trk.line = call_line;
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif /* H5FL_TRACK */
ret_value = block;
@@ -1189,7 +1189,7 @@ H5FL__blk_gc_list(H5FL_blk_head_t *head)
H5FL_blk_list_t *list; /* The free list of native nodes of a particular size */
/* Sanity check */
- HDassert((blk_head->onlist && blk_head->list) || (0 == blk_head->onlist && NULL == blk_head->list));
+ assert((blk_head->onlist && blk_head->list) || (0 == blk_head->onlist && NULL == blk_head->list));
/* Loop through all the blocks in the free list, freeing them */
list = blk_head->list;
@@ -1245,7 +1245,7 @@ H5FL__blk_gc_list(H5FL_blk_head_t *head)
head->onlist = 0;
/* Double check that all the memory on this list is recycled */
- HDassert(0 == head->list_mem);
+ assert(0 == head->list_mem);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FL__blk_gc_list() */
@@ -1283,7 +1283,7 @@ H5FL__blk_gc(void)
} /* end while */
/* Double check that all the memory on the free lists are recycled */
- HDassert(H5FL_blk_gc_head.mem_freed == 0);
+ assert(H5FL_blk_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1323,8 +1323,8 @@ H5FL__blk_term(void)
tmp = H5FL_blk_gc_head.first->next;
#ifdef H5FL_DEBUG
- HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_blk_gc_head.first->pq->name,
- (int)H5FL_blk_gc_head.first->pq->allocated);
+ printf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_blk_gc_head.first->pq->name,
+ (int)H5FL_blk_gc_head.first->pq->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
@@ -1431,17 +1431,17 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
HGOTO_DONE(NULL)
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* Make certain that the free list is initialized */
- HDassert(head->init);
+ assert(head->init);
#ifdef H5FL_TRACK
{
unsigned char *block_ptr = ((unsigned char *)obj) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Free tracking information about the allocation location */
H5CS_close_stack(trk.stack);
@@ -1463,7 +1463,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
trk.next->prev = trk.prev;
} /* end else */
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif
@@ -1477,7 +1477,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
free_nelem = temp->nelem;
/* Double-check that there is enough room for arrays of this size */
- HDassert((int)free_nelem <= head->maxelem);
+ assert((int)free_nelem <= head->maxelem);
/* Link into the free list */
temp->next = head->list_arr[free_nelem].list;
@@ -1533,8 +1533,8 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(elem);
+ assert(head);
+ assert(elem);
/* Make certain the list is initialized first */
if (!head->init)
@@ -1542,7 +1542,7 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'array' blocks")
/* Sanity check that the number of elements is supported */
- HDassert(elem <= (unsigned)head->maxelem);
+ assert(elem <= (unsigned)head->maxelem);
/* Get the set of the memory block */
mem_size = head->list_arr[elem].size;
@@ -1585,7 +1585,7 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS)
#ifdef H5FL_TRACK
/* Copy allocation location information */
((H5FL_track_t *)ret_value)->stack = H5CS_copy_stack();
- HDassert(((H5FL_track_t *)ret_value)->stack);
+ assert(((H5FL_track_t *)ret_value)->stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -1629,15 +1629,15 @@ H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(elem);
+ assert(head);
+ assert(elem);
/* Allocate the array */
if (NULL == (ret_value = H5FL_arr_malloc(head, elem H5FL_TRACK_INFO_INT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear to zeros */
- HDmemset(ret_value, 0, head->list_arr[elem].size);
+ memset(ret_value, 0, head->list_arr[elem].size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1664,8 +1664,8 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(new_elem);
+ assert(head);
+ assert(new_elem);
/* Check if we are really allocating the object */
if (obj == NULL)
@@ -1674,7 +1674,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
H5FL_arr_list_t *temp; /* Temp. ptr to the new free list node allocated */
/* Sanity check that the number of elements is supported */
- HDassert((int)new_elem <= head->maxelem);
+ assert((int)new_elem <= head->maxelem);
/* Get the pointer to the info header in front of the block to free */
temp = (H5FL_arr_list_t *)((
@@ -1701,7 +1701,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
unsigned char *block_ptr = ((unsigned char *)obj) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Release previous tracking information */
H5CS_close_stack(trk.stack);
@@ -1713,7 +1713,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
/* Store new tracking information */
trk.stack = H5CS_copy_stack();
- HDassert(trk.stack);
+ assert(trk.stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -1721,7 +1721,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
trk.func = call_func;
trk.line = call_line;
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
#endif
ret_value = obj;
}
@@ -1787,7 +1787,7 @@ H5FL__arr_gc_list(H5FL_arr_head_t *head)
} /* end for */
/* Double check that all the memory on this list is recycled */
- HDassert(head->list_mem == 0);
+ assert(head->list_mem == 0);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FL__arr_gc_list() */
@@ -1825,7 +1825,7 @@ H5FL__arr_gc(void)
} /* end while */
/* Double check that all the memory on the free lists are recycled */
- HDassert(H5FL_arr_gc_head.mem_freed == 0);
+ assert(H5FL_arr_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1866,8 +1866,8 @@ H5FL__arr_term(void)
/* Check if the list has allocations outstanding */
#ifdef H5FL_DEBUG
- HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_arr_gc_head.first->list->name,
- (int)H5FL_arr_gc_head.first->list->allocated);
+ printf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_arr_gc_head.first->list->name,
+ (int)H5FL_arr_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
if (H5FL_arr_gc_head.first->list->allocated > 0) {
/* Add free list to the list of nodes with allocations open still */
@@ -1916,11 +1916,11 @@ H5FL_seq_free(H5FL_seq_head_t *head, void *obj)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(obj);
+ assert(head);
+ assert(obj);
/* Make certain that the free list is initialized */
- HDassert(head->queue.init);
+ assert(head->queue.init);
/* Use block routine */
H5FL_blk_free(&(head->queue), obj);
@@ -1949,8 +1949,8 @@ H5FL_seq_malloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(elem);
+ assert(head);
+ assert(elem);
/* Use block routine */
ret_value = H5FL_blk_malloc(&(head->queue), head->size * elem H5FL_TRACK_INFO_INT);
@@ -1979,8 +1979,8 @@ H5FL_seq_calloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(elem);
+ assert(head);
+ assert(elem);
/* Use block routine */
ret_value = H5FL_blk_calloc(&(head->queue), head->size * elem H5FL_TRACK_INFO_INT);
@@ -2009,8 +2009,8 @@ H5FL_seq_realloc(H5FL_seq_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(new_elem);
+ assert(head);
+ assert(new_elem);
/* Use block routine */
ret_value = H5FL_blk_realloc(&(head->queue), obj, head->size * new_elem H5FL_TRACK_INFO_INT);
@@ -2041,7 +2041,7 @@ H5FL_fac_init(size_t size)
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(size > 0);
+ assert(size > 0);
/* Allocate room for the new factory */
if (NULL == (factory = (H5FL_fac_head_t *)H5FL_CALLOC(H5FL_fac_head_t)))
@@ -2111,8 +2111,8 @@ H5FL_fac_free(H5FL_fac_head_t *head, void *obj)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
- HDassert(obj);
+ assert(head);
+ assert(obj);
#ifdef H5FL_TRACK
{
@@ -2141,11 +2141,11 @@ H5FL_fac_free(H5FL_fac_head_t *head, void *obj)
#endif /* H5FL_TRACK */
#ifdef H5FL_DEBUG
- HDmemset(obj, 255, head->size);
+ memset(obj, 255, head->size);
#endif /* H5FL_DEBUG */
/* Make certain that the free list is initialized */
- HDassert(head->init);
+ assert(head->init);
/* Link into the free list */
((H5FL_fac_node_t *)obj)->next = head->list;
@@ -2196,8 +2196,8 @@ H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
- HDassert(head->init);
+ assert(head);
+ assert(head->init);
/* Check for nodes available on the free list first */
if (head->list != NULL) {
@@ -2225,7 +2225,7 @@ H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
#ifdef H5FL_TRACK
/* Copy allocation location information */
((H5FL_track_t *)ret_value)->stack = H5CS_copy_stack();
- HDassert(((H5FL_track_t *)ret_value)->stack);
+ assert(((H5FL_track_t *)ret_value)->stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -2270,7 +2270,7 @@ H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* Allocate the block */
if (NULL == (ret_value = H5FL_fac_malloc(head H5FL_TRACK_INFO_INT)))
@@ -2278,7 +2278,7 @@ H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
/* Clear to zeros */
/* (Accommodate tracking information, if present) */
- HDmemset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
+ memset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2365,7 +2365,7 @@ H5FL__fac_gc(void)
} /* end while */
/* Double check that all the memory on the free lists is recycled */
- HDassert(H5FL_fac_gc_head.mem_freed == 0);
+ assert(H5FL_fac_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2394,7 +2394,7 @@ H5FL_fac_term(H5FL_fac_head_t *factory)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(factory);
+ assert(factory);
/* Garbage collect all the blocks in the factory's free list */
if (H5FL__fac_gc_list(factory) < 0)
@@ -2409,7 +2409,7 @@ H5FL_fac_term(H5FL_fac_head_t *factory)
H5FL_fac_gc_node_t *last =
factory->prev_gc; /* Garbage collection node before the one being removed */
- HDassert(last->next->list == factory);
+ assert(last->next->list == factory);
tmp = last->next->next;
last->next = H5FL_FREE(H5FL_fac_gc_node_t, last->next);
last->next = tmp;
@@ -2417,7 +2417,7 @@ H5FL_fac_term(H5FL_fac_head_t *factory)
tmp->list->prev_gc = last;
}
else {
- HDassert(H5FL_fac_gc_head.first->list == factory);
+ assert(H5FL_fac_gc_head.first->list == factory);
tmp = H5FL_fac_gc_head.first->next;
H5FL_fac_gc_head.first = H5FL_FREE(H5FL_fac_gc_node_t, H5FL_fac_gc_head.first);
H5FL_fac_gc_head.first = tmp;
@@ -2457,12 +2457,12 @@ H5FL__fac_term_all(void)
tmp = H5FL_fac_gc_head.first->next;
#ifdef H5FL_DEBUG
- HDprintf("%s: head->size = %d, head->allocated = %d\n", __func__,
- (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated);
+ printf("%s: head->size = %d, head->allocated = %d\n", __func__,
+ (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* The list cannot have any allocations outstanding */
- HDassert(H5FL_fac_gc_head.first->list->allocated == 0);
+ assert(H5FL_fac_gc_head.first->list->allocated == 0);
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
H5FL_fac_gc_head.first->list->init = FALSE;
@@ -2610,7 +2610,7 @@ H5FL_get_free_list_sizes(size_t *reg_size, size_t *arr_size, size_t *blk_size, s
H5FL_reg_head_t *reg_list = gc_node->list; /* Head of list */
/* Sanity check */
- HDassert(reg_list->init);
+ assert(reg_list->init);
/* Add the amount of memory for this list */
*reg_size += (reg_list->size * reg_list->allocated);
@@ -2631,7 +2631,7 @@ H5FL_get_free_list_sizes(size_t *reg_size, size_t *arr_size, size_t *blk_size, s
H5FL_arr_head_t *head = gc_arr_node->list; /* Head of array list elements */
/* Sanity check */
- HDassert(head->init);
+ assert(head->init);
/* Check for any allocated elements in this list */
if (head->allocated > 0) {
diff --git a/src/H5FO.c b/src/H5FO.c
index 72903c1..323797c 100644
--- a/src/H5FO.c
+++ b/src/H5FO.c
@@ -73,8 +73,8 @@ H5FO_create(const H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Create container used to store open object info */
if ((f->shared->open_objs = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
@@ -113,15 +113,15 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr))) {
ret_value = open_obj->obj;
- HDassert(ret_value != NULL);
+ assert(ret_value != NULL);
} /* end if */
else
ret_value = NULL;
@@ -159,11 +159,11 @@ H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
- HDassert(obj);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
+ assert(obj);
/* Allocate new opened object information structure */
if ((open_obj = H5FL_MALLOC(H5FO_open_obj_t)) == NULL)
@@ -210,10 +210,10 @@ H5FO_delete(H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
/* Remove from container */
if (NULL == (open_obj = (H5FO_open_obj_t *)H5SL_remove(f->shared->open_objs, &addr)))
@@ -260,10 +260,10 @@ H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr)))
@@ -303,10 +303,10 @@ H5FO_marked(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr)))
@@ -341,9 +341,9 @@ H5FO_dest(const H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
/* Check if the object info set is empty */
if (H5SL_count(f->shared->open_objs) != 0)
@@ -385,7 +385,7 @@ H5FO_top_create(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Create container used to store open object info */
if ((f->obj_count = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
@@ -423,9 +423,9 @@ H5FO_top_incr(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->obj_count);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->obj_count);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr))) {
@@ -477,9 +477,9 @@ H5FO_top_decr(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->obj_count);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->obj_count);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr))) {
@@ -530,9 +530,9 @@ H5FO_top_count(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->obj_count);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->obj_count);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr)))
@@ -569,8 +569,8 @@ H5FO_top_dest(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->obj_count);
+ assert(f);
+ assert(f->obj_count);
/* Check if the object count set is empty */
if (H5SL_count(f->obj_count) != 0)
diff --git a/src/H5FS.c b/src/H5FS.c
index 161532b..349ce64 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -96,14 +96,14 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t
FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", __func__, nclasses);
+ fprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", __func__, nclasses);
#endif /* H5FS_DEBUG */
/* Check arguments. */
- HDassert(fs_create->shrink_percent);
- HDassert(fs_create->shrink_percent < fs_create->expand_percent);
- HDassert(fs_create->max_sect_size);
- HDassert(nclasses == 0 || classes);
+ assert(fs_create->shrink_percent);
+ assert(fs_create->shrink_percent < fs_create->expand_percent);
+ assert(fs_create->max_sect_size);
+ assert(nclasses == 0 || classes);
/*
* Allocate free space structure
@@ -142,8 +142,8 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t
/* Set the return value */
ret_value = fspace;
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %" PRIuHADDR "\n", __func__, (void *)fspace,
- fspace->addr);
+ fprintf(stderr, "%s: fspace = %p, fspace->addr = %" PRIuHADDR "\n", __func__, (void *)fspace,
+ fspace->addr);
#endif /* H5FS_DEBUG */
done:
@@ -152,7 +152,7 @@ done:
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header")
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %p\n", __func__, (void *)ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %p\n", __func__, (void *)ret_value);
#endif /* H5FS_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_create() */
@@ -180,14 +180,14 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class
FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %" PRIuHADDR ", nclasses = %Zu\n", __func__,
- fs_addr, nclasses);
+ fprintf(stderr, "%s: Opening free space manager, fs_addr = %" PRIuHADDR ", nclasses = %Zu\n", __func__,
+ fs_addr, nclasses);
#endif /* H5FS_DEBUG */
/* Check arguments. */
- HDassert(H5F_addr_defined(fs_addr));
- HDassert(nclasses);
- HDassert(classes);
+ assert(H5F_addr_defined(fs_addr));
+ assert(nclasses);
+ assert(classes);
/* Initialize user data for protecting the free space manager */
cache_udata.f = f;
@@ -201,15 +201,15 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class
(fspace = (H5FS_t *)H5AC_protect(f, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space header")
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr);
- HDfprintf(stderr, "%s: fspace->sect_size = %" PRIuHSIZE "\n", __func__, fspace->sect_size);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE "\n", __func__, fspace->alloc_sect_size);
- HDfprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, (void *)fspace->sinfo);
- HDfprintf(stderr, "%s: fspace->rc = %u\n", __func__, fspace->rc);
+ fprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr);
+ fprintf(stderr, "%s: fspace->sect_size = %" PRIuHSIZE "\n", __func__, fspace->sect_size);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE "\n", __func__, fspace->alloc_sect_size);
+ fprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, (void *)fspace->sinfo);
+ fprintf(stderr, "%s: fspace->rc = %u\n", __func__, fspace->rc);
#endif /* H5FS_DEBUG */
/* Increment the reference count on the free space manager header */
- HDassert(fspace->rc <= 1);
+ assert(fspace->rc <= 1);
if (H5FS__incr(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINC, NULL, "unable to increment ref. count on free space header")
@@ -248,12 +248,12 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %" PRIuHADDR "\n", __func__, fs_addr);
+ fprintf(stderr, "%s: Deleting free space manager, fs_addr = %" PRIuHADDR "\n", __func__, fs_addr);
#endif /* H5FS_DEBUG */
/* Check arguments. */
- HDassert(f);
- HDassert(H5F_addr_defined(fs_addr));
+ assert(f);
+ assert(H5F_addr_defined(fs_addr));
/* Initialize user data for protecting the free space manager */
/* (no class information necessary for delete) */
@@ -268,43 +268,43 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
unsigned fspace_status = 0; /* Free space section info's status in the metadata cache */
/* Sanity check */
- HDassert(H5F_addr_defined(fs_addr));
+ assert(H5F_addr_defined(fs_addr));
/* Check the free space section info's status in the metadata cache */
if (H5AC_get_entry_status(f, fs_addr, &fspace_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
"unable to check metadata cache status for free space section info")
- HDfprintf(stderr, "%s: fspace_status = %0x: ", __func__, fspace_status);
+ fprintf(stderr, "%s: fspace_status = %0x: ", __func__, fspace_status);
if (fspace_status) {
hbool_t printed = FALSE;
if (fspace_status & H5AC_ES__IN_CACHE) {
- HDfprintf(stderr, "H5AC_ES__IN_CACHE");
+ fprintf(stderr, "H5AC_ES__IN_CACHE");
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_DIRTY) {
- HDfprintf(stderr, "%sH5AC_ES__IS_DIRTY", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_DIRTY", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_PROTECTED) {
- HDfprintf(stderr, "%sH5AC_ES__IS_PROTECTED", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_PROTECTED", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_PINNED) {
- HDfprintf(stderr, "%sH5AC_ES__IS_PINNED", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_PINNED", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_FLUSH_DEP_PARENT) {
- HDfprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_PARENT", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_PARENT", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_FLUSH_DEP_CHILD) {
- HDfprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_CHILD", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_CHILD", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
} /* end if */
- HDfprintf(stderr, "\n");
+ fprintf(stderr, "\n");
}
#endif /* H5FS_DEBUG */
@@ -314,18 +314,18 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space header")
/* Sanity check */
- HDassert(fspace->sinfo == NULL);
+ assert(fspace->sinfo == NULL);
/* Delete serialized section storage, if there are any */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr);
+ fprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr);
#endif /* H5FS_DEBUG */
if (fspace->serial_sect_count > 0) {
unsigned sinfo_status = 0; /* Free space section info's status in the metadata cache */
/* Sanity check */
- HDassert(H5F_addr_defined(fspace->sect_addr));
- HDassert(fspace->alloc_sect_size > 0);
+ assert(H5F_addr_defined(fspace->sect_addr));
+ assert(fspace->alloc_sect_size > 0);
/* Check the free space section info's status in the metadata cache */
if (H5AC_get_entry_status(f, fspace->sect_addr, &sinfo_status) < 0)
@@ -335,11 +335,11 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
/* If the free space section info is in the cache, expunge it now */
if (sinfo_status & H5AC_ES__IN_CACHE) {
/* Sanity checks on direct block */
- HDassert(!(sinfo_status & H5AC_ES__IS_PINNED));
- HDassert(!(sinfo_status & H5AC_ES__IS_PROTECTED));
+ assert(!(sinfo_status & H5AC_ES__IS_PINNED));
+ assert(!(sinfo_status & H5AC_ES__IS_PROTECTED));
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Expunging free space section info from cache\n", __func__);
+ fprintf(stderr, "%s: Expunging free space section info from cache\n", __func__);
#endif /* H5FS_DEBUG */
/* Evict the free space section info from the metadata cache */
/* (Free file space) */
@@ -358,12 +358,12 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
} /* end block */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", __func__);
+ fprintf(stderr, "%s: Done expunging free space section info from cache\n", __func__);
#endif /* H5FS_DEBUG */
} /* end if */
else {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Deleting free space section info from file\n", __func__);
+ fprintf(stderr, "%s: Deleting free space section info from file\n", __func__);
#endif /* H5FS_DEBUG */
/* Release the space in the file */
if (!H5F_IS_TMP_ADDR(f, fspace->sect_addr))
@@ -401,36 +401,35 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p\n",
- __func__, (void *)fspace, fspace->addr, (void *)fspace->sinfo);
+ fprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p\n",
+ __func__, (void *)fspace, fspace->addr, (void *)fspace->sinfo);
#endif /* H5FS_DEBUG */
/* Check if section info is valid */
/* (i.e. the header "owns" the section info and it's not in the cache) */
if (fspace->sinfo) {
#ifdef H5FS_DEBUG
- HDfprintf(stderr,
- "%s: fspace->tot_sect_count = %" PRIuHSIZE ", fspace->serial_sect_count = %" PRIuHSIZE
- ", fspace->sect_addr = %" PRIuHADDR ", fspace->rc = %u\n",
- __func__, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
- HDfprintf(stderr,
- "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
- __func__, fspace->alloc_sect_size, fspace->sect_size);
+ fprintf(stderr,
+ "%s: fspace->tot_sect_count = %" PRIuHSIZE ", fspace->serial_sect_count = %" PRIuHSIZE
+ ", fspace->sect_addr = %" PRIuHADDR ", fspace->rc = %u\n",
+ __func__, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
+ __func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_DEBUG */
/* If there are sections to serialize, update them */
/* (if the free space manager is persistent) */
if (fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Real sections to store in file\n", __func__);
+ fprintf(stderr, "%s: Real sections to store in file\n", __func__);
#endif /* H5FS_DEBUG */
if (fspace->sinfo->dirty) {
/* Check if the section info is "floating" */
if (!H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
- HDassert(fspace->sect_size > 0);
+ assert(fspace->sect_size > 0);
/* Allocate space for the section info in file */
if (H5F_USE_TMP_SPACE(f)) {
@@ -454,7 +453,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
} /* end if */
else
/* Sanity check that section info has address */
- HDassert(H5F_addr_defined(fspace->sect_addr));
+ assert(H5F_addr_defined(fspace->sect_addr));
/* Cache the free space section info */
if (H5AC_insert_entry(f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo,
@@ -463,16 +462,16 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
} /* end if */
else {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: NOT storing section info in file\n", __func__);
+ fprintf(stderr, "%s: NOT storing section info in file\n", __func__);
#endif /* H5FS_DEBUG */
/* Check if space for the section info is allocated */
if (H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
/* (section info should only be in the file if the header is */
- HDassert(H5F_addr_defined(fspace->addr));
+ assert(H5F_addr_defined(fspace->addr));
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info allocated though\n", __func__);
+ fprintf(stderr, "%s: Section info allocated though\n", __func__);
#endif /* H5FS_DEBUG */
/* Check if the section info is for the free space in the file */
/* (NOTE: This is the "bootstrapping" special case for the
@@ -484,13 +483,12 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
htri_t status; /* "can absorb" status for section into */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info is for file free space\n", __func__);
+ fprintf(stderr, "%s: Section info is for file free space\n", __func__);
#endif /* H5FS_DEBUG */
/* Try to shrink the file or absorb the section info into a block aggregator */
if (H5F_IS_TMP_ADDR(f, fspace->sect_addr)) {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info in temp. address space went 'go away'\n",
- __func__);
+ fprintf(stderr, "%s: Section info in temp. address space went 'go away'\n", __func__);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -511,13 +509,13 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
* header to record it
*/
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n",
- __func__);
+ fprintf(stderr, "%s: Section info can't 'go away', header will own it\n",
+ __func__);
#endif /* H5FS_DEBUG */
} /* end if */
else {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info went 'go away'\n", __func__);
+ fprintf(stderr, "%s: Section info went 'go away'\n", __func__);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -536,7 +534,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
fspace->alloc_sect_size; /* Previous size of section info in file */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info is NOT for file free space\n", __func__);
+ fprintf(stderr, "%s: Section info is NOT for file free space\n", __func__);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -567,7 +565,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
/* Just sanity checks... */
if (fspace->serial_sect_count > 0)
/* Sanity check that section info has address */
- HDassert(H5F_addr_defined(fspace->sect_addr));
+ assert(H5F_addr_defined(fspace->sect_addr));
} /* end else */
/* Decrement the reference count on the free space manager header */
@@ -576,7 +574,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
done:
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", __func__, ret_value, fspace->rc);
+ fprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", __func__, ret_value, fspace->rc);
#endif /* H5FS_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_close() */
@@ -604,7 +602,7 @@ H5FS__new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(nclasses == 0 || (nclasses > 0 && classes));
+ assert(nclasses == 0 || (nclasses > 0 && classes));
/*
* Allocate free space structure
@@ -622,7 +620,7 @@ H5FS__new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes
/* Initialize the section classes for this free space list */
for (u = 0; u < nclasses; u++) {
/* Make certain that section class type can be used as an array index into this array */
- HDassert(u == classes[u]->type);
+ assert(u == classes[u]->type);
/* Copy the class information into the free space manager */
H5MM_memcpy(&fspace->sect_cls[u], classes[u], sizeof(H5FS_section_class_t));
@@ -681,8 +679,8 @@ H5FS_size(const H5FS_t *fspace, hsize_t *meta_size)
/*
* Check arguments.
*/
- HDassert(fspace);
- HDassert(meta_size);
+ assert(fspace);
+ assert(meta_size);
/* Get the free space size info */
*meta_size += fspace->hdr_size + (fspace->sinfo ? fspace->sect_size : fspace->alloc_sect_size);
@@ -709,14 +707,14 @@ H5FS__incr(H5FS_t *fspace)
FUNC_ENTER_PACKAGE
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
- fspace->rc);
+ fprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
+ fspace->rc);
#endif /* H5FS_DEBUG */
/*
* Check arguments.
*/
- HDassert(fspace);
+ assert(fspace);
/* Check if we should pin the header in the cache */
if (fspace->rc == 0 && H5F_addr_defined(fspace->addr))
@@ -749,14 +747,14 @@ H5FS__decr(H5FS_t *fspace)
FUNC_ENTER_PACKAGE
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
- fspace->rc);
+ fprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
+ fspace->rc);
#endif /* H5FS_DEBUG */
/*
* Check arguments.
*/
- HDassert(fspace);
+ assert(fspace);
/* Decrement reference count on header */
fspace->rc--;
@@ -797,7 +795,7 @@ H5FS__dirty(H5FS_t *fspace)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(fspace);
+ assert(fspace);
/* Check if the free space manager is persistent */
if (H5F_addr_defined(fspace->addr))
@@ -829,8 +827,8 @@ H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
if (!H5F_addr_defined(fspace->addr)) {
/* Allocate space for the free space header */
@@ -869,8 +867,8 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
if (!H5F_addr_defined(fspace->sect_addr) && fspace->sinfo && fspace->serial_sect_count > 0) {
if (HADDR_UNDEF == (fspace->sect_addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, fspace->sect_size)))
@@ -918,8 +916,8 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
cache_flags = H5AC__DELETED_FLAG | H5AC__TAKE_OWNERSHIP_FLAG;
;
@@ -1034,7 +1032,7 @@ H5FS__hdr_dest(H5FS_t *fspace)
/*
* Check arguments.
*/
- HDassert(fspace);
+ assert(fspace);
/* Terminate the section classes for this free space list */
for (u = 0; u < fspace->nclasses; u++) {
@@ -1075,8 +1073,8 @@ H5FS__sinfo_free_sect_cb(void *_sect, void H5_ATTR_UNUSED *key, void *op_data)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(sect);
- HDassert(sinfo);
+ assert(sect);
+ assert(sinfo);
/* Call the section's class 'free' method on the section */
(*sinfo->fspace->sect_cls[sect->type].free)(sect);
@@ -1103,8 +1101,8 @@ H5FS__sinfo_free_node_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fspace_node);
- HDassert(op_data);
+ assert(fspace_node);
+ assert(op_data);
/* Release the skip list for sections of this size */
H5SL_destroy(fspace_node->sect_list, H5FS__sinfo_free_sect_cb, op_data);
@@ -1138,9 +1136,9 @@ H5FS__sinfo_dest(H5FS_sinfo_t *sinfo)
/*
* Check arguments.
*/
- HDassert(sinfo);
- HDassert(sinfo->fspace);
- HDassert(sinfo->bins);
+ assert(sinfo);
+ assert(sinfo->fspace);
+ assert(sinfo->bins);
/* Clear out lists of nodes */
for (u = 0; u < sinfo->nbins; u++)
@@ -1181,8 +1179,8 @@ H5FS_get_sect_count(const H5FS_t *frsp, hsize_t *tot_sect_count)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(frsp);
- HDassert(tot_sect_count);
+ assert(frsp);
+ assert(tot_sect_count);
/* Report statistics for free space */
*tot_sect_count = frsp->serial_sect_count;
@@ -1215,14 +1213,14 @@ H5FS__assert(const H5FS_t *fspace)
H5FS__sect_assert(fspace);
/* General assumptions about the section size counts */
- HDassert(fspace->sinfo->tot_size_count >= fspace->sinfo->serial_size_count);
- HDassert(fspace->sinfo->tot_size_count >= fspace->sinfo->ghost_size_count);
+ assert(fspace->sinfo->tot_size_count >= fspace->sinfo->serial_size_count);
+ assert(fspace->sinfo->tot_size_count >= fspace->sinfo->ghost_size_count);
} /* end if */
/* General assumptions about the section counts */
- HDassert(fspace->tot_sect_count >= fspace->serial_sect_count);
- HDassert(fspace->tot_sect_count >= fspace->ghost_sect_count);
- HDassert(fspace->tot_sect_count == (fspace->serial_sect_count + fspace->ghost_sect_count));
+ assert(fspace->tot_sect_count >= fspace->serial_sect_count);
+ assert(fspace->tot_sect_count >= fspace->ghost_sect_count);
+ assert(fspace->tot_sect_count == (fspace->serial_sect_count + fspace->ghost_sect_count));
FUNC_LEAVE_NOAPI_VOID
} /* end H5FS__assert() */
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 313439e..4cca3ce 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -160,9 +160,9 @@ H5FS__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5FS_HEADER_SIZE(udata->f);
@@ -194,7 +194,7 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -235,9 +235,9 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
/* Allocate a new free space manager */
if (NULL == (fspace = H5FS__new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata)))
@@ -247,7 +247,7 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
fspace->addr = udata->addr;
/* Magic number */
- if (HDmemcmp(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature")
image += H5_SIZEOF_MAGIC;
@@ -307,7 +307,7 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
/* Set return value */
ret_value = fspace;
@@ -342,10 +342,10 @@ H5FS__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(fspace);
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(image_len);
+ assert(fspace);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(image_len);
/* Set the image length size */
*image_len = fspace->hdr_size;
@@ -392,14 +392,14 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(fspace);
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(H5F_addr_defined(addr));
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(fspace);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(H5F_addr_defined(addr));
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
if (fspace->sinfo) {
H5AC_ring_t ring;
@@ -491,7 +491,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
*/
if (fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) {
/* Sanity check */
- HDassert(fspace->sect_size > 0);
+ assert(fspace->sect_size > 0);
if (!H5F_addr_defined(fspace->sect_addr)) { /* case 1 */
haddr_t tag = HADDR_UNDEF;
@@ -540,7 +540,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
HGOTO_ERROR_TAG(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache")
H5_END_TAG
- HDassert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size);
+ assert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size);
/* the metadata cache is now managing the section info,
* so set fspace->sinfo to NULL.
@@ -558,8 +558,8 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
* be the case. If not, we will have to add code to resize
* file space allocation for section info as well as moving it.
*/
- HDassert(fspace->sect_size > 0);
- HDassert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
+ assert(fspace->sect_size > 0);
+ assert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
/* Allocate space for the section info in file */
if (HADDR_UNDEF ==
@@ -568,7 +568,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
"file allocation failed for free space sections")
fspace->alloc_sect_size = (size_t)fspace->sect_size;
- HDassert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size);
+ assert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size);
/* Let the metadata cache know the section info moved */
if (H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, fspace->sect_addr, new_sect_addr) < 0)
@@ -581,15 +581,15 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
* be the case. If not, we will have to add code to resize
* file space allocation for section info.
*/
- HDassert(fspace->sect_size > 0);
- HDassert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
+ assert(fspace->sect_size > 0);
+ assert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
} /* end else */
} /* end else */
else {
/* for one reason or another (see comment above) there should
* not be any file space allocated for the section info.
*/
- HDassert(!H5F_addr_defined(fspace->sect_addr));
+ assert(!H5F_addr_defined(fspace->sect_addr));
} /* end else */
} /* end if */
else if (H5F_addr_defined(fspace->sect_addr)) {
@@ -601,8 +601,8 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
* a nonsense section info address.
*/
if (!H5F_POINT_OF_NO_RETURN(f)) {
- HDassert(fspace->sect_size > 0);
- HDassert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
+ assert(fspace->sect_size > 0);
+ assert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
} /* end if */
if (H5F_IS_TMP_ADDR(f, fspace->sect_addr)) {
@@ -620,9 +620,9 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
if (H5AC_get_entry_status(f, fspace->sect_addr, &sect_status) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info status")
- HDassert(sect_status & H5AC_ES__IN_CACHE);
- HDassert((sect_status & H5AC_ES__IS_PROTECTED) == 0);
- HDassert((sect_status & H5AC_ES__IS_PINNED) == 0);
+ assert(sect_status & H5AC_ES__IN_CACHE);
+ assert((sect_status & H5AC_ES__IS_PROTECTED) == 0);
+ assert((sect_status & H5AC_ES__IS_PINNED) == 0);
/* Allocate space for the section info in file */
if (HADDR_UNDEF ==
@@ -632,7 +632,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
fspace->alloc_sect_size = (size_t)fspace->sect_size;
/* Sanity check */
- HDassert(!H5F_addr_eq(fspace->sect_addr, new_sect_addr));
+ assert(!H5F_addr_eq(fspace->sect_addr, new_sect_addr));
/* Let the metadata cache know the section info moved */
if (H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, fspace->sect_addr, new_sect_addr) < 0)
@@ -648,8 +648,8 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
} /* end else-if */
else { /* there is no section info at present */
/* do some sanity checks */
- HDassert(fspace->serial_sect_count == 0);
- HDassert(fspace->tot_sect_count == fspace->ghost_sect_count);
+ assert(fspace->serial_sect_count == 0);
+ assert(fspace->tot_sect_count == fspace->ghost_sect_count);
} /* end else */
/* what ever happened above, set *flags to 0 */
@@ -690,12 +690,12 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(fspace);
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(fspace->hdr_size == len);
+ assert(f);
+ assert(image);
+ assert(fspace);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(fspace->hdr_size == len);
/* The section information does not always exits, and if it does,
* it is not always in the cache. To make matters more interesting,
@@ -705,11 +705,11 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
* into real file space if necessary before this function was called.
* The following asserts are a cursory check on this.
*/
- HDassert((!H5F_addr_defined(fspace->sect_addr)) || (!H5F_IS_TMP_ADDR(f, fspace->sect_addr)));
+ assert((!H5F_addr_defined(fspace->sect_addr)) || (!H5F_IS_TMP_ADDR(f, fspace->sect_addr)));
if (!H5F_POINT_OF_NO_RETURN(f))
- HDassert((!H5F_addr_defined(fspace->sect_addr)) ||
- ((fspace->sect_size > 0) && (fspace->alloc_sect_size == (size_t)fspace->sect_size)));
+ assert((!H5F_addr_defined(fspace->sect_addr)) ||
+ ((fspace->sect_size > 0) && (fspace->alloc_sect_size == (size_t)fspace->sect_size)));
/* Magic number */
H5MM_memcpy(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -766,7 +766,7 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
UINT32ENCODE(image, metadata_chksum);
/* sanity checks */
- HDassert((size_t)(image - (uint8_t *)_image) == fspace->hdr_size);
+ assert((size_t)(image - (uint8_t *)_image) == fspace->hdr_size);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS__cache_hdr_serialize() */
@@ -792,7 +792,7 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(fspace);
+ assert(fspace);
/* Determine which action to take */
switch (action) {
@@ -820,7 +820,7 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -854,12 +854,12 @@ H5FS__cache_hdr_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(fspace);
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(fspace);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
/* We should not still be holding on to the free space section info */
- HDassert(!fspace->sinfo);
+ assert(!fspace->sinfo);
/* Destroy free space header */
if (H5FS__hdr_dest(fspace) < 0)
@@ -892,11 +892,11 @@ H5FS__cache_sinfo_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
+ assert(udata);
fspace = udata->fspace;
- HDassert(fspace);
- HDassert(fspace->sect_size > 0);
- HDassert(image_len);
+ assert(fspace);
+ assert(fspace->sect_size > 0);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)(fspace->sect_size);
@@ -928,7 +928,7 @@ H5FS__cache_sinfo_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -972,12 +972,12 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
fspace = udata->fspace;
- HDassert(fspace);
- HDassert(fspace->sect_size == len);
- HDassert(dirty);
+ assert(fspace);
+ assert(fspace->sect_size == len);
+ assert(dirty);
/* Allocate a new free space section info */
if (NULL == (sinfo = H5FS__sinfo_new(udata->f, fspace)))
@@ -987,7 +987,7 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
H5_CHECKED_ASSIGN(old_sect_size, size_t, fspace->sect_size, hsize_t);
/* Magic number */
- if (HDmemcmp(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections signature")
image += H5_SIZEOF_MAGIC;
@@ -1030,11 +1030,11 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
/* The number of sections of this node's size */
UINT64DECODE_VAR(image, node_count, sect_cnt_size);
- HDassert(node_count);
+ assert(node_count);
/* The size of the sections for this node */
UINT64DECODE_VAR(image, sect_size, sinfo->sect_len_size);
- HDassert(sect_size);
+ assert(sect_size);
/* Loop over nodes of this size */
for (u = 0; u < node_count; u++) {
@@ -1051,7 +1051,7 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
/* Call 'deserialize' callback for this section */
des_flags = 0;
- HDassert(fspace->sect_cls[sect_type].deserialize);
+ assert(fspace->sect_cls[sect_type].deserialize);
if (NULL == (new_sect = (*fspace->sect_cls[sect_type].deserialize)(
&fspace->sect_cls[sect_type], image, sect_addr, sect_size, &des_flags)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTDECODE, NULL, "can't deserialize section")
@@ -1072,12 +1072,12 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
} while (image < (((const uint8_t *)_image + old_sect_size) - H5FS_SIZEOF_CHKSUM));
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= (old_sect_size - H5FS_SIZEOF_CHKSUM));
- HDassert(old_sect_size == fspace->sect_size);
- HDassert(old_tot_sect_count == fspace->tot_sect_count);
- HDassert(old_serial_sect_count == fspace->serial_sect_count);
- HDassert(old_ghost_sect_count == fspace->ghost_sect_count);
- HDassert(old_tot_space == fspace->tot_space);
+ assert((size_t)(image - (const uint8_t *)_image) <= (old_sect_size - H5FS_SIZEOF_CHKSUM));
+ assert(old_sect_size == fspace->sect_size);
+ assert(old_tot_sect_count == fspace->tot_sect_count);
+ assert(old_serial_sect_count == fspace->serial_sect_count);
+ assert(old_ghost_sect_count == fspace->ghost_sect_count);
+ assert(old_tot_space == fspace->tot_space);
} /* end if */
/* checksum verification already done in verify_chksum cb */
@@ -1088,8 +1088,8 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
UINT32DECODE(chksum_image, stored_chksum);
/* Sanity check */
- HDassert((image == chksum_image) ||
- ((size_t)((image - (const uint8_t *)_image) + (chksum_image - image)) == old_sect_size));
+ assert((image == chksum_image) ||
+ ((size_t)((image - (const uint8_t *)_image) + (chksum_image - image)) == old_sect_size));
/* Set return value */
ret_value = sinfo;
@@ -1123,13 +1123,13 @@ H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(sinfo);
- HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
- HDassert(sinfo->fspace);
- HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(image_len);
+ assert(sinfo);
+ assert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
+ assert(sinfo->fspace);
+ assert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(image_len);
/* Set the image length size */
H5_CHECKED_ASSIGN(*image_len, size_t, sinfo->fspace->alloc_sect_size, hsize_t);
@@ -1165,28 +1165,28 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(sinfo);
- HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
+ assert(f);
+ assert(sinfo);
+ assert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
fspace = sinfo->fspace;
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(fspace->cache_info.is_pinned);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_eq(fspace->sect_addr, addr));
- HDassert(fspace->sect_size == len);
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(fspace->cache_info.is_pinned);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_eq(fspace->sect_addr, addr));
+ assert(fspace->sect_size == len);
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
sinfo_addr = addr; /* this will change if we relocate the section data */
/* Check for section info at temporary address */
if (H5F_IS_TMP_ADDR(f, fspace->sect_addr)) {
/* Sanity check */
- HDassert(fspace->sect_size > 0);
- HDassert(H5F_addr_eq(fspace->sect_addr, addr));
+ assert(fspace->sect_size > 0);
+ assert(H5F_addr_eq(fspace->sect_addr, addr));
/* Allocate space for the section info in file */
if (HADDR_UNDEF == (sinfo_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, fspace->sect_size)))
@@ -1195,7 +1195,7 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_
fspace->alloc_sect_size = (size_t)fspace->sect_size;
/* Sanity check */
- HDassert(!H5F_addr_eq(sinfo->fspace->sect_addr, sinfo_addr));
+ assert(!H5F_addr_eq(sinfo->fspace->sect_addr, sinfo_addr));
/* Let the metadata cache know the section info moved */
if (H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, sinfo->fspace->sect_addr, sinfo_addr) < 0)
@@ -1250,16 +1250,16 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, void *_thi
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(sinfo);
- HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
- HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(sinfo->fspace->cache_info.is_pinned);
- HDassert(sinfo->fspace->sect_size == len);
- HDassert(sinfo->fspace->sect_cls);
+ assert(f);
+ assert(image);
+ assert(sinfo);
+ assert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
+ assert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(sinfo->fspace->cache_info.is_pinned);
+ assert(sinfo->fspace->sect_size == len);
+ assert(sinfo->fspace->sect_cls);
/* Magic number */
H5MM_memcpy(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -1293,9 +1293,9 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, void *_thi
UINT32ENCODE(chksum_image, metadata_chksum);
/* Sanity check */
- HDassert((chksum_image == image) ||
- ((size_t)((image - (uint8_t *)_image) + (chksum_image - image)) == sinfo->fspace->sect_size));
- HDassert(sinfo->fspace->sect_size <= sinfo->fspace->alloc_sect_size);
+ assert((chksum_image == image) ||
+ ((size_t)((image - (uint8_t *)_image) + (chksum_image - image)) == sinfo->fspace->sect_size));
+ assert(sinfo->fspace->sect_size <= sinfo->fspace->alloc_sect_size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1322,7 +1322,7 @@ H5FS__cache_sinfo_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sinfo);
+ assert(sinfo);
/* Check if the file was opened with SWMR-write access */
if (sinfo->fspace->swmr_write) {
@@ -1358,7 +1358,7 @@ H5FS__cache_sinfo_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
@@ -1394,12 +1394,12 @@ H5FS__cache_sinfo_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(sinfo);
- HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
- HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(sinfo->fspace->cache_info.is_pinned);
+ assert(sinfo);
+ assert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
+ assert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(sinfo->fspace->cache_info.is_pinned);
/* Destroy free space info */
if (H5FS__sinfo_dest(sinfo) < 0)
@@ -1433,9 +1433,9 @@ H5FS__sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(udata->sinfo);
- HDassert(udata->image);
+ assert(sect);
+ assert(udata->sinfo);
+ assert(udata->image);
/* Get section's class */
sect_cls = &udata->sinfo->fspace->sect_cls[sect->type];
@@ -1457,7 +1457,7 @@ H5FS__sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
(*udata->image) += sect_cls->serial_size;
} /* end if */
else
- HDassert(sect_cls->serial_size == 0);
+ assert(sect_cls->serial_size == 0);
} /* end if */
done:
@@ -1487,9 +1487,9 @@ H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace_node);
- HDassert(udata->sinfo);
- HDassert(udata->image);
+ assert(fspace_node);
+ assert(udata->sinfo);
+ assert(udata->image);
/* Check if this node has any serializable sections */
if (fspace_node->serial_count > 0) {
@@ -1500,7 +1500,7 @@ H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
UINT64ENCODE_VAR(*udata->image, fspace_node->sect_size, udata->sinfo->sect_len_size);
/* Iterate through all the sections of this size */
- HDassert(fspace_node->sect_list);
+ assert(fspace_node->sect_list);
if (H5SL_iterate(fspace_node->sect_list, H5FS__sinfo_serialize_sect_cb, udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes")
} /* end if */
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c
index 769357e..e10a3a0 100644
--- a/src/H5FSdbg.c
+++ b/src/H5FSdbg.c
@@ -90,11 +90,11 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Initialize user data for protecting the free space manager */
cache_udata.f = f;
@@ -111,37 +111,37 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
/* Print opening message */
- HDfprintf(stream, "%*sFree Space Header...\n", indent, "");
+ fprintf(stream, "%*sFree Space Header...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Free space client:",
- (fspace->client == H5FS_CLIENT_FHEAP_ID
- ? "Fractal heap"
- : (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown")));
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Total free space tracked:", fspace->tot_space);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Total number of free space sections tracked:", fspace->tot_sect_count);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of serializable free space sections tracked:", fspace->serial_sect_count);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of ghost free space sections tracked:", fspace->ghost_sect_count);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of free space section classes:", (unsigned)fspace->nclasses);
- HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Shrink percent:", fspace->shrink_percent);
- HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Expand percent:", fspace->expand_percent);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of bits for section address space:", fspace->max_sect_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Maximum section size:", fspace->max_sect_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Serialized sections address:", fspace->sect_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Serialized sections size used:", fspace->sect_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Serialized sections size allocated:", fspace->alloc_sect_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Free space client:",
+ (fspace->client == H5FS_CLIENT_FHEAP_ID
+ ? "Fractal heap"
+ : (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown")));
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Total free space tracked:", fspace->tot_space);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Total number of free space sections tracked:", fspace->tot_sect_count);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of serializable free space sections tracked:", fspace->serial_sect_count);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of ghost free space sections tracked:", fspace->ghost_sect_count);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of free space section classes:", (unsigned)fspace->nclasses);
+ fprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Shrink percent:", fspace->shrink_percent);
+ fprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Expand percent:", fspace->expand_percent);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "# of bits for section address space:", fspace->max_sect_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Maximum section size:", fspace->max_sect_size);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Serialized sections address:", fspace->sect_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Serialized sections size used:", fspace->sect_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Serialized sections size allocated:", fspace->alloc_sect_size);
done:
if (fspace && H5AC_unprotect(f, H5AC_FSPACE_HDR, addr, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -172,11 +172,11 @@ H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect, FILE *str
/*
* Check arguments.
*/
- HDassert(fspace);
- HDassert(sect);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(fspace);
+ assert(sect);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Call the section's debugging routine */
if (fspace->sect_cls[sect->type].debug)
@@ -213,13 +213,13 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(H5F_addr_defined(fs_addr));
- HDassert(H5F_addr_defined(client_addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(H5F_addr_defined(fs_addr));
+ assert(H5F_addr_defined(client_addr));
/* Initialize user data for protecting the free space manager */
cache_udata.f = f;
@@ -247,7 +247,7 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent
fspace = NULL;
/* Print opening message */
- HDfprintf(stream, "%*sFree Space Sections...\n", indent, "");
+ fprintf(stream, "%*sFree Space Sections...\n", indent, "");
/*
* Print the values.
@@ -265,7 +265,7 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent
case H5FS_NUM_CLIENT_ID:
default:
- HDfprintf(stream, "Unknown client!\n");
+ fprintf(stream, "Unknown client!\n");
break;
} /* end switch */
diff --git a/src/H5FSint.c b/src/H5FSint.c
index 9910a41..06c4f72 100644
--- a/src/H5FSint.c
+++ b/src/H5FSint.c
@@ -86,8 +86,8 @@ H5FS__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Create a flush dependency between parent and child entry */
if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0)
@@ -117,8 +117,8 @@ H5FS__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Destroy a flush dependency between parent and child entry */
if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0)
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 4896a3b..eabe354 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -119,10 +119,10 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->addr = %" PRIuHADDR "\n", __func__, fspace->addr);
+ fprintf(stderr, "%s: fspace->addr = %" PRIuHADDR "\n", __func__, fspace->addr);
#endif /* H5FS_SINFO_DEBUG */
/* Allocate the free space header */
@@ -135,11 +135,11 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace)
sinfo->sect_off_size = (fspace->max_sect_addr + 7) / 8;
sinfo->sect_len_size = H5VM_limit_enc_size((uint64_t)fspace->max_sect_size);
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->max_sect_size = %" PRIuHSIZE "\n", __func__, fspace->max_sect_size);
- HDfprintf(stderr, "%s: fspace->max_sect_addr = %u\n", __func__, fspace->max_sect_addr);
- HDfprintf(stderr, "%s: sinfo->nbins = %u\n", __func__, sinfo->nbins);
- HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", __func__,
- sinfo->sect_off_size, sinfo->sect_len_size);
+ fprintf(stderr, "%s: fspace->max_sect_size = %" PRIuHSIZE "\n", __func__, fspace->max_sect_size);
+ fprintf(stderr, "%s: fspace->max_sect_addr = %u\n", __func__, fspace->max_sect_addr);
+ fprintf(stderr, "%s: sinfo->nbins = %u\n", __func__, sinfo->nbins);
+ fprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", __func__,
+ sinfo->sect_off_size, sinfo->sect_len_size);
#endif /* H5FS_SINFO_DEBUG */
/* Allocate space for the section size bins */
@@ -154,7 +154,7 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace)
/* Link free space manager to section info */
/* (for deserializing sections) */
- HDassert(fspace->sinfo == NULL);
+ assert(fspace->sinfo == NULL);
fspace->sinfo = sinfo;
/* Set return value */
@@ -199,20 +199,20 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
FUNC_ENTER_PACKAGE
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr,
- "%s: Called, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR
- "\n",
- __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
- __func__, fspace->alloc_sect_size, fspace->sect_size);
+ fprintf(stderr,
+ "%s: Called, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR
+ "\n",
+ __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
+ __func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
/* only H5AC__READ_ONLY_FLAG may appear in accmode */
- HDassert((accmode & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((accmode & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* If the free space header doesn't already "own" the section info, load
* section info or create it
@@ -221,7 +221,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
/* Check if the section info was protected & we want a different access mode */
/* only H5AC__READ_ONLY_FLAG may appear in fspace->sinfo_accmode */
- HDassert(((fspace->sinfo_accmode) & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert(((fspace->sinfo_accmode) & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
if (fspace->sinfo_protected && accmode != fspace->sinfo_accmode) {
/* Check if we need to switch from read-only access to read-write */
@@ -248,12 +248,12 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
/* If the section address is defined, load it from the file */
if (H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
- HDassert(fspace->sinfo_protected == FALSE);
- HDassert(H5F_addr_defined(fspace->addr));
+ assert(fspace->sinfo_protected == FALSE);
+ assert(H5F_addr_defined(fspace->addr));
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %" PRIuHADDR "\n",
- __func__, fspace->sect_addr);
+ fprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %" PRIuHADDR "\n",
+ __func__, fspace->sect_addr);
#endif /* H5FS_SINFO_DEBUG */
/* Protect the free space sections */
cache_udata.f = f;
@@ -268,12 +268,12 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
} /* end if */
else {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Creating new section info\n", __func__);
+ fprintf(stderr, "%s: Creating new section info\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Sanity check */
- HDassert(fspace->tot_sect_count == 0);
- HDassert(fspace->serial_sect_count == 0);
- HDassert(fspace->ghost_sect_count == 0);
+ assert(fspace->tot_sect_count == 0);
+ assert(fspace->serial_sect_count == 0);
+ assert(fspace->ghost_sect_count == 0);
/* Allocate and initialize free space section info */
if (NULL == (fspace->sinfo = H5FS__sinfo_new(f, fspace)))
@@ -283,19 +283,19 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
fspace->sect_size = fspace->alloc_sect_size = 0;
} /* end if */
} /* end if */
- HDassert(fspace->rc == 2);
+ assert(fspace->rc == 2);
/* Increment the section info lock count */
fspace->sinfo_lock_count++;
done:
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr,
- "%s: Leaving, fspace->addr = %" PRIuHADDR
- ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR "\n",
- __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
- __func__, fspace->alloc_sect_size, fspace->sect_size);
+ fprintf(stderr,
+ "%s: Leaving, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR
+ "\n",
+ __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
+ __func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS__sinfo_lock() */
@@ -334,23 +334,21 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
FUNC_ENTER_PACKAGE
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr,
- "%s: Called, modified = %d, fspace->addr = %" PRIuHADDR ", fspace->sect_addr = %" PRIuHADDR
- "\n",
- __func__, modified, fspace->addr, fspace->sect_addr);
- HDfprintf(
- stderr,
- "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %d, fspace->sinfo_protected = %d\n",
- __func__, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
- __func__, fspace->alloc_sect_size, fspace->sect_size);
+ fprintf(stderr,
+ "%s: Called, modified = %d, fspace->addr = %" PRIuHADDR ", fspace->sect_addr = %" PRIuHADDR "\n",
+ __func__, modified, fspace->addr, fspace->sect_addr);
+ fprintf(stderr,
+ "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %d, fspace->sinfo_protected = %d\n",
+ __func__, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
+ __func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
- HDassert(fspace->rc == 2);
- HDassert(fspace->sinfo);
+ assert(f);
+ assert(fspace);
+ assert(fspace->rc == 2);
+ assert(fspace->sinfo);
/* Check if we modified any section */
if (modified) {
@@ -390,7 +388,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap */
/* Sanity check */
- HDassert(H5F_addr_defined(fspace->addr));
+ assert(H5F_addr_defined(fspace->addr));
/* Check if we've made new changes to the section info while locked */
if (fspace->sinfo_modified) {
@@ -412,13 +410,13 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
} /* end if */
/* Sanity check */
- HDassert(H5F_addr_defined(fspace->sect_addr));
+ assert(H5F_addr_defined(fspace->sect_addr));
/* Unprotect section info in cache */
/* (Possibly dirty) */
/* (Possibly taking ownership from the cache) */
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", __func__, cache_flags);
+ fprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", __func__, cache_flags);
#endif /* H5FS_SINFO_DEBUG */
if (H5AC_unprotect(f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, cache_flags) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info")
@@ -429,14 +427,14 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
/* Check if header is taking ownership of section info */
if ((cache_flags & H5AC__TAKE_OWNERSHIP_FLAG)) {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Taking ownership of section info\n", __func__);
+ fprintf(stderr, "%s: Taking ownership of section info\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Set flag to release section info space in file */
release_sinfo_space = TRUE;
} /* end if */
else {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Relinquishing section info ownership\n", __func__);
+ fprintf(stderr, "%s: Relinquishing section info ownership\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Free space header relinquished ownership of section info */
fspace->sinfo = NULL;
@@ -460,15 +458,15 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
release_sinfo_space = TRUE;
}
else
- HDassert(fspace->alloc_sect_size == 0);
+ assert(fspace->alloc_sect_size == 0);
} /* end if */
else {
/* Sanity checks... */
if (H5F_addr_defined(fspace->sect_addr))
- HDassert(fspace->alloc_sect_size == fspace->sect_size);
+ assert(fspace->alloc_sect_size == fspace->sect_size);
else
- HDassert(fspace->alloc_sect_size == 0);
+ assert(fspace->alloc_sect_size == 0);
} /* end else */
} /* end else */
@@ -481,7 +479,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
hsize_t old_alloc_sect_size = fspace->alloc_sect_size; /* Previous size of section info in file */
/* Sanity check */
- HDassert(H5F_addr_defined(fspace->addr));
+ assert(H5F_addr_defined(fspace->addr));
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -494,10 +492,10 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
"unable to mark free space header as dirty")
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr,
- "%s: Freeing section info on disk, old_sect_addr = %" PRIuHADDR
- ", old_alloc_sect_size = %" PRIuHSIZE "\n",
- __func__, old_sect_addr, old_alloc_sect_size);
+ fprintf(stderr,
+ "%s: Freeing section info on disk, old_sect_addr = %" PRIuHADDR
+ ", old_alloc_sect_size = %" PRIuHSIZE "\n",
+ __func__, old_sect_addr, old_alloc_sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Release space for section info in file */
if (!H5F_IS_TMP_ADDR(f, old_sect_addr))
@@ -508,7 +506,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
done:
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS__sinfo_unlock() */
@@ -531,7 +529,7 @@ H5FS__sect_serialize_size(H5FS_t *fspace)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(fspace);
+ assert(fspace);
/* Compute the size of the buffer required to serialize all the sections */
if (fspace->serial_sect_count > 0) {
@@ -587,9 +585,9 @@ H5FS__sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls, unsigned fl
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(cls);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(cls);
/* Increment total # of sections on free space list */
fspace->tot_sect_count++;
@@ -597,7 +595,7 @@ H5FS__sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls, unsigned fl
/* Check for serializable or 'ghost' section */
if (cls->flags & H5FS_CLS_GHOST_OBJ) {
/* Sanity check */
- HDassert(cls->serial_size == 0);
+ assert(cls->serial_size == 0);
/* Increment # of ghost sections */
fspace->ghost_sect_count++;
@@ -642,9 +640,9 @@ H5FS__sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(cls);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(cls);
/* Decrement total # of sections in free space manager */
fspace->tot_sect_count--;
@@ -652,7 +650,7 @@ H5FS__sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
/* Check for serializable or 'ghost' section */
if (cls->flags & H5FS_CLS_GHOST_OBJ) {
/* Sanity check */
- HDassert(cls->serial_size == 0);
+ assert(cls->serial_size == 0);
/* Decrement # of ghost sections */
fspace->ghost_sect_count--;
@@ -694,9 +692,9 @@ H5FS__size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sinfo);
- HDassert(fspace_node);
- HDassert(cls);
+ assert(sinfo);
+ assert(fspace_node);
+ assert(cls);
/* Decrement the # of sections in this bin */
/* (Different from the # of items in the bin's skiplist, since each node on
@@ -734,8 +732,8 @@ H5FS__size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node
H5FS_node_t *tmp_fspace_node; /* Free space list size node */
/* Sanity checks */
- HDassert(fspace_node->ghost_count == 0);
- HDassert(fspace_node->serial_count == 0);
+ assert(fspace_node->ghost_count == 0);
+ assert(fspace_node->serial_count == 0);
/* Remove size tracking list from bin */
tmp_fspace_node = (H5FS_node_t *)H5SL_remove(sinfo->bins[bin].bin_list, &fspace_node->sect_size);
@@ -781,14 +779,14 @@ H5FS__sect_unlink_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5F
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sinfo);
- HDassert(sinfo->bins);
- HDassert(sect);
- HDassert(cls);
+ assert(sinfo);
+ assert(sinfo->bins);
+ assert(sect);
+ assert(cls);
/* Determine correct bin which holds items of at least the section's size */
bin = H5VM_log2_gen(sect->size);
- HDassert(bin < sinfo->nbins);
+ assert(bin < sinfo->nbins);
if (sinfo->bins[bin].bin_list == NULL)
HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "node's bin is empty?")
@@ -831,10 +829,10 @@ H5FS__sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_sec
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(cls);
- HDassert(sect);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(cls);
+ assert(sect);
/* Remove node from merge list, if it was entered there */
if (!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
@@ -877,9 +875,9 @@ H5FS__sect_remove_real(H5FS_t *fspace, H5FS_section_info_t *sect)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(sect);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(sect);
/* Get section's class */
cls = &fspace->sect_cls[sect->type];
@@ -918,9 +916,9 @@ H5FS_sect_remove(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
- HDassert(sect);
+ assert(f);
+ assert(fspace);
+ assert(sect);
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -962,14 +960,14 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sinfo);
- HDassert(sect);
- HDassert(H5F_addr_defined(sect->addr));
- HDassert(sect->size);
+ assert(sinfo);
+ assert(sect);
+ assert(H5F_addr_defined(sect->addr));
+ assert(sect->size);
/* Determine correct bin which holds items of the section's size */
bin = H5VM_log2_gen(sect->size);
- HDassert(bin < sinfo->nbins);
+ assert(bin < sinfo->nbins);
if (sinfo->bins[bin].bin_list == NULL) {
if (NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes")
@@ -1060,9 +1058,9 @@ H5FS__sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_secti
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(sect);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(sect);
/* Add section to the address-ordered list of sections, if allowed */
if (!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
@@ -1107,9 +1105,9 @@ H5FS__sect_link(H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(sect);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(sect);
/* Get section's class */
cls = &fspace->sect_cls[sect->type];
@@ -1152,10 +1150,10 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(*sect);
- HDassert(H5F_addr_defined((*sect)->addr));
- HDassert((*sect)->size);
+ assert(fspace);
+ assert(*sect);
+ assert(H5F_addr_defined((*sect)->addr));
+ assert((*sect)->size);
/* Loop until no more merging */
if (fspace->sinfo->merge_list) {
@@ -1196,7 +1194,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections")
if (status > 0) {
/* Sanity check */
- HDassert(tmp_sect_cls->merge);
+ assert(tmp_sect_cls->merge);
/* Remove 'less than' node from data structures */
if (H5FS__sect_remove_real(fspace, tmp_sect) < 0)
@@ -1243,7 +1241,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections")
if (status > 0) {
/* Sanity check */
- HDassert(sect_cls->merge);
+ assert(sect_cls->merge);
/* Remove 'greater than' node from data structures */
if (H5FS__sect_remove_real(fspace, tmp_sect) < 0)
@@ -1266,7 +1264,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
} /* end if */
} while (modified);
} /* end if */
- HDassert(*sect);
+ assert(*sect);
/* Loop until no more shrinking */
do {
@@ -1290,7 +1288,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
/* Shrink the container */
/* (callback can indicate that it has discarded the section by setting *sect to NULL) */
- HDassert(sect_cls->shrink);
+ assert(sect_cls->shrink);
if ((*sect_cls->shrink)(sect, op_data) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't shrink free space container")
@@ -1304,7 +1302,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
if (NULL != (last_node = H5SL_last(fspace->sinfo->merge_list))) {
/* Get the pointer to the last section, from the last node */
*sect = (H5FS_section_info_t *)H5SL_item(last_node);
- HDassert(*sect);
+ assert(*sect);
/* Indicate that this section needs to be removed if it causes a shrink */
remove_sect = TRUE;
@@ -1349,16 +1347,16 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: *sect = {%" PRIuHADDR ", %" PRIuHSIZE ", %u, %s}\n", __func__, sect->addr,
- sect->size, sect->type,
- (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
+ fprintf(stderr, "%s: *sect = {%" PRIuHADDR ", %" PRIuHSIZE ", %u, %s}\n", __func__, sect->addr,
+ sect->size, sect->type,
+ (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
- HDassert(fspace);
- HDassert(sect);
- HDassert(H5F_addr_defined(sect->addr));
- HDassert(sect->size);
+ assert(fspace);
+ assert(sect);
+ assert(H5F_addr_defined(sect->addr));
+ assert(sect->size);
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -1374,7 +1372,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
/* Check for merging returned space with existing section node */
if (flags & H5FS_ADD_RETURNED_SPACE) {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Returning space\n", __func__);
+ fprintf(stderr, "%s: Returning space\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Attempt to merge returned section with existing sections */
@@ -1391,7 +1389,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list")
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->tot_space = %" PRIuHSIZE "\n", __func__, fspace->tot_space);
+ fprintf(stderr, "%s: fspace->tot_space = %" PRIuHSIZE "\n", __func__, fspace->tot_space);
#endif /* H5FS_SINFO_DEBUG */
/* Mark free space sections as changed */
/* (if adding sections while deserializing sections, don't set the flag) */
@@ -1408,7 +1406,7 @@ done:
H5FS__assert(fspace);
#endif /* H5FS_DEBUG_ASSERT */
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_add() */
@@ -1436,23 +1434,22 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", extra_requested = %" PRIuHSIZE "\n",
- __func__, addr, size, extra_requested);
+ fprintf(stderr, "%s: addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", extra_requested = %" PRIuHSIZE "\n",
+ __func__, addr, size, extra_requested);
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
- HDassert(H5F_addr_defined(addr));
- HDassert(size > 0);
- HDassert(extra_requested > 0);
+ assert(f);
+ assert(fspace);
+ assert(H5F_addr_defined(addr));
+ assert(size > 0);
+ assert(extra_requested > 0);
/* Check for any sections on free space list */
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->tot_sect_count = %" PRIuHSIZE "\n", __func__, fspace->tot_sect_count);
- HDfprintf(stderr, "%s: fspace->serial_sect_count = %" PRIuHSIZE "\n", __func__,
- fspace->serial_sect_count);
- HDfprintf(stderr, "%s: fspace->ghost_sect_count = %" PRIuHSIZE "\n", __func__, fspace->ghost_sect_count);
+ fprintf(stderr, "%s: fspace->tot_sect_count = %" PRIuHSIZE "\n", __func__, fspace->tot_sect_count);
+ fprintf(stderr, "%s: fspace->serial_sect_count = %" PRIuHSIZE "\n", __func__, fspace->serial_sect_count);
+ fprintf(stderr, "%s: fspace->ghost_sect_count = %" PRIuHSIZE "\n", __func__, fspace->ghost_sect_count);
#endif /* H5FS_SINFO_DEBUG */
if (fspace->tot_sect_count > 0) {
H5FS_section_info_t *sect; /* Temporary free space section */
@@ -1508,7 +1505,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
*/
if (sect->size > extra_requested) {
/* Sanity check (for now) */
- HDassert(cls->flags & H5FS_CLS_ADJUST_OK);
+ assert(cls->flags & H5FS_CLS_ADJUST_OK);
/* Adjust section by amount requested */
sect->addr += extra_requested;
@@ -1528,7 +1525,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
} /* end if */
else {
/* Sanity check */
- HDassert(sect->size == extra_requested);
+ assert(sect->size == extra_requested);
/* Exact match, so just free section */
if ((*cls->free)(sect) < 0)
@@ -1577,11 +1574,11 @@ H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigne
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
- HDassert(sect);
- HDassert(H5F_addr_defined(sect->addr));
- HDassert(sect->size);
+ assert(f);
+ assert(fspace);
+ assert(sect);
+ assert(H5F_addr_defined(sect->addr));
+ assert(sect->size);
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -1644,15 +1641,15 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(fspace->sinfo->bins);
- HDassert(request > 0);
- HDassert(node);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(fspace->sinfo->bins);
+ assert(request > 0);
+ assert(node);
/* Determine correct bin which holds items of at least the section's size */
bin = H5VM_log2_gen(request);
- HDassert(bin < fspace->sinfo->nbins);
+ assert(bin < fspace->sinfo->nbins);
alignment = fspace->alignment;
if (!((alignment > 1) && (request >= fspace->align_thres)))
alignment = 0; /* no alignment */
@@ -1708,13 +1705,13 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
/* Get section node */
curr_sect = (H5FS_section_info_t *)H5SL_item(curr_sect_node);
- HDassert(H5F_addr_defined(curr_sect->addr));
- HDassert(curr_fspace_node->sect_size == curr_sect->size);
+ assert(H5F_addr_defined(curr_sect->addr));
+ assert(curr_fspace_node->sect_size == curr_sect->size);
cls = &fspace->sect_cls[curr_sect->type];
- HDassert(alignment);
- HDassert(cls);
+ assert(alignment);
+ assert(cls);
if ((mis_align = curr_sect->addr % alignment))
frag_size = alignment - mis_align;
@@ -1746,8 +1743,8 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL,
"can't insert free space section into skip list")
/* sanity check */
- HDassert(split_sect->addr < (*node)->addr);
- HDassert(request <= (*node)->size);
+ assert(split_sect->addr < (*node)->addr);
+ assert(request <= (*node)->size);
} /* end if */
/* Indicate that we found a node for the request */
HGOTO_DONE(TRUE)
@@ -1793,10 +1790,10 @@ H5FS_sect_find(H5F_t *f, H5FS_t *fspace, hsize_t request, H5FS_section_info_t **
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->nclasses);
- HDassert(request);
- HDassert(node);
+ assert(fspace);
+ assert(fspace->nclasses);
+ assert(request);
+ assert(node);
/* Check for any sections on free space list */
if (fspace->tot_sect_count > 0) {
@@ -1850,9 +1847,9 @@ H5FS__iterate_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect_info);
- HDassert(udata->fspace);
- HDassert(udata->op);
+ assert(sect_info);
+ assert(udata->fspace);
+ assert(udata->op);
/* Make callback for this section */
if ((*udata->op)(sect_info, udata->op_data) < 0)
@@ -1885,12 +1882,12 @@ H5FS__iterate_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace_node);
- HDassert(udata->fspace);
- HDassert(udata->op);
+ assert(fspace_node);
+ assert(udata->fspace);
+ assert(udata->op);
/* Iterate through all the sections of this size */
- HDassert(fspace_node->sect_list);
+ assert(fspace_node->sect_list);
if (H5SL_iterate(fspace_node->sect_list, H5FS__iterate_sect_cb, udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes")
@@ -1920,8 +1917,8 @@ H5FS_sect_iterate(H5F_t *f, H5FS_t *fspace, H5FS_operator_t op, void *op_data)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(fspace);
- HDassert(op);
+ assert(fspace);
+ assert(op);
/* Set up user data for iterator */
udata.fspace = fspace;
@@ -1974,7 +1971,7 @@ H5FS_sect_stats(const H5FS_t *fspace, hsize_t *tot_space, hsize_t *nsects)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fspace);
+ assert(fspace);
/* Get the stats desired */
if (tot_space)
@@ -2010,10 +2007,10 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(fspace);
- HDassert(sect);
- HDassert(sect->type < fspace->nclasses);
- HDassert(new_class < fspace->nclasses);
+ assert(fspace);
+ assert(sect);
+ assert(sect->type < fspace->nclasses);
+ assert(new_class < fspace->nclasses);
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -2038,16 +2035,16 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint
to_ghost = TRUE;
/* Sanity check */
- HDassert(fspace->sinfo->bins);
+ assert(fspace->sinfo->bins);
/* Determine correct bin which holds items of at least the section's size */
bin = H5VM_log2_gen(sect->size);
- HDassert(bin < fspace->sinfo->nbins);
- HDassert(fspace->sinfo->bins[bin].bin_list);
+ assert(bin < fspace->sinfo->nbins);
+ assert(fspace->sinfo->bins[bin].bin_list);
/* Get space node for section's size */
fspace_node = (H5FS_node_t *)H5SL_search(fspace->sinfo->bins[bin].bin_list, &sect->size);
- HDassert(fspace_node);
+ assert(fspace_node);
/* Adjust serializable/ghost counts */
if (to_ghost) {
@@ -2216,8 +2213,8 @@ H5FS__sect_assert(const H5FS_t *fspace)
cls = &fspace->sect_cls[sect->type];
/* Sanity check section */
- HDassert(H5F_addr_defined(sect->addr));
- HDassert(fspace_node->sect_size == sect->size);
+ assert(H5F_addr_defined(sect->addr));
+ assert(fspace_node->sect_size == sect->size);
if (cls->valid)
(*cls->valid)(cls, sect);
@@ -2236,8 +2233,8 @@ H5FS__sect_assert(const H5FS_t *fspace)
} /* end while */
/* Check the number of serializable & ghost sections of this size */
- HDassert(fspace_node->serial_count == size_serial_count);
- HDassert(fspace_node->ghost_count == size_ghost_count);
+ assert(fspace_node->serial_count == size_serial_count);
+ assert(fspace_node->ghost_count == size_ghost_count);
/* Add to global count of serializable & ghost section sizes */
if (fspace_node->serial_count > 0)
@@ -2254,30 +2251,30 @@ H5FS__sect_assert(const H5FS_t *fspace)
} /* end while */
/* Check the number of serializable & ghost sections in this bin */
- HDassert(fspace->sinfo->bins[u].tot_sect_count == (bin_serial_count + bin_ghost_count));
- HDassert(fspace->sinfo->bins[u].serial_sect_count == bin_serial_count);
- HDassert(fspace->sinfo->bins[u].ghost_sect_count == bin_ghost_count);
+ assert(fspace->sinfo->bins[u].tot_sect_count == (bin_serial_count + bin_ghost_count));
+ assert(fspace->sinfo->bins[u].serial_sect_count == bin_serial_count);
+ assert(fspace->sinfo->bins[u].ghost_sect_count == bin_ghost_count);
} /* end if */
} /* end for */
/* Check counts from bins vs. global counts */
- HDassert(fspace->sinfo->tot_size_count == acc_tot_size_count);
- HDassert(fspace->sinfo->serial_size_count == acc_serial_size_count);
- HDassert(fspace->sinfo->ghost_size_count == acc_ghost_size_count);
- HDassert(fspace->tot_sect_count == acc_tot_sect_count);
- HDassert(fspace->serial_sect_count == acc_serial_sect_count);
- HDassert(fspace->ghost_sect_count == acc_ghost_sect_count);
+ assert(fspace->sinfo->tot_size_count == acc_tot_size_count);
+ assert(fspace->sinfo->serial_size_count == acc_serial_size_count);
+ assert(fspace->sinfo->ghost_size_count == acc_ghost_size_count);
+ assert(fspace->tot_sect_count == acc_tot_sect_count);
+ assert(fspace->serial_sect_count == acc_serial_sect_count);
+ assert(fspace->ghost_sect_count == acc_ghost_sect_count);
} /* end if */
else {
/* Check counts are zero */
- HDassert(fspace->tot_sect_count == 0);
- HDassert(fspace->serial_sect_count == 0);
- HDassert(fspace->ghost_sect_count == 0);
+ assert(fspace->tot_sect_count == 0);
+ assert(fspace->serial_sect_count == 0);
+ assert(fspace->ghost_sect_count == 0);
} /* end else */
/* Make certain that the number of sections on the address list is correct */
if (fspace->sinfo->merge_list)
- HDassert(fspace->tot_sect_count == (separate_obj + H5SL_count(fspace->sinfo->merge_list)));
+ assert(fspace->tot_sect_count == (separate_obj + H5SL_count(fspace->sinfo->merge_list)));
FUNC_LEAVE_NOAPI_VOID
} /* end H5FS__sect_assert() */
@@ -2305,7 +2302,7 @@ H5FS_sect_try_shrink_eoa(H5F_t *f, H5FS_t *fspace, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(fspace);
+ assert(fspace);
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
@@ -2321,14 +2318,14 @@ H5FS_sect_try_shrink_eoa(H5F_t *f, H5FS_t *fspace, void *op_data)
/* Get the pointer to the last section, from the last node */
tmp_sect = (H5FS_section_info_t *)H5SL_item(last_node);
- HDassert(tmp_sect);
+ assert(tmp_sect);
tmp_sect_cls = &fspace->sect_cls[tmp_sect->type];
if (tmp_sect_cls->can_shrink) {
/* Check if the section can be shrunk away */
if ((ret_value = (*tmp_sect_cls->can_shrink)(tmp_sect, op_data)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking container")
if (ret_value > 0) {
- HDassert(tmp_sect_cls->shrink);
+ assert(tmp_sect_cls->shrink);
/* Remove section from free space manager */
if (H5FS__sect_remove_real(fspace, tmp_sect) < 0)
@@ -2401,25 +2398,25 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(fspace);
- HDassert(fs_addr_ptr);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(fspace);
+ assert(fs_addr_ptr);
/* the section info should be unlocked */
- HDassert(fspace->sinfo_lock_count == 0);
+ assert(fspace->sinfo_lock_count == 0);
/* persistent free space managers must be enabled */
- HDassert(f->shared->fs_persist);
+ assert(f->shared->fs_persist);
/* At present, all free space strategies enable the free space managers.
* This will probably change -- at which point this assertion should
* be revisited.
*/
/* Updated: Only the following two strategies enable the free-space managers */
- HDassert((f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR) ||
- (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE));
+ assert((f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR) ||
+ (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE));
if (fspace->serial_sect_count > 0 && fspace->sinfo) {
/* the section info is floating, so space->sinfo should be defined */
@@ -2440,7 +2437,7 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t
hdr_alloc_size = H5FS_HEADER_SIZE(f);
if (H5F_PAGED_AGGR(f))
- HDassert(0 == (eoa % f->shared->fs_page_size));
+ assert(0 == (eoa % f->shared->fs_page_size));
/* Allocate space for the free space header */
if (HADDR_UNDEF == (fspace->addr = H5MF_alloc(f, H5FD_MEM_FSPACE_HDR, hdr_alloc_size)))
@@ -2469,7 +2466,7 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t
sinfo_alloc_size = fspace->sect_size;
if (H5F_PAGED_AGGR(f))
- HDassert(0 == (eoa % f->shared->fs_page_size));
+ assert(0 == (eoa % f->shared->fs_page_size));
/* allocate space for the section info */
if (HADDR_UNDEF == (sect_addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, sinfo_alloc_size)))
diff --git a/src/H5FSstat.c b/src/H5FSstat.c
index 91c9c13..b968580 100644
--- a/src/H5FSstat.c
+++ b/src/H5FSstat.c
@@ -74,8 +74,8 @@ H5FS_stat_info(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *stats)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(frsp);
- HDassert(stats);
+ assert(frsp);
+ assert(stats);
/* Report statistics for free space */
stats->tot_space = frsp->tot_space;
diff --git a/src/H5FStest.c b/src/H5FStest.c
index d913480..1fa4e95 100644
--- a/src/H5FStest.c
+++ b/src/H5FStest.c
@@ -76,8 +76,8 @@ H5FS__get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(frsp);
- HDassert(cparam);
+ assert(frsp);
+ assert(cparam);
cparam->client = frsp->client;
cparam->shrink_percent = frsp->shrink_percent;
@@ -109,8 +109,8 @@ H5FS__cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(cparam1);
- HDassert(cparam2);
+ assert(cparam1);
+ assert(cparam2);
if (cparam1->client < cparam2->client)
HGOTO_DONE(-1)
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 5e39215..ceb019c 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -107,8 +107,8 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f_sh);
- HDassert(buf);
+ assert(f_sh);
+ assert(buf);
/* Translate to file driver I/O info object */
file = f_sh->lf;
@@ -122,7 +122,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si
if (size < H5F_ACCUM_MAX_SIZE) {
/* Sanity check */
- HDassert(!accum->buf || (accum->alloc_size >= accum->size));
+ assert(!accum->buf || (accum->alloc_size >= accum->size));
/* Current read adjoins or overlaps with metadata accumulator */
if (H5F_addr_defined(accum->loc) &&
@@ -152,7 +152,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si
accum->alloc_size = new_alloc_size;
/* Clear the memory */
- HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
+ memset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
} /* end if */
/* Read the part before the metadata accumulator */
@@ -275,11 +275,11 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju
FUNC_ENTER_PACKAGE
- HDassert(accum);
- HDassert(file);
- HDassert(H5F_ACCUM_APPEND == adjust || H5F_ACCUM_PREPEND == adjust);
- HDassert(size > 0);
- HDassert(size <= H5F_ACCUM_MAX_SIZE);
+ assert(accum);
+ assert(file);
+ assert(H5F_ACCUM_APPEND == adjust || H5F_ACCUM_PREPEND == adjust);
+ assert(size > 0);
+ assert(size <= H5F_ACCUM_MAX_SIZE);
/* Check if we need more buffer space */
if ((size + accum->size) > accum->alloc_size) {
@@ -388,7 +388,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju
accum->alloc_size = new_size;
/* Clear the memory */
- HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
+ memset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
} /* end if */
} /* end if */
@@ -418,9 +418,9 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR);
- HDassert(buf);
+ assert(f_sh);
+ assert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR);
+ assert(buf);
/* Translate to file driver pointer */
file = f_sh->lf;
@@ -434,7 +434,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
if (size < H5F_ACCUM_MAX_SIZE) {
/* Sanity check */
- HDassert(!accum->buf || (accum->alloc_size >= accum->size));
+ assert(!accum->buf || (accum->alloc_size >= accum->size));
/* Check if there is already metadata in the accumulator */
if (accum->size > 0) {
@@ -618,7 +618,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
accum->alloc_size = new_alloc_size;
/* Clear the memory */
- HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
+ memset(accum->buf + size, 0, (accum->alloc_size - size));
} /* end if */
/* Copy the new metadata to the buffer */
@@ -665,7 +665,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
/* Clear the memory */
clear_size = MAX(accum->size, size);
- HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
+ memset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
} /* end if */
else {
/* Check if we should shrink the accumulator buffer */
@@ -715,7 +715,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
accum->alloc_size = new_size;
/* Clear the memory */
- HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
+ memset(accum->buf + size, 0, (accum->alloc_size - size));
} /* end if */
/* Update the metadata accumulator information */
@@ -794,7 +794,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
size_t overlap_size; /* Size of overlapping region */
/* Sanity check */
- HDassert(H5F_addr_gt(addr + size, accum->loc + accum->size));
+ assert(H5F_addr_gt(addr + size, accum->loc + accum->size));
/* Compute overlap size */
overlap_size = (size_t)((accum->loc + accum->size) - addr);
@@ -859,7 +859,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f_sh);
+ assert(f_sh);
/* Set up alias for file's metadata accumulator info */
accum = &f_sh->accum;
@@ -874,8 +874,8 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
/* Sanity check */
/* (The metadata accumulator should not intersect w/raw data */
- HDassert(H5FD_MEM_DRAW != type);
- HDassert(H5FD_MEM_GHEAP != type); /* (global heap data is being treated as raw data currently) */
+ assert(H5FD_MEM_DRAW != type);
+ assert(H5FD_MEM_GHEAP != type); /* (global heap data is being treated as raw data currently) */
/* Check for overlapping the beginning of the accumulator */
if (H5F_addr_le(addr, accum->loc)) {
@@ -952,7 +952,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
write_size = (size_t)(dirty_end - tail_addr);
dirty_delta = accum->dirty_len - write_size;
- HDassert(write_size > 0);
+ assert(write_size > 0);
/* Write out the unfreed dirty region of the accumulator */
if (H5FD_write(file, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size,
@@ -973,7 +973,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
write_size = (size_t)(dirty_end - tail_addr);
dirty_delta = accum->dirty_len - write_size;
- HDassert(write_size > 0);
+ assert(write_size > 0);
/* Write out the unfreed end of the dirty region of the accumulator */
if (H5FD_write(file, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size,
@@ -1023,7 +1023,7 @@ H5F__accum_flush(H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Check if we need to flush out the metadata accumulator */
if ((f_sh->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && f_sh->accum.dirty) {
@@ -1065,7 +1065,7 @@ H5F__accum_reset(H5F_shared_t *f_sh, hbool_t flush)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Flush any dirty data in accumulator, if requested */
if (flush)
diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c
index 1eb8b2a..7d64a12 100644
--- a/src/H5Fcwfs.c
+++ b/src/H5Fcwfs.c
@@ -99,9 +99,9 @@ H5F_cwfs_add(H5F_t *f, H5HG_heap_t *heap)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(heap);
+ assert(f);
+ assert(f->shared);
+ assert(heap);
/*
* Add the new heap to the CWFS list, removing some other entry if
@@ -158,9 +158,9 @@ H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(addr);
+ assert(f);
+ assert(f->shared);
+ assert(addr);
/* Note that we don't have metadata cache locks on the entries in
* f->shared->cwfs.
@@ -254,9 +254,9 @@ H5F_cwfs_advance_heap(H5F_t *f, H5HG_heap_t *heap, hbool_t add_heap)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(heap);
+ assert(f);
+ assert(f->shared);
+ assert(heap);
for (u = 0; u < f->shared->ncwfs; u++)
if (f->shared->cwfs[u] == heap) {
@@ -296,8 +296,8 @@ H5F_cwfs_remove_heap(H5F_shared_t *shared, H5HG_heap_t *heap)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(shared);
- HDassert(heap);
+ assert(shared);
+ assert(heap);
/* Remove the heap from the CWFS list */
for (u = 0; u < shared->ncwfs; u++) {
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c
index 99dfca3..2d22efa 100644
--- a/src/H5Fdbg.c
+++ b/src/H5Fdbg.c
@@ -50,10 +50,10 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Get property list */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id)))
@@ -64,55 +64,55 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get userblock size")
/* debug */
- HDfprintf(stream, "%*sFile Super Block...\n", indent, "");
+ fprintf(stream, "%*sFile Super Block...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "File name (as opened):", H5F_OPEN_NAME(f));
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f));
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "File access flags", f->shared->flags);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "File open reference count:", f->shared->nrefs);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (abs)\n", indent, "", fwidth,
- "Address of super block:", f->shared->sblock->base_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " bytes\n", indent, "", fwidth,
- "Size of userblock:", userblock_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "File name (as opened):", H5F_OPEN_NAME(f));
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f));
+ fprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "File access flags", f->shared->flags);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "File open reference count:", f->shared->nrefs);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (abs)\n", indent, "", fwidth,
+ "Address of super block:", f->shared->sblock->base_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " bytes\n", indent, "", fwidth,
+ "Size of userblock:", userblock_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Superblock version number:", f->shared->sblock->super_vers);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Superblock version number:", f->shared->sblock->super_vers);
/* Hard-wired versions */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION);
-
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
- "Size of file offsets (haddr_t type):", (unsigned)f->shared->sizeof_addr);
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
- "Size of file lengths (hsize_t type):", (unsigned)f->shared->sizeof_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]);
- HDfprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth,
- "File status flags:", (unsigned)(f->shared->sblock->status_flags));
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
- "Superblock extension address:", f->shared->sblock->ext_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
- "Shared object header message table address:", f->shared->sohm_addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Shared object header message version number:", (unsigned)f->shared->sohm_vers);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of shared object header message indexes:", (unsigned)f->shared->sohm_nindexes);
-
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
- "Address of driver information block:", f->shared->sblock->driver_addr);
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Root group symbol table entry:", f->shared->root_grp ? "" : "(none)");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION);
+
+ fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
+ "Size of file offsets (haddr_t type):", (unsigned)f->shared->sizeof_addr);
+ fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
+ "Size of file lengths (hsize_t type):", (unsigned)f->shared->sizeof_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]);
+ fprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth,
+ "File status flags:", (unsigned)(f->shared->sblock->status_flags));
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
+ "Superblock extension address:", f->shared->sblock->ext_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
+ "Shared object header message table address:", f->shared->sohm_addr);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Shared object header message version number:", (unsigned)f->shared->sohm_vers);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of shared object header message indexes:", (unsigned)f->shared->sohm_nindexes);
+
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
+ "Address of driver information block:", f->shared->sblock->driver_addr);
+
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Root group symbol table entry:", f->shared->root_grp ? "" : "(none)");
if (f->shared->root_grp) {
if (f->shared->sblock->root_ent) /* Use real root group symbol table entry */
H5G__ent_debug(f->shared->sblock->root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL);
@@ -125,7 +125,7 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
/* Build up a simulated root group symbol table entry */
root_oloc = H5G_oloc(f->shared->root_grp);
- HDassert(root_oloc);
+ assert(root_oloc);
root_ent.type = H5G_NOTHING_CACHED;
root_ent.header = root_oloc->addr;
diff --git a/src/H5Fefc.c b/src/H5Fefc.c
index e7de395..6f8a2cb 100644
--- a/src/H5Fefc.c
+++ b/src/H5Fefc.c
@@ -95,7 +95,7 @@ H5F__efc_create(unsigned max_nfiles)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(max_nfiles > 0);
+ assert(max_nfiles > 0);
/* Allocate EFC struct */
if (NULL == (efc = H5FL_CALLOC(H5F_efc_t)))
@@ -148,7 +148,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(name);
+ assert(name);
/* Get the VOL info from the fapl */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -189,7 +189,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
ent = (H5F_efc_ent_t *)H5SL_search(efc->slist, name);
} /* end if */
else {
- HDassert(efc->nfiles == 0);
+ assert(efc->nfiles == 0);
if (NULL == (efc->slist = H5SL_create(H5SL_TYPE_STR, NULL)))
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, NULL, "can't create skip list")
} /* end else */
@@ -197,12 +197,12 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
/* If we found the file update the LRU list and return the cached file,
* otherwise open the file and cache it */
if (ent) {
- HDassert(efc->LRU_head);
- HDassert(efc->LRU_tail);
+ assert(efc->LRU_head);
+ assert(efc->LRU_tail);
/* Move ent to the head of the LRU list, if it is not already there */
if (ent->LRU_prev) {
- HDassert(efc->LRU_head != ent);
+ assert(efc->LRU_head != ent);
/* Remove from current position. Note that once we touch the LRU
* list we cannot revert to the previous state. Make sure there can
@@ -211,7 +211,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
if (ent->LRU_next)
ent->LRU_next->LRU_prev = ent->LRU_prev;
else {
- HDassert(efc->LRU_tail == ent);
+ assert(efc->LRU_tail == ent);
efc->LRU_tail = ent->LRU_prev;
} /* end else */
ent->LRU_prev->LRU_next = ent->LRU_next;
@@ -292,7 +292,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
ent->LRU_prev = NULL;
efc->LRU_head = ent;
if (!efc->LRU_tail) {
- HDassert(!ent->LRU_next);
+ assert(!ent->LRU_next);
efc->LRU_tail = ent;
} /* end if */
@@ -305,10 +305,10 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
ent->file->shared->efc->nrefs++;
} /* end else */
- HDassert(ent);
- HDassert(ent->file);
- HDassert(ent->name);
- HDassert(ent->nopen);
+ assert(ent);
+ assert(ent->file);
+ assert(ent->name);
+ assert(ent->nopen);
/* Set the return value */
ret_value = ent->file;
@@ -353,10 +353,10 @@ H5F_efc_close(H5F_t *parent, H5F_t *file)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
- HDassert(parent);
- HDassert(parent->shared);
- HDassert(file);
- HDassert(file->shared);
+ assert(parent);
+ assert(parent->shared);
+ assert(file);
+ assert(file->shared);
/* Get external file cache */
efc = parent->shared->efc;
@@ -410,8 +410,8 @@ H5F__efc_max_nfiles(H5F_efc_t *efc)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(efc);
- HDassert(efc->max_nfiles > 0);
+ assert(efc);
+ assert(efc->max_nfiles > 0);
FUNC_LEAVE_NOAPI(efc->max_nfiles)
} /* end H5F__efc_max_nfiles */
@@ -441,14 +441,14 @@ H5F__efc_release_real(H5F_efc_t *efc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(efc);
+ assert(efc);
/* Lock the EFC to prevent manipulation of the EFC while we are releasing it.
* The EFC should never be locked when we enter this function because that
* would require a cycle, a cycle would necessarily invoke
* H5F__efc_try_close(), and that function checks the status of the lock
* before calling this one. */
- HDassert((efc->tag == H5F_EFC_TAG_DEFAULT) || (efc->tag == H5F_EFC_TAG_CLOSE));
+ assert((efc->tag == H5F_EFC_TAG_DEFAULT) || (efc->tag == H5F_EFC_TAG_CLOSE));
efc->tag = H5F_EFC_TAG_LOCK;
/* Walk down the LRU list, releasing any files that are not opened by an EFC
@@ -499,7 +499,7 @@ H5F__efc_release(H5F_efc_t *efc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(efc);
+ assert(efc);
/* Call 'real' routine */
if (H5F__efc_release_real(efc) < 0)
@@ -532,7 +532,7 @@ H5F__efc_destroy(H5F_efc_t *efc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(efc);
+ assert(efc);
if (efc->nfiles > 0) {
/* Release (clear) the efc */
@@ -544,9 +544,9 @@ H5F__efc_destroy(H5F_efc_t *efc)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't destroy EFC after incomplete release")
} /* end if */
- HDassert(efc->nfiles == 0);
- HDassert(efc->LRU_head == NULL);
- HDassert(efc->LRU_tail == NULL);
+ assert(efc->nfiles == 0);
+ assert(efc->LRU_head == NULL);
+ assert(efc->LRU_tail == NULL);
/* Close skip list */
if (efc->slist)
@@ -582,9 +582,9 @@ H5F__efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(efc);
- HDassert(efc->slist);
- HDassert(ent);
+ assert(efc);
+ assert(efc->slist);
+ assert(ent);
/* Remove from skip list */
if (ent != H5SL_remove(efc->slist, ent->name))
@@ -594,13 +594,13 @@ H5F__efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
if (ent->LRU_next)
ent->LRU_next->LRU_prev = ent->LRU_prev;
else {
- HDassert(efc->LRU_tail == ent);
+ assert(efc->LRU_tail == ent);
efc->LRU_tail = ent->LRU_prev;
} /* end else */
if (ent->LRU_prev)
ent->LRU_prev->LRU_next = ent->LRU_next;
else {
- HDassert(efc->LRU_head == ent);
+ assert(efc->LRU_head == ent);
efc->LRU_head = ent->LRU_next;
} /* end else */
@@ -648,12 +648,12 @@ H5F__efc_try_close_tag1(H5F_shared_t *sf, H5F_shared_t **tail)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(sf);
- HDassert(sf->efc);
- HDassert((sf->efc->tag > 0) || (sf->nrefs == sf->efc->nrefs));
- HDassert(sf->efc->tag != H5F_EFC_TAG_LOCK);
- HDassert(tail);
- HDassert(*tail);
+ assert(sf);
+ assert(sf->efc);
+ assert((sf->efc->tag > 0) || (sf->nrefs == sf->efc->nrefs));
+ assert(sf->efc->tag != H5F_EFC_TAG_LOCK);
+ assert(tail);
+ assert(*tail);
/* Recurse into this file's cached files */
for (ent = sf->efc->LRU_head; ent; ent = ent->LRU_next) {
@@ -662,7 +662,7 @@ H5F__efc_try_close_tag1(H5F_shared_t *sf, H5F_shared_t **tail)
if (esf->efc) {
/* If tag were 0, that would mean there are more actual references
* than are counted by nrefs */
- HDassert(esf->efc->tag != 0);
+ assert(esf->efc->tag != 0);
/* If tag has been set, we have already visited this file so just
* decrement tag and continue */
@@ -678,7 +678,7 @@ H5F__efc_try_close_tag1(H5F_shared_t *sf, H5F_shared_t **tail)
!(ent->nopen)) {
/* If we get here, this file's "tmp_next" pointer must be NULL
*/
- HDassert(esf->efc->tmp_next == NULL);
+ assert(esf->efc->tmp_next == NULL);
/* If nrefs > 1, Add this file to the list of files with nrefs >
* 1 and initialize tag to the number of references (except this
@@ -721,8 +721,8 @@ H5F__efc_try_close_tag2(H5F_shared_t *sf, H5F_shared_t **tail)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(sf);
- HDassert(sf->efc);
+ assert(sf);
+ assert(sf->efc);
/* Recurse into this file's cached files */
for (ent = sf->efc->LRU_head; ent; ent = ent->LRU_next) {
@@ -741,8 +741,8 @@ H5F__efc_try_close_tag2(H5F_shared_t *sf, H5F_shared_t **tail)
((esf->efc->tag == H5F_EFC_TAG_DEFAULT) && (esf->nrefs == esf->efc->nrefs) && !(ent->nopen)))) {
/* tag should always be CLOSE is nrefs > 1 or DEFAULT if nrefs == 1
* here */
- HDassert(((esf->nrefs > 1) && ((esf->efc->tag == H5F_EFC_TAG_CLOSE))) ||
- ((esf->nrefs == 1) && (esf->efc->tag == H5F_EFC_TAG_DEFAULT)));
+ assert(((esf->nrefs > 1) && ((esf->efc->tag == H5F_EFC_TAG_CLOSE))) ||
+ ((esf->nrefs == 1) && (esf->efc->tag == H5F_EFC_TAG_DEFAULT)));
/* If tag is set to DONTCLOSE, we have already visited this file
* *or* it will be the start point of another iteration so just
@@ -831,12 +831,12 @@ H5F__efc_try_close(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->efc);
- HDassert(f->shared->nrefs > f->shared->efc->nrefs);
- HDassert(f->shared->nrefs > 1);
- HDassert(f->shared->efc->tag < 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->efc);
+ assert(f->shared->nrefs > f->shared->efc->nrefs);
+ assert(f->shared->nrefs > 1);
+ assert(f->shared->efc->tag < 0);
if (f->shared->efc->tag == H5F_EFC_TAG_CLOSE) {
/* We must have reentered this function, and we should close this file.
@@ -852,7 +852,7 @@ H5F__efc_try_close(H5F_t *f)
* detect that the parent file is open (directly or through an EFC) and
* refuse to close it. Verify that all files were released from this
* EFC (i.e. none were open). */
- HDassert(f->shared->efc->nfiles == 0);
+ assert(f->shared->efc->nfiles == 0);
HGOTO_DONE(SUCCEED)
} /* end if */
@@ -880,8 +880,8 @@ H5F__efc_try_close(H5F_t *f)
* removed from an EFC), and should have been caught by the above check */
/* If we get here then we must be beginning a new run. Make sure that the
* temporary variables in f->shared->efc are at the default value */
- HDassert(f->shared->efc->tag == H5F_EFC_TAG_DEFAULT);
- HDassert(f->shared->efc->tmp_next == NULL);
+ assert(f->shared->efc->tag == H5F_EFC_TAG_DEFAULT);
+ assert(f->shared->efc->tmp_next == NULL);
/* Set up linked list for traversal into EFC tree. f->shared is guaranteed
* to always be at the head. */
@@ -915,11 +915,11 @@ H5F__efc_try_close(H5F_t *f)
sf = f->shared;
tail = NULL;
while (sf) {
- HDassert(sf->efc->tag >= 0);
+ assert(sf->efc->tag >= 0);
next = sf->efc->tmp_next;
if (sf->efc->tag > 0) {
/* Remove from main list */
- HDassert(tail);
+ assert(tail);
tail->efc->tmp_next = sf->efc->tmp_next;
sf->efc->tmp_next = NULL;
@@ -950,7 +950,7 @@ H5F__efc_try_close(H5F_t *f)
sf = uncloseable_head;
if (sf) {
tail = uncloseable_tail;
- HDassert(tail);
+ assert(tail);
while (sf != tail->efc->tmp_next) {
H5F__efc_try_close_tag2(sf, &uncloseable_tail);
sf = sf->efc->tmp_next;
@@ -966,7 +966,7 @@ H5F__efc_try_close(H5F_t *f)
/* Make sure the file's reference count is now 1 and will be closed by
* H5F_dest(). */
- HDassert(f->shared->nrefs == 1);
+ assert(f->shared->nrefs == 1);
} /* end if */
/* Clean up uncloseable files (reset tag and tmp_next). All closeable files
@@ -975,7 +975,7 @@ H5F__efc_try_close(H5F_t *f)
sf = uncloseable_head;
while (sf) {
next = sf->efc->tmp_next;
- HDassert(sf->efc->tag == H5F_EFC_TAG_DONTCLOSE);
+ assert(sf->efc->tag == H5F_EFC_TAG_DONTCLOSE);
sf->efc->tag = H5F_EFC_TAG_DEFAULT;
sf->efc->tmp_next = NULL;
sf = next;
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 27a9075..3cea9d6 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -209,7 +209,7 @@ H5F__close_cb(H5VL_object_t *file_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file_vol_obj);
+ assert(file_vol_obj);
/* Close the file */
if (H5VL_file_close(file_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
@@ -275,7 +275,7 @@ H5F__set_vol_conn(H5F_t *file)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
+ assert(file);
/* Retrieve a copy of the "top-level" connector property, before any pass-through
* connectors modified or unwrapped it.
@@ -284,7 +284,7 @@ H5F__set_vol_conn(H5F_t *file)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL connector info from API context")
/* Sanity check */
- HDassert(0 != connector_prop.connector_id);
+ assert(0 != connector_prop.connector_id);
/* Retrieve the connector for the ID */
if (NULL == (file->shared->vol_cls = (H5VL_class_t *)H5I_object(connector_prop.connector_id)))
@@ -336,7 +336,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Check args */
- HDassert(f);
+ assert(f);
/* Make a copy of the default file access property list */
if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g)))
@@ -469,7 +469,7 @@ H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_i
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(obj_id_count_ptr);
+ assert(obj_id_count_ptr);
/* Perform the query */
if ((ret_value = H5F__get_objects(f, types, 0, NULL, app_ref, obj_id_count_ptr)) < 0)
@@ -496,7 +496,7 @@ H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(obj_id_count_ptr);
+ assert(obj_id_count_ptr);
/* Perform the query */
if ((ret_value = H5F__get_objects(f, types, max_objs, oid_list, app_ref, obj_id_count_ptr)) < 0)
@@ -527,7 +527,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj_id_count_ptr);
+ assert(obj_id_count_ptr);
/* Set up search information */
olist.obj_id_list = (max_nobjs == 0 ? NULL : obj_id_list);
@@ -628,8 +628,8 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
FUNC_ENTER_PACKAGE
- HDassert(obj_ptr);
- HDassert(olist);
+ assert(obj_ptr);
+ assert(olist);
/* Count file IDs */
if (olist->obj_type == H5I_FILE) {
@@ -816,8 +816,8 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c
FUNC_ENTER_NOAPI_NOINIT
- HDassert(primary_file);
- HDassert(primary_file->shared);
+ assert(primary_file);
+ assert(primary_file->shared);
efc = primary_file->shared->efc;
@@ -843,7 +843,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c
/* Get last component of file_name */
H5_GET_LAST_DELIMITER(file_name, ptr)
- HDassert(ptr);
+ assert(ptr);
/* Increment past delimiter */
ptr++;
@@ -1097,7 +1097,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
f->id_exists = FALSE;
if (shared) {
- HDassert(lf == NULL);
+ assert(lf == NULL);
f->shared = shared;
}
else {
@@ -1105,7 +1105,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
unsigned efc_size; /* External file cache size */
size_t u; /* Local index variable */
- HDassert(lf != NULL);
+ assert(lf != NULL);
if (NULL == (f->shared = H5FL_CALLOC(H5F_shared_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure")
@@ -1147,7 +1147,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get byte number for object size")
if (H5P_get(plist, H5F_CRT_SHMSG_NINDEXES_NAME, &f->shared->sohm_nindexes) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get number of SOHM indexes")
- HDassert(f->shared->sohm_nindexes < 255);
+ assert(f->shared->sohm_nindexes < 255);
if (H5P_get(plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &f->shared->fs_strategy) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file space strategy")
if (H5P_get(plist, H5F_CRT_FREE_SPACE_PERSIST_NAME, &f->shared->fs_persist) < 0)
@@ -1156,7 +1156,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get free-space section threshold")
if (H5P_get(plist, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, &f->shared->fs_page_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file space page size")
- HDassert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
+ assert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
/* Temporary for multi/split drivers: fail file creation
* when persisting free-space or using paged aggregation strategy.
@@ -1322,7 +1322,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
done:
if (!ret_value && f) {
- HDassert(NULL == f->vol_obj);
+ assert(NULL == f->vol_obj);
if (!shared) {
/* Attempt to clean up some of the shared file structures */
@@ -1361,8 +1361,8 @@ H5F__dest(H5F_t *f, hbool_t flush)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (1 == f->shared->nrefs) {
int actype; /* metadata cache type (enum value) */
@@ -1402,7 +1402,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
*
* Verify this.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Release the external file cache */
if (f->shared->efc) {
@@ -1418,7 +1418,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
*
* Verify this.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Release objects that depend on the superblock being initialized */
if (f->shared->sblock) {
@@ -1446,7 +1446,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
/* at this point, only the superblock and superblock
* extension should be dirty.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Flush the file again (if requested), as shutting down the
* free space manager may dirty some data structures again.
@@ -1480,7 +1480,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
/* at this point, only the superblock and superblock
* extension should be dirty.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
} /* end if */
} /* end if */
@@ -1504,7 +1504,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
*
* Verify this.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Remove shared file struct from list of open files */
if (H5F__sfile_remove(f->shared) < 0)
@@ -2142,7 +2142,7 @@ H5F__post_open(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check arguments */
- HDassert(f);
+ assert(f);
/* Store a vol object in the file struct */
if (NULL == (f->vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, f, f->shared->vol_id)))
@@ -2169,7 +2169,7 @@ H5F__flush_phase1(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check arguments */
- HDassert(f);
+ assert(f);
/* Flush any cached dataset storage raw data */
if (H5D_flush_all(f) < 0)
@@ -2206,7 +2206,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing)
FUNC_ENTER_PACKAGE
/* Sanity check arguments */
- HDassert(f);
+ assert(f);
/* Inform the metadata cache that we are about to flush */
if (H5AC_prep_for_file_flush(f) < 0)
@@ -2285,7 +2285,7 @@ H5F__flush(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check arguments */
- HDassert(f);
+ assert(f);
/* First phase of flushing data */
if (H5F__flush_phase1(f) < 0)
@@ -2329,7 +2329,7 @@ H5F__close(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Perform checks for "semi" file close degree here, since closing the
* file is not allowed if there are objects still open.
@@ -2377,7 +2377,7 @@ H5F__delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
/* Delete the file */
if (H5FD_delete(filename, fapl_id) < 0)
@@ -2409,8 +2409,8 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Set the was_closed flag to the default value.
* This flag lets downstream code know if the file struct is
@@ -2462,7 +2462,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
/* Sanity check: If close degree if "semi" and we have gotten this
* far and there are objects left open, bail out now.
*/
- HDassert(nopen_files == 0 && nopen_objs == 0);
+ assert(nopen_files == 0 && nopen_objs == 0);
/* If we've gotten this far (ie. there are no open objects in the file), fall through to flush &
* close */
@@ -2487,7 +2487,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
/* If the file close degree is "strong", close all the open objects in this file */
if (f->shared->fc_degree == H5F_CLOSE_STRONG) {
- HDassert(nopen_files == 0);
+ assert(nopen_files == 0);
/* Forced close of all opened objects in this file */
if (f->nopen_objs > 0) {
@@ -2616,7 +2616,7 @@ H5F_get_id(H5F_t *file)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(file);
+ assert(file);
if (H5I_find_id(file, H5I_FILE, &ret_value) < 0 || H5I_INVALID_HID == ret_value) {
/* resurrect the ID - Register an ID with the native connector */
@@ -2649,7 +2649,7 @@ H5F_incr_nopen_objs(H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(++f->nopen_objs)
} /* end H5F_incr_nopen_objs() */
@@ -2669,7 +2669,7 @@ H5F_decr_nopen_objs(H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(--f->nopen_objs)
} /* end H5F_decr_nopen_objs() */
@@ -2698,10 +2698,10 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(fapl);
- HDassert(name);
- HDassert(actual_name);
+ assert(f);
+ assert(fapl);
+ assert(name);
+ assert(actual_name);
/* Clear actual name pointer to begin with */
*actual_name = NULL;
@@ -2816,15 +2816,15 @@ H5F_addr_encode_len(size_t addr_len, uint8_t **pp /*in,out*/, haddr_t addr)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(addr_len);
- HDassert(pp && *pp);
+ assert(addr_len);
+ assert(pp && *pp);
if (H5F_addr_defined(addr)) {
for (u = 0; u < addr_len; u++) {
*(*pp)++ = (uint8_t)(addr & 0xff);
addr >>= 8;
} /* end for */
- HDassert("overflow" && 0 == addr);
+ assert("overflow" && 0 == addr);
} /* end if */
else {
for (u = 0; u < addr_len; u++)
@@ -2850,7 +2850,7 @@ H5F_addr_encode(const H5F_t *f, uint8_t **pp /*in,out*/, haddr_t addr)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
H5F_addr_encode_len(H5F_SIZEOF_ADDR(f), pp, addr);
@@ -2879,9 +2879,9 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp /*in,out*/, haddr_t *add
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(addr_len);
- HDassert(pp && *pp);
- HDassert(addr_p);
+ assert(addr_len);
+ assert(pp && *pp);
+ assert(addr_p);
/* Reset value in destination */
*addr_p = 0;
@@ -2907,8 +2907,8 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp /*in,out*/, haddr_t *add
*addr_p |= tmp;
} /* end if */
else if (!all_zero)
- HDassert(0 == **pp); /*overflow */
- } /* end for */
+ assert(0 == **pp); /*overflow */
+ } /* end for */
/* If 'all_zero' is still TRUE, the address was entirely composed of '0xff'
* bytes, which is the encoded form of 'HADDR_UNDEF', so set the destination
@@ -2938,7 +2938,7 @@ H5F_addr_decode(const H5F_t *f, const uint8_t **pp /*in,out*/, haddr_t *addr_p /
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
H5F_addr_decode_len(H5F_SIZEOF_ADDR(f), pp, addr_p);
@@ -2960,9 +2960,9 @@ H5F_set_grp_btree_shared(H5F_t *f, H5UC_t *rc)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(rc);
+ assert(f);
+ assert(f->shared);
+ assert(rc);
f->shared->grp_btree_shared = rc;
@@ -2984,8 +2984,8 @@ H5F_set_sohm_addr(H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->sohm_addr = addr;
@@ -3007,8 +3007,8 @@ H5F_set_sohm_vers(H5F_t *f, unsigned vers)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->sohm_vers = vers;
@@ -3030,8 +3030,8 @@ H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->sohm_nindexes = nindexes;
@@ -3053,8 +3053,8 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->store_msg_crt_idx = flag;
@@ -3083,8 +3083,8 @@ H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Set the bounds only if the existing setting is different from the inputs */
if (f->shared->low_bound != low || f->shared->high_bound != high) {
@@ -3213,7 +3213,7 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, size_t *image_le
tmp_size = H5F_SUPER_STATUS_FLAGS_SIZE(file->shared->sblock->super_vers);
/* Clear "status_flags" */
- HDmemset((uint8_t *)buf_ptr + tmp, 0, tmp_size);
+ memset((uint8_t *)buf_ptr + tmp, 0, tmp_size);
} /* end if */
/* Set *image_len = to EOA */
@@ -3240,12 +3240,12 @@ H5F__get_info(H5F_t *f, H5F_info2_t *finfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(finfo);
+ assert(f);
+ assert(f->shared);
+ assert(finfo);
/* Reset file info struct */
- HDmemset(finfo, 0, sizeof(*finfo));
+ memset(finfo, 0, sizeof(*finfo));
/* Get the size of the superblock and any superblock extensions */
if (H5F__super_size(f, &finfo->super.super_size, &finfo->super.super_ext_size) < 0)
@@ -3291,12 +3291,12 @@ H5F_track_metadata_read_retries(H5F_t *f, unsigned actype, unsigned retries)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared->read_attempts > 1);
- HDassert(f->shared->retries_nbins > 0);
- HDassert(retries > 0);
- HDassert(retries < f->shared->read_attempts);
- HDassert(actype < H5AC_NTYPES);
+ assert(f);
+ assert(f->shared->read_attempts > 1);
+ assert(f->shared->retries_nbins > 0);
+ assert(retries > 0);
+ assert(retries < f->shared->read_attempts);
+ assert(actype < H5AC_NTYPES);
/* Allocate memory for retries */
if (NULL == f->shared->retries[actype])
@@ -3307,7 +3307,7 @@ H5F_track_metadata_read_retries(H5F_t *f, unsigned actype, unsigned retries)
/* Index to retries based on log10 */
tmp = HDlog10((double)retries);
log_ind = (unsigned)tmp;
- HDassert(log_ind < f->shared->retries_nbins);
+ assert(log_ind < f->shared->retries_nbins);
/* Increment the # of the "retries" */
f->shared->retries[actype][log_ind]++;
@@ -3335,10 +3335,10 @@ H5F_set_retries(H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Initialize the tracking for metadata read retries */
- HDmemset(f->shared->retries, 0, sizeof(f->shared->retries));
+ memset(f->shared->retries, 0, sizeof(f->shared->retries));
/* Initialize the # of bins for retries */
f->shared->retries_nbins = 0;
@@ -3370,8 +3370,8 @@ H5F_object_flush_cb(H5F_t *f, hid_t obj_id)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Invoke object flush callback if there is one */
if (f->shared->object_flush.func &&
@@ -3397,8 +3397,8 @@ H5F__set_base_addr(const H5F_t *f, haddr_t addr)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Dispatch to driver */
if (H5FD_set_base_addr(f->shared->lf, addr) < 0)
@@ -3423,8 +3423,8 @@ H5F__set_eoa(const H5F_t *f, H5F_mem_t type, haddr_t addr)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Dispatch to driver */
/* (H5FD_set_eoa() will add base_addr to addr) */
@@ -3451,8 +3451,8 @@ H5F__set_paged_aggr(const H5F_t *f, hbool_t paged)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Dispatch to driver */
if (H5FD_set_paged_aggr(f->shared->lf, paged) < 0)
@@ -3481,8 +3481,8 @@ H5F__get_max_eof_eoa(const H5F_t *f, haddr_t *max_eof_eoa)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Get the relative EOA and EOF */
eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT);
@@ -3519,14 +3519,14 @@ H5F_get_metadata_read_retry_info(H5F_t *file, H5F_retry_info_t *info)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(file);
- HDassert(info);
+ assert(file);
+ assert(info);
/* Copy the # of bins for "retries" array */
info->nbins = file->shared->retries_nbins;
/* Initialize the array of "retries" */
- HDmemset(info->retries, 0, sizeof(info->retries));
+ memset(info->retries, 0, sizeof(info->retries));
/* Return if there are no bins -- no retries */
if (!info->nbins)
@@ -3560,7 +3560,7 @@ H5F_get_metadata_read_retry_info(H5F_t *file, H5F_retry_info_t *info)
case H5AC_FARRAY_DBLOCK_ID:
case H5AC_FARRAY_DBLK_PAGE_ID:
case H5AC_SUPERBLOCK_ID:
- HDassert(j < H5F_NUM_METADATA_READ_RETRY_TYPES);
+ assert(j < H5F_NUM_METADATA_READ_RETRY_TYPES);
if (file->shared->retries[i] != NULL) {
/* Allocate memory for retries[i]
*
@@ -3641,8 +3641,8 @@ H5F__start_swmr_write(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Should have write permission */
if ((H5F_INTENT(f) & H5F_ACC_RDWR) == 0)
@@ -3701,7 +3701,7 @@ H5F__start_swmr_write(H5F_t *f)
* or ensure 0 cannot be a valid value and check for 0 at cleanup. */
if ((obj_apl_ids = (hid_t *)H5MM_calloc(grp_dset_count * sizeof(hid_t))) == NULL)
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for hid_t")
- HDassert(obj_apl_ids[0] == H5P_DEFAULT);
+ assert(obj_apl_ids[0] == H5P_DEFAULT);
/* Get the list of opened object ids (groups & datasets) */
if (H5F_get_obj_ids(f, H5F_OBJ_GROUP | H5F_OBJ_DATASET, grp_dset_count, obj_ids, FALSE,
@@ -3918,8 +3918,8 @@ H5F__format_convert(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Check if the superblock should be downgraded */
if (f->shared->sblock->super_vers > HDF5_SUPERBLOCK_VERSION_V18_LATEST) {
@@ -4044,8 +4044,8 @@ H5F_set_min_dset_ohdr(H5F_t *f, hbool_t minimize)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->crt_dset_min_ohdr_flag = minimize;
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 06812fb..1f25a56 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -88,9 +88,9 @@ H5F_shared_block_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert(buf);
- HDassert(H5F_addr_defined(addr));
+ assert(f_sh);
+ assert(buf);
+ assert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
if (H5F_addr_le(f_sh->tmp_addr, (addr + size)))
@@ -130,10 +130,10 @@ H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(buf);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(buf);
+ assert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
if (H5F_addr_le(f->shared->tmp_addr, (addr + size)))
@@ -173,10 +173,10 @@ H5F_shared_block_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR);
- HDassert(buf);
- HDassert(H5F_addr_defined(addr));
+ assert(f_sh);
+ assert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR);
+ assert(buf);
+ assert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
if (H5F_addr_le(f_sh->tmp_addr, (addr + size)))
@@ -216,11 +216,11 @@ H5F_block_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, const void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
- HDassert(buf);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(buf);
+ assert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
if (H5F_addr_le(f->shared->tmp_addr, (addr + size)))
@@ -262,12 +262,12 @@ H5F_shared_select_read(H5F_shared_t *f_sh, H5FD_mem_t type, uint32_t count, H5S_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(f_sh);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
@@ -307,12 +307,12 @@ H5F_shared_select_write(H5F_shared_t *f_sh, H5FD_mem_t type, uint32_t count, H5S
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(f_sh);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
@@ -335,11 +335,11 @@ H5F_shared_vector_read(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[], h
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(f_sh);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/*
* Note that we don't try to map global heap data to raw
@@ -349,7 +349,7 @@ H5F_shared_vector_read(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[], h
*/
#ifndef NDEBUG
for (uint32_t i = 0; i < count; i++)
- HDassert(types[i] != H5FD_MEM_GHEAP);
+ assert(types[i] != H5FD_MEM_GHEAP);
#endif
/* Pass down to file driver layer (bypass page buffer for now) */
@@ -380,11 +380,11 @@ H5F_shared_vector_write(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[],
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(f_sh);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/*
* Note that we don't try to map global heap data to raw
@@ -394,7 +394,7 @@ H5F_shared_vector_write(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[],
*/
#ifndef NDEBUG
for (uint32_t i = 0; i < count; i++)
- HDassert(types[i] != H5FD_MEM_GHEAP);
+ assert(types[i] != H5FD_MEM_GHEAP);
#endif
/* Pass down to file driver layer (bypass page buffer for now) */
@@ -487,8 +487,8 @@ H5F__evict_cache_entries(H5F_t *f)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Evict all except pinned entries in the cache */
if (H5AC_evict(f) < 0)
@@ -542,8 +542,8 @@ H5F_get_checksums(const uint8_t *buf, size_t buf_size, uint32_t *s_chksum /*out*
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(buf);
- HDassert(buf_size);
+ assert(buf);
+ assert(buf_size);
/* Return the stored checksum */
if (s_chksum) {
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index 6c8543a..de27989 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -47,7 +47,7 @@ H5F__close_mounts(H5F_t *f)
FUNC_ENTER_PACKAGE
- HDassert(f);
+ assert(f);
/* Unmount all child files. Loop backwards to avoid having to adjust u when
* a file is unmounted. Note that we rely on unsigned u "wrapping around"
@@ -75,7 +75,7 @@ H5F__close_mounts(H5F_t *f)
}
}
- HDassert(f->nmounts == 0);
+ assert(f->nmounts == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -111,10 +111,10 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN
FUNC_ENTER_NOAPI(FAIL)
- HDassert(loc);
- HDassert(name && *name);
- HDassert(child);
- HDassert(TRUE == H5P_isa_class(plist_id, H5P_FILE_MOUNT));
+ assert(loc);
+ assert(name && *name);
+ assert(child);
+ assert(TRUE == H5P_isa_class(plist_id, H5P_FILE_MOUNT));
/* Set up group location to fill in */
mp_loc.oloc = &mp_oloc;
@@ -151,11 +151,11 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN
* "took over" the group location - QAK)
*/
parent = H5G_fileof(mount_point);
- HDassert(parent);
+ assert(parent);
mp_loc.oloc = H5G_oloc(mount_point);
- HDassert(mp_loc.oloc);
+ assert(mp_loc.oloc);
mp_loc.path = H5G_nameof(mount_point);
- HDassert(mp_loc.path);
+ assert(mp_loc.path);
for (ancestor = parent; ancestor; ancestor = ancestor->parent)
if (ancestor->shared == child->shared)
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount would introduce a cycle")
@@ -275,8 +275,8 @@ H5F_unmount(const H5G_loc_t *loc, const char *name)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up mount point location to fill in */
mp_loc.oloc = &mp_oloc;
@@ -348,7 +348,7 @@ H5F_unmount(const H5G_loc_t *loc, const char *name)
* Could be different due to the shared mount table. */
parent = child->parent;
} /* end else */
- HDassert(child_idx >= 0);
+ assert(child_idx >= 0);
/* Save the information about the child from the mount table */
child_group = parent->shared->mtab.child[child_idx].group;
@@ -411,7 +411,7 @@ H5F_is_mount(const H5F_t *file)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(file);
+ assert(file);
if (file->parent != NULL)
ret_value = TRUE;
@@ -442,9 +442,9 @@ H5F__mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_ob
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(nopen_files);
- HDassert(nopen_objs);
+ assert(f);
+ assert(nopen_files);
+ assert(nopen_objs);
/* If this file is still open, increment number of file IDs open */
if (H5F_ID_EXISTS(f))
@@ -489,9 +489,9 @@ H5F__mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(nopen_files);
- HDassert(nopen_objs);
+ assert(f);
+ assert(nopen_files);
+ assert(nopen_objs);
/* Find the top file in the mounting hierarchy */
while (f->parent)
@@ -525,7 +525,7 @@ H5F__flush_mounts_recurse(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Flush all child files, not stopping for errors */
for (u = 0; u < f->shared->mtab.nmounts; u++)
@@ -564,7 +564,7 @@ H5F_flush_mounts(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Find the top file in the mount hierarchy */
while (f->parent)
@@ -604,7 +604,7 @@ H5F_traverse_mount(H5O_loc_t *oloc /*in,out*/)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(oloc);
+ assert(oloc);
/*
* The loop is necessary because we might have file1 mounted at the root
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 8936dfc..da3871b 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -89,7 +89,7 @@ H5F_mpi_get_rank(const H5F_t *f)
FUNC_ENTER_NOAPI((-1))
- HDassert(f && f->shared);
+ assert(f && f->shared);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_rank(f->shared->lf)) < 0)
@@ -120,7 +120,7 @@ H5F_mpi_get_comm(const H5F_t *f)
FUNC_ENTER_NOAPI(MPI_COMM_NULL)
- HDassert(f && f->shared);
+ assert(f && f->shared);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_comm(f->shared->lf)) == MPI_COMM_NULL)
@@ -151,7 +151,7 @@ H5F_shared_mpi_get_size(const H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI((-1))
- HDassert(f_sh);
+ assert(f_sh);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_size(f_sh->lf)) < 0)
@@ -182,7 +182,7 @@ H5F_mpi_get_size(const H5F_t *f)
FUNC_ENTER_NOAPI((-1))
- HDassert(f && f->shared);
+ assert(f && f->shared);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_size(f->shared->lf)) < 0)
@@ -209,7 +209,7 @@ H5F__set_mpi_atomicity(H5F_t *file, hbool_t flag)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(file);
+ assert(file);
/* Check VFD */
if (!H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI))
@@ -282,8 +282,8 @@ H5F__get_mpi_atomicity(const H5F_t *file, hbool_t *flag)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(file);
- HDassert(flag);
+ assert(file);
+ assert(flag);
/* Check VFD */
if (!H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI))
@@ -363,7 +363,7 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpi_comm);
+ assert(mpi_comm);
/* Set value to return to invalid MPI comm */
*mpi_comm = MPI_COMM_NULL;
@@ -378,7 +378,7 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm)
if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
f = loc.oloc->file;
- HDassert(f);
+ assert(f);
/* Check if MPIO driver is used */
if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
@@ -436,7 +436,7 @@ H5F_get_coll_metadata_reads(const H5F_t *file)
FUNC_ENTER_NOAPI_NOERR
- HDassert(file && file->shared);
+ assert(file && file->shared);
/* Retrieve the file-global flag */
file_flag = H5F_COLL_MD_READ(file);
@@ -514,9 +514,9 @@ H5F_set_coll_metadata_reads(H5F_t *file, H5P_coll_md_read_flag_t *file_flag, hbo
FUNC_ENTER_NOAPI_NOERR
- HDassert(file && file->shared);
- HDassert(file_flag);
- HDassert(context_flag);
+ assert(file && file->shared);
+ assert(file_flag);
+ assert(context_flag);
/* Save old state */
prev_file_flag = H5F_COLL_MD_READ(file);
@@ -565,13 +565,13 @@ H5F_mpi_get_file_block_type(hbool_t commit, MPI_Datatype *new_type, hbool_t *new
FUNC_ENTER_NOAPI(FAIL)
- HDassert(new_type);
- HDassert(new_type_derived);
+ assert(new_type);
+ assert(new_type_derived);
*new_type_derived = FALSE;
field_count = 2;
- HDassert(field_count == sizeof(types) / sizeof(MPI_Datatype));
+ assert(field_count == sizeof(types) / sizeof(MPI_Datatype));
block_lengths[0] = 1;
block_lengths[1] = 1;
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index ee870be..325bdcd 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -457,7 +457,7 @@ typedef struct H5F_t H5F_t;
UINT16ENCODE(p, l); \
break; \
default: \
- HDassert("bad sizeof size" && 0); \
+ assert("bad sizeof size" && 0); \
}
#define H5F_ENCODE_LENGTH(f, p, l) H5F_ENCODE_LENGTH_LEN(p, l, H5F_SIZEOF_SIZE(f))
@@ -474,7 +474,7 @@ typedef struct H5F_t H5F_t;
UINT16DECODE(p, l); \
break; \
default: \
- HDassert("bad sizeof size" && 0); \
+ assert("bad sizeof size" && 0); \
}
#define H5F_DECODE_LENGTH(f, p, l) DECODE_VAR(p, l, H5F_SIZEOF_SIZE(f))
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index 72b173f..6553bc6 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -79,7 +79,7 @@ H5F_shared_get_intent(const H5F_shared_t *f_sh)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f_sh);
+ assert(f_sh);
FUNC_LEAVE_NOAPI(f_sh->flags)
} /* end H5F_shared_get_intent() */
@@ -100,7 +100,7 @@ H5F_get_intent(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->flags)
} /* end H5F_get_intent() */
@@ -124,7 +124,7 @@ H5F_get_low_bound(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->low_bound)
} /* end H5F_get_low_bound() */
@@ -148,7 +148,7 @@ H5F_get_high_bound(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->high_bound)
} /* end H5F_get_high_bound() */
@@ -168,8 +168,8 @@ H5F_get_open_name(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->open_name);
+ assert(f);
+ assert(f->open_name);
FUNC_LEAVE_NOAPI(f->open_name)
} /* end H5F_get_open_name() */
@@ -189,8 +189,8 @@ H5F_get_actual_name(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->actual_name);
+ assert(f);
+ assert(f->actual_name);
FUNC_LEAVE_NOAPI(f->actual_name)
} /* end H5F_get_actual_name() */
@@ -211,9 +211,9 @@ H5F_get_extpath(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->extpath);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->extpath);
FUNC_LEAVE_NOAPI(f->shared->extpath)
} /* end H5F_get_extpath() */
@@ -232,7 +232,7 @@ H5F_get_shared(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared)
} /* end H5F_get_shared() */
@@ -251,10 +251,10 @@ H5F_same_shared(const H5F_t *f1, const H5F_t *f2)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f1);
- HDassert(f1->shared);
- HDassert(f2);
- HDassert(f2->shared);
+ assert(f1);
+ assert(f1->shared);
+ assert(f2);
+ assert(f2->shared);
FUNC_LEAVE_NOAPI(f1->shared == f2->shared)
} /* end H5F_same_shared() */
@@ -273,7 +273,7 @@ H5F_get_nopen_objs(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->nopen_objs)
} /* end H5F_get_nopen_objs() */
@@ -292,7 +292,7 @@ H5F_file_id_exists(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->id_exists)
} /* end H5F_file_id_exists() */
@@ -311,7 +311,7 @@ H5F_get_parent(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->parent)
} /* end H5F_get_parent() */
@@ -330,7 +330,7 @@ H5F_get_nmounts(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->nmounts)
} /* end H5F_get_nmounts() */
@@ -349,7 +349,7 @@ H5F_get_read_attempts(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->read_attempts)
} /* end H5F_get_read_attempts() */
@@ -369,8 +369,8 @@ H5F_get_fcpl(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->fcpl_id)
} /* end H5F_get_fcpl() */
@@ -391,8 +391,8 @@ H5F_sizeof_addr(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sizeof_addr)
} /* end H5F_sizeof_addr() */
@@ -413,8 +413,8 @@ H5F_sizeof_size(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sizeof_size)
} /* H5F_sizeof_size() */
@@ -433,8 +433,8 @@ H5F_get_sohm_addr(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sohm_addr)
} /* end H5F_get_sohm_addr() */
@@ -453,8 +453,8 @@ H5F_get_sohm_vers(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sohm_vers)
} /* end H5F_get_sohm_vers() */
@@ -473,8 +473,8 @@ H5F_get_sohm_nindexes(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sohm_nindexes)
} /* end H5F_get_sohm_nindexes() */
@@ -497,9 +497,9 @@ H5F_sym_leaf_k(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
FUNC_LEAVE_NOAPI(f->shared->sblock->sym_leaf_k)
} /* end H5F_sym_leaf_k() */
@@ -517,7 +517,7 @@ H5F_get_min_dset_ohdr(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->crt_dset_min_ohdr_flag)
} /* end H5F_get_min_dset_ohdr */
@@ -540,10 +540,10 @@ H5F_Kvalue(const H5F_t *f, const H5B_class_t *type)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
- HDassert(type);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
+ assert(type);
FUNC_LEAVE_NOAPI(f->shared->sblock->btree_k[type->id])
} /* end H5F_Kvalue() */
@@ -562,8 +562,8 @@ H5F_get_nrefs(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->nrefs)
} /* end H5F_get_nrefs() */
@@ -586,8 +586,8 @@ H5F_rdcc_nslots(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->rdcc_nslots)
} /* end H5F_rdcc_nelmts() */
@@ -610,8 +610,8 @@ H5F_rdcc_nbytes(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->rdcc_nbytes)
} /* end H5F_rdcc_nbytes() */
@@ -634,8 +634,8 @@ H5F_rdcc_w0(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->rdcc_w0)
} /* end H5F_rdcc_w0() */
@@ -656,9 +656,9 @@ H5F_get_base_addr(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
FUNC_LEAVE_NOAPI(f->shared->sblock->base_addr)
} /* end H5F_get_base_addr() */
@@ -681,8 +681,8 @@ H5F_grp_btree_shared(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->grp_btree_shared)
} /* end H5F_grp_btree_shared() */
@@ -705,8 +705,8 @@ H5F_sieve_buf_size(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sieve_buf_size)
} /* end H5F_sieve_buf_size() */
@@ -732,8 +732,8 @@ H5F_gc_ref(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->gc_ref)
} /* end H5F_gc_ref() */
@@ -753,8 +753,8 @@ H5F_get_fc_degree(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->fc_degree)
} /* end H5F_get_fc_degree() */
@@ -776,8 +776,8 @@ H5F_get_evict_on_close(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->evict_on_close)
} /* end H5F_get_evict_on_close() */
@@ -797,8 +797,8 @@ H5F_store_msg_crt_idx(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->store_msg_crt_idx)
} /* end H5F_store_msg_crt_idx() */
@@ -818,7 +818,7 @@ H5F_shared_has_feature(const H5F_shared_t *f_sh, unsigned feature)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f_sh);
+ assert(f_sh);
FUNC_LEAVE_NOAPI((hbool_t)(f_sh->lf->feature_flags & feature))
} /* end H5F_shared_has_feature() */
@@ -838,8 +838,8 @@ H5F_has_feature(const H5F_t *f, unsigned feature)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI((hbool_t)(f->shared->lf->feature_flags & feature))
} /* end H5F_has_feature() */
@@ -860,9 +860,9 @@ H5F_get_driver_id(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
FUNC_LEAVE_NOAPI(f->shared->lf->driver_id)
} /* end H5F_get_driver_id() */
@@ -884,10 +884,10 @@ H5F_get_fileno(const H5F_t *f, unsigned long *filenum)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(filenum);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(filenum);
/* Retrieve the file's serial number */
if (H5FD_get_fileno(f->shared->lf, filenum) < 0)
@@ -912,7 +912,7 @@ H5F_shared_get_eoa(const H5F_shared_t *f_sh, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(f_sh);
+ assert(f_sh);
/* Dispatch to driver */
if (HADDR_UNDEF == (ret_value = H5FD_get_eoa(f_sh->lf, type)))
@@ -937,8 +937,8 @@ H5F_get_eoa(const H5F_t *f, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Dispatch to driver */
if (HADDR_UNDEF == (ret_value = H5FD_get_eoa(f->shared->lf, type)))
@@ -963,8 +963,8 @@ H5F_shared_get_file_driver(const H5F_shared_t *f_sh, H5FD_t **file_handle)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f_sh);
- HDassert(file_handle);
+ assert(f_sh);
+ assert(file_handle);
*file_handle = f_sh->lf;
@@ -989,8 +989,8 @@ H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(file);
- HDassert(file_handle);
+ assert(file);
+ assert(file_handle);
/* Get the VFD handle */
if (H5FD_get_vfd_handle(file->shared->lf, fapl, file_handle) < 0)
@@ -1017,8 +1017,8 @@ H5F_is_tmp_addr(const H5F_t *f, haddr_t addr)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(H5F_addr_le(f->shared->tmp_addr, addr))
} /* end H5F_is_tmp_addr() */
@@ -1040,8 +1040,8 @@ H5F_use_tmp_space(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->use_tmp_space)
} /* end H5F_use_tmp_space() */
@@ -1063,7 +1063,7 @@ H5F_coll_md_read(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->coll_md_read)
} /* end H5F_coll_md_read() */
@@ -1088,8 +1088,8 @@ H5F_shared_get_mpi_file_sync_required(const H5F_shared_t *f_sh, hbool_t *flag /*
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f_sh);
- HDassert(flag);
+ assert(f_sh);
+ assert(flag);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_file_sync_required(f_sh->lf, flag)) < 0)
@@ -1117,8 +1117,8 @@ H5F_use_mdc_logging(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->use_mdc_logging)
} /* end H5F_use_mdc_logging() */
@@ -1140,8 +1140,8 @@ H5F_start_mdc_log_on_access(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->start_mdc_log_on_access)
} /* end H5F_start_mdc_log_on_access() */
@@ -1163,8 +1163,8 @@ H5F_mdc_log_location(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->mdc_log_location)
} /* end H5F_mdc_log_location() */
@@ -1184,8 +1184,8 @@ H5F_get_alignment(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->alignment)
} /* end H5F_get_alignment() */
@@ -1205,8 +1205,8 @@ H5F_get_threshold(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->threshold)
} /* end H5F_get_threshold() */
@@ -1226,8 +1226,8 @@ H5F_get_pgend_meta_thres(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->pgend_meta_thres)
} /* end H5F_get_pgend_meta_thres() */
@@ -1247,8 +1247,8 @@ H5F_get_point_of_no_return(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->point_of_no_return)
} /* end H5F_get_point_of_no_return() */
@@ -1268,8 +1268,8 @@ H5F_get_null_fsm_addr(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->null_fsm_addr)
} /* end H5F_get_null_fsm_addr() */
@@ -1291,8 +1291,8 @@ H5F_get_vol_cls(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->vol_cls)
} /* end H5F_get_vol_cls */
@@ -1311,7 +1311,7 @@ H5F_get_vol_obj(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->vol_obj)
} /* end H5F_get_vol_obj */
@@ -1337,8 +1337,8 @@ H5F__get_cont_info(const H5F_t *f, H5VL_file_cont_info_t *info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Verify structure version */
if (info->version != H5VL_CONTAINER_INFO_VERSION)
@@ -1367,8 +1367,8 @@ H5F_get_file_locking(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->use_file_locking)
} /* end H5F_get_file_locking */
@@ -1389,8 +1389,8 @@ H5F_has_vector_select_io(const H5F_t *f, hbool_t is_write)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (is_write)
ret_value = (f->shared->lf->cls->write_vector != NULL || f->shared->lf->cls->write_selection != NULL);
diff --git a/src/H5Fsfile.c b/src/H5Fsfile.c
index 978d4dc..afebeeb 100644
--- a/src/H5Fsfile.c
+++ b/src/H5Fsfile.c
@@ -56,7 +56,7 @@ H5F_sfile_assert_num(unsigned n)
if (n == 0) {
/* Sanity checking */
- HDassert(H5F_sfile_head_g == NULL);
+ assert(H5F_sfile_head_g == NULL);
} /* end if */
else {
unsigned count; /* Number of open shared files */
@@ -74,7 +74,7 @@ H5F_sfile_assert_num(unsigned n)
} /* end while */
/* Sanity checking */
- HDassert(count == n);
+ assert(count == n);
} /* end else */
FUNC_LEAVE_NOAPI_VOID
@@ -101,7 +101,7 @@ H5F__sfile_add(H5F_shared_t *shared)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(shared);
+ assert(shared);
/* Allocate new shared file node */
if (NULL == (new_shared = H5FL_CALLOC(H5F_sfile_node_t)))
@@ -140,7 +140,7 @@ H5F__sfile_search(H5FD_t *lf)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(lf);
+ assert(lf);
/* Iterate through low-level files for matching low-level file info */
curr = H5F_sfile_head_g;
@@ -179,7 +179,7 @@ H5F__sfile_remove(H5F_shared_t *shared)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(shared);
+ assert(shared);
/* Locate shared file node with correct shared file */
last = NULL;
diff --git a/src/H5Fspace.c b/src/H5Fspace.c
index 1e2b238..44f5653 100644
--- a/src/H5Fspace.c
+++ b/src/H5Fspace.c
@@ -89,11 +89,11 @@ H5F__alloc(H5F_t *f, H5F_mem_t type, hsize_t size, haddr_t *frag_addr, hsize_t *
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Check whether the file can use temporary addresses */
if (f->shared->use_tmp_space) {
@@ -148,11 +148,11 @@ H5F__free(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Call the file driver 'free' routine */
if (H5FD_free(f->shared->lf, type, f, addr, size) < 0)
@@ -192,11 +192,11 @@ H5F__try_extend(H5F_t *f, H5FD_mem_t type, haddr_t blk_end, hsize_t extra_reques
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(extra_requested > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(extra_requested > 0);
/* Extend the object by extending the underlying file */
if ((ret_value = H5FD_try_extend(f->shared->lf, type, f, blk_end, extra_requested)) < 0)
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index cf18fb0..24809b1 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -93,11 +93,11 @@ H5F__super_ext_create(H5F_t *f, H5O_loc_t *ext_ptr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
- HDassert(!H5F_addr_defined(f->shared->sblock->ext_addr));
- HDassert(ext_ptr);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
+ assert(!H5F_addr_defined(f->shared->sblock->ext_addr));
+ assert(ext_ptr);
/* Check for older version of superblock format that can't support superblock extensions */
if (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2)
@@ -147,9 +147,9 @@ H5F__super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(ext_addr));
- HDassert(ext_ptr);
+ assert(f);
+ assert(H5F_addr_defined(ext_addr));
+ assert(ext_ptr);
/* Set up "fake" object location for superblock extension */
H5O_loc_reset(ext_ptr);
@@ -185,8 +185,8 @@ H5F__super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hbool_t was_created)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(ext_ptr);
+ assert(f);
+ assert(ext_ptr);
/* Check if extension was created */
if (was_created) {
@@ -243,12 +243,12 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
sblock = f->shared->sblock;
- HDassert(sblock);
- HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK);
+ assert(sblock);
+ assert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sblock->cache_info.type == H5AC_SUPERBLOCK);
/* Update the driver information message in the superblock extension
* if appropriate.
@@ -271,7 +271,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
- HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
+ assert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
if (H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
@@ -362,7 +362,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
int mpi_result;
/* Sanity check */
- HDassert(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI));
+ assert(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI));
/* Set up MPI info */
if ((mpi_rank = H5F_mpi_get_rank(f)) < 0)
@@ -495,7 +495,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Mark the superblock dirty if it was modified during loading */
if (((rw_flags & H5AC__READ_ONLY_FLAG) == 0) && udata.ignore_drvrinfo && udata.drvrinfo_removed) {
- HDassert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2);
+ assert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2);
sblock_flags |= H5AC__DIRTIED_FLAG;
} /* end if */
@@ -536,7 +536,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Handle the B-tree 'K' values */
if (sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) {
/* Sanity check */
- HDassert(udata.sym_leaf_k != 0);
+ assert(udata.sym_leaf_k != 0);
/* Set the symbol table internal node 'K' value */
if (H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &udata.sym_leaf_k) < 0)
@@ -634,7 +634,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Sanity check - driver info block should only be defined for
* superblock version < 2.
*/
- HDassert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2);
+ assert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2);
/* Set up user data */
drvrinfo_udata.f = f;
@@ -726,7 +726,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Reset driver info message */
H5O_msg_reset(H5O_DRVINFO_ID, &drvinfo);
- HDassert(FALSE == f->shared->drvinfo_sb_msg_exists);
+ assert(FALSE == f->shared->drvinfo_sb_msg_exists);
f->shared->drvinfo_sb_msg_exists = TRUE;
} /* end else */
} /* end if */
@@ -813,8 +813,8 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy")
} /* end if */
- HDassert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
- HDassert(fsinfo.page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
+ assert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
+ assert(fsinfo.page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
if (f->shared->fs_page_size != fsinfo.page_size) {
f->shared->fs_page_size = fsinfo.page_size;
@@ -839,7 +839,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* option is used.
*/
if (!skip_eof_check && !f->shared->null_fsm_addr)
- HDassert((!f->shared->fs_persist) || (f->shared->eoa_fsm_fsalloc != HADDR_UNDEF));
+ assert((!f->shared->fs_persist) || (f->shared->eoa_fsm_fsalloc != HADDR_UNDEF));
/*
* A crashed file with persistent free-space managers may have
@@ -889,7 +889,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* be set -- verify that it is NULL, and then set it.
* Set it back to NULL when we are done.
*/
- HDassert(f->shared->sblock == NULL);
+ assert(f->shared->sblock == NULL);
f->shared->sblock = sblock;
#endif /* JRM */
@@ -973,7 +973,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
- HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
+ assert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
if (H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
@@ -992,7 +992,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* be set -- verify that it is NULL, and then set it.
* Set it back to NULL when we are done.
*/
- HDassert(f->shared->sblock == NULL);
+ assert(f->shared->sblock == NULL);
f->shared->sblock = sblock;
#endif /* JRM */
if (H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, FALSE, H5O_MSG_NO_FLAGS_SET) < 0)
@@ -1305,12 +1305,12 @@ H5F__super_init(H5F_t *f)
/* Files with SOHM indices always need the superblock extension */
if (f->shared->sohm_nindexes > 0) {
- HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ assert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
need_ext = TRUE;
} /* end if */
/* Files with non-default free space settings always need the superblock extension */
else if (non_default_fs_settings) {
- HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ assert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
need_ext = TRUE;
} /* end if */
/* If we're going to use a version of the superblock format which allows
@@ -1380,10 +1380,10 @@ H5F__super_init(H5F_t *f)
uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
- HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
+ assert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
- HDmemset(dbuf, 0, sizeof(dbuf));
+ memset(dbuf, 0, sizeof(dbuf));
if (H5FD_sb_encode(f->shared->lf, info.name, dbuf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
@@ -1393,7 +1393,7 @@ H5F__super_init(H5F_t *f)
if (H5O_msg_create(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update driver info header message")
- HDassert(FALSE == f->shared->drvinfo_sb_msg_exists);
+ assert(FALSE == f->shared->drvinfo_sb_msg_exists);
f->shared->drvinfo_sb_msg_exists = TRUE;
} /* end if */
@@ -1428,7 +1428,7 @@ H5F__super_init(H5F_t *f)
/* Check for creating an "old-style" driver info block */
if (driver_size > 0) {
/* Sanity check */
- HDassert(H5F_addr_defined(sblock->driver_addr));
+ assert(H5F_addr_defined(sblock->driver_addr));
/* Allocate space for the driver info */
if (NULL == (drvinfo = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t))))
@@ -1451,7 +1451,7 @@ H5F__super_init(H5F_t *f)
f->shared->drvinfo = drvinfo;
} /* end if */
else
- HDassert(!H5F_addr_defined(sblock->driver_addr));
+ assert(!H5F_addr_defined(sblock->driver_addr));
} /* end if */
done:
@@ -1528,9 +1528,9 @@ H5F_eoa_dirty(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Mark superblock dirty in cache, so change to EOA will get encoded */
if (H5F_super_dirty(f) < 0)
@@ -1575,9 +1575,9 @@ H5F_super_dirty(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Mark superblock dirty in cache, so change to EOA will get encoded */
if (H5AC_mark_entry_dirty(f->shared->sblock) < 0)
@@ -1606,7 +1606,7 @@ H5F__super_free(H5F_super_t *sblock)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(sblock);
+ assert(sblock);
/* Free root group symbol table entry, if any */
sblock->root_ent = (H5G_entry_t *)H5MM_xfree(sblock->root_ent);
@@ -1639,9 +1639,9 @@ H5F__super_size(H5F_t *f, hsize_t *super_size, hsize_t *super_ext_size)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Set the superblock size */
if (super_size)
@@ -1705,9 +1705,9 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, hbool_t may_create,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Set the ring type in the API context */
H5AC_set_ring(H5AC_RING_SBE, &orig_ring);
@@ -1718,12 +1718,12 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, hbool_t may_create,
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension")
} /* end if */
else {
- HDassert(may_create);
+ assert(may_create);
if (H5F__super_ext_create(f, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create file's superblock extension")
ext_created = TRUE;
} /* end else */
- HDassert(H5F_addr_defined(ext_loc.addr));
+ assert(H5F_addr_defined(ext_loc.addr));
ext_opened = TRUE;
/* Check if message with ID does not exist in the object header */
@@ -1789,7 +1789,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
FUNC_ENTER_PACKAGE
/* Make sure that the superblock extension object header exists */
- HDassert(H5F_addr_defined(f->shared->sblock->ext_addr));
+ assert(H5F_addr_defined(f->shared->sblock->ext_addr));
/* Set the ring type in the API context */
H5AC_set_ring(H5AC_RING_SBE, &orig_ring);
@@ -1819,7 +1819,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
if ((null_count = H5O_msg_count(&ext_loc, H5O_NULL_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
else if ((unsigned)null_count == hdr_info.nmesgs) {
- HDassert(H5F_addr_defined(ext_loc.addr));
+ assert(H5F_addr_defined(ext_loc.addr));
if (H5O_delete(f, ext_loc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
f->shared->sblock->ext_addr = HADDR_UNDEF;
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 7dbaf22..9345f66 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -148,11 +148,11 @@ H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, si
FUNC_ENTER_PACKAGE
- HDassert(sblock);
- HDassert(image_ref);
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
+ assert(sblock);
+ assert(image_ref);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
/* Skip over signature (already checked when locating the superblock) */
if (H5_IS_BUFFER_OVERFLOW(image, H5F_SIGNATURE_LEN, end))
@@ -234,11 +234,11 @@ H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name, const uint8
FUNC_ENTER_PACKAGE
- HDassert(drvrinfo);
- HDassert(image_ref);
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
+ assert(drvrinfo);
+ assert(image_ref);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
/* Version number */
if (H5_IS_BUFFER_OVERFLOW(image, 1, end))
@@ -305,7 +305,7 @@ H5F__cache_superblock_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
/* Set the initial image length size */
*image_len = H5F_SUPERBLOCK_FIXED_SIZE + /* Fixed size of superblock */
@@ -333,11 +333,11 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len,
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
- HDassert(image_len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
+ assert(image_len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
/* Deserialize the file superblock's prefix */
if (H5F__superblock_prefix_decode(&sblock, &image, image_len, udata, TRUE) < 0)
@@ -375,8 +375,8 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* No checksum for version 0 & 1 */
if (udata->super_vers >= HDF5_SUPERBLOCK_VERSION_2) {
@@ -411,10 +411,10 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
- HDassert(len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
+ assert(len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
/* Allocate space for the superblock */
if (NULL == (sblock = H5FL_CALLOC(H5F_super_t)))
@@ -632,10 +632,10 @@ H5F__cache_superblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(sblock);
- HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK);
- HDassert(image_len);
+ assert(sblock);
+ assert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sblock->cache_info.type == H5AC_SUPERBLOCK);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5F_SUPERBLOCK_SIZE(sblock);
@@ -661,15 +661,15 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(sblock);
+ assert(f);
+ assert(image);
+ assert(sblock);
/* Assert that the superblock is marked as being flushed last (and
collectively in parallel) */
/* (We'll rely on the cache to make sure it actually *is* flushed
last (and collectively in parallel), but this check doesn't hurt) */
- HDassert(sblock->cache_info.flush_me_last);
+ assert(sblock->cache_info.flush_me_last);
/* Encode the common portion of the file superblock for all versions */
H5MM_memcpy(image, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN);
@@ -764,11 +764,11 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
UINT32ENCODE(image, chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == (size_t)H5F_SUPERBLOCK_SIZE(sblock));
+ assert((size_t)(image - (uint8_t *)_image) == (size_t)H5F_SUPERBLOCK_SIZE(sblock));
}
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -795,9 +795,9 @@ H5F__cache_superblock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(sblock);
- HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK);
+ assert(sblock);
+ assert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(sblock->cache_info.type == H5AC_SUPERBLOCK);
/* Destroy superblock */
if (H5F__super_free(sblock) < 0)
@@ -820,7 +820,7 @@ H5F__cache_drvrinfo_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *i
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
/* Set the initial image length size */
*image_len = H5F_DRVINFOBLOCK_HDR_SIZE; /* Fixed size portion of driver info block */
@@ -847,11 +847,11 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, vo
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
- HDassert(image_len == H5F_DRVINFOBLOCK_HDR_SIZE);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
+ assert(image_len == H5F_DRVINFOBLOCK_HDR_SIZE);
/* Deserialize the file driver info's prefix */
if (H5F__drvrinfo_prefix_decode(&drvrinfo, NULL, &image, image_len, udata, TRUE) < 0)
@@ -884,10 +884,10 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hb
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(len >= H5F_DRVINFOBLOCK_HDR_SIZE);
- HDassert(udata);
- HDassert(udata->f);
+ assert(image);
+ assert(len >= H5F_DRVINFOBLOCK_HDR_SIZE);
+ assert(udata);
+ assert(udata->f);
/* Allocate space for the driver info */
if (NULL == (drvinfo = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t))))
@@ -898,14 +898,14 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hb
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file driver info prefix")
/* Sanity check */
- HDassert(len == (H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
+ assert(len == (H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
/* Validate and decode driver information */
if (H5FD_sb_load(udata->f->shared->lf, drv_name, image) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "unable to decode driver information")
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
ret_value = drvinfo;
@@ -932,10 +932,10 @@ H5F__cache_drvrinfo_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(drvinfo);
- HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO);
- HDassert(image_len);
+ assert(drvinfo);
+ assert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(drvinfo->cache_info.type == H5AC_DRVRINFO);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + /* Fixed-size portion of driver info block */
@@ -962,12 +962,12 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(drvinfo);
- HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO);
- HDassert(len == (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
+ assert(f);
+ assert(image);
+ assert(drvinfo);
+ assert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(drvinfo->cache_info.type == H5AC_DRVRINFO);
+ assert(len == (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
/* Save pointer to beginning of driver info */
dbuf = image;
@@ -989,7 +989,7 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBU
image += 8 + drvinfo->len;
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1015,9 +1015,9 @@ H5F__cache_drvrinfo_free_icr(void *_thing)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(drvinfo);
- HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO);
+ assert(drvinfo);
+ assert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(drvinfo->cache_info.type == H5AC_DRVRINFO);
/* Destroy driver info message */
H5MM_xfree(drvinfo);
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index 62e4070..cc59616 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -223,8 +223,8 @@ H5G__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(bt2_udata);
- HDassert(bt2_rec);
+ assert(bt2_udata);
+ assert(bt2_rec);
/* Check hash value */
if (bt2_udata->name_hash < bt2_rec->hash)
@@ -235,7 +235,7 @@ H5G__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
H5G_fh_ud_cmp_t fh_udata; /* User data for fractal heap 'op' callback */
/* Sanity check */
- HDassert(bt2_udata->name_hash == bt2_rec->hash);
+ assert(bt2_udata->name_hash == bt2_rec->hash);
/* Prepare user data for callback */
/* down */
@@ -335,9 +335,9 @@ H5G__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%x, ", indent, "", fwidth, "Record:", (unsigned)nrecord->hash);
+ fprintf(stream, "%*s%-*s {%x, ", indent, "", fwidth, "Record:", (unsigned)nrecord->hash);
for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
- HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
+ fprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G__dense_btree2_name_debug() */
@@ -393,8 +393,8 @@ H5G__dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, i
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(bt2_udata);
- HDassert(bt2_rec);
+ assert(bt2_udata);
+ assert(bt2_rec);
/* Check creation order value */
if (bt2_udata->corder < bt2_rec->corder)
@@ -483,9 +483,9 @@ H5G__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%llu, ", indent, "", fwidth, "Record:", (unsigned long long)nrecord->corder);
+ fprintf(stream, "%*s%-*s {%llu, ", indent, "", fwidth, "Record:", (unsigned long long)nrecord->corder);
for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
- HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
+ fprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G__dense_btree2_corder_debug() */
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index e088fd8..853c62f 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -112,8 +112,8 @@ H5G__cache_node_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(image_len);
+ assert(f);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)(H5G_NODE_SIZE(f));
@@ -149,10 +149,10 @@ H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, hbool_
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(len > 0);
- HDassert(f);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(f);
+ assert(dirty);
/* Allocate symbol table data structures */
if (NULL == (sym = H5FL_CALLOC(H5G_node_t)))
@@ -164,7 +164,7 @@ H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, hbool_
/* Magic */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, image_end))
HGOTO_ERROR(H5E_SYM, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "bad symbol table node signature")
image += H5_SIZEOF_MAGIC;
@@ -215,10 +215,10 @@ H5G__cache_node_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(sym);
- HDassert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sym->cache_info.type == H5AC_SNODE);
- HDassert(image_len);
+ assert(sym);
+ assert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sym->cache_info.type == H5AC_SNODE);
+ assert(image_len);
*image_len = sym->node_size;
@@ -245,12 +245,12 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len, void *_thing
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(sym);
- HDassert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sym->cache_info.type == H5AC_SNODE);
- HDassert(len == sym->node_size);
+ assert(f);
+ assert(image);
+ assert(sym);
+ assert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sym->cache_info.type == H5AC_SNODE);
+ assert(len == sym->node_size);
/* Magic number */
H5MM_memcpy(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -270,7 +270,7 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len, void *_thing
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize")
/* Clear rest of symbol table node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -296,9 +296,9 @@ H5G__cache_node_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(sym);
- HDassert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(sym->cache_info.type == H5AC_SNODE);
+ assert(sym);
+ assert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(sym->cache_info.type == H5AC_SNODE);
/* Destroy symbol table node */
if (H5G__node_free(sym) < 0)
diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c
index 4c5e8e3..138bde8 100644
--- a/src/H5Gcompact.c
+++ b/src/H5Gcompact.c
@@ -85,9 +85,9 @@ H5G__compact_build_table_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
- HDassert(udata->curr_lnk < udata->ltable->nlinks);
+ assert(lnk);
+ assert(udata);
+ assert(udata->curr_lnk < udata->ltable->nlinks);
/* Copy link message into table */
if (NULL == H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])))
@@ -123,9 +123,9 @@ H5G__compact_build_table(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_ind
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(linfo);
- HDassert(ltable);
+ assert(oloc);
+ assert(linfo);
+ assert(ltable);
/* Set size of table */
H5_CHECK_OVERFLOW(linfo->nlinks, hsize_t, size_t);
@@ -183,8 +183,8 @@ H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(obj_lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(obj_lnk);
/* Insert link message into group */
if (H5O_msg_create(grp_oloc, H5O_LINK_ID, 0, H5O_UPDATE_TIME, obj_lnk) < 0)
@@ -217,7 +217,7 @@ H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
+ assert(oloc);
/* Build table of all link messages */
if (H5G__compact_build_table(oloc, linfo, idx_type, order, &ltable) < 0)
@@ -268,8 +268,8 @@ H5G__compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, vo
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* If we've found the right link, get the object type */
if (HDstrcmp(lnk->name, udata->name) == 0) {
@@ -305,8 +305,8 @@ H5G__compact_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const ch
FUNC_ENTER_PACKAGE
- HDassert(oloc && oloc->file);
- HDassert(name && *name);
+ assert(oloc && oloc->file);
+ assert(name && *name);
/* Initialize data to pass through object header iteration */
udata.file = oloc->file;
@@ -343,8 +343,8 @@ H5G__compact_remove_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5RS
FUNC_ENTER_PACKAGE
- HDassert(oloc && oloc->file);
- HDassert(linfo);
+ assert(oloc && oloc->file);
+ assert(linfo);
/* Build table of all link messages, sorted according to desired order */
if (H5G__compact_build_table(oloc, linfo, idx_type, order, &ltable) < 0)
@@ -394,9 +394,9 @@ H5G__compact_iterate(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_index_t
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(linfo);
- HDassert(op);
+ assert(oloc);
+ assert(linfo);
+ assert(op);
/* Build table of all link messages */
if (H5G__compact_build_table(oloc, linfo, idx_type, order, &ltable) < 0)
@@ -437,8 +437,8 @@ H5G__compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_ud
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* Check for name to get information */
if (HDstrcmp(lnk->name, udata->name) == 0) {
@@ -481,9 +481,9 @@ H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, hbool_t *found, H5O
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(name && *name);
- HDassert(found);
- HDassert(lnk && oloc->file);
+ assert(name && *name);
+ assert(found);
+ assert(lnk && oloc->file);
/* Set up user data for iteration */
udata.name = name;
@@ -523,9 +523,9 @@ H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_i
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(oloc && oloc->file);
- HDassert(linfo);
- HDassert(lnk);
+ assert(oloc && oloc->file);
+ assert(linfo);
+ assert(lnk);
/* Build table of all link messages, sorted according to desired order */
if (H5G__compact_build_table(oloc, linfo, idx_type, order, &ltable) < 0)
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index f17afbd..764abce 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -260,12 +260,12 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* Set fractal heap creation parameters */
/* XXX: Give some control of these to applications? */
- HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
+ memset(&fheap_cparam, 0, sizeof(fheap_cparam));
fheap_cparam.managed.width = H5G_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5G_FHEAP_MAN_START_BLOCK_SIZE;
fheap_cparam.managed.max_direct_size = H5G_FHEAP_MAN_MAX_DIRECT_SIZE;
@@ -287,10 +287,10 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
/* Retrieve the heap's ID length in the file */
if (H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
- HDassert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN);
+ assert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN);
/* Create the name index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5G_BT2_NAME;
bt2_cparam.node_size = (size_t)H5G_NAME_BT2_NODE_SIZE;
H5_CHECK_OVERFLOW(fheap_id_len, /* From: */ hsize_t, /* To: */ uint32_t);
@@ -308,7 +308,7 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
/* Check if we should create a creation order index v2 B-tree */
if (linfo->index_corder) {
/* Create the creation order index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5G_BT2_CORDER;
bt2_cparam.node_size = (size_t)H5G_CORDER_BT2_NODE_SIZE;
H5_CHECK_OVERFLOW(fheap_id_len, /* From: */ hsize_t, /* To: */ uint32_t);
@@ -366,9 +366,9 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(lnk);
+ assert(f);
+ assert(linfo);
+ assert(lnk);
/* Find out the size of buffer needed for serialized link */
if ((link_size = H5O_msg_raw_size(f, H5O_LINK_ID, FALSE, lnk)) == 0)
@@ -415,7 +415,7 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk)
/* Check if we should create a creation order index v2 B-tree record */
if (linfo->index_corder) {
/* Open the creation order index v2 B-tree */
- HDassert(H5F_addr_defined(linfo->corder_bt2_addr));
+ assert(H5F_addr_defined(linfo->corder_bt2_addr));
if (NULL == (bt2_corder = H5B2_open(f, linfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
@@ -462,8 +462,8 @@ H5G__dense_lookup_cb(const void *_lnk, void *_user_lnk)
/*
* Check arguments.
*/
- HDassert(lnk);
- HDassert(user_lnk);
+ assert(lnk);
+ assert(user_lnk);
/* Copy link information */
if (H5O_msg_copy(H5O_LINK_ID, lnk, user_lnk) == NULL)
@@ -498,11 +498,11 @@ H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, hbool_t
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(name && *name);
- HDassert(found);
- HDassert(lnk);
+ assert(f);
+ assert(linfo);
+ assert(name && *name);
+ assert(found);
+ assert(lnk);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr)))
@@ -636,9 +636,9 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(lnk);
+ assert(f);
+ assert(linfo);
+ assert(lnk);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -649,7 +649,7 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -665,7 +665,7 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type
*/
if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
bt2_addr = linfo->name_bt2_addr;
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
} /* end if */
/* If there is an index defined for the field, use it */
@@ -738,9 +738,9 @@ H5G__dense_build_table_cb(const H5O_link_t *lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
- HDassert(udata->curr_lnk < udata->ltable->nlinks);
+ assert(lnk);
+ assert(udata);
+ assert(udata->curr_lnk < udata->ltable->nlinks);
/* Copy link information */
if (H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])) == NULL)
@@ -778,9 +778,9 @@ H5G__dense_build_table(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(linfo);
- HDassert(ltable);
+ assert(f);
+ assert(linfo);
+ assert(ltable);
/* Set size of table */
H5_CHECK_OVERFLOW(linfo->nlinks, /* From: */ hsize_t, /* To: */ size_t);
@@ -931,9 +931,9 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(op);
+ assert(f);
+ assert(linfo);
+ assert(op);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -944,7 +944,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -959,7 +959,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i
* process.
*/
if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
- HDassert(H5F_addr_defined(linfo->name_bt2_addr));
+ assert(H5F_addr_defined(linfo->name_bt2_addr));
bt2_addr = linfo->name_bt2_addr;
} /* end if */
@@ -968,7 +968,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i
H5G_bt2_ud_it_t udata; /* User data for iterator callback */
/* Sanity check */
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr)))
@@ -1127,8 +1127,8 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -1139,7 +1139,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -1155,7 +1155,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5
*/
if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
bt2_addr = linfo->name_bt2_addr;
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
} /* end if */
/* If there is an index defined for the field, use it */
@@ -1251,7 +1251,7 @@ H5G__dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
- HDassert(lnk->corder_valid);
+ assert(lnk->corder_valid);
bt2_udata.corder = lnk->corder;
/* Remove the record from the name index v2 B-tree */
@@ -1346,9 +1346,9 @@ H5G__dense_remove(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(name && *name);
+ assert(f);
+ assert(linfo);
+ assert(name && *name);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr)))
@@ -1448,7 +1448,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
else {
const H5G_dense_bt2_corder_rec_t *record = (const H5G_dense_bt2_corder_rec_t *)_record;
- HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
+ assert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
/* Set the heap ID to operate on */
heap_id = record->id;
@@ -1461,7 +1461,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
/* Call fractal heap 'op' routine, to perform user callback */
if (H5HF_op(bt2_udata->fheap, heap_id, H5G__dense_remove_by_idx_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed")
- HDassert(fh_udata.lnk);
+ assert(fh_udata.lnk);
/* Check for removing the link from the "other" index (creation order, when name used and vice versa) */
if (H5F_addr_defined(bt2_udata->other_bt2_addr)) {
@@ -1473,7 +1473,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
other_bt2_udata.corder = fh_udata.lnk->corder;
} /* end if */
else {
- HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
+ assert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
/* Set up the user data for the v2 B-tree 'record remove' callback */
other_bt2_udata.f = bt2_udata->f;
@@ -1549,8 +1549,8 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -1561,7 +1561,7 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -1577,7 +1577,7 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful
*/
if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
bt2_addr = linfo->name_bt2_addr;
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
} /* end if */
/* If there is an index defined for the field, use it */
@@ -1651,8 +1651,8 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* Check if we are to adjust the ref. count for all the links */
/* (we adjust the ref. count when deleting a group and we _don't_ adjust
@@ -1696,13 +1696,13 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link)
/* Check if we should delete the creation order index v2 B-tree */
if (linfo->index_corder) {
/* Delete the creation order index, without adjusting the ref. count on the links */
- HDassert(H5F_addr_defined(linfo->corder_bt2_addr));
+ assert(H5F_addr_defined(linfo->corder_bt2_addr));
if (H5B2_delete(f, linfo->corder_bt2_addr, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for creation order index")
linfo->corder_bt2_addr = HADDR_UNDEF;
} /* end if */
else
- HDassert(!H5F_addr_defined(linfo->corder_bt2_addr));
+ assert(!H5F_addr_defined(linfo->corder_bt2_addr));
/* Delete the fractal heap */
if (H5HF_delete(f, linfo->fheap_addr) < 0)
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 6075ab8..97d67bc 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -1032,7 +1032,7 @@ H5G__get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name,
/* Go retrieve the data model & native object information */
/* (don't need index & heap info) */
- HDassert(obj_loc);
+ assert(obj_loc);
if (H5O_get_info(obj_loc->oloc, &dm_info, H5O_INFO_BASIC | H5O_INFO_TIME) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get data model object info")
if (H5O_get_native_info(obj_loc->oloc, &nat_info, H5O_INFO_HDR) < 0)
@@ -1099,12 +1099,12 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5
FUNC_ENTER_PACKAGE;
/* Sanity checks */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Reset stat buffer */
if (statbuf)
- HDmemset(statbuf, 0, sizeof(H5G_stat_t));
+ memset(statbuf, 0, sizeof(H5G_stat_t));
/* Set up user data for retrieving information */
udata.statbuf = statbuf;
@@ -1137,7 +1137,7 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5
}
else {
/* UD link. H5L_get_info checked for invalid link classes */
- HDassert(linfo.type >= H5L_TYPE_UD_MIN && linfo.type <= H5L_TYPE_MAX);
+ assert(linfo.type >= H5L_TYPE_UD_MIN && linfo.type <= H5L_TYPE_MAX);
statbuf->type = H5G_UDLINK;
}
}
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 096e13e..0a148fb 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -85,9 +85,9 @@ H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, const uint8_t *p_end, H5
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(pp);
- HDassert(ent);
+ assert(f);
+ assert(pp);
+ assert(ent);
/* decode entries */
for (u = 0; u < n; u++) {
@@ -126,9 +126,9 @@ H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, const uint8
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(pp);
- HDassert(ent);
+ assert(f);
+ assert(pp);
+ assert(ent);
if (H5_IS_BUFFER_OVERFLOW(*pp, ent->name_off, p_end))
HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds")
@@ -154,7 +154,7 @@ H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, const uint8
break;
case H5G_CACHED_STAB:
- HDassert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
+ assert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
if (H5_IS_BUFFER_OVERFLOW(*pp, H5F_SIZEOF_ADDR(f) * 2, p_end))
HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds")
H5F_addr_decode(f, pp, &(ent->cache.stab.btree_addr));
@@ -204,9 +204,9 @@ H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, unsign
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(pp);
- HDassert(ent);
+ assert(f);
+ assert(pp);
+ assert(ent);
/* encode entries */
for (u = 0; u < n; u++)
@@ -242,8 +242,8 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(pp);
+ assert(f);
+ assert(pp);
/* Check for actual entry to encode */
if (ent) {
@@ -259,7 +259,7 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
break;
case H5G_CACHED_STAB:
- HDassert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
+ assert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
H5F_addr_encode(f, pp, ent->cache.stab.btree_addr);
H5F_addr_encode(f, pp, ent->cache.stab.heap_addr);
break;
@@ -283,7 +283,7 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
/* fill with zero */
if (*pp < p_ret)
- HDmemset(*pp, 0, (size_t)(p_ret - *pp));
+ memset(*pp, 0, (size_t)(p_ret - *pp));
*pp = p_ret;
done:
@@ -319,9 +319,9 @@ H5G__ent_copy(H5G_entry_t *dst, H5G_entry_t *src, H5_copy_depth_t depth)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
- HDassert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
+ assert(src);
+ assert(dst);
+ assert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
/* Copy the top level information */
H5MM_memcpy(dst, src, sizeof(H5G_entry_t));
@@ -357,10 +357,10 @@ H5G__ent_reset(H5G_entry_t *ent)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(ent);
+ assert(ent);
/* Clear the symbol table entry to an empty state */
- HDmemset(ent, 0, sizeof(H5G_entry_t));
+ memset(ent, 0, sizeof(H5G_entry_t));
ent->header = HADDR_UNDEF;
FUNC_LEAVE_NOAPI_VOID
@@ -389,10 +389,10 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(heap);
- HDassert(name);
- HDassert(lnk);
+ assert(f);
+ assert(heap);
+ assert(name);
+ assert(lnk);
/* Reset the new entry */
H5G__ent_reset(ent);
@@ -428,7 +428,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk
if ((stab_exists = H5O_msg_exists(&targ_oloc, H5O_STAB_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for STAB message")
- HDassert(!stab_exists);
+ assert(!stab_exists);
} /* end else */
#endif /* NDEBUG */
} /* end if */
@@ -528,47 +528,47 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth, con
nested_indent = indent + 3;
nested_fwidth = MAX(0, fwidth - 3);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Name offset into private heap:", (unsigned long)(ent->name_off));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Name offset into private heap:", (unsigned long)(ent->name_off));
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object header address:", ent->header);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object header address:", ent->header);
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cache info type:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cache info type:");
switch (ent->type) {
case H5G_NOTHING_CACHED:
- HDfprintf(stream, "Nothing Cached\n");
+ fprintf(stream, "Nothing Cached\n");
break;
case H5G_CACHED_STAB:
- HDfprintf(stream, "Symbol Table\n");
+ fprintf(stream, "Symbol Table\n");
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached entry information:");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
- "B-tree address:", ent->cache.stab.btree_addr);
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached entry information:");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
+ "B-tree address:", ent->cache.stab.btree_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
- "Heap address:", ent->cache.stab.heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
+ "Heap address:", ent->cache.stab.heap_addr);
break;
case H5G_CACHED_SLINK:
- HDfprintf(stream, "Symbolic Link\n");
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached information:");
- HDfprintf(stream, "%*s%-*s %lu\n", nested_indent, "", nested_fwidth,
- "Link value offset:", (unsigned long)(ent->cache.slink.lval_offset));
+ fprintf(stream, "Symbolic Link\n");
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached information:");
+ fprintf(stream, "%*s%-*s %lu\n", nested_indent, "", nested_fwidth,
+ "Link value offset:", (unsigned long)(ent->cache.slink.lval_offset));
if (heap) {
lval = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset);
- HDfprintf(stream, "%*s%-*s %s\n", nested_indent, "", nested_fwidth,
- "Link value:", (lval == NULL) ? "" : lval);
+ fprintf(stream, "%*s%-*s %s\n", nested_indent, "", nested_fwidth,
+ "Link value:", (lval == NULL) ? "" : lval);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s\n", nested_indent, "", nested_fwidth,
- "Warning: Invalid heap address given, name not displayed!");
+ fprintf(stream, "%*s%-*s\n", nested_indent, "", nested_fwidth,
+ "Warning: Invalid heap address given, name not displayed!");
break;
case H5G_CACHED_ERROR:
case H5G_NCACHED:
default:
- HDfprintf(stream, "*** Unknown symbol type %d\n", ent->type);
+ fprintf(stream, "*** Unknown symbol type %d\n", ent->type);
break;
} /* end switch */
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 416938a..5658cc5 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -191,7 +191,7 @@ H5G_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_GROUP));
+ assert(0 == H5I_nmembers(H5I_GROUP));
/* Destroy the group object id group */
n += (H5I_dec_type_ref(H5I_GROUP) > 0);
@@ -216,7 +216,7 @@ H5G__close_cb(H5VL_object_t *grp_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_vol_obj);
+ assert(grp_vol_obj);
/* Close the group */
if (H5VL_group_close(grp_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
@@ -254,15 +254,15 @@ H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, hid_t g
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(lcpl_id != H5P_DEFAULT);
- HDassert(gcpl_id != H5P_DEFAULT);
+ assert(loc);
+ assert(name && *name);
+ assert(lcpl_id != H5P_DEFAULT);
+ assert(gcpl_id != H5P_DEFAULT);
/* Set up group creation info */
gcrt_info.gcpl_id = gcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+ memset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Set up object creation information */
ocrt_info.obj_type = H5O_TYPE_GROUP;
@@ -272,7 +272,7 @@ H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, hid_t g
/* Create the new group and link it to its parent group */
if (H5L_link_object(loc, name, &ocrt_info, lcpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create and link to group")
- HDassert(ocrt_info.new_obj);
+ assert(ocrt_info.new_obj);
/* Set the return value */
ret_value = (H5G_t *)ocrt_info.new_obj;
@@ -308,8 +308,8 @@ H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file);
- HDassert(gcrt_info->gcpl_id != H5P_DEFAULT);
+ assert(file);
+ assert(gcrt_info->gcpl_id != H5P_DEFAULT);
/* create an open group */
if (NULL == (grp = H5FL_CALLOC(H5G_t)))
@@ -383,8 +383,8 @@ H5G__open_name(const H5G_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -442,7 +442,7 @@ H5G_open(const H5G_loc_t *loc)
FUNC_ENTER_NOAPI(NULL)
/* Check args */
- HDassert(loc);
+ assert(loc);
/* Allocate the group structure */
if (NULL == (grp = H5FL_CALLOC(H5G_t)))
@@ -533,7 +533,7 @@ H5G__open_oid(H5G_t *grp)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(grp);
+ assert(grp);
/* Allocate the shared information for the group */
if (NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
@@ -581,13 +581,13 @@ H5G_close(H5G_t *grp)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->fo_count > 0);
+ assert(grp && grp->shared);
+ assert(grp->shared->fo_count > 0);
--grp->shared->fo_count;
if (0 == grp->shared->fo_count) {
- HDassert(grp != H5G_rootof(H5G_fileof(grp)));
+ assert(grp != H5G_rootof(H5G_fileof(grp)));
/* Uncork cache entries with object address tag */
if (H5AC_cork(grp->oloc.file, grp->oloc.addr, H5AC__GET_CORKED, &corked) < 0)
@@ -716,7 +716,7 @@ H5G_fileof(H5G_t *grp)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(grp);
+ assert(grp);
FUNC_LEAVE_NOAPI(grp->oloc.file)
} /* end H5G_fileof() */
@@ -739,7 +739,7 @@ H5G_get_shared_count(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
+ assert(grp && grp->shared);
FUNC_LEAVE_NOAPI(grp->shared->fo_count)
} /* end H5G_get_shared_count() */
@@ -762,8 +762,8 @@ H5G_mount(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->mounted == FALSE);
+ assert(grp && grp->shared);
+ assert(grp->shared->mounted == FALSE);
/* Set the 'mounted' flag */
grp->shared->mounted = TRUE;
@@ -789,7 +789,7 @@ H5G_mounted(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
+ assert(grp && grp->shared);
FUNC_LEAVE_NOAPI(grp->shared->mounted)
} /* end H5G_mounted() */
@@ -812,8 +812,8 @@ H5G_unmount(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->mounted == TRUE);
+ assert(grp && grp->shared);
+ assert(grp->shared->mounted == TRUE);
/* Reset the 'mounted' flag */
grp->shared->mounted = FALSE;
@@ -843,8 +843,8 @@ H5G__iterate_cb(const H5O_link_t *lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
switch (udata->lnk_op.op_type) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -866,7 +866,7 @@ H5G__iterate_cb(const H5O_link_t *lnk, void *_udata)
} break;
default:
- HDassert(0 && "Unknown link op type?!?");
+ assert(0 && "Unknown link op type?!?");
} /* end switch */
done:
@@ -897,10 +897,10 @@ H5G_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(loc);
- HDassert(group_name);
- HDassert(last_lnk);
- HDassert(lnk_op && lnk_op->op_func.op_new);
+ assert(loc);
+ assert(group_name);
+ assert(last_lnk);
+ assert(lnk_op && lnk_op->op_func.op_new);
/* Open the group on which to operate. We also create a group ID which
* we can pass to the application-defined operator.
@@ -985,8 +985,8 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* Check if we will need more space to store this link's relative path */
/* ("+2" is for string terminator and possible '/' for group separator later) */
@@ -1003,7 +1003,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
} /* end if */
/* Build the link's relative path name */
- HDassert(udata->path[old_path_len] == '\0');
+ assert(udata->path[old_path_len] == '\0');
HDstrncpy(&(udata->path[old_path_len]), lnk->name, link_name_len + 1);
udata->curr_path_len += link_name_len;
@@ -1068,7 +1068,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
htri_t linfo_exists; /* Whether the link info message exists */
/* Add the path separator to the current path */
- HDassert(udata->path[udata->curr_path_len] == '\0');
+ assert(udata->path[udata->curr_path_len] == '\0');
HDstrncpy(&(udata->path[udata->curr_path_len]), "/", (size_t)2);
udata->curr_path_len++;
@@ -1084,7 +1084,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
idx_type = H5_INDEX_NAME;
} /* end if */
else
- HDassert(idx_type == H5_INDEX_NAME);
+ assert(idx_type == H5_INDEX_NAME);
} /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
@@ -1157,7 +1157,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
herr_t ret_value = FAIL; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
FUNC_ENTER_NOAPI(FAIL)
@@ -1229,7 +1229,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
idx_type = H5_INDEX_NAME;
} /* end if */
else
- HDassert(idx_type == H5_INDEX_NAME);
+ assert(idx_type == H5_INDEX_NAME);
} /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
@@ -1378,8 +1378,8 @@ H5G__get_info_by_name(const H5G_loc_t *loc, const char *name, H5G_info_t *grp_in
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(grp_info);
+ assert(loc);
+ assert(grp_info);
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -1428,8 +1428,8 @@ H5G__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(grp_info);
+ assert(loc);
+ assert(grp_info);
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
diff --git a/src/H5Glink.c b/src/H5Glink.c
index fcdbca3..731bfdf 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -211,10 +211,10 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, co
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(heap);
- HDassert(ent);
- HDassert(name);
+ assert(lnk);
+ assert(heap);
+ assert(ent);
+ assert(name);
/* Set (default) common info for link */
lnk->cset = H5F_DEFAULT_CSET;
@@ -277,8 +277,8 @@ H5G_link_to_info(const H5O_loc_t *link_loc, const H5O_link_t *lnk, H5L_info2_t *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(link_loc);
- HDassert(lnk);
+ assert(link_loc);
+ assert(lnk);
/* Get information from the link */
if (info) {
@@ -358,9 +358,9 @@ H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_loc);
- HDassert(lnk);
- HDassert(obj_loc);
+ assert(grp_loc);
+ assert(lnk);
+ assert(obj_loc);
/*
* Build location from the link
@@ -404,14 +404,14 @@ H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type, H5_iter_orde
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ltable);
+ assert(ltable);
/* Can't sort when empty since the links table will be NULL */
if (0 == ltable->nlinks)
HGOTO_DONE(ret_value);
/* This should never be NULL if the number of links is non-zero */
- HDassert(ltable->lnks);
+ assert(ltable->lnks);
/* Pick appropriate sorting routine */
if (idx_type == H5_INDEX_NAME) {
@@ -420,16 +420,16 @@ H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type, H5_iter_orde
else if (order == H5_ITER_DEC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_name_dec);
else
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
if (order == H5_ITER_INC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_corder_inc);
else if (order == H5_ITER_DEC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_corder_dec);
else
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
} /* end else */
done:
@@ -460,8 +460,8 @@ H5G__link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip, hsize_t *l
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ltable);
- HDassert(op);
+ assert(ltable);
+ assert(op);
/* Skip over links, if requested */
if (last_lnk)
@@ -507,7 +507,7 @@ H5G__link_release_table(H5G_link_table_t *ltable)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ltable);
+ assert(ltable);
/* Release link info, if any */
if (ltable->nlinks > 0) {
@@ -520,7 +520,7 @@ H5G__link_release_table(H5G_link_table_t *ltable)
H5MM_xfree(ltable->lnks);
} /* end if */
else
- HDassert(ltable->lnks == NULL);
+ assert(ltable->lnks == NULL);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -548,7 +548,7 @@ H5G__link_name_replace(H5F_t *file, H5RS_str_t *grp_full_path_r, const H5O_link_
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(file);
+ assert(file);
/* Search the open IDs and replace names for unlinked object */
if (grp_full_path_r) {
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 2b746b3..3978771 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -291,8 +291,8 @@ H5G_loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(dst);
- HDassert(src);
+ assert(dst);
+ assert(src);
/* Copy components of the location */
if (H5O_loc_copy(dst->oloc, src->oloc, depth) < 0)
@@ -324,7 +324,7 @@ H5G_loc_reset(H5G_loc_t *loc)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
+ assert(loc);
/* Reset components of the location */
if (H5O_loc_reset(loc->oloc) < 0)
@@ -356,7 +356,7 @@ H5G_loc_free(H5G_loc_t *loc)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
+ assert(loc);
/* Reset components of the location */
if (H5G_name_free(loc->path) < 0)
@@ -426,9 +426,9 @@ H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc /*out*/)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(obj_loc);
+ assert(loc);
+ assert(name && *name);
+ assert(obj_loc);
/* Set up user data for locating object */
udata.loc = obj_loc;
@@ -527,9 +527,9 @@ H5G_loc_find_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(group_name && *group_name);
- HDassert(obj_loc);
+ assert(loc);
+ assert(group_name && *group_name);
+ assert(obj_loc);
/* Set up user data for locating object */
udata.idx_type = idx_type;
@@ -566,9 +566,9 @@ H5G__loc_insert(H5G_loc_t *grp_loc, char *name, H5G_loc_t *obj_loc, H5O_type_t o
FUNC_ENTER_PACKAGE
/* Check args. */
- HDassert(grp_loc);
- HDassert(name && *name);
- HDassert(obj_loc);
+ assert(grp_loc);
+ assert(name && *name);
+ assert(obj_loc);
/* Create link object for the object location */
lnk.type = H5L_TYPE_HARD;
@@ -650,9 +650,9 @@ H5G_loc_exists(const H5G_loc_t *loc, const char *name, hbool_t *exists)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(exists);
+ assert(loc);
+ assert(name && *name);
+ assert(exists);
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_EXISTS, H5G__loc_exists_cb, exists) < 0)
@@ -720,9 +720,9 @@ H5G__loc_addr(const H5G_loc_t *loc, const char *name, haddr_t *addr /*out*/)
FUNC_ENTER_PACKAGE
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(addr);
+ assert(loc);
+ assert(name && *name);
+ assert(addr);
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_addr_cb, addr) < 0)
@@ -792,9 +792,9 @@ H5G_loc_info(const H5G_loc_t *loc, const char *name, H5O_info2_t *oinfo /*out*/,
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(oinfo);
+ assert(loc);
+ assert(name && *name);
+ assert(oinfo);
/* Set up user data for locating object */
udata.fields = fields;
@@ -868,9 +868,9 @@ H5G_loc_native_info(const H5G_loc_t *loc, const char *name, H5O_native_info_t *o
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(oinfo);
+ assert(loc);
+ assert(name && *name);
+ assert(oinfo);
/* Set up user data for locating object */
udata.fields = fields;
@@ -931,7 +931,7 @@ H5G__loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
} /* end if */
done:
- HDfree(comment.s);
+ free(comment.s);
/* Indicate that this callback didn't take ownership of the group *
* location for the object */
@@ -962,8 +962,8 @@ H5G_loc_set_comment(const H5G_loc_t *loc, const char *name, const char *comment)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for locating object */
udata.comment = comment;
@@ -1049,8 +1049,8 @@ H5G_loc_get_comment(const H5G_loc_t *loc, const char *name, char *comment /*out*
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for locating object */
udata.comment = comment;
diff --git a/src/H5Gname.c b/src/H5Gname.c
index ccb5253..c3c2606 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -116,7 +116,7 @@ H5G__component(const char *name, size_t *size_p)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(name);
+ assert(name);
while ('/' == *name)
name++;
@@ -151,7 +151,7 @@ H5G_normalize(const char *name)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(name);
+ assert(name);
/* Duplicate the name, to return */
if (NULL == (norm = H5MM_strdup(name)))
@@ -215,13 +215,13 @@ H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
/* Get component of each name */
fullpath = H5RS_get_str(fullpath_r);
- HDassert(fullpath);
+ assert(fullpath);
fullpath = H5G__component(fullpath, &nchars1);
- HDassert(fullpath);
+ assert(fullpath);
prefix = H5RS_get_str(prefix_r);
- HDassert(prefix);
+ assert(prefix);
prefix = H5G__component(prefix, &nchars2);
- HDassert(prefix);
+ assert(prefix);
/* Check if we have a real string for each component */
while (*fullpath && *prefix) {
@@ -235,9 +235,9 @@ H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
/* Get next component of each name */
fullpath = H5G__component(fullpath, &nchars1);
- HDassert(fullpath);
+ assert(fullpath);
prefix = H5G__component(prefix, &nchars2);
- HDassert(prefix);
+ assert(prefix);
} /* end if */
else
HGOTO_DONE(FALSE)
@@ -275,8 +275,8 @@ H5G__build_fullpath(const char *prefix, const char *name)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(prefix);
- HDassert(name);
+ assert(prefix);
+ assert(name);
/* Create full path */
if (NULL == (ret_value = H5RS_create(prefix)))
@@ -310,12 +310,12 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(prefix_r);
- HDassert(name);
+ assert(prefix_r);
+ assert(name);
/* Get the raw string for the user path */
prefix = H5RS_get_str(prefix_r);
- HDassert(prefix);
+ assert(prefix);
/* Create reference counted string for path */
ret_value = H5G__build_fullpath(prefix, name);
@@ -342,13 +342,13 @@ H5G__name_init(H5G_name_t *name, const char *path)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(name);
+ assert(name);
/* Set the initial paths for a name object */
name->full_path_r = H5RS_create(path);
- HDassert(name->full_path_r);
+ assert(name->full_path_r);
name->user_path_r = H5RS_create(path);
- HDassert(name->user_path_r);
+ assert(name->user_path_r);
name->obj_hidden = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -374,9 +374,9 @@ H5G_name_set(const H5G_name_t *loc, H5G_name_t *obj, const char *name)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(loc);
- HDassert(obj);
- HDassert(name);
+ assert(loc);
+ assert(obj);
+ assert(name);
/* Free & reset the object's previous paths info (if they exist) */
H5G_name_free(obj);
@@ -428,13 +428,13 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
#if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG)
- HDassert(dst->full_path_r == NULL);
- HDassert(dst->user_path_r == NULL);
+ assert(dst->full_path_r == NULL);
+ assert(dst->user_path_r == NULL);
#endif /* H5_USING_MEMCHECKER */
- HDassert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
+ assert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
/* Copy the top level information */
H5MM_memcpy(dst, src, sizeof(H5G_name_t));
@@ -476,7 +476,7 @@ H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, size_t *name
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(loc);
+ assert(loc);
/* If the user path is available and it's not "hidden", use it */
if (loc->path->user_path_r != NULL && loc->path->obj_hidden == 0) {
@@ -533,10 +533,10 @@ H5G_name_reset(H5G_name_t *name)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(name);
+ assert(name);
/* Clear the group hier. name to an empty state */
- HDmemset(name, 0, sizeof(H5G_name_t));
+ memset(name, 0, sizeof(H5G_name_t));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_name_reset() */
@@ -560,7 +560,7 @@ H5G_name_free(H5G_name_t *name)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(name);
+ assert(name);
if (name->full_path_r) {
H5RS_decr(name->full_path_r);
@@ -600,14 +600,14 @@ H5G__name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(path_r_ptr && *path_r_ptr);
- HDassert(full_suffix);
- HDassert(src_path);
- HDassert(dst_path);
+ assert(path_r_ptr && *path_r_ptr);
+ assert(full_suffix);
+ assert(src_path);
+ assert(dst_path);
/* Get pointer to path to update */
path = H5RS_get_str(*path_r_ptr);
- HDassert(path);
+ assert(path);
/* Check if path needs to be updated */
full_suffix_len = HDstrlen(full_suffix);
@@ -692,7 +692,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
FUNC_ENTER_PACKAGE
- HDassert(obj_ptr);
+ assert(obj_ptr);
/* Get the symbol table entry */
switch (H5I_get_type(obj_id)) {
@@ -736,8 +736,8 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object")
} /* end switch */
- HDassert(oloc);
- HDassert(obj_path);
+ assert(oloc);
+ assert(obj_path);
/* Check if the object has a full path still */
if (!obj_path->full_path_r)
@@ -880,7 +880,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
H5RS_str_t *rs; /* Ref-counted string for new path */
/* Sanity check */
- HDassert(names->dst_full_path_r);
+ assert(names->dst_full_path_r);
/* Get pointers to paths of interest */
full_path = H5RS_get_str(obj_path->full_path_r);
@@ -888,8 +888,8 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
dst_path = H5RS_get_str(names->dst_full_path_r);
/* Make certain that the source and destination names are full (not relative) paths */
- HDassert(*src_path == '/');
- HDassert(*dst_path == '/');
+ assert(*src_path == '/');
+ assert(*dst_path == '/');
/* Get pointer to "full suffix" */
full_suffix = full_path + HDstrlen(src_path);
@@ -947,7 +947,7 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(src_file);
+ assert(src_file);
/* Check if the object we are manipulating has a path */
if (src_full_path_r) {
@@ -1089,10 +1089,10 @@ H5G__get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(path);
- HDassert(linfo);
- HDassert(udata->loc);
- HDassert(udata->path == NULL);
+ assert(path);
+ assert(linfo);
+ assert(udata->loc);
+ assert(udata->path == NULL);
/* Check for hard link with correct address */
if (linfo->type == H5L_TYPE_HARD) {
@@ -1165,7 +1165,7 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size, si
herr_t ret_value = SUCCEED; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index cc2a793..bdd8bec 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -140,7 +140,7 @@ H5G__node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
+ assert(f);
/* Return the pointer to the ref-count object */
FUNC_LEAVE_NOAPI(H5F_GRP_BTREE_SHARED(f))
@@ -165,9 +165,9 @@ H5G__node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(shared);
- HDassert(raw);
- HDassert(key);
+ assert(shared);
+ assert(raw);
+ assert(key);
H5F_DECODE_LENGTH_LEN(raw, key->offset, shared->sizeof_len);
@@ -193,9 +193,9 @@ H5G__node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(shared);
- HDassert(raw);
- HDassert(key);
+ assert(shared);
+ assert(raw);
+ assert(key);
H5F_ENCODE_LENGTH_LEN(raw, key->offset, shared->sizeof_len);
@@ -222,20 +222,20 @@ H5G__node_debug_key(FILE *stream, int indent, int fwidth, const void *_key, cons
FUNC_ENTER_PACKAGE_NOERR
- HDassert(key);
+ assert(key);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:", (unsigned)key->offset);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:", (unsigned)key->offset);
if (udata->heap) {
const char *s;
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Name:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Name:");
if ((s = (const char *)H5HL_offset_into(udata->heap, key->offset)) != NULL)
- HDfprintf(stream, "%s\n", s);
+ fprintf(stream, "%s\n", s);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cannot get name; heap address not specified\n");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cannot get name; heap address not specified\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G__node_debug_key() */
@@ -260,10 +260,10 @@ H5G__node_free(H5G_node_t *sym)
/*
* Check arguments.
*/
- HDassert(sym);
+ assert(sym);
/* Verify that node is clean */
- HDassert(sym->cache_info.is_dirty == FALSE);
+ assert(sym->cache_info.is_dirty == FALSE);
if (sym->entry)
sym->entry = H5FL_SEQ_FREE(H5G_entry_t, sym->entry);
@@ -304,8 +304,8 @@ H5G__node_create(H5F_t *f, H5B_ins_t H5_ATTR_UNUSED op, void *_lt_key, void H5_A
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5B_INS_FIRST == op);
+ assert(f);
+ assert(H5B_INS_FIRST == op);
if (NULL == (sym = H5FL_CALLOC(H5G_node_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
@@ -372,9 +372,9 @@ H5G__node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(udata && udata->heap);
- HDassert(lt_key);
- HDassert(rt_key);
+ assert(udata && udata->heap);
+ assert(lt_key);
+ assert(rt_key);
/* Get pointers to string names */
if ((s1 = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL)
@@ -425,9 +425,9 @@ H5G__node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(udata && udata->heap);
- HDassert(lt_key);
- HDassert(rt_key);
+ assert(udata && udata->heap);
+ assert(lt_key);
+ assert(rt_key);
/* left side */
if ((s = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL)
@@ -485,10 +485,10 @@ H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hboo
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(found);
- HDassert(udata && udata->common.heap);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(found);
+ assert(udata && udata->common.heap);
/*
* Load the symbol table node for exclusive access.
@@ -583,12 +583,12 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(md_key);
- HDassert(rt_key);
- HDassert(udata && udata->common.heap);
- HDassert(new_node_p);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(md_key);
+ assert(rt_key);
+ assert(udata && udata->common.heap);
+ assert(new_node_p);
/*
* Load the symbol node.
@@ -642,7 +642,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
snrt_flags |= H5AC__DIRTIED_FLAG;
/* The left node */
- HDmemset(sn->entry + H5F_SYM_LEAF_K(f), 0, H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
+ memset(sn->entry + H5F_SYM_LEAF_K(f), 0, H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
sn->nsyms = H5F_SYM_LEAF_K(f);
sn_flags |= H5AC__DIRTIED_FLAG;
@@ -676,7 +676,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
} /* end else */
/* Move entries down to make room for new entry */
- HDassert(idx >= 0);
+ assert(idx >= 0);
HDmemmove(insert_into->entry + idx + 1, insert_into->entry + idx,
(insert_into->nsyms - (unsigned)idx) * sizeof(H5G_entry_t));
@@ -739,11 +739,11 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert((H5G_node_key_t *)_lt_key);
- HDassert(rt_key);
- HDassert(udata && udata->common.heap);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert((H5G_node_key_t *)_lt_key);
+ assert(rt_key);
+ assert(udata && udata->common.heap);
/* Load the symbol table */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__NO_FLAGS_SET)))
@@ -789,7 +789,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
} /* end if */
else {
lnk.type = H5L_TYPE_HARD;
- HDassert(H5F_addr_defined(sn->entry[idx].header));
+ assert(H5F_addr_defined(sn->entry[idx].header));
lnk.u.hard.addr = sn->entry[idx].header;
} /* end else */
@@ -832,7 +832,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
* node and indicate that the pointer to this node in the B-tree
* should be removed also.
*/
- HDassert(0 == idx);
+ assert(0 == idx);
sn->nsyms = 0;
sn_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
ret_value = H5B_INS_REMOVE;
@@ -882,7 +882,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
for (idx = 0; idx < sn->nsyms; idx++) {
if (!(H5G_CACHED_SLINK == sn->entry[idx].type)) {
/* Decrement the reference count */
- HDassert(H5F_addr_defined(sn->entry[idx].header));
+ assert(H5F_addr_defined(sn->entry[idx].header));
tmp_oloc.addr = sn->entry[idx].header;
if (H5O_link(&tmp_oloc, -1) < 0)
@@ -935,9 +935,9 @@ H5G__node_iterate(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata && udata->heap);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(udata && udata->heap);
/* Protect the symbol table node & local heap while we iterate over entries */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -1012,9 +1012,9 @@ H5G__node_sumup(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(num_objs);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(num_objs);
/* Find the object node and add the number of symbol entries. */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -1056,9 +1056,9 @@ H5G__node_by_idx(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(udata);
/* Get a pointer to the symbol table node */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -1072,7 +1072,7 @@ H5G__node_by_idx(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
ent_idx = udata->idx - udata->num_objs;
/* Call 'by index' callback */
- HDassert(udata->op);
+ assert(udata->op);
if ((udata->op)(&sn->entry[ent_idx], udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "'by index' callback failed")
@@ -1113,7 +1113,7 @@ H5G__node_init(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(f);
+ assert(f);
/* Set the raw key size */
sizeof_rkey = H5F_SIZEOF_SIZE(f); /*name offset */
@@ -1154,7 +1154,7 @@ H5G_node_close(const H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(f);
+ assert(f);
/* Free the raw B-tree node buffer */
if (H5F_GRP_BTREE_SHARED(f))
@@ -1191,9 +1191,9 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(udata);
/* load the symbol table into memory from the source file */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -1287,7 +1287,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name")
} /* else if */
else
- HDassert(0 && "Unknown entry type");
+ assert(0 && "Unknown entry type");
/* Set up common link data */
lnk.cset = H5F_DEFAULT_CSET; /* XXX: Allow user to set this */
@@ -1349,9 +1349,9 @@ H5G__node_build_table(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata && udata->heap);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(udata && udata->heap);
/*
* Save information about the symbol table node since we can't lock it
@@ -1420,8 +1420,8 @@ H5G__node_iterate_size(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t H5_
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(stab_size);
+ assert(f);
+ assert(stab_size);
*stab_size += H5G_NODE_SIZE(f);
@@ -1454,11 +1454,11 @@ H5G_node_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, had
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Pin the heap down in memory */
if (heap_addr > 0 && H5F_addr_defined(heap_addr))
@@ -1478,28 +1478,27 @@ H5G_node_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, had
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to debug B-tree node");
} /* end if */
else {
- HDfprintf(stream, "%*sSymbol Table Node...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty:", sn->cache_info.is_dirty ? "Yes" : "No");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Size of Node (in bytes):", (unsigned)sn->node_size);
- HDfprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth, "Number of Symbols:", sn->nsyms,
- (unsigned)(2 * H5F_SYM_LEAF_K(f)));
+ fprintf(stream, "%*sSymbol Table Node...\n", indent, "");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Dirty:", sn->cache_info.is_dirty ? "Yes" : "No");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Size of Node (in bytes):", (unsigned)sn->node_size);
+ fprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth, "Number of Symbols:", sn->nsyms,
+ (unsigned)(2 * H5F_SYM_LEAF_K(f)));
indent += 3;
fwidth = MAX(0, fwidth - 3);
for (u = 0; u < sn->nsyms; u++) {
- HDfprintf(stream, "%*sSymbol %u:\n", indent - 3, "", u);
+ fprintf(stream, "%*sSymbol %u:\n", indent - 3, "", u);
if (heap) {
const char *s = (const char *)H5HL_offset_into(heap, sn->entry[u].name_off);
if (s)
- HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", s);
+ fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", s);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth,
- "Warning: Invalid heap address given, name not displayed!");
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth,
+ "Warning: Invalid heap address given, name not displayed!");
H5G__ent_debug(sn->entry + u, stream, indent, fwidth, heap);
} /* end for */
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index e01354f..0fa1f32 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -120,8 +120,8 @@ H5G__obj_create(H5F_t *f, H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(oloc);
+ assert(f);
+ assert(oloc);
/* Get the property list */
if (NULL == (gc_plist = (H5P_genplist_t *)H5I_object(gcrt_info->gcpl_id)))
@@ -173,11 +173,11 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(ginfo);
- HDassert(linfo);
- HDassert(pline);
- HDassert(oloc);
+ assert(f);
+ assert(ginfo);
+ assert(linfo);
+ assert(pline);
+ assert(oloc);
/* Check for invalid access request */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -207,14 +207,14 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf
/* Calculate message size information, for creating group's object header */
linfo_size = H5O_msg_size_f(f, gcpl_id, H5O_LINFO_ID, linfo, (size_t)0);
- HDassert(linfo_size);
+ assert(linfo_size);
ginfo_size = H5O_msg_size_f(f, gcpl_id, H5O_GINFO_ID, ginfo, (size_t)0);
- HDassert(ginfo_size);
+ assert(ginfo_size);
if (pline && pline->nused) {
pline_size = H5O_msg_size_f(f, gcpl_id, H5O_PLINE_ID, pline, (size_t)0);
- HDassert(pline_size);
+ assert(pline_size);
} /* end if */
lnk.type = H5L_TYPE_HARD;
@@ -223,7 +223,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf
lnk.cset = H5T_CSET_ASCII;
lnk.name = &null_char;
link_size = H5O_msg_size_f(f, gcpl_id, H5O_LINK_ID, &lnk, (size_t)ginfo->est_name_len);
- HDassert(link_size);
+ assert(link_size);
/* Compute size of header to use for creation */
hdr_size = linfo_size + ginfo_size + pline_size + (ginfo->est_num_entries * link_size);
@@ -296,8 +296,8 @@ H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo)
FUNC_ENTER_PACKAGE_TAG(grp_oloc->addr)
/* check arguments */
- HDassert(grp_oloc);
- HDassert(linfo);
+ assert(grp_oloc);
+ assert(linfo);
/* Check for the group having a link info message */
if ((ret_value = H5O_msg_exists(grp_oloc, H5O_LINFO_ID)) < 0)
@@ -359,8 +359,8 @@ H5G__obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, voi
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* Insert link into dense link storage */
if (H5G__dense_insert(udata->f, udata->linfo, lnk) < 0)
@@ -392,8 +392,8 @@ H5G__obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* Insert link into group */
H5_GCC_CLANG_DIAG_OFF("cast-qual")
@@ -436,9 +436,9 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
FUNC_ENTER_NOAPI_TAG(grp_oloc->addr, FAIL)
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(name && *name);
- HDassert(obj_lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(name && *name);
+ assert(obj_lnk);
/* Check if we have information about the number of objects in this group */
/* (by attempting to get the link info message for this group) */
@@ -631,8 +631,8 @@ H5G__obj_iterate(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_order_t
FUNC_ENTER_PACKAGE_TAG(grp_oloc->addr)
/* Sanity check */
- HDassert(grp_oloc);
- HDassert(op);
+ assert(grp_oloc);
+ assert(op);
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0)
@@ -702,8 +702,8 @@ H5G__obj_info(const H5O_loc_t *oloc, H5G_info_t *grp_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(grp_info);
+ assert(oloc);
+ assert(grp_info);
/* Set up group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -777,7 +777,7 @@ H5G_obj_get_name_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type, H5_iter_orde
FUNC_ENTER_NOAPI_TAG(oloc->addr, FAIL)
/* Sanity check */
- HDassert(oloc && oloc->file);
+ assert(oloc && oloc->file);
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0)
@@ -837,8 +837,8 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(linfo);
+ assert(oloc);
+ assert(linfo);
/* Decrement # of links in group */
linfo->nlinks--;
@@ -951,8 +951,8 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n
FUNC_ENTER_NOAPI_TAG(oloc->addr, FAIL)
/* Sanity check */
- HDassert(oloc);
- HDassert(name && *name);
+ assert(oloc);
+ assert(name && *name);
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0)
@@ -1015,7 +1015,7 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(grp_oloc && grp_oloc->file);
+ assert(grp_oloc && grp_oloc->file);
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0)
@@ -1087,8 +1087,8 @@ H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5O
FUNC_ENTER_PACKAGE_TAG(grp_oloc->addr)
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(name && *name);
+ assert(grp_oloc && grp_oloc->file);
+ assert(name && *name);
/* Attempt to get the link info message for this group */
if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0)
@@ -1139,7 +1139,7 @@ H5G_obj_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_or
FUNC_ENTER_NOAPI_TAG(grp_oloc->addr, FAIL)
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
+ assert(grp_oloc && grp_oloc->file);
/* Attempt to get the link info message for this group */
if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0)
diff --git a/src/H5Goh.c b/src/H5Goh.c
index 94d51f0..d84ddeb 100644
--- a/src/H5Goh.c
+++ b/src/H5Goh.c
@@ -129,7 +129,7 @@ H5O__group_free_copy_file_udata(void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(udata);
+ assert(udata);
/* Free the ginfo struct (including nested data structs) */
H5O_msg_free(H5O_PLINE_ID, udata->common.src_pline);
@@ -166,7 +166,7 @@ H5O__group_isa(const H5O_t *oh)
FUNC_ENTER_PACKAGE
- HDassert(oh);
+ assert(oh);
/* Check for any of the messages that indicate a group */
if ((stab_exists = H5O_msg_exists_oh(oh, H5O_STAB_ID)) < 0)
@@ -201,7 +201,7 @@ H5O__group_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
FUNC_ENTER_PACKAGE
- HDassert(obj_loc);
+ assert(obj_loc);
*opened_type = H5I_GROUP;
@@ -242,9 +242,9 @@ H5O__group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(crt_info);
- HDassert(obj_loc);
+ assert(f);
+ assert(crt_info);
+ assert(obj_loc);
/* Create the group */
if (NULL == (grp = H5G__create(f, crt_info)))
@@ -325,11 +325,11 @@ H5O__group_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(oh);
- HDassert(bh_info);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(oh);
+ assert(bh_info);
/* Check for "new style" group info */
if ((exists = H5O_msg_exists_oh(oh, H5O_LINFO_ID)) < 0)
diff --git a/src/H5Groot.c b/src/H5Groot.c
index 3629f72..b33c1e1 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -91,17 +91,17 @@ H5G_rootof(H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Walk to top of mounted files */
while (f->parent)
f = f->parent;
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->root_grp);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->root_grp);
/* Check to see if the root group was opened through a different
* "top" file, and switch it to point at the current "top" file.
@@ -142,9 +142,9 @@ H5G_mkroot(H5F_t *f, hbool_t create_root)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Check if the root group is already initialized */
if (f->shared->root_grp)
@@ -193,7 +193,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root)
sblock_dirty = TRUE;
/* Create the root group symbol table entry */
- HDassert(!f->shared->sblock->root_ent);
+ assert(!f->shared->sblock->root_ent);
if (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) {
/* Allocate space for the root group symbol table entry */
if (NULL == (f->shared->sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t))))
@@ -287,7 +287,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root)
* exists. Don't count either the superblock extension or the root group
* in the number of open objects in the file.
*/
- HDassert((1 == f->nopen_objs) || (2 == f->nopen_objs && HADDR_UNDEF != f->shared->sblock->ext_addr));
+ assert((1 == f->nopen_objs) || (2 == f->nopen_objs && HADDR_UNDEF != f->shared->sblock->ext_addr));
f->nopen_objs--;
done:
@@ -334,8 +334,8 @@ H5G_root_free(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->fo_count > 0);
+ assert(grp && grp->shared);
+ assert(grp->shared->fo_count > 0);
/* Free the path */
H5G_name_free(&(grp->path));
@@ -367,12 +367,12 @@ H5G_root_loc(H5F_t *f, H5G_loc_t *loc)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(loc);
+ assert(f);
+ assert(loc);
/* Retrieve the root group for the file */
root_grp = H5G_rootof(f);
- HDassert(root_grp);
+ assert(root_grp);
/* Build the group location for the root group */
if (NULL == (loc->oloc = H5G_oloc(root_grp)))
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 1fb24a4..f31bc39 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -132,9 +132,9 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(stab);
- HDassert(size_hint > 0);
+ assert(f);
+ assert(stab);
+ assert(size_hint > 0);
/* Create the B-tree */
if (H5B_create(f, H5B_SNODE, NULL, &(stab->btree_addr) /*out*/) < 0)
@@ -155,7 +155,7 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint)
/* B-trees won't work if the first name isn't at the beginning
* of the heap.
*/
- HDassert(0 == name_offset);
+ assert(0 == name_offset);
done:
/* Release resources */
@@ -196,8 +196,8 @@ H5G__stab_create(H5O_loc_t *grp_oloc, const H5O_ginfo_t *ginfo, H5O_stab_t *stab
/*
* Check arguments.
*/
- HDassert(grp_oloc);
- HDassert(stab);
+ assert(grp_oloc);
+ assert(stab);
/* Adjust the size hint, if necessary */
if (ginfo->lheap_size_hint == 0)
@@ -251,10 +251,10 @@ H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name, H5O_li
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(stab);
- HDassert(name && *name);
- HDassert(obj_lnk);
+ assert(f);
+ assert(stab);
+ assert(name && *name);
+ assert(obj_lnk);
/* Pin the heap down in memory */
if (NULL == (heap = H5HL_protect(f, stab->heap_addr, H5AC__NO_FLAGS_SET)))
@@ -303,9 +303,9 @@ H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_ln
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(name && *name);
- HDassert(obj_lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(name && *name);
+ assert(obj_lnk);
/* Retrieve symbol table message */
if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab))
@@ -340,8 +340,8 @@ H5G__stab_remove(const H5O_loc_t *loc, H5RS_str_t *grp_full_path_r, const char *
FUNC_ENTER_PACKAGE
- HDassert(loc && loc->file);
- HDassert(name && *name);
+ assert(loc && loc->file);
+ assert(name && *name);
/* Read in symbol table message */
if (NULL == H5O_msg_read(loc, H5O_STAB_ID, &stab))
@@ -393,7 +393,7 @@ H5G__stab_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
FUNC_ENTER_PACKAGE
- HDassert(grp_oloc && grp_oloc->file);
+ assert(grp_oloc && grp_oloc->file);
/* Look up name of link to remove, by index */
if (H5G__stab_lookup_by_idx(grp_oloc, order, n, &obj_lnk) < 0)
@@ -450,10 +450,10 @@ H5G__stab_delete(H5F_t *f, const H5O_stab_t *stab)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(stab);
- HDassert(H5F_addr_defined(stab->btree_addr));
- HDassert(H5F_addr_defined(stab->heap_addr));
+ assert(f);
+ assert(stab);
+ assert(H5F_addr_defined(stab->btree_addr));
+ assert(H5F_addr_defined(stab->heap_addr));
/* Pin the heap down in memory */
if (NULL == (heap = H5HL_protect(f, stab->heap_addr, H5AC__NO_FLAGS_SET)))
@@ -508,8 +508,8 @@ H5G__stab_iterate(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t skip, hs
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(op);
+ assert(oloc);
+ assert(op);
/* Get the B-tree info */
if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab))
@@ -596,8 +596,8 @@ H5G__stab_count(const H5O_loc_t *oloc, hsize_t *num_objs)
FUNC_ENTER_PACKAGE_TAG(oloc->addr)
/* Sanity check */
- HDassert(oloc);
- HDassert(num_objs);
+ assert(oloc);
+ assert(num_objs);
/* Reset the number of objects in the group */
*num_objs = 0;
@@ -636,9 +636,9 @@ H5G__stab_bh_size(H5F_t *f, const H5O_stab_t *stab, H5_ih_info_t *bh_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(stab);
- HDassert(bh_info);
+ assert(f);
+ assert(stab);
+ assert(bh_info);
/* Set up user data for B-tree iteration */
snode_size = 0;
@@ -683,8 +683,8 @@ H5G__stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ent);
- HDassert(udata && udata->heap);
+ assert(ent);
+ assert(udata && udata->heap);
/* Get name offset in heap */
name_off = ent->name_off;
@@ -722,12 +722,12 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
herr_t ret_value = SUCCEED; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(oloc);
+ assert(oloc);
/* Get the B-tree & local heap info */
if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab))
@@ -843,10 +843,10 @@ H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(name && *name);
- HDassert(found);
- HDassert(lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(name && *name);
+ assert(found);
+ assert(lnk);
/* Retrieve the symbol table message for the group */
if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab))
@@ -903,8 +903,8 @@ H5G__stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ent);
- HDassert(udata && udata->heap);
+ assert(ent);
+ assert(udata && udata->heap);
/* Get a pointer to the link name */
if ((name = (const char *)H5HL_offset_into(udata->heap, ent->name_off)) == NULL)
@@ -942,8 +942,8 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(lnk);
/* Get the B-tree & local heap info */
if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab))
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index bd2697c..c30aa9d 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -560,8 +560,8 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(user_path_len);
- HDassert(obj_hidden);
+ assert(user_path_len);
+ assert(obj_hidden);
/* Get pointer to object for ID */
if (NULL == (obj_ptr = H5VL_object(obj_id)))
@@ -611,7 +611,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object type")
} /* end switch */
- HDassert(obj_path);
+ assert(obj_path);
/* Retrieve a copy of the user path and put it into the buffer */
if (obj_path->user_path_r) {
@@ -723,8 +723,8 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, h
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Load the node */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -777,7 +777,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
if (targ_oh) {
- HDassert(ret_value == H5_ITER_ERROR);
+ assert(ret_value == H5_ITER_ERROR);
if (H5O_unprotect(&targ_oloc, targ_oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to release object header");
} /* end if */
@@ -815,7 +815,7 @@ H5G__verify_cached_stabs_test(hid_t gid)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(gid >= 0);
+ assert(gid >= 0);
/* Check args */
if (NULL == (grp = (H5G_t *)H5VL_object_verify(gid, H5I_GROUP)))
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 1aa9949..d744f0b 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -165,10 +165,10 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_loc);
- HDassert(lnk);
- HDassert(lnk->type >= H5L_TYPE_UD_MIN);
- HDassert(obj_loc);
+ assert(grp_loc);
+ assert(lnk);
+ assert(lnk->type >= H5L_TYPE_UD_MIN);
+ assert(obj_loc);
/* Get the link class for this type of link. */
if (NULL == (link_class = H5L_find_class(lnk->type)))
@@ -286,9 +286,9 @@ H5G__traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_loc);
- HDassert(lnk);
- HDassert(lnk->type == H5L_TYPE_SOFT);
+ assert(grp_loc);
+ assert(lnk);
+ assert(lnk->type == H5L_TYPE_SOFT);
/* Set up temporary location */
tmp_grp_loc.oloc = &tmp_grp_oloc;
@@ -358,9 +358,9 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_loc);
- HDassert(lnk);
- HDassert(obj_loc);
+ assert(grp_loc);
+ assert(lnk);
+ assert(obj_loc);
/* If we found a symbolic link then we should follow it. But if this
* is the last component of the name and the H5G_TARGET_SLINK bit of
@@ -477,9 +477,9 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(_loc);
- HDassert(name);
- HDassert(op);
+ assert(_loc);
+ assert(name);
+ assert(op);
/*
* Where does the searching start? For absolute names it starts at the
@@ -491,7 +491,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
/* Look up root group for starting location */
root_grp = H5G_rootof(_loc->oloc->file);
- HDassert(root_grp);
+ assert(root_grp);
/* Set the location entry to the root group's info */
loc.oloc = &(root_grp->oloc);
@@ -571,8 +571,8 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
/* If the lookup was OK, build object location and traverse special links, etc. */
if (lookup_status) {
/* Sanity check link and indicate it's valid */
- HDassert(lnk.type >= H5L_TYPE_HARD);
- HDassert(!HDstrcmp(comp, lnk.name));
+ assert(lnk.type >= H5L_TYPE_HARD);
+ assert(!HDstrcmp(comp, lnk.name));
link_valid = TRUE;
/* Build object location from the link */
@@ -603,7 +603,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
cb_loc = NULL;
} /* end if */
else {
- HDassert(!obj_loc_valid);
+ assert(!obj_loc_valid);
cb_lnk = NULL;
cb_loc = NULL;
} /* end else */
@@ -686,7 +686,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
/* XXX: Should we allow user to control the group creation params here? -QAK */
gcrt_info.gcpl_id = H5P_GROUP_CREATE_DEFAULT;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+ memset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
if (H5G__obj_create_real(grp_oloc.file, ginfo, linfo, pline, &gcrt_info,
obj_loc.oloc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
@@ -748,14 +748,14 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
* Since we don't have a group location or a link to the object we pass in
* NULL.
*/
- HDassert(group_copy);
+ assert(group_copy);
if ((op)(NULL, ".", NULL, &grp_loc, op_data, &own_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "traversal operator failed")
/* If the callback took ownership of the object location, it actually has
* ownership of grp_loc. It shouldn't have tried to take ownership of
* the "group location", which was NULL. */
- HDassert(!(own_loc & H5G_OWN_GRP_LOC));
+ assert(!(own_loc & H5G_OWN_GRP_LOC));
if (own_loc & H5G_OWN_OBJ_LOC)
own_loc |= H5G_OWN_GRP_LOC;
diff --git a/src/H5HF.c b/src/H5HF.c
index 9ac51b4..8b4ea92 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -151,8 +151,8 @@ H5HF_create(H5F_t *f, const H5HF_create_t *cparam)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* Create shared fractal heap header */
if (HADDR_UNDEF == (fh_addr = H5HF__hdr_create(f, cparam)))
@@ -216,8 +216,8 @@ H5HF_open(H5F_t *f, haddr_t fh_addr)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(fh_addr));
+ assert(f);
+ assert(H5F_addr_defined(fh_addr));
/* Load the heap header into memory */
if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__READ_ONLY_FLAG)))
@@ -276,8 +276,8 @@ H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id_len_p);
+ assert(fh);
+ assert(id_len_p);
/* Retrieve the ID length for entries in this heap */
*id_len_p = fh->hdr->id_len;
@@ -305,8 +305,8 @@ H5HF_get_heap_addr(const H5HF_t *fh, haddr_t *heap_addr_p)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(heap_addr_p);
+ assert(fh);
+ assert(heap_addr_p);
/* Retrieve the heap header address for this heap */
*heap_addr_p = fh->hdr->heap_addr;
@@ -336,9 +336,9 @@ H5HF_insert(H5HF_t *fh, size_t size, const void *obj, void *id /*out*/)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(fh);
- HDassert(obj);
- HDassert(id);
+ assert(fh);
+ assert(obj);
+ assert(id);
/* Check arguments */
if (size == 0)
@@ -408,9 +408,9 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(obj_len_p);
+ assert(fh);
+ assert(id);
+ assert(obj_len_p);
/* Get the ID flags */
id_flags = *id;
@@ -436,7 +436,7 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'tiny' object's length")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -468,9 +468,9 @@ H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(obj_off_p);
+ assert(fh);
+ assert(id);
+ assert(obj_off_p);
/* Get the ID flags */
id_flags = *id;
@@ -496,7 +496,7 @@ H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p)
*obj_off_p = (hsize_t)0;
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -528,9 +528,9 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj /*out*/)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(obj);
+ assert(fh);
+ assert(id);
+ assert(obj);
/* Get the ID flags */
id_flags = *id;
@@ -559,7 +559,7 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj /*out*/)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'tiny' object from fractal heap")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -603,9 +603,9 @@ H5HF_write(H5HF_t *fh, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(obj);
+ assert(fh);
+ assert(id);
+ assert(obj);
/* Get the ID flags */
id_flags = *id;
@@ -635,7 +635,7 @@ H5HF_write(H5HF_t *fh, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "modifying 'tiny' object not supported yet")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -672,9 +672,9 @@ H5HF_op(H5HF_t *fh, const void *_id, H5HF_operator_t op, void *op_data)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(op);
+ assert(fh);
+ assert(id);
+ assert(op);
/* Get the ID flags */
id_flags = *id;
@@ -703,7 +703,7 @@ H5HF_op(H5HF_t *fh, const void *_id, H5HF_operator_t op, void *op_data)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'tiny' object from fractal heap")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -735,9 +735,9 @@ H5HF_remove(H5HF_t *fh, const void *_id)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(fh->hdr);
- HDassert(id);
+ assert(fh);
+ assert(fh->hdr);
+ assert(id);
/* Get the ID flags */
id_flags = *id;
@@ -766,7 +766,7 @@ H5HF_remove(H5HF_t *fh, const void *_id)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'tiny' object from fractal heap")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -798,7 +798,7 @@ H5HF_close(H5HF_t *fh)
/*
* Check arguments.
*/
- HDassert(fh);
+ assert(fh);
/* Decrement file reference & check if this is the last open fractal heap using the shared heap header */
if (0 == H5HF__hdr_fuse_decr(fh->hdr)) {
@@ -892,8 +892,8 @@ H5HF_delete(H5F_t *f, haddr_t fh_addr)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(fh_addr));
+ assert(f);
+ assert(H5F_addr_defined(fh_addr));
/* Lock the heap header into memory */
if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__NO_FLAGS_SET)))
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index a00eb65..84542ae 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -194,7 +194,7 @@ H5HF__huge_bt2_crt_context(void *_f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Allocate callback context */
if (NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
@@ -234,7 +234,7 @@ H5HF__huge_bt2_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Release callback context */
ctx = H5FL_FREE(H5HF_huge_bt2_ctx_t, ctx);
@@ -370,7 +370,7 @@ H5HF__huge_bt2_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
@@ -402,7 +402,7 @@ H5HF__huge_bt2_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
@@ -433,8 +433,8 @@ H5HF__huge_bt2_indir_debug(FILE *stream, int indent, int fwidth, const void *_nr
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth,
- "Record:", nrecord->addr, nrecord->len, nrecord->id);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth,
+ "Record:", nrecord->addr, nrecord->len, nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_indir_debug() */
@@ -568,7 +568,7 @@ H5HF__huge_bt2_filt_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
@@ -602,7 +602,7 @@ H5HF__huge_bt2_filt_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
@@ -635,9 +635,9 @@ H5HF__huge_bt2_filt_indir_debug(FILE *stream, int indent, int fwidth, const void
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE ", %" PRIuHSIZE "}\n",
- indent, "", fwidth, "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask,
- nrecord->obj_size, nrecord->id);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent,
+ "", fwidth, "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size,
+ nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_filt_indir_debug() */
@@ -757,7 +757,7 @@ H5HF__huge_bt2_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
@@ -788,7 +788,7 @@ H5HF__huge_bt2_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
@@ -818,8 +818,8 @@ H5HF__huge_bt2_dir_debug(FILE *stream, int indent, int fwidth, const void *_nrec
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE "}\n", indent, "", fwidth,
- "Record:", nrecord->addr, nrecord->len);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE "}\n", indent, "", fwidth,
+ "Record:", nrecord->addr, nrecord->len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_dir_debug() */
@@ -964,7 +964,7 @@ H5HF__huge_bt2_filt_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
@@ -997,7 +997,7 @@ H5HF__huge_bt2_filt_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
@@ -1029,8 +1029,8 @@ H5HF__huge_bt2_filt_dir_debug(FILE *stream, int indent, int fwidth, const void *
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE "}\n", indent, "", fwidth,
- "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE "}\n", indent, "", fwidth,
+ "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_filt_dir_debug() */
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index ab01c1e..a01bcf8 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -204,11 +204,11 @@ H5HF__hdr_prefix_decode(H5HF_hdr_t *hdr, const uint8_t **image_ref)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(image);
+ assert(hdr);
+ assert(image);
/* Magic number */
- if (HDmemcmp(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "wrong fractal heap header signature")
image += H5_SIZEOF_MAGIC;
@@ -247,9 +247,9 @@ H5HF__dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(pp && *pp);
- HDassert(dtable);
+ assert(f);
+ assert(pp && *pp);
+ assert(dtable);
/* Table width */
UINT16DECODE(*pp, dtable->cparam.width);
@@ -295,9 +295,9 @@ H5HF__dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(pp && *pp);
- HDassert(dtable);
+ assert(f);
+ assert(pp && *pp);
+ assert(dtable);
/* Table width */
UINT16ENCODE(*pp, dtable->cparam.width);
@@ -351,8 +351,8 @@ H5HF__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
- HDassert(image_len);
+ assert(udata);
+ assert(image_len);
/* Set the internal parameters for the heap */
dummy_hdr.f = udata->f;
@@ -391,10 +391,10 @@ H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UN
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
/* Deserialize the fractal heap header's prefix */
if (H5HF__hdr_prefix_decode(&hdr, &image) < 0)
@@ -435,7 +435,7 @@ H5HF__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -475,10 +475,10 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(dirty);
/* Allocate space for the fractal heap data structure */
if (NULL == (hdr = H5HF__hdr_alloc(udata->f)))
@@ -524,14 +524,14 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (hdr->heap_size - H5HF_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (hdr->heap_size - H5HF_SIZEOF_CHKSUM));
/* Check for I/O filter information to decode */
if (hdr->filter_len > 0) {
H5O_pline_t *pline; /* Pipeline information from the header on disk */
/* Sanity check */
- HDassert(len > hdr->heap_size); /* A header with filter info is > than a standard header */
+ assert(len > hdr->heap_size); /* A header with filter info is > than a standard header */
/* Compute the heap header's size */
hdr->heap_size += (size_t)(hdr->sizeof_size /* Size of size for filtered root direct block */
@@ -563,7 +563,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == hdr->heap_size);
+ assert((size_t)(image - (const uint8_t *)_image) == hdr->heap_size);
/* Finish initialization of heap header */
if (H5HF__hdr_finish_init(hdr) < 0)
@@ -605,10 +605,10 @@ H5HF__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(image_len);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(image_len);
*image_len = hdr->heap_size;
@@ -646,15 +646,15 @@ H5HF__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t len,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(H5F_addr_defined(addr));
- HDassert(addr == hdr->heap_addr);
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(H5F_addr_defined(addr));
+ assert(addr == hdr->heap_addr);
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
#ifndef NDEBUG
{
@@ -690,7 +690,7 @@ H5HF__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t len,
if (H5HF__cache_verify_hdr_descendants_clean((H5F_t *)f, hdr, &fd_children_clean,
&descendants_clean) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify hdr descendants clean.")
- HDassert(fd_children_clean);
+ assert(fd_children_clean);
}
#endif /* NDEBUG */
@@ -733,12 +733,12 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(len == hdr->heap_size);
+ assert(f);
+ assert(image);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(len == hdr->heap_size);
/* Set the shared heap header's file context for this operation */
H5_GCC_DIAG_OFF("discarded-qualifiers")
@@ -810,7 +810,7 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
UINT32ENCODE(image, metadata_chksum);
/* sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -849,10 +849,10 @@ H5HF__cache_hdr_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(hdr->rc == 0);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(hdr->rc == 0);
if (H5HF__hdr_free(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "unable to release fractal heap header")
@@ -883,10 +883,10 @@ H5HF__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
- HDassert(udata->par_info);
- HDassert(udata->par_info->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->par_info);
+ assert(udata->par_info->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5HF_MAN_INDIRECT_SIZE(udata->par_info->hdr, *udata->nrows);
@@ -918,7 +918,7 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -965,11 +965,11 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
- HDassert(dirty);
+ assert(image);
+ assert(udata);
+ assert(dirty);
hdr = udata->par_info->hdr;
- HDassert(hdr->f);
+ assert(hdr->f);
/* Set the shared heap header's file context for this operation */
hdr->f = udata->f;
@@ -992,10 +992,10 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
/* sanity check */
- HDassert(iblock->size == len);
+ assert(iblock->size == len);
/* Magic number */
- if (HDmemcmp(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap indirect block signature")
image += H5_SIZEOF_MAGIC;
@@ -1036,7 +1036,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT64DECODE_VAR(image, iblock->block_off, hdr->heap_off_size);
/* Allocate & decode child block entry tables */
- HDassert(iblock->nrows > 0);
+ assert(iblock->nrows > 0);
if (NULL == (iblock->ents = H5FL_SEQ_MALLOC(H5HF_indirect_ent_t,
(size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct entries")
@@ -1062,7 +1062,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* Check for heap with I/O filters */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* Decode extra information for direct blocks */
if (u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
@@ -1073,8 +1073,8 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* (either both the address & size are defined or both are
* not defined)
*/
- HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
- (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
+ assert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
+ (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
/* I/O filter mask for filtered direct block */
UINT32DECODE(image, iblock->filt_ents[u].filter_mask);
@@ -1089,7 +1089,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
} /* end for */
/* Sanity check */
- HDassert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
+ assert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
/* checksum verification already done by verify_chksum cb */
@@ -1097,7 +1097,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == iblock->size);
+ assert((size_t)(image - (const uint8_t *)_image) == iblock->size);
/* Check if we have any indirect block children */
if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
@@ -1146,10 +1146,10 @@ H5HF__cache_iblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(image_len);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(image_len);
*image_len = iblock->size;
@@ -1187,20 +1187,20 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->cache_info.size == iblock->size);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_eq(iblock->addr, addr));
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->cache_info.size == iblock->size);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_eq(iblock->addr, addr));
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
hdr = iblock->hdr;
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
#ifndef NDEBUG
{
@@ -1223,7 +1223,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
if (H5HF__cache_verify_iblock_descendants_clean((H5F_t *)f, iblock->addr, iblock, &iblock_status,
&fd_children_clean, &descendants_clean) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify descendants clean.")
- HDassert(fd_children_clean);
+ assert(fd_children_clean);
}
#endif /* NDEBUG */
@@ -1239,7 +1239,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
/* Sanity check */
- HDassert(!H5F_addr_eq(iblock->addr, iblock_addr));
+ assert(!H5F_addr_eq(iblock->addr, iblock_addr));
/* Let the metadata cache know the block moved */
if (H5AC_move_entry((H5F_t *)f, H5AC_FHEAP_IBLOCK, iblock->addr, iblock_addr) < 0)
@@ -1315,17 +1315,17 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->cache_info.size == iblock->size);
- HDassert(len == iblock->size);
+ assert(f);
+ assert(image);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->cache_info.size == iblock->size);
+ assert(len == iblock->size);
/* Indirect block must be in 'normal' file space */
- HDassert(!H5F_IS_TMP_ADDR(f, iblock->addr));
- HDassert(H5F_addr_eq(iblock->addr, iblock->cache_info.addr));
+ assert(!H5F_IS_TMP_ADDR(f, iblock->addr));
+ assert(H5F_addr_eq(iblock->addr, iblock->cache_info.addr));
/* Get the pointer to the shared heap header */
hdr = iblock->hdr;
@@ -1358,7 +1358,7 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
/* Check for heap with I/O filters */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* Encode extra information for direct blocks */
if (u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
@@ -1366,8 +1366,8 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
/* (either both the address & size are defined or both are
* not defined)
*/
- HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
- (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
+ assert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
+ (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
/* Size of filtered direct block */
H5F_ENCODE_LENGTH(f, image, iblock->filt_ents[u].size);
@@ -1394,10 +1394,10 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
UINT32ENCODE(image, metadata_chksum);
/* Sanity checks */
- HDassert((size_t)(image - (uint8_t *)_image) == iblock->size);
+ assert((size_t)(image - (uint8_t *)_image) == iblock->size);
#ifndef NDEBUG
- HDassert(nchildren == iblock->nchildren);
- HDassert(max_child == iblock->max_child);
+ assert(nchildren == iblock->nchildren);
+ assert(max_child == iblock->max_child);
#endif /* NDEBUG */
FUNC_LEAVE_NOAPI(ret_value)
@@ -1430,10 +1430,10 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->hdr);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->hdr);
/* further sanity checks */
if (iblock->parent == NULL) {
@@ -1441,7 +1441,7 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
/* the fractal heap has already pinned the hdr. Do what */
/* sanity checking we can. */
if ((iblock->block_off == 0) && (iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED))
- HDassert(iblock->hdr->root_iblock == iblock);
+ assert(iblock->hdr->root_iblock == iblock);
} /* end if */
else {
/* if this is a child iblock, verify that the pointers are */
@@ -1450,9 +1450,9 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
unsigned H5_ATTR_NDEBUG_UNUSED indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >=
- (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
+ assert(par_iblock->child_iblocks);
+ assert(iblock->par_entry >=
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
indir_idx = iblock->par_entry -
@@ -1461,8 +1461,8 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
/* The pointer to iblock in the parent may not be set yet -- */
/* verify that it is either NULL, or that it has been set to */
/* iblock. */
- HDassert((NULL == par_iblock->child_iblocks[indir_idx]) ||
- (par_iblock->child_iblocks[indir_idx] == iblock));
+ assert((NULL == par_iblock->child_iblocks[indir_idx]) ||
+ (par_iblock->child_iblocks[indir_idx] == iblock));
} /* end else */
switch (action) {
@@ -1529,11 +1529,11 @@ H5HF__cache_iblock_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->rc == 0);
- HDassert(iblock->hdr);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->rc == 0);
+ assert(iblock->hdr);
/* Destroy fractal heap indirect block */
if (H5HF__man_iblock_dest(iblock) < 0)
@@ -1567,14 +1567,14 @@ H5HF__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
- HDassert(image_len);
+ assert(udata);
+ assert(image_len);
/* Convenience variables */
par_info = (const H5HF_parent_t *)(&(udata->par_info));
- HDassert(par_info);
+ assert(par_info);
hdr = par_info->hdr;
- HDassert(hdr);
+ assert(hdr);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -1622,12 +1622,12 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
par_info = (H5HF_parent_t *)(&(udata->par_info));
- HDassert(par_info);
+ assert(par_info);
hdr = par_info->hdr;
- HDassert(hdr);
+ assert(hdr);
/* Get out if data block is not checksummed */
if (!(hdr->checksum_dblocks))
@@ -1682,7 +1682,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
chk_p -= H5HF_SIZEOF_CHKSUM;
/* Reset checksum field, for computing the checksum */
- HDmemset(chk_p, 0, (size_t)H5HF_SIZEOF_CHKSUM);
+ memset(chk_p, 0, (size_t)H5HF_SIZEOF_CHKSUM);
/* Compute checksum on entire direct block */
computed_chksum = H5_checksum_metadata(read_buf, len, 0);
@@ -1697,8 +1697,8 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
/* Save the decompressed data to be used later in deserialize callback */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(udata->decompressed);
- HDassert(len == udata->dblock_size);
+ assert(udata->decompressed);
+ assert(len == udata->dblock_size);
/* Allocate block buffer */
if (NULL == (udata->dblk = H5FL_BLK_MALLOC(direct_block, (size_t)len)))
@@ -1751,20 +1751,20 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
par_info = (H5HF_parent_t *)(&(udata->par_info));
- HDassert(par_info);
+ assert(par_info);
hdr = par_info->hdr;
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(dirty);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(dirty);
/* Allocate space for the fractal heap direct block */
if (NULL == (dblock = H5FL_CALLOC(H5HF_direct_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
/* Set the shared heap header's file context for this operation */
hdr->f = udata->f;
@@ -1782,7 +1782,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Direct block is already decompressed in verify_chksum callback */
if (udata->decompressed) {
/* Sanity check */
- HDassert(udata->dblk);
+ assert(udata->dblk);
/* Take ownership of the decompressed direct block */
dblock->blk = udata->dblk;
@@ -1794,7 +1794,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
unsigned filter_mask; /* Excluded filters for direct block */
/* Sanity check */
- HDassert(udata->dblk == NULL);
+ assert(udata->dblk == NULL);
/* Initialize the filter callback struct */
filter_cb.op_data = NULL;
@@ -1818,7 +1818,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, NULL, "output pipeline failed")
/* Sanity check */
- HDassert(nbytes == dblock->size);
+ assert(nbytes == dblock->size);
/* Copy un-filtered data into block's buffer */
H5MM_memcpy(dblock->blk, read_buf, dblock->size);
@@ -1826,8 +1826,8 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
} /* end if */
else {
/* Sanity checks */
- HDassert(udata->dblk == NULL);
- HDassert(!udata->decompressed);
+ assert(udata->dblk == NULL);
+ assert(!udata->decompressed);
/* Allocate block buffer */
/* XXX: Change to using free-list factories */
@@ -1835,7 +1835,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy image to dblock->blk */
- HDassert(dblock->size == len);
+ assert(dblock->size == len);
H5MM_memcpy(dblock->blk, image, dblock->size);
} /* end else */
@@ -1843,7 +1843,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
image = dblock->blk;
/* Magic number */
- if (HDmemcmp(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap direct block signature")
image += H5_SIZEOF_MAGIC;
@@ -1884,7 +1884,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
} /* end if */
/* Sanity check */
- HDassert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
+ assert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
/* Set return value */
ret_value = (void *)dblock;
@@ -1927,14 +1927,14 @@ H5HF__cache_dblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(image_len);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(image_len);
/* Set up convenience variables */
hdr = dblock->hdr;
- HDassert(hdr);
+ assert(hdr);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -1981,7 +1981,7 @@ H5HF__cache_dblock_image_len(const void *_thing, size_t *image_len)
size = dblock->size;
/* Set the image size */
- HDassert(size > 0);
+ assert(size > 0);
*image_len = size;
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -2069,17 +2069,17 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(dblock->write_buf == NULL);
- HDassert(dblock->write_size == 0);
- HDassert(dblock->cache_info.size == len);
- HDassert(H5F_addr_defined(addr));
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock->write_buf == NULL);
+ assert(dblock->write_size == 0);
+ assert(dblock->cache_info.size == len);
+ assert(H5F_addr_defined(addr));
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
/* Set up local variables */
hdr = dblock->hdr;
@@ -2088,9 +2088,9 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Set the shared heap header's file context for this operation */
hdr->f = (H5F_t *)f;
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
if (dblock->parent) {
/* this is the common case, in which the direct block is the child
@@ -2102,9 +2102,9 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
par_iblock = dblock->parent;
par_entry = dblock->par_entry;
- HDassert(par_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(par_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
+ assert(par_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(par_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
} /* end if */
else {
/* the direct block is a root direct block -- just set par_iblock
@@ -2121,7 +2121,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
* and the checksum at the beginning of the block.
*/
- HDassert(dblock->blk);
+ assert(dblock->blk);
image = dblock->blk;
/* Magic number */
@@ -2142,7 +2142,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
uint32_t metadata_chksum; /* Computed metadata checksum value */
/* Clear the checksum field, to compute the checksum */
- HDmemset(image, 0, (size_t)H5HF_SIZEOF_CHKSUM);
+ memset(image, 0, (size_t)H5HF_SIZEOF_CHKSUM);
/* Compute checksum on entire direct block */
metadata_chksum = H5_checksum_metadata(dblock->blk, dblock->size, 0);
@@ -2157,7 +2157,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
*/
/* Sanity check */
- HDassert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
+ assert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
/* If I/O filters are enabled on this heap, we must run the direct block
* image through the filters to obtain the image that we will hand off
@@ -2204,8 +2204,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
hbool_t hdr_changed = FALSE; /* Whether the header info changed */
/* Sanity check */
- HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
- HDassert(hdr->pline_root_direct_size > 0);
+ assert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
+ assert(hdr->pline_root_direct_size > 0);
/* Check if the filter mask changed */
if (hdr->pline_root_direct_filter_mask != filter_mask) {
@@ -2217,7 +2217,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
* size matches the heap's last record. This value will
* likely change shortly.
*/
- HDassert(len == hdr->pline_root_direct_size);
+ assert(len == hdr->pline_root_direct_size);
/* Check if we need to re-size the block on disk */
if (hdr->pline_root_direct_size != write_size || at_tmp_addr) {
@@ -2240,8 +2240,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Update information about compressed direct block's
* location & size
*/
- HDassert(hdr->man_dtable.table_addr == addr);
- HDassert(hdr->pline_root_direct_size == len);
+ assert(hdr->man_dtable.table_addr == addr);
+ assert(hdr->pline_root_direct_size == len);
hdr->man_dtable.table_addr = dblock_addr;
hdr->pline_root_direct_size = write_size;
@@ -2258,8 +2258,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
hbool_t par_changed = FALSE; /* Whether the parent's infochanged */
/* Sanity check */
- HDassert(par_iblock);
- HDassert(par_iblock->filt_ents[par_entry].size > 0);
+ assert(par_iblock);
+ assert(par_iblock->filt_ents[par_entry].size > 0);
/* Check if the filter mask changed */
if (par_iblock->filt_ents[par_entry].filter_mask != filter_mask) {
@@ -2271,7 +2271,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
* size matches the heap's last record. This value will
* likely change shortly.
*/
- HDassert(len == par_iblock->filt_ents[par_entry].size);
+ assert(len == par_iblock->filt_ents[par_entry].size);
/* Check if we need to re-size the block on disk */
if (par_iblock->filt_ents[par_entry].size != write_size || at_tmp_addr) {
@@ -2295,8 +2295,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Update information about compressed direct block's
* location & size
*/
- HDassert(par_iblock->ents[par_entry].addr == addr);
- HDassert(par_iblock->filt_ents[par_entry].size == len);
+ assert(par_iblock->ents[par_entry].addr == addr);
+ assert(par_iblock->filt_ents[par_entry].size == len);
par_iblock->ents[par_entry].addr = dblock_addr;
par_iblock->filt_ents[par_entry].size = write_size;
@@ -2337,8 +2337,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Check for root direct block */
if (NULL == dblock->parent) {
/* Sanity checks */
- HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
- HDassert(!H5F_addr_eq(hdr->man_dtable.table_addr, dblock_addr));
+ assert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
+ assert(!H5F_addr_eq(hdr->man_dtable.table_addr, dblock_addr));
/* Update information about direct block's location */
hdr->man_dtable.table_addr = dblock_addr;
@@ -2349,10 +2349,10 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
} /* end if */
else { /* the direct block's parent is an indirect block */
/* Sanity checks */
- HDassert(par_iblock);
- HDassert(par_iblock->ents);
- HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
- HDassert(!H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
+ assert(par_iblock);
+ assert(par_iblock->ents);
+ assert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
+ assert(!H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
/* Update information about direct block's location */
par_iblock->ents[par_entry].addr = dblock_addr;
@@ -2391,8 +2391,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
*flags = dblock_flags;
/* final sanity check */
- HDassert(dblock->write_buf);
- HDassert(dblock->write_size > 0);
+ assert(dblock->write_buf);
+ assert(dblock->write_size > 0);
done:
/* discard the write buf if we have an error */
@@ -2433,17 +2433,17 @@ H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(len > 0);
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert((dblock->blk != dblock->write_buf) || (dblock->cache_info.size == dblock->size));
- HDassert(dblock->write_buf);
- HDassert(dblock->write_size > 0);
- HDassert((dblock->blk != dblock->write_buf) || (dblock->write_size == dblock->size));
- HDassert(dblock->write_size == len);
+ assert(f);
+ assert(image);
+ assert(len > 0);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert((dblock->blk != dblock->write_buf) || (dblock->cache_info.size == dblock->size));
+ assert(dblock->write_buf);
+ assert(dblock->write_size > 0);
+ assert((dblock->blk != dblock->write_buf) || (dblock->write_size == dblock->size));
+ assert(dblock->write_size == len);
/* Copy the image from *(dblock->write_buf) to *image */
H5MM_memcpy(image, dblock->write_buf, dblock->write_size);
@@ -2484,10 +2484,10 @@ H5HF__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(dblock->hdr);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock->hdr);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
@@ -2553,9 +2553,9 @@ H5HF__cache_dblock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
/* Destroy fractal heap direct block */
if (H5HF__man_dblock_dest(dblock) < 0)
@@ -2588,11 +2588,11 @@ H5HF__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(dblock->file_size > 0);
- HDassert(fsf_size);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock->file_size > 0);
+ assert(fsf_size);
/* Set free space in file size */
*fsf_size = dblock->file_size;
@@ -2675,18 +2675,18 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(fd_clean);
- HDassert(clean);
+ assert(f);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(fd_clean);
+ assert(clean);
hdr_addr = hdr->cache_info.addr;
- HDassert(hdr_addr == hdr->heap_addr);
+ assert(hdr_addr == hdr->heap_addr);
if (H5AC_get_entry_status(f, hdr_addr, &hdr_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get hdr status")
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
/* We have three basic scenarios we have to deal with:
*
@@ -2736,12 +2736,12 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
root_iblock_addr = root_iblock->addr;
/* get the status of the root iblock */
- HDassert(root_iblock_addr != HADDR_UNDEF);
+ assert(root_iblock_addr != HADDR_UNDEF);
if (H5AC_get_entry_status(f, root_iblock_addr, &root_iblock_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get root iblock status")
root_iblock_in_cache = ((root_iblock_status & H5AC_ES__IN_CACHE) != 0);
- HDassert(root_iblock_in_cache || (root_iblock == NULL));
+ assert(root_iblock_in_cache || (root_iblock == NULL));
if (!root_iblock_in_cache) { /* we are done */
*clean = TRUE;
@@ -2757,7 +2757,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
*/
if (H5AC_flush_dependency_exists(f, hdr->heap_addr, root_iblock_addr, &fd_exists) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency")
- HDassert(fd_exists);
+ assert(fd_exists);
*fd_clean = FALSE;
} /* end else-if */
@@ -2840,7 +2840,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
*/
if (H5AC_get_entry_ptr_from_addr(f, root_iblock_addr, (void **)(&root_iblock)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "H5AC_get_entry_ptr_from_addr() failed.")
- HDassert(root_iblock);
+ assert(root_iblock);
} /* end else */
} /* end if */
else { /* root_iblock != NULL */
@@ -2876,7 +2876,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
H5_END_TAG
unprotect_root_iblock = TRUE;
- HDassert(iblock == root_iblock);
+ assert(iblock == root_iblock);
} /* end if */
} /* end else */
@@ -2884,8 +2884,8 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
* in memory for the duration of the call. Do some sanity checks,
* and then call H5HF__cache_verify_iblock_descendants_clean().
*/
- HDassert(root_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(root_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(root_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(root_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
if (H5HF__cache_verify_iblock_descendants_clean(f, hdr->heap_addr, root_iblock,
&root_iblock_status, fd_clean, clean) < 0)
@@ -2893,7 +2893,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
/* Unprotect the root indirect block if required */
if (unprotect_root_iblock) {
- HDassert(root_iblock);
+ assert(root_iblock);
if (H5AC_unprotect(f, H5AC_FHEAP_IBLOCK, root_iblock_addr, root_iblock, H5AC__NO_FLAGS_SET) <
0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "H5AC_unprotect() failed.")
@@ -2914,7 +2914,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
if (root_dblock_status & H5AC_ES__IN_CACHE) {
if (H5AC_verify_entry_type(f, root_dblock_addr, &H5AC_FHEAP_DBLOCK[0], &in_cache, &type_ok) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check dblock type")
- HDassert(in_cache);
+ assert(in_cache);
if (!type_ok)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock addr doesn't refer to a dblock?!?")
@@ -3039,15 +3039,15 @@ H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, haddr_t fd_parent_addr, H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(fd_parent_addr));
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock_status);
- HDassert(fd_clean);
- HDassert(*fd_clean);
- HDassert(clean); /* note that *clean need not be TRUE */
+ assert(f);
+ assert(H5F_addr_defined(fd_parent_addr));
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock_status);
+ assert(fd_clean);
+ assert(*fd_clean);
+ assert(clean); /* note that *clean need not be TRUE */
if ((*fd_clean) && H5HF__cache_verify_iblocks_dblocks_clean(f, fd_parent_addr, iblock, fd_clean, clean,
&has_dblocks) < 0)
@@ -3158,22 +3158,22 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(fd_parent_addr));
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(fd_clean);
- HDassert(*fd_clean);
- HDassert(clean); /* note that *clean need not be true */
- HDassert(has_dblocks);
+ assert(f);
+ assert(H5F_addr_defined(fd_parent_addr));
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(fd_clean);
+ assert(*fd_clean);
+ assert(clean); /* note that *clean need not be true */
+ assert(has_dblocks);
i = 0;
num_direct_rows = MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
- HDassert(num_direct_rows <= iblock->nrows);
+ assert(num_direct_rows <= iblock->nrows);
max_dblock_index = (num_direct_rows * iblock->hdr->man_dtable.cparam.width) - 1;
iblock_addr = iblock->addr;
- HDassert(H5F_addr_defined(iblock_addr));
+ assert(H5F_addr_defined(iblock_addr));
while ((*fd_clean) && (i <= max_dblock_index)) {
haddr_t dblock_addr;
@@ -3196,7 +3196,7 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
if (H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get dblock status")
- HDassert(dblock_status & H5AC_ES__IN_CACHE);
+ assert(dblock_status & H5AC_ES__IN_CACHE);
*has_dblocks = TRUE;
@@ -3323,17 +3323,17 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(fd_parent_addr));
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(fd_clean);
- HDassert(*fd_clean);
- HDassert(clean); /* note that *clean need not be true */
- HDassert(has_iblocks);
+ assert(f);
+ assert(H5F_addr_defined(fd_parent_addr));
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(fd_clean);
+ assert(*fd_clean);
+ assert(clean); /* note that *clean need not be true */
+ assert(has_iblocks);
num_direct_rows = MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
- HDassert(num_direct_rows <= iblock->nrows);
+ assert(num_direct_rows <= iblock->nrows);
iblock_addr = iblock->addr;
first_iblock_index = num_direct_rows * iblock->hdr->man_dtable.cparam.width;
@@ -3464,13 +3464,13 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
"H5AC_get_entry_ptr_from_addr() failed.")
- HDassert(child_iblock);
+ assert(child_iblock);
} /* end else */
} /* end if */
else {
/* child iblock is pinned -- look it up in the */
/* parent iblocks child_iblocks array. */
- HDassert(iblock->child_iblocks);
+ assert(iblock->child_iblocks);
child_iblock = iblock->child_iblocks[i - first_iblock_index];
} /* end else */
@@ -3478,10 +3478,10 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
* a pointer to the child iblock. Verify that we
* that we have the correct one.
*/
- HDassert(child_iblock);
- HDassert(child_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(child_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(child_iblock->addr == child_iblock_addr);
+ assert(child_iblock);
+ assert(child_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(child_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(child_iblock->addr == child_iblock_addr);
/* now make the recursive call */
if (H5HF__cache_verify_iblock_descendants_clean(
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index 1e14284..d16e7e7 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -115,11 +115,11 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(fh);
+ assert(id);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Get the ID flags */
id_flags = *id;
@@ -139,7 +139,7 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth)
id_type = 'T';
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -152,8 +152,8 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length")
/* Display the heap ID */
- HDfprintf(stream, "%*s%-*s (%c, %" PRIuHSIZE " , %zu)\n", indent, "", fwidth,
- "Heap ID info: (type, offset, length)", id_type, obj_off, obj_len);
+ fprintf(stream, "%*s%-*s (%c, %" PRIuHSIZE " , %zu)\n", indent, "", fwidth,
+ "Heap ID info: (type, offset, length)", id_type, obj_off, obj_len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -179,40 +179,39 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw
/*
* Check arguments.
*/
- HDassert(dtable);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(dtable);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/*
* Print the values.
*/
/* Creation parameter values */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Doubling table width:", dtable->cparam.width);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Starting block size:", dtable->cparam.start_block_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Max. direct block size:", dtable->cparam.max_direct_size);
- HDfprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth,
- "Max. index size:", dtable->cparam.max_index);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Starting # of rows in root indirect block:", dtable->cparam.start_root_rows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Doubling table width:", dtable->cparam.width);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Starting block size:", dtable->cparam.start_block_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Max. direct block size:", dtable->cparam.max_direct_size);
+ fprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth, "Max. index size:", dtable->cparam.max_index);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Starting # of rows in root indirect block:", dtable->cparam.start_root_rows);
/* Run-time varying parameter values */
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Table's root address:", dtable->table_addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Current # of rows in root indirect block:", dtable->curr_root_rows);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Table's root address:", dtable->table_addr);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Current # of rows in root indirect block:", dtable->curr_root_rows);
/* Computed values */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of rows in root indirect block:", dtable->max_root_rows);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of direct rows in any indirect block:", dtable->max_direct_rows);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of bits for IDs in first row:", dtable->first_row_bits);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "# of IDs in first row:", dtable->num_id_first_row);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max. # of rows in root indirect block:", dtable->max_root_rows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max. # of direct rows in any indirect block:", dtable->max_direct_rows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "# of bits for IDs in first row:", dtable->first_row_bits);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "# of IDs in first row:", dtable->num_id_first_row);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF__dtable_debug() */
@@ -237,76 +236,76 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(hdr);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Print opening message */
- HDfprintf(stream, "%*sFractal Heap Header...\n", indent, "");
+ fprintf(stream, "%*sFractal Heap Header...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Heap is:", hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Objects stored in 'debugging' format:", hdr->debug_objs ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "'Write once' flag:", hdr->write_once ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "'Huge' object IDs have wrapped:", hdr->huge_ids_wrapped ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Free space in managed blocks:", hdr->total_man_free);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Managed space data block size:", hdr->man_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Total managed space allocated:", hdr->man_alloc_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Offset of managed space iterator:", hdr->man_iter_off);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Number of managed objects in heap:", hdr->man_nobjs);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of free space manager for managed blocks:", hdr->fs_addr);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Max. size of managed object:", (unsigned long)hdr->max_man_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "'Huge' object space used:", hdr->huge_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Number of 'huge' objects in heap:", hdr->huge_nobjs);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "ID of next 'huge' object:", hdr->huge_next_id);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of v2 B-tree for 'huge' objects:", hdr->huge_bt2_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "'Tiny' object space used:", hdr->tiny_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Number of 'tiny' objects in heap:", hdr->tiny_nobjs);
-
- HDfprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, "");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Heap is:", hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Objects stored in 'debugging' format:", hdr->debug_objs ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "'Write once' flag:", hdr->write_once ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "'Huge' object IDs have wrapped:", hdr->huge_ids_wrapped ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Free space in managed blocks:", hdr->total_man_free);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Managed space data block size:", hdr->man_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Total managed space allocated:", hdr->man_alloc_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Offset of managed space iterator:", hdr->man_iter_off);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Number of managed objects in heap:", hdr->man_nobjs);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Address of free space manager for managed blocks:", hdr->fs_addr);
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Max. size of managed object:", (unsigned long)hdr->max_man_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "'Huge' object space used:", hdr->huge_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Number of 'huge' objects in heap:", hdr->huge_nobjs);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "ID of next 'huge' object:", hdr->huge_next_id);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Address of v2 B-tree for 'huge' objects:", hdr->huge_bt2_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "'Tiny' object space used:", hdr->tiny_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Number of 'tiny' objects in heap:", hdr->tiny_nobjs);
+
+ fprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, "");
H5HF__dtable_debug(&hdr->man_dtable, stream, indent + 3, MAX(0, fwidth - 3));
/* Print information about I/O filters */
if (hdr->filter_len > 0) {
- HDfprintf(stream, "%*sI/O filter Info...\n", indent, "");
+ fprintf(stream, "%*sI/O filter Info...\n", indent, "");
if (hdr->man_dtable.curr_root_rows == 0) {
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Compressed size of root direct block:", hdr->pline_root_direct_size);
- HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter mask for root direct block:", hdr->pline_root_direct_filter_mask);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Compressed size of root direct block:", hdr->pline_root_direct_size);
+ fprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter mask for root direct block:", hdr->pline_root_direct_filter_mask);
} /* end if */
H5O_debug_id(H5O_PLINE_ID, hdr->f, &(hdr->pline), stream, indent + 3, MAX(0, fwidth - 3));
} /* end if */
/* Print internal (runtime) information, if requested */
if (dump_internal) {
- HDfprintf(stream, "%*sFractal Heap Header Internal Information:\n", indent, "");
+ fprintf(stream, "%*sFractal Heap Header Internal Information:\n", indent, "");
/* Dump root iblock, if there is one */
- HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Root indirect block flags:", hdr->root_iblock_flags);
- HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
- "Root indirect block pointer:", (void *)hdr->root_iblock);
+ fprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Root indirect block flags:", hdr->root_iblock_flags);
+ fprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Root indirect block pointer:", (void *)hdr->root_iblock);
if (hdr->root_iblock)
H5HF_iblock_print(hdr->root_iblock, dump_internal, stream, indent + 3, fwidth);
} /* end if */
@@ -337,11 +336,11 @@ H5HF_hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Load the fractal heap header */
if (NULL == (hdr = H5HF__hdr_protect(f, addr, H5AC__READ_ONLY_FLAG)))
@@ -382,16 +381,16 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(udata);
+ assert(sect);
+ assert(udata);
/* Set up some local variables, for convenience */
sect_start = sect->sect_info.addr;
sect_end = (sect->sect_info.addr + sect->sect_info.size) - 1;
- HDassert(sect_end >= sect_start);
+ assert(sect_end >= sect_start);
dblock_start = udata->dblock_addr;
dblock_end = (udata->dblock_addr + udata->dblock_size) - 1;
- HDassert(dblock_end >= dblock_start);
+ assert(dblock_end >= dblock_start);
/* Check for overlap between free space section & direct block */
if ((sect_start <= dblock_end &&
@@ -417,8 +416,8 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
len = end - start;
HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count);
- HDfprintf(udata->stream, "%*s%-*s %8zu, %8zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
- temp_str, start, len);
+ fprintf(udata->stream, "%*s%-*s %8zu, %8zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
+ temp_str, start, len);
udata->sect_count++;
/* Mark this node's free space & check for overlaps w/other sections */
@@ -431,7 +430,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Flag overlaps */
if (overlap)
- HDfprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ fprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
else
udata->amount_free += len;
} /* end if */
@@ -467,13 +466,13 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(block_size > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(block_size > 0);
/* Load the fractal heap header */
if (NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG)))
@@ -486,17 +485,17 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block")
/* Print opening message */
- HDfprintf(stream, "%*sFractal Heap Direct Block...\n", indent, "");
+ fprintf(stream, "%*sFractal Heap Direct Block...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:", hdr->heap_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Offset of direct block in heap:", dblock->block_off);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Address of fractal heap that owns this block:", hdr->heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Offset of direct block in heap:", dblock->block_off);
blk_prefix_size = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of block header:", blk_prefix_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of block header:", blk_prefix_size);
/* Allocate space for the free space markers */
if (NULL == (marker = (uint8_t *)H5MM_calloc(dblock->size)))
@@ -521,7 +520,7 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
udata.amount_free = 0;
/* Print header */
- HDfprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
+ fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
/* Iterate over the free space sections, to detect overlaps with this block */
if (H5FS_sect_iterate(f, hdr->fspace, H5HF_dblock_debug_cb, &udata) < 0)
@@ -536,14 +535,14 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Check for no free space */
if (amount_free == 0)
- HDfprintf(stream, "%*s<none>\n", indent + 3, "");
+ fprintf(stream, "%*s<none>\n", indent + 3, "");
} /* end if */
else
amount_free = 0;
- HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of available space for data used:",
- (100.0 * (double)((dblock->size - blk_prefix_size) - amount_free) /
- (double)(dblock->size - blk_prefix_size)));
+ fprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of available space for data used:",
+ (100.0 * (double)((dblock->size - blk_prefix_size) - amount_free) /
+ (double)(dblock->size - blk_prefix_size)));
/*
* Print the data in a VMS-style octal dump.
@@ -584,54 +583,54 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(iblock->hdr);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(iblock);
+ assert(iblock->hdr);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Set up convenience variables */
hdr = iblock->hdr;
/* Print opening message */
- HDfprintf(stream, "%*sFractal Heap Indirect Block...\n", indent, "");
+ fprintf(stream, "%*sFractal Heap Indirect Block...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:", hdr->heap_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Offset of indirect block in heap:", iblock->block_off);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of indirect block:", iblock->size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Current # of rows:", iblock->nrows);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of rows:", iblock->max_rows);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max direct block rows:", hdr->man_dtable.max_direct_rows);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Address of fractal heap that owns this block:", hdr->heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Offset of indirect block in heap:", iblock->block_off);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of indirect block:", iblock->size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Current # of rows:", iblock->nrows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of rows:", iblock->max_rows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max direct block rows:", hdr->man_dtable.max_direct_rows);
/* Print the entry tables */
if (hdr->filter_len > 0)
- HDfprintf(stream, "%*sDirect Block Entries: (address/compressed size/filter mask)\n", indent, "");
+ fprintf(stream, "%*sDirect Block Entries: (address/compressed size/filter mask)\n", indent, "");
else
- HDfprintf(stream, "%*sDirect Block Entries: (address)\n", indent, "");
+ fprintf(stream, "%*sDirect Block Entries: (address)\n", indent, "");
for (u = 0; u < hdr->man_dtable.max_direct_rows && u < iblock->nrows; u++) {
HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (block size: %lu)", (unsigned)u,
(unsigned long)hdr->man_dtable.row_block_size[u]);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
for (v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
if (hdr->filter_len > 0)
- HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "/%6zu/%x\n", indent + 6, "", MAX(0, fwidth - 6),
- temp_str, iblock->ents[off].addr, iblock->filt_ents[off].size,
- iblock->filt_ents[off].filter_mask);
+ fprintf(stream, "%*s%-*s %9" PRIuHADDR "/%6zu/%x\n", indent + 6, "", MAX(0, fwidth - 6),
+ temp_str, iblock->ents[off].addr, iblock->filt_ents[off].size,
+ iblock->filt_ents[off].filter_mask);
else
- HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
- iblock->ents[off].addr);
+ fprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
+ iblock->ents[off].addr);
} /* end for */
} /* end for */
- HDfprintf(stream, "%*sIndirect Block Entries:\n", indent, "");
+ fprintf(stream, "%*sIndirect Block Entries:\n", indent, "");
if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
unsigned first_row_bits; /* Number of bits used bit addresses in first row */
unsigned num_indirect_rows; /* Number of rows of blocks in each indirect block */
@@ -642,30 +641,29 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st
num_indirect_rows = (H5VM_log2_gen(hdr->man_dtable.row_block_size[u]) - first_row_bits) + 1;
HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (# of rows: %u)", (unsigned)u,
num_indirect_rows);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
for (v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
- HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
- iblock->ents[off].addr);
+ fprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
+ iblock->ents[off].addr);
} /* end for */
} /* end for */
} /* end if */
else
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "<none>");
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "<none>");
/* Print internal (runtime) information, if requested */
if (dump_internal) {
- HDfprintf(stream, "%*sFractal Indirect Block Internal Information:\n", indent, "");
+ fprintf(stream, "%*sFractal Indirect Block Internal Information:\n", indent, "");
/* Print general information */
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Reference count:", iblock->rc);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Reference count:", iblock->rc);
/* Print parent's information */
- HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
- "Parent indirect block address:", (void *)iblock->parent);
+ fprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Parent indirect block address:", (void *)iblock->parent);
if (iblock->parent)
H5HF_iblock_print(iblock->parent, TRUE, stream, indent + 6, fwidth);
} /* end if */
@@ -699,13 +697,13 @@ H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(nrows > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(nrows > 0);
/* Load the fractal heap header */
if (NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG)))
@@ -754,21 +752,20 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(udata);
+ assert(sect);
+ assert(udata);
/* Print generic section information */
- HDfprintf(
- udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:",
- (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE
- ? "single"
- : (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW
- ? "first row"
- : (sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown"))));
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
- "Section address:", sect->sect_info.addr);
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
- "Section size:", sect->sect_info.size);
+ fprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:",
+ (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE
+ ? "single"
+ : (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW
+ ? "first row"
+ : (sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown"))));
+ fprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
+ "Section address:", sect->sect_info.addr);
+ fprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
+ "Section size:", sect->sect_info.size);
/* Dump section-specific debugging information */
if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) <
@@ -802,11 +799,11 @@ H5HF_sects_debug(H5F_t *f, haddr_t fh_addr, FILE *stream, int indent, int fwidth
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(fh_addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(fh_addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Load the fractal heap header */
if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__READ_ONLY_FLAG)))
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index cf1fcdd..4e410a4 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -95,7 +95,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/*
* Allocate file and memory data structures.
@@ -104,7 +104,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fractal heap direct block")
/* Reset the metadata cache info for the heap header */
- HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
/* Share common heap information */
dblock->hdr = hdr;
@@ -134,7 +134,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
/* XXX: Change to using free-list factories */
if ((dblock->blk = H5FL_BLK_MALLOC(direct_block, dblock->size)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(dblock->blk, 0, dblock->size);
+ memset(dblock->blk, 0, dblock->size);
dblock->write_buf = NULL;
dblock->write_size = 0;
@@ -226,8 +226,8 @@ H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(dblock);
+ assert(hdr);
+ assert(dblock);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -257,11 +257,11 @@ H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_
/* Check for root direct block */
if (hdr->man_dtable.curr_root_rows == 0) {
/* Sanity check */
- HDassert(hdr->man_dtable.table_addr == dblock_addr);
- HDassert(hdr->man_dtable.cparam.start_block_size == dblock->size);
+ assert(hdr->man_dtable.table_addr == dblock_addr);
+ assert(hdr->man_dtable.cparam.start_block_size == dblock->size);
/* Sanity check block iterator */
- HDassert(!H5HF__man_iter_ready(&hdr->next_block));
+ assert(!H5HF__man_iter_ready(&hdr->next_block));
/* Reset header information back to "empty heap" state */
if (H5HF__hdr_empty(hdr) < 0)
@@ -338,15 +338,15 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(request > 0);
+ assert(hdr);
+ assert(request > 0);
/* Compute the min. size of the direct block needed to fulfill the request */
if (request < hdr->man_dtable.cparam.start_block_size)
min_dblock_size = hdr->man_dtable.cparam.start_block_size;
else {
min_dblock_size = ((size_t)1) << (1 + H5VM_log2_gen((uint64_t)request));
- HDassert(min_dblock_size <= hdr->man_dtable.cparam.max_direct_size);
+ assert(min_dblock_size <= hdr->man_dtable.cparam.max_direct_size);
} /* end else */
/* Adjust the size of block needed to fulfill request, with overhead */
@@ -388,15 +388,14 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_
/* Retrieve information about current iterator position */
if (H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
- HDassert(next_row < iblock->nrows);
+ assert(next_row < iblock->nrows);
H5_CHECKED_ASSIGN(next_size, size_t, hdr->man_dtable.row_block_size[next_row], hsize_t);
/* Check for skipping over blocks */
if (min_dblock_size > next_size) {
- HDfprintf(
- stderr,
- "%s: Skipping direct block sizes not supported, min_dblock_size = %zu, next_size = %zu\n",
- __func__, min_dblock_size, next_size);
+ fprintf(stderr,
+ "%s: Skipping direct block sizes not supported, min_dblock_size = %zu, next_size = %zu\n",
+ __func__, min_dblock_size, next_size);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not supported yet")
} /* end if */
@@ -439,12 +438,12 @@ H5HF__man_dblock_protect(H5HF_hdr_t *hdr, haddr_t dblock_addr, size_t dblock_siz
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblock_addr));
- HDassert(dblock_size > 0);
+ assert(hdr);
+ assert(H5F_addr_defined(dblock_addr));
+ assert(dblock_size > 0);
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up parent info */
udata.par_info.hdr = hdr;
@@ -467,7 +466,7 @@ H5HF__man_dblock_protect(H5HF_hdr_t *hdr, haddr_t dblock_addr, size_t dblock_siz
} /* end if */
else {
/* Sanity check */
- HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
+ assert(H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
/* Set up parameters to read filtered direct block */
udata.odi_size = par_iblock->filt_ents[par_entry].size;
@@ -523,13 +522,13 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(hdr->man_dtable.curr_root_rows); /* Only works for heaps with indirect root block */
- HDassert(ret_iblock);
- HDassert(ret_did_protect);
+ assert(hdr);
+ assert(hdr->man_dtable.curr_root_rows); /* Only works for heaps with indirect root block */
+ assert(ret_iblock);
+ assert(ret_did_protect);
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Look up row & column for object */
if (H5HF__dtable_lookup(&hdr->man_dtable, obj_off, &row, &col) < 0)
@@ -552,7 +551,7 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_
/* Compute # of rows in child indirect block */
nrows = (H5VM_log2_gen(hdr->man_dtable.row_block_size[row]) - hdr->man_dtable.first_row_bits) + 1;
- HDassert(nrows < iblock->nrows); /* child must be smaller than parent */
+ assert(nrows < iblock->nrows); /* child must be smaller than parent */
/* Compute indirect block's entry */
entry = (row * hdr->man_dtable.cparam.width) + col;
@@ -585,8 +584,8 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_
/* Look up row & column in new indirect block for object */
if (H5HF__dtable_lookup(&hdr->man_dtable, (obj_off - iblock->block_off), &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object")
- HDassert(row < iblock->nrows); /* child must be smaller than parent */
- } /* end while */
+ assert(row < iblock->nrows); /* child must be smaller than parent */
+ } /* end while */
/* Set return parameters */
if (ret_entry)
@@ -626,9 +625,9 @@ H5HF__man_dblock_delete(H5F_t *f, haddr_t dblock_addr, hsize_t dblock_size)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(dblock_addr));
- HDassert(dblock_size > 0);
+ assert(f);
+ assert(H5F_addr_defined(dblock_addr));
+ assert(dblock_size > 0);
/* Check the direct block's status in the metadata cache */
if (H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0)
@@ -637,8 +636,8 @@ H5HF__man_dblock_delete(H5F_t *f, haddr_t dblock_addr, hsize_t dblock_size)
/* If the direct block is in the cache, expunge it now */
if (dblock_status & H5AC_ES__IN_CACHE) {
/* Sanity checks on direct block */
- HDassert(!(dblock_status & H5AC_ES__IS_PINNED));
- HDassert(!(dblock_status & H5AC_ES__IS_PROTECTED));
+ assert(!(dblock_status & H5AC_ES__IS_PINNED));
+ assert(!(dblock_status & H5AC_ES__IS_PROTECTED));
/* Evict the direct block from the metadata cache */
if (H5AC_expunge_entry(f, H5AC_FHEAP_DBLOCK, dblock_addr, H5AC__NO_FLAGS_SET) < 0)
@@ -688,10 +687,10 @@ H5HF__man_dblock_dest(H5HF_direct_t *dblock)
/*
* Check arguments.
*/
- HDassert(dblock);
+ assert(dblock);
/* Decrement reference count on shared fractal heap info */
- HDassert(dblock->hdr != NULL);
+ assert(dblock->hdr != NULL);
if (H5HF__hdr_decr(dblock->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
if (dblock->parent)
diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c
index 9b971be..c71ed98 100644
--- a/src/H5HFdtable.c
+++ b/src/H5HFdtable.c
@@ -89,7 +89,7 @@ H5HF__dtable_init(H5HF_dtable_t *dtable)
/*
* Check arguments.
*/
- HDassert(dtable);
+ assert(dtable);
/* Compute/cache some values */
dtable->start_bits = H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size);
@@ -147,9 +147,9 @@ H5HF__dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, uns
/*
* Check arguments.
*/
- HDassert(dtable);
- HDassert(row);
- HDassert(col);
+ assert(dtable);
+ assert(row);
+ assert(col);
/* Check for offset in first row */
if (off < dtable->num_id_first_row) {
@@ -187,7 +187,7 @@ H5HF__dtable_dest(H5HF_dtable_t *dtable)
/*
* Check arguments.
*/
- HDassert(dtable);
+ assert(dtable);
/* Free the block size lookup table for the doubling table */
H5MM_xfree(dtable->row_block_size);
@@ -226,7 +226,7 @@ H5HF__dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
/*
* Check arguments.
*/
- HDassert(dtable);
+ assert(dtable);
if (block_size == dtable->cparam.start_block_size)
row = 0;
@@ -260,7 +260,7 @@ H5HF__dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
/*
* Check arguments.
*/
- HDassert(dtable);
+ assert(dtable);
rows = (H5VM_log2_gen(size) - dtable->first_row_bits) + 1;
@@ -294,8 +294,8 @@ H5HF__dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row, unsigned
/*
* Check arguments.
*/
- HDassert(dtable);
- HDassert(num_entries > 0);
+ assert(dtable);
+ assert(num_entries > 0);
/* Compute starting entry */
start_entry = (start_row * dtable->cparam.width) + start_col;
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index f5a69bb..af776ed 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -106,7 +106,7 @@ H5HF__hdr_alloc(H5F_t *f)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
/* Allocate space for the shared information */
if (NULL == (hdr = H5FL_CALLOC(H5HF_hdr_t)))
@@ -152,8 +152,8 @@ H5HF__hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock_row >= hdr->man_dtable.max_direct_rows);
+ assert(hdr);
+ assert(iblock_row >= hdr->man_dtable.max_direct_rows);
/* Set the free space in direct blocks */
acc_heap_size = 0;
@@ -198,7 +198,7 @@ H5HF__hdr_finish_init_phase1(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Compute/cache some values */
hdr->heap_off_size = (uint8_t)H5HF_SIZEOF_OFFSET_BITS(hdr->man_dtable.cparam.max_index);
@@ -236,7 +236,7 @@ H5HF__hdr_finish_init_phase2(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Set the free space in direct blocks */
for (u = 0; u < hdr->man_dtable.max_root_rows; u++) {
@@ -289,7 +289,7 @@ H5HF__hdr_finish_init(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* First phase of header final initialization */
if (H5HF__hdr_finish_init_phase1(hdr) < 0)
@@ -327,8 +327,8 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
#ifndef NDEBUG
/* Check for valid parameters */
@@ -520,11 +520,11 @@ H5HF__hdr_protect(H5F_t *f, haddr_t addr, unsigned flags)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up userdata for protect call */
cache_udata.f = f;
@@ -566,7 +566,7 @@ H5HF__hdr_incr(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as un-evictable when a block is depending on it */
if (hdr->rc == 0)
@@ -600,15 +600,15 @@ H5HF__hdr_decr(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->rc);
+ assert(hdr);
+ assert(hdr->rc);
/* Decrement reference count on shared header */
hdr->rc--;
/* Mark header as evictable again when no child blocks depend on it */
if (hdr->rc == 0) {
- HDassert(hdr->file_rc == 0);
+ assert(hdr->file_rc == 0);
if (H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header")
} /* end if */
@@ -635,7 +635,7 @@ H5HF__hdr_fuse_incr(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Increment file reference count on shared header */
hdr->file_rc++;
@@ -661,8 +661,8 @@ H5HF__hdr_fuse_decr(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->file_rc);
+ assert(hdr);
+ assert(hdr->file_rc);
/* Decrement file reference count on shared header */
hdr->file_rc--;
@@ -690,7 +690,7 @@ H5HF__hdr_dirty(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Resize pinned header in cache if I/O filter is present. */
if (hdr->filter_len > 0)
@@ -727,10 +727,10 @@ H5HF__hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Update heap header */
- HDassert(amt > 0 || hdr->total_man_free >= (hsize_t)-amt);
+ assert(amt > 0 || hdr->total_man_free >= (hsize_t)-amt);
hdr->total_man_free = (hsize_t)((hssize_t)hdr->total_man_free + amt);
/* Mark heap header as modified */
@@ -763,13 +763,13 @@ H5HF__hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Set the total managed space in heap */
hdr->man_size = new_size;
/* Adjust the free space in direct blocks */
- HDassert(extra_free > 0 || hdr->total_man_free >= (hsize_t)-extra_free);
+ assert(extra_free > 0 || hdr->total_man_free >= (hsize_t)-extra_free);
hdr->total_man_free = (hsize_t)((hssize_t)hdr->total_man_free + extra_free);
/* Mark heap header as modified */
@@ -800,8 +800,8 @@ H5HF__hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(alloc_size);
+ assert(hdr);
+ assert(alloc_size);
/* Update the "allocated" size within the heap */
hdr->man_alloc_size += alloc_size;
@@ -831,8 +831,8 @@ H5HF__hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off,
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock);
+ assert(hdr);
+ assert(iblock);
/* Set up "next block" iterator at correct location */
if (H5HF__man_iter_start_entry(hdr, &hdr->next_block, iblock, curr_entry) < 0)
@@ -867,7 +867,7 @@ H5HF__hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Reset "next block" iterator */
if (H5HF__man_iter_reset(&hdr->next_block) < 0)
@@ -904,15 +904,15 @@ H5HF__hdr_skip_blocks(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start_e
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock);
- HDassert(nentries);
+ assert(hdr);
+ assert(iblock);
+ assert(nentries);
/* Compute the span within the heap to skip */
row = start_entry / hdr->man_dtable.cparam.width;
col = start_entry % hdr->man_dtable.cparam.width;
sect_size = H5HF__dtable_span_size(&hdr->man_dtable, row, col, nentries);
- HDassert(sect_size > 0);
+ assert(sect_size > 0);
/* Advance the new block iterator */
if (H5HF__hdr_inc_iter(hdr, sect_size, nentries) < 0)
@@ -952,8 +952,8 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(min_dblock_size > 0);
+ assert(hdr);
+ assert(min_dblock_size > 0);
/* Check for creating first indirect block */
if (hdr->man_dtable.curr_root_rows == 0) {
@@ -1039,7 +1039,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
if (next_row >= hdr->man_dtable.max_direct_rows) {
unsigned child_nrows; /* Number of rows in new indirect block */
- HDassert(!H5F_addr_defined(iblock->ents[next_entry].addr));
+ assert(!H5F_addr_defined(iblock->ents[next_entry].addr));
/* Compute # of rows in next child indirect block to use */
child_nrows =
@@ -1055,7 +1055,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
child_rows_needed = (H5VM_log2_of2((uint32_t)min_dblock_size) -
H5VM_log2_of2((uint32_t)hdr->man_dtable.cparam.start_block_size)) +
2;
- HDassert(child_rows_needed > child_nrows);
+ assert(child_rows_needed > child_nrows);
child_entry =
(next_row + (child_rows_needed - child_nrows)) * hdr->man_dtable.cparam.width;
if (child_entry > (iblock->nrows * hdr->man_dtable.cparam.width))
@@ -1145,8 +1145,8 @@ H5HF__hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(nentries);
+ assert(hdr);
+ assert(nentries);
/* Advance the iterator for the current location within the indirect block */
if (hdr->next_block.curr)
@@ -1187,7 +1187,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Initialize block iterator, if necessary */
if (!H5HF__man_iter_ready(&hdr->next_block))
@@ -1333,7 +1333,7 @@ H5HF__hdr_empty(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Reset block iterator, if necessary */
if (H5HF__man_iter_ready(&hdr->next_block))
@@ -1384,7 +1384,7 @@ H5HF__hdr_free(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Free the block size lookup table for the doubling table */
if (H5HF__dtable_dest(&hdr->man_dtable) < 0)
@@ -1425,8 +1425,8 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(!hdr->file_rc);
+ assert(hdr);
+ assert(!hdr->file_rc);
#ifndef NDEBUG
{
@@ -1437,8 +1437,8 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for heap header")
/* Sanity checks on heap header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PROTECTED);
} /* end block */
#endif /* NDEBUG */
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index e12c0c8..d1c8d47 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -100,7 +100,7 @@ H5HF__huge_bt2_create(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Compute the size of 'raw' records on disk */
/* (Note: the size for huge IDs could be set to 'huge_id_size', instead
@@ -178,7 +178,7 @@ H5HF__huge_init(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Compute information about 'huge' objects for the heap */
@@ -250,7 +250,7 @@ H5HF__huge_new_id(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check for wrapping around 'huge' object ID space */
if (hdr->huge_ids_wrapped)
@@ -300,10 +300,10 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(obj_size > hdr->max_man_size);
- HDassert(obj);
- HDassert(id);
+ assert(hdr);
+ assert(obj_size > hdr->max_man_size);
+ assert(obj);
+ assert(id);
/* Check if the v2 B-tree for tracking 'huge' heap objects has been created yet */
if (!H5F_addr_defined(hdr->huge_bt2_addr)) {
@@ -321,7 +321,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id)
"unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
} /* end else */
- HDassert(hdr->huge_bt2);
+ assert(hdr->huge_bt2);
/* Check for I/O pipeline filter on heap */
if (hdr->filter_len > 0) {
@@ -362,7 +362,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id)
/* Release buffer for writing, if we had one */
if (write_buf != obj) {
- HDassert(hdr->filter_len > 0);
+ assert(hdr->filter_len > 0);
H5MM_xfree(write_buf);
} /* end if */
@@ -481,10 +481,10 @@ H5HF__huge_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
- HDassert(id);
- HDassert(obj_len_p);
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(id);
+ assert(obj_len_p);
/* Skip over the flag byte */
id++;
@@ -579,10 +579,10 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
- HDassert(id);
- HDassert(obj_off_p);
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(id);
+ assert(obj_off_p);
/* Skip over the flag byte */
id++;
@@ -596,7 +596,7 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p)
hbool_t found = FALSE; /* Whether entry was found */
/* Sanity check */
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Check if v2 B-tree is open yet */
if (NULL == hdr->huge_bt2) {
@@ -674,9 +674,9 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(is_read || op);
+ assert(hdr);
+ assert(id);
+ assert(is_read || op);
/* Skip over the flag byte */
id++;
@@ -695,7 +695,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope
hbool_t found = FALSE; /* Whether entry was found */
/* Sanity check */
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Check if v2 B-tree is open yet */
if (NULL == hdr->huge_bt2) {
@@ -829,9 +829,9 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Check for filters on the heap */
if (hdr->filter_len > 0)
@@ -852,7 +852,7 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj)
hbool_t found = FALSE; /* Whether entry was found */
/* Sanity check */
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Check if v2 B-tree is open yet */
if (NULL == hdr->huge_bt2) {
@@ -907,9 +907,9 @@ H5HF__huge_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Call the internal 'op' routine */
if (H5HF__huge_op_real(hdr, id, TRUE, NULL, obj) < 0)
@@ -941,9 +941,9 @@ H5HF__huge_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_d
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Call the internal 'op' routine routine */
if (H5HF__huge_op_real(hdr, id, FALSE, op, op_data) < 0)
@@ -976,9 +976,9 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
- HDassert(id);
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(id);
/* Check if v2 B-tree is open yet */
if (NULL == hdr->huge_bt2) {
@@ -1082,12 +1082,12 @@ H5HF__huge_term(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check if v2 B-tree index is open */
if (hdr->huge_bt2) {
/* Sanity check */
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Close v2 B-tree index */
if (H5B2_close(hdr->huge_bt2) < 0)
@@ -1100,7 +1100,7 @@ H5HF__huge_term(H5HF_hdr_t *hdr)
*/
if (H5F_addr_defined(hdr->huge_bt2_addr) && hdr->huge_nobjs == 0) {
/* Sanity check */
- HDassert(hdr->huge_size == 0);
+ assert(hdr->huge_size == 0);
/* Delete the v2 B-tree */
/* (any v2 B-tree class will work here) */
@@ -1146,10 +1146,10 @@ H5HF__huge_delete(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
- HDassert(hdr->huge_nobjs);
- HDassert(hdr->huge_size);
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(hdr->huge_nobjs);
+ assert(hdr->huge_size);
/* Set up the callback info */
udata.hdr = hdr;
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index ccc0669..b03e1f5 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -101,7 +101,7 @@ H5HF__iblock_pin(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
+ assert(iblock);
/* Mark block as un-evictable */
if (H5AC_pin_protected_entry(iblock) < 0)
@@ -113,27 +113,27 @@ H5HF__iblock_pin(H5HF_indirect_t *iblock)
unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >=
- (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
+ assert(par_iblock->child_iblocks);
+ assert(iblock->par_entry >=
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
indir_idx = iblock->par_entry -
(iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width);
/* Set pointer to pinned indirect block in parent */
- HDassert(par_iblock->child_iblocks[indir_idx] == NULL);
+ assert(par_iblock->child_iblocks[indir_idx] == NULL);
par_iblock->child_iblocks[indir_idx] = iblock;
} /* end if */
else {
/* Check for pinning the root indirect block */
if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively pinning root indirect block */
- HDassert(0 == (iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED));
+ assert(0 == (iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED));
/* Check if we should set the root iblock pointer */
if (0 == iblock->hdr->root_iblock_flags) {
- HDassert(NULL == iblock->hdr->root_iblock);
+ assert(NULL == iblock->hdr->root_iblock);
iblock->hdr->root_iblock = iblock;
} /* end if */
@@ -166,7 +166,7 @@ H5HF__iblock_unpin(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Mark block as evictable again */
if (H5AC_unpin_entry(iblock) < 0)
@@ -196,8 +196,8 @@ H5HF__iblock_incr(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->block_off == 0 || iblock->parent);
+ assert(iblock);
+ assert(iblock->block_off == 0 || iblock->parent);
/* Mark block as un-evictable when a child block is depending on it */
if (iblock->rc == 0)
@@ -231,7 +231,7 @@ H5HF__iblock_decr(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Decrement reference count on shared indirect block */
iblock->rc--;
@@ -245,27 +245,27 @@ H5HF__iblock_decr(H5HF_indirect_t *iblock)
unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >=
- (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
+ assert(par_iblock->child_iblocks);
+ assert(iblock->par_entry >=
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
indir_idx = iblock->par_entry -
(iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width);
/* Reset pointer to pinned child indirect block in parent */
- HDassert(par_iblock->child_iblocks[indir_idx]);
+ assert(par_iblock->child_iblocks[indir_idx]);
par_iblock->child_iblocks[indir_idx] = NULL;
} /* end if */
else {
/* Check for root indirect block */
if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively unpinning root indirect block */
- HDassert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED);
+ assert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED);
/* Check if we should reset the root iblock pointer */
if (H5HF_ROOT_IBLOCK_PINNED == iblock->hdr->root_iblock_flags) {
- HDassert(NULL != iblock->hdr->root_iblock);
+ assert(NULL != iblock->hdr->root_iblock);
iblock->hdr->root_iblock = NULL;
} /* end if */
@@ -311,7 +311,7 @@ H5HF__iblock_dirty(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Mark indirect block as dirty in cache */
if (H5AC_mark_entry_dirty(iblock) < 0)
@@ -509,8 +509,8 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
next_size = hdr->man_dtable.row_block_size[next_row];
/* Make certain the iterator is at the root indirect block */
- HDassert(iblock->parent == NULL);
- HDassert(iblock->block_off == 0);
+ assert(iblock->parent == NULL);
+ assert(iblock->block_off == 0);
/* Keep this for later */
old_nrows = iblock->nrows;
@@ -518,7 +518,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Check for skipping over direct block rows */
if (iblock->nrows < hdr->man_dtable.max_direct_rows && min_dblock_size > next_size) {
/* Sanity check */
- HDassert(min_dblock_size > hdr->man_dtable.cparam.start_block_size);
+ assert(min_dblock_size > hdr->man_dtable.cparam.start_block_size);
/* Set flag */
skip_direct_rows = TRUE;
@@ -595,7 +595,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Compute the number of direct rows for this indirect block */
dir_rows = MIN(iblock->nrows, hdr->man_dtable.max_direct_rows);
- HDassert(dir_rows > old_nrows);
+ assert(dir_rows > old_nrows);
/* Re-allocate filtered direct block entry array */
if (NULL == (iblock->filt_ents = H5FL_SEQ_REALLOC(H5HF_indirect_filt_ent_t, iblock->filt_ents,
@@ -681,9 +681,9 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
- HDassert(iblock->parent == NULL);
- HDassert(hdr);
+ assert(iblock);
+ assert(iblock->parent == NULL);
+ assert(hdr);
/* Compute maximum row used by child of indirect block */
max_child_row = iblock->max_child / hdr->man_dtable.cparam.width;
@@ -813,7 +813,7 @@ H5HF__man_iblock_root_revert(H5HF_indirect_t *root_iblock)
/*
* Check arguments.
*/
- HDassert(root_iblock);
+ assert(root_iblock);
/* Set up local convenience variables */
hdr = root_iblock->hdr;
@@ -824,8 +824,8 @@ H5HF__man_iblock_root_revert(H5HF_indirect_t *root_iblock)
if (NULL == (dblock = H5HF__man_dblock_protect(hdr, dblock_addr, dblock_size, root_iblock, 0,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block")
- HDassert(dblock->parent == root_iblock);
- HDassert(dblock->par_entry == 0);
+ assert(dblock->parent == root_iblock);
+ assert(dblock->par_entry == 0);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -903,9 +903,9 @@ H5HF__man_iblock_alloc_row(H5HF_hdr_t *hdr, H5HF_free_section_t **sec_node)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sec_node && old_sec_node);
- HDassert(old_sec_node->u.row.row < hdr->man_dtable.max_direct_rows);
+ assert(hdr);
+ assert(sec_node && old_sec_node);
+ assert(old_sec_node->u.row.row < hdr->man_dtable.max_direct_rows);
/* Check for serialized row section, or serialized / deleted indirect
* section under it. */
@@ -968,9 +968,9 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(nrows > 0);
- HDassert(addr_p);
+ assert(hdr);
+ assert(nrows > 0);
+ assert(addr_p);
/*
* Allocate file and memory data structures.
@@ -980,7 +980,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
"memory allocation failed for fractal heap indirect block")
/* Reset the metadata cache info for the heap header */
- HDmemset(&iblock->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&iblock->cache_info, 0, sizeof(H5AC_info_t));
/* Share common heap information */
iblock->hdr = hdr;
@@ -1118,13 +1118,13 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(iblock_addr));
- HDassert(iblock_nrows > 0);
- HDassert(did_protect);
+ assert(hdr);
+ assert(H5F_addr_defined(iblock_addr));
+ assert(iblock_nrows > 0);
+ assert(did_protect);
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Check if we are allowed to use existing pinned iblock pointer */
if (!must_protect) {
@@ -1133,8 +1133,8 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(par_iblock->child_iblocks);
- HDassert(par_entry >= (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width));
+ assert(par_iblock->child_iblocks);
+ assert(par_entry >= (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
indir_idx = par_entry - (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width);
@@ -1151,14 +1151,14 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
/* Check for valid pointer to pinned indirect block in root */
if (H5HF_ROOT_IBLOCK_PINNED == hdr->root_iblock_flags) {
/* Sanity check */
- HDassert(NULL != hdr->root_iblock);
+ assert(NULL != hdr->root_iblock);
/* Return the pointer to the pinned root indirect block */
iblock = hdr->root_iblock;
} /* end if */
else {
/* Sanity check */
- HDassert(NULL == hdr->root_iblock);
+ assert(NULL == hdr->root_iblock);
should_protect = TRUE;
} /* end else */
@@ -1193,11 +1193,11 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
/* Check for root indirect block */
if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively protecting root indirect block */
- HDassert(0 == (hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED));
+ assert(0 == (hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED));
/* Check if we should set the root iblock pointer */
if (0 == hdr->root_iblock_flags) {
- HDassert(NULL == hdr->root_iblock);
+ assert(NULL == hdr->root_iblock);
hdr->root_iblock = iblock;
} /* end if */
@@ -1241,7 +1241,7 @@ H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags, hbool_
/*
* Check arguments.
*/
- HDassert(iblock);
+ assert(iblock);
/* Check if we previously protected this indirect block */
/* (as opposed to using an existing pointer to a pinned child indirect block) */
@@ -1249,11 +1249,11 @@ H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags, hbool_
/* Check for root indirect block */
if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively unprotecting root indirect block */
- HDassert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED);
+ assert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED);
/* Check if we should reset the root iblock pointer */
if (H5HF_ROOT_IBLOCK_PROTECTED == iblock->hdr->root_iblock_flags) {
- HDassert(NULL != iblock->hdr->root_iblock);
+ assert(NULL != iblock->hdr->root_iblock);
iblock->hdr->root_iblock = NULL;
} /* end if */
@@ -1292,9 +1292,9 @@ H5HF__man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_a
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(H5F_addr_defined(child_addr));
- HDassert(!H5F_addr_defined(iblock->ents[entry].addr));
+ assert(iblock);
+ assert(H5F_addr_defined(child_addr));
+ assert(!H5F_addr_defined(iblock->ents[entry].addr));
/* Increment the reference count on this indirect block */
if (H5HF__iblock_incr(iblock) < 0)
@@ -1308,7 +1308,7 @@ H5HF__man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_a
unsigned row; /* Row for entry */
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* Compute row for entry */
row = entry / iblock->hdr->man_dtable.cparam.width;
@@ -1358,8 +1358,8 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(iblock->nchildren);
+ assert(iblock);
+ assert(iblock->nchildren);
/* Set up convenience variables */
hdr = iblock->hdr;
@@ -1373,7 +1373,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* If this is a direct block, reset its initial size */
if (row < hdr->man_dtable.max_direct_rows) {
@@ -1387,13 +1387,13 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(iblock->child_iblocks);
+ assert(iblock->child_iblocks);
/* Compute index in child iblock pointer array */
indir_idx = entry - (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width);
/* Sanity check */
- HDassert(iblock->child_iblocks[indir_idx]);
+ assert(iblock->child_iblocks[indir_idx]);
/* Reset pointer to child indirect block in parent */
iblock->child_iblocks[indir_idx] = NULL;
@@ -1470,7 +1470,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
iblock->parent, iblock->par_entry, TRUE,
H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
- HDassert(did_protect == TRUE);
+ assert(did_protect == TRUE);
/* Check for deleting root indirect block (and no root direct block) */
if (iblock->block_off == 0 && hdr->man_dtable.curr_root_rows > 0)
@@ -1570,8 +1570,8 @@ H5HF__man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *ch
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(child_addr);
+ assert(iblock);
+ assert(child_addr);
/* Retrieve address of entry */
*child_addr = iblock->ents[entry].addr;
@@ -1611,16 +1611,16 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(iblock_addr));
- HDassert(iblock_nrows > 0);
+ assert(hdr);
+ assert(H5F_addr_defined(iblock_addr));
+ assert(iblock_nrows > 0);
/* Lock indirect block */
if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, iblock_nrows, par_iblock, par_entry,
TRUE, H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
- HDassert(iblock->nchildren > 0);
- HDassert(did_protect == TRUE);
+ assert(iblock->nchildren > 0);
+ assert(did_protect == TRUE);
/* Iterate over rows in this indirect block */
entry = 0;
@@ -1674,7 +1674,7 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr
"unable to check metadata cache status for indirect block")
/* Check if indirect block is pinned */
- HDassert(!(iblock_status & H5AC_ES__IS_PINNED));
+ assert(!(iblock_status & H5AC_ES__IS_PINNED));
}
#endif /* NDEBUG */
@@ -1720,10 +1720,10 @@ H5HF__man_iblock_size(H5F_t *f, H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned n
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(hdr);
- HDassert(H5F_addr_defined(iblock_addr));
- HDassert(heap_size);
+ assert(f);
+ assert(hdr);
+ assert(H5F_addr_defined(iblock_addr));
+ assert(heap_size);
/* Protect the indirect block */
if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, par_iblock, par_entry, FALSE,
@@ -1797,16 +1797,16 @@ H5HF__man_iblock_parent_info(const H5HF_hdr_t *hdr, hsize_t block_off, hsize_t *
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(block_off > 0);
- HDassert(ret_entry);
+ assert(hdr);
+ assert(block_off > 0);
+ assert(ret_entry);
/* Look up row & column for object */
if (H5HF__dtable_lookup(&hdr->man_dtable, block_off, &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of block")
/* Sanity check - first lookup must be an indirect block */
- HDassert(row >= hdr->man_dtable.max_direct_rows);
+ assert(row >= hdr->man_dtable.max_direct_rows);
/* Traverse down, until a direct block at the offset is found, then
* use previous (i.e. parent's) offset, row, and column.
@@ -1831,8 +1831,8 @@ H5HF__man_iblock_parent_info(const H5HF_hdr_t *hdr, hsize_t block_off, hsize_t *
} /* end while */
/* Sanity check */
- HDassert(row == 0);
- HDassert(col == 0);
+ assert(row == 0);
+ assert(col == 0);
/* Set return parameters */
*ret_par_block_off = prev_par_block_off;
@@ -1864,11 +1864,11 @@ H5HF__man_iblock_dest(H5HF_indirect_t *iblock)
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(iblock->rc == 0);
+ assert(iblock);
+ assert(iblock->rc == 0);
/* Decrement reference count on shared info */
- HDassert(iblock->hdr);
+ assert(iblock->hdr);
if (H5HF__hdr_decr(iblock->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
if (iblock->parent)
diff --git a/src/H5HFiter.c b/src/H5HFiter.c
index 6d40979..0059029 100644
--- a/src/H5HFiter.c
+++ b/src/H5HFiter.c
@@ -88,10 +88,10 @@ H5HF__man_iter_init(H5HF_block_iter_t *biter)
/*
* Check arguments.
*/
- HDassert(biter);
+ assert(biter);
/* Reset block iterator information */
- HDmemset(biter, 0, sizeof(H5HF_block_iter_t));
+ memset(biter, 0, sizeof(H5HF_block_iter_t));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF__man_iter_init() */
@@ -128,11 +128,11 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(!biter->ready);
+ assert(biter);
+ assert(!biter->ready);
/* Check for empty heap */
- HDassert(offset >= hdr->man_dtable.cparam.start_block_size);
+ assert(offset >= hdr->man_dtable.cparam.start_block_size);
/* Allocate level structure */
if (NULL == (biter->curr = H5FL_MALLOC(H5HF_block_loc_t)))
@@ -225,7 +225,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o
/* Or, if the offset has just filled up a direct or indirect block */
if (curr_offset == (col * hdr->man_dtable.row_block_size[row]) ||
row < hdr->man_dtable.max_direct_rows) {
- HDassert(curr_offset - (col * hdr->man_dtable.row_block_size[row]) == 0);
+ assert(curr_offset - (col * hdr->man_dtable.row_block_size[row]) == 0);
break; /* Done now */
} /* end if */
/* Indirect block row */
@@ -275,7 +275,7 @@ H5HF__man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsign
/*
* Check arguments.
*/
- HDassert(biter);
+ assert(biter);
/* Set location context */
biter->curr->entry = entry;
@@ -310,10 +310,10 @@ H5HF__man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indir
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(biter);
- HDassert(!biter->ready);
- HDassert(iblock);
+ assert(hdr);
+ assert(biter);
+ assert(!biter->ready);
+ assert(iblock);
/* Create new location for iterator */
if (NULL == (new_loc = H5FL_MALLOC(H5HF_block_loc_t)))
@@ -367,7 +367,7 @@ H5HF__man_iter_reset(H5HF_block_iter_t *biter)
/*
* Check arguments.
*/
- HDassert(biter);
+ assert(biter);
/* Free any location contexts that exist */
if (biter->curr) {
@@ -424,16 +424,16 @@ H5HF__man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(biter->curr);
- HDassert(biter->curr->context);
- HDassert(biter->curr->row < biter->curr->context->nrows);
+ assert(biter);
+ assert(biter->curr);
+ assert(biter->curr->context);
+ assert(biter->curr->row < biter->curr->context->nrows);
/* Advance entry in current block */
biter->curr->entry += nentries;
biter->curr->row = biter->curr->entry / hdr->man_dtable.cparam.width;
biter->curr->col = biter->curr->entry % hdr->man_dtable.cparam.width;
- /* HDassert(biter->curr->row <= biter->curr->context->nrows); */
+ /* assert(biter->curr->row <= biter->curr->context->nrows); */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF__man_iter_next() */
@@ -461,11 +461,11 @@ H5HF__man_iter_up(H5HF_block_iter_t *biter)
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(biter->ready);
- HDassert(biter->curr);
- HDassert(biter->curr->up);
- HDassert(biter->curr->context);
+ assert(biter);
+ assert(biter->ready);
+ assert(biter->curr);
+ assert(biter->curr->up);
+ assert(biter->curr->context);
/* Release hold on current location's indirect block */
if (H5HF__iblock_decr(biter->curr->context) < 0)
@@ -507,10 +507,10 @@ H5HF__man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock)
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(biter->ready);
- HDassert(biter->curr);
- HDassert(biter->curr->context);
+ assert(biter);
+ assert(biter->ready);
+ assert(biter->curr);
+ assert(biter->curr->context);
/* Create new location to move down to */
if (NULL == (down_loc = H5FL_MALLOC(H5HF_block_loc_t)))
@@ -559,8 +559,8 @@ H5HF__man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col, unsi
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(biter->ready);
+ assert(biter);
+ assert(biter->ready);
/* Retrieve the information asked for */
if (row)
@@ -595,7 +595,7 @@ H5HF__man_iter_ready(H5HF_block_iter_t *biter)
/*
* Check arguments.
*/
- HDassert(biter);
+ assert(biter);
FUNC_LEAVE_NOAPI(biter->ready)
} /* end H5HF__man_iter_ready() */
diff --git a/src/H5HFman.c b/src/H5HFman.c
index 9827db7..b0de905 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -109,10 +109,10 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(obj_size > 0);
- HDassert(obj);
- HDassert(id);
+ assert(hdr);
+ assert(obj_size > 0);
+ assert(obj);
+ assert(id);
/* Check pipeline */
H5HF_MAN_WRITE_CHECK_PLINE(hdr)
@@ -135,13 +135,13 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
if (H5HF__man_iblock_alloc_row(hdr, &sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't break up row section")
} /* end if */
- HDassert(sec_node->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sec_node->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Check for 'single' section being serialized */
if (sec_node->sect_info.state == H5FS_SECT_SERIALIZED)
if (H5HF__sect_single_revive(hdr, sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section")
- HDassert(sec_node->sect_info.state == H5FS_SECT_LIVE);
+ assert(sec_node->sect_info.state == H5FS_SECT_LIVE);
/* Retrieve direct block address from section */
if (H5HF__sect_single_dblock_info(hdr, sec_node, &dblock_addr, &dblock_size) < 0)
@@ -159,7 +159,7 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
blk_off = (size_t)(sec_node->sect_info.addr - dblock->block_off);
/* Sanity checks */
- HDassert(sec_node->sect_info.size >= obj_size);
+ assert(sec_node->sect_info.size >= obj_size);
/* Reduce (& possibly re-add) single section */
if (H5HF__sect_single_reduce(hdr, sec_node, obj_size) < 0)
@@ -178,7 +178,7 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
p += obj_size;
/* Sanity check */
- HDassert((size_t)(p - (dblock->blk + blk_off)) == obj_size);
+ assert((size_t)(p - (dblock->blk + blk_off)) == obj_size);
} /* end block */
/* Set the heap ID for the new object (heap offset & obj length) */
@@ -225,9 +225,9 @@ H5HF__man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj_len_p);
+ assert(hdr);
+ assert(id);
+ assert(obj_len_p);
/* Skip over the flag byte */
id++;
@@ -261,9 +261,9 @@ H5HF__man_get_obj_off(const H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj_off_p);
+ assert(hdr);
+ assert(id);
+ assert(obj_off_p);
/* Skip over the flag byte */
id++;
@@ -310,9 +310,9 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Set the access mode for the direct block */
if (op_flags & H5HF_OP_MODIFY) {
@@ -400,7 +400,7 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *
} /* end else */
/* Compute offset of object within block */
- HDassert((obj_off - dblock->block_off) < (hsize_t)dblock_size);
+ assert((obj_off - dblock->block_off) < (hsize_t)dblock_size);
blk_off = (size_t)(obj_off - dblock->block_off);
/* Check for object's offset in the direct block prefix information */
@@ -448,9 +448,9 @@ H5HF__man_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Call the internal 'op' routine routine */
if (H5HF__man_op_real(hdr, id, H5HF__op_read, obj, 0) < 0)
@@ -482,9 +482,9 @@ H5HF__man_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Call the internal 'op' routine routine
*
@@ -523,9 +523,9 @@ H5HF__man_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_da
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Call the internal 'op' routine routine */
if (H5HF__man_op_real(hdr, id, op, op_data, 0) < 0)
@@ -566,8 +566,8 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
+ assert(hdr);
+ assert(id);
/* Check pipeline */
H5HF_MAN_WRITE_CHECK_PLINE(hdr)
@@ -622,7 +622,7 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id)
} /* end else */
/* Compute offset of object within block */
- HDassert((obj_off - dblock_block_off) < (hsize_t)dblock_size);
+ assert((obj_off - dblock_block_off) < (hsize_t)dblock_size);
blk_off = (size_t)(obj_off - dblock_block_off);
/* Check for object's offset in the direct block prefix information */
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index f323c41..2dad0a1 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -297,8 +297,8 @@ H5FS__sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(!cls->cls_private);
+ assert(cls);
+ assert(!cls->cls_private);
/* Allocate & initialize the class-private (i.e. private shared) information
* for this type of section
@@ -338,7 +338,7 @@ H5FS__sect_term_cls(H5FS_section_class_t *cls)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
+ assert(cls);
/* Get pointer to class private info */
cls_prvt = (H5HF_sect_private_t *)cls->cls_private;
@@ -377,7 +377,7 @@ H5FS__sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size, H5
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(H5F_addr_defined(sect_addr));
+ assert(H5F_addr_defined(sect_addr));
/* Create free list section node */
if (NULL == (new_sect = H5FL_MALLOC(H5HF_free_section_t)))
@@ -420,7 +420,7 @@ H5HF__sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
- HDassert(sect);
+ assert(sect);
/* Release indirect block, if there was one */
if (iblock)
@@ -458,7 +458,7 @@ H5HF__sect_single_new(hsize_t sect_off, size_t sect_size, H5HF_indirect_t *paren
/*
* Check arguments.
*/
- HDassert(sect_size);
+ assert(sect_size);
/* Create free space section node */
if (NULL ==
@@ -511,9 +511,9 @@ H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, hbool_t refresh, H5HF_free_sect
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(hdr->man_dtable.curr_root_rows > 0);
- HDassert(sect);
+ assert(hdr);
+ assert(hdr->man_dtable.curr_root_rows > 0);
+ assert(sect);
/* Look up indirect block containing direct blocks for range */
if (H5HF__man_dblock_locate(hdr, sect->sect_info.addr, &sec_iblock, &sec_entry, &did_protect,
@@ -569,14 +569,14 @@ H5HF__sect_single_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
/* Check for root direct block */
if (hdr->man_dtable.curr_root_rows == 0) {
/* Set the information for the section */
- HDassert(H5F_addr_defined(hdr->man_dtable.table_addr));
+ assert(H5F_addr_defined(hdr->man_dtable.table_addr));
sect->u.single.parent = NULL;
sect->u.single.par_entry = 0;
} /* end if */
@@ -614,17 +614,17 @@ H5HF__sect_single_dblock_info(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
- HDassert(dblock_addr);
- HDassert(dblock_size);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(dblock_addr);
+ assert(dblock_size);
/* Check for root direct block */
if (hdr->man_dtable.curr_root_rows == 0) {
/* Retrieve direct block info from heap header */
- HDassert(H5F_addr_defined(hdr->man_dtable.table_addr));
+ assert(H5F_addr_defined(hdr->man_dtable.table_addr));
*dblock_addr = hdr->man_dtable.table_addr;
*dblock_size = hdr->man_dtable.cparam.start_block_size;
} /* end if */
@@ -662,10 +662,10 @@ H5HF__sect_single_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, size_t amt)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
/* Check for eliminating the section */
if (sect->sect_info.size == amt) {
@@ -715,9 +715,9 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
- HDassert(hdr);
+ assert(sect);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(hdr);
/* Retrieve direct block address from section */
if (H5HF__sect_single_dblock_info(hdr, sect, &dblock_addr, &dblock_size) < 0)
@@ -733,7 +733,7 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
if (NULL == (dblock = H5HF__man_dblock_protect(hdr, dblock_addr, dblock_size, sect->u.single.parent,
sect->u.single.par_entry, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block")
- HDassert(H5F_addr_eq(dblock->block_off + dblock_overhead, sect->sect_info.addr));
+ assert(H5F_addr_eq(dblock->block_off + dblock_overhead, sect->sect_info.addr));
/* Convert 'single' section into 'row' section */
if (H5HF__sect_row_from_single(hdr, sect, dblock) < 0)
@@ -786,8 +786,8 @@ H5HF__sect_single_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
/* Sanity check */
- HDassert(sect);
- HDassert(hdr);
+ assert(sect);
+ assert(hdr);
/* Check if single section covers entire direct block it's in */
/* (converts to row section possibly) */
@@ -830,8 +830,8 @@ H5HF__sect_single_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(H5F_addr_defined(sect_addr));
- HDassert(sect_size);
+ assert(H5F_addr_defined(sect_addr));
+ assert(sect_size);
/* Create free list section node */
if (NULL ==
@@ -872,10 +872,10 @@ H5HF__sect_single_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
/* (This can only occur within a direct block, due to the direct block
@@ -917,11 +917,11 @@ H5HF__sect_single_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -973,7 +973,7 @@ H5HF__sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Check for section occupying entire root direct block */
/* (We shouldn't ever have a single section that occupies an entire
@@ -994,7 +994,7 @@ H5HF__sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* We shouldn't have a situation where the 'next block' iterator
* is moved before a direct block that still has objects within it.
*/
- HDassert(hdr->man_iter_off > sect->sect_info.addr);
+ assert(hdr->man_iter_off > sect->sect_info.addr);
HGOTO_DONE(FALSE)
} /* end else */
@@ -1030,9 +1030,9 @@ H5HF__sect_single_shrink(H5FS_section_info_t **_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(*sect);
- HDassert((*sect)->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect);
+ assert(*sect);
+ assert((*sect)->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Check to see if we should revive section */
if ((*sect)->sect_info.state != H5FS_SECT_LIVE)
@@ -1045,11 +1045,11 @@ H5HF__sect_single_shrink(H5FS_section_info_t **_sect, void *_udata)
/* Protect the direct block for the section */
/* (should be a root direct block) */
- HDassert(dblock_addr == hdr->man_dtable.table_addr);
+ assert(dblock_addr == hdr->man_dtable.table_addr);
if (NULL == (dblock = H5HF__man_dblock_protect(hdr, dblock_addr, dblock_size, (*sect)->u.single.parent,
(*sect)->u.single.par_entry, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block")
- HDassert(H5F_addr_eq(dblock->block_off + dblock_size, (*sect)->sect_info.addr + (*sect)->sect_info.size));
+ assert(H5F_addr_eq(dblock->block_off + dblock_size, (*sect)->sect_info.addr + (*sect)->sect_info.size));
/* Get rid of section */
if (H5HF__sect_single_free((H5FS_section_info_t *)*sect) < 0)
@@ -1091,7 +1091,7 @@ H5HF__sect_single_free(H5FS_section_info_t *_sect)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Check for live reference to an indirect block */
if (sect->sect_info.state == H5FS_SECT_LIVE)
@@ -1128,7 +1128,7 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
if (sect->sect_info.state == H5FS_SECT_LIVE) {
/* Check if this section is not in a direct block that is the root direct block */
@@ -1143,25 +1143,25 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
/* Sanity check settings for section's direct block's parent */
iblock = sect->u.single.parent;
- HDassert(H5F_addr_defined(iblock->ents[sect->u.single.par_entry].addr));
+ assert(H5F_addr_defined(iblock->ents[sect->u.single.par_entry].addr));
/* Retrieve direct block address from section */
status = H5HF__sect_single_dblock_info(iblock->hdr, (const H5HF_free_section_t *)sect,
&dblock_addr, &dblock_size);
- HDassert(status >= 0);
- HDassert(H5F_addr_eq(iblock->ents[sect->u.single.par_entry].addr, dblock_addr));
- HDassert(dblock_size > 0);
+ assert(status >= 0);
+ assert(H5F_addr_eq(iblock->ents[sect->u.single.par_entry].addr, dblock_addr));
+ assert(dblock_size > 0);
/* Check if the section is actually within the heap */
- HDassert(sect->sect_info.addr < iblock->hdr->man_iter_off);
+ assert(sect->sect_info.addr < iblock->hdr->man_iter_off);
/* Check that the direct block has been merged correctly */
dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(iblock->hdr);
- HDassert((sect->sect_info.size + dblock_overhead) < dblock_size);
+ assert((sect->sect_info.size + dblock_overhead) < dblock_size);
/* Check the direct block's status in the metadata cache */
status = H5AC_get_entry_status(iblock->hdr->f, dblock_addr, &dblock_status);
- HDassert(status >= 0);
+ assert(status >= 0);
/* If the direct block for the section isn't already protected,
* protect it here in order to check single section's sanity
@@ -1173,19 +1173,19 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
/* Protect the direct block for the section */
dblock = H5HF__man_dblock_protect(iblock->hdr, dblock_addr, dblock_size, iblock,
sect->u.single.par_entry, H5AC__READ_ONLY_FLAG);
- HDassert(dblock);
+ assert(dblock);
/* Sanity check settings for section */
- HDassert(dblock_size == dblock->size);
- HDassert(dblock->size > sect->sect_info.size);
- HDassert(H5F_addr_lt(dblock->block_off, sect->sect_info.addr));
- HDassert(H5F_addr_ge((dblock->block_off + dblock->size),
- (sect->sect_info.addr + sect->sect_info.size)));
+ assert(dblock_size == dblock->size);
+ assert(dblock->size > sect->sect_info.size);
+ assert(H5F_addr_lt(dblock->block_off, sect->sect_info.addr));
+ assert(H5F_addr_ge((dblock->block_off + dblock->size),
+ (sect->sect_info.addr + sect->sect_info.size)));
/* Release direct block */
status = H5AC_unprotect(iblock->hdr->f, H5AC_FHEAP_DBLOCK, dblock_addr, dblock,
H5AC__NO_FLAGS_SET);
- HDassert(status >= 0);
+ assert(status >= 0);
} /* end if */
} /* end if */
} /* end if */
@@ -1217,9 +1217,9 @@ H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first, uns
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect_size);
- HDassert(nentries);
- HDassert(under_sect);
+ assert(sect_size);
+ assert(nentries);
+ assert(under_sect);
/* Create 'row' free space section node */
/* ("inherits" underlying indirect section's state) */
@@ -1264,9 +1264,9 @@ H5HF__sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_dire
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(dblock);
+ assert(hdr);
+ assert(sect);
+ assert(dblock);
/* Convert 'single' section information to 'row' section info */
sect->sect_info.addr = dblock->block_off;
@@ -1310,9 +1310,9 @@ H5HF__sect_row_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->u.row.under);
+ assert(hdr);
+ assert(sect);
+ assert(sect->u.row.under);
/* If the indirect section's iblock has been removed from the cache, but the
* section is still marked as "live", switch it to the "serialized" state.
@@ -1326,7 +1326,7 @@ H5HF__sect_row_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/* (which will mark this section as "live") */
if (H5HF__sect_indirect_revive_row(hdr, sect->u.row.under) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section")
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1357,15 +1357,15 @@ H5HF__sect_row_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned *entr
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
- sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
- HDassert(entry_p);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
+ sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(entry_p);
/* Mark the row as checked out from the free space manager */
- HDassert(sect->u.row.checked_out == FALSE);
+ assert(sect->u.row.checked_out == FALSE);
sect->u.row.checked_out = TRUE;
/* Forward row section to indirect routines, to handle reducing underlying indirect section */
@@ -1427,9 +1427,9 @@ H5HF__sect_row_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
/* If the row is already checked out from the free space manager, just
* change it's class directly and the free space manager will adjust when
@@ -1468,10 +1468,10 @@ H5HF__sect_row_get_iblock(H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
- sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
+ sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
ret_value = H5HF__sect_indirect_get_iblock(sect->u.row.under);
@@ -1501,7 +1501,7 @@ H5HF__sect_row_parent_removed(H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(sect);
+ assert(sect);
/* Get a copy of the indirect block's offset before decrementing refcount on it */
tmp_iblock_off = sect->u.row.under->u.indirect.u.iblock->block_off;
@@ -1555,8 +1555,8 @@ H5HF__sect_row_init_cls(H5FS_section_class_t *cls, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(hdr);
+ assert(cls);
+ assert(hdr);
/* Call common class initialization */
if (H5FS__sect_init_cls(cls, hdr) < 0)
@@ -1597,7 +1597,7 @@ H5HF__sect_row_term_cls(H5FS_section_class_t *cls)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
+ assert(cls);
/* Call common class termination */
if (H5FS__sect_term_cls(cls) < 0)
@@ -1631,11 +1631,11 @@ H5HF__sect_row_serialize(const H5FS_section_class_t *cls, const H5FS_section_inf
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(buf);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
- HDassert(sect->sect_info.addr == sect->u.row.under->sect_info.addr);
+ assert(cls);
+ assert(buf);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect->sect_info.addr == sect->u.row.under->sect_info.addr);
/* Forward to indirect routine to serialize underlying section */
hdr = ((H5HF_sect_private_t *)(cls->cls_private))->hdr;
@@ -1674,10 +1674,10 @@ H5HF__sect_row_deserialize(const H5FS_section_class_t *cls, const uint8_t *buf,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(buf);
- HDassert(H5F_addr_defined(sect_addr));
- HDassert(sect_size);
+ assert(cls);
+ assert(buf);
+ assert(H5F_addr_defined(sect_addr));
+ assert(sect_size);
/* Forward to indirect routine to deserialize underlying section */
hdr = ((H5HF_sect_private_t *)(cls->cls_private))->hdr;
@@ -1717,17 +1717,17 @@ H5HF__sect_row_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_i
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect1->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect1->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Get the top indirect section underlying each row */
top_indir_sect1 = H5HF__sect_indirect_top(sect1->u.row.under);
- HDassert(top_indir_sect1);
+ assert(top_indir_sect1);
top_indir_sect2 = H5HF__sect_indirect_top(sect2->u.row.under);
- HDassert(top_indir_sect2);
+ assert(top_indir_sect2);
/* Check if second section shares the same underlying indirect block as
* the first section, but doesn't already have same underlying indirect
@@ -1773,10 +1773,10 @@ H5HF__sect_row_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Check if second section is past end of "next block" iterator */
if (sect2->sect_info.addr >= hdr->man_iter_off) {
@@ -1827,8 +1827,8 @@ H5HF__sect_row_can_shrink(const H5FS_section_info_t *_sect, void H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Check if section is past end of "next block" iterator */
if (sect->sect_info.addr >= hdr->man_iter_off)
@@ -1864,9 +1864,9 @@ H5HF__sect_row_shrink(H5FS_section_info_t **_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(*sect);
- HDassert((*sect)->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect);
+ assert(*sect);
+ assert((*sect)->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Get the top indirect section underlying each row */
top_indir_sect = H5HF__sect_indirect_top((*sect)->u.row.under);
@@ -1903,7 +1903,7 @@ H5HF__sect_row_free_real(H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
- HDassert(sect);
+ assert(sect);
/* Release the section */
if (H5HF__sect_node_free(sect, NULL) < 0)
@@ -1935,8 +1935,8 @@ H5HF__sect_row_free(H5FS_section_info_t *_sect)
FUNC_ENTER_PACKAGE
- HDassert(sect);
- HDassert(sect->u.row.under);
+ assert(sect);
+ assert(sect->u.row.under);
/* Decrement the ref. count on the row section's underlying indirect section */
if (H5HF__sect_indirect_decr(sect->u.row.under) < 0)
@@ -1975,30 +1975,30 @@ H5HF__sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t
FUNC_ENTER_PACKAGE_NOERR
/* Basic sanity check */
- HDassert(cls);
- HDassert(sect);
+ assert(cls);
+ assert(sect);
/* Retrieve class private information */
cls_prvt = (H5HF_sect_private_t *)cls->cls_private;
hdr = cls_prvt->hdr;
/* Sanity checking on the row */
- HDassert(sect->u.row.under);
- HDassert(sect->u.row.num_entries);
- HDassert(sect->u.row.checked_out == FALSE);
+ assert(sect->u.row.under);
+ assert(sect->u.row.num_entries);
+ assert(sect->u.row.checked_out == FALSE);
indir_sect = sect->u.row.under;
indir_idx = sect->u.row.row - indir_sect->u.indirect.row;
- HDassert(indir_sect->u.indirect.dir_rows[indir_idx] == sect);
+ assert(indir_sect->u.indirect.dir_rows[indir_idx] == sect);
/* Check if the section is actually within the heap */
- HDassert(sect->sect_info.addr < hdr->man_iter_off);
+ assert(sect->sect_info.addr < hdr->man_iter_off);
/* Different checking for different kinds of rows */
if (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) {
H5HF_free_section_t *top_indir_sect; /* Top indirect section for row */
/* Some extra sanity checks on the row */
- HDassert(sect->u.row.row == indir_sect->u.indirect.row);
+ assert(sect->u.row.row == indir_sect->u.indirect.row);
/* Get the top indirect section underlying row */
top_indir_sect = H5HF__sect_indirect_top(sect->u.row.under);
@@ -2031,17 +2031,17 @@ H5HF__sect_row_debug(const H5FS_section_info_t *_sect, FILE *stream, int indent,
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Print indirect section information */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.row.row);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.row.col);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.row.num_entries);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.row.row);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.row.col);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.row.num_entries);
/* If this is a first row section display information about underlying indirect section */
if (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) {
/* Print indirect section header */
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Underlying indirect section:");
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Underlying indirect section:");
H5HF__sect_indirect_debug(sect->u.row.under, stream, indent + 3, MAX(0, fwidth - 3));
} /* end if */
@@ -2071,7 +2071,7 @@ H5HF__sect_indirect_iblock_off(const H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
+ assert(sect);
ret_value = sect->sect_info.state == H5FS_SECT_LIVE ? sect->u.indirect.u.iblock->block_off
: sect->u.indirect.u.iblock_off;
@@ -2101,7 +2101,7 @@ H5HF__sect_indirect_top(H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
+ assert(sect);
if (sect->u.indirect.parent)
ret_value = H5HF__sect_indirect_top(sect->u.indirect.parent);
@@ -2134,8 +2134,8 @@ H5HF__sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(hdr);
+ assert(cls);
+ assert(hdr);
/* Call to common class initialization */
if (H5FS__sect_init_cls(cls, hdr) < 0)
@@ -2170,7 +2170,7 @@ H5HF__sect_indirect_term_cls(H5FS_section_class_t *cls)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
+ assert(cls);
/* Call common class termination */
if (H5FS__sect_term_cls(cls) < 0)
@@ -2205,8 +2205,8 @@ H5HF__sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, H5
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(nentries);
+ assert(hdr);
+ assert(nentries);
/* Create free space section node */
if (NULL == (sect = H5FS__sect_node_new(H5HF_FSPACE_SECT_INDIRECT, sect_off, sect_size,
@@ -2231,7 +2231,7 @@ H5HF__sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, H5
/* Compute span size of indirect section */
sect->u.indirect.span_size = H5HF__dtable_span_size(&hdr->man_dtable, row, col, nentries);
- HDassert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.span_size > 0);
/* This indirect section doesn't (currently) have a parent */
sect->u.indirect.parent = NULL;
@@ -2272,10 +2272,10 @@ H5HF__sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, H5HF_free_
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock);
- HDassert(row_sect);
- HDassert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
+ assert(hdr);
+ assert(iblock);
+ assert(row_sect);
+ assert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
/* Create free space section node */
if (NULL == (sect = H5HF__sect_indirect_new(hdr, row_sect->sect_info.addr, row_sect->sect_info.size,
@@ -2344,8 +2344,8 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(sect->u.indirect.span_size > 0);
+ assert(sect);
+ assert(sect->u.indirect.span_size > 0);
/* Reset reference count for indirect section */
/* (Also reset the direct & indirect row pointers */
@@ -2551,7 +2551,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_
sect->u.indirect.dir_nrows = dir_nrows;
/* Make certain we've tracked the section's dependents correctly */
- HDassert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
+ assert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
done:
if (ret_value < 0) {
@@ -2596,9 +2596,9 @@ H5HF__sect_indirect_add(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock);
- HDassert(nentries);
+ assert(hdr);
+ assert(iblock);
+ assert(nentries);
/* Compute starting column & row */
start_row = start_entry / hdr->man_dtable.cparam.width;
@@ -2624,7 +2624,7 @@ H5HF__sect_indirect_add(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start
if (H5HF__sect_indirect_init_rows(hdr, sect, TRUE, &first_row_sect, H5FS_ADD_SKIP_VALID, start_row,
start_col, end_row, end_col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize indirect section")
- HDassert(first_row_sect);
+ assert(first_row_sect);
/* Now that underlying indirect section is consistent, add first row
* section to free space manager for the heap
@@ -2662,8 +2662,8 @@ H5HF__sect_indirect_decr(H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(sect->u.indirect.rc);
+ assert(sect);
+ assert(sect->u.indirect.rc);
/* Decrement ref. count for indirect section */
sect->u.indirect.rc--;
@@ -2714,9 +2714,9 @@ H5HF__sect_indirect_revive_row(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
/* Look up indirect block containing indirect blocks for section */
if (H5HF__man_dblock_locate(hdr, sect->sect_info.addr, &sec_iblock, NULL, &did_protect,
@@ -2758,10 +2758,10 @@ H5HF__sect_indirect_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_indi
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
- HDassert(sect_iblock);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
+ assert(sect_iblock);
/* Increment reference count on indirect block that free section is in */
if (H5HF__iblock_incr(sect_iblock) < 0)
@@ -2823,8 +2823,8 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(row_sect);
+ assert(hdr);
+ assert(row_sect);
/* Compute starting & ending information for row section */
row_start_entry = (row_sect->u.row.row * hdr->man_dtable.cparam.width) + row_sect->u.row.col;
@@ -2839,11 +2839,11 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
end_row = end_entry / hdr->man_dtable.cparam.width;
/* Additional sanity check */
- HDassert(sect->u.indirect.span_size > 0);
- HDassert(sect->u.indirect.iblock_entries > 0);
- HDassert(sect->u.indirect.dir_nrows > 0);
- HDassert(sect->u.indirect.dir_rows);
- HDassert(sect->u.indirect.dir_rows[(row_sect->u.row.row - start_row)] == row_sect);
+ assert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.iblock_entries > 0);
+ assert(sect->u.indirect.dir_nrows > 0);
+ assert(sect->u.indirect.dir_rows);
+ assert(sect->u.indirect.dir_rows[(row_sect->u.row.row - start_row)] == row_sect);
/* Check if we should allocate from end of indirect section */
if (row_end_entry == end_entry && start_row != end_row) {
@@ -2886,7 +2886,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/* Adjust block coordinates of span */
sect->u.indirect.col++;
if (sect->u.indirect.col == hdr->man_dtable.cparam.width) {
- HDassert(row_sect->u.row.num_entries == 1);
+ assert(row_sect->u.row.num_entries == 1);
/* Adjust section's span information */
sect->u.indirect.row++;
@@ -2897,10 +2897,10 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/* Adjust direct row sections for indirect section */
if (sect->u.indirect.dir_nrows > 0) {
- HDassert(sect->u.indirect.dir_rows);
+ assert(sect->u.indirect.dir_rows);
HDmemmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[1],
sect->u.indirect.dir_nrows * sizeof(H5HF_free_section_t *));
- HDassert(sect->u.indirect.dir_rows[0]);
+ assert(sect->u.indirect.dir_rows[0]);
/* Make new "first row" in indirect section */
if (row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW)
@@ -2910,8 +2910,8 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
} /* end if */
else {
/* Sanity check */
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
/* Eliminate direct rows for this section */
sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.dir_rows);
@@ -2931,17 +2931,17 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
unsigned new_end_row; /* New end row for entries */
/* Sanity check */
- HDassert(sect->u.indirect.indir_nents == 0);
- HDassert(sect->u.indirect.indir_ents == NULL);
+ assert(sect->u.indirect.indir_nents == 0);
+ assert(sect->u.indirect.indir_ents == NULL);
/* Adjust number of entries covered */
sect->u.indirect.num_entries--;
/* Check for eliminating a direct row */
new_end_row = ((start_entry + sect->u.indirect.num_entries) - 1) / hdr->man_dtable.cparam.width;
- HDassert(new_end_row <= end_row);
+ assert(new_end_row <= end_row);
if (new_end_row < end_row) {
- HDassert(new_end_row == (end_row - 1));
+ assert(new_end_row == (end_row - 1));
sect->u.indirect.dir_nrows--;
} /* end if */
} /* end if */
@@ -2954,11 +2954,11 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
unsigned u; /* Local index variable */
/* Sanity checks */
- HDassert(row_sect->u.row.col == 0);
- HDassert(row_sect->u.row.row > 0);
- HDassert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
- HDassert(row_sect->u.row.num_entries == hdr->man_dtable.cparam.width);
- HDassert(row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(row_sect->u.row.col == 0);
+ assert(row_sect->u.row.row > 0);
+ assert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
+ assert(row_sect->u.row.num_entries == hdr->man_dtable.cparam.width);
+ assert(row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
/* Compute basic information about peer & current indirect sections */
new_start_row = row_sect->u.row.row;
@@ -2995,7 +2995,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
HDmemmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[peer_dir_nrows],
(sizeof(H5HF_free_section_t *) * (sect->u.indirect.dir_nrows - peer_dir_nrows)));
sect->u.indirect.dir_nrows -= peer_dir_nrows;
- HDassert(row_sect == sect->u.indirect.dir_rows[0]);
+ assert(row_sect == sect->u.indirect.dir_rows[0]);
/* Re-target transferred row sections to point to new underlying indirect section */
for (u = 0; u < peer_dir_nrows; u++)
@@ -3026,9 +3026,9 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
(peer_nentries + 1); /* Transferred entries, plus the entry allocated out of the row */
/* Make certain we've tracked the sections' dependents correctly */
- HDassert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
- HDassert(peer_sect->u.indirect.rc ==
- (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
+ assert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
+ assert(peer_sect->u.indirect.rc ==
+ (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
/* Reset the peer_sect variable, to indicate that it has been hooked into the data structures
* correctly and shouldn't be freed */
@@ -3039,7 +3039,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/* Decrement count of entries & rows */
sect->u.indirect.num_entries--;
sect->u.indirect.dir_nrows--;
- HDassert(sect->u.indirect.dir_nrows == 0);
+ assert(sect->u.indirect.dir_nrows == 0);
/* Eliminate direct rows for this section */
sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.dir_rows);
@@ -3050,7 +3050,7 @@ done:
* into the main free space structures (via the direct blocks), and the reference count is updated. */
if (peer_sect) {
/* Sanity check - we should only be here if an error occurred */
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5HF__sect_indirect_free(peer_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
@@ -3089,10 +3089,10 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->u.indirect.span_size > 0);
- HDassert(sect->u.indirect.iblock_entries > 0);
+ assert(hdr);
+ assert(sect);
+ assert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.iblock_entries > 0);
/* Compute starting & ending information for indirect section */
start_row = sect->u.indirect.row;
@@ -3126,10 +3126,10 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
/* Check if we can allocate from start of indirect section */
if (child_entry == start_entry) {
/* Sanity check */
- HDassert(sect->u.indirect.dir_nrows == 0);
- HDassert(sect->u.indirect.dir_rows == NULL);
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.dir_nrows == 0);
+ assert(sect->u.indirect.dir_rows == NULL);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
/* Adjust section start */
sect->sect_info.addr += hdr->man_dtable.row_block_size[start_row];
@@ -3147,7 +3147,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
sect->u.indirect.indir_nents--;
HDmemmove(&sect->u.indirect.indir_ents[0], &sect->u.indirect.indir_ents[1],
sect->u.indirect.indir_nents * sizeof(H5HF_free_section_t *));
- HDassert(sect->u.indirect.indir_ents[0]);
+ assert(sect->u.indirect.indir_ents[0]);
/* Make new "first row" in new first indirect child section */
if (H5HF__sect_indirect_first(hdr, sect->u.indirect.indir_ents[0]) < 0)
@@ -3156,8 +3156,8 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
} /* end if */
else if (child_entry == end_entry) {
/* Sanity check */
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
/* Adjust span of blocks covered */
sect->u.indirect.num_entries--;
@@ -3180,8 +3180,8 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
/* Compute basic information about peer & current indirect sections */
peer_nentries = end_entry - child_entry;
@@ -3189,7 +3189,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
peer_start_col = (child_entry + 1) % hdr->man_dtable.cparam.width;
child_row = child_entry / hdr->man_dtable.cparam.width;
new_nentries = sect->u.indirect.num_entries - (peer_nentries + 1);
- HDassert(child_row >= hdr->man_dtable.max_direct_rows);
+ assert(child_row >= hdr->man_dtable.max_direct_rows);
/* Get indirect block information for peer */
if (sect->sect_info.state == H5FS_SECT_LIVE) {
@@ -3206,7 +3206,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
sect->u.indirect.num_entries = new_nentries;
sect->u.indirect.span_size = H5HF__dtable_span_size(&hdr->man_dtable, sect->u.indirect.row,
sect->u.indirect.col, new_nentries);
- HDassert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.span_size > 0);
/* Compute address of peer indirect section */
peer_sect_addr = sect->sect_info.addr;
@@ -3253,10 +3253,9 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
/* (Note modified on current section's ref. count, since we haven't
* detached the child section yet)
*/
- HDassert((sect->u.indirect.rc - 1) ==
- (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
- HDassert(peer_sect->u.indirect.rc ==
- (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
+ assert((sect->u.indirect.rc - 1) == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
+ assert(peer_sect->u.indirect.rc ==
+ (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
/* Make new "first row" in peer section */
if (H5HF__sect_indirect_first(hdr, peer_sect->u.indirect.indir_ents[0]) < 0)
@@ -3272,7 +3271,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
/* Decrement count of entries & indirect entries */
sect->u.indirect.num_entries--;
sect->u.indirect.indir_nents--;
- HDassert(sect->u.indirect.indir_nents == 0);
+ assert(sect->u.indirect.indir_nents == 0);
/* Eliminate indirect entries for this section */
sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.indir_ents);
@@ -3288,7 +3287,7 @@ done:
* into the main free space structures (via the direct blocks), and the reference count is updated. */
if (peer_sect) {
/* Sanity check - we should only be here if an error occurred */
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5HF__sect_indirect_free(peer_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
@@ -3317,7 +3316,7 @@ H5HF__sect_indirect_is_first(H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(sect);
+ assert(sect);
/* Recurse to parent */
if (sect->u.indirect.parent) {
@@ -3350,16 +3349,16 @@ H5HF__sect_indirect_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(sect);
+ assert(hdr);
+ assert(sect);
/* Check if this indirect section has direct block rows */
if (sect->u.indirect.dir_nrows > 0) {
/* Sanity checks */
- HDassert(sect->u.indirect.row == 0);
- HDassert(sect->u.indirect.col == 0);
- HDassert(sect->u.indirect.dir_rows);
- HDassert(sect->u.indirect.dir_rows[0]);
+ assert(sect->u.indirect.row == 0);
+ assert(sect->u.indirect.col == 0);
+ assert(sect->u.indirect.dir_rows);
+ assert(sect->u.indirect.dir_rows[0]);
/* Change first row section in indirect section to be the "first row" */
if (H5HF__sect_row_first(hdr, sect->u.indirect.dir_rows[0]) < 0)
@@ -3367,9 +3366,9 @@ H5HF__sect_indirect_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
} /* end if */
else {
/* Sanity checks */
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
- HDassert(sect->u.indirect.indir_ents[0]);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_ents[0]);
/* Forward to first child indirect section */
if (H5HF__sect_indirect_first(hdr, sect->u.indirect.indir_ents[0]) < 0)
@@ -3400,9 +3399,9 @@ H5HF__sect_indirect_get_iblock(H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
FUNC_LEAVE_NOAPI(sect->u.indirect.u.iblock)
} /* end H5HF__sect_indirect_get_iblock() */
@@ -3439,22 +3438,22 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
FUNC_ENTER_PACKAGE
/* Sanity check parameters */
- HDassert(hdr);
- HDassert(row_sect1);
- HDassert(row_sect1->u.row.under);
- HDassert(row_sect2);
- HDassert(row_sect2->u.row.under);
- HDassert(row_sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(hdr);
+ assert(row_sect1);
+ assert(row_sect1->u.row.under);
+ assert(row_sect2);
+ assert(row_sect2->u.row.under);
+ assert(row_sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Set up indirect section information */
sect1 = H5HF__sect_indirect_top(row_sect1->u.row.under);
- HDassert(sect1);
+ assert(sect1);
sect2 = H5HF__sect_indirect_top(row_sect2->u.row.under);
- HDassert(sect2);
+ assert(sect2);
/* Sanity check some assumptions about the indirect sections */
- HDassert(sect1->u.indirect.span_size > 0);
- HDassert(sect2->u.indirect.span_size > 0);
+ assert(sect1->u.indirect.span_size > 0);
+ assert(sect2->u.indirect.span_size > 0);
/* Set up span information */
start_row1 = sect1->u.indirect.row;
@@ -3480,8 +3479,8 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
* has child row sections, first indirect section _must_ have
* them also)
*/
- HDassert(sect1->u.indirect.dir_nrows > 0);
- HDassert(sect1->u.indirect.dir_rows);
+ assert(sect1->u.indirect.dir_nrows > 0);
+ assert(sect1->u.indirect.dir_rows);
/* Get the offsets for the indirect blocks under the rows */
if (H5FS_SECT_LIVE == row_sect1->u.row.under->sect_info.state)
@@ -3502,11 +3501,11 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
last_row_sect1 = sect1->u.indirect.dir_rows[sect1->u.indirect.dir_nrows - 1];
else
last_row_sect1 = row_sect1;
- HDassert(last_row_sect1);
- HDassert(last_row_sect1->u.row.row == end_row1);
+ assert(last_row_sect1);
+ assert(last_row_sect1->u.row.row == end_row1);
/* Adjust info for first row section, to absorb second row section */
- HDassert((last_row_sect1->u.row.col + last_row_sect1->u.row.num_entries) == row_sect2->u.row.col);
+ assert((last_row_sect1->u.row.col + last_row_sect1->u.row.num_entries) == row_sect2->u.row.col);
last_row_sect1->u.row.num_entries += row_sect2->u.row.num_entries;
/* Set up parameters for transfer of rows */
@@ -3564,9 +3563,9 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
unsigned new_indir_nents1; /* New value for number of indirect entries in first section */
/* Some sanity checks on second indirect section */
- HDassert(sect2->u.indirect.rc > 0);
- HDassert(sect2->u.indirect.indir_nents > 0);
- HDassert(sect2->u.indirect.indir_ents);
+ assert(sect2->u.indirect.rc > 0);
+ assert(sect2->u.indirect.indir_nents > 0);
+ assert(sect2->u.indirect.indir_ents);
/* Set up parameters for transfer of entries */
new_indir_nents1 = sect1->u.indirect.indir_nents + sect2->u.indirect.indir_nents;
@@ -3608,7 +3607,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
sect1->u.indirect.span_size += sect2->u.indirect.span_size;
/* Make certain we've tracked the first section's dependents correctly */
- HDassert(sect1->u.indirect.rc == (sect1->u.indirect.indir_nents + sect1->u.indirect.dir_nrows));
+ assert(sect1->u.indirect.rc == (sect1->u.indirect.indir_nents + sect1->u.indirect.dir_nrows));
/* Wrap up, freeing or re-inserting second row section */
/* (want this to be after the first indirect section is consistent again) */
@@ -3617,13 +3616,13 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
/* (indirectly releases second indirect section, since all of it's
* other dependents are gone)
*/
- HDassert(sect2->u.indirect.rc == 1);
+ assert(sect2->u.indirect.rc == 1);
if (H5HF__sect_row_free((H5FS_section_info_t *)row_sect2) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free row section")
} /* end if */
else {
/* Decrement ref. count on second indirect section's parent */
- HDassert(sect2->u.indirect.rc == 0);
+ assert(sect2->u.indirect.rc == 0);
if (sect2->u.indirect.parent)
if (H5HF__sect_indirect_decr(sect2->u.indirect.parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL,
@@ -3646,7 +3645,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
/* (i.e. merged indirect sections cover an entire indirect block) */
if (sect1->u.indirect.iblock_entries == sect1->u.indirect.num_entries) {
/* Build parent section for fully populated indirect section */
- HDassert(sect1->u.indirect.parent == NULL);
+ assert(sect1->u.indirect.parent == NULL);
if (H5HF__sect_indirect_build_parent(hdr, sect1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create parent for full indirect section")
} /* end if */
@@ -3681,14 +3680,14 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Sanity check parameters */
- HDassert(hdr);
- HDassert(sect);
- HDassert(H5FS_SECT_LIVE == sect->sect_info.state);
- HDassert(sect->u.indirect.span_size > 0);
- HDassert(sect->u.indirect.iblock_entries > 0);
- HDassert(sect->u.indirect.iblock_entries == sect->u.indirect.num_entries);
- HDassert(sect->u.indirect.u.iblock);
- HDassert(sect->u.indirect.parent == NULL);
+ assert(hdr);
+ assert(sect);
+ assert(H5FS_SECT_LIVE == sect->sect_info.state);
+ assert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.iblock_entries > 0);
+ assert(sect->u.indirect.iblock_entries == sect->u.indirect.num_entries);
+ assert(sect->u.indirect.u.iblock);
+ assert(sect->u.indirect.parent == NULL);
/* Get information for creating parent indirect section */
if (sect->u.indirect.u.iblock->parent) {
@@ -3706,7 +3705,7 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/* Compute row & column for block in parent */
par_row = par_entry / hdr->man_dtable.cparam.width;
par_col = par_entry % hdr->man_dtable.cparam.width;
- HDassert(par_row >= hdr->man_dtable.max_direct_rows);
+ assert(par_row >= hdr->man_dtable.max_direct_rows);
/* Create parent indirect section */
if (NULL == (par_sect = H5HF__sect_indirect_new(hdr, sect->sect_info.addr, sect->sect_info.size,
@@ -3759,17 +3758,17 @@ H5HF__sect_indirect_shrink(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Sanity check parameters */
- HDassert(hdr);
- HDassert(sect);
+ assert(hdr);
+ assert(sect);
/* Sanity check some assumptions about the indirect section */
- HDassert(sect->u.indirect.dir_nrows > 0 || sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.dir_nrows > 0 || sect->u.indirect.indir_nents > 0);
/* Walk through direct rows, freeing them */
for (u = 0; u < sect->u.indirect.dir_nrows; u++) {
/* Remove the normal rows from free space manager */
if (sect->u.indirect.dir_rows[u]->sect_info.type != H5HF_FSPACE_SECT_FIRST_ROW) {
- HDassert(sect->u.indirect.dir_rows[u]->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(sect->u.indirect.dir_rows[u]->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
if (H5HF__space_remove(hdr, sect->u.indirect.dir_rows[u]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove section from heap free space")
} /* end if */
@@ -3814,9 +3813,9 @@ H5HF__sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(sect);
- HDassert(buf);
+ assert(hdr);
+ assert(sect);
+ assert(buf);
/* Check if this indirect section has a parent & forward if this section is first */
if (sect->u.indirect.parent) {
@@ -3828,7 +3827,7 @@ H5HF__sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
else {
/* Indirect range's indirect block's block offset */
if (sect->sect_info.state == H5FS_SECT_LIVE) {
- HDassert(sect->u.indirect.u.iblock);
+ assert(sect->u.indirect.u.iblock);
UINT64ENCODE_VAR(buf, sect->u.indirect.u.iblock->block_off, hdr->heap_off_size);
} /* end if */
else
@@ -3879,10 +3878,10 @@ H5HF__sect_indirect_deserialize(H5HF_hdr_t *hdr, const uint8_t *buf, haddr_t sec
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(buf);
- HDassert(H5F_addr_defined(sect_addr));
- HDassert(sect_size);
+ assert(hdr);
+ assert(buf);
+ assert(H5F_addr_defined(sect_addr));
+ assert(sect_size);
/* Indirect range's indirect block's block offset */
UINT64DECODE_VAR(buf, iblock_off, hdr->heap_off_size);
@@ -3947,7 +3946,7 @@ H5HF__sect_indirect_free(H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
- HDassert(sect);
+ assert(sect);
/* Release the memory for tracking direct rows */
sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.dir_rows);
@@ -3995,8 +3994,8 @@ H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check arguments */
- HDassert(hdr);
- HDassert(sect);
+ assert(hdr);
+ assert(sect);
/* Compute starting entry, column & row */
start_row = sect->u.indirect.row;
@@ -4020,22 +4019,22 @@ H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect
/* Iterate over direct rows, checking pointer references */
dir_nrows = (max_dir_row - start_row) + 1;
- HDassert(dir_nrows == sect->u.indirect.dir_nrows);
+ assert(dir_nrows == sect->u.indirect.dir_nrows);
for (u = 0; u < dir_nrows; u++) {
const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_row_sect; /* Pointer to row section */
tmp_row_sect = sect->u.indirect.dir_rows[u];
- HDassert(tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
- tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
- HDassert(tmp_row_sect->u.row.under == sect);
- HDassert(tmp_row_sect->u.row.row == (start_row + u));
+ assert(tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
+ tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(tmp_row_sect->u.row.under == sect);
+ assert(tmp_row_sect->u.row.row == (start_row + u));
if (u > 0) {
const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_row_sect2; /* Pointer to row section */
tmp_row_sect2 = sect->u.indirect.dir_rows[u - 1];
- HDassert(tmp_row_sect2->u.row.row < tmp_row_sect->u.row.row);
- HDassert(H5F_addr_lt(tmp_row_sect2->sect_info.addr, tmp_row_sect->sect_info.addr));
- HDassert(tmp_row_sect2->sect_info.size <= tmp_row_sect->sect_info.size);
+ assert(tmp_row_sect2->u.row.row < tmp_row_sect->u.row.row);
+ assert(H5F_addr_lt(tmp_row_sect2->sect_info.addr, tmp_row_sect->sect_info.addr));
+ assert(tmp_row_sect2->sect_info.size <= tmp_row_sect->sect_info.size);
} /* end if */
} /* end for */
} /* end if */
@@ -4044,24 +4043,24 @@ H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect
if (sect->u.indirect.indir_nents > 0) {
/* Basic sanity checks */
if (sect->sect_info.state == H5FS_SECT_LIVE) {
- HDassert(sect->u.indirect.iblock_entries);
- HDassert(sect->u.indirect.indir_nents <= sect->u.indirect.iblock_entries);
+ assert(sect->u.indirect.iblock_entries);
+ assert(sect->u.indirect.indir_nents <= sect->u.indirect.iblock_entries);
} /* end if */
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_ents);
/* Sanity check each child indirect section */
for (u = 0; u < sect->u.indirect.indir_nents; u++) {
const H5HF_free_section_t *tmp_child_sect; /* Pointer to child indirect section */
tmp_child_sect = sect->u.indirect.indir_ents[u];
- HDassert(tmp_child_sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
- HDassert(tmp_child_sect->u.indirect.parent == sect);
+ assert(tmp_child_sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
+ assert(tmp_child_sect->u.indirect.parent == sect);
if (u > 0) {
const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED
*tmp_child_sect2; /* Pointer to child indirect section */
tmp_child_sect2 = sect->u.indirect.indir_ents[u - 1];
- HDassert(H5F_addr_lt(tmp_child_sect2->sect_info.addr, tmp_child_sect->sect_info.addr));
+ assert(H5F_addr_lt(tmp_child_sect2->sect_info.addr, tmp_child_sect->sect_info.addr));
} /* end if */
/* Recursively check child indirect section */
@@ -4092,12 +4091,12 @@ H5HF__sect_indirect_debug(const H5HF_free_section_t *sect, FILE *stream, int ind
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Print indirect section information */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.indirect.row);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.indirect.col);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.indirect.num_entries);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.indirect.row);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.indirect.col);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.indirect.num_entries);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__sect_indirect_debug() */
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index 53b4c49..1a5c001 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -96,7 +96,7 @@ H5HF__space_start(H5HF_hdr_t *hdr, hbool_t may_create)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check for creating free space info for the heap */
if (H5F_addr_defined(hdr->fs_addr)) {
@@ -122,7 +122,7 @@ H5HF__space_start(H5HF_hdr_t *hdr, hbool_t may_create)
(hdr->fspace = H5FS_create(hdr->f, &hdr->fs_addr, &fs_create, NELMTS(classes), classes, hdr,
(hsize_t)H5HF_FSPACE_THRHD_DEF, (hsize_t)H5HF_FSPACE_ALIGN_DEF)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize free space info")
- HDassert(H5F_addr_defined(hdr->fs_addr));
+ assert(H5F_addr_defined(hdr->fs_addr));
} /* end if */
} /* end else */
@@ -155,8 +155,8 @@ H5HF__space_add(H5HF_hdr_t *hdr, H5HF_free_section_t *node, unsigned flags)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(node);
+ assert(hdr);
+ assert(node);
/* Check if the free space for the heap has been initialized */
if (!hdr->fspace)
@@ -198,9 +198,9 @@ H5HF__space_find(H5HF_hdr_t *hdr, hsize_t request, H5HF_free_section_t **node)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(request);
- HDassert(node);
+ assert(hdr);
+ assert(request);
+ assert(node);
/* Check if the free space for the heap has been initialized */
if (!hdr->fspace)
@@ -245,12 +245,12 @@ H5HF__space_revert_root_cb(H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_uda
/*
* Check arguments.
*/
- HDassert(sect);
+ assert(sect);
/* Only modify "live" single blocks... */
if (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE && sect->sect_info.state == H5FS_SECT_LIVE) {
/* Release hold on previous indirect block (we must have one) */
- HDassert(sect->u.single.parent);
+ assert(sect->u.single.parent);
if (H5HF__iblock_decr(sect->u.single.parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
"can't decrement reference count on section's indirect block")
@@ -288,7 +288,7 @@ H5HF__space_revert_root(const H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Only need to scan the sections if the free space has been initialized */
if (hdr->fspace)
@@ -327,13 +327,13 @@ H5HF__space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(root_iblock);
+ assert(sect);
+ assert(root_iblock);
/* Sanity check sections */
/* (If we are switching from a direct block for the root block of the heap, */
/* there should only be 'single' type sections. -QAK) */
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Increment ref. count on new root indirect block */
if (H5HF__iblock_incr(root_iblock) < 0)
@@ -344,7 +344,7 @@ H5HF__space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
if (sect->sect_info.state == H5FS_SECT_SERIALIZED)
sect->sect_info.state = H5FS_SECT_LIVE; /* Mark "live" now */
else
- HDassert(!sect->u.single.parent);
+ assert(!sect->u.single.parent);
sect->u.single.parent = root_iblock;
sect->u.single.par_entry = 0;
@@ -377,8 +377,8 @@ H5HF__space_create_root(const H5HF_hdr_t *hdr, H5HF_indirect_t *root_iblock)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(root_iblock);
+ assert(hdr);
+ assert(root_iblock);
/* Only need to scan the sections if the free space has been initialized */
if (hdr->fspace)
@@ -414,8 +414,8 @@ H5HF__space_size(H5HF_hdr_t *hdr, hsize_t *fs_size)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(fs_size);
+ assert(hdr);
+ assert(fs_size);
/* Check if the free space for the heap has been initialized */
if (!hdr->fspace)
@@ -457,9 +457,9 @@ H5HF__space_remove(H5HF_hdr_t *hdr, H5HF_free_section_t *node)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(hdr->fspace);
- HDassert(node);
+ assert(hdr);
+ assert(hdr->fspace);
+ assert(node);
/* Remove from the free space for the heap */
if (H5FS_sect_remove(hdr->f, hdr->fspace, (H5FS_section_info_t *)node) < 0)
@@ -493,7 +493,7 @@ H5HF__space_close(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check if the free space was ever opened */
if (hdr->fspace) {
@@ -543,7 +543,7 @@ H5HF__space_delete(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Delete the free space manager */
if (H5FS_delete(hdr->f, hdr->fs_addr) < 0)
@@ -577,9 +577,9 @@ H5HF__space_sect_change_class(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, uint16
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(hdr->fspace);
- HDassert(sect);
+ assert(hdr);
+ assert(hdr->fspace);
+ assert(sect);
/* Notify the free space manager that a section has changed class */
if (H5FS_sect_change_class(hdr->f, hdr->fspace, (H5FS_section_info_t *)sect, new_class) < 0)
diff --git a/src/H5HFstat.c b/src/H5HFstat.c
index 79ce15f..900fbc7 100644
--- a/src/H5HFstat.c
+++ b/src/H5HFstat.c
@@ -78,8 +78,8 @@ H5HF_stat_info(const H5HF_t *fh, H5HF_stat_t *stats)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(stats);
+ assert(fh);
+ assert(stats);
/* Report statistics for fractal heap */
stats->man_size = fh->hdr->man_size;
@@ -124,8 +124,8 @@ H5HF_size(const H5HF_t *fh, hsize_t *heap_size)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(heap_size);
+ assert(fh);
+ assert(heap_size);
/* Get "convenience" pointer to fractal heap header */
hdr = fh->hdr;
diff --git a/src/H5HFtest.c b/src/H5HFtest.c
index 14199ee..35d16b2 100644
--- a/src/H5HFtest.c
+++ b/src/H5HFtest.c
@@ -80,8 +80,8 @@ H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(cparam);
+ assert(fh);
+ assert(cparam);
/* Get fractal heap creation parameters */
if (fh->hdr->id_len == (unsigned)(1 + fh->hdr->heap_off_size + fh->hdr->heap_len_size))
@@ -118,8 +118,8 @@ H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(cparam1);
- HDassert(cparam2);
+ assert(cparam1);
+ assert(cparam2);
/* Compare doubling table parameters */
if (cparam1->managed.width < cparam2->managed.width)
@@ -234,7 +234,7 @@ H5HF_get_max_root_rows(const H5HF_t *fh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return max. # of rows in root indirect block */
ret_value = fh->hdr->man_dtable.max_root_rows;
@@ -264,7 +264,7 @@ H5HF_get_dtable_width_test(const H5HF_t *fh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return width of doubling table */
ret_value = fh->hdr->man_dtable.cparam.width;
@@ -294,7 +294,7 @@ H5HF_get_dtable_max_drows_test(const H5HF_t *fh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return max. # of direct blocks in any indirect block */
ret_value = fh->hdr->man_dtable.max_direct_rows;
@@ -328,8 +328,8 @@ H5HF_get_iblock_max_drows_test(const H5HF_t *fh, unsigned pos)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(pos);
+ assert(fh);
+ assert(pos);
/* Return max. # of direct blocks in this indirect block row */
ret_value = pos + (fh->hdr->man_dtable.max_direct_bits - fh->hdr->man_dtable.first_row_bits) + 1;
@@ -359,7 +359,7 @@ H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return direct block free space */
ret_value = fh->hdr->man_dtable.row_block_size[row];
@@ -390,7 +390,7 @@ H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return direct block free space */
ret_value = fh->hdr->man_dtable.row_tot_dblock_free[row];
@@ -420,10 +420,10 @@ H5HF_get_id_off_test(const H5HF_t *fh, const void *_id, hsize_t *obj_off)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(fh->hdr);
- HDassert(id);
- HDassert(obj_off);
+ assert(fh);
+ assert(fh->hdr);
+ assert(id);
+ assert(obj_off);
/* Get the offset for a 'normal' heap ID */
id++;
@@ -453,8 +453,8 @@ H5HF_get_id_type_test(const void *_id, unsigned char *obj_type)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(id);
- HDassert(obj_type);
+ assert(id);
+ assert(obj_type);
/* Get the type for a heap ID */
*obj_type = (uint8_t)(*id & H5HF_ID_TYPE_MASK);
@@ -481,10 +481,10 @@ H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, hbool_t *len_extended
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(fh->hdr);
- HDassert(max_len);
- HDassert(len_extended);
+ assert(fh);
+ assert(fh->hdr);
+ assert(max_len);
+ assert(len_extended);
/* Retrieve information about tiny object's ID encoding in a heap */
*max_len = fh->hdr->tiny_max_len;
@@ -512,9 +512,9 @@ H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, hbool_t *ids_direct)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(fh->hdr);
- HDassert(ids_direct);
+ assert(fh);
+ assert(fh->hdr);
+ assert(ids_direct);
/* Retrieve information about tiny object's ID encoding in a heap */
if (next_id)
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c
index 0a44640..5a0f0d7 100644
--- a/src/H5HFtiny.c
+++ b/src/H5HFtiny.c
@@ -91,7 +91,7 @@ H5HF__tiny_init(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Compute information about 'tiny' objects for the heap */
@@ -140,11 +140,11 @@ H5HF__tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(obj_size <= hdr->tiny_max_len);
- HDassert(obj_size <= (H5HF_TINY_MASK_EXT + 1));
- HDassert(obj);
- HDassert(id);
+ assert(hdr);
+ assert(obj_size <= hdr->tiny_max_len);
+ assert(obj_size <= (H5HF_TINY_MASK_EXT + 1));
+ assert(obj);
+ assert(id);
/* Adjust object's size for encoding it */
enc_obj_size = obj_size - 1;
@@ -160,7 +160,7 @@ H5HF__tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
} /* end else */
H5MM_memcpy(id, obj, obj_size);
- HDmemset(id + obj_size, 0, (hdr->id_len - ((size_t)1 + (size_t)hdr->tiny_len_extended + obj_size)));
+ memset(id + obj_size, 0, (hdr->id_len - ((size_t)1 + (size_t)hdr->tiny_len_extended + obj_size)));
/* Update statistics about heap */
hdr->tiny_size += obj_size;
@@ -196,9 +196,9 @@ H5HF__tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj_len_p);
+ assert(hdr);
+ assert(id);
+ assert(obj_len_p);
/* Check if 'tiny' object ID is in extended form, and retrieve encoded size */
if (!hdr->tiny_len_extended)
@@ -238,9 +238,9 @@ H5HF__tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Get the object's encoded length */
/* H5HF__tiny_obj_len can't fail */
@@ -287,9 +287,9 @@ H5HF__tiny_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Call the internal 'op' routine */
if (H5HF__tiny_op_real(hdr, id, H5HF__op_read, obj) < 0)
@@ -321,9 +321,9 @@ H5HF__tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_d
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Call the internal 'op' routine routine */
if (H5HF__tiny_op_real(hdr, id, op, op_data) < 0)
@@ -356,8 +356,8 @@ H5HF__tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
+ assert(hdr);
+ assert(id);
/* Get the object's encoded length */
/* H5HF__tiny_obj_len can't fail */
diff --git a/src/H5HG.c b/src/H5HG.c
index e5800ff..f608489 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -131,7 +131,7 @@ H5HG__create(H5F_t *f, size_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
+ assert(f);
if (size < H5HG_MINSIZE)
size = H5HG_MINSIZE;
size = H5HG_ALIGN(size);
@@ -148,7 +148,7 @@ H5HG__create(H5F_t *f, size_t size)
if (NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
- HDmemset(heap->chunk, 0, size);
+ memset(heap->chunk, 0, size);
heap->nalloc = H5HG_NOBJS(f, size);
heap->nused = 1; /* account for index 0, which is used for the free object */
if (NULL == (heap->obj = H5FL_SEQ_MALLOC(H5HG_obj_t, heap->nalloc)))
@@ -171,13 +171,13 @@ H5HG__create(H5F_t *f, size_t size)
n = (size_t)H5HG_ALIGN(p - heap->chunk) - (size_t)(p - heap->chunk);
#ifdef OLD_WAY
/* Don't bother zeroing out the rest of the info in the heap -QAK */
- HDmemset(p, 0, n);
+ memset(p, 0, n);
#endif /* OLD_WAY */
p += n;
/* The freespace object */
heap->obj[0].size = size - H5HG_SIZEOF_HDR(f);
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ assert(H5HG_ISALIGNED(heap->obj[0].size));
heap->obj[0].nrefs = 0;
heap->obj[0].begin = p;
UINT16ENCODE(p, 0); /*object ID*/
@@ -186,7 +186,7 @@ H5HG__create(H5F_t *f, size_t size)
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
#ifdef OLD_WAY
/* Don't bother zeroing out the rest of the info in the heap -QAK */
- HDmemset(p, 0, (size_t)((heap->chunk + heap->size) - p));
+ memset(p, 0, (size_t)((heap->chunk + heap->size) - p));
#endif /* OLD_WAY */
/* Add this heap to the beginning of the CWFS list */
@@ -241,11 +241,11 @@ H5HG__protect(H5F_t *f, haddr_t addr, unsigned flags)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Lock the heap into memory */
if (NULL == (heap = (H5HG_heap_t *)H5AC_protect(f, H5AC_GHEAP, addr, f, flags)))
@@ -290,9 +290,9 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(heap);
- HDassert(heap->obj[0].size >= need);
- HDassert(heap_flags_ptr);
+ assert(heap);
+ assert(heap->obj[0].size >= need);
+ assert(heap_flags_ptr);
/*
* Find an ID for the new object. ID zero is reserved for the free space
@@ -306,7 +306,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
break;
} /* end else */
- HDassert(idx < heap->nused);
+ assert(idx < heap->nused);
/* Check if we need more room to store heap objects */
if (idx >= heap->nalloc) {
@@ -316,19 +316,19 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
/* Determine the new number of objects to index */
/* nalloc is *not* guaranteed to be a power of 2! - NAF 10/26/09 */
new_alloc = MIN(MAX(heap->nalloc * 2, (idx + 1)), (H5HG_MAXIDX + 1));
- HDassert(idx < new_alloc);
+ assert(idx < new_alloc);
/* Reallocate array of objects */
if (NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, 0, "memory allocation failed")
/* Clear newly allocated space */
- HDmemset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
+ memset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
/* Update heap information */
heap->nalloc = new_alloc;
heap->obj = new_obj;
- HDassert(heap->nalloc > heap->nused);
+ assert(heap->nalloc > heap->nused);
} /* end if */
/* Initialize the new object */
@@ -361,7 +361,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
UINT16ENCODE(p, 0); /*nrefs*/
UINT32ENCODE(p, 0); /*reserved*/
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ assert(H5HG_ISALIGNED(heap->obj[0].size));
} /* end else-if */
else {
/*
@@ -370,7 +370,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
*/
heap->obj[0].size -= need;
heap->obj[0].begin += need;
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ assert(H5HG_ISALIGNED(heap->obj[0].size));
}
/* Mark the heap as dirty */
@@ -414,8 +414,8 @@ H5HG_extend(H5F_t *f, haddr_t addr, size_t need)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Protect the heap */
if (NULL == (heap = H5HG__protect(f, addr, H5AC__NO_FLAGS_SET)))
@@ -424,7 +424,7 @@ H5HG_extend(H5F_t *f, haddr_t addr, size_t need)
/* Re-allocate the heap information in memory */
if (NULL == (new_chunk = H5FL_BLK_REALLOC(gheap_chunk, heap->chunk, (heap->size + need))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "new heap allocation failed")
- HDmemset(new_chunk + heap->size, 0, need);
+ memset(new_chunk + heap->size, 0, need);
/* Adjust the size of the heap */
old_size = heap->size;
@@ -451,7 +451,7 @@ H5HG_extend(H5F_t *f, haddr_t addr, size_t need)
UINT16ENCODE(p, 0); /*nrefs*/
UINT32ENCODE(p, 0); /*reserved*/
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ assert(H5HG_ISALIGNED(heap->obj[0].size));
/* Resize the heap in the cache */
if (H5AC_resize_entry(heap, heap->size) < 0)
@@ -502,9 +502,9 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(0 == size || obj);
- HDassert(hobj);
+ assert(f);
+ assert(0 == size || obj);
+ assert(hobj);
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
@@ -527,7 +527,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/)
if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to allocate a global heap collection")
} /* end if */
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
if (NULL == (heap = H5HG__protect(f, addr, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
@@ -541,8 +541,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/)
H5MM_memcpy(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f), obj, size);
#ifdef OLD_WAY
/* Don't bother zeroing out the rest of the info in the heap -QAK */
- HDmemset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0,
- need - (H5HG_SIZEOF_OBJHDR(f) + size));
+ memset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0, need - (H5HG_SIZEOF_OBJHDR(f) + size));
#endif /* OLD_WAY */
} /* end if */
heap_flags |= H5AC__DIRTIED_FLAG;
@@ -587,15 +586,15 @@ H5HG_read(H5F_t *f, H5HG_t *hobj, void *object /*out*/, size_t *buf_size)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, NULL)
/* Check args */
- HDassert(f);
- HDassert(hobj);
+ assert(f);
+ assert(hobj);
/* Load the heap */
if (NULL == (heap = H5HG__protect(f, hobj->addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap")
- HDassert(hobj->idx < heap->nused);
- HDassert(heap->obj[hobj->idx].begin);
+ assert(hobj->idx < heap->nused);
+ assert(heap->obj[hobj->idx].begin);
size = heap->obj[hobj->idx].size;
p = heap->obj[hobj->idx].begin + H5HG_SIZEOF_OBJHDR(f);
@@ -658,8 +657,8 @@ H5HG_link(H5F_t *f, const H5HG_t *hobj, int adjust)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(hobj);
+ assert(f);
+ assert(hobj);
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
@@ -668,8 +667,8 @@ H5HG_link(H5F_t *f, const H5HG_t *hobj, int adjust)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
if (adjust != 0) {
- HDassert(hobj->idx < heap->nused);
- HDassert(heap->obj[hobj->idx].begin);
+ assert(hobj->idx < heap->nused);
+ assert(heap->obj[hobj->idx].begin);
if ((heap->obj[hobj->idx].nrefs + adjust) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "new link count would be out of range")
if ((heap->obj[hobj->idx].nrefs + adjust) > H5HG_MAXLINK)
@@ -710,16 +709,16 @@ H5HG_get_obj_size(H5F_t *f, H5HG_t *hobj, size_t *obj_size)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(hobj);
- HDassert(obj_size);
+ assert(f);
+ assert(hobj);
+ assert(obj_size);
/* Load the heap */
if (NULL == (heap = H5HG__protect(f, hobj->addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
- HDassert(hobj->idx < heap->nused);
- HDassert(heap->obj[hobj->idx].begin);
+ assert(hobj->idx < heap->nused);
+ assert(heap->obj[hobj->idx].begin);
/* Set object size */
*obj_size = heap->obj[hobj->idx].size;
@@ -756,8 +755,8 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(hobj);
+ assert(f);
+ assert(hobj);
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
@@ -765,7 +764,7 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj)
if (NULL == (heap = H5HG__protect(f, hobj->addr, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
- HDassert(hobj->idx < heap->nused);
+ assert(hobj->idx < heap->nused);
/* When the application selects the same location to rewrite the VL element by using H5Sselect_elements,
* it can happen that the entry has been removed by first rewrite. Here we simply skip the removal of
@@ -797,7 +796,7 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj)
UINT32ENCODE(p, 0); /*reserved*/
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
} /* end if */
- HDmemset(heap->obj + hobj->idx, 0, sizeof(H5HG_obj_t));
+ memset(heap->obj + hobj->idx, 0, sizeof(H5HG_obj_t));
flags |= H5AC__DIRTIED_FLAG;
if ((heap->obj[0].size + H5HG_SIZEOF_HDR(f)) == heap->size) {
@@ -846,7 +845,7 @@ H5HG__free(H5HG_heap_t *heap)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(heap);
+ assert(heap);
/* Remove the heap from the CWFS list */
if (H5F_cwfs_remove_heap(heap->shared, heap) < 0)
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index bbfae7c..1818900 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -109,14 +109,14 @@ H5HG__hdr_deserialize(H5HG_heap_t *heap, const uint8_t *image, size_t len, const
FUNC_ENTER_PACKAGE
- HDassert(heap);
- HDassert(image);
- HDassert(f);
+ assert(heap);
+ assert(image);
+ assert(f);
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad global heap collection signature")
image += H5_SIZEOF_MAGIC;
@@ -159,7 +159,7 @@ H5HG__cache_heap_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *imag
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
*image_len = H5HG_MINSIZE;
@@ -183,11 +183,11 @@ H5HG__cache_heap_get_final_load_size(const void *image, size_t image_len, void *
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
- HDassert(image_len == H5HG_MINSIZE);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
+ assert(image_len == H5HG_MINSIZE);
/* Deserialize the heap's header */
if (H5HG__hdr_deserialize(&heap, (const uint8_t *)image, image_len, (const H5F_t *)udata) < 0)
@@ -225,10 +225,10 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool
FUNC_ENTER_PACKAGE
- HDassert(_image);
- HDassert(len >= (size_t)H5HG_MINSIZE);
- HDassert(f);
- HDassert(dirty);
+ assert(_image);
+ assert(len >= (size_t)H5HG_MINSIZE);
+ assert(f);
+ assert(dirty);
/* Allocate a new global heap */
if (NULL == (heap = H5FL_CALLOC(H5HG_heap_t)))
@@ -311,7 +311,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear newly allocated space */
- HDmemset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
+ memset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
/* Update heap information */
heap->nalloc = new_alloc;
@@ -410,11 +410,11 @@ H5HG__cache_heap_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(heap);
- HDassert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(heap->cache_info.type == H5AC_GHEAP);
- HDassert(heap->size >= H5HG_MINSIZE);
- HDassert(image_len);
+ assert(heap);
+ assert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(heap->cache_info.type == H5AC_GHEAP);
+ assert(heap->size >= H5HG_MINSIZE);
+ assert(image_len);
*image_len = heap->size;
@@ -439,13 +439,13 @@ H5HG__cache_heap_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image, si
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(image);
- HDassert(heap);
- HDassert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(heap->cache_info.type == H5AC_GHEAP);
- HDassert(heap->size == len);
- HDassert(heap->chunk);
+ assert(f);
+ assert(image);
+ assert(heap);
+ assert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(heap->cache_info.type == H5AC_GHEAP);
+ assert(heap->size == len);
+ assert(heap->chunk);
/* Copy the image into the buffer */
H5MM_memcpy(image, heap->chunk, len);
@@ -473,9 +473,9 @@ H5HG__cache_heap_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(heap);
- HDassert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(heap->cache_info.type == H5AC_GHEAP);
+ assert(heap);
+ assert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(heap->cache_info.type == H5AC_GHEAP);
/* Destroy global heap collection */
if (H5HG__free(heap) < 0)
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index 6da4855..51810b8 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -83,19 +83,19 @@ H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
if (NULL == (h = H5HG__protect(f, addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap collection");
- HDfprintf(stream, "%*sGlobal Heap Collection...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Dirty:", (int)(h->cache_info.is_dirty));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Total collection size in file:", (unsigned long)(h->size));
+ fprintf(stream, "%*sGlobal Heap Collection...\n", indent, "");
+ fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Dirty:", (int)(h->cache_info.is_dirty));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Total collection size in file:", (unsigned long)(h->size));
for (u = 1, nused = 0, maxobj = 0; u < h->nused; u++)
if (h->obj[u].begin) {
@@ -103,45 +103,45 @@ H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
if (u > maxobj)
maxobj = u;
}
- HDfprintf(stream, "%*s%-*s %u/%lu/", indent, "", fwidth, "Objects defined/allocated/max:", nused,
- (unsigned long)h->nalloc);
+ fprintf(stream, "%*s%-*s %u/%lu/", indent, "", fwidth, "Objects defined/allocated/max:", nused,
+ (unsigned long)h->nalloc);
if (nused)
- HDfprintf(stream, "%u\n", maxobj);
+ fprintf(stream, "%u\n", maxobj);
else
- HDfprintf(stream, "NA\n");
+ fprintf(stream, "NA\n");
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Free space:", (unsigned long)(h->obj[0].size));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Free space:", (unsigned long)(h->obj[0].size));
for (u = 1; u < h->nused; u++)
if (h->obj[u].begin) {
char buf[64];
HDsnprintf(buf, sizeof(buf), "Object %u", u);
- HDfprintf(stream, "%*s%s\n", indent, "", buf);
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MIN(fwidth - 3, 0),
- "Obffset in block:", (unsigned long)(h->obj[u].begin - h->chunk));
- HDfprintf(stream, "%*s%-*s %d\n", indent + 3, "", MIN(fwidth - 3, 0),
- "Reference count:", h->obj[u].nrefs);
- HDfprintf(stream, "%*s%-*s %lu/%lu\n", indent + 3, "", MIN(fwidth - 3, 0),
- "Size of object body:", (unsigned long)(h->obj[u].size),
- (unsigned long)H5HG_ALIGN(h->obj[u].size));
+ fprintf(stream, "%*s%s\n", indent, "", buf);
+ fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MIN(fwidth - 3, 0),
+ "Obffset in block:", (unsigned long)(h->obj[u].begin - h->chunk));
+ fprintf(stream, "%*s%-*s %d\n", indent + 3, "", MIN(fwidth - 3, 0),
+ "Reference count:", h->obj[u].nrefs);
+ fprintf(stream, "%*s%-*s %lu/%lu\n", indent + 3, "", MIN(fwidth - 3, 0),
+ "Size of object body:", (unsigned long)(h->obj[u].size),
+ (unsigned long)H5HG_ALIGN(h->obj[u].size));
p = h->obj[u].begin + H5HG_SIZEOF_OBJHDR(f);
for (j = 0; j < h->obj[u].size; j += 16) {
- HDfprintf(stream, "%*s%04u: ", indent + 6, "", j);
+ fprintf(stream, "%*s%04u: ", indent + 6, "", j);
for (k = 0; k < 16; k++) {
if (8 == k)
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
if (j + k < h->obj[u].size)
- HDfprintf(stream, "%02x ", p[j + k]);
+ fprintf(stream, "%02x ", p[j + k]);
else
HDfputs(" ", stream);
}
for (k = 0; k < 16 && j + k < h->obj[u].size; k++) {
if (8 == k)
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
HDfputc(p[j + k] > ' ' && p[j + k] <= '~' ? p[j + k] : '.', stream);
}
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
}
}
diff --git a/src/H5HGquery.c b/src/H5HGquery.c
index 9e4c789..ac36f21 100644
--- a/src/H5HGquery.c
+++ b/src/H5HGquery.c
@@ -77,7 +77,7 @@ H5HG_get_addr(const H5HG_heap_t *heap)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(heap);
+ assert(heap);
FUNC_LEAVE_NOAPI(heap->addr)
} /* H5HG_get_addr() */
@@ -100,7 +100,7 @@ H5HG_get_size(const H5HG_heap_t *heap)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(heap);
+ assert(heap);
FUNC_LEAVE_NOAPI(heap->size)
} /* H5HG_get_size() */
@@ -123,7 +123,7 @@ H5HG_get_free_size(const H5HG_heap_t *heap)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(heap);
+ assert(heap);
FUNC_LEAVE_NOAPI(heap->obj[0].size)
} /* H5HG_get_free_size() */
diff --git a/src/H5HL.c b/src/H5HL.c
index 47dc651..13c47fa 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -105,8 +105,8 @@ H5HL_create(H5F_t *f, size_t size_hint, haddr_t *addr_p /*out*/)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(addr_p);
+ assert(f);
+ assert(addr_p);
/* Adjust size hint as necessary */
if (size_hint && size_hint < H5HL_SIZEOF_FREE(f))
@@ -197,8 +197,8 @@ H5HL__minimize_heap_space(H5F_t *f, H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(heap);
+ assert(f);
+ assert(heap);
/* Check to see if we can reduce the size of the heap in memory by
* eliminating free blocks at the tail of the buffer before flushing the
@@ -244,7 +244,7 @@ H5HL__minimize_heap_space(H5F_t *f, H5HL_t *heap)
/* Truncate the free block */
last_fl->size = H5HL_ALIGN(new_heap_size - last_fl->offset);
new_heap_size = last_fl->offset + last_fl->size;
- HDassert(last_fl->size >= H5HL_SIZEOF_FREE(f));
+ assert(last_fl->size >= H5HL_SIZEOF_FREE(f));
}
else {
/* Set the size of the memory buffer to the start
@@ -260,8 +260,8 @@ H5HL__minimize_heap_space(H5F_t *f, H5HL_t *heap)
/* Truncate the free block */
last_fl->size = H5HL_ALIGN(new_heap_size - last_fl->offset);
new_heap_size = last_fl->offset + last_fl->size;
- HDassert(last_fl->size >= H5HL_SIZEOF_FREE(f));
- HDassert(last_fl->size == H5HL_ALIGN(last_fl->size));
+ assert(last_fl->size >= H5HL_SIZEOF_FREE(f));
+ assert(last_fl->size == H5HL_ALIGN(last_fl->size));
}
}
}
@@ -272,7 +272,7 @@ H5HL__minimize_heap_space(H5F_t *f, H5HL_t *heap)
* storage.
*/
if (new_heap_size != heap->dblk_size) {
- HDassert(new_heap_size < heap->dblk_size);
+ assert(new_heap_size < heap->dblk_size);
/* Resize the memory buffer */
if (NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, new_heap_size)))
@@ -314,11 +314,11 @@ H5HL_protect(H5F_t *f, haddr_t addr, unsigned flags)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Only the H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
@@ -391,7 +391,7 @@ H5HL_offset_into(const H5HL_t *heap, size_t offset)
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(heap);
+ assert(heap);
if (offset >= heap->dblk_size)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, NULL, "unable to offset into local heap data block");
@@ -421,7 +421,7 @@ H5HL_unprotect(H5HL_t *heap)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(heap);
+ assert(heap);
/* Decrement # of times heap is protected */
heap->prots--;
@@ -436,7 +436,7 @@ H5HL_unprotect(H5HL_t *heap)
}
else {
/* Sanity check */
- HDassert(heap->dblk);
+ assert(heap->dblk);
/* Mark local heap data block as evictable again */
/* (data block still pins prefix) */
@@ -503,13 +503,13 @@ H5HL__dirty(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(heap);
- HDassert(heap->prfx);
+ assert(heap);
+ assert(heap->prfx);
/* Mark heap data block as dirty, if there is one */
if (!heap->single_cache_obj) {
/* Sanity check */
- HDassert(heap->dblk);
+ assert(heap->dblk);
if (FAIL == H5AC_mark_entry_dirty(heap->dblk))
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap data block as dirty");
@@ -551,11 +551,11 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(heap);
- HDassert(buf_size > 0);
- HDassert(buf);
- HDassert(offset_out);
+ assert(f);
+ assert(heap);
+ assert(buf_size > 0);
+ assert(buf);
+ assert(offset_out);
/* Mark heap as dirty in cache */
/* (A bit early in the process, but it's difficult to determine in the
@@ -581,8 +581,8 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
offset = fl->offset;
fl->offset += need_size;
fl->size -= need_size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
found = TRUE;
break;
}
@@ -626,7 +626,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
need_more = need_size;
new_dblk_size = heap->dblk_size + need_more;
- HDassert(heap->dblk_size < new_dblk_size);
+ assert(heap->dblk_size < new_dblk_size);
old_dblk_size = heap->dblk_size;
H5_CHECK_OVERFLOW(heap->dblk_size, size_t, hsize_t);
H5_CHECK_OVERFLOW(new_dblk_size, size_t, hsize_t);
@@ -668,14 +668,14 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
offset = last_fl->offset;
last_fl->offset += need_size;
last_fl->size += need_more - need_size;
- HDassert(last_fl->offset == H5HL_ALIGN(last_fl->offset));
- HDassert(last_fl->size == H5HL_ALIGN(last_fl->size));
+ assert(last_fl->offset == H5HL_ALIGN(last_fl->offset));
+ assert(last_fl->size == H5HL_ALIGN(last_fl->size));
if (last_fl->size < H5HL_SIZEOF_FREE(f)) {
#ifdef H5HL_DEBUG
if (H5DEBUG(HL) && last_fl->size) {
- HDfprintf(H5DEBUG(HL), "H5HL: lost %lu bytes at line %d\n",
- (unsigned long)(last_fl->size), __LINE__);
+ fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes at line %d\n", (unsigned long)(last_fl->size),
+ __LINE__);
}
#endif
last_fl = H5HL__remove_free(heap, last_fl);
@@ -691,8 +691,8 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed");
fl->offset = old_dblk_size + need_size;
fl->size = need_more - need_size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl->prev = NULL;
fl->next = heap->freelist;
if (heap->freelist)
@@ -701,16 +701,16 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
#ifdef H5HL_DEBUG
}
else if (H5DEBUG(HL) && need_more > need_size) {
- HDfprintf(H5DEBUG(HL), "H5HL_insert: lost %lu bytes at line %d\n",
- (unsigned long)(need_more - need_size), __LINE__);
+ fprintf(H5DEBUG(HL), "H5HL_insert: lost %lu bytes at line %d\n",
+ (unsigned long)(need_more - need_size), __LINE__);
#endif
}
}
#ifdef H5HL_DEBUG
if (H5DEBUG(HL)) {
- HDfprintf(H5DEBUG(HL), "H5HL: resize mem buf from %lu to %lu bytes\n",
- (unsigned long)(old_dblk_size), (unsigned long)(old_dblk_size + need_more));
+ fprintf(H5DEBUG(HL), "H5HL: resize mem buf from %lu to %lu bytes\n",
+ (unsigned long)(old_dblk_size), (unsigned long)(old_dblk_size + need_more));
}
#endif
if (NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, heap->dblk_size)))
@@ -718,7 +718,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
/* Clear new section so junk doesn't appear in the file */
/* (Avoid clearing section which will be overwritten with newly inserted data) */
- HDmemset(heap->dblk_image + offset + buf_size, 0, (new_dblk_size - (offset + buf_size)));
+ memset(heap->dblk_image + offset + buf_size, 0, (new_dblk_size - (offset + buf_size)));
}
/* Copy the data into the heap */
@@ -762,15 +762,15 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(heap);
- HDassert(size > 0);
- HDassert(offset == H5HL_ALIGN(offset));
+ assert(f);
+ assert(heap);
+ assert(size > 0);
+ assert(offset == H5HL_ALIGN(offset));
size = H5HL_ALIGN(size);
- HDassert(offset < heap->dblk_size);
- HDassert(offset + size <= heap->dblk_size);
+ assert(offset < heap->dblk_size);
+ assert(offset + size <= heap->dblk_size);
/* Mark heap as dirty in cache
*
@@ -793,15 +793,15 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
if ((offset + size) == fl->offset) {
fl->offset = offset;
fl->size += size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl2 = fl->next;
while (fl2) {
if ((fl2->offset + fl2->size) == fl->offset) {
fl->offset = fl2->offset;
fl->size += fl2->size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl2 = H5HL__remove_free(heap, fl2);
if (((fl->offset + fl->size) == heap->dblk_size) && ((2 * fl->size) > heap->dblk_size)) {
if (FAIL == H5HL__minimize_heap_space(f, heap))
@@ -820,11 +820,11 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
else if (fl->offset + fl->size == offset) {
fl->size += size;
fl2 = fl->next;
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->size == H5HL_ALIGN(fl->size));
while (fl2) {
if (fl->offset + fl->size == fl2->offset) {
fl->size += fl2->size;
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl2 = H5HL__remove_free(heap, fl2);
if (((fl->offset + fl->size) == heap->dblk_size) && ((2 * fl->size) > heap->dblk_size)) {
if (FAIL == H5HL__minimize_heap_space(f, heap))
@@ -851,7 +851,7 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
if (size < H5HL_SIZEOF_FREE(f)) {
#ifdef H5HL_DEBUG
if (H5DEBUG(HL)) {
- HDfprintf(H5DEBUG(HL), "H5HL: lost %lu bytes\n", (unsigned long)size);
+ fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes\n", (unsigned long)size);
}
#endif
HGOTO_DONE(SUCCEED)
@@ -862,8 +862,8 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed");
fl->offset = offset;
fl->size = size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl->prev = NULL;
fl->next = heap->freelist;
if (heap->freelist)
@@ -903,8 +903,8 @@ H5HL_delete(H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
@@ -965,9 +965,9 @@ H5HL_get_size(H5F_t *f, haddr_t addr, size_t *size)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(size);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(size);
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
@@ -1017,9 +1017,9 @@ H5HL_heapsize(H5F_t *f, haddr_t addr, hsize_t *heap_size)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(heap_size);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(heap_size);
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index c04efb6..64cdf84 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -149,14 +149,14 @@ H5HL__hdr_deserialize(H5HL_t *heap, const uint8_t *image, size_t len, H5HL_cache
FUNC_ENTER_PACKAGE
- HDassert(heap);
- HDassert(image);
- HDassert(udata);
+ assert(heap);
+ assert(image);
+ assert(udata);
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad local heap signature")
image += H5_SIZEOF_MAGIC;
@@ -218,8 +218,8 @@ H5HL__fl_deserialize(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
- HDassert(!heap->freelist);
+ assert(heap);
+ assert(!heap->freelist);
/* Build free list */
free_block = heap->free_block;
@@ -286,13 +286,13 @@ H5HL__fl_serialize(const H5HL_t *heap)
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Serialize the free list into the heap data's image */
for (fl = heap->freelist; fl; fl = fl->next) {
uint8_t *image; /* Pointer into raw data buffer */
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
image = heap->dblk_image + fl->offset;
if (fl->next)
@@ -327,7 +327,7 @@ H5HL__cache_prefix_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *im
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(image_len);
+ assert(image_len);
/* Set the image length size */
*image_len = H5HL_SPEC_READ_SIZE;
@@ -360,12 +360,12 @@ H5HL__cache_prefix_get_final_load_size(const void *_image, size_t image_len, voi
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
- HDmemset(&heap, 0, sizeof(H5HL_t));
+ memset(&heap, 0, sizeof(H5HL_t));
/* Deserialize the heap's header */
if (H5HL__hdr_deserialize(&heap, (const uint8_t *)image, image_len, udata) < 0)
@@ -410,14 +410,14 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, hbo
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->sizeof_size > 0);
- HDassert(udata->sizeof_addr > 0);
- HDassert(udata->sizeof_prfx > 0);
- HDassert(H5F_addr_defined(udata->prfx_addr));
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->sizeof_size > 0);
+ assert(udata->sizeof_addr > 0);
+ assert(udata->sizeof_prfx > 0);
+ assert(H5F_addr_defined(udata->prfx_addr));
+ assert(dirty);
/* Allocate space in memory for the heap */
if (NULL == (heap = H5HL__new(udata->sizeof_size, udata->sizeof_addr, udata->sizeof_prfx)))
@@ -504,10 +504,10 @@ H5HL__cache_prefix_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(prfx);
- HDassert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
- HDassert(image_len);
+ assert(prfx);
+ assert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
+ assert(image_len);
/* Set the prefix's size */
*image_len = prfx->heap->prfx_size;
@@ -548,24 +548,24 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(prfx);
- HDassert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
- HDassert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr));
- HDassert(prfx->heap);
+ assert(f);
+ assert(image);
+ assert(prfx);
+ assert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
+ assert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr));
+ assert(prfx->heap);
/* Get the pointer to the heap */
heap = prfx->heap;
- HDassert(heap);
+ assert(heap);
#ifndef NDEBUG
/* Compute the buffer size */
size_t buf_size = heap->prfx_size; /* expected size of the image buffer */
if (heap->single_cache_obj)
buf_size += heap->dblk_size;
- HDassert(len == buf_size);
+ assert(len == buf_size);
#endif
/* Update the free block value from the free list */
@@ -592,7 +592,7 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
* the prefix and the data block due to alignment constraints.
*/
gap = heap->prfx_size - (size_t)(image - (uint8_t *)_image);
- HDmemset(image, 0, gap);
+ memset(image, 0, gap);
image += gap;
}
@@ -603,14 +603,14 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
H5MM_memcpy(image, heap->dblk_image, heap->dblk_size);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) + heap->dblk_size == len);
+ assert((size_t)(image - (uint8_t *)_image) + heap->dblk_size == len);
}
else {
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= len);
+ assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of local heap */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
}
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -647,10 +647,10 @@ H5HL__cache_prefix_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(prfx);
- HDassert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
- HDassert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr));
+ assert(prfx);
+ assert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
+ assert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr));
/* Destroy local heap prefix */
if (H5HL__prfx_dest(prfx) < 0)
@@ -683,9 +683,9 @@ H5HL__cache_datablock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(heap);
- HDassert(heap->dblk_size > 0);
- HDassert(image_len);
+ assert(heap);
+ assert(heap->dblk_size > 0);
+ assert(image_len);
/* Set the image length size */
*image_len = heap->dblk_size;
@@ -718,13 +718,13 @@ H5HL__cache_datablock_deserialize(const void *image, size_t len, void *_udata, h
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(len > 0);
- HDassert(heap);
- HDassert(heap->dblk_size == len);
- HDassert(!heap->single_cache_obj);
- HDassert(NULL == heap->dblk);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(heap);
+ assert(heap->dblk_size == len);
+ assert(!heap->single_cache_obj);
+ assert(NULL == heap->dblk);
+ assert(dirty);
/* Allocate space in memory for the heap data block */
if (NULL == (dblk = H5HL__dblk_new(heap)))
@@ -777,12 +777,12 @@ H5HL__cache_datablock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblk);
- HDassert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
- HDassert(dblk->heap);
- HDassert(dblk->heap->dblk_size > 0);
- HDassert(image_len);
+ assert(dblk);
+ assert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
+ assert(dblk->heap);
+ assert(dblk->heap->dblk_size > 0);
+ assert(image_len);
*image_len = dblk->heap->dblk_size;
@@ -813,15 +813,15 @@ H5HL__cache_datablock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *imag
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(dblk);
- HDassert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
- HDassert(dblk->heap);
+ assert(f);
+ assert(image);
+ assert(dblk);
+ assert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
+ assert(dblk->heap);
heap = dblk->heap;
- HDassert(heap->dblk_size == len);
- HDassert(!heap->single_cache_obj);
+ assert(heap->dblk_size == len);
+ assert(!heap->single_cache_obj);
/* Update the free block value from the free list */
heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL;
@@ -858,7 +858,7 @@ H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk);
+ assert(dblk);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
@@ -867,8 +867,8 @@ H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing)
case H5AC_NOTIFY_ACTION_AFTER_LOAD:
/* Sanity checks */
- HDassert(dblk->heap);
- HDassert(dblk->heap->prfx);
+ assert(dblk->heap);
+ assert(dblk->heap->prfx);
/* Pin the heap's prefix */
if (FAIL == H5AC_pin_protected_entry(dblk->heap->prfx))
@@ -887,8 +887,8 @@ H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing)
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
/* Sanity checks */
- HDassert(dblk->heap);
- HDassert(dblk->heap->prfx);
+ assert(dblk->heap);
+ assert(dblk->heap->prfx);
/* Unpin the local heap prefix */
if (FAIL == H5AC_unpin_entry(dblk->heap->prfx))
@@ -930,9 +930,9 @@ H5HL__cache_datablock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(dblk);
- HDassert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
+ assert(dblk);
+ assert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
/* Destroy the data block */
if (H5HL__dblk_dest(dblk) < 0)
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index 6e5ad39..68a2c5f 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -56,19 +56,19 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
if (NULL == (h = (H5HL_t *)H5HL_protect(f, addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load/protect local heap")
- HDfprintf(stream, "%*sLocal Heap...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size (in bytes):", h->prfx_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size);
+ fprintf(stream, "%*sLocal Heap...\n", indent, "");
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size (in bytes):", h->prfx_size);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size);
/* Traverse the free list and check that all free blocks fall within
* the heap and that no two free blocks point to the same region of
@@ -77,15 +77,15 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
if (NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
- HDfprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
+ fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
for (free_block = 0, freelist = h->freelist; freelist; freelist = freelist->next, free_block++) {
char temp_str[32];
HDsnprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block);
- HDfprintf(stream, "%*s%-*s %8zu, %8zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str,
- freelist->offset, freelist->size);
+ fprintf(stream, "%*s%-*s %8zu, %8zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str,
+ freelist->offset, freelist->size);
if ((freelist->offset + freelist->size) > h->dblk_size)
- HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
+ fprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
else {
int overlap = 0;
size_t i;
@@ -96,15 +96,15 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
marker[freelist->offset + i] = 1;
}
if (overlap)
- HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ fprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
else
amount_free += freelist->size;
}
}
if (h->dblk_size)
- HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:",
- (100.0 * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
+ fprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:",
+ (100.0 * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
/* Print the data in a VMS-style octal dump */
H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
diff --git a/src/H5HLdblk.c b/src/H5HLdblk.c
index 6b80897..7ab1bc4 100644
--- a/src/H5HLdblk.c
+++ b/src/H5HLdblk.c
@@ -89,7 +89,7 @@ H5HL__dblk_new(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Allocate new local heap data block */
if (NULL == (dblk = H5FL_CALLOC(H5HL_dblk_t)))
@@ -135,7 +135,7 @@ H5HL__dblk_dest(H5HL_dblk_t *dblk)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(dblk);
+ assert(dblk);
/* Check if data block was initialized */
if (dblk->heap) {
@@ -182,8 +182,8 @@ H5HL__dblk_realloc(H5F_t *f, H5HL_t *heap, size_t new_heap_size)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(heap);
- HDassert(new_heap_size > 0);
+ assert(heap);
+ assert(new_heap_size > 0);
/* Release old space on disk */
old_addr = heap->dblk_addr;
@@ -206,8 +206,8 @@ H5HL__dblk_realloc(H5F_t *f, H5HL_t *heap, size_t new_heap_size)
/* Check if heap data block is contiguous w/prefix */
if (heap->single_cache_obj) {
/* Sanity check */
- HDassert(H5F_addr_eq(heap->prfx_addr + heap->prfx_size, old_addr));
- HDassert(heap->prfx);
+ assert(H5F_addr_eq(heap->prfx_addr + heap->prfx_size, old_addr));
+ assert(heap->prfx);
/* Resize the heap prefix in the cache */
if (FAIL == H5AC_resize_entry(heap->prfx, (size_t)(heap->prfx_size + new_heap_size)))
@@ -215,8 +215,8 @@ H5HL__dblk_realloc(H5F_t *f, H5HL_t *heap, size_t new_heap_size)
}
else {
/* Sanity check */
- HDassert(H5F_addr_ne(heap->prfx_addr + heap->prfx_size, old_addr));
- HDassert(heap->dblk);
+ assert(H5F_addr_ne(heap->prfx_addr + heap->prfx_size, old_addr));
+ assert(heap->dblk);
/* Resize the heap data block in the cache */
if (H5AC_resize_entry(heap->dblk, (size_t)new_heap_size) < 0)
diff --git a/src/H5HLint.c b/src/H5HLint.c
index fa879fa..9e7f04c 100644
--- a/src/H5HLint.c
+++ b/src/H5HLint.c
@@ -88,9 +88,9 @@ H5HL__new(size_t sizeof_size, size_t sizeof_addr, size_t prfx_size)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(sizeof_size > 0);
- HDassert(sizeof_addr > 0);
- HDassert(prfx_size > 0);
+ assert(sizeof_size > 0);
+ assert(sizeof_addr > 0);
+ assert(prfx_size > 0);
/* Allocate new local heap structure */
if (NULL == (heap = H5FL_CALLOC(H5HL_t)))
@@ -130,7 +130,7 @@ H5HL__inc_rc(H5HL_t *heap)
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Increment heap's ref. count */
heap->rc++;
@@ -158,7 +158,7 @@ H5HL__dec_rc(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Decrement heap's ref. count */
heap->rc--;
@@ -191,13 +191,13 @@ H5HL__dest(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Verify that node is unused */
- HDassert(heap->prots == 0);
- HDassert(heap->rc == 0);
- HDassert(heap->prfx == NULL);
- HDassert(heap->dblk == NULL);
+ assert(heap->prots == 0);
+ assert(heap->rc == 0);
+ assert(heap->prfx == NULL);
+ assert(heap->dblk == NULL);
/* Use DONE errors here to try to free as much as possible */
if (heap->dblk_image)
diff --git a/src/H5HLprfx.c b/src/H5HLprfx.c
index f81381c..558bdce 100644
--- a/src/H5HLprfx.c
+++ b/src/H5HLprfx.c
@@ -88,7 +88,7 @@ H5HL__prfx_new(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Allocate new local heap prefix */
if (NULL == (prfx = H5FL_CALLOC(H5HL_prfx_t)))
@@ -134,7 +134,7 @@ H5HL__prfx_dest(H5HL_prfx_t *prfx)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(prfx);
+ assert(prfx);
/* Check if prefix was initialized */
if (prfx->heap) {
diff --git a/src/H5Idbg.c b/src/H5Idbg.c
index 5fbe29b..4c7d1ec 100644
--- a/src/H5Idbg.c
+++ b/src/H5Idbg.c
@@ -81,10 +81,10 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stderr, " id = %" PRIdHID "\n", info->id);
- HDfprintf(stderr, " count = %u\n", info->count);
- HDfprintf(stderr, " obj = 0x%8p\n", info->object);
- HDfprintf(stderr, " marked = %d\n", info->marked);
+ fprintf(stderr, " id = %" PRIdHID "\n", info->id);
+ fprintf(stderr, " count = %u\n", info->count);
+ fprintf(stderr, " obj = 0x%8p\n", info->object);
+ fprintf(stderr, " marked = %d\n", info->marked);
/* Get the group location, so we get get the name */
switch (type) {
@@ -143,9 +143,9 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
if (path) {
if (path->user_path_r)
- HDfprintf(stderr, " user_path = %s\n", H5RS_get_str(path->user_path_r));
+ fprintf(stderr, " user_path = %s\n", H5RS_get_str(path->user_path_r));
if (path->full_path_r)
- HDfprintf(stderr, " full_path = %s\n", H5RS_get_str(path->full_path_r));
+ fprintf(stderr, " full_path = %s\n", H5RS_get_str(path->full_path_r));
}
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
@@ -167,7 +167,7 @@ H5I_dump_ids_for_type(H5I_type_t type)
FUNC_ENTER_NOAPI_NOERR
- HDfprintf(stderr, "Dumping ID type %d\n", (int)type);
+ fprintf(stderr, "Dumping ID type %d\n", (int)type);
type_info = H5I_type_info_array_g[type];
if (type_info) {
@@ -176,21 +176,21 @@ H5I_dump_ids_for_type(H5I_type_t type)
H5I_id_info_t *tmp = NULL;
/* Header */
- HDfprintf(stderr, " init_count = %u\n", type_info->init_count);
- HDfprintf(stderr, " reserved = %u\n", type_info->cls->reserved);
- HDfprintf(stderr, " id_count = %llu\n", (unsigned long long)type_info->id_count);
- HDfprintf(stderr, " nextid = %llu\n", (unsigned long long)type_info->nextid);
+ fprintf(stderr, " init_count = %u\n", type_info->init_count);
+ fprintf(stderr, " reserved = %u\n", type_info->cls->reserved);
+ fprintf(stderr, " id_count = %llu\n", (unsigned long long)type_info->id_count);
+ fprintf(stderr, " nextid = %llu\n", (unsigned long long)type_info->nextid);
/* List */
if (type_info->id_count > 0) {
- HDfprintf(stderr, " List:\n");
+ fprintf(stderr, " List:\n");
/* Normally we care about the callback's return value
* (H5I_ITER_CONT, etc.), but this is an iteration over all
* the IDs so we don't care.
*
* XXX: Update this to emit an error message on errors?
*/
- HDfprintf(stderr, " (HASH TABLE)\n");
+ fprintf(stderr, " (HASH TABLE)\n");
HASH_ITER(hh, type_info->hash_table, item, tmp)
{
H5I__id_dump_cb((void *)item, NULL, (void *)&type);
@@ -198,7 +198,7 @@ H5I_dump_ids_for_type(H5I_type_t type)
}
}
else
- HDfprintf(stderr, "Global type info/tracking pointer for that type is NULL\n");
+ fprintf(stderr, "Global type info/tracking pointer for that type is NULL\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5I_dump_ids_for_type() */
diff --git a/src/H5Iint.c b/src/H5Iint.c
index 8a6b7ae..5715583 100644
--- a/src/H5Iint.c
+++ b/src/H5Iint.c
@@ -136,7 +136,7 @@ H5I_term_package(void)
for (i = 0; i < H5I_next_type_g; i++) {
type_info = H5I_type_info_array_g[i];
if (type_info) {
- HDassert(NULL == type_info->hash_table);
+ assert(NULL == type_info->hash_table);
type_info = H5MM_xfree(type_info);
H5I_type_info_array_g[i] = NULL;
in_use++;
@@ -167,8 +167,8 @@ H5I_register_type(const H5I_class_t *cls)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(cls);
- HDassert(cls->type > 0 && (int)cls->type < H5I_MAX_NUM_TYPES);
+ assert(cls);
+ assert(cls->type > 0 && (int)cls->type < H5I_MAX_NUM_TYPES);
/* Initialize the type */
if (NULL == H5I_type_info_array_g[cls->type]) {
@@ -260,7 +260,7 @@ H5I__unwrap(void *object, H5I_type_t type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(object);
+ assert(object);
/* The stored object pointer might be an H5VL_object_t, in which
* case we'll need to get the wrapped object struct (H5F_t *, etc.).
@@ -372,9 +372,9 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(info);
- HDassert(udata);
- HDassert(udata->type_info);
+ assert(info);
+ assert(udata);
+ assert(udata->type_info);
/* Do nothing to the object if the reference count is larger than
* one and forcing is off.
@@ -388,10 +388,10 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
if (udata->force) {
#ifdef H5I_DEBUG
if (H5DEBUG(I)) {
- HDfprintf(H5DEBUG(I),
- "H5I: discard type=%d obj=%p "
- "failure ignored\n",
- (int)udata->type_info->cls->type, info->object);
+ fprintf(H5DEBUG(I),
+ "H5I: discard type=%d obj=%p "
+ "failure ignored\n",
+ (int)udata->type_info->cls->type, info->object);
}
#endif /* H5I_DEBUG */
@@ -411,10 +411,10 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
if (udata->force) {
#ifdef H5I_DEBUG
if (H5DEBUG(I)) {
- HDfprintf(H5DEBUG(I),
- "H5I: free type=%d obj=%p "
- "failure ignored\n",
- (int)udata->type_info->cls->type, info->object);
+ fprintf(H5DEBUG(I),
+ "H5I: free type=%d obj=%p "
+ "failure ignored\n",
+ (int)udata->type_info->cls->type, info->object);
}
#endif /* H5I_DEBUG */
@@ -551,7 +551,7 @@ H5I__register(H5I_type_t type, const void *object, hbool_t app_ref, H5I_future_r
type_info->nextid++;
/* Sanity check for the 'nextid' getting too large and wrapping around */
- HDassert(type_info->nextid <= ID_MASK);
+ assert(type_info->nextid <= ID_MASK);
/* Set the most recent ID to this object */
type_info->last_id_info = info;
@@ -581,8 +581,8 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Sanity checks */
- HDassert(type >= H5I_FILE && type < H5I_NTYPES);
- HDassert(object);
+ assert(type >= H5I_FILE && type < H5I_NTYPES);
+ assert(object);
/* Retrieve ID for object */
if (H5I_INVALID_HID == (ret_value = H5I__register(type, object, app_ref, NULL, NULL)))
@@ -620,7 +620,7 @@ H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, h
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(object);
+ assert(object);
/* Make sure ID is not already in use */
if (NULL != (info = H5I__find_id(existing_id)))
@@ -760,7 +760,7 @@ H5I_object_verify(hid_t id, H5I_type_t type)
FUNC_ENTER_NOAPI_NOERR
- HDassert(type >= 1 && (int)type < H5I_next_type_g);
+ assert(type >= 1 && (int)type < H5I_next_type_g);
/* Verify that the type of the ID is correct & lookup the ID */
if (type == H5I_TYPE(id) && NULL != (info = H5I__find_id(id))) {
@@ -801,7 +801,7 @@ H5I_get_type(hid_t id)
if (id > 0)
ret_value = H5I_TYPE(id);
- HDassert(ret_value >= H5I_BADID && (int)ret_value < H5I_next_type_g);
+ assert(ret_value >= H5I_BADID && (int)ret_value < H5I_next_type_g);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_type() */
@@ -910,12 +910,12 @@ H5I__remove_common(H5I_type_info_t *type_info, hid_t id)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type_info);
+ assert(type_info);
/* Delete or mark the node */
HASH_FIND(hh, type_info->hash_table, &id, sizeof(hid_t), info);
if (info) {
- HDassert(!info->marked);
+ assert(!info->marked);
if (!H5I_marking_g)
HASH_DELETE(hh, type_info->hash_table, info);
else
@@ -1004,7 +1004,7 @@ H5I__dec_ref(hid_t id, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
@@ -1068,7 +1068,7 @@ H5I_dec_ref(hid_t id)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Synchronously decrement refcount on ID */
if ((ret_value = H5I__dec_ref(id, H5_REQUEST_NULL)) < 0)
@@ -1100,7 +1100,7 @@ H5I__dec_app_ref(hid_t id, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Call regular decrement reference count routine */
if ((ret_value = H5I__dec_ref(id, request)) < 0)
@@ -1116,7 +1116,7 @@ H5I__dec_app_ref(hid_t id, void **request)
/* Adjust app_ref */
--(info->app_count);
- HDassert(info->count >= info->app_count);
+ assert(info->count >= info->app_count);
/* Set return value */
ret_value = (int)info->app_count;
@@ -1148,7 +1148,7 @@ H5I_dec_app_ref(hid_t id)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Synchronously decrement refcount on ID */
if ((ret_value = H5I__dec_app_ref(id, H5_REQUEST_NULL)) < 0)
@@ -1183,7 +1183,7 @@ H5I_dec_app_ref_async(hid_t id, void **token)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* [Possibly] aynchronously decrement refcount on ID */
if ((ret_value = H5I__dec_app_ref(id, token)) < 0)
@@ -1215,7 +1215,7 @@ H5I__dec_app_ref_always_close(hid_t id, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Call application decrement reference count routine */
ret_value = H5I__dec_app_ref(id, request);
@@ -1256,7 +1256,7 @@ H5I_dec_app_ref_always_close(hid_t id)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Synchronously decrement refcount on ID */
if ((ret_value = H5I__dec_app_ref_always_close(id, H5_REQUEST_NULL)) < 0)
@@ -1288,7 +1288,7 @@ H5I_dec_app_ref_always_close_async(hid_t id, void **token)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* [Possibly] aynchronously decrement refcount on ID */
if ((ret_value = H5I__dec_app_ref_always_close(id, token)) < 0)
@@ -1317,7 +1317,7 @@ H5I_inc_ref(hid_t id, hbool_t app_ref)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
@@ -1354,7 +1354,7 @@ H5I_get_ref(hid_t id, hbool_t app_ref)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
@@ -1386,7 +1386,7 @@ H5I__inc_type_ref(H5I_type_t type)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type > 0 && (int)type < H5I_next_type_g);
+ assert(type > 0 && (int)type < H5I_next_type_g);
/* Check arguments */
type_info = H5I_type_info_array_g[type];
@@ -1472,7 +1472,7 @@ H5I__get_type_ref(H5I_type_t type)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type >= 0);
+ assert(type >= 0);
/* Check arguments */
type_info = H5I_type_info_array_g[type];
@@ -1662,7 +1662,7 @@ H5I__find_id(hid_t id)
/* Swap the actual object in for the future object */
future_object = (void *)id_info->object;
actual_object = H5I__remove_common(type_info, actual_id);
- HDassert(actual_object);
+ assert(actual_object);
id_info->object = actual_object;
/* Discard the future object */
@@ -1706,8 +1706,8 @@ H5I__find_id_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(info);
- HDassert(udata);
+ assert(info);
+ assert(udata);
/* Get a pointer to the VOL connector's data */
H5_GCC_CLANG_DIAG_OFF("cast-qual")
@@ -1742,7 +1742,7 @@ H5I_find_id(const void *object, H5I_type_t type, hid_t *id)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(id);
+ assert(id);
*id = H5I_INVALID_HID;
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index facd7de..9155418 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -124,7 +124,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(p);
+ assert(p);
/* Check external link version & flags */
if (((*p >> 4) & 0x0F) > H5L_EXT_VERSION)
diff --git a/src/H5Lint.c b/src/H5Lint.c
index 24d05fd..18d62c9 100644
--- a/src/H5Lint.c
+++ b/src/H5Lint.c
@@ -332,8 +332,8 @@ H5L_register(const H5L_class_t *cls)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cls);
- HDassert(cls->id >= 0 && cls->id <= H5L_TYPE_MAX);
+ assert(cls);
+ assert(cls->id >= 0 && cls->id <= H5L_TYPE_MAX);
/* Is the link type already registered? */
for (i = 0; i < H5L_table_used_g; i++)
@@ -384,7 +384,7 @@ H5L_unregister(H5L_type_t id)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(id >= 0 && id <= H5L_TYPE_MAX);
+ assert(id >= 0 && id <= H5L_TYPE_MAX);
/* Is the filter already registered? */
for (i = 0; i < H5L_table_used_g; i++)
@@ -422,7 +422,7 @@ H5L_is_registered(H5L_type_t id, hbool_t *is_registered)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(is_registered);
+ assert(is_registered);
/* Is the link class already registered? */
*is_registered = FALSE;
@@ -457,9 +457,9 @@ H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc, hid
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(new_loc);
- HDassert(obj_loc);
- HDassert(new_name && *new_name);
+ assert(new_loc);
+ assert(obj_loc);
+ assert(new_name && *new_name);
/* The link callback will check that the object isn't being hard linked
* into a different file, so we don't need to do it here (there could be
@@ -499,9 +499,9 @@ H5L_link_object(const H5G_loc_t *new_loc, const char *new_name, H5O_obj_create_t
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(new_loc);
- HDassert(new_name && *new_name);
- HDassert(ocrt_info);
+ assert(new_loc);
+ assert(new_name && *new_name);
+ assert(ocrt_info);
/* The link callback will check that the object isn't being hard linked
* into a different file, so we don't need to do it here (there could be
@@ -651,7 +651,7 @@ done:
H5O_loc_t oloc; /* Object location for created object */
/* Set up object location */
- HDmemset(&oloc, 0, sizeof(oloc));
+ memset(&oloc, 0, sizeof(oloc));
oloc.file = grp_loc->oloc->file;
oloc.addr = udata->lnk->u.hard.addr;
@@ -711,10 +711,10 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *o
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(link_loc);
- HDassert(link_name && *link_name);
- HDassert(lnk);
- HDassert(lnk->type >= H5L_TYPE_HARD && lnk->type <= H5L_TYPE_MAX);
+ assert(link_loc);
+ assert(link_name && *link_name);
+ assert(lnk);
+ assert(lnk->type >= H5L_TYPE_HARD && lnk->type <= H5L_TYPE_MAX);
/* Get normalized link name */
if ((norm_link_name = H5G_normalize(link_name)) == NULL)
@@ -794,10 +794,10 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(cur_loc);
- HDassert(cur_name && *cur_name);
- HDassert(link_loc);
- HDassert(link_name && *link_name);
+ assert(cur_loc);
+ assert(cur_name && *cur_name);
+ assert(link_loc);
+ assert(link_name && *link_name);
/* Get normalized copy of the current name */
if ((norm_cur_name = H5G_normalize(cur_name)) == NULL)
@@ -860,9 +860,9 @@ H5L__create_soft(const char *target_path, const H5G_loc_t *link_loc, const char
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(link_loc);
- HDassert(target_path && *target_path);
- HDassert(link_name && *link_name);
+ assert(link_loc);
+ assert(target_path && *target_path);
+ assert(link_name && *link_name);
/* Get normalized copy of the link target */
if ((norm_target = H5G_normalize(target_path)) == NULL)
@@ -907,10 +907,10 @@ H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name, const void *ud_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(type >= H5L_TYPE_UD_MIN && type <= H5L_TYPE_MAX);
- HDassert(link_loc);
- HDassert(link_name && *link_name);
- HDassert(ud_data_size == 0 || ud_data);
+ assert(type >= H5L_TYPE_UD_MIN && type <= H5L_TYPE_MAX);
+ assert(link_loc);
+ assert(link_name && *link_name);
+ assert(ud_data_size == 0 || ud_data);
/* Initialize the link struct's pointer to its udata buffer */
lnk.u.ud.udata = NULL;
@@ -961,7 +961,7 @@ H5L__get_val_real(const H5O_link_t *lnk, void *buf, size_t size)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(lnk);
+ assert(lnk);
/* Check for soft link */
if (H5L_TYPE_SOFT == lnk->type) {
@@ -1061,8 +1061,8 @@ H5L__get_val(const H5G_loc_t *loc, const char *name, void *buf /*out*/, size_t s
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for retrieving information */
udata.size = size;
@@ -1149,8 +1149,8 @@ H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for retrieving information */
udata.idx_type = idx_type;
@@ -1237,8 +1237,8 @@ H5L__delete(const H5G_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Get normalized copy of the name */
if ((norm_name = H5G_normalize(name)) == NULL)
@@ -1319,8 +1319,8 @@ H5L__delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for unlink operation */
udata.idx_type = idx_type;
@@ -1374,7 +1374,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "moving a link across files is not allowed")
/* Give the object its new name */
- HDassert(udata->lnk->name == NULL);
+ assert(udata->lnk->name == NULL);
H5_GCC_CLANG_DIAG_OFF("cast-qual")
udata->lnk->name = (char *)name;
H5_GCC_CLANG_DIAG_ON("cast-qual")
@@ -1517,7 +1517,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
/* Make certain that the destination name is a full (not relative) path */
if (*(udata->dst_name) != '/') {
- HDassert(udata->dst_loc->path->full_path_r);
+ assert(udata->dst_loc->path->full_path_r);
/* Create reference counted string for full dst path */
if ((dst_name_r = H5G_build_fullpath_refstr_str(udata->dst_loc->path->full_path_r,
@@ -1526,7 +1526,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
} /* end if */
else
dst_name_r = H5RS_wrap(udata->dst_name);
- HDassert(dst_name_r);
+ assert(dst_name_r);
/* Fix names up */
if (H5G_name_replace(lnk, H5G_NAME_MOVE, obj_loc->oloc->file, obj_loc->path->full_path_r,
@@ -1596,10 +1596,10 @@ H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_l
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(src_loc);
- HDassert(dst_loc);
- HDassert(src_name && *src_name);
- HDassert(dst_name && *dst_name);
+ assert(src_loc);
+ assert(dst_loc);
+ assert(src_name && *src_name);
+ assert(dst_name && *dst_name);
/* Check for flags present in creation property list */
if (lcpl_id != H5P_DEFAULT) {
@@ -1761,9 +1761,9 @@ H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hbool_t *exists)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(loc);
- HDassert(name);
- HDassert(exists);
+ assert(loc);
+ assert(name);
+ assert(exists);
/* Copy the name and skip leading '/'s */
name_trav = name_copy = H5MM_strdup(name);
@@ -1823,9 +1823,9 @@ H5L__exists(const H5G_loc_t *loc, const char *name, hbool_t *exists)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(loc);
- HDassert(name);
- HDassert(exists);
+ assert(loc);
+ assert(name);
+ assert(exists);
/* A path of "/" will always exist in a file */
if (0 == HDstrcmp(name, "/"))
@@ -1978,9 +1978,9 @@ H5L__get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(linfo);
+ assert(loc);
+ assert(name && *name);
+ assert(linfo);
/* Set up user data for callback */
udata.idx_type = idx_type;
@@ -2056,9 +2056,9 @@ H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(group_name && *group_name);
- HDassert(link_name_len);
+ assert(loc);
+ assert(group_name && *group_name);
+ assert(link_name_len);
/* Set up user data for callback */
udata.idx_type = idx_type;
@@ -2109,10 +2109,10 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(dst_file);
- HDassert(src_lnk);
- HDassert(dst_lnk);
- HDassert(cpy_info);
+ assert(dst_file);
+ assert(src_lnk);
+ assert(dst_lnk);
+ assert(cpy_info);
/* Expand soft or external link, if requested */
if ((H5L_TYPE_SOFT == src_lnk->type && cpy_info->expand_soft_link) ||
@@ -2180,7 +2180,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
tmp_src_oloc.file = src_oloc->file;
tmp_src_oloc.addr = src_lnk->u.hard.addr;
} /* end if */
- HDassert(H5F_addr_defined(tmp_src_oloc.addr));
+ assert(H5F_addr_defined(tmp_src_oloc.addr));
/* Copy the shared object from source to destination */
/* Don't care about obj_type or udata because those are only important
@@ -2195,7 +2195,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
done:
/* Check if we used a temporary src link */
if (src_lnk != _src_lnk) {
- HDassert(src_lnk == &tmp_src_lnk);
+ assert(src_lnk == &tmp_src_lnk);
H5O_msg_reset(H5O_LINK_ID, &tmp_src_lnk);
} /* end if */
if (ret_value < 0)
@@ -2230,9 +2230,9 @@ H5L_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
- HDassert(loc);
- HDassert(group_name);
- HDassert(op);
+ assert(loc);
+ assert(group_name);
+ assert(op);
/* Set up iteration beginning/end info */
idx = (idx_p == NULL ? 0 : *idx_p);
diff --git a/src/H5M.c b/src/H5M.c
index 2469145..1afd540 100644
--- a/src/H5M.c
+++ b/src/H5M.c
@@ -144,7 +144,7 @@ H5M_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_MAP));
+ assert(0 == H5I_nmembers(H5I_MAP));
/* Destroy the dataset object id group */
n += (H5I_dec_type_ref(H5I_MAP) > 0);
@@ -170,7 +170,7 @@ H5M__close_cb(H5VL_object_t *map_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(map_vol_obj);
+ assert(map_vol_obj);
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_MAP_CLOSE;
diff --git a/src/H5MF.c b/src/H5MF.c
index 9f430c9..5080247 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -49,7 +49,7 @@
#define H5MF_CHECK_FSM(FSM, CF) \
do { \
- HDassert(*CF == FALSE); \
+ assert(*CF == FALSE); \
if (!H5F_addr_defined(FSM->addr) || !H5F_addr_defined(FSM->sect_addr)) \
*CF = TRUE; \
} while (0)
@@ -146,8 +146,8 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f_sh);
- HDassert(f_sh->lf);
+ assert(f_sh);
+ assert(f_sh->lf);
/* Iterate over all the free space types to determine if sections of that type
* can merge with the metadata or small 'raw' data aggregator
@@ -200,7 +200,7 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
switch (mapping_type) {
case H5MF_AGGR_MERGE_SEPARATE:
/* Don't merge any metadata together */
- HDmemset(f_sh->fs_aggr_merge, 0, sizeof(f_sh->fs_aggr_merge));
+ memset(f_sh->fs_aggr_merge, 0, sizeof(f_sh->fs_aggr_merge));
/* Check if merging raw data should be allowed */
/* (treat global heaps as raw data) */
@@ -213,7 +213,7 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
case H5MF_AGGR_MERGE_DICHOTOMY:
/* Merge all metadata together (but not raw data) */
- HDmemset(f_sh->fs_aggr_merge, H5F_FS_MERGE_METADATA, sizeof(f_sh->fs_aggr_merge));
+ memset(f_sh->fs_aggr_merge, H5F_FS_MERGE_METADATA, sizeof(f_sh->fs_aggr_merge));
/* Allow merging raw data allocations together */
/* (treat global heaps as raw data) */
@@ -223,8 +223,8 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
case H5MF_AGGR_MERGE_TOGETHER:
/* Merge all allocation types together */
- HDmemset(f_sh->fs_aggr_merge, (H5F_FS_MERGE_METADATA | H5F_FS_MERGE_RAWDATA),
- sizeof(f_sh->fs_aggr_merge));
+ memset(f_sh->fs_aggr_merge, (H5F_FS_MERGE_METADATA | H5F_FS_MERGE_RAWDATA),
+ sizeof(f_sh->fs_aggr_merge));
break;
default:
@@ -253,8 +253,8 @@ H5MF__alloc_to_fs_type(H5F_shared_t *f_sh, H5FD_mem_t alloc_type, hsize_t size,
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f_sh);
- HDassert(fs_type);
+ assert(f_sh);
+ assert(fs_type);
if (H5F_SHARED_PAGED_AGGR(f_sh)) { /* paged aggregation */
if (size >= f_sh->fs_page_size) {
@@ -311,16 +311,16 @@ H5MF__open_fstype(H5F_t *f, H5F_mem_page_t type)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else {
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
} /* end else */
- HDassert(f->shared);
- HDassert(H5F_addr_defined(f->shared->fs_addr[type]));
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
+ assert(f->shared);
+ assert(H5F_addr_defined(f->shared->fs_addr[type]));
+ assert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
/* Set up the alignment and threshold to use depending on the manager type */
if (H5F_PAGED_AGGR(f)) {
@@ -389,16 +389,16 @@ H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else {
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
} /* end else */
- HDassert(f->shared);
- HDassert(!H5F_addr_defined(f->shared->fs_addr[type]));
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
+ assert(f->shared);
+ assert(!H5F_addr_defined(f->shared->fs_addr[type]));
+ assert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
/* Set the free space creation parameters */
fs_create.client = H5FS_CLIENT_FILE_ID;
@@ -464,13 +464,13 @@ H5MF__start_fstype(H5F_t *f, H5F_mem_page_t type)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else {
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
} /* end else */
/* Check if the free space manager exists already */
@@ -513,12 +513,12 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
+ assert(f);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert(H5F_addr_defined(f->shared->fs_addr[type]));
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert(H5F_addr_defined(f->shared->fs_addr[type]));
/* Put address into temporary variable and reset it */
/* (Avoids loopback in file space freeing routine) */
@@ -538,7 +538,7 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type)
H5AC_set_ring(fsm_ring, &orig_ring);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Before deleting free space manager\n", __func__);
+ fprintf(stderr, "%s: Before deleting free space manager\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Delete free space manager for this type */
@@ -546,11 +546,11 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't delete free space manager")
/* Shift [back] to closed state */
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING);
+ assert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING);
f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
/* Sanity check that the free space manager for this type wasn't started up again */
- HDassert(!H5F_addr_defined(f->shared->fs_addr[type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[type]));
done:
/* Reset the ring in the API context */
@@ -583,17 +583,17 @@ H5MF__close_fstype(H5F_t *f, H5F_mem_page_t type)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert(f->shared);
- HDassert(f->shared->fs_man[type]);
- HDassert(f->shared->fs_state[type] != H5F_FS_STATE_CLOSED);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert(f->shared);
+ assert(f->shared->fs_man[type]);
+ assert(f->shared->fs_state[type] != H5F_FS_STATE_CLOSED);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Before closing free space manager\n", __func__);
+ fprintf(stderr, "%s: Before closing free space manager\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Close an existing free space structure for the file */
@@ -629,9 +629,9 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(fspace);
- HDassert(node);
+ assert(f);
+ assert(fspace);
+ assert(node);
H5MF__alloc_to_fs_type(f->shared, alloc_type, node->sect_info.size, &fs_type);
@@ -649,10 +649,9 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio
H5AC_set_ring(fsm_ring, &orig_ring);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: adding node, node->sect_info.addr = %" PRIuHADDR ", node->sect_info.size = %" PRIuHSIZE
- "\n",
- __func__, node->sect_info.addr, node->sect_info.size);
+ fprintf(stderr,
+ "%s: adding node, node->sect_info.addr = %" PRIuHADDR ", node->sect_info.size = %" PRIuHSIZE "\n",
+ __func__, node->sect_info.addr, node->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Add the section */
if (H5FS_sect_add(f, fspace, (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata) < 0)
@@ -689,8 +688,8 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
/* Set the ring type in the API context */
if (H5MF__fsm_is_self_referential(f->shared, fspace))
@@ -704,13 +703,13 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "error locating free space in file")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section found = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: section found = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Check for actually finding section */
if (ret_value) {
/* Sanity check */
- HDassert(node);
+ assert(node);
/* Retrieve return value */
if (addr)
@@ -719,7 +718,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
/* Check for eliminating the section */
if (node->sect_info.size == size) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: freeing node\n", __func__);
+ fprintf(stderr, "%s: freeing node\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Free section node */
@@ -732,8 +731,8 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
node->sect_info.size -= size;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: re-adding node, node->sect_info.size = %" PRIuHSIZE "\n", __func__,
- node->sect_info.size);
+ fprintf(stderr, "%s: re-adding node, node->sect_info.size = %" PRIuHSIZE "\n", __func__,
+ node->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Re-add the section to the free-space manager */
@@ -776,19 +775,19 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
+ fprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(size > 0);
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &fs_type);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 1.0\n", __func__);
+ fprintf(stderr, "%s: Check 1.0\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Set the ring type in the API context */
@@ -813,7 +812,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
/* Open the free-space manager */
if (H5MF__open_fstype(f, fs_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, HADDR_UNDEF, "can't initialize file free space")
- HDassert(f->shared->fs_man[fs_type]);
+ assert(f->shared->fs_man[fs_type]);
} /* end if */
/* Search for large enough space in the free space manager */
@@ -825,10 +824,10 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
/* If no space is found from the free-space manager, continue further action */
if (!H5F_addr_defined(ret_value)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 2.0\n", __func__);
+ fprintf(stderr, "%s: Check 2.0\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
if (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE) {
- HDassert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
+ assert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
if (HADDR_UNDEF == (ret_value = H5MF__alloc_pagefs(f, alloc_type, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF,
"allocation failed from paged aggregation")
@@ -838,9 +837,9 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed from aggr/vfd")
} /* end else */
} /* end if */
- HDassert(H5F_addr_defined(ret_value));
+ assert(H5F_addr_defined(ret_value));
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 3.0\n", __func__);
+ fprintf(stderr, "%s: Check 3.0\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
done:
@@ -849,8 +848,8 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
- size);
+ fprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
+ size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -890,7 +889,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
+ fprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &ptype);
@@ -908,7 +907,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
/* Get the EOA for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, alloc_type)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa")
- HDassert(!(eoa % f->shared->fs_page_size));
+ assert(!(eoa % f->shared->fs_page_size));
H5MF_EOA_MISALIGN(f, (eoa + size), f->shared->fs_page_size, frag_size);
@@ -955,7 +954,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
if (!(f->shared->fs_man[ptype]))
if (H5MF__start_fstype(f, ptype) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, HADDR_UNDEF, "can't initialize file free space")
- HDassert(f->shared->fs_man[ptype]);
+ assert(f->shared->fs_man[ptype]);
if (NULL == (node = H5MF__sect_new(H5MF_FSPACE_SECT_SMALL, (new_page + size),
(f->shared->fs_page_size - size))))
@@ -987,8 +986,8 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
done:
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
- size);
+ fprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
+ size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -1034,14 +1033,14 @@ H5MF_alloc_tmp(H5F_t *f, hsize_t size)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: size = %" PRIuHSIZE "\n", __func__, size);
+ fprintf(stderr, "%s: size = %" PRIuHSIZE "\n", __func__, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(size > 0);
/* Retrieve the 'eoa' for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT)))
@@ -1086,15 +1085,15 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
- __func__, (unsigned)alloc_type, addr, size);
+ fprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
+ __func__, (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
- HDassert(f);
+ assert(f);
if (!H5F_addr_defined(addr) || 0 == size)
HGOTO_DONE(SUCCEED)
- HDassert(addr != 0); /* Can't deallocate the superblock :-) */
+ assert(addr != 0); /* Can't deallocate the superblock :-) */
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &fs_type);
@@ -1136,13 +1135,13 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
* space is at the end of the file
*/
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: fs_addr = %" PRIuHADDR "\n", __func__, f->shared->fs_addr[fs_type]);
+ fprintf(stderr, "%s: fs_addr = %" PRIuHADDR "\n", __func__, f->shared->fs_addr[fs_type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
if (!H5F_addr_defined(f->shared->fs_addr[fs_type])) {
htri_t status; /* "can absorb" status for section into */
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Trying to avoid starting up free space manager\n", __func__);
+ fprintf(stderr, "%s: Trying to avoid starting up free space manager\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Try to shrink the file or absorb the block into a block aggregator */
if ((status = H5MF_try_shrink(f, alloc_type, addr, size)) < 0)
@@ -1152,9 +1151,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
HGOTO_DONE(SUCCEED)
else if (size < f->shared->fs_threshold) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
- __func__, addr, size);
+ fprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
+ __func__, addr, size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
HGOTO_DONE(SUCCEED)
} /* end else-if */
@@ -1171,8 +1169,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
*/
if (f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING || !H5F_HAVE_FREE_SPACE_MANAGER(f)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
- __func__, addr, size);
+ fprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
+ __func__, addr, size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
HGOTO_DONE(SUCCEED)
} /* end if */
@@ -1192,10 +1190,10 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
/* If size of the freed section is larger than threshold, add it to the free space manager */
if (size >= f->shared->fs_threshold) {
- HDassert(f->shared->fs_man[fs_type]);
+ assert(f->shared->fs_man[fs_type]);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Before H5FS_sect_add()\n", __func__);
+ fprintf(stderr, "%s: Before H5FS_sect_add()\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Add to the free space for the file */
@@ -1204,7 +1202,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
node = NULL;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: After H5FS_sect_add()\n", __func__);
+ fprintf(stderr, "%s: After H5FS_sect_add()\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
else {
@@ -1237,7 +1235,7 @@ done:
HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node")
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -1281,15 +1279,15 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr,
- "%s: Entering: alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE
- ", extra_requested = %" PRIuHSIZE "\n",
- __func__, (unsigned)alloc_type, addr, size, extra_requested);
+ fprintf(stderr,
+ "%s: Entering: alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE
+ ", extra_requested = %" PRIuHSIZE "\n",
+ __func__, (unsigned)alloc_type, addr, size, extra_requested);
#endif /* H5MF_ALLOC_DEBUG */
/* Sanity check */
- HDassert(f);
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(f);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
/* Set mapped type, treating global heap as raw data */
map_type = (alloc_type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : alloc_type;
@@ -1315,7 +1313,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
* page boundary if extended */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, alloc_type)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa")
- HDassert(!(eoa % f->shared->fs_page_size));
+ assert(!(eoa % f->shared->fs_page_size));
H5MF_EOA_MISALIGN(f, (eoa + extra_requested), f->shared->fs_page_size, frag_size);
} /* end else */
@@ -1336,7 +1334,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
if ((ret_value = H5F__try_extend(f, map_type, end, extra_requested + frag_size)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: extended = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: extended = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* If extending at EOA succeeds: */
@@ -1345,7 +1343,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
H5MF_free_section_t *node = NULL; /* Free space section pointer */
/* Should be large-sized block */
- HDassert(size >= f->shared->fs_page_size);
+ assert(size >= f->shared->fs_page_size);
/* Start up the free-space manager */
if (!(f->shared->fs_man[fs_type]))
@@ -1374,7 +1372,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending aggregation block")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: H5MF__aggr_try_extend = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: H5MF__aggr_try_extend = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -1400,7 +1398,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL,
"error extending block in free space manager")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Try to H5FS_sect_try_extend = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Try to H5FS_sect_try_extend = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -1411,8 +1409,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
if (frag_size <= H5F_PGEND_META_THRES(f) && extra_requested <= frag_size)
ret_value = TRUE;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Try to extend into the page end threshold = %d\n", __func__,
- ret_value);
+ fprintf(stderr, "%s: Try to extend into the page end threshold = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
} /* end if */
@@ -1424,7 +1421,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -1459,20 +1456,20 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
- __func__, (unsigned)alloc_type, addr, size);
+ fprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
+ __func__, (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(H5F_addr_defined(addr));
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(H5F_addr_defined(addr));
+ assert(size > 0);
/* Set up free-space section class information */
sect_cls = H5MF_SECT_CLS_TYPE(f, size);
- HDassert(sect_cls);
+ assert(sect_cls);
/* Get free space type from allocation type */
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &fs_type);
@@ -1499,7 +1496,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
if ((ret_value = (*sect_cls->can_shrink)((const H5FS_section_info_t *)node, &udata)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "can't check if section can shrink container")
if (ret_value > 0) {
- HDassert(sect_cls->shrink);
+ assert(sect_cls->shrink);
if ((*sect_cls->shrink)((H5FS_section_info_t **)&node, &udata) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink container")
@@ -1516,7 +1513,7 @@ done:
HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node")
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5MF_try_shrink() */
@@ -1540,12 +1537,12 @@ H5MF_close(H5F_t *f)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (H5F_PAGED_AGGR(f)) {
if ((ret_value = H5MF__close_pagefs(f)) < 0)
@@ -1558,7 +1555,7 @@ H5MF_close(H5F_t *f)
done:
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5MF_close() */
@@ -1584,21 +1581,21 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
- __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
- f->shared->fs_addr[type]);
+ fprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
+ __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
+ f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* If the free space manager for this type is open, close it */
@@ -1607,9 +1604,9 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
- __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
- f->shared->fs_addr[type]);
+ fprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
+ __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
+ f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* If there is free space manager info for this type, delete it */
@@ -1619,7 +1616,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
done:
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF__close_delete() */
@@ -1648,11 +1645,11 @@ H5MF_try_close(H5F_t *f)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
+ assert(f);
/* If there have been no file space allocations / deallocation so
* far, must call H5MF_tidy_self_referential_fsm_hack() to float
@@ -1727,7 +1724,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* H5MF_try_close() */
@@ -1755,14 +1752,14 @@ H5MF__close_aggrfs(H5F_t *f)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(f->shared->sblock);
/* Set the ring type in the API context. In most cases, we will
* need H5AC_RING_RDFSM, so initially set the ring in
@@ -1789,7 +1786,7 @@ H5MF__close_aggrfs(H5F_t *f)
/* superblock extension and free space manager message should
* exist at this point -- verify at least the former.
*/
- HDassert(H5F_addr_defined(f->shared->sblock->ext_addr));
+ assert(H5F_addr_defined(f->shared->sblock->ext_addr));
/* file space for all non-empty free space managers should be
* allocated at this point, and these free space managers should
@@ -1832,7 +1829,7 @@ H5MF__close_aggrfs(H5F_t *f)
curr_ring = needed_ring;
} /* end if */
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_OPEN);
+ assert(f->shared->fs_state[type] == H5F_FS_STATE_OPEN);
if (H5FS_close(f, f->shared->fs_man[type]) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close free space manager")
@@ -1845,16 +1842,16 @@ H5MF__close_aggrfs(H5F_t *f)
/* verify that we haven't dirtied any metadata cache entries
* from the metadata free space manager ring out.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* verify that the aggregators are still shutdown. */
- HDassert(f->shared->sdata_aggr.tot_size == 0);
- HDassert(f->shared->sdata_aggr.addr == 0);
- HDassert(f->shared->sdata_aggr.size == 0);
+ assert(f->shared->sdata_aggr.tot_size == 0);
+ assert(f->shared->sdata_aggr.addr == 0);
+ assert(f->shared->sdata_aggr.size == 0);
- HDassert(f->shared->meta_aggr.tot_size == 0);
- HDassert(f->shared->meta_aggr.addr == 0);
- HDassert(f->shared->meta_aggr.size == 0);
+ assert(f->shared->meta_aggr.tot_size == 0);
+ assert(f->shared->meta_aggr.addr == 0);
+ assert(f->shared->meta_aggr.size == 0);
/* Trying shrinking the EOA for the file */
/* (in case any free space is now at the EOA) */
@@ -1869,7 +1866,7 @@ H5MF__close_aggrfs(H5F_t *f)
* been no file space allocation or deallocation since file
* open.
*/
- HDassert(H5F_NULL_FSM_ADDR(f) || final_eoa == f->shared->eoa_fsm_fsalloc);
+ assert(H5F_NULL_FSM_ADDR(f) || final_eoa == f->shared->eoa_fsm_fsalloc);
} /* end if */
else { /* super_vers can be 0, 1, 2 */
for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++)
@@ -1893,7 +1890,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF__close_aggrfs() */
@@ -1921,16 +1918,16 @@ H5MF__close_pagefs(H5F_t *f)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(f->shared->sblock);
- HDassert(f->shared->fs_page_size);
- HDassert(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(f->shared->sblock);
+ assert(f->shared->fs_page_size);
+ assert(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2);
/* Set the ring type in the API context. In most cases, we will
* need H5AC_RING_RDFSM, so initially set the ring in
@@ -1961,7 +1958,7 @@ H5MF__close_pagefs(H5F_t *f)
/* superblock extension and free space manager message should
* exist at this point -- verify at least the former.
*/
- HDassert(H5F_addr_defined(f->shared->sblock->ext_addr));
+ assert(H5F_addr_defined(f->shared->sblock->ext_addr));
/* file space for all non-empty free space managers should be
* allocated at this point, and these free space managers should
@@ -1998,7 +1995,7 @@ H5MF__close_pagefs(H5F_t *f)
curr_ring = needed_ring;
} /* end if */
- HDassert(f->shared->fs_state[ptype] == H5F_FS_STATE_OPEN);
+ assert(f->shared->fs_state[ptype] == H5F_FS_STATE_OPEN);
if (H5FS_close(f, f->shared->fs_man[ptype]) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close free space manager")
@@ -2011,7 +2008,7 @@ H5MF__close_pagefs(H5F_t *f)
/* verify that we haven't dirtied any metadata cache entries
* from the metadata free space manager ring out.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Trying shrinking the EOA for the file */
/* (in case any free space is now at the EOA) */
@@ -2038,9 +2035,9 @@ H5MF__close_pagefs(H5F_t *f)
* the file driver layer. However, as this possibility seems remote,
* it is ignored in the following assert.
*/
- HDassert((H5F_NULL_FSM_ADDR(f)) || (final_eoa == f->shared->eoa_fsm_fsalloc) ||
- ((H5F_addr_defined(f->shared->eoa_post_mdci_fsalloc)) &&
- (final_eoa == f->shared->eoa_post_mdci_fsalloc)));
+ assert((H5F_NULL_FSM_ADDR(f)) || (final_eoa == f->shared->eoa_fsm_fsalloc) ||
+ ((H5F_addr_defined(f->shared->eoa_post_mdci_fsalloc)) &&
+ (final_eoa == f->shared->eoa_post_mdci_fsalloc)));
} /* end if */
else {
/* Iterate over all the free space types that have managers
@@ -2068,7 +2065,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF__close_pagefs() */
@@ -2101,8 +2098,8 @@ H5MF__close_shrink_eoa(H5F_t *f)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Construct user data for callbacks */
udata.f = f;
@@ -2219,9 +2216,9 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
/* Set the ring type in the API context. In most cases, we will
* need H5AC_RING_RDFSM, so initially set the ring in
@@ -2262,7 +2259,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
if (!f->shared->fs_man[type] && H5F_addr_defined(f->shared->fs_addr[type])) {
if (H5MF__open_fstype(f, type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space")
- HDassert(f->shared->fs_man[type]);
+ assert(f->shared->fs_man[type]);
fs_started[type] = TRUE;
} /* end if */
@@ -2355,9 +2352,9 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
/* H5MF_tidy_self_referential_fsm_hack() will fail if any self
* referential FSM is opened prior to the call to it. Thus call
@@ -2415,7 +2412,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
if (!f->shared->fs_man[ty] && H5F_addr_defined(f->shared->fs_addr[ty])) {
if (H5MF__open_fstype(f, ty) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't open the free space manager")
- HDassert(f->shared->fs_man[ty]);
+ assert(f->shared->fs_man[ty]);
fs_started = TRUE;
} /* end if */
@@ -2498,10 +2495,10 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(sect_udata);
- HDassert(nums);
- HDassert(fspace);
+ assert(f);
+ assert(sect_udata);
+ assert(nums);
+ assert(fspace);
/* Query how many sections of this type */
if (H5FS_sect_stats(fspace, NULL, &hnums) < 0)
@@ -2636,13 +2633,13 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(fsm_settled);
+ assert(f);
+ assert(f->shared);
+ assert(fsm_settled);
/* Initialize structs */
- HDmemset(&fsinfo, 0, sizeof(fsinfo));
- HDmemset(&fs_stat, 0, sizeof(fs_stat));
+ memset(&fsinfo, 0, sizeof(fsinfo));
+ memset(&fs_stat, 0, sizeof(fs_stat));
/*
* Only need to settle things if we are persisting free space and
@@ -2653,19 +2650,19 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
hbool_t fsm_visited[H5F_MEM_PAGE_NTYPES]; /* State of FSM */
/* Sanity check */
- HDassert(f->shared->sblock);
+ assert(f->shared->sblock);
/* should only be called if file is opened R/W */
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
/* shouldn't be called unless we have a superblock supporting the
* superblock extension.
*/
- HDassert(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ assert(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2);
/* Initialize fsm_opened and fsm_visited */
- HDmemset(fsm_opened, 0, sizeof(fsm_opened));
- HDmemset(fsm_visited, 0, sizeof(fsm_visited));
+ memset(fsm_opened, 0, sizeof(fsm_opened));
+ memset(fsm_visited, 0, sizeof(fsm_visited));
/* 1) Reduce the EOA to the extent possible. */
@@ -2733,15 +2730,15 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
H5MF__alloc_to_fs_type(f->shared, mem_type, alloc_size, &fsm_type);
if (pass_count == 0) { /* this is the first pass */
- HDassert(fsm_type > H5F_MEM_PAGE_DEFAULT);
- HDassert(fsm_type < H5F_MEM_PAGE_LARGE_SUPER);
+ assert(fsm_type > H5F_MEM_PAGE_DEFAULT);
+ assert(fsm_type < H5F_MEM_PAGE_LARGE_SUPER);
} /* end if */
else if (H5F_PAGED_AGGR(f)) { /* page alloc active */
- HDassert(fsm_type >= H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(fsm_type < H5F_MEM_PAGE_NTYPES);
+ assert(fsm_type >= H5F_MEM_PAGE_LARGE_SUPER);
+ assert(fsm_type < H5F_MEM_PAGE_NTYPES);
} /* end else-if */
else /* paged allocation disabled -- should be unreachable */
- HDassert(FALSE);
+ assert(FALSE);
if (!fsm_visited[fsm_type]) {
fsm_visited[fsm_type] = TRUE;
@@ -2753,7 +2750,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (NULL == f->shared->fs_man[fsm_type]) {
if (H5F_addr_defined(f->shared->fs_addr[fsm_type])) {
/* Sanity check */
- HDassert(fsm_opened[fsm_type] == FALSE);
+ assert(fsm_opened[fsm_type] == FALSE);
if (H5MF__open_fstype(f, fsm_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL,
@@ -2879,15 +2876,15 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
H5MF__alloc_to_fs_type(f->shared, mem_type, alloc_size, &fsm_type);
if (pass_count == 0) { /* this is the first pass */
- HDassert(fsm_type > H5F_MEM_PAGE_DEFAULT);
- HDassert(fsm_type < H5F_MEM_PAGE_LARGE_SUPER);
+ assert(fsm_type > H5F_MEM_PAGE_DEFAULT);
+ assert(fsm_type < H5F_MEM_PAGE_LARGE_SUPER);
} /* end if */
else if (H5F_PAGED_AGGR(f)) { /* page alloc active */
- HDassert(fsm_type >= H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(fsm_type < H5F_MEM_PAGE_NTYPES);
+ assert(fsm_type >= H5F_MEM_PAGE_LARGE_SUPER);
+ assert(fsm_type < H5F_MEM_PAGE_NTYPES);
} /* end else-if */
else /* paged allocation disabled -- should be unreachable */
- HDassert(FALSE);
+ assert(FALSE);
/* Test to see if we need to switch rings -- do so if required */
if (H5MF__fsm_type_is_self_referential(f->shared, fsm_type))
@@ -2915,7 +2912,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
*/
if (!H5MF__fsm_type_is_self_referential(f->shared, fsm_type)) {
/* The current ring should be H5AC_RING_RDFSM */
- HDassert(curr_ring == H5AC_RING_RDFSM);
+ assert(curr_ring == H5AC_RING_RDFSM);
/* Query free space manager info for this type */
if (H5FS_stat_info(f, f->shared->fs_man[fsm_type], &fs_stat) < 0)
@@ -2928,7 +2925,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
*/
if (fs_stat.serial_sect_count > 0) {
/* Sanity check */
- HDassert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.addr));
/* Allocate FSM header */
if (H5FS_alloc_hdr(f, f->shared->fs_man[fsm_type],
@@ -2937,8 +2934,8 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
"can't allocated free-space header")
/* Allocate FSM section info */
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
if (H5FS_alloc_sect(f, f->shared->fs_man[fsm_type]) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate free-space section info")
@@ -2949,18 +2946,18 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't get free-space info")
- HDassert(H5F_addr_defined(fs_stat.addr));
- HDassert(H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.serial_sect_count > 0);
- HDassert(fs_stat.alloc_sect_size > 0);
- HDassert(fs_stat.alloc_sect_size == fs_stat.sect_size);
+ assert(H5F_addr_defined(fs_stat.addr));
+ assert(H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.serial_sect_count > 0);
+ assert(fs_stat.alloc_sect_size > 0);
+ assert(fs_stat.alloc_sect_size == fs_stat.sect_size);
#endif /* NDEBUG */
} /* end if */
else {
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.serial_sect_count == 0);
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.serial_sect_count == 0);
+ assert(fs_stat.alloc_sect_size == 0);
} /* end else */
} /* end if */
} /* end if */
@@ -2978,7 +2975,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
/* verify that all opened FSMs were closed */
for (fsm_type = H5F_MEM_PAGE_SUPER; fsm_type < H5F_MEM_PAGE_NTYPES; fsm_type++)
- HDassert(!fsm_opened[fsm_type]);
+ assert(!fsm_opened[fsm_type]);
/* Indicate that the FSM was settled successfully */
*fsm_settled = TRUE;
@@ -3108,9 +3105,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(fsm_settled);
+ assert(f);
+ assert(f->shared);
+ assert(fsm_settled);
/*
* Only need to settle things if we are persisting free space and
@@ -3118,22 +3115,22 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
*/
if (f->shared->fs_persist && !H5F_NULL_FSM_ADDR(f)) {
/* Sanity check */
- HDassert(f->shared->lf);
+ assert(f->shared->lf);
/* should only be called if file is opened R/W */
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_FSPACE_HDR, (size_t)1, &sm_fshdr_fs_type);
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_FSPACE_SINFO, (size_t)1, &sm_fssinfo_fs_type);
- HDassert(sm_fshdr_fs_type > H5F_MEM_PAGE_DEFAULT);
- HDassert(sm_fshdr_fs_type < H5F_MEM_PAGE_LARGE_SUPER);
+ assert(sm_fshdr_fs_type > H5F_MEM_PAGE_DEFAULT);
+ assert(sm_fshdr_fs_type < H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(sm_fssinfo_fs_type > H5F_MEM_PAGE_DEFAULT);
- HDassert(sm_fssinfo_fs_type < H5F_MEM_PAGE_LARGE_SUPER);
+ assert(sm_fssinfo_fs_type > H5F_MEM_PAGE_DEFAULT);
+ assert(sm_fssinfo_fs_type < H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(!H5F_addr_defined(f->shared->fs_addr[sm_fshdr_fs_type]));
- HDassert(!H5F_addr_defined(f->shared->fs_addr[sm_fssinfo_fs_type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[sm_fshdr_fs_type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[sm_fssinfo_fs_type]));
/* Note that in most cases, sm_hdr_fspace will equal sm_sinfo_fspace. */
sm_hdr_fspace = f->shared->fs_man[sm_fshdr_fs_type];
@@ -3145,14 +3142,14 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_FSPACE_SINFO, f->shared->fs_page_size + 1,
&lg_fssinfo_fs_type);
- HDassert(lg_fshdr_fs_type >= H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(lg_fshdr_fs_type < H5F_MEM_PAGE_NTYPES);
+ assert(lg_fshdr_fs_type >= H5F_MEM_PAGE_LARGE_SUPER);
+ assert(lg_fshdr_fs_type < H5F_MEM_PAGE_NTYPES);
- HDassert(lg_fssinfo_fs_type >= H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(lg_fssinfo_fs_type < H5F_MEM_PAGE_NTYPES);
+ assert(lg_fssinfo_fs_type >= H5F_MEM_PAGE_LARGE_SUPER);
+ assert(lg_fssinfo_fs_type < H5F_MEM_PAGE_NTYPES);
- HDassert(!H5F_addr_defined(f->shared->fs_addr[lg_fshdr_fs_type]));
- HDassert(!H5F_addr_defined(f->shared->fs_addr[lg_fssinfo_fs_type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[lg_fshdr_fs_type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[lg_fssinfo_fs_type]));
/* Note that in most cases, lg_hdr_fspace will equal lg_sinfo_fspace. */
lg_hdr_fspace = f->shared->fs_man[lg_fshdr_fs_type];
@@ -3171,9 +3168,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (H5FS_stat_info(f, sm_hdr_fspace, &fs_stat) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info")
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
} /* end if */
/* Verify that sm_sinfo_fspace is floating if it exists and is distinct */
@@ -3182,9 +3179,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (H5FS_stat_info(f, sm_sinfo_fspace, &fs_stat) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info")
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
} /* end if */
if (H5F_PAGED_AGGR(f)) {
@@ -3194,9 +3191,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (H5FS_stat_info(f, lg_hdr_fspace, &fs_stat) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info (3)")
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
} /* end if */
/* Verify that lg_sinfo_fspace is floating if it
@@ -3207,9 +3204,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (H5FS_stat_info(f, lg_sinfo_fspace, &fs_stat) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info (4)")
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
} /* end if */
} /* end if */
}
@@ -3343,8 +3340,8 @@ H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_s
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(f_sh);
- HDassert(continue_alloc_fsm);
+ assert(f_sh);
+ assert(continue_alloc_fsm);
/* Check sm_hdr_fspace */
if (sm_hdr_fspace && sm_hdr_fspace->serial_sect_count > 0 && sm_hdr_fspace->sinfo)
@@ -3395,9 +3392,9 @@ H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f_sh);
- HDassert(fsm_type >= H5F_MEM_PAGE_DEFAULT);
- HDassert(fsm_type < H5F_MEM_PAGE_NTYPES);
+ assert(f_sh);
+ assert(fsm_type >= H5F_MEM_PAGE_DEFAULT);
+ assert(fsm_type < H5F_MEM_PAGE_NTYPES);
H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_HDR, (size_t)1, &sm_fshdr_fsm);
H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_SINFO, (size_t)1, &sm_fssinfo_fsm);
@@ -3448,8 +3445,8 @@ H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f_sh);
- HDassert(fspace);
+ assert(f_sh);
+ assert(fspace);
H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_HDR, (size_t)1, &sm_fshdr_fsm);
H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_SINFO, (size_t)1, &sm_fssinfo_fsm);
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index e8a5299..f5e4b34 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -91,14 +91,14 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
+ fprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_AGGR_DEBUG */
/* check arguments */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(size > 0);
/* Couldn't find anything from the free space manager, go allocate some */
if (alloc_type != H5FD_MEM_DRAW && alloc_type != H5FD_MEM_GHEAP) {
@@ -115,12 +115,12 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
} /* end else */
/* Sanity check for overlapping into file's temporary allocation space */
- HDassert(H5F_addr_le((ret_value + size), f->shared->tmp_addr));
+ assert(H5F_addr_le((ret_value + size), f->shared->tmp_addr));
done:
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
- size);
+ fprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
+ size);
#endif /* H5MF_AGGR_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
@@ -150,20 +150,20 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
FUNC_ENTER_PACKAGE
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size);
+ fprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size);
#endif /* H5MF_AGGR_DEBUG */
/* check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(other_aggr);
- HDassert(other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(other_aggr->feature_flag != aggr->feature_flag);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(other_aggr);
+ assert(other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(other_aggr->feature_flag != aggr->feature_flag);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Get the EOA for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
@@ -199,8 +199,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
H5FD_mem_t alloc_type, other_alloc_type; /* Current aggregator & 'other' aggregator types */
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: aggr = {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", __func__,
- aggr->addr, aggr->tot_size, aggr->size);
+ fprintf(stderr, "%s: aggr = {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", __func__,
+ aggr->addr, aggr->tot_size, aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Turn off alignment if allocation < threshold */
@@ -268,7 +268,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
/* Allocate another block */
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: Allocating block\n", __func__);
+ fprintf(stderr, "%s: Allocating block\n", __func__);
#endif /* H5MF_AGGR_DEBUG */
if (aggr_frag_size > (ext_size - size))
@@ -320,7 +320,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
* been allocated in an aligned manner if the aggregator
* block is larger than the threshold */
if (eoa_frag_size && !alignment) {
- HDassert(eoa_frag_addr + eoa_frag_size == new_space);
+ assert(eoa_frag_addr + eoa_frag_size == new_space);
aggr->addr = eoa_frag_addr;
aggr->size = aggr->alloc_size + eoa_frag_size;
aggr->tot_size = aggr->size;
@@ -380,15 +380,15 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
} /* end else */
/* Sanity check for overlapping into file's temporary allocation space */
- HDassert(H5F_addr_le((ret_value + size), f->shared->tmp_addr));
+ assert(H5F_addr_le((ret_value + size), f->shared->tmp_addr));
/* Post-condition sanity check */
if (H5F_ALIGNMENT(f) && size >= H5F_THRESHOLD(f))
- HDassert(!((ret_value + H5FD_get_base_addr(f->shared->lf)) % H5F_ALIGNMENT(f)));
+ assert(!((ret_value + H5FD_get_base_addr(f->shared->lf)) % H5F_ALIGNMENT(f)));
done:
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value);
+ fprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value);
#endif /* H5MF_AGGR_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF__aggr_alloc() */
@@ -426,10 +426,10 @@ done:
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Check if this aggregator is active */
if (f->shared->feature_flags & aggr->feature_flag) {
@@ -524,12 +524,12 @@ done:
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(sect);
- HDassert(shrink);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(sect);
+ assert(shrink);
/* Check if this aggregator is active */
if (f->shared->feature_flags & aggr->feature_flag) {
@@ -537,11 +537,11 @@ done:
if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr) ||
H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr)) {
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins aggr = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_can_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
- aggr->size);
+ fprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins aggr = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_can_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
+ aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Check if aggregator would get too large and should be absorbed into section */
if ((aggr->size + sect->sect_info.size) >= aggr->alloc_size)
@@ -578,37 +578,37 @@ done:
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(f->shared->feature_flags & aggr->feature_flag);
- HDassert(sect);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f->shared->feature_flags & aggr->feature_flag);
+ assert(sect);
/* Check if aggregator would get too large and should be absorbed into section */
if ((aggr->size + sect->sect_info.size) >= aggr->alloc_size && allow_sect_absorb) {
/* Check if the section adjoins the beginning or end of the aggregator */
if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) {
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of section = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr,
- sect->sect_info.size);
+ fprintf(stderr,
+ "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of section = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr,
+ sect->sect_info.size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb aggregator onto end of section */
sect->sect_info.size += aggr->size;
} /* end if */
else {
/* Sanity check */
- HDassert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
+ assert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of section = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr,
- sect->sect_info.size);
+ fprintf(stderr,
+ "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of section = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr,
+ sect->sect_info.size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb aggregator onto beginning of section */
sect->sect_info.addr -= aggr->size;
@@ -624,11 +624,11 @@ done:
/* Check if the section adjoins the beginning or end of the aggregator */
if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) {
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of aggr = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
- aggr->size);
+ fprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of aggr = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
+ aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb section onto front of aggregator */
aggr->addr -= sect->sect_info.size;
@@ -641,20 +641,20 @@ done:
} /* end if */
else {
/* Sanity check */
- HDassert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
+ assert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of aggr = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
- aggr->size);
+ fprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of aggr = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
+ aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb section onto end of aggregator */
aggr->size += sect->sect_info.size;
} /* end if */
/* Sanity check */
- HDassert(!allow_sect_absorb || (aggr->size < aggr->alloc_size));
+ assert(!allow_sect_absorb || (aggr->size < aggr->alloc_size));
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -678,10 +678,10 @@ done:
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Check if this aggregator is active */
if (f->shared->feature_flags & aggr->feature_flag) {
@@ -715,10 +715,10 @@ done:
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Set the type of memory in the file */
alloc_type = (aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA
@@ -734,8 +734,8 @@ done:
tmp_addr = aggr->addr;
tmp_size = aggr->size;
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: tmp_addr = %" PRIuHADDR ", tmp_size = %" PRIuHSIZE "\n", __func__,
- tmp_addr, tmp_size);
+ fprintf(stderr, "%s: tmp_addr = %" PRIuHADDR ", tmp_size = %" PRIuHSIZE "\n", __func__, tmp_addr,
+ tmp_size);
#endif /* H5MF_AGGR_DEBUG */
/* Reset aggregator block information */
@@ -780,9 +780,9 @@ done:
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
/* Retrieve metadata aggregator info, if available */
if (H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size) < 0)
@@ -840,10 +840,10 @@ done:
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Get the EOA for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
@@ -878,15 +878,15 @@ done:
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared->lf);
- HDassert(aggr);
- HDassert(H5F_addr_defined(aggr->addr));
- HDassert(aggr->size > 0);
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(f->shared->feature_flags & aggr->feature_flag);
+ assert(f);
+ assert(f->shared->lf);
+ assert(aggr);
+ assert(H5F_addr_defined(aggr->addr));
+ assert(aggr->size > 0);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f->shared->feature_flags & aggr->feature_flag);
/* Free the remaining space at EOA in the aggregator */
if (H5F__free(f, type, aggr->addr, aggr->size) < 0)
@@ -923,8 +923,8 @@ done:
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if ((ma_status = H5MF__aggr_can_shrink_eoa(f, H5FD_MEM_DEFAULT, &(f->shared->meta_aggr))) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats")
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index 09bf086..a8775f3 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -99,24 +99,24 @@ H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(udata);
+ assert(sect);
+ assert(udata);
/* Print generic section information */
- HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:",
- (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE
- ? "simple"
- : (sect->sect_info.type == H5MF_FSPACE_SECT_SMALL
- ? "small"
- : (sect->sect_info.type == H5MF_FSPACE_SECT_LARGE ? "large" : "unknown"))));
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
- "Section address:", sect->sect_info.addr);
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
- "Section size:", sect->sect_info.size);
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
- "End of section:", (haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1));
- HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section state:", (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
+ fprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:",
+ (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE
+ ? "simple"
+ : (sect->sect_info.type == H5MF_FSPACE_SECT_SMALL
+ ? "small"
+ : (sect->sect_info.type == H5MF_FSPACE_SECT_LARGE ? "large" : "unknown"))));
+ fprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
+ "Section address:", sect->sect_info.addr);
+ fprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
+ "Section size:", sect->sect_info.size);
+ fprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
+ "End of section:", (haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1));
+ fprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
+ "Section state:", (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
/* Dump section-specific debugging information */
if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) <
@@ -150,10 +150,10 @@ H5MF_sects_debug(H5F_t *f, haddr_t fs_addr, FILE *stream, int indent, int fwidth
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
for (type = H5F_MEM_PAGE_DEFAULT; type < H5F_MEM_PAGE_NTYPES; type++)
if (H5F_addr_eq(f->shared->fs_addr[type], fs_addr)) {
@@ -209,20 +209,20 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Dumping file free space sections\n", __func__);
+ fprintf(stderr, "%s: Dumping file free space sections\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(stream);
+ assert(f);
+ assert(stream);
/* Retrieve the 'eoa' for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", __func__, eoa);
+ fprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", __func__, eoa);
#endif /* H5MF_ALLOC_DEBUG */
if (H5F_PAGED_AGGR(f)) { /* File space paging */
@@ -230,10 +230,10 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
for (ptype = H5F_MEM_PAGE_META; ptype < H5F_MEM_PAGE_NTYPES; ptype++) {
/* Print header for type */
- HDfprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)ptype);
+ fprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)ptype);
/* Print header for sections */
- HDfprintf(stream, "%*sSections:\n", indent + 3, "");
+ fprintf(stream, "%*sSections:\n", indent + 3, "");
/* If there is a free space manager for this type, iterate over them */
if (f->shared->fs_man[ptype]) {
@@ -251,7 +251,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
} /* end if */
else
/* No sections of this type */
- HDfprintf(stream, "%*s<none>\n", indent + 6, "");
+ fprintf(stream, "%*s<none>\n", indent + 6, "");
} /* end for */
} /* end if */
else { /* not file space paging */
@@ -264,34 +264,33 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
/* Retrieve metadata aggregator info, if available */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr,
- "%s: ma_addr = %" PRIuHADDR ", ma_size = %" PRIuHSIZE ", end of ma = %" PRIuHADDR "\n",
- __func__, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
+ fprintf(stderr,
+ "%s: ma_addr = %" PRIuHADDR ", ma_size = %" PRIuHSIZE ", end of ma = %" PRIuHADDR "\n",
+ __func__, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Retrieve 'small data' aggregator info, if available */
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr,
- "%s: sda_addr = %" PRIuHADDR ", sda_size = %" PRIuHSIZE ", end of sda = %" PRIuHADDR "\n",
- __func__, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
+ fprintf(stderr,
+ "%s: sda_addr = %" PRIuHADDR ", sda_size = %" PRIuHSIZE ", end of sda = %" PRIuHADDR "\n",
+ __func__, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Iterate over all the free space types that have managers and dump each free list's space */
for (atype = H5FD_MEM_DEFAULT; atype < H5FD_MEM_NTYPES; atype++) {
/* Print header for type */
- HDfprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)atype);
+ fprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)atype);
/* Check for this type being mapped to another type */
if (H5FD_MEM_DEFAULT == f->shared->fs_type_map[atype] || atype == f->shared->fs_type_map[atype]) {
/* Retrieve the 'eoa' for this file memory type */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, atype)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
- "eoa:", eoa);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), "eoa:", eoa);
/* Print header for sections */
- HDfprintf(stream, "%*sSections:\n", indent + 3, "");
+ fprintf(stream, "%*sSections:\n", indent + 3, "");
/* If there is a free space manager for this type, iterate over them */
if (f->shared->fs_man[atype]) {
@@ -308,16 +307,16 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space")
} /* end if */
else /* No sections of this type */
- HDfprintf(stream, "%*s<none>\n", indent + 6, "");
+ fprintf(stream, "%*s<none>\n", indent + 6, "");
} /* end if */
else
- HDfprintf(stream, "%*sMapped to type = %u\n", indent, "",
- (unsigned)f->shared->fs_type_map[atype]);
+ fprintf(stream, "%*sMapped to type = %u\n", indent, "",
+ (unsigned)f->shared->fs_type_map[atype]);
} /* end for */
} /* end else */
done:
- HDfprintf(stderr, "%s: Done dumping file free space sections\n", __func__);
+ fprintf(stderr, "%s: Done dumping file free space sections\n", __func__);
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5MF__sects_dump() */
#endif /* H5MF_ALLOC_DEBUG_DUMP */
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index 1e30fbc..c1210e9 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -193,7 +193,7 @@ H5MF__sect_new(unsigned ctype, haddr_t sect_off, hsize_t sect_size)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect_size);
+ assert(sect_size);
/* Create free space section node */
if (NULL == (sect = H5FL_MALLOC(H5MF_free_section_t)))
@@ -236,7 +236,7 @@ H5MF__sect_free(H5FS_section_info_t *_sect)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Release the section */
sect = H5FL_FREE(H5MF_free_section_t, sect);
@@ -267,9 +267,9 @@ H5MF__sect_deserialize(const H5FS_section_class_t *cls, const uint8_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(H5F_addr_defined(sect_addr));
- HDassert(sect_size);
+ assert(cls);
+ assert(H5F_addr_defined(sect_addr));
+ assert(sect_size);
/* Create free space section for block */
if (NULL == (sect = H5MF__sect_new(cls->type, sect_addr, sect_size)))
@@ -309,7 +309,7 @@ H5MF__sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5FS_sect
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5MF__sect_valid() */
@@ -376,10 +376,10 @@ H5MF__sect_simple_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
@@ -413,11 +413,11 @@ H5MF__sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
+ assert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -455,9 +455,9 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(udata);
- HDassert(udata->f);
+ assert(sect);
+ assert(udata);
+ assert(udata->f);
/* Retrieve the end of the file's address space */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(udata->f, udata->alloc_type)))
@@ -471,9 +471,8 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
- __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
+ fprintf(stderr, "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -496,9 +495,8 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->meta_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins metadata aggregator\n",
- __func__, sect->sect_info.addr, sect->sect_info.size);
+ fprintf(stderr, "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins metadata aggregator\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -518,9 +516,9 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->sdata_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins small data aggregator\n",
- __func__, sect->sect_info.addr, sect->sect_info.size);
+ fprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins small data aggregator\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -559,14 +557,14 @@ H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(udata);
- HDassert(udata->f);
+ assert(sect);
+ assert(udata);
+ assert(udata->f);
/* Check for shrinking file */
if (H5MF_SHRINK_EOA == udata->shrink) {
/* Sanity check */
- HDassert(H5F_INTENT(udata->f) & H5F_ACC_RDWR);
+ assert(H5F_INTENT(udata->f) & H5F_ACC_RDWR);
/* Release section's space at EOA */
if (H5F__free(udata->f, udata->alloc_type, (*sect)->sect_info.addr, (*sect)->sect_info.size) < 0)
@@ -574,7 +572,7 @@ H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata)
} /* end if */
else {
/* Sanity check */
- HDassert(udata->aggr);
+ assert(udata->aggr);
/* Absorb the section into the aggregator or vice versa */
if (H5MF__aggr_absorb(udata->f, udata->aggr, *sect, udata->allow_sect_absorb) < 0)
@@ -627,8 +625,8 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Entering, section {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
- (*sect)->sect_info.addr, (*sect)->sect_info.size);
+ fprintf(stderr, "%s: Entering, section {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
+ (*sect)->sect_info.addr, (*sect)->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Do not adjust the section raw data or global heap data */
@@ -648,15 +646,15 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
*flags &= (unsigned)~H5FS_ADD_RETURNED_SPACE;
*flags |= H5FS_PAGE_END_NO_ADD;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section is dropped\n", __func__);
+ fprintf(stderr, "%s: section is dropped\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
/* Adjust the section if it is not at page end but its size + prem is at page end */
else if (prem <= H5F_PGEND_META_THRES(udata->f)) {
(*sect)->sect_info.size += prem;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section is adjusted {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
- (*sect)->sect_info.addr, (*sect)->sect_info.size);
+ fprintf(stderr, "%s: section is adjusted {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
+ (*sect)->sect_info.addr, (*sect)->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -690,10 +688,10 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
@@ -704,7 +702,7 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
ret_value = FALSE;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
FUNC_LEAVE_NOAPI(ret_value)
@@ -737,11 +735,11 @@ H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SMALL);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_SMALL);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SMALL);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5MF_FSPACE_SECT_SMALL);
+ assert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -800,15 +798,15 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
FUNC_LEAVE_NOAPI(ret_value)
@@ -838,11 +836,11 @@ H5MF__sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_LARGE);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_LARGE);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_LARGE);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5MF_FSPACE_SECT_LARGE);
+ assert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -879,10 +877,10 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(sect->sect_info.type == H5MF_FSPACE_SECT_LARGE);
- HDassert(udata);
- HDassert(udata->f);
+ assert(sect);
+ assert(sect->sect_info.type == H5MF_FSPACE_SECT_LARGE);
+ assert(udata);
+ assert(udata->f);
/* Retrieve the end of the file's address space */
if (HADDR_UNDEF == (eoa = H5FD_get_eoa(udata->f->shared->lf, udata->alloc_type)))
@@ -896,9 +894,8 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
- __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
+ fprintf(stderr, "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -932,13 +929,13 @@ H5MF__sect_large_shrink(H5FS_section_info_t **_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert((*sect)->sect_info.type == H5MF_FSPACE_SECT_LARGE);
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->shrink == H5MF_SHRINK_EOA);
- HDassert(H5F_INTENT(udata->f) & H5F_ACC_RDWR);
- HDassert(H5F_PAGED_AGGR(udata->f));
+ assert(sect);
+ assert((*sect)->sect_info.type == H5MF_FSPACE_SECT_LARGE);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->shrink == H5MF_SHRINK_EOA);
+ assert(H5F_INTENT(udata->f) & H5F_ACC_RDWR);
+ assert(H5F_PAGED_AGGR(udata->f));
/* Calculate possible mis-aligned fragment */
H5MF_EOA_MISALIGN(udata->f, (*sect)->sect_info.addr, udata->f->shared->fs_page_size, frag_size);
diff --git a/src/H5MM.c b/src/H5MM.c
index aa4c6ce..d45c1c3 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -77,7 +77,7 @@ H5MM_malloc(size_t size)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- ret_value = HDmalloc(size);
+ ret_value = malloc(size);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_malloc() */
@@ -106,7 +106,7 @@ H5MM_calloc(size_t size)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- ret_value = HDcalloc(1, size);
+ ret_value = calloc(1, size);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_calloc() */
@@ -141,7 +141,7 @@ H5MM_realloc(void *mem, size_t size)
/* Not defined in the standard, return NULL */
ret_value = NULL;
else {
- ret_value = HDrealloc(mem, size);
+ ret_value = realloc(mem, size);
/* Some platforms do not return NULL if size is zero. */
if (0 == size)
@@ -255,7 +255,7 @@ H5MM_xfree(void *mem)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDfree(mem);
+ free(mem);
FUNC_LEAVE_NOAPI(NULL)
} /* end H5MM_xfree() */
@@ -301,14 +301,14 @@ H5MM_memcpy(void *dest, const void *src, size_t n)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(dest);
- HDassert(src);
+ assert(dest);
+ assert(src);
/* Check for buffer overlap */
- HDassert((char *)dest >= (const char *)src + n || (const char *)src >= (char *)dest + n);
+ assert((char *)dest >= (const char *)src + n || (const char *)src >= (char *)dest + n);
/* Copy */
- ret = HDmemcpy(dest, src, n);
+ ret = memcpy(dest, src, n);
FUNC_LEAVE_NOAPI(ret)
diff --git a/src/H5O.c b/src/H5O.c
index c92f4ae..b3b869d 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -2235,7 +2235,7 @@ H5O__are_mdc_flushes_disabled(const H5O_loc_t *oloc, hbool_t *are_disabled)
FUNC_ENTER_PACKAGE
- HDassert(are_disabled);
+ assert(are_disabled);
if (H5AC_cork(oloc->file, oloc->addr, H5AC__GET_CORKED, are_disabled) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve object's cork status");
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index f2ce582..178bfc8 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -100,8 +100,8 @@ H5O__ainfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
sizeof_addr = H5F_sizeof_addr(f);
@@ -186,9 +186,9 @@ H5O__ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(ainfo);
+ assert(f);
+ assert(p);
+ assert(ainfo);
/* Message version */
*p++ = H5O_AINFO_VERSION;
@@ -212,7 +212,7 @@ H5O__ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
if (ainfo->index_corder)
H5F_addr_encode(f, &p, ainfo->corder_bt2_addr);
else
- HDassert(!H5F_addr_defined(ainfo->corder_bt2_addr));
+ assert(!H5F_addr_defined(ainfo->corder_bt2_addr));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__ainfo_encode() */
@@ -241,7 +241,7 @@ H5O__ainfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(ainfo);
+ assert(ainfo);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_ainfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -309,7 +309,7 @@ H5O__ainfo_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_ainfo_t, mesg);
@@ -339,9 +339,9 @@ H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(ainfo);
- HDassert(open_oh);
+ assert(f);
+ assert(ainfo);
+ assert(open_oh);
/* If the object is using "dense" attribute storage, delete it */
if (H5F_addr_defined(ainfo->fheap_addr))
@@ -374,8 +374,8 @@ H5O__ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUS
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(deleted);
- HDassert(cpy_info);
+ assert(deleted);
+ assert(cpy_info);
/* If we are not copying attributes into the destination file, indicate
* that this message should be deleted.
@@ -411,11 +411,11 @@ H5O__ainfo_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, void *mesg_src, H5F_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(ainfo_src);
- HDassert(file_dst);
- HDassert(cpy_info);
- HDassert(!cpy_info->copy_without_attr);
+ assert(file_src);
+ assert(ainfo_src);
+ assert(file_dst);
+ assert(cpy_info);
+ assert(!cpy_info->copy_without_attr);
/* Allocate space for the destination message */
if (NULL == (ainfo_dst = H5FL_MALLOC(H5O_ainfo_t)))
@@ -473,7 +473,7 @@ H5O__ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_l
FUNC_ENTER_PACKAGE
- HDassert(ainfo_src);
+ assert(ainfo_src);
if (H5F_addr_defined(ainfo_src->fheap_addr))
if (H5A__dense_post_copy_file_all(src_oloc, ainfo_src, dst_oloc, (H5O_ainfo_t *)mesg_dst, cpy_info) <
@@ -504,25 +504,25 @@ H5O__ainfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(ainfo);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of attributes:", ainfo->nattrs);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Track creation order of attributes:", ainfo->track_corder ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Index creation order of attributes:", ainfo->index_corder ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. creation index value:", (unsigned)ainfo->max_crt_idx);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' attribute storage fractal heap address:", ainfo->fheap_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr);
+ assert(f);
+ assert(ainfo);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of attributes:", ainfo->nattrs);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Track creation order of attributes:", ainfo->track_corder ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Index creation order of attributes:", ainfo->index_corder ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max. creation index value:", (unsigned)ainfo->max_crt_idx);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' attribute storage fractal heap address:", ainfo->fheap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__ainfo_debug() */
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 8484678..8b15ee1 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -108,11 +108,11 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(oh->version > H5O_VERSION_1);
- HDassert(chk_dirtied);
- HDassert(new_gap_loc);
- HDassert(new_gap_size);
+ assert(oh);
+ assert(oh->version > H5O_VERSION_1);
+ assert(chk_dirtied);
+ assert(new_gap_loc);
+ assert(new_gap_size);
#ifndef NDEBUG
if (chunkno > 0) {
@@ -124,7 +124,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
"unable to check metadata cache status for object header chunk proxy")
/* Make certain that object header is protected */
- HDassert(chk_proxy_status & H5AC_ES__IS_PROTECTED);
+ assert(chk_proxy_status & H5AC_ES__IS_PROTECTED);
} /* end if */
#endif /* NDEBUG */
@@ -135,7 +135,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
/* (a null message that's not the one we are eliminating) */
if (H5O_NULL_ID == oh->mesg[u].type->id && oh->mesg[u].chunkno == chunkno && u != idx) {
/* Sanity check - chunks with null messages shouldn't have a gap */
- HDassert(oh->chunk[chunkno].gap == 0);
+ assert(oh->chunk[chunkno].gap == 0);
/* Eliminate the gap in the chunk */
if (H5O__eliminate_gap(oh, chk_dirtied, &oh->mesg[u], new_gap_loc, new_gap_size) < 0)
@@ -184,7 +184,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
/* Zero out new null message's raw data */
if (null_msg->raw_size)
- HDmemset(null_msg->raw, 0, null_msg->raw_size);
+ memset(null_msg->raw, 0, null_msg->raw_size);
/* Mark message as dirty */
null_msg->dirty = TRUE;
@@ -231,12 +231,12 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *g
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(oh);
- HDassert(oh->version > H5O_VERSION_1);
- HDassert(chk_dirtied);
- HDassert(mesg);
- HDassert(gap_loc);
- HDassert(gap_size);
+ assert(oh);
+ assert(oh->version > H5O_VERSION_1);
+ assert(chk_dirtied);
+ assert(mesg);
+ assert(gap_loc);
+ assert(gap_size);
/* Check if the null message is before or after the gap produced */
null_before_gap = (hbool_t)(mesg->raw < gap_loc);
@@ -291,7 +291,7 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *g
} /* end if */
/* Zero out addition to null message */
- HDmemset(mesg->raw + mesg->raw_size, 0, gap_size);
+ memset(mesg->raw + mesg->raw_size, 0, gap_size);
/* Adjust size of null message */
mesg->raw_size += gap_size;
@@ -331,9 +331,9 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(new_type);
- HDassert(new_size);
+ assert(oh);
+ assert(new_type);
+ assert(new_size);
/* Point to null message to allocate out of */
alloc_msg = &oh->mesg[null_idx];
@@ -439,7 +439,7 @@ H5O__alloc_msgs(H5O_t *oh, size_t min_alloc)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
+ assert(oh);
/* Initialize number of messages information */
old_alloc = oh->alloc_nmesgs;
@@ -454,7 +454,7 @@ H5O__alloc_msgs(H5O_t *oh, size_t min_alloc)
oh->mesg = new_mesg;
/* Set new object header info to zeros */
- HDmemset(&oh->mesg[old_alloc], 0, (oh->alloc_nmesgs - old_alloc) * sizeof(H5O_mesg_t));
+ memset(&oh->mesg[old_alloc], 0, (oh->alloc_nmesgs - old_alloc) * sizeof(H5O_mesg_t));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -509,12 +509,12 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f != NULL);
- HDassert(oh != NULL);
- HDassert(chunkno < oh->nchunks);
- HDassert(size > 0);
- HDassert(msg_idx != NULL);
- HDassert(H5F_addr_defined(oh->chunk[chunkno].addr));
+ assert(f != NULL);
+ assert(oh != NULL);
+ assert(chunkno < oh->nchunks);
+ assert(size > 0);
+ assert(msg_idx != NULL);
+ assert(H5F_addr_defined(oh->chunk[chunkno].addr));
/* Test to see if the specified chunk ends with a null messages.
* If successful, set the index of the null message in extend_msg.
@@ -535,7 +535,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
/* If we can extend an existing null message, adjust the delta appropriately */
if (extended_msg) {
- HDassert(oh->chunk[chunkno].gap == 0);
+ assert(oh->chunk[chunkno].gap == 0);
delta = aligned_size - oh->mesg[extend_msg].raw_size;
} /* end if */
else
@@ -547,7 +547,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
uint64_t chunk0_size; /* Size of chunk 0's data */
size_t orig_prfx_size = (size_t)1 << (oh->flags & H5O_HDR_CHUNK0_SIZE); /* Original prefix size */
- HDassert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
+ assert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
/* Check for moving to a 8-byte size encoding */
@@ -631,7 +631,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
oh->chunk[chunkno].gap = 0;
/* Wipe new space for chunk */
- HDmemset(oh->chunk[chunkno].image + old_size, 0, oh->chunk[chunkno].size - old_size);
+ memset(oh->chunk[chunkno].image + old_size, 0, oh->chunk[chunkno].size - old_size);
/* Move chunk 0 data up if the size flags changed */
if (adjust_size_flags)
@@ -659,7 +659,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Adjust size in continuation message */
- HDassert(((H5O_cont_t *)(oh->mesg[u].native))->size == old_size);
+ assert(((H5O_cont_t *)(oh->mesg[u].native))->size == old_size);
((H5O_cont_t *)(oh->mesg[u].native))->size = oh->chunk[chunkno].size;
/* Flag continuation message as dirty */
@@ -725,11 +725,11 @@ H5O__alloc_find_best_nonnull(const H5F_t *f, const H5O_t *oh, size_t *size, H5O_
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(oh);
- HDassert(size);
- HDassert(*size > 0);
- HDassert(found_msg);
+ assert(f);
+ assert(oh);
+ assert(size);
+ assert(*size > 0);
+ assert(found_msg);
/*
* Find the smallest message that could be moved to make room for the
@@ -881,10 +881,10 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(found_msg);
- HDassert(new_idx);
+ assert(f);
+ assert(oh);
+ assert(found_msg);
+ assert(new_idx);
/*
* The total chunk size must include the requested space plus enough
@@ -892,7 +892,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
* aligned properly.
*/
size = MAX(H5O_MIN_SIZE, size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
- HDassert(size == H5O_ALIGN_OH(oh, size));
+ assert(size == H5O_ALIGN_OH(oh, size));
/*
* The total chunk size must include enough space for the checksum
@@ -966,7 +966,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
oh->nmesgs--;
} /* end if */
else {
- HDassert(curr_msg->type->id != H5O_CONT_ID);
+ assert(curr_msg->type->id != H5O_CONT_ID);
/* Copy the raw data */
H5MM_memcpy(p, curr_msg->raw - (size_t)H5O_SIZEOF_MSGHDR_OH(oh),
@@ -997,7 +997,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
(size_t)H5O_SIZEOF_MSGHDR_OH(oh);
null_msg->chunkno = chunkno - 1;
- HDassert(null_msg->raw_size >= cont_size);
+ assert(null_msg->raw_size >= cont_size);
/* Remove any gap in the chunk */
oh->chunk[chunkno - 1].gap = 0;
@@ -1040,7 +1040,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
/* Add any available space after the message to move to the new null message */
if (found_msg->gap_size > 0) {
/* Absorb a gap after the moved message */
- HDassert(oh->chunk[null_msg->chunkno].gap == found_msg->gap_size);
+ assert(oh->chunk[null_msg->chunkno].gap == found_msg->gap_size);
null_msg->raw_size += found_msg->gap_size;
oh->chunk[null_msg->chunkno].gap = 0;
} /* end if */
@@ -1049,8 +1049,8 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
&oh->mesg[found_msg->null_msgno]; /* Pointer to NULL message to eliminate */
/* Absorb a null message after the moved message */
- HDassert((null_msg->raw + null_msg->raw_size) ==
- (old_null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)));
+ assert((null_msg->raw + null_msg->raw_size) ==
+ (old_null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)));
null_msg->raw_size += found_msg->null_size;
/* Release any information/memory for message */
@@ -1155,8 +1155,8 @@ H5O__alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t *new_idx)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(size > 0);
+ assert(oh);
+ assert(size > 0);
size = H5O_ALIGN_OH(oh, size);
/* Find the smallest null message that could hold a continuation message */
@@ -1202,9 +1202,9 @@ H5O__alloc_find_best_null(const H5O_t *oh, size_t size, size_t *mesg_idx)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(oh);
- HDassert(size > 0);
- HDassert(mesg_idx);
+ assert(oh);
+ assert(size > 0);
+ assert(mesg_idx);
/* Find the smallest null message that could hold the new object header message */
found_null = -1;
@@ -1277,10 +1277,10 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(type);
- HDassert(mesg);
- HDassert(mesg_idx);
+ assert(oh);
+ assert(type);
+ assert(mesg);
+ assert(mesg_idx);
/* Compute the size needed to store the message in the object header */
raw_size = (type->raw_size)(f, FALSE, mesg);
@@ -1319,7 +1319,7 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s
if (H5O__alloc_new_chunk(f, oh, raw_size, &idx) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "unable to create a new object header data chunk")
} /* end if */
- HDassert(idx < oh->nmesgs);
+ assert(idx < oh->nmesgs);
/* Split the null message and point at continuation message */
if (H5O__alloc_null(f, oh, idx, type, NULL, aligned_size) < 0)
@@ -1359,9 +1359,9 @@ H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(mesg);
+ assert(f);
+ assert(oh);
+ assert(mesg);
/* Check if we should operate on the message */
if (adj_link)
@@ -1379,9 +1379,9 @@ H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link)
/* Change message type to nil and zero it */
mesg->type = H5O_MSG_NULL;
- HDassert(mesg->raw + mesg->raw_size <= (oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) -
- (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap));
- HDmemset(mesg->raw, 0, mesg->raw_size);
+ assert(mesg->raw + mesg->raw_size <= (oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap));
+ memset(mesg->raw, 0, mesg->raw_size);
/* Clear message flags */
mesg->flags = 0;
@@ -1433,8 +1433,8 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Get initial information */
cont_msg = &oh->mesg[cont_u];
@@ -1454,7 +1454,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
if (curr_msg->chunkno == deleted_chunkno) {
/* Find size of all non-null messages in the chunk pointed to by the continuation message */
if (curr_msg->type->id != H5O_NULL_ID) {
- HDassert(curr_msg->type->id != H5O_CONT_ID);
+ assert(curr_msg->type->id != H5O_CONT_ID);
nonnull_size += curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
} /* end if */
} /* end if */
@@ -1512,7 +1512,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
if (H5O__chunk_delete(f, oh, deleted_chunkno) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove chunk from cache")
- HDassert(move_start <= (move_end + gap_size));
+ assert(move_start <= (move_end + gap_size));
/* Check if there is space remaining in the continuation message */
/* (The remaining space can be gap or a null message) */
@@ -1605,7 +1605,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
+ assert(oh);
/* Loop until no messages packed */
/* (Double loop is not very efficient, but it would be some extra work to
@@ -1679,7 +1679,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
} /* end if */
} /* end for */
/* Should have been message after null message */
- HDassert(v < oh->nmesgs);
+ assert(v < oh->nmesgs);
} /* end if */
} /* end if */
else {
@@ -1729,8 +1729,8 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
/* The other chunks involved should never be
* chunk 0 */
- HDassert(curr_msg->chunkno > 0);
- HDassert(((H5O_cont_t *)(curr_msg->native))->chunkno > 0);
+ assert(curr_msg->chunkno > 0);
+ assert(((H5O_cont_t *)(curr_msg->native))->chunkno > 0);
/* Protect continuation message target chunk */
if (NULL == (cont_targ_chk_proxy = H5O__chunk_protect(
@@ -1743,9 +1743,9 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
if (cont_targ_chk_proxy->fd_parent) {
/* Remove flush dependency on old continuation
* message chunk */
- HDassert(cont_targ_chk_proxy);
- HDassert(curr_chk_proxy);
- HDassert((void *)curr_chk_proxy == cont_targ_chk_proxy->fd_parent);
+ assert(cont_targ_chk_proxy);
+ assert(curr_chk_proxy);
+ assert((void *)curr_chk_proxy == cont_targ_chk_proxy->fd_parent);
if (H5AC_destroy_flush_dependency(curr_chk_proxy, cont_targ_chk_proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNDEPEND, FAIL,
@@ -1757,12 +1757,11 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
/* Avoid (another) flush dependency on chunk 0 */
if (0 != null_msg->chunkno) {
/* Sanity checks */
- HDassert(null_chk_mdc_obj);
- HDassert(((H5C_cache_entry_t *)null_chk_mdc_obj)->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(((H5C_cache_entry_t *)null_chk_mdc_obj)->type);
- HDassert(((H5C_cache_entry_t *)null_chk_mdc_obj)->type->id ==
- H5AC_OHDR_CHK_ID);
+ assert(null_chk_mdc_obj);
+ assert(((H5C_cache_entry_t *)null_chk_mdc_obj)->magic ==
+ H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(((H5C_cache_entry_t *)null_chk_mdc_obj)->type);
+ assert(((H5C_cache_entry_t *)null_chk_mdc_obj)->type->id == H5AC_OHDR_CHK_ID);
/* Create flush dependency on new continuation
* message chunk */
@@ -1950,7 +1949,7 @@ done:
"unable to unprotect continuation message target object header chunk")
} /* end if */
else
- HDassert(!null_chk_proxy && !curr_chk_proxy && !cont_targ_chk_proxy);
+ assert(!null_chk_proxy && !curr_chk_proxy && !cont_targ_chk_proxy);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O__move_msgs_forward() */
@@ -1978,7 +1977,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh != NULL);
+ assert(oh != NULL);
/* Loop until no messages merged */
/* (Double loop is not very efficient, but it would be some extra work to add
@@ -1998,7 +1997,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
unsigned v; /* Local index variable */
/* Should be no gaps in chunk with null message */
- HDassert(oh->chunk[curr_msg->chunkno].gap == 0);
+ assert(oh->chunk[curr_msg->chunkno].gap == 0);
/* Loop over messages again, looking for null message in same chunk */
for (v = 0, curr_msg2 = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg2++) {
@@ -2126,7 +2125,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh != NULL);
+ assert(oh != NULL);
/* Loop until no chunks are freed */
do {
@@ -2166,7 +2165,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
((H5O_cont_t *)(cont_msg->native))->chunkno = w;
break;
} /* end if */
- HDassert(((H5O_cont_t *)(cont_msg->native))->chunkno > 0);
+ assert(((H5O_cont_t *)(cont_msg->native))->chunkno > 0);
} /* end if */
/* Check for correct chunk to delete */
@@ -2175,9 +2174,9 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
} /* end if */
} /* end for */
/* Must be a continuation message that points to chunk containing null message */
- HDassert(v < oh->nmesgs);
- HDassert(cont_msg);
- HDassert(((H5O_cont_t *)(cont_msg->native))->chunkno == null_msg->chunkno);
+ assert(v < oh->nmesgs);
+ assert(cont_msg);
+ assert(((H5O_cont_t *)(cont_msg->native))->chunkno == null_msg->chunkno);
/* Initialize information about null message */
null_msg_no = u;
@@ -2241,7 +2240,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
/* Adjust chunk # for messages in chunks after deleted chunk */
for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
/* Sanity check - there should be no messages in deleted chunk */
- HDassert(curr_msg->chunkno != deleted_chunkno);
+ assert(curr_msg->chunkno != deleted_chunkno);
/* Adjust chunk index for messages in later chunks */
if (curr_msg->chunkno > deleted_chunkno)
@@ -2263,7 +2262,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
((H5O_cont_t *)(curr_msg->native))->chunkno = w;
break;
} /* end if */
- HDassert(((H5O_cont_t *)(curr_msg->native))->chunkno > 0);
+ assert(((H5O_cont_t *)(curr_msg->native))->chunkno > 0);
} /* end if */
else {
/* Check for pointer to chunk after deleted chunk */
@@ -2314,7 +2313,7 @@ H5O__condense_header(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh != NULL);
+ assert(oh != NULL);
/* Loop until no changed to the object header messages & chunks */
do {
@@ -2385,8 +2384,8 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Protect chunk */
if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, chunkno)))
@@ -2437,7 +2436,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Check if the chunk is too small, extend if necessary */
total_msg_size = new_size - (size_t)(chunkno == 0 ? H5O_SIZEOF_HDR(oh) : H5O_SIZEOF_CHKHDR_OH(oh));
if (total_msg_size < min_chunk_size) {
- HDassert(oh->alloc_nmesgs > oh->nmesgs);
+ assert(oh->alloc_nmesgs > oh->nmesgs);
oh->nmesgs++;
/* Initialize new null message to make the chunk large enough */
@@ -2519,7 +2518,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
/* Adjust size of continuation message */
- HDassert(((H5O_cont_t *)(curr_msg->native))->size == old_size);
+ assert(((H5O_cont_t *)(curr_msg->native))->size == old_size);
((H5O_cont_t *)(curr_msg->native))->size = chunk->size;
/* Flag continuation message as dirty */
@@ -2531,7 +2530,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
} /* end if */
} /* end for */
- HDassert(new_size <= old_size);
+ assert(new_size <= old_size);
/* Resize the chunk in the cache */
if (H5O__chunk_resize(oh, chk_proxy) < 0)
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 1d48a78..f8ab53b 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -132,8 +132,8 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (attr = H5FL_CALLOC(H5A_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -332,9 +332,9 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(attr);
+ assert(f);
+ assert(p);
+ assert(attr);
/* Check whether datatype and dataspace are shared */
if ((is_type_shared = H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt)) < 0)
@@ -373,7 +373,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
H5MM_memcpy(p, attr->shared->name, name_len);
if (attr->shared->version < H5O_ATTR_VERSION_2) {
/* Pad to the correct number of bytes */
- HDmemset(p + name_len, 0, H5O_ALIGN_OLD(name_len) - name_len);
+ memset(p + name_len, 0, H5O_ALIGN_OLD(name_len) - name_len);
p += H5O_ALIGN_OLD(name_len);
} /* end if */
else
@@ -384,7 +384,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute datatype")
if (attr->shared->version < H5O_ATTR_VERSION_2) {
- HDmemset(p + attr->shared->dt_size, 0, H5O_ALIGN_OLD(attr->shared->dt_size) - attr->shared->dt_size);
+ memset(p + attr->shared->dt_size, 0, H5O_ALIGN_OLD(attr->shared->dt_size) - attr->shared->dt_size);
p += H5O_ALIGN_OLD(attr->shared->dt_size);
} /* end if */
else
@@ -395,7 +395,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute dataspace")
if (attr->shared->version < H5O_ATTR_VERSION_2) {
- HDmemset(p + attr->shared->ds_size, 0, H5O_ALIGN_OLD(attr->shared->ds_size) - attr->shared->ds_size);
+ memset(p + attr->shared->ds_size, 0, H5O_ALIGN_OLD(attr->shared->ds_size) - attr->shared->ds_size);
p += H5O_ALIGN_OLD(attr->shared->ds_size);
} /* end if */
else
@@ -405,7 +405,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
if (attr->shared->data)
H5MM_memcpy(p, attr->shared->data, attr->shared->data_size);
else
- HDmemset(p, 0, attr->shared->data_size);
+ memset(p, 0, attr->shared->data_size);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -434,7 +434,7 @@ H5O__attr_copy(const void *_src, void *_dst)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(_src);
+ assert(_src);
/* copy */
if (NULL == (ret_value = (H5A_t *)H5A__copy((H5A_t *)_dst, (const H5A_t *)_src)))
@@ -469,7 +469,7 @@ H5O__attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(attr);
+ assert(attr);
/* Common size information */
ret_value = 1 + /*version */
@@ -499,7 +499,7 @@ H5O__attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
attr->shared->ds_size + /*dataspace */
attr->shared->data_size; /*the data itself */
else
- HDassert(0 && "Bad attribute version");
+ assert(0 && "Bad attribute version");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__attr_size() */
@@ -545,7 +545,7 @@ H5O__attr_free(void *mesg)
FUNC_ENTER_PACKAGE
- HDassert(mesg);
+ assert(mesg);
if (H5A__close(attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "unable to close attribute object")
@@ -575,8 +575,8 @@ H5O__attr_delete(H5F_t *f, H5O_t *oh, void *_mesg)
FUNC_ENTER_NOAPI_NOINIT
/* check args */
- HDassert(f);
- HDassert(attr);
+ assert(f);
+ assert(attr);
/* Decrement reference count on datatype in file */
if ((H5O_MSG_DTYPE->del)(f, oh, attr->shared->dt) < 0)
@@ -612,8 +612,8 @@ H5O__attr_link(H5F_t *f, H5O_t *oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(attr);
+ assert(f);
+ assert(attr);
/* Re-share attribute's datatype and dataspace to increment their
* reference count if they're shared.
@@ -653,9 +653,9 @@ H5O__attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(deleted);
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(deleted);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
* the message version allowed by the destination file's high bound.
@@ -696,10 +696,10 @@ H5O__attr_copy_file(H5F_t *file_src, const H5O_msg_class_t H5_ATTR_UNUSED *mesg_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(native_src);
- HDassert(file_dst);
- HDassert(cpy_info);
- HDassert(!cpy_info->copy_without_attr);
+ assert(native_src);
+ assert(file_dst);
+ assert(cpy_info);
+ assert(!cpy_info->copy_without_attr);
/* Mark datatype as being on disk now. This step used to be done in a lower level
* by H5O_dtype_decode. But it has been moved up. Not an ideal place, but no better
@@ -765,8 +765,8 @@ H5O__attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(attr);
- HDassert(crt_idx);
+ assert(attr);
+ assert(crt_idx);
/* Get the attribute's creation index */
*crt_idx = attr->shared->crt_idx;
@@ -793,7 +793,7 @@ H5O__attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(attr);
+ assert(attr);
/* Set the creation index */
attr->shared->crt_idx = crt_idx;
@@ -830,12 +830,12 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Name:", mesg->shared->name);
+ fprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Name:", mesg->shared->name);
switch (mesg->shared->encoding) {
case H5T_CSET_ASCII:
s = "ASCII";
@@ -869,25 +869,25 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set of Name:", s);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Object opened:", mesg->obj_opened ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object:", mesg->oloc.addr);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set of Name:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Object opened:", mesg->obj_opened ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object:", mesg->oloc.addr);
/* Check for attribute creation order index on the attribute */
if (mesg->shared->crt_idx != H5O_MAX_CRT_ORDER_IDX)
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Creation Index:", (unsigned)mesg->shared->crt_idx);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Creation Index:", (unsigned)mesg->shared->crt_idx);
- HDfprintf(stream, "%*sDatatype...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Encoded Size:", (unsigned long)(mesg->shared->dt_size));
+ fprintf(stream, "%*sDatatype...\n", indent, "");
+ fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Encoded Size:", (unsigned long)(mesg->shared->dt_size));
if ((H5O_MSG_DTYPE->debug)(f, mesg->shared->dt, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display datatype message info")
- HDfprintf(stream, "%*sDataspace...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Encoded Size:", (unsigned long)(mesg->shared->ds_size));
+ fprintf(stream, "%*sDataspace...\n", indent, "");
+ fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Encoded Size:", (unsigned long)(mesg->shared->ds_size));
if (H5S_debug(f, mesg->shared->ds, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display dataspace message info")
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index e4f1c42..541fd05 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -164,12 +164,12 @@ H5O__attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_U
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->ainfo);
- HDassert(attr);
+ assert(oh);
+ assert(mesg);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->ainfo);
+ assert(attr);
/* Insert attribute into dense storage */
if (H5A__dense_insert(udata->f, udata->ainfo, attr) < 0)
@@ -210,8 +210,8 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- HDassert(loc);
- HDassert(attr);
+ assert(loc);
+ assert(attr);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -240,9 +240,9 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr)
} /* end if */
else {
/* Sanity check attribute info read in */
- HDassert(ainfo.nattrs > 0);
- HDassert(ainfo.track_corder == ((oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) > 0));
- HDassert(ainfo.index_corder == ((oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) > 0));
+ assert(ainfo.nattrs > 0);
+ assert(ainfo.track_corder == ((oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) > 0));
+ assert(ainfo.index_corder == ((oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) > 0));
} /* end else */
/* Check if switching to "dense" attribute storage is possible */
@@ -404,9 +404,9 @@ H5O__attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->attr);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->attr);
/* Check for correct attribute message to modify */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
@@ -452,8 +452,8 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -502,7 +502,7 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute: '%s'", name)
/* Get attribute opened from object header */
- HDassert(udata.attr);
+ assert(udata.attr);
opened_attr = udata.attr;
} /* end else */
@@ -547,8 +547,8 @@ H5O__attr_open_by_idx_cb(const H5A_t *attr, void *_ret_attr)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(attr);
- HDassert(ret_attr);
+ assert(attr);
+ assert(ret_attr);
/* Copy attribute information. Shared some attribute information. */
if (NULL == (*ret_attr = H5A__copy(NULL, attr)))
@@ -583,7 +583,7 @@ H5O__attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Build attribute operator info */
attr_op.op_type = H5A_ATTR_OP_LIB;
@@ -731,8 +731,8 @@ H5O__attr_update_shared(H5F_t *f, H5O_t *oh, H5A_t *attr, H5O_shared_t *update_s
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(attr);
+ assert(f);
+ assert(attr);
/* Extract shared message info from current attribute (for later use) */
if (H5O_set_shared(&sh_mesg, &(attr->sh_loc)) < 0)
@@ -805,9 +805,9 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->found);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->found);
/* Check for correct attribute message to modify */
if (0 == HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->attr->shared->name)) {
@@ -820,9 +820,9 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS
* The shared attribute structure will be different in that situation. SLU-2010/7/29 */
if (((H5A_t *)mesg->native)->shared != udata->attr->shared) {
/* Sanity check */
- HDassert(((H5A_t *)mesg->native)->shared->data);
- HDassert(udata->attr->shared->data);
- HDassert(((H5A_t *)mesg->native)->shared->data != udata->attr->shared->data);
+ assert(((H5A_t *)mesg->native)->shared->data);
+ assert(udata->attr->shared->data);
+ assert(((H5A_t *)mesg->native)->shared->data != udata->attr->shared->data);
/* (Needs to occur before updating the shared message, or the hash
* value on the old & new messages will be the same) */
@@ -885,8 +885,8 @@ H5O__attr_write(const H5O_loc_t *loc, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(attr);
+ assert(loc);
+ assert(attr);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -961,9 +961,9 @@ H5O__attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/,
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->found);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->found);
/* Check for existing attribute with new name */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->new_name) == 0) {
@@ -1007,9 +1007,9 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->found);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->found);
/* Find correct attribute message to rename */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->old_name) == 0) {
@@ -1045,7 +1045,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
} /* end if */
else {
/* Sanity check */
- HDassert(H5O_msg_is_shared(H5O_ATTR_ID, (H5A_t *)mesg->native) == FALSE);
+ assert(H5O_msg_is_shared(H5O_ATTR_ID, (H5A_t *)mesg->native) == FALSE);
/* Check for attribute message changing size */
if (HDstrlen(udata->new_name) != HDstrlen(udata->old_name) ||
@@ -1083,7 +1083,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
"unable to relocate renamed attribute in header")
/* Sanity check */
- HDassert(H5O_msg_is_shared(H5O_ATTR_ID, attr) == FALSE);
+ assert(H5O_msg_is_shared(H5O_ATTR_ID, attr) == FALSE);
/* Close the local copy of the attribute */
H5A__close(attr);
@@ -1130,9 +1130,9 @@ H5O__attr_rename(const H5O_loc_t *loc, const char *old_name, const char *new_nam
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(old_name);
- HDassert(new_name);
+ assert(loc);
+ assert(old_name);
+ assert(new_name);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1218,10 +1218,10 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, H5_index_t idx_type, H
FUNC_ENTER_NOAPI_NOINIT_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(attr_op);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(attr_op);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -1302,7 +1302,7 @@ H5O__attr_iterate(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsiz
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(attr_op);
+ assert(attr_op);
/* Look up location for location ID */
if (H5G_loc(loc_id, &loc) < 0)
@@ -1346,9 +1346,9 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(oh);
- HDassert(ainfo);
+ assert(loc);
+ assert(oh);
+ assert(ainfo);
/* Decrement the number of attributes on the object */
ainfo->nattrs--;
@@ -1466,9 +1466,9 @@ H5O__attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNU
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->found);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->found);
/* Check for correct attribute message to modify */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
@@ -1513,8 +1513,8 @@ H5O__attr_remove(const H5O_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1595,7 +1595,7 @@ H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1681,9 +1681,9 @@ H5O__attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(oh);
- HDassert(nattrs);
+ assert(f);
+ assert(oh);
+ assert(nattrs);
/* Check for attributes stored densely */
if (oh->version > H5O_VERSION_1) {
@@ -1737,8 +1737,8 @@ H5O__attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/, unsig
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
- HDassert(udata->exists && !*udata->exists);
+ assert(mesg);
+ assert(udata->exists && !*udata->exists);
/* Check for correct attribute message */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
@@ -1774,9 +1774,9 @@ H5O__attr_exists(const H5O_loc_t *loc, const char *name, hbool_t *attr_exists)
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(name);
- HDassert(attr_exists);
+ assert(loc);
+ assert(name);
+ assert(attr_exists);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -1840,9 +1840,9 @@ H5O__attr_bh_info(H5F_t *f, H5O_t *oh, H5_ih_info_t *bh_info)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(oh);
- HDassert(bh_info);
+ assert(f);
+ assert(oh);
+ assert(bh_info);
/* Attributes are only stored in fractal heap & indexed w/v2 B-tree in later versions */
if (oh->version > H5O_VERSION_1) {
diff --git a/src/H5Obogus.c b/src/H5Obogus.c
index 1b83ed1..20beaef 100644
--- a/src/H5Obogus.c
+++ b/src/H5Obogus.c
@@ -107,8 +107,8 @@ H5O__bogus_decode(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, unsigned H5_AT
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate the bogus message */
if (NULL == (mesg = (H5O_bogus_t *)H5MM_calloc(sizeof(H5O_bogus_t))))
@@ -151,9 +151,9 @@ H5O__bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* encode */
UINT32ENCODE(p, H5O_BOGUS_VALUE);
@@ -207,13 +207,13 @@ H5O__bogus_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s `%u'\n", indent, "", fwidth, "Bogus Value:", mesg->u);
+ fprintf(stream, "%*s%-*s `%u'\n", indent, "", fwidth, "Bogus Value:", mesg->u);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__bogus_debug() */
diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c
index c21b3b9..7b80de8 100644
--- a/src/H5Obtreek.c
+++ b/src/H5Obtreek.c
@@ -79,8 +79,8 @@ H5O__btreek_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -133,9 +133,9 @@ H5O__btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_share
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* Store version and non-default v1 B-tree 'K' values */
*p++ = H5O_BTREEK_VERSION;
@@ -170,7 +170,7 @@ H5O__btreek_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = (H5O_btreek_t *)H5MM_malloc(sizeof(H5O_btreek_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
@@ -209,7 +209,7 @@ H5O__btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_s
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
+ assert(f);
ret_value = 1 + /* Version number */
2 + /* Chunked storage internal B-tree 'K' value */
@@ -239,18 +239,18 @@ H5O__btreek_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Chunked storage internal B-tree 'K' value:", mesg->btree_k[H5B_CHUNK_ID]);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table node internal B-tree 'K' value:", mesg->btree_k[H5B_SNODE_ID]);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table node leaf 'K' value:", mesg->sym_leaf_k);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Chunked storage internal B-tree 'K' value:", mesg->btree_k[H5B_CHUNK_ID]);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Symbol table node internal B-tree 'K' value:", mesg->btree_k[H5B_SNODE_ID]);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Symbol table node leaf 'K' value:", mesg->sym_leaf_k);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__btreek_debug() */
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 66b092a..c893f04 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -153,7 +153,7 @@ H5O__cache_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
/* Set the image length size */
*image_len = H5O_SPEC_READ_SIZE;
@@ -177,17 +177,17 @@ H5O__cache_get_final_load_size(const void *image, size_t image_len, void *_udata
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
/* Deserialize the object header prefix */
if (H5O__prefix_deserialize((const uint8_t *)image, image_len, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "can't deserialize object header prefix")
/* Sanity check */
- HDassert(udata->oh);
+ assert(udata->oh);
/* Set the final size for the cache image */
*actual_len = udata->chunk0_size + (size_t)H5O_SIZEOF_HDR(udata->oh);
@@ -215,9 +215,9 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image);
- HDassert(udata);
- HDassert(udata->oh);
+ assert(image);
+ assert(udata);
+ assert(udata->oh);
/* There is no checksum for version 1 */
if (udata->oh->version != H5O_VERSION_1) {
@@ -229,9 +229,9 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
if (stored_chksum != computed_chksum) {
/* These fields are not deserialized yet in H5O__prefix_deserialize() */
- HDassert(udata->oh->chunk == NULL);
- HDassert(udata->oh->mesg == NULL);
- HDassert(udata->oh->proxy == NULL);
+ assert(udata->oh->chunk == NULL);
+ assert(udata->oh->mesg == NULL);
+ assert(udata->oh->proxy == NULL);
/* Indicate that udata->oh is to be freed later
in H5O__prefix_deserialize() */
@@ -240,7 +240,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
}
}
else
- HDassert(!(udata->common.file_intent & H5F_ACC_SWMR_WRITE));
+ assert(!(udata->common.file_intent & H5F_ACC_SWMR_WRITE));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__cache_verify_chksum() */
@@ -271,12 +271,12 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->common.f);
- HDassert(udata->common.cont_msg_info);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->common.f);
+ assert(udata->common.cont_msg_info);
+ assert(dirty);
/* Check for partially deserialized object header
*
@@ -288,7 +288,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
/* Deserialize the object header prefix */
if (H5O__prefix_deserialize((const uint8_t *)image, len, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't deserialize object header prefix")
- HDassert(udata->oh);
+ assert(udata->oh);
}
/* Retrieve partially deserialized object header from user data */
@@ -343,10 +343,10 @@ H5O__cache_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(oh);
- HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(oh->cache_info.type == H5AC_OHDR);
- HDassert(image_len);
+ assert(oh);
+ assert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(oh->cache_info.type == H5AC_OHDR);
+ assert(image_len);
/* Report the object header's prefix+first chunk length */
*image_len = oh->chunk[0].size;
@@ -372,12 +372,12 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(oh);
- HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(oh->cache_info.type == H5AC_OHDR);
- HDassert(oh->chunk[0].size == len);
+ assert(f);
+ assert(image);
+ assert(oh);
+ assert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(oh->cache_info.type == H5AC_OHDR);
+ assert(oh->chunk[0].size == len);
#ifdef H5O_DEBUG
H5O__assert(oh);
#endif /* H5O_DEBUG */
@@ -395,11 +395,11 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
if (oh->version > H5O_VERSION_1) {
uint64_t chunk0_size; /* Size of chunk 0's data */
- HDassert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
+ assert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
/* Verify magic number */
- HDassert(!HDmemcmp(chunk_image, H5O_HDR_MAGIC, H5_SIZEOF_MAGIC));
+ assert(!memcmp(chunk_image, H5O_HDR_MAGIC, H5_SIZEOF_MAGIC));
chunk_image += H5_SIZEOF_MAGIC;
/* Version */
@@ -425,18 +425,18 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
/* First chunk size */
switch (oh->flags & H5O_HDR_CHUNK0_SIZE) {
case 0: /* 1 byte size */
- HDassert(chunk0_size < 256);
+ assert(chunk0_size < 256);
*chunk_image++ = (uint8_t)chunk0_size;
break;
case 1: /* 2 byte size */
- HDassert(chunk0_size < 65536);
+ assert(chunk0_size < 65536);
UINT16ENCODE(chunk_image, chunk0_size);
break;
case 2: /* 4 byte size */
/* use <= 2**32 -1 to stay within 4 bytes integer range */
- HDassert(chunk0_size <= 4294967295UL);
+ assert(chunk0_size <= 4294967295UL);
UINT32ENCODE(chunk_image, chunk0_size);
break;
@@ -470,12 +470,12 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
UINT32ENCODE(chunk_image, (oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh)));
/* Zero to alignment */
- HDmemset(chunk_image, 0, (size_t)(H5O_SIZEOF_HDR(oh) - 12));
+ memset(chunk_image, 0, (size_t)(H5O_SIZEOF_HDR(oh) - 12));
chunk_image += (size_t)(H5O_SIZEOF_HDR(oh) - 12);
}
- HDassert((size_t)(chunk_image - oh->chunk[0].image) ==
- (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert((size_t)(chunk_image - oh->chunk[0].image) ==
+ (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
/* Serialize messages for this chunk */
if (H5O__chunk_serialize(f, oh, (unsigned)0) < 0)
@@ -507,14 +507,14 @@ H5O__cache_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(oh);
+ assert(oh);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
case H5AC_NOTIFY_ACTION_AFTER_LOAD:
if (oh->swmr_write) {
/* Sanity check */
- HDassert(oh->proxy);
+ assert(oh->proxy);
/* Register the object header as a parent of the virtual entry */
if (H5AC_proxy_entry_add_parent(oh->proxy, oh) < 0)
@@ -583,9 +583,9 @@ H5O__cache_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(oh);
- HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(oh->cache_info.type == H5AC_OHDR);
+ assert(oh);
+ assert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(oh->cache_info.type == H5AC_OHDR);
/* Destroy object header */
if (H5O__free(oh, FALSE) < 0)
@@ -612,9 +612,9 @@ H5O__cache_chk_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(udata);
- HDassert(udata->oh);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->oh);
+ assert(image_len);
/* Set the image length size */
*image_len = udata->size;
@@ -641,7 +641,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image);
+ assert(image);
/* There is no checksum for version 1 */
if (udata->oh->version != H5O_VERSION_1) {
@@ -678,11 +678,11 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->oh);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->oh);
+ assert(dirty);
/* Allocate space for the object header data structure */
if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
@@ -691,8 +691,8 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
/* Check if we are still decoding the object header */
/* (as opposed to bringing a piece of it back from the file) */
if (udata->decoding) {
- HDassert(udata->common.f);
- HDassert(udata->common.cont_msg_info);
+ assert(udata->common.f);
+ assert(udata->common.cont_msg_info);
/* Parse the chunk */
if (H5O__chunk_deserialize(udata->oh, udata->common.addr, udata->size, (const uint8_t *)image, len,
@@ -704,7 +704,7 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
}
else {
/* Sanity check */
- HDassert(udata->chunkno < udata->oh->nchunks);
+ assert(udata->chunkno < udata->oh->nchunks);
/* Set the chunk number for the chunk proxy */
chk_proxy->chunkno = udata->chunkno;
@@ -712,8 +712,8 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
/* Sanity check that the chunk representation we have in memory is
* the same as the one being brought in from disk.
*/
- HDassert(0 == HDmemcmp(image, udata->oh->chunk[chk_proxy->chunkno].image,
- udata->oh->chunk[chk_proxy->chunkno].size));
+ assert(0 == memcmp(image, udata->oh->chunk[chk_proxy->chunkno].image,
+ udata->oh->chunk[chk_proxy->chunkno].size));
}
/* Increment reference count of object header */
@@ -748,11 +748,11 @@ H5O__cache_chk_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(chk_proxy);
- HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
- HDassert(chk_proxy->oh);
- HDassert(image_len);
+ assert(chk_proxy);
+ assert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
+ assert(chk_proxy->oh);
+ assert(image_len);
*image_len = chk_proxy->oh->chunk[chk_proxy->chunkno].size;
@@ -778,13 +778,13 @@ H5O__cache_chk_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(chk_proxy);
- HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
- HDassert(chk_proxy->oh);
- HDassert(chk_proxy->oh->chunk[chk_proxy->chunkno].size == len);
+ assert(f);
+ assert(image);
+ assert(chk_proxy);
+ assert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
+ assert(chk_proxy->oh);
+ assert(chk_proxy->oh->chunk[chk_proxy->chunkno].size == len);
/* Serialize messages for this chunk */
if (H5O__chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0)
@@ -815,8 +815,8 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(chk_proxy);
- HDassert(chk_proxy->oh);
+ assert(chk_proxy);
+ assert(chk_proxy->oh);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
@@ -825,11 +825,11 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
/* Add flush dependency on chunk with continuation, if one exists */
if (chk_proxy->fd_parent) {
/* Sanity checks */
- HDassert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type);
- HDassert((((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_ID) ||
- (((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_CHK_ID));
+ assert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->magic ==
+ H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type);
+ assert((((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_ID) ||
+ (((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_CHK_ID));
/* Add flush dependency from chunk containing the continuation message
* that points to this chunk (either oh or another chunk proxy object)
@@ -847,7 +847,7 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
/* Add flush dependency on object header proxy, if proxy exists */
{
/* Sanity check */
- HDassert(chk_proxy->oh->proxy);
+ assert(chk_proxy->oh->proxy);
/* Register the object header chunk as a parent of the virtual entry */
if (H5AC_proxy_entry_add_parent(chk_proxy->oh->proxy, chk_proxy) < 0)
@@ -883,11 +883,11 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
/* Remove flush dependency on parent object header chunk, if one is set */
if (chk_proxy->fd_parent) {
/* Sanity checks */
- HDassert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type);
- HDassert((((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_ID) ||
- (((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_CHK_ID));
+ assert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->magic ==
+ H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type);
+ assert((((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_ID) ||
+ (((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_CHK_ID));
if (H5AC_destroy_flush_dependency(chk_proxy->fd_parent, chk_proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency")
@@ -934,9 +934,9 @@ H5O__cache_chk_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(chk_proxy);
- HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
+ assert(chk_proxy);
+ assert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
/* Destroy object header chunk proxy */
if (H5O__chunk_dest(chk_proxy) < 0)
@@ -963,8 +963,8 @@ H5O__add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont)
FUNC_ENTER_PACKAGE
- HDassert(cont_msg_info);
- HDassert(cont);
+ assert(cont_msg_info);
+ assert(cont);
/* Increase chunk array size, if necessary */
if (cont_msg_info->nmsgs >= cont_msg_info->alloc_nmsgs) {
@@ -1005,8 +1005,8 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate space for the new object header data structure */
if (NULL == (oh = H5FL_CALLOC(H5O_t)))
@@ -1020,7 +1020,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
/* (indicates version 2 or later) */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (!HDmemcmp(image, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ if (!memcmp(image, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/* Magic number (bounds checked above) */
image += H5_SIZEOF_MAGIC;
@@ -1165,7 +1165,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
*/
if (udata->free_oh) {
H5O_t *saved_oh = udata->oh;
- HDassert(udata->oh);
+ assert(udata->oh);
/* Save the object header for later use in 'deserialize' callback */
udata->oh = oh;
@@ -1212,12 +1212,12 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
FUNC_ENTER_PACKAGE
- HDassert(oh);
- HDassert(H5F_addr_defined(addr));
- HDassert(image);
- HDassert(len);
- HDassert(udata->f);
- HDassert(udata->cont_msg_info);
+ assert(oh);
+ assert(H5F_addr_defined(addr));
+ assert(image);
+ assert(len);
+ assert(udata->f);
+ assert(udata->cont_msg_info);
/* Increase chunk array size, if necessary */
if (oh->nchunks >= oh->alloc_nchunks) {
@@ -1266,7 +1266,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(chunk_image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (HDmemcmp(chunk_image, H5O_CHK_MAGIC, H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(chunk_image, H5O_CHK_MAGIC, H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "wrong object header chunk signature")
chunk_image += H5_SIZEOF_MAGIC;
}
@@ -1576,8 +1576,8 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Encode any dirty messages in this chunk */
for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
@@ -1591,11 +1591,11 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Sanity checks */
if (oh->version > H5O_VERSION_1)
/* Make certain the magic # is present */
- HDassert(!HDmemcmp(oh->chunk[chunkno].image, (chunkno == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC),
- H5_SIZEOF_MAGIC));
+ assert(!memcmp(oh->chunk[chunkno].image, (chunkno == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC),
+ H5_SIZEOF_MAGIC));
else
/* Gaps should never occur in version 1 of the format */
- HDassert(oh->chunk[chunkno].gap == 0);
+ assert(oh->chunk[chunkno].gap == 0);
/* Extra work, for later versions of the format */
if (oh->version > H5O_VERSION_1) {
@@ -1604,9 +1604,9 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Check for gap in chunk & zero it out */
if (oh->chunk[chunkno].gap)
- HDmemset((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
- (H5O_SIZEOF_CHKSUM + oh->chunk[chunkno].gap),
- 0, oh->chunk[chunkno].gap);
+ memset((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
+ (H5O_SIZEOF_CHKSUM + oh->chunk[chunkno].gap),
+ 0, oh->chunk[chunkno].gap);
/* Compute metadata checksum */
metadata_chksum =
diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c
index a06bebc..acc1bfc 100644
--- a/src/H5Ocache_image.c
+++ b/src/H5Ocache_image.c
@@ -93,8 +93,8 @@ H5O__mdci_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -145,9 +145,9 @@ H5O__mdci_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* encode */
*p++ = H5O_MDCI_VERSION_0;
@@ -181,7 +181,7 @@ H5O__mdci_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_mdci_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -245,7 +245,7 @@ H5O__mdci_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_mdci_t, mesg);
@@ -274,8 +274,8 @@ H5O__mdci_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
/* Free file space for cache image */
if (H5F_addr_defined(mesg->addr)) {
@@ -289,7 +289,7 @@ H5O__mdci_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
if (HADDR_UNDEF == (final_eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "unable to get file size")
- HDassert(H5F_addr_eq(final_eoa, mesg->addr + mesg->size));
+ assert(H5F_addr_eq(final_eoa, mesg->addr + mesg->size));
if (H5FD_free(f->shared->lf, H5FD_MEM_SUPER, f, mesg->addr, mesg->size) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't free MDC image")
@@ -322,17 +322,17 @@ H5O__mdci_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mdci);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mdci);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Metadata Cache Image Block address:", mdci->addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Metadata Cache Image Block address:", mdci->addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Metadata Cache Image Block size in bytes:", mdci->size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Metadata Cache Image Block size in bytes:", mdci->size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__mdci_debug() */
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index c37a2a6..d3b0ca2 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -88,10 +88,10 @@ H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno)
FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(idx < oh->nchunks);
- HDassert(idx > 0);
+ assert(f);
+ assert(oh);
+ assert(idx < oh->nchunks);
+ assert(idx > 0);
/* Allocate space for the object header data structure */
if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
@@ -154,9 +154,9 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx)
FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(idx < oh->nchunks);
+ assert(f);
+ assert(oh);
+ assert(idx < oh->nchunks);
/* Check for protecting first chunk */
if (0 == idx) {
@@ -179,7 +179,7 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx)
/* Construct the user data for protecting chunk proxy */
/* (and _not_ decoding it) */
- HDmemset(&chk_udata, 0, sizeof(chk_udata));
+ memset(&chk_udata, 0, sizeof(chk_udata));
chk_udata.oh = oh;
chk_udata.chunkno = idx;
chk_udata.size = oh->chunk[idx].size;
@@ -190,8 +190,8 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk")
/* Sanity check */
- HDassert(chk_proxy->oh == oh);
- HDassert(chk_proxy->chunkno == idx);
+ assert(chk_proxy->oh == oh);
+ assert(chk_proxy->chunkno == idx);
} /* end else */
/* Set return value */
@@ -226,8 +226,8 @@ H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t dirtied)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(chk_proxy);
+ assert(f);
+ assert(chk_proxy);
/* Check for releasing first chunk */
if (0 == chk_proxy->chunkno) {
@@ -276,8 +276,8 @@ H5O__chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(chk_proxy);
+ assert(oh);
+ assert(chk_proxy);
/* Check for resizing first chunk */
if (0 == chk_proxy->chunkno) {
@@ -317,14 +317,14 @@ H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx)
FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(idx < oh->nchunks);
- HDassert(idx > 0);
+ assert(f);
+ assert(oh);
+ assert(idx < oh->nchunks);
+ assert(idx > 0);
/* Construct the user data for protecting chunk proxy */
/* (and _not_ decoding it) */
- HDmemset(&chk_udata, 0, sizeof(chk_udata));
+ memset(&chk_udata, 0, sizeof(chk_udata));
chk_udata.oh = oh;
chk_udata.chunkno = idx;
chk_udata.size = oh->chunk[idx].size;
@@ -367,10 +367,10 @@ H5O__chunk_delete(H5F_t *f, H5O_t *oh, unsigned idx)
FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(idx < oh->nchunks);
- HDassert(idx > 0);
+ assert(f);
+ assert(oh);
+ assert(idx < oh->nchunks);
+ assert(idx > 0);
/* Get the chunk proxy */
if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, idx)))
@@ -408,7 +408,7 @@ H5O__chunk_dest(H5O_chunk_proxy_t *chk_proxy)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(chk_proxy);
+ assert(chk_proxy);
/* Decrement reference count of object header */
if (H5O__dec_rc(chk_proxy->oh) < 0)
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index bbf233d..fe72709 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -87,8 +87,8 @@ H5O__cont_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate space for the message */
if (NULL == (cont = H5FL_MALLOC(H5O_cont_t)))
@@ -134,11 +134,11 @@ H5O__cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(cont);
- HDassert(H5F_addr_defined(cont->addr));
- HDassert(cont->size > 0);
+ assert(f);
+ assert(p);
+ assert(cont);
+ assert(H5F_addr_defined(cont->addr));
+ assert(cont->size > 0);
/* encode */
H5F_addr_encode(f, &p, cont->addr);
@@ -194,7 +194,7 @@ H5O__cont_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_cont_t, mesg);
@@ -222,8 +222,8 @@ H5O__cont_delete(H5F_t *f, H5O_t *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
/* Notify the cache that the chunk has been deleted */
/* (releases the space for the chunk) */
@@ -254,17 +254,17 @@ H5O__cont_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(cont);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(cont);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Continuation address:", cont->addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Continuation address:", cont->addr);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Continuation size in bytes:", (unsigned long)(cont->size));
- HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Points to chunk number:", (int)(cont->chunkno));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Continuation size in bytes:", (unsigned long)(cont->size));
+ fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Points to chunk number:", (int)(cont->chunkno));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__cont_debug() */
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 9852d1f..02e3845 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -136,10 +136,10 @@ H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(src_name && *src_name);
- HDassert(dst_loc);
- HDassert(dst_name && *dst_name);
+ assert(loc);
+ assert(src_name && *src_name);
+ assert(dst_loc);
+ assert(dst_name && *dst_name);
/* Check if destination name already exists */
dst_exists = FALSE;
@@ -223,11 +223,11 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
FUNC_ENTER_PACKAGE_TAG(oloc_src->addr)
- HDassert(oloc_src);
- HDassert(oloc_src->file);
- HDassert(H5F_addr_defined(oloc_src->addr));
- HDassert(oloc_dst->file);
- HDassert(cpy_info);
+ assert(oloc_src);
+ assert(oloc_src->file);
+ assert(H5F_addr_defined(oloc_src->addr));
+ assert(oloc_dst->file);
+ assert(cpy_info);
/* Get pointer to object class for this object */
if (NULL == (obj_class = H5O__obj_class(oloc_src)))
@@ -350,7 +350,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
*/
if (NULL == (deleted = (hbool_t *)H5MM_malloc(sizeof(hbool_t) * oh_src->nmesgs)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
+ memset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
/* "pre copy" pass over messages, to gather information for actual message copy operation
* (for messages which depend on information from other messages)
@@ -362,7 +362,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
mesg_src = &(oh_src->mesg[mesgno]);
/* Sanity check */
- HDassert(!mesg_src->dirty); /* Should be cleared by earlier call to flush messages */
+ assert(!mesg_src->dirty); /* Should be cleared by earlier call to flush messages */
/* Get message class to operate on */
copy_type = mesg_src->type;
@@ -375,7 +375,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
++null_msgs;
copy_type = H5O_MSG_NULL;
} /* end if */
- HDassert(copy_type);
+ assert(copy_type);
if (copy_type->pre_copy_file) {
/* Decode the message if necessary. */
@@ -421,7 +421,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
if (FALSE == cpy_info->preserve_null) {
while (deleted[mesgno + null_msgs]) {
++null_msgs;
- HDassert(mesgno + null_msgs < oh_src->nmesgs);
+ assert(mesgno + null_msgs < oh_src->nmesgs);
} /* end while */
} /* end if */
@@ -449,7 +449,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
* converted to a nil message) in the destination -QAK)
*/
copy_type = mesg_dst->type;
- HDassert(copy_type);
+ assert(copy_type);
/* copy this message into destination file */
if (copy_type->copy_file) {
@@ -529,7 +529,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
size_t delta = (size_t)(H5O_MIN_SIZE - dst_oh_size); /* Delta in chunk size needed */
/* Sanity check */
- HDassert((oh_dst->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
+ assert((oh_dst->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
/* Determine whether to create gap or NULL message */
if ((oh_dst->version > H5O_VERSION_1) && (delta < H5O_SIZEOF_MSGHDR_OH(oh_dst)))
@@ -546,7 +546,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
dst_oh_size += delta;
/* Sanity check */
- HDassert(dst_oh_size <= 255);
+ assert(dst_oh_size <= 255);
} /* end if */
/* Add in destination's object header size now */
@@ -581,7 +581,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
* treatment. This has to happen after the destination header has been
* allocated.
*/
- HDassert(H5O_SIZEOF_MSGHDR_OH(oh_src) == H5O_SIZEOF_MSGHDR_OH(oh_dst));
+ assert(H5O_SIZEOF_MSGHDR_OH(oh_src) == H5O_SIZEOF_MSGHDR_OH(oh_dst));
msghdr_size = H5O_SIZEOF_MSGHDR_OH(oh_dst);
current_pos = oh_dst->chunk[0].image;
@@ -602,7 +602,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
if (FALSE == cpy_info->preserve_null) {
while (deleted[mesgno + null_msgs]) {
++null_msgs;
- HDassert(mesgno + null_msgs < oh_src->nmesgs);
+ assert(mesgno + null_msgs < oh_src->nmesgs);
} /* end while */
} /* end if */
@@ -646,11 +646,11 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
} /* end if */
/* Make sure we filled the chunk, except for room at the end for a checksum */
- HDassert(current_pos + dst_oh_gap + dst_oh_null + H5O_SIZEOF_CHKSUM_OH(oh_dst) ==
- (size_t)dst_oh_size + oh_dst->chunk[0].image);
+ assert(current_pos + dst_oh_gap + dst_oh_null + H5O_SIZEOF_CHKSUM_OH(oh_dst) ==
+ (size_t)dst_oh_size + oh_dst->chunk[0].image);
/* Set the dest. object location to the first chunk address */
- HDassert(H5F_addr_defined(addr_new));
+ assert(H5F_addr_defined(addr_new));
oloc_dst->addr = addr_new;
/* If we are merging committed datatypes and this is a committed datatype, insert
@@ -691,7 +691,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
if (FALSE == cpy_info->preserve_null) {
while (deleted[mesgno + null_msgs]) {
++null_msgs;
- HDassert(mesgno + null_msgs < oh_src->nmesgs);
+ assert(mesgno + null_msgs < oh_src->nmesgs);
} /* end while */
} /* end if */
@@ -704,14 +704,14 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
* converted to a nil message) in the destination -QAK)
*/
copy_type = mesg_dst->type;
- HDassert(copy_type);
+ assert(copy_type);
if (copy_type->post_copy_file && mesg_src->native) {
unsigned mesg_flags; /* Message flags */
/* Sanity check destination message */
- HDassert(mesg_dst->type == mesg_src->type);
- HDassert(mesg_dst->native);
+ assert(mesg_dst->type == mesg_src->type);
+ assert(mesg_dst->native);
/* Get destination message flags. mesg_dst->flags will contain the
* original flags for now. */
@@ -727,7 +727,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
"unable to perform 'post copy' operation on message")
/* Verify that the flags did not change */
- HDassert(mesg_flags == (unsigned)mesg_dst->flags);
+ assert(mesg_flags == (unsigned)mesg_dst->flags);
} /* end if */
} /* end for */
@@ -758,7 +758,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* Set obj_type and udata, if requested */
if (obj_type) {
- HDassert(udata);
+ assert(udata);
*obj_type = obj_class->type;
*udata = cpy_udata;
} /* end if */
@@ -815,11 +815,11 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5O_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(oloc_src);
- HDassert(oloc_src->file);
- HDassert(oloc_dst);
- HDassert(oloc_dst->file);
- HDassert(cpy_info);
+ assert(oloc_src);
+ assert(oloc_src->file);
+ assert(oloc_dst);
+ assert(oloc_dst->file);
+ assert(cpy_info);
/* Create object "position" struct */
H5F_GET_FILENO(oloc_src->file, src_obj_pos.fileno);
@@ -857,7 +857,7 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5O_
/* Return saved obj_type and udata, if requested */
if (obj_type) {
- HDassert(udata);
+ assert(udata);
*obj_type = addr_map->obj_class->type;
*udata = addr_map->udata;
} /* end if */
@@ -910,12 +910,12 @@ H5O__copy_free_addrmap_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
- HDassert(item);
+ assert(item);
/* Release user data for particular type of object */
if (item->udata) {
- HDassert(item->obj_class);
- HDassert(item->obj_class->free_copy_file_udata);
+ assert(item->obj_class);
+ assert(item->obj_class->free_copy_file_udata);
(item->obj_class->free_copy_file_udata)(item->udata);
} /* end if */
@@ -950,13 +950,13 @@ H5O__copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc_src);
- HDassert(oloc_src->file);
- HDassert(H5F_addr_defined(oloc_src->addr));
- HDassert(oloc_dst->file);
+ assert(oloc_src);
+ assert(oloc_src->file);
+ assert(H5F_addr_defined(oloc_src->addr));
+ assert(oloc_dst->file);
/* Initialize copy info before errors can be thrown */
- HDmemset(&cpy_info, 0, sizeof(H5O_copy_t));
+ memset(&cpy_info, 0, sizeof(H5O_copy_t));
/* Get the copy property list */
if (NULL == (ocpy_plist = (H5P_genplist_t *)H5I_object(ocpypl_id)))
@@ -1046,11 +1046,11 @@ H5O__copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_
FUNC_ENTER_PACKAGE
- HDassert(src_loc);
- HDassert(src_loc->oloc->file);
- HDassert(dst_loc);
- HDassert(dst_loc->oloc->file);
- HDassert(dst_name);
+ assert(src_loc);
+ assert(src_loc->oloc->file);
+ assert(dst_loc);
+ assert(dst_loc->oloc->file);
+ assert(dst_name);
/* Set up copied object location to fill in */
new_loc.oloc = &new_oloc;
@@ -1104,9 +1104,9 @@ H5O__copy_free_comm_dt_cb(void *item, void *_key, void H5_ATTR_UNUSED *_op_data)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(addr);
- HDassert(key);
- HDassert(key->dt);
+ assert(addr);
+ assert(key);
+ assert(key->dt);
key->dt = (H5T_t *)H5O_msg_free(H5O_DTYPE_ID, key->dt);
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
@@ -1183,10 +1183,10 @@ H5O__copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(attr);
- HDassert(udata);
- HDassert(udata->dst_dt_list);
- HDassert(H5F_addr_defined(udata->obj_oloc.addr));
+ assert(attr);
+ assert(udata);
+ assert(udata->dst_dt_list);
+ assert(H5F_addr_defined(udata->obj_oloc.addr));
/* Get attribute datatype */
if (NULL == (dt = H5A_type(attr)))
@@ -1227,7 +1227,7 @@ done:
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
} /* end if */
if (addr) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
addr = H5FL_FREE(haddr_t, addr);
} /* end if */
} /* end if */
@@ -1263,10 +1263,10 @@ H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj_oloc);
- HDassert(udata);
- HDassert(udata->dst_dt_list);
- HDassert(udata->dst_root_loc);
+ assert(obj_oloc);
+ assert(udata);
+ assert(udata->dst_dt_list);
+ assert(udata->dst_root_loc);
/* Get pointer to object class for this object */
if ((obj_class = H5O__obj_class(obj_oloc)) == NULL)
@@ -1345,7 +1345,7 @@ done:
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
} /* end if */
if (addr) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
addr = H5FL_FREE(haddr_t, addr);
} /* end if */
} /* end if */
@@ -1382,11 +1382,11 @@ H5O__copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name, const
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(name);
- HDassert(linfo);
- HDassert(udata);
- HDassert(udata->dst_dt_list);
- HDassert(udata->dst_root_loc);
+ assert(name);
+ assert(linfo);
+ assert(udata);
+ assert(udata->dst_dt_list);
+ assert(udata->dst_root_loc);
/* Check if this is a hard link */
if (linfo->type == H5L_TYPE_HARD) {
@@ -1443,11 +1443,11 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(oh_src);
- HDassert(oloc_dst);
- HDassert(oloc_dst->file);
- HDassert(H5F_ID_EXISTS(oloc_dst->file));
- HDassert(cpy_info);
+ assert(oh_src);
+ assert(oloc_dst);
+ assert(oloc_dst->file);
+ assert(H5F_ID_EXISTS(oloc_dst->file));
+ assert(cpy_info);
/* Allocate key */
if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
@@ -1536,7 +1536,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
/* Build the complete dst dt list */
/* Set up the root group in the destination file, if necessary */
if (!dst_root_loc.oloc) {
- HDassert(!dst_root_loc.path);
+ assert(!dst_root_loc.path);
if (NULL == (dst_root_loc.oloc = H5G_oloc(H5G_rootof(oloc_dst->file))))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"unable to get object location for root group")
@@ -1544,7 +1544,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group")
} /* end if */
else
- HDassert(dst_root_loc.path);
+ assert(dst_root_loc.path);
/* Build udata. Note that this may be done twice in some cases, but
* it should be rare and should be cheaper on average than trying to
@@ -1608,12 +1608,12 @@ H5O__copy_insert_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst, H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(oh_src);
- HDassert(oloc_dst);
- HDassert(oloc_dst->file);
- HDassert(oloc_dst->addr != HADDR_UNDEF);
- HDassert(cpy_info);
- HDassert(cpy_info->dst_dt_list);
+ assert(oh_src);
+ assert(oloc_dst);
+ assert(oloc_dst->file);
+ assert(oloc_dst->addr != HADDR_UNDEF);
+ assert(cpy_info);
+ assert(cpy_info->dst_dt_list);
/* Allocate key */
if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index 7ba2dc5..100bea5 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -99,8 +99,8 @@ H5O__copy_obj_by_ref(H5O_loc_t *src_oloc, H5O_loc_t *dst_oloc, H5G_loc_t *dst_ro
FUNC_ENTER_PACKAGE
- HDassert(src_oloc);
- HDassert(dst_oloc);
+ assert(src_oloc);
+ assert(dst_oloc);
/* Perform the copy, or look up existing copy */
if ((ret_value = H5O_copy_header_map(src_oloc, dst_oloc, cpy_info, FALSE, NULL, NULL)) < 0)
@@ -170,8 +170,8 @@ H5O__copy_expand_ref_object1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t
H5O_token_t tmp_token = {0};
/* If data is not initialized, copy zeros and skip */
- if (0 == HDmemcmp(src_buf, zeros, buf_size))
- HDmemset(dst_buf, 0, buf_size);
+ if (0 == memcmp(src_buf, zeros, buf_size))
+ memset(dst_buf, 0, buf_size);
else {
/* Set up for the object copy for the reference */
if (H5R__decode_token_obj_compat(src_buf, &buf_size, &tmp_token, token_size) < 0)
@@ -233,8 +233,8 @@ H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t
uint8_t *q;
/* If data is not initialized, copy zeros and skip */
- if (0 == HDmemcmp(src_buf, zeros, buf_size))
- HDmemset(dst_buf, 0, buf_size);
+ if (0 == memcmp(src_buf, zeros, buf_size))
+ memset(dst_buf, 0, buf_size);
else {
/* Read from heap */
if (H5R__decode_heap(src_oloc->file, src_buf, &buf_size, &data, &data_size) < 0)
@@ -358,7 +358,7 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt
H5R_ref_priv_t *ref = (H5R_ref_priv_t *)&ref_ptr[i];
/* Check for null reference - only expand reference if it is not null */
- if (HDmemcmp(ref, zeros, H5R_REF_BUF_SIZE)) {
+ if (memcmp(ref, zeros, H5R_REF_BUF_SIZE)) {
H5O_token_t tmp_token = {0};
/* Get src object address */
@@ -441,12 +441,12 @@ H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, const H5T_t *dt_src, void *b
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file_src);
- HDassert(buf_src);
- HDassert(file_dst);
- HDassert(buf_dst);
- HDassert(nbytes_src);
- HDassert(cpy_info);
+ assert(file_src);
+ assert(buf_src);
+ assert(file_dst);
+ assert(buf_dst);
+ assert(nbytes_src);
+ assert(cpy_info);
/* Initialize object locations */
H5O_loc_reset(&src_oloc);
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index 203d411..594bcf8 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -108,24 +108,23 @@ H5O__assert(const H5O_t *oh)
free_space += oh->chunk[u].gap;
/* Check for valid raw data image */
- HDassert(oh->chunk[u].image);
- HDassert(oh->chunk[u].size > (size_t)H5O_SIZEOF_CHKHDR_OH(oh));
+ assert(oh->chunk[u].image);
+ assert(oh->chunk[u].size > (size_t)H5O_SIZEOF_CHKHDR_OH(oh));
/* All chunks must be allocated on disk */
- HDassert(H5F_addr_defined(oh->chunk[u].addr));
+ assert(H5F_addr_defined(oh->chunk[u].addr));
/* Version specific checks */
if (oh->version > H5O_VERSION_1) {
/* Make certain that the magic number is correct for each chunk */
- HDassert(
- !HDmemcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
+ assert(!memcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
/* Check for valid gap size */
- HDassert(oh->chunk[u].gap < (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ assert(oh->chunk[u].gap < (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
} /* end if */
else
/* Gaps should never occur in version 1 of the format */
- HDassert(oh->chunk[u].gap == 0);
+ assert(oh->chunk[u].gap == 0);
} /* end for */
/* Check for correct chunk #0 size flags */
@@ -133,13 +132,13 @@ H5O__assert(const H5O_t *oh)
uint64_t chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
if (chunk0_size <= 255)
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
else if (chunk0_size <= 65535)
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_2);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_2);
else if (chunk0_size <= 4294967295)
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_4);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_4);
else
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_8);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_8);
} /* end if */
/* Loop over all messages in object header */
@@ -157,7 +156,7 @@ H5O__assert(const H5O_t *oh)
H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native;
hbool_t H5_ATTR_NDEBUG_UNUSED found_chunk = FALSE; /* Found a chunk that matches */
- HDassert(cont);
+ assert(cont);
/* Increment # of continuation messages found */
cont_msgs_found++;
@@ -166,12 +165,12 @@ H5O__assert(const H5O_t *oh)
/* (and only one) */
for (v = 0; v < oh->nchunks; v++) {
if (H5F_addr_eq(cont->addr, oh->chunk[v].addr) && cont->size == oh->chunk[v].size) {
- HDassert(cont->chunkno == v);
- HDassert(!found_chunk);
+ assert(cont->chunkno == v);
+ assert(!found_chunk);
found_chunk = TRUE;
} /* end if */
} /* end for */
- HDassert(found_chunk);
+ assert(found_chunk);
meta_space += curr_tot_size;
} /* end if */
@@ -180,42 +179,42 @@ H5O__assert(const H5O_t *oh)
mesg_space += curr_msg->raw_size;
/* Make sure the message has a native form if it is marked dirty */
- HDassert(curr_msg->native || !curr_msg->dirty);
+ assert(curr_msg->native || !curr_msg->dirty);
} /* end else */
/* Make certain that the message is in a valid chunk */
- HDassert(curr_msg->chunkno < oh->nchunks);
+ assert(curr_msg->chunkno < oh->nchunks);
/* Make certain null messages aren't in chunks with gaps */
if (H5O_NULL_ID == curr_msg->type->id)
- HDassert(oh->chunk[curr_msg->chunkno].gap == 0);
+ assert(oh->chunk[curr_msg->chunkno].gap == 0);
/* Make certain that the message is completely in a chunk message area */
- HDassert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) -
- (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
+ assert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
if (curr_msg->chunkno == 0)
- HDassert(curr_hdr >=
- oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert(curr_hdr >=
+ oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
else
- HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image +
- (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
- HDassert(curr_msg->raw + curr_msg->raw_size <=
- (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) -
- (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
+ assert(curr_hdr >= oh->chunk[curr_msg->chunkno].image +
+ (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert(curr_msg->raw + curr_msg->raw_size <=
+ (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
/* Make certain that no other messages overlap this message */
for (v = 0, tmp_msg = &oh->mesg[0]; v < oh->nmesgs; v++, tmp_msg++) {
if (u != v)
- HDassert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr &&
- (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) < (curr_hdr + curr_tot_size)));
+ assert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr &&
+ (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) < (curr_hdr + curr_tot_size)));
} /* end for */
} /* end for */
/* Sanity check that the # of cont. messages is correct for the # of chunks */
- HDassert(oh->nchunks == (cont_msgs_found + 1));
+ assert(oh->nchunks == (cont_msgs_found + 1));
/* Sanity check that all the bytes are accounted for */
- HDassert(hdr_size == (free_space + meta_space + mesg_space));
+ assert(hdr_size == (free_space + meta_space + mesg_space));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__assert() */
@@ -243,15 +242,15 @@ H5O_debug_id(unsigned type_id, H5F_t *f, const void *mesg, FILE *stream, int ind
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->debug);
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(type);
+ assert(type->debug);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Call the debug method in the class */
if ((ret_value = (type->debug)(f, mesg, stream, indent, fwidth)) < 0)
@@ -284,36 +283,35 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(oh);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* debug */
- HDfprintf(stream, "%*sObject Header...\n", indent, "");
+ fprintf(stream, "%*sObject Header...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty:", oh->cache_info.is_dirty ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", oh->version);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Header size (in bytes):", (unsigned)H5O_SIZEOF_HDR(oh));
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", oh->nlink);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Dirty:", oh->cache_info.is_dirty ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", oh->version);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Header size (in bytes):", (unsigned)H5O_SIZEOF_HDR(oh));
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", oh->nlink);
/* Extra information for later versions */
if (oh->version > H5O_VERSION_1) {
/* Display object's status flags */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order tracked:",
- (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order indexed:",
- (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute storage phase change values:",
- (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Timestamps:", (oh->flags & H5O_HDR_STORE_TIMES) ? "Enabled" : "Disabled");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order tracked:",
+ (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order indexed:",
+ (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute storage phase change values:",
+ (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Timestamps:", (oh->flags & H5O_HDR_STORE_TIMES) ? "Enabled" : "Disabled");
if (oh->flags & ~H5O_HDR_ALL_FLAGS)
- HDfprintf(stream, "*** UNKNOWN OBJECT HEADER STATUS FLAG: %02x!\n", (unsigned)oh->flags);
+ fprintf(stream, "*** UNKNOWN OBJECT HEADER STATUS FLAG: %02x!\n", (unsigned)oh->flags);
/* Only dump times, if they are tracked */
if (oh->flags & H5O_HDR_STORE_TIMES) {
@@ -323,45 +321,45 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
/* Time fields */
tm = HDlocaltime(&oh->atime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Access Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Access Time:", buf);
tm = HDlocaltime(&oh->mtime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Modification Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Modification Time:", buf);
tm = HDlocaltime(&oh->ctime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Change Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Change Time:", buf);
tm = HDlocaltime(&oh->btime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Birth Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Birth Time:", buf);
} /* end if */
/* Attribute tracking fields */
if (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. compact attributes:", (unsigned)oh->max_compact);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. dense attributes:", (unsigned)oh->min_dense);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max. compact attributes:", (unsigned)oh->max_compact);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Min. dense attributes:", (unsigned)oh->min_dense);
} /* end if */
} /* end if */
- HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth,
- "Number of messages (allocated):", oh->nmesgs, oh->alloc_nmesgs);
- HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of chunks (allocated):", oh->nchunks,
- oh->alloc_nchunks);
+ fprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of messages (allocated):", oh->nmesgs,
+ oh->alloc_nmesgs);
+ fprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of chunks (allocated):", oh->nchunks,
+ oh->alloc_nchunks);
/* debug each chunk */
for (i = 0, chunk_total = 0; i < oh->nchunks; i++) {
size_t chunk_size;
- HDfprintf(stream, "%*sChunk %d...\n", indent, "", i);
+ fprintf(stream, "%*sChunk %d...\n", indent, "", i);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
- "Address:", oh->chunk[i].addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Address:", oh->chunk[i].addr);
/* Decrement chunk 0's size by the object header prefix size */
if (0 == i) {
if (H5F_addr_ne(oh->chunk[i].addr, addr))
- HDfprintf(stream, "*** WRONG ADDRESS FOR CHUNK #0!\n");
+ fprintf(stream, "*** WRONG ADDRESS FOR CHUNK #0!\n");
chunk_size = oh->chunk[i].size - (size_t)H5O_SIZEOF_HDR(oh);
} /* end if */
else
@@ -371,9 +369,9 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
chunk_total += chunk_size;
gap_total += oh->chunk[i].gap;
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Size in bytes:", chunk_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Size in bytes:", chunk_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Gap:", oh->chunk[i].gap);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Gap:", oh->chunk[i].gap);
} /* end for */
/* debug each message */
@@ -390,21 +388,21 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
if (oh->mesg[i].type->id == H5O_CONT_ID)
mesg_total += H5O_SIZEOF_CHKHDR_OH(oh);
- HDfprintf(stream, "%*sMessage %d...\n", indent, "", i);
+ fprintf(stream, "%*sMessage %d...\n", indent, "", i);
/* check for bad message id */
if (oh->mesg[i].type->id >= (int)NELMTS(H5O_msg_class_g)) {
- HDfprintf(stream, "*** BAD MESSAGE ID 0x%04x\n", oh->mesg[i].type->id);
+ fprintf(stream, "*** BAD MESSAGE ID 0x%04x\n", oh->mesg[i].type->id);
continue;
} /* end if */
/* message name and size */
- HDfprintf(stream, "%*s%-*s 0x%04x `%s' (%d)\n", indent + 3, "", MAX(0, fwidth - 3),
- "Message ID (sequence number):", (unsigned)(oh->mesg[i].type->id), oh->mesg[i].type->name,
- sequence[oh->mesg[i].type->id]++);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", MAX(0, fwidth - 3),
- "Dirty:", oh->mesg[i].dirty ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s ", indent + 3, "", MAX(0, fwidth - 3), "Message flags:");
+ fprintf(stream, "%*s%-*s 0x%04x `%s' (%d)\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Message ID (sequence number):", (unsigned)(oh->mesg[i].type->id), oh->mesg[i].type->name,
+ sequence[oh->mesg[i].type->id]++);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Dirty:", oh->mesg[i].dirty ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s ", indent + 3, "", MAX(0, fwidth - 3), "Message flags:");
if (oh->mesg[i].flags) {
hbool_t flag_printed = FALSE;
@@ -416,61 +414,61 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS));
if (oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) {
- HDfprintf(stream, "%sC", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sC", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) {
- HDfprintf(stream, "%sS", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sS", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) {
- HDfprintf(stream, "%sDS", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sDS", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE) {
- HDfprintf(stream, "%sFIUW", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sFIUW", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) {
- HDfprintf(stream, "%sMIU", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sMIU", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_WAS_UNKNOWN) {
- HDassert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN);
- HDfprintf(stream, "%sWU", (flag_printed ? ", " : "<"));
+ assert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN);
+ fprintf(stream, "%sWU", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_SHAREABLE) {
- HDfprintf(stream, "%sSA", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sSA", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS) {
- HDfprintf(stream, "%sFIUA", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sFIUA", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (!flag_printed)
- HDfprintf(stream, "-");
- HDfprintf(stream, ">\n");
+ fprintf(stream, "-");
+ fprintf(stream, ">\n");
if (oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS)
- HDfprintf(stream, "%*s%-*s 0x%02x\n", indent + 3, "", MAX(0, fwidth - 3),
- "*** ADDITIONAL UNKNOWN FLAGS --->", oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS);
+ fprintf(stream, "%*s%-*s 0x%02x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "*** ADDITIONAL UNKNOWN FLAGS --->", oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS);
} /* end if */
else
- HDfprintf(stream, "<none>\n");
+ fprintf(stream, "<none>\n");
- HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", MAX(0, fwidth - 3),
- "Chunk number:", oh->mesg[i].chunkno);
+ fprintf(stream, "%*s%-*s %u\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Chunk number:", oh->mesg[i].chunkno);
chunkno = oh->mesg[i].chunkno;
if (chunkno >= oh->nchunks)
- HDfprintf(stream, "*** BAD CHUNK NUMBER\n");
- HDfprintf(stream, "%*s%-*s (%zu, %zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3),
- "Raw message data (offset, size) in chunk:",
- (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image), oh->mesg[i].raw_size);
+ fprintf(stream, "*** BAD CHUNK NUMBER\n");
+ fprintf(stream, "%*s%-*s (%zu, %zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Raw message data (offset, size) in chunk:",
+ (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image), oh->mesg[i].raw_size);
/* check the size */
if ((oh->mesg[i].raw + oh->mesg[i].raw_size > oh->chunk[chunkno].image + oh->chunk[chunkno].size) ||
(oh->mesg[i].raw < oh->chunk[chunkno].image))
- HDfprintf(stream, "*** BAD MESSAGE RAW ADDRESS\n");
+ fprintf(stream, "*** BAD MESSAGE RAW ADDRESS\n");
/* decode the message */
debug_type = oh->mesg[i].type;
@@ -478,15 +476,15 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
H5O_LOAD_NATIVE(f, H5O_DECODEIO_NOCHANGE, oh, &oh->mesg[i], FAIL)
/* print the message */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Message Information:");
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Message Information:");
if (debug_type->debug && oh->mesg[i].native != NULL)
(debug_type->debug)(f, oh->mesg[i].native, stream, indent + 6, MAX(0, fwidth - 6));
else
- HDfprintf(stream, "%*s<No info for this message>\n", indent + 6, "");
+ fprintf(stream, "%*s<No info for this message>\n", indent + 6, "");
} /* end for */
if ((mesg_total + gap_total) != chunk_total)
- HDfprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n");
+ fprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n");
done:
/* Release resources */
@@ -518,11 +516,11 @@ H5O_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Set up the object location */
loc.file = f;
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index a25b1a9..aa9c47b 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -93,7 +93,7 @@ H5O__reset_info1(H5O_info1_t *oinfo)
FUNC_ENTER_PACKAGE_NOERR;
/* Reset the passed-in info struct */
- HDmemset(oinfo, 0, sizeof(H5O_info1_t));
+ memset(oinfo, 0, sizeof(H5O_info1_t));
oinfo->type = H5O_TYPE_UNKNOWN;
oinfo->addr = HADDR_UNDEF;
@@ -126,8 +126,8 @@ H5O__iterate1_adapter(hid_t obj_id, const char *name, const H5O_info2_t *oinfo2,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oinfo2);
- HDassert(op_data);
+ assert(oinfo2);
+ assert(op_data);
/* Reset the legacy info struct */
if (H5O__reset_info1(&oinfo) < 0)
@@ -225,8 +225,8 @@ H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, H5O_inf
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Reset the passed-in info struct */
if (H5O__reset_info1(oinfo) < 0)
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c
index 53de66d..4c0ca93 100644
--- a/src/H5Odrvinfo.c
+++ b/src/H5Odrvinfo.c
@@ -80,8 +80,8 @@ H5O__drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -149,15 +149,15 @@ H5O__drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* Store version, driver name, buffer length, & encoded buffer */
*p++ = H5O_DRVINFO_VERSION;
H5MM_memcpy(p, mesg->name, 8);
p += 8;
- HDassert(mesg->len <= 65535);
+ assert(mesg->len <= 65535);
UINT16ENCODE(p, mesg->len);
H5MM_memcpy(p, mesg->buf, mesg->len);
@@ -188,7 +188,7 @@ H5O__drvinfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = (H5O_drvinfo_t *)H5MM_malloc(sizeof(H5O_drvinfo_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
@@ -235,8 +235,8 @@ H5O__drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
ret_value = 1 + /* Version number */
8 + /* Driver name */
@@ -267,7 +267,7 @@ H5O__drvinfo_reset(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* reset */
mesg->buf = (uint8_t *)H5MM_xfree(mesg->buf);
@@ -295,14 +295,14 @@ H5O__drvinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Driver name:", mesg->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Buffer size:", mesg->len);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Driver name:", mesg->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Buffer size:", mesg->len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__drvinfo_debug() */
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index cab2eb2..9a1e3dc 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -128,8 +128,8 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
FUNC_ENTER_PACKAGE
- HDassert(pp && *pp);
- HDassert(dt && dt->shared);
+ assert(pp && *pp);
+ assert(dt && dt->shared);
/* XXX NOTE!
*
@@ -810,8 +810,8 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(pp && *pp);
- HDassert(dt);
+ assert(pp && *pp);
+ assert(dt);
/* skip the type and class bit-field for now */
*pp += 4;
@@ -904,7 +904,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
case H5T_ORDER_VAX: /*turn on 1st and 6th (reserved before adding VAX) bits*/
flags |= 0x41;
- HDassert(dt->shared->version >= H5O_DTYPE_VERSION_3);
+ assert(dt->shared->version >= H5O_DTYPE_VERSION_3);
break;
case H5T_ORDER_MIXED:
@@ -984,13 +984,13 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
flags = (unsigned)(flags | ((dt->shared->u.atomic.u.f.sign << 8) & 0xff00));
UINT16ENCODE(*pp, dt->shared->u.atomic.offset);
UINT16ENCODE(*pp, dt->shared->u.atomic.prec);
- HDassert(dt->shared->u.atomic.u.f.epos <= 255);
+ assert(dt->shared->u.atomic.u.f.epos <= 255);
*(*pp)++ = (uint8_t)(dt->shared->u.atomic.u.f.epos);
- HDassert(dt->shared->u.atomic.u.f.esize <= 255);
+ assert(dt->shared->u.atomic.u.f.esize <= 255);
*(*pp)++ = (uint8_t)(dt->shared->u.atomic.u.f.esize);
- HDassert(dt->shared->u.atomic.u.f.mpos <= 255);
+ assert(dt->shared->u.atomic.u.f.mpos <= 255);
*(*pp)++ = (uint8_t)(dt->shared->u.atomic.u.f.mpos);
- HDassert(dt->shared->u.atomic.u.f.msize <= 255);
+ assert(dt->shared->u.atomic.u.f.msize <= 255);
*(*pp)++ = (uint8_t)(dt->shared->u.atomic.u.f.msize);
UINT32ENCODE(*pp, dt->shared->u.atomic.u.f.ebias);
break;
@@ -1019,11 +1019,11 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
/*
* Character string types... (not fully implemented)
*/
- HDassert(dt->shared->u.atomic.order == H5T_ORDER_NONE);
- HDassert(dt->shared->u.atomic.prec == 8 * dt->shared->size);
- HDassert(dt->shared->u.atomic.offset == 0);
- HDassert(dt->shared->u.atomic.lsb_pad == H5T_PAD_ZERO);
- HDassert(dt->shared->u.atomic.msb_pad == H5T_PAD_ZERO);
+ assert(dt->shared->u.atomic.order == H5T_ORDER_NONE);
+ assert(dt->shared->u.atomic.prec == 8 * dt->shared->size);
+ assert(dt->shared->u.atomic.offset == 0);
+ assert(dt->shared->u.atomic.lsb_pad == H5T_PAD_ZERO);
+ assert(dt->shared->u.atomic.msb_pad == H5T_PAD_ZERO);
flags = (unsigned)(flags | (dt->shared->u.atomic.u.s.pad & 0x0f));
flags = (unsigned)(flags | ((((unsigned)dt->shared->u.atomic.u.s.cset) & 0x0f) << 4));
@@ -1118,11 +1118,11 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
/* Sanity check */
/* (compound datatypes w/array members must be encoded w/version >= 2) */
- HDassert(dt->shared->u.compnd.memb[i].type->shared->type != H5T_ARRAY ||
- dt->shared->version >= H5O_DTYPE_VERSION_2);
+ assert(dt->shared->u.compnd.memb[i].type->shared->type != H5T_ARRAY ||
+ dt->shared->version >= H5O_DTYPE_VERSION_2);
/* Check that the version is at least as great as the member */
- HDassert(dt->shared->version >= dt->shared->u.compnd.memb[i].type->shared->version);
+ assert(dt->shared->version >= dt->shared->u.compnd.memb[i].type->shared->version);
/* Name */
HDstrcpy((char *)(*pp), dt->shared->u.compnd.memb[i].name);
@@ -1185,7 +1185,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
case H5T_ENUM:
/* Check that the version is at least as great as the parent */
- HDassert(dt->shared->version >= dt->shared->parent->shared->version);
+ assert(dt->shared->version >= dt->shared->parent->shared->version);
/*
* Enumeration datatypes...
@@ -1221,7 +1221,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
case H5T_VLEN: /* Variable length datatypes... */
/* Check that the version is at least as great as the parent */
- HDassert(dt->shared->version >= dt->shared->parent->shared->version);
+ assert(dt->shared->version >= dt->shared->parent->shared->version);
flags |= (dt->shared->u.vlen.type & 0x0f);
if (dt->shared->u.vlen.type == H5T_VLEN_STRING) {
@@ -1236,16 +1236,16 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
case H5T_ARRAY: /* Array datatypes */
/* Double-check the number of dimensions */
- HDassert(dt->shared->u.array.ndims <= H5S_MAX_RANK);
+ assert(dt->shared->u.array.ndims <= H5S_MAX_RANK);
/* Check that the version is valid */
- HDassert(dt->shared->version >= H5O_DTYPE_VERSION_2);
+ assert(dt->shared->version >= H5O_DTYPE_VERSION_2);
/* Check that the version is at least as great as the parent */
- HDassert(dt->shared->version >= dt->shared->parent->shared->version);
+ assert(dt->shared->version >= dt->shared->parent->shared->version);
/* Encode the number of dimensions */
- HDassert(dt->shared->u.array.ndims <= UCHAR_MAX);
+ assert(dt->shared->u.array.ndims <= UCHAR_MAX);
*(*pp)++ = (uint8_t)dt->shared->u.array.ndims;
/* Drop this information for Version 3 of the format */
@@ -1321,8 +1321,8 @@ H5O__dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate datatype message */
if (NULL == (dt = H5T__alloc()))
@@ -1378,9 +1378,9 @@ H5O__dtype_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(dt);
+ assert(f);
+ assert(p);
+ assert(dt);
/* encode */
if (H5O__dtype_encode_helper(&p, dt) < 0)
@@ -1417,7 +1417,7 @@ H5O__dtype_copy(const void *_src, void *_dst)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(src);
+ assert(src);
/* Copy */
if (NULL == (dst = H5T_copy(src, H5T_COPY_ALL)))
@@ -1462,8 +1462,8 @@ H5O__dtype_size(const H5F_t *f, const void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(dt);
+ assert(f);
+ assert(dt);
/* Set the common size information */
ret_value = 4 + /* Type, class & flags */
@@ -1616,7 +1616,7 @@ H5O__dtype_free(void *mesg)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(mesg);
+ assert(mesg);
/* Release the datatype */
if (H5T_close_real((H5T_t *)mesg) < 0)
@@ -1646,17 +1646,17 @@ H5O__dtype_set_share(void *_mesg /*in,out*/, const H5O_shared_t *sh)
FUNC_ENTER_PACKAGE
- HDassert(dt);
- HDassert(sh);
+ assert(dt);
+ assert(sh);
/* Make sure the shared message location is initialized, so that it
* either has valid sharing information or is set to 0.
*/
- HDassert(sh->type <= H5O_SHARE_TYPE_HERE);
+ assert(sh->type <= H5O_SHARE_TYPE_HERE);
/* Make sure we're not sharing a committed type in the heap */
- HDassert(sh->type == H5O_SHARE_TYPE_COMMITTED ||
- (dt->shared->state != H5T_STATE_OPEN && dt->shared->state != H5T_STATE_NAMED));
+ assert(sh->type == H5O_SHARE_TYPE_COMMITTED ||
+ (dt->shared->state != H5T_STATE_OPEN && dt->shared->state != H5T_STATE_NAMED));
/* Copy the shared information */
if (H5O_set_shared(&(dt->sh_loc), sh) < 0)
@@ -1702,7 +1702,7 @@ H5O__dtype_can_share(const void *_mesg)
FUNC_ENTER_PACKAGE
- HDassert(mesg);
+ assert(mesg);
/* Don't share immutable datatypes */
if ((tri_ret = H5T_is_immutable(mesg)) > 0)
@@ -1746,10 +1746,10 @@ H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t H5_ATTR_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(dt_src);
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(file_src);
+ assert(dt_src);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version as indicated by the destination file's high bound */
@@ -1841,14 +1841,14 @@ H5O__dtype_shared_post_copy_upd(const H5O_loc_t H5_ATTR_UNUSED *src_oloc, const
FUNC_ENTER_PACKAGE
if (dt_dst->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) {
- HDassert(H5T_is_named(dt_dst));
+ assert(H5T_is_named(dt_dst));
if (H5O_loc_reset(&(dt_dst->oloc)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to reset location")
dt_dst->oloc.file = dt_dst->sh_loc.file;
dt_dst->oloc.addr = dt_dst->sh_loc.u.loc.oh_addr;
} /* end if */
else
- HDassert(!H5T_is_named(dt_dst));
+ assert(!H5T_is_named(dt_dst));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1885,11 +1885,11 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(dt);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(dt);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
switch (dt->shared->type) {
case H5T_INTEGER:
@@ -1943,45 +1943,45 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type class:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type class:", s);
- HDfprintf(stream, "%*s%-*s %lu byte%s\n", indent, "", fwidth, "Size:", (unsigned long)(dt->shared->size),
- 1 == dt->shared->size ? "" : "s");
+ fprintf(stream, "%*s%-*s %lu byte%s\n", indent, "", fwidth, "Size:", (unsigned long)(dt->shared->size),
+ 1 == dt->shared->size ? "" : "s");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", dt->shared->version);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", dt->shared->version);
if (H5T_COMPOUND == dt->shared->type) {
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of members:", dt->shared->u.compnd.nmembs);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of members:", dt->shared->u.compnd.nmembs);
for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
HDsnprintf(buf, sizeof(buf), "Member %u:", i);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.compnd.memb[i].name);
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Byte offset:", (unsigned long)(dt->shared->u.compnd.memb[i].offset));
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.compnd.memb[i].name);
+ fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Byte offset:", (unsigned long)(dt->shared->u.compnd.memb[i].offset));
H5O__dtype_debug(f, dt->shared->u.compnd.memb[i].type, stream, indent + 3, MAX(0, fwidth - 3));
} /* end for */
} /* end if */
else if (H5T_ENUM == dt->shared->type) {
- HDfprintf(stream, "%*s%s\n", indent, "", "Base type:");
+ fprintf(stream, "%*s%s\n", indent, "", "Base type:");
H5O__dtype_debug(f, dt->shared->parent, stream, indent + 3, MAX(0, fwidth - 3));
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of members:", dt->shared->u.enumer.nmembs);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of members:", dt->shared->u.enumer.nmembs);
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
HDsnprintf(buf, sizeof(buf), "Member %u:", i);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.enumer.name[i]);
- HDfprintf(stream, "%*s%-*s 0x", indent, "", fwidth, "Raw bytes of value:");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.enumer.name[i]);
+ fprintf(stream, "%*s%-*s 0x", indent, "", fwidth, "Raw bytes of value:");
for (k = 0; k < dt->shared->parent->shared->size; k++)
- HDfprintf(stream, "%02x",
- (unsigned)*((uint8_t *)dt->shared->u.enumer.value +
- (i * dt->shared->parent->shared->size) + k));
- HDfprintf(stream, "\n");
+ fprintf(stream, "%02x",
+ (unsigned)*((uint8_t *)dt->shared->u.enumer.value +
+ (i * dt->shared->parent->shared->size) + k));
+ fprintf(stream, "\n");
} /* end for */
} /* end else if */
else if (H5T_OPAQUE == dt->shared->type) {
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Tag:", dt->shared->u.opaque.tag);
+ fprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Tag:", dt->shared->u.opaque.tag);
} /* end else if */
else if (H5T_REFERENCE == dt->shared->type) {
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Fix dumping reference types!");
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Fix dumping reference types!");
} /* end else if */
else if (H5T_STRING == dt->shared->type) {
switch (dt->shared->u.atomic.u.s.cset) {
@@ -2018,7 +2018,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
switch (dt->shared->u.atomic.u.s.pad) {
case H5T_STR_NULLTERM:
@@ -2057,7 +2057,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
} /* end else if */
else if (H5T_VLEN == dt->shared->type) {
switch (dt->shared->u.vlen.type) {
@@ -2076,7 +2076,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Vlen type:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Vlen type:", s);
switch (dt->shared->u.vlen.loc) {
case H5T_LOC_MEMORY:
@@ -2094,7 +2094,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Location:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Location:", s);
/* Extra information for VL-strings */
if (dt->shared->u.vlen.type == H5T_VLEN_STRING) {
@@ -2131,7 +2131,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
switch (dt->shared->u.vlen.pad) {
case H5T_STR_NULLTERM:
@@ -2169,16 +2169,16 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
} /* end if */
} /* end else if */
else if (H5T_ARRAY == dt->shared->type) {
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Rank:", dt->shared->u.array.ndims);
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Rank:", dt->shared->u.array.ndims);
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
for (i = 0; i < dt->shared->u.array.ndims; i++)
- HDfprintf(stream, "%s%u", (i ? ", " : ""), (unsigned)dt->shared->u.array.dim[i]);
- HDfprintf(stream, "}\n");
- HDfprintf(stream, "%*s%s\n", indent, "", "Base type:");
+ fprintf(stream, "%s%u", (i ? ", " : ""), (unsigned)dt->shared->u.array.dim[i]);
+ fprintf(stream, "}\n");
+ fprintf(stream, "%*s%s\n", indent, "", "Base type:");
H5O__dtype_debug(f, dt->shared->parent, stream, indent + 3, MAX(0, fwidth - 3));
} /* end else if */
else {
@@ -2209,15 +2209,15 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Byte order:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Byte order:", s);
- HDfprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
- "Precision:", (unsigned long)(dt->shared->u.atomic.prec),
- 1 == dt->shared->u.atomic.prec ? "" : "s");
+ fprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
+ "Precision:", (unsigned long)(dt->shared->u.atomic.prec),
+ 1 == dt->shared->u.atomic.prec ? "" : "s");
- HDfprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
- "Offset:", (unsigned long)(dt->shared->u.atomic.offset),
- 1 == dt->shared->u.atomic.offset ? "" : "s");
+ fprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
+ "Offset:", (unsigned long)(dt->shared->u.atomic.offset),
+ 1 == dt->shared->u.atomic.offset ? "" : "s");
switch (dt->shared->u.atomic.lsb_pad) {
case H5T_PAD_ZERO:
@@ -2238,7 +2238,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = "pad?";
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Low pad type:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Low pad type:", s);
switch (dt->shared->u.atomic.msb_pad) {
case H5T_PAD_ZERO:
@@ -2259,7 +2259,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = "pad?";
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "High pad type:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "High pad type:", s);
if (H5T_FLOAT == dt->shared->type) {
switch (dt->shared->u.atomic.u.f.pad) {
@@ -2285,7 +2285,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Internal pad type:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Internal pad type:", s);
switch (dt->shared->u.atomic.u.f.norm) {
case H5T_NORM_IMPLIED:
@@ -2305,25 +2305,25 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
HDsnprintf(buf, sizeof(buf), "H5T_NORM_%d", (int)(dt->shared->u.atomic.u.f.norm));
s = buf;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Normalization:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Normalization:", s);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Sign bit location:", (unsigned long)(dt->shared->u.atomic.u.f.sign));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Sign bit location:", (unsigned long)(dt->shared->u.atomic.u.f.sign));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Exponent location:", (unsigned long)(dt->shared->u.atomic.u.f.epos));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Exponent location:", (unsigned long)(dt->shared->u.atomic.u.f.epos));
- HDfprintf(stream, "%*s%-*s 0x%08lx\n", indent, "", fwidth,
- "Exponent bias:", (unsigned long)(dt->shared->u.atomic.u.f.ebias));
+ fprintf(stream, "%*s%-*s 0x%08lx\n", indent, "", fwidth,
+ "Exponent bias:", (unsigned long)(dt->shared->u.atomic.u.f.ebias));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Exponent size:", (unsigned long)(dt->shared->u.atomic.u.f.esize));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Exponent size:", (unsigned long)(dt->shared->u.atomic.u.f.esize));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Mantissa location:", (unsigned long)(dt->shared->u.atomic.u.f.mpos));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Mantissa location:", (unsigned long)(dt->shared->u.atomic.u.f.mpos));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Mantissa size:", (unsigned long)(dt->shared->u.atomic.u.f.msize));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Mantissa size:", (unsigned long)(dt->shared->u.atomic.u.f.msize));
} /* end if */
else if (H5T_INTEGER == dt->shared->type) {
@@ -2343,7 +2343,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Sign scheme:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Sign scheme:", s);
} /* end else if */
} /* end else */
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 824590f..8d5b48e 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -83,9 +83,9 @@ H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(p);
- HDassert(p_size > 0);
+ assert(f);
+ assert(p);
+ assert(p_size > 0);
if (NULL == (mesg = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -209,9 +209,9 @@ H5O__efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(p);
+ assert(f);
+ assert(mesg);
+ assert(p);
/* Version */
*p++ = H5O_EFL_VERSION;
@@ -222,13 +222,13 @@ H5O__efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
*p++ = 0;
/* Number of slots */
- HDassert(mesg->nalloc > 0);
+ assert(mesg->nalloc > 0);
UINT16ENCODE(p, mesg->nused); /*yes, twice*/
- HDassert(mesg->nused > 0 && mesg->nused <= mesg->nalloc);
+ assert(mesg->nused > 0 && mesg->nused <= mesg->nalloc);
UINT16ENCODE(p, mesg->nused);
/* Heap address */
- HDassert(H5F_addr_defined(mesg->heap_addr));
+ assert(H5F_addr_defined(mesg->heap_addr));
H5F_addr_encode(f, &p, mesg->heap_addr);
/* Encode file list */
@@ -237,7 +237,7 @@ H5O__efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
* The name should have been added to the heap when the dataset was
* created.
*/
- HDassert(mesg->slot[u].name_offset);
+ assert(mesg->slot[u].name_offset);
H5F_ENCODE_LENGTH(f, p, mesg->slot[u].name_offset);
H5F_ENCODE_LENGTH(f, p, (hsize_t)mesg->slot[u].offset);
H5F_ENCODE_LENGTH(f, p, mesg->slot[u].size);
@@ -273,7 +273,7 @@ H5O__efl_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Allocate destination message, if necessary */
if (!dest && NULL == (dest = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
@@ -338,8 +338,8 @@ H5O__efl_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
ret_value = (size_t)H5F_SIZEOF_ADDR(f) + /*heap address */
2 + /*slots allocated*/
@@ -374,7 +374,7 @@ H5O__efl_reset(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* reset */
if (mesg->slot) {
@@ -456,8 +456,8 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d
FUNC_ENTER_PACKAGE_TAG(H5AC__COPIED_TAG)
/* check args */
- HDassert(efl_src);
- HDassert(file_dst);
+ assert(efl_src);
+ assert(file_dst);
/* Allocate space for the destination efl */
if (NULL == (efl_dst = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
@@ -482,7 +482,7 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d
/* Insert "empty" name first */
if (H5HL_insert(file_dst, heap, (size_t)1, "", &name_offset) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap")
- HDassert(0 == name_offset);
+ assert(0 == name_offset);
/* allocate array of external file entries */
if (efl_src->nalloc > 0) {
@@ -537,34 +537,33 @@ H5O__efl_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int ind
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Heap address:", mesg->heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Heap address:", mesg->heap_addr);
- HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Slots used/allocated:", mesg->nused,
- mesg->nalloc);
+ fprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Slots used/allocated:", mesg->nused,
+ mesg->nalloc);
for (u = 0; u < mesg->nused; u++) {
char buf[64];
HDsnprintf(buf, sizeof(buf), "File %zu", u);
- HDfprintf(stream, "%*s%s:\n", indent, "", buf);
+ fprintf(stream, "%*s%s:\n", indent, "", buf);
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(fwidth - 3, 0),
- "Name:", mesg->slot[u].name);
+ fprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(fwidth - 3, 0), "Name:", mesg->slot[u].name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(fwidth - 3, 0),
- "Name offset:", mesg->slot[u].name_offset);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Name offset:", mesg->slot[u].name_offset);
- HDfprintf(stream, "%*s%-*s %" PRIdMAX "\n", indent + 3, "", MAX(fwidth - 3, 0),
- "Offset of data in file:", (intmax_t)(mesg->slot[u].offset));
+ fprintf(stream, "%*s%-*s %" PRIdMAX "\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Offset of data in file:", (intmax_t)(mesg->slot[u].offset));
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", MAX(fwidth - 3, 0),
- "Bytes reserved for data:", (mesg->slot[u].size));
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Bytes reserved for data:", (mesg->slot[u].size));
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 99c8950..49cdd71 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -195,8 +195,8 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (fill = H5FL_CALLOC(H5O_fill_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message")
@@ -335,8 +335,8 @@ H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flag
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (fill = H5FL_CALLOC(H5O_fill_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message")
@@ -414,9 +414,9 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(p);
- HDassert(fill && NULL == fill->type);
+ assert(f);
+ assert(p);
+ assert(fill && NULL == fill->type);
/* Version */
*p++ = (uint8_t)fill->version;
@@ -445,12 +445,12 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
uint8_t flags = 0; /* Fill value setting flags */
/* Encode space allocation time */
- HDassert(fill->alloc_time == (H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time));
+ assert(fill->alloc_time == (H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time));
flags =
(uint8_t)(flags | ((H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time) << H5O_FILL_SHIFT_ALLOC_TIME));
/* Encode fill value writing time */
- HDassert(fill->fill_time == (H5O_FILL_MASK_FILL_TIME & fill->fill_time));
+ assert(fill->fill_time == (H5O_FILL_MASK_FILL_TIME & fill->fill_time));
flags = (uint8_t)(flags | ((H5O_FILL_MASK_FILL_TIME & fill->fill_time) << H5O_FILL_SHIFT_FILL_TIME));
/* Check if we need to encode a fill value size */
@@ -462,7 +462,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
*p++ = (uint8_t)flags;
/* Sanity check */
- HDassert(!fill->buf);
+ assert(!fill->buf);
} /* end if */
else if (fill->size > 0) {
/* Indicate that a fill value size is present */
@@ -475,7 +475,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
INT32ENCODE(p, fill->size);
/* Encode the fill value */
- HDassert(fill->buf);
+ assert(fill->buf);
H5_CHECK_OVERFLOW(fill->size, ssize_t, size_t);
H5MM_memcpy(p, fill->buf, (size_t)fill->size);
} /* end if */
@@ -484,7 +484,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
*p++ = (uint8_t)flags;
/* Sanity check */
- HDassert(!fill->buf);
+ assert(!fill->buf);
} /* end else */
} /* end else */
@@ -510,9 +510,9 @@ H5O__fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(p);
- HDassert(fill && NULL == fill->type);
+ assert(f);
+ assert(p);
+ assert(fill && NULL == fill->type);
UINT32ENCODE(p, fill->size);
if (fill->buf)
@@ -546,7 +546,7 @@ H5O__fill_copy(const void *_src, void *_dst)
FUNC_ENTER_PACKAGE
- HDassert(src);
+ assert(src);
if (!dst && NULL == (dst = H5FL_MALLOC(H5O_fill_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill message")
@@ -664,8 +664,8 @@ H5O__fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(fill);
+ assert(f);
+ assert(fill);
/* Determine size for different versions */
if (fill->version < H5O_FILL_VERSION_3) {
@@ -710,7 +710,7 @@ H5O__fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fill);
+ assert(fill);
FUNC_LEAVE_NOAPI(4 + (size_t)fill->size)
} /* end H5O__fill_old_size() */
@@ -735,7 +735,7 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(fill);
+ assert(fill);
if (fill->buf) {
if (fill->type && H5T_detect_class(fill->type, H5T_VLEN, FALSE) > 0) {
@@ -799,7 +799,7 @@ H5O__fill_reset(void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fill);
+ assert(fill);
/* Reset dynamic fields */
H5O_fill_reset_dyn(fill);
@@ -829,7 +829,7 @@ H5O__fill_free(void *fill)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fill);
+ assert(fill);
fill = H5FL_FREE(H5O_fill_t, fill);
@@ -859,8 +859,8 @@ H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, hb
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version allowed by the destination file's high bound */
@@ -891,81 +891,81 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(fill);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(fill);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:");
switch (fill->alloc_time) {
case H5D_ALLOC_TIME_EARLY:
- HDfprintf(stream, "Early\n");
+ fprintf(stream, "Early\n");
break;
case H5D_ALLOC_TIME_LATE:
- HDfprintf(stream, "Late\n");
+ fprintf(stream, "Late\n");
break;
case H5D_ALLOC_TIME_INCR:
- HDfprintf(stream, "Incremental\n");
+ fprintf(stream, "Incremental\n");
break;
case H5D_ALLOC_TIME_DEFAULT:
case H5D_ALLOC_TIME_ERROR:
default:
- HDfprintf(stream, "Unknown!\n");
+ fprintf(stream, "Unknown!\n");
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:");
switch (fill->fill_time) {
case H5D_FILL_TIME_ALLOC:
- HDfprintf(stream, "On Allocation\n");
+ fprintf(stream, "On Allocation\n");
break;
case H5D_FILL_TIME_NEVER:
- HDfprintf(stream, "Never\n");
+ fprintf(stream, "Never\n");
break;
case H5D_FILL_TIME_IFSET:
- HDfprintf(stream, "If Set\n");
+ fprintf(stream, "If Set\n");
break;
case H5D_FILL_TIME_ERROR:
default:
- HDfprintf(stream, "Unknown!\n");
+ fprintf(stream, "Unknown!\n");
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Value Defined:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Value Defined:");
H5P_is_fill_value_defined((const H5O_fill_t *)fill, &fill_status);
switch (fill_status) {
case H5D_FILL_VALUE_UNDEFINED:
- HDfprintf(stream, "Undefined\n");
+ fprintf(stream, "Undefined\n");
break;
case H5D_FILL_VALUE_DEFAULT:
- HDfprintf(stream, "Default\n");
+ fprintf(stream, "Default\n");
break;
case H5D_FILL_VALUE_USER_DEFINED:
- HDfprintf(stream, "User Defined\n");
+ fprintf(stream, "User Defined\n");
break;
case H5D_FILL_VALUE_ERROR:
default:
- HDfprintf(stream, "Unknown!\n");
+ fprintf(stream, "Unknown!\n");
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth, "Size:", fill->size);
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:");
+ fprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth, "Size:", fill->size);
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:");
if (fill->type) {
H5T_debug(fill->type, stream);
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
} /* end if */
else
- HDfprintf(stream, "<dataset type>\n");
+ fprintf(stream, "<dataset type>\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_debug() */
@@ -995,9 +995,9 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(fill);
- HDassert(dset_type);
- HDassert(fill_changed);
+ assert(fill);
+ assert(dset_type);
+ assert(fill_changed);
/* No-op cases */
if (!fill->buf || !fill->type || 0 == H5T_cmp(fill->type, dset_type, FALSE)) {
@@ -1089,8 +1089,8 @@ H5O_fill_set_version(H5F_t *f, H5O_fill_t *fill)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(fill);
+ assert(f);
+ assert(fill);
/* Upgrade to the version indicated by the file's low bound if higher */
version = MAX(fill->version, H5O_fill_ver_bounds[H5F_LOW_BOUND(f)]);
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 2348673..9716abb 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -157,7 +157,7 @@ H5O__oh_tag(const H5O_loc_t *oloc, haddr_t *tag)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(oloc);
+ assert(oloc);
/* Get object header for object */
if (NULL == (oh = H5O_protect(oloc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -372,8 +372,8 @@ H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(obj_loc);
- HDassert(vol_connector);
+ assert(obj_loc);
+ assert(vol_connector);
/* Get object's type */
type = H5I_get_type(oid);
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index 01cf3c3..94c20ee 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -95,8 +95,8 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate space for message */
if (NULL == (fsinfo = H5FL_CALLOC(H5O_fsinfo_t)))
@@ -231,9 +231,9 @@ H5O__fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(fsinfo);
+ assert(f);
+ assert(p);
+ assert(fsinfo);
*p++ = (uint8_t)fsinfo->version; /* message version */
*p++ = (uint8_t)fsinfo->strategy; /* File space strategy */
@@ -276,7 +276,7 @@ H5O__fsinfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(fsinfo);
+ assert(fsinfo);
if (!dest && NULL == (dest = H5FL_CALLOC(H5O_fsinfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -341,7 +341,7 @@ H5O__fsinfo_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_fsinfo_t, mesg);
@@ -368,54 +368,54 @@ H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(fsinfo);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(fsinfo);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "File space strategy:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "File space strategy:");
switch (fsinfo->strategy) {
case H5F_FSPACE_STRATEGY_FSM_AGGR:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_FSM_AGGR");
+ fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_FSM_AGGR");
break;
case H5F_FSPACE_STRATEGY_PAGE:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_PAGE");
+ fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_PAGE");
break;
case H5F_FSPACE_STRATEGY_AGGR:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_AGGR");
+ fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_AGGR");
break;
case H5F_FSPACE_STRATEGY_NONE:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_NONE");
+ fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_NONE");
break;
case H5F_FSPACE_STRATEGY_NTYPES:
default:
- HDfprintf(stream, "%s\n", "unknown");
+ fprintf(stream, "%s\n", "unknown");
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Free-space persist:", fsinfo->persist ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Free-space persist:", fsinfo->persist ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Free-space section threshold:", fsinfo->threshold);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Free-space section threshold:", fsinfo->threshold);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "File space page size:", fsinfo->page_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "File space page size:", fsinfo->page_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Page end metadata threshold:", fsinfo->pgend_meta_thres);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Page end metadata threshold:", fsinfo->pgend_meta_thres);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc);
if (fsinfo->persist) {
for (ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++)
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Free space manager address:", fsinfo->fs_addr[ptype - 1]);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Free space manager address:", fsinfo->fs_addr[ptype - 1]);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -442,7 +442,7 @@ H5O_fsinfo_set_version(H5F_libver_t low, H5F_libver_t high, H5O_fsinfo_t *fsinfo
/* Sanity check */
HDcompile_assert(N_FSINFO_VERSION_BOUNDS == H5F_LIBVER_NBOUNDS);
- HDassert(fsinfo);
+ assert(fsinfo);
version = H5O_FSINFO_VERSION_1;
@@ -482,7 +482,7 @@ H5O_fsinfo_check_version(H5F_libver_t high, H5O_fsinfo_t *fsinfo)
/* Sanity check */
HDcompile_assert(N_FSINFO_VERSION_BOUNDS == H5F_LIBVER_NBOUNDS);
- HDassert(fsinfo);
+ assert(fsinfo);
/* Check the version */
if (H5O_fsinfo_ver_bounds[high] == H5O_INVALID_VERSION || fsinfo->version > H5O_fsinfo_ver_bounds[high])
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index df45e53..78a74ea 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -91,8 +91,8 @@ H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -170,8 +170,8 @@ H5O__ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(p);
- HDassert(ginfo);
+ assert(p);
+ assert(ginfo);
/* Message version */
*p++ = H5O_GINFO_VERSION;
@@ -221,7 +221,7 @@ H5O__ginfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(ginfo);
+ assert(ginfo);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_ginfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -291,7 +291,7 @@ H5O__ginfo_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_ginfo_t, mesg);
@@ -318,18 +318,18 @@ H5O__ginfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(ginfo);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. compact links:", ginfo->max_compact);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. dense links:", ginfo->min_dense);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Estimated # of objects in group:", ginfo->est_num_entries);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Estimated length of object in group's name:", ginfo->est_name_len);
+ assert(f);
+ assert(ginfo);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. compact links:", ginfo->max_compact);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. dense links:", ginfo->min_dense);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Estimated # of objects in group:", ginfo->est_num_entries);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Estimated length of object in group's name:", ginfo->est_name_len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__ginfo_debug() */
diff --git a/src/H5Oint.c b/src/H5Oint.c
index f2f106b..590cfa2 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -221,8 +221,8 @@ H5O__set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_id
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Set the correct version to encode object header with */
if (store_msg_crt_idx || (oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED))
@@ -271,9 +271,9 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(loc);
- HDassert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ assert(f);
+ assert(loc);
+ assert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* create object header in freelist
* header version is set internally
@@ -317,8 +317,8 @@ H5O_create_ohdr(H5F_t *f, hid_t ocpl_id)
FUNC_ENTER_NOAPI(NULL)
- HDassert(f);
- HDassert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ assert(f);
+ assert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* Check for invalid access request */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -383,10 +383,10 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(loc_out);
- HDassert(oh);
- HDassert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ assert(f);
+ assert(loc_out);
+ assert(oh);
+ assert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* Allocate at least a reasonable size for the object header */
size_hint = H5O_ALIGN_F(f, MAX(H5O_MIN_SIZE, size_hint));
@@ -565,12 +565,12 @@ H5O_open(H5O_loc_t *loc)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(loc);
- HDassert(loc->file);
+ assert(loc);
+ assert(loc->file);
#ifdef H5O_DEBUG
if (H5DEBUG(O))
- HDfprintf(H5DEBUG(O), "> %" PRIuHADDR "\n", loc->addr);
+ fprintf(H5DEBUG(O), "> %" PRIuHADDR "\n", loc->addr);
#endif
/* Turn off the variable for holding file or increment open-lock counters */
@@ -607,8 +607,8 @@ H5O_open_name(const H5G_loc_t *loc, const char *name, H5I_type_t *opened_type)
FUNC_ENTER_NOAPI(NULL)
/* Check args */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -658,7 +658,7 @@ H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -707,7 +707,7 @@ H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -746,14 +746,14 @@ H5O_open_by_loc(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
FUNC_ENTER_NOAPI(NULL)
- HDassert(obj_loc);
+ assert(obj_loc);
/* Get the object class for this location */
if (NULL == (obj_class = H5O__obj_class(obj_loc->oloc)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object class")
/* Call the object class's 'open' routine */
- HDassert(obj_class->open);
+ assert(obj_class->open);
if (NULL == (ret_value = obj_class->open(obj_loc, opened_type)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object")
@@ -781,9 +781,9 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_NOPEN_OBJS(loc->file) > 0);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_NOPEN_OBJS(loc->file) > 0);
/* Set the file_closed flag to the default value.
* This flag lets downstream code know if the file struct is
@@ -800,10 +800,10 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/)
#ifdef H5O_DEBUG
if (H5DEBUG(O)) {
if (FALSE == H5F_ID_EXISTS(loc->file) && 1 == H5F_NREFS(loc->file))
- HDfprintf(H5DEBUG(O), "< %" PRIuHADDR " auto %lu remaining\n", loc->addr,
- (unsigned long)H5F_NOPEN_OBJS(loc->file));
+ fprintf(H5DEBUG(O), "< %" PRIuHADDR " auto %lu remaining\n", loc->addr,
+ (unsigned long)H5F_NOPEN_OBJS(loc->file));
else
- HDfprintf(H5DEBUG(O), "< %" PRIuHADDR "\n", loc->addr);
+ fprintf(H5DEBUG(O), "< %" PRIuHADDR "\n", loc->addr);
}
#endif
@@ -848,9 +848,9 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(deleted);
+ assert(f);
+ assert(oh);
+ assert(deleted);
/* Check for adjusting link count */
if (adjust) {
@@ -964,9 +964,9 @@ H5O_link(const H5O_loc_t *loc, int adjust)
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1013,11 +1013,11 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
FUNC_ENTER_NOAPI_TAG(loc->addr, NULL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
+ assert(loc);
+ assert(loc->file);
/* prot_flags may only contain the H5AC__READ_ONLY_FLAG */
- HDassert((prot_flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((prot_flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Check for valid address */
if (!H5F_addr_defined(loc->addr))
@@ -1037,7 +1037,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
udata.common.f = loc->file;
udata.common.file_intent = file_intent;
udata.common.merged_null_msgs = 0;
- HDmemset(&cont_msg_info, 0, sizeof(cont_msg_info));
+ memset(&cont_msg_info, 0, sizeof(cont_msg_info));
udata.common.cont_msg_info = &cont_msg_info;
udata.common.addr = loc->addr;
@@ -1053,8 +1053,8 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
/* Sanity check - we should only have continuation messages to process
* when the object header is actually loaded from the file.
*/
- HDassert(udata.made_attempt == TRUE);
- HDassert(cont_msg_info.msgs);
+ assert(udata.made_attempt == TRUE);
+ assert(cont_msg_info.msgs);
/* Construct the user data for protecting chunks */
chk_udata.decoding = TRUE;
@@ -1086,9 +1086,9 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk")
/* Sanity check */
- HDassert(chk_proxy->oh == oh);
- HDassert(chk_proxy->chunkno == chkcnt);
- HDassert(oh->nchunks == (chkcnt + 1));
+ assert(chk_proxy->oh == oh);
+ assert(chk_proxy->chunkno == chkcnt);
+ assert(oh->nchunks == (chkcnt + 1));
/* Release the chunk from the cache */
if (H5AC_unprotect(loc->file, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, chk_proxy,
@@ -1135,7 +1135,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(oh->swmr_write);
+ assert(oh->swmr_write);
/* Iterate over chunks > 0 */
for (u = 1; u < oh->nchunks; u++) {
@@ -1202,7 +1202,7 @@ H5O_pin(const H5O_loc_t *loc)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(loc);
+ assert(loc);
/* Get header */
if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
@@ -1246,7 +1246,7 @@ H5O_unpin(H5O_t *oh)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(oh);
+ assert(oh);
/* Decrement the reference count on the object header */
/* (which will unpin it, if appropriate) */
@@ -1280,15 +1280,15 @@ H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(oh);
+ assert(loc);
+ assert(oh);
/* Unpin the other chunks */
if (oh->chunks_pinned && oh->nchunks > 1) {
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(oh->swmr_write);
+ assert(oh->swmr_write);
/* Iterate over chunks > 0 */
for (u = 1; u < oh->nchunks; u++) {
@@ -1336,8 +1336,8 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Check if this object header is tracking times */
if (oh->flags & H5O_HDR_STORE_TIMES) {
@@ -1433,7 +1433,7 @@ H5O_touch(const H5O_loc_t *loc, hbool_t force)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
+ assert(loc);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
@@ -1476,8 +1476,8 @@ H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Look for existing message */
for (idx = 0; idx < oh->nmesgs; idx++)
@@ -1549,8 +1549,8 @@ H5O_delete(H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_TAG(addr, FAIL)
/* Check args */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Set up the object location */
loc.file = f;
@@ -1608,8 +1608,8 @@ H5O__delete_oh(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Walk through the list of object header messages, asking each one to
* delete any file space used
@@ -1682,8 +1682,8 @@ H5O__obj_type_real(const H5O_t *oh, H5O_type_t *obj_type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(oh);
- HDassert(obj_type);
+ assert(oh);
+ assert(obj_type);
/* Look up class for object header */
if (NULL == (obj_class = H5O__obj_class_real(oh))) {
@@ -1758,7 +1758,7 @@ H5O__obj_class_real(const H5O_t *oh)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oh);
+ assert(oh);
/* Test whether entry qualifies as a particular type of object */
/* (Note: loop is in reverse order, to test specific objects first) */
@@ -1859,10 +1859,10 @@ H5O_loc_reset(H5O_loc_t *loc)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Clear the object location to an empty state */
- HDmemset(loc, 0, sizeof(H5O_loc_t));
+ memset(loc, 0, sizeof(H5O_loc_t));
loc->addr = HADDR_UNDEF;
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1887,9 +1887,9 @@ H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
- HDassert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
+ assert(src);
+ assert(dst);
+ assert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
/* Invoke correct routine */
if (depth == H5_COPY_SHALLOW)
@@ -1922,8 +1922,8 @@ H5O_loc_copy_shallow(H5O_loc_t *dst, H5O_loc_t *src)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Copy the top level information */
H5MM_memcpy(dst, src, sizeof(H5O_loc_t));
@@ -1955,8 +1955,8 @@ H5O_loc_copy_deep(H5O_loc_t *dst, const H5O_loc_t *src)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Copy the top level information */
H5MM_memcpy(dst, src, sizeof(H5O_loc_t));
@@ -1990,8 +1990,8 @@ H5O_loc_hold_file(H5O_loc_t *loc)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(loc);
- HDassert(loc->file);
+ assert(loc);
+ assert(loc->file);
/* If this location is not already holding its file open, do so. */
if (!loc->holding_file) {
@@ -2025,7 +2025,7 @@ H5O_loc_free(H5O_loc_t *loc)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* If this location is holding its file open try to close the file. */
if (loc->holding_file) {
@@ -2063,11 +2063,11 @@ H5O_get_hdr_info(const H5O_loc_t *loc, H5O_hdr_info_t *hdr)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(hdr);
+ assert(loc);
+ assert(hdr);
/* Reset the object header info structure */
- HDmemset(hdr, 0, sizeof(*hdr));
+ memset(hdr, 0, sizeof(*hdr));
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2107,8 +2107,8 @@ H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(oh);
- HDassert(hdr);
+ assert(oh);
+ assert(hdr);
/* Set the version for the object header */
hdr->version = oh->version;
@@ -2159,7 +2159,7 @@ H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
} /* end for */
/* Sanity check that all the bytes are accounted for */
- HDassert(hdr->space.total == (hdr->space.free + hdr->space.meta + hdr->space.mesg));
+ assert(hdr->space.total == (hdr->space.free + hdr->space.meta + hdr->space.mesg));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__get_hdr_info_real() */
@@ -2187,8 +2187,8 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields)
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
/* Check args */
- HDassert(loc);
- HDassert(oinfo);
+ assert(loc);
+ assert(oinfo);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2296,8 +2296,8 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
/* Check args */
- HDassert(loc);
- HDassert(oinfo);
+ assert(loc);
+ assert(oinfo);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2308,7 +2308,7 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class")
/* Reset the object info structure */
- HDmemset(oinfo, 0, sizeof(*oinfo));
+ memset(oinfo, 0, sizeof(*oinfo));
/* Get the information for the object header, if requested */
if (fields & H5O_NATIVE_INFO_HDR)
@@ -2357,8 +2357,8 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(oc_plist);
+ assert(loc);
+ assert(oc_plist);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2415,8 +2415,8 @@ H5O_get_nlinks(const H5O_loc_t *loc, hsize_t *nlinks)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(nlinks);
+ assert(loc);
+ assert(nlinks);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2454,17 +2454,17 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(f);
- HDassert(obj_type >= H5O_TYPE_GROUP && obj_type <= H5O_TYPE_NAMED_DATATYPE);
- HDassert(crt_info);
- HDassert(obj_loc);
+ assert(f);
+ assert(obj_type >= H5O_TYPE_GROUP && obj_type <= H5O_TYPE_NAMED_DATATYPE);
+ assert(crt_info);
+ assert(obj_loc);
/* Iterate through the object classes */
for (u = 0; u < NELMTS(H5O_obj_class_g); u++) {
/* Check for correct type of object to create */
if (H5O_obj_class_g[u]->type == obj_type) {
/* Call the object class's 'create' routine */
- HDassert(H5O_obj_class_g[u]->create);
+ assert(H5O_obj_class_g[u]->create);
if (NULL == (ret_value = H5O_obj_class_g[u]->create(f, crt_info, obj_loc)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object")
@@ -2472,7 +2472,7 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc
break;
} /* end if */
} /* end for */
- HDassert(ret_value);
+ assert(ret_value);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2501,8 +2501,8 @@ H5O_get_oh_addr(const H5O_t *oh)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
- HDassert(oh->chunk);
+ assert(oh);
+ assert(oh->chunk);
FUNC_LEAVE_NOAPI(oh->chunk[0].addr)
} /* end H5O_get_oh_addr() */
@@ -2519,7 +2519,7 @@ uint8_t
H5O_get_oh_flags(const H5O_t *oh)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
+ assert(oh);
FUNC_LEAVE_NOAPI(oh->flags); /* flags can be 0 */
} /* H5O_get_oh_flags() */
@@ -2539,8 +2539,8 @@ time_t
H5O_get_oh_mtime(const H5O_t *oh)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
- HDassert(oh->mtime);
+ assert(oh);
+ assert(oh->mtime);
FUNC_LEAVE_NOAPI(oh->mtime);
} /* H5O_get_oh_mtime() */
@@ -2556,8 +2556,8 @@ uint8_t
H5O_get_oh_version(const H5O_t *oh)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
- HDassert(oh->version);
+ assert(oh);
+ assert(oh->version);
FUNC_LEAVE_NOAPI(oh->version);
} /* H5O_get_oh_version() */
@@ -2583,7 +2583,7 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, unsigned *rc, H5O_type_t *otype)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
+ assert(loc);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2653,9 +2653,9 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(name);
- HDassert(linfo);
- HDassert(udata);
+ assert(name);
+ assert(linfo);
+ assert(udata);
/* Check if this is a hard link */
if (linfo->type == H5L_TYPE_HARD) {
@@ -2770,10 +2770,10 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or
FUNC_ENTER_PACKAGE
/* Portably initialize user data struct to zeros */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
/* Check args */
- HDassert(loc);
+ assert(loc);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -2892,7 +2892,7 @@ H5O__inc_rc(H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
+ assert(oh);
/* Pin the object header when the reference count goes above 0 */
if (oh->rc == 0)
@@ -2963,7 +2963,7 @@ H5O_dec_rc_by_loc(const H5O_loc_t *loc)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
+ assert(loc);
/* Get header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -3000,7 +3000,7 @@ H5O_get_proxy(const H5O_t *oh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(oh);
+ assert(oh);
FUNC_LEAVE_NOAPI(oh->proxy)
} /* end H5O_get_proxy() */
@@ -3026,8 +3026,8 @@ H5O__free(H5O_t *oh, hbool_t H5_ATTR_NDEBUG_UNUSED force)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(0 == oh->rc);
+ assert(oh);
+ assert(0 == oh->rc);
/* Destroy chunks */
if (oh->chunk) {
@@ -3048,14 +3048,14 @@ H5O__free(H5O_t *oh, hbool_t H5_ATTR_NDEBUG_UNUSED force)
if (oh->ndecode_dirtied && oh->mesg[u].dirty)
oh->ndecode_dirtied--;
else if (!force)
- HDassert(oh->mesg[u].dirty == 0);
+ assert(oh->mesg[u].dirty == 0);
#endif /* NDEBUG */
H5O__msg_free_mesg(&oh->mesg[u]);
} /* end for */
/* Make sure we accounted for all the messages dirtied by decoding */
- HDassert(!oh->ndecode_dirtied);
+ assert(!oh->ndecode_dirtied);
oh->mesg = (H5O_mesg_t *)H5FL_SEQ_FREE(H5O_mesg_t, oh->mesg);
} /* end if */
@@ -3087,7 +3087,7 @@ H5O__reset_info2(H5O_info2_t *oinfo)
FUNC_ENTER_PACKAGE_NOERR;
/* Reset the passed-in info struct */
- HDmemset(oinfo, 0, sizeof(H5O_info2_t));
+ memset(oinfo, 0, sizeof(H5O_info2_t));
oinfo->type = H5O_TYPE_UNKNOWN;
oinfo->token = H5O_TOKEN_UNDEF;
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 645ad73..6a9e624 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -91,8 +91,8 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (mesg = H5FL_CALLOC(H5O_layout_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed")
@@ -798,9 +798,9 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(p);
+ assert(f);
+ assert(mesg);
+ assert(p);
/* Message version */
*p++ = (uint8_t)((mesg->version < H5O_LAYOUT_VERSION_3) ? H5O_LAYOUT_VERSION_3 : mesg->version);
@@ -819,7 +819,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
if (mesg->storage.u.compact.buf)
H5MM_memcpy(p, mesg->storage.u.compact.buf, mesg->storage.u.compact.size);
else
- HDmemset(p, 0, mesg->storage.u.compact.size);
+ memset(p, 0, mesg->storage.u.compact.size);
p += mesg->storage.u.compact.size;
} /* end if */
break;
@@ -835,7 +835,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
case H5D_CHUNKED:
if (mesg->version < H5O_LAYOUT_VERSION_4) {
/* Number of dimensions */
- HDassert(mesg->u.chunk.ndims > 0 && mesg->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(mesg->u.chunk.ndims > 0 && mesg->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
*p++ = (uint8_t)mesg->u.chunk.ndims;
/* B-tree address */
@@ -850,11 +850,11 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
*p++ = mesg->u.chunk.flags;
/* Number of dimensions */
- HDassert(mesg->u.chunk.ndims > 0 && mesg->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(mesg->u.chunk.ndims > 0 && mesg->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
*p++ = (uint8_t)mesg->u.chunk.ndims;
/* Encoded # of bytes for each chunk dimension */
- HDassert(mesg->u.chunk.enc_bytes_per_dim > 0 && mesg->u.chunk.enc_bytes_per_dim <= 8);
+ assert(mesg->u.chunk.enc_bytes_per_dim > 0 && mesg->u.chunk.enc_bytes_per_dim <= 8);
*p++ = (uint8_t)mesg->u.chunk.enc_bytes_per_dim;
/* Dimension sizes */
@@ -956,7 +956,7 @@ H5O__layout_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Allocate destination message, if necessary */
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_layout_t)))
@@ -971,7 +971,7 @@ H5O__layout_copy(const void *_mesg, void *_dest)
/* Deep copy the buffer for compact datasets also */
if (mesg->storage.u.compact.size > 0) {
/* Sanity check */
- HDassert(mesg->storage.u.compact.buf);
+ assert(mesg->storage.u.compact.buf);
/* Allocate memory for the raw data */
if (NULL == (dest->storage.u.compact.buf = H5MM_malloc(dest->storage.u.compact.size)))
@@ -982,7 +982,7 @@ H5O__layout_copy(const void *_mesg, void *_dest)
dest->storage.u.compact.size);
} /* end if */
else
- HDassert(dest->storage.u.compact.buf == NULL);
+ assert(dest->storage.u.compact.buf == NULL);
break;
case H5D_CONTIGUOUS:
@@ -1042,8 +1042,8 @@ H5O__layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
/* Compute serialized size */
/* (including possibly compact data) */
@@ -1110,7 +1110,7 @@ H5O__layout_free(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
/* Free resources within the message */
H5O__layout_reset(mesg);
@@ -1141,9 +1141,9 @@ H5O__layout_delete(H5F_t *f, H5O_t *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(open_oh);
- HDassert(mesg);
+ assert(f);
+ assert(open_oh);
+ assert(mesg);
/* Perform different actions, depending on the type of storage */
switch (mesg->type) {
@@ -1203,8 +1203,8 @@ H5O__layout_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version allowed by the destination file's high bound */
@@ -1243,9 +1243,9 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(layout_src);
- HDassert(file_dst);
+ assert(file_src);
+ assert(layout_src);
+ assert(file_dst);
/* Copy the layout information */
if (NULL == (layout_dst = (H5O_layout_t *)H5O__layout_copy(layout_src, NULL)))
@@ -1345,102 +1345,101 @@ H5O__layout_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
switch (mesg->type) {
case H5D_CHUNKED:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Chunked");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Chunked");
/* Chunk # of dims & size */
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Number of dimensions:", (unsigned long)(mesg->u.chunk.ndims));
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Size:");
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Number of dimensions:", (unsigned long)(mesg->u.chunk.ndims));
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Size:");
for (u = 0; u < (size_t)mesg->u.chunk.ndims; u++)
- HDfprintf(stream, "%s%lu", u ? ", " : "", (unsigned long)(mesg->u.chunk.dim[u]));
- HDfprintf(stream, "}\n");
+ fprintf(stream, "%s%lu", u ? ", " : "", (unsigned long)(mesg->u.chunk.dim[u]));
+ fprintf(stream, "}\n");
/* Index information */
switch (mesg->u.chunk.idx_type) {
case H5D_CHUNK_IDX_BTREE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v1 B-tree");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v1 B-tree");
break;
case H5D_CHUNK_IDX_NONE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Implicit");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Implicit");
break;
case H5D_CHUNK_IDX_SINGLE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Single Chunk");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Single Chunk");
break;
case H5D_CHUNK_IDX_FARRAY:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Fixed Array");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Fixed Array");
/* (Should print the fixed array creation parameters) */
break;
case H5D_CHUNK_IDX_EARRAY:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Extensible Array");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Extensible Array");
/* (Should print the extensible array creation parameters) */
break;
case H5D_CHUNK_IDX_BT2:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v2 B-tree");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v2 B-tree");
/* (Should print the v2-Btree creation parameters) */
break;
case H5D_CHUNK_IDX_NTYPES:
default:
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Index Type:", "Unknown",
- (unsigned)mesg->u.chunk.idx_type);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Index Type:", "Unknown",
+ (unsigned)mesg->u.chunk.idx_type);
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Index address:", mesg->storage.u.chunk.idx_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Index address:", mesg->storage.u.chunk.idx_addr);
break;
case H5D_CONTIGUOUS:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Contiguous");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Data address:", mesg->storage.u.contig.addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Data Size:", mesg->storage.u.contig.size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Contiguous");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Data address:", mesg->storage.u.contig.addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Data Size:", mesg->storage.u.contig.size);
break;
case H5D_COMPACT:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Compact");
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Data Size:", mesg->storage.u.compact.size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Compact");
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Size:", mesg->storage.u.compact.size);
break;
case H5D_VIRTUAL:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Virtual");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Global heap address:", mesg->storage.u.virt.serial_list_hobjid.addr);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Global heap index:", mesg->storage.u.virt.serial_list_hobjid.idx);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Virtual");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Global heap address:", mesg->storage.u.virt.serial_list_hobjid.addr);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Global heap index:", mesg->storage.u.virt.serial_list_hobjid.idx);
for (u = 0; u < mesg->storage.u.virt.list_nused; u++) {
- HDfprintf(stream, "%*sMapping %zu:\n", indent, "", u);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
- "Virtual selection:", "<Not yet implemented>");
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
- "Source file name:", mesg->storage.u.virt.list[u].source_file_name);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
- "Source dataset name:", mesg->storage.u.virt.list[u].source_dset_name);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
- "Source selection:", "<Not yet implemented>");
+ fprintf(stream, "%*sMapping %zu:\n", indent, "", u);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
+ "Virtual selection:", "<Not yet implemented>");
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
+ "Source file name:", mesg->storage.u.virt.list[u].source_file_name);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
+ "Source dataset name:", mesg->storage.u.virt.list[u].source_dset_name);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
+ "Source selection:", "<Not yet implemented>");
} /* end for */
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Type:", "Unknown",
- (unsigned)mesg->type);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Type:", "Unknown",
+ (unsigned)mesg->type);
break;
} /* end switch */
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index a82be72..ce5de17 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -109,8 +109,8 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Check input buffer before decoding version and index flags */
if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end))
@@ -194,9 +194,9 @@ H5O__linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(linfo);
+ assert(f);
+ assert(p);
+ assert(linfo);
/* Message version */
*p++ = H5O_LINFO_VERSION;
@@ -220,7 +220,7 @@ H5O__linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
if (linfo->index_corder)
H5F_addr_encode(f, &p, linfo->corder_bt2_addr);
else
- HDassert(!H5F_addr_defined(linfo->corder_bt2_addr));
+ assert(!H5F_addr_defined(linfo->corder_bt2_addr));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__linfo_encode() */
@@ -249,7 +249,7 @@ H5O__linfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(linfo);
+ assert(linfo);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_linfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -316,7 +316,7 @@ H5O__linfo_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_linfo_t, mesg);
@@ -344,8 +344,8 @@ H5O__linfo_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* If the group is using "dense" link storage, delete it */
if (H5F_addr_defined(linfo->fheap_addr))
@@ -383,8 +383,8 @@ H5O__linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *fi
FUNC_ENTER_PACKAGE_TAG(H5AC__COPIED_TAG)
/* check args */
- HDassert(linfo_src);
- HDassert(cpy_info);
+ assert(linfo_src);
+ assert(cpy_info);
/* Copy the source message */
if (NULL == (linfo_dst = (H5O_linfo_t *)H5O__linfo_copy(linfo_src, NULL)))
@@ -449,8 +449,8 @@ H5O__linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(src_lnk);
- HDassert(udata);
+ assert(src_lnk);
+ assert(udata);
/* Copy the link (and the object it points to) */
if (H5L__link_copy_file(udata->dst_oloc->file, src_lnk, udata->src_oloc, &dst_lnk, udata->cpy_info) < 0)
@@ -499,12 +499,12 @@ H5O__linfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_l
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(src_oloc && src_oloc->file);
- HDassert(linfo_src);
- HDassert(dst_oloc && dst_oloc->file);
- HDassert(H5F_addr_defined(dst_oloc->addr));
- HDassert(linfo_dst);
- HDassert(cpy_info);
+ assert(src_oloc && src_oloc->file);
+ assert(linfo_src);
+ assert(dst_oloc && dst_oloc->file);
+ assert(H5F_addr_defined(dst_oloc->addr));
+ assert(linfo_dst);
+ assert(cpy_info);
/* If we are performing a 'shallow hierarchy' copy, get out now */
if (cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
@@ -550,25 +550,25 @@ H5O__linfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(linfo);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Track creation order of links:", linfo->track_corder ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Index creation order of links:", linfo->index_corder ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of links:", linfo->nlinks);
- HDfprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth,
- "Max. creation order value:", linfo->max_corder);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' link storage fractal heap address:", linfo->fheap_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr);
+ assert(f);
+ assert(linfo);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Track creation order of links:", linfo->track_corder ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Index creation order of links:", linfo->index_corder ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of links:", linfo->nlinks);
+ fprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth,
+ "Max. creation order value:", linfo->max_corder);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' link storage fractal heap address:", linfo->fheap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__linfo_debug() */
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 160b1d0..9c0a0bb 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -114,8 +114,8 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
@@ -301,13 +301,13 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(lnk);
+ assert(f);
+ assert(p);
+ assert(lnk);
/* Get length of link's name */
len = (uint64_t)HDstrlen(lnk->name);
- HDassert(len > 0);
+ assert(len > 0);
/* encode */
*p++ = H5O_LINK_VERSION;
@@ -357,7 +357,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
break;
default:
- HDassert(0 && "bad size for name");
+ assert(0 && "bad size for name");
} /* end switch */
/* Store the link's name */
@@ -374,7 +374,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
case H5L_TYPE_SOFT:
/* Store the link value */
len = (uint16_t)HDstrlen(lnk->u.soft.name);
- HDassert(len > 0);
+ assert(len > 0);
UINT16ENCODE(p, len)
H5MM_memcpy(p, lnk->u.soft.name, (size_t)len);
p += len;
@@ -385,7 +385,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
case H5L_TYPE_ERROR:
case H5L_TYPE_MAX:
default:
- HDassert(lnk->type >= H5L_TYPE_UD_MIN && lnk->type <= H5L_TYPE_MAX);
+ assert(lnk->type >= H5L_TYPE_UD_MIN && lnk->type <= H5L_TYPE_MAX);
/* Store the user-supplied data, however long it is */
len = (uint16_t)lnk->u.ud.size;
@@ -425,7 +425,7 @@ H5O__link_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(lnk);
+ assert(lnk);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_link_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -433,7 +433,7 @@ H5O__link_copy(const void *_mesg, void *_dest)
*dest = *lnk;
/* Duplicate the link's name */
- HDassert(lnk->name);
+ assert(lnk->name);
if (NULL == (dest->name = H5MM_xstrdup(lnk->name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't duplicate link name")
@@ -531,7 +531,7 @@ H5O__link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
case H5L_TYPE_EXTERNAL:
case H5L_TYPE_MAX:
default: /* Default is user-defined link type */
- HDassert(lnk->type >= H5L_TYPE_UD_MIN);
+ assert(lnk->type >= H5L_TYPE_UD_MIN);
ret_value += 2 + /* User-defined data size */
lnk->u.ud.size; /* User-defined data */
break;
@@ -593,7 +593,7 @@ H5O__link_free(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(lnk);
+ assert(lnk);
lnk = H5FL_FREE(H5O_link_t, lnk);
@@ -622,8 +622,8 @@ H5O_link_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(lnk);
+ assert(f);
+ assert(lnk);
/* Check for adjusting the link count when the link is removed */
/* Adjust the reference count of the object when a hard link is removed */
@@ -633,7 +633,7 @@ H5O_link_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
/* Construct object location for object, in order to decrement it's ref count */
H5O_loc_reset(&oloc);
oloc.file = f;
- HDassert(H5F_addr_defined(lnk->u.hard.addr));
+ assert(H5F_addr_defined(lnk->u.hard.addr));
oloc.addr = lnk->u.hard.addr;
/* Decrement the ref count for the object */
@@ -690,8 +690,8 @@ H5O__link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(deleted);
- HDassert(cpy_info);
+ assert(deleted);
+ assert(cpy_info);
/* If we are performing a 'shallow hierarchy' copy, and this link won't
* be included in the final group, indicate that it should be deleted
@@ -729,9 +729,9 @@ H5O__link_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t H5_A
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(link_src);
- HDassert(cpy_info);
- HDassert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
+ assert(link_src);
+ assert(cpy_info);
+ assert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
/* Sanity check source link type */
if (link_src->type > H5L_TYPE_SOFT && link_src->type < H5L_TYPE_UD_MIN)
@@ -769,13 +769,13 @@ H5O__link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(link_src);
- HDassert(dst_oloc);
- HDassert(H5F_addr_defined(dst_oloc->addr));
- HDassert(dst_oloc->file);
- HDassert(link_dst);
- HDassert(cpy_info);
- HDassert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
+ assert(link_src);
+ assert(dst_oloc);
+ assert(H5F_addr_defined(dst_oloc->addr));
+ assert(dst_oloc->file);
+ assert(link_dst);
+ assert(cpy_info);
+ assert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
/* Copy the link (and the object it points to) */
if (H5L__link_copy_file(dst_oloc->file, link_src, src_oloc, link_dst, cpy_info) < 0)
@@ -806,37 +806,37 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(lnk);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Type:",
- (lnk->type == H5L_TYPE_HARD
- ? "Hard"
- : (lnk->type == H5L_TYPE_SOFT
- ? "Soft"
- : (lnk->type == H5L_TYPE_EXTERNAL
- ? "External"
- : (lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown")))));
+ assert(f);
+ assert(lnk);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Type:",
+ (lnk->type == H5L_TYPE_HARD
+ ? "Hard"
+ : (lnk->type == H5L_TYPE_SOFT
+ ? "Soft"
+ : (lnk->type == H5L_TYPE_EXTERNAL
+ ? "External"
+ : (lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown")))));
if (lnk->corder_valid)
- HDfprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, "Creation Order:", lnk->corder);
+ fprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, "Creation Order:", lnk->corder);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Name Character Set:",
- (lnk->cset == H5T_CSET_ASCII ? "ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown")));
- HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Name:", lnk->name);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Name Character Set:",
+ (lnk->cset == H5T_CSET_ASCII ? "ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown")));
+ fprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Name:", lnk->name);
/* Display link-specific information */
switch (lnk->type) {
case H5L_TYPE_HARD:
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Object address:", lnk->u.hard.addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Object address:", lnk->u.hard.addr);
break;
case H5L_TYPE_SOFT:
- HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Value:", lnk->u.soft.name);
+ fprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Value:", lnk->u.soft.name);
break;
case H5L_TYPE_ERROR:
@@ -848,13 +848,13 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
const char *objname =
(const char *)lnk->u.ud.udata + (HDstrlen((const char *)lnk->u.ud.udata) + 1);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "External File Name:", (const char *)lnk->u.ud.udata);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "External Object Name:", objname);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "External File Name:", (const char *)lnk->u.ud.udata);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "External Object Name:", objname);
} /* end if */
else {
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "User-Defined Link Size:", lnk->u.ud.size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "User-Defined Link Size:", lnk->u.ud.size);
} /* end else */
} /* end if */
else
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index e0a0654..1474e90 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -106,10 +106,10 @@ H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsi
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
- HDassert(mesg);
+ assert(loc);
+ assert(type_id < NELMTS(H5O_msg_class_g));
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(mesg);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -152,14 +152,14 @@ H5O_msg_append_oh(H5F_t *f, H5O_t *oh, unsigned type_id, unsigned mesg_flags, un
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(oh);
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
- HDassert(mesg);
+ assert(type);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(mesg);
/* Append new message to object header */
if (H5O__msg_append_real(f, oh, type, mesg_flags, update_flags, mesg) < 0)
@@ -193,11 +193,11 @@ H5O__msg_append_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
- HDassert(mesg);
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(mesg);
/* Allocate space for a new message */
if (H5O__msg_alloc(f, oh, type, &mesg_flags, mesg, &idx) < 0)
@@ -243,15 +243,15 @@ H5O_msg_write(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsig
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(type);
+ assert(mesg);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -296,14 +296,14 @@ H5O_msg_write_oh(H5F_t *f, H5O_t *oh, unsigned type_id, unsigned mesg_flags, uns
FUNC_ENTER_NOAPI_TAG(oh->cache_info.addr, FAIL)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(oh);
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(type);
+ assert(mesg);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Call the "real" modify routine */
if (H5O__msg_write_real(f, oh, type, mesg_flags, update_flags, mesg) < 0)
@@ -343,12 +343,12 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(type != H5O_MSG_ATTR);
- HDassert(mesg);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(type != H5O_MSG_ATTR);
+ assert(mesg);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Locate message of correct type */
for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
@@ -367,13 +367,13 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m
/* First, sanity check to make sure it's not a committed message;
* these can't ever be modified.
*/
- HDassert(((H5O_shared_t *)idx_msg->native)->type != H5O_SHARE_TYPE_COMMITTED);
+ assert(((H5O_shared_t *)idx_msg->native)->type != H5O_SHARE_TYPE_COMMITTED);
/* Also, sanity check that a message doesn't switch status from being
* shared (or shareable) to being unshareable. (Which could cause
* a message to increase in size in the object header)
*/
- HDassert(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE));
+ assert(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE));
/* Remove the old message from the SOHM index */
/* (It would be more efficient to try to share the message first, then
@@ -441,10 +441,10 @@ H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI_TAG(loc->addr, NULL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -493,11 +493,11 @@ H5O_msg_read_oh(H5F_t *f, H5O_t *oh, unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI_NOINIT
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(oh);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Scan through the messages looking for the right one */
for (idx = 0; idx < oh->nmesgs; idx++)
@@ -547,9 +547,9 @@ H5O_msg_reset(unsigned type_id, void *native)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Call the "real" reset routine */
if (H5O__msg_reset_real(type, native) < 0)
@@ -581,7 +581,7 @@ H5O__msg_reset_real(const H5O_msg_class_t *type, void *native)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(type);
+ assert(type);
if (native) {
if (type->reset) {
@@ -589,7 +589,7 @@ H5O__msg_reset_real(const H5O_msg_class_t *type, void *native)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "reset method failed")
} /* end if */
else
- HDmemset(native, 0, type->native_size);
+ memset(native, 0, type->native_size);
} /* end if */
done:
@@ -620,9 +620,9 @@ H5O_msg_free(unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Call the "real" free routine */
ret_value = H5O_msg_free_real(type, mesg);
@@ -648,7 +648,7 @@ H5O__msg_free_mesg(H5O_mesg_t *mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Free any native information */
mesg->native = H5O_msg_free_real(mesg->type, mesg->native);
@@ -676,7 +676,7 @@ H5O_msg_free_real(const H5O_msg_class_t *type, void *msg_native)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(type);
+ assert(type);
if (msg_native) {
H5O__msg_reset_real(type, msg_native);
@@ -713,10 +713,10 @@ H5O_msg_copy(unsigned type_id, const void *mesg, void *dst)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(mesg);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(mesg);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Call the message class's copy routine */
if (NULL == (ret_value = (type->copy)(mesg, dst)))
@@ -752,12 +752,12 @@ H5O_msg_count(const H5O_loc_t *loc, unsigned type_id)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Load the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -798,8 +798,8 @@ H5O__msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(oh);
- HDassert(type);
+ assert(oh);
+ assert(type);
/* Loop over all messages, counting the ones of the type looked for */
for (u = ret_value = 0; u < oh->nmesgs; u++)
@@ -835,9 +835,9 @@ H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id)
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
- HDassert(loc);
- HDassert(loc->file);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(type_id < NELMTS(H5O_msg_class_g));
/* Load the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -881,10 +881,10 @@ H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(oh);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Scan through the messages looking for the right one */
for (u = 0; u < oh->nmesgs; u++)
@@ -924,13 +924,13 @@ H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -974,13 +974,13 @@ H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, H5O_oper
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1022,7 +1022,7 @@ H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, un
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Check for callback routine */
if (udata->op) {
@@ -1087,9 +1087,9 @@ H5O__msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int seque
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
+ assert(f);
+ assert(oh);
+ assert(type);
/* Make certain we are allowed to modify the file */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -1157,13 +1157,13 @@ H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, const H5O_mesg_operator_
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(op);
+ assert(type);
+ assert(op);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -1223,11 +1223,11 @@ H5O__msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const H5
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(op);
- HDassert(op->u.app_op);
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(op);
+ assert(op->u.app_op);
/* Iterate over messages */
for (sequence = 0, idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs && !ret_value; idx++, idx_msg++) {
@@ -1300,12 +1300,12 @@ H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared, const
FUNC_ENTER_NOAPI(0)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->raw_size);
- HDassert(f);
- HDassert(mesg);
+ assert(type);
+ assert(type->raw_size);
+ assert(f);
+ assert(mesg);
/* Compute the raw data size for the mesg */
if (0 == (ret_value = (type->raw_size)(f, disable_shared, mesg)))
@@ -1342,12 +1342,12 @@ H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id, const void *mesg
FUNC_ENTER_NOAPI(0)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->raw_size);
- HDassert(f);
- HDassert(mesg);
+ assert(type);
+ assert(type->raw_size);
+ assert(f);
+ assert(mesg);
/* Get the property list */
if (NULL == (ocpl = (H5P_genplist_t *)H5I_object(ocpl_id)))
@@ -1400,12 +1400,12 @@ H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *m
FUNC_ENTER_NOAPI(0)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->raw_size);
- HDassert(f);
- HDassert(mesg);
+ assert(type);
+ assert(type->raw_size);
+ assert(f);
+ assert(mesg);
/* Compute the raw data size for the mesg */
if ((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0)
@@ -1450,10 +1450,10 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
+ assert(type);
+ assert(mesg);
/* If there is a can_share callback, use it */
if (type->can_share)
@@ -1468,7 +1468,7 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
/* If the message is shareable, both copy_file and post_copy_file must be
* defined */
- HDassert((type->post_copy_file && type->copy_file) || ret_value == FALSE);
+ assert((type->post_copy_file && type->copy_file) || ret_value == FALSE);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_can_share() */
@@ -1496,9 +1496,9 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Otherwise, the message can be shared if messages of this type are
* shareable in general; i.e., if they have the "is_sharable" flag
@@ -1538,10 +1538,10 @@ H5O_msg_is_shared(unsigned type_id, const void *mesg)
else
#endif /* H5O_ENABLE_BOGUS */
{
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
+ assert(type);
+ assert(mesg);
/* If messages in a class aren't shareable, then obviously this message isn't shared! :-) */
if (type->share_flags & H5O_SHARE_IS_SHARABLE)
@@ -1575,13 +1575,13 @@ H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE);
- HDassert(mesg);
- HDassert(share);
- HDassert(share->type != H5O_SHARE_TYPE_UNSHARED);
+ assert(type);
+ assert(type->share_flags & H5O_SHARE_IS_SHARABLE);
+ assert(mesg);
+ assert(share);
+ assert(share->type != H5O_SHARE_TYPE_UNSHARED);
/* If there's a special action for this class that needs to be performed
* when setting the shared component, do that
@@ -1621,13 +1621,13 @@ H5O_msg_reset_share(unsigned H5_ATTR_NDEBUG_UNUSED type_id, void *mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
- HDassert(H5O_msg_class_g[type_id]); /* map the type ID to the actual type object */
- HDassert(H5O_msg_class_g[type_id]->share_flags & H5O_SHARE_IS_SHARABLE);
- HDassert(mesg);
+ assert(type_id < NELMTS(H5O_msg_class_g));
+ assert(H5O_msg_class_g[type_id]); /* map the type ID to the actual type object */
+ assert(H5O_msg_class_g[type_id]->share_flags & H5O_SHARE_IS_SHARABLE);
+ assert(mesg);
/* Reset the shared component in the message to zero. */
- HDmemset((H5O_shared_t *)mesg, 0, sizeof(H5O_shared_t));
+ memset((H5O_shared_t *)mesg, 0, sizeof(H5O_shared_t));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_msg_reset_share() */
@@ -1654,11 +1654,11 @@ H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
- HDassert(crt_idx);
+ assert(type);
+ assert(mesg);
+ assert(crt_idx);
/* If there is a "get_crt_index callback, use it */
if (type->get_crt_index) {
@@ -1697,10 +1697,10 @@ H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Encode */
if ((type->encode)(f, disable_shared, buf, mesg) < 0)
@@ -1735,10 +1735,10 @@ H5O_msg_decode(H5F_t *f, H5O_t *open_oh, unsigned type_id, size_t buf_size, cons
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(f);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* decode */
if (NULL == (ret_value = (type->decode)(f, open_oh, 0, &ioflags, buf_size, buf)))
@@ -1775,13 +1775,13 @@ H5O__msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, void *native_sr
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(type);
- HDassert(type->copy_file);
- HDassert(file_src);
- HDassert(native_src);
- HDassert(file_dst);
- HDassert(recompute_size);
- HDassert(cpy_info);
+ assert(type);
+ assert(type->copy_file);
+ assert(file_src);
+ assert(native_src);
+ assert(file_dst);
+ assert(recompute_size);
+ assert(cpy_info);
/* The copy_file callback will return an H5O_shared_t only if the message
* to be copied is a committed datatype.
@@ -1818,13 +1818,13 @@ H5O__msg_alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned *mesg_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(mesg_flags);
- HDassert(!(*mesg_flags & H5O_MSG_FLAG_SHARED));
- HDassert(type);
- HDassert(native);
- HDassert(mesg_idx);
+ assert(f);
+ assert(oh);
+ assert(mesg_flags);
+ assert(!(*mesg_flags & H5O_MSG_FLAG_SHARED));
+ assert(type);
+ assert(native);
+ assert(mesg_idx);
/* Check if message is already shared */
if ((shared_mesg = H5O_msg_is_shared(type->id, native)) < 0)
@@ -1884,11 +1884,11 @@ H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, con
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(type->copy);
- HDassert(mesg);
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(type->copy);
+ assert(mesg);
/* Protect chunk */
if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, idx_msg->chunkno)))
@@ -1957,10 +1957,10 @@ H5O_msg_delete(H5F_t *f, H5O_t *open_oh, unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* delete */
if ((type->del) && (type->del)(f, open_oh, mesg) < 0)
@@ -1993,9 +1993,9 @@ H5O__delete_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(oh);
+ assert(f);
+ assert(mesg);
+ assert(oh);
/* Check if there is a file space deletion callback for this type of message */
if (type->del) {
@@ -2033,8 +2033,8 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Point into message's chunk's image */
p = mesg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
@@ -2050,7 +2050,7 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
UINT16ENCODE(p, msg_id)
else
*p++ = (uint8_t)msg_id;
- HDassert(mesg->raw_size < H5O_MESG_MAX_SIZE);
+ assert(mesg->raw_size < H5O_MESG_MAX_SIZE);
UINT16ENCODE(p, mesg->raw_size);
*p++ = mesg->flags;
@@ -2066,15 +2066,15 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
if (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
UINT16ENCODE(p, mesg->crt_idx);
} /* end else */
- HDassert(p == mesg->raw);
+ assert(p == mesg->raw);
#ifndef NDEBUG
/* Make certain that null messages aren't in chunks w/gaps */
if (H5O_NULL_ID == msg_id)
- HDassert(oh->chunk[mesg->chunkno].gap == 0);
+ assert(oh->chunk[mesg->chunkno].gap == 0);
else
/* Non-null messages should always have a native pointer */
- HDassert(mesg->native);
+ assert(mesg->native);
#endif /* NDEBUG */
/* Encode the message itself, if it's not an "unknown" message */
@@ -2084,10 +2084,10 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
* encode a Shared Object message instead of the object
* which is being shared.
*/
- HDassert(mesg->raw >= oh->chunk[mesg->chunkno].image);
- HDassert(mesg->raw_size == H5O_ALIGN_OH(oh, mesg->raw_size));
- HDassert(mesg->raw + mesg->raw_size <=
- oh->chunk[mesg->chunkno].image + (oh->chunk[mesg->chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert(mesg->raw >= oh->chunk[mesg->chunkno].image);
+ assert(mesg->raw_size == H5O_ALIGN_OH(oh, mesg->raw_size));
+ assert(mesg->raw + mesg->raw_size <=
+ oh->chunk[mesg->chunkno].image + (oh->chunk[mesg->chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh)));
#ifndef NDEBUG
/* Sanity check that the message won't overwrite past it's allocated space */
{
@@ -2095,10 +2095,10 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
msg_size = mesg->type->raw_size(f, FALSE, mesg->native);
msg_size = H5O_ALIGN_OH(oh, msg_size);
- HDassert(msg_size <= mesg->raw_size);
+ assert(msg_size <= mesg->raw_size);
}
#endif /* NDEBUG */
- HDassert(mesg->type->encode);
+ assert(mesg->type->encode);
if ((mesg->type->encode)(f, FALSE, mesg->raw, mesg->native) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message")
} /* end if */
@@ -2132,8 +2132,8 @@ H5O__flush_msgs(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Encode any dirty messages */
for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
@@ -2178,12 +2178,12 @@ H5O_msg_get_flags(const H5O_loc_t *loc, unsigned type_id, uint8_t *flags)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 8205a01..f89b670 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -118,8 +118,8 @@ H5O__mtime_new_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
@@ -177,8 +177,8 @@ H5O__mtime_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Buffer should have 14 message bytes and 2 reserved bytes */
if (H5_IS_BUFFER_OVERFLOW(p, 16, p_end))
@@ -188,7 +188,7 @@ H5O__mtime_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message")
/* Convert YYYYMMDDhhmmss UTC to a time_t. */
- HDmemset(&tm, 0, sizeof tm);
+ memset(&tm, 0, sizeof tm);
tm.tm_year = (p[0] - '0') * 1000 + (p[1] - '0') * 100 + (p[2] - '0') * 10 + (p[3] - '0') - 1900;
tm.tm_mon = (p[4] - '0') * 10 + (p[5] - '0') - 1;
tm.tm_mday = (p[6] - '0') * 10 + (p[7] - '0');
@@ -232,9 +232,9 @@ H5O__mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* Version */
*p++ = H5O_MTIME_VERSION;
@@ -272,9 +272,9 @@ H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* encode */
tm = HDgmtime(mesg);
@@ -309,7 +309,7 @@ H5O__mtime_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = H5FL_MALLOC(time_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
@@ -347,8 +347,8 @@ H5O__mtime_new_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disabl
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
FUNC_LEAVE_NOAPI(8)
} /* end H5O__mtime_new_size() */
@@ -377,8 +377,8 @@ H5O__mtime_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
FUNC_LEAVE_NOAPI(16)
} /* end H5O__mtime_size() */
@@ -400,7 +400,7 @@ H5O__mtime_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(time_t, mesg);
@@ -429,17 +429,17 @@ H5O__mtime_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* debug */
tm = HDlocaltime(mesg);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Time:", buf);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__mtime_debug() */
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 10ea365..f364b5a 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -79,8 +79,8 @@ H5O__name_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -121,9 +121,9 @@ H5O__name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(mesg && mesg->s);
+ assert(f);
+ assert(p);
+ assert(mesg && mesg->s);
/* encode */
HDstrcpy((char *)p, mesg->s);
@@ -156,7 +156,7 @@ H5O__name_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -203,8 +203,8 @@ H5O__name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
ret_value = mesg->s ? HDstrlen(mesg->s) + 1 : 0;
@@ -232,7 +232,7 @@ H5O__name_reset(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* reset */
mesg->s = (char *)H5MM_xfree(mesg->s);
@@ -260,13 +260,13 @@ H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", mesg->s);
+ fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", mesg->s);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__name_debug() */
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index d0e3c26..2ef2e38 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -166,7 +166,7 @@
unsigned ioflags = (IOF); \
\
/* Decode the message */ \
- HDassert(msg_type->decode); \
+ assert(msg_type->decode); \
if (NULL == ((MSG)->native = (msg_type->decode)((F), (OH), (MSG)->flags, &ioflags, (MSG)->raw_size, \
(MSG)->raw))) \
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, ERR, "unable to decode message") \
@@ -181,7 +181,7 @@
\
/* Set the message's "shared info", if it's shareable */ \
if ((MSG)->flags & H5O_MSG_FLAG_SHAREABLE) { \
- HDassert(msg_type->share_flags &H5O_SHARE_IS_SHARABLE); \
+ assert(msg_type->share_flags &H5O_SHARE_IS_SHARABLE); \
H5O_UPDATE_SHARED((H5O_shared_t *)(MSG)->native, H5O_SHARE_TYPE_HERE, (F), msg_type->id, \
(MSG)->crt_idx, (OH)->chunk[0].addr) \
} /* end if */ \
diff --git a/src/H5Opline.c b/src/H5Opline.c
index bc66165..1aa7cf1 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -117,8 +117,8 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate space for I/O pipeline message */
if (NULL == (pline = H5FL_CALLOC(H5O_pline_t)))
@@ -275,8 +275,8 @@ H5O__pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p /*out*/, const void *mesg)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(p);
- HDassert(mesg);
+ assert(p);
+ assert(mesg);
/* Message header */
*p++ = (uint8_t)pline->version;
@@ -533,18 +533,18 @@ H5O__pline_reset(void *mesg)
* other API calls so DO NOT ASSUME THAT ANY VALUES ARE SANE.
*/
- HDassert(pline);
+ assert(pline);
/* Free the filter information and array */
if (pline->filter) {
/* Free information for each filter */
for (i = 0; i < pline->nused; i++) {
if (pline->filter[i].name && pline->filter[i].name != pline->filter[i]._name)
- HDassert((HDstrlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN);
+ assert((HDstrlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN);
if (pline->filter[i].name != pline->filter[i]._name)
pline->filter[i].name = (char *)H5MM_xfree(pline->filter[i].name);
if (pline->filter[i].cd_values && pline->filter[i].cd_values != pline->filter[i]._cd_values)
- HDassert(pline->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES);
+ assert(pline->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES);
if (pline->filter[i].cd_values != pline->filter[i]._cd_values)
pline->filter[i].cd_values = (unsigned *)H5MM_xfree(pline->filter[i].cd_values);
} /* end for */
@@ -579,7 +579,7 @@ H5O__pline_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_pline_t, mesg);
@@ -612,9 +612,9 @@ H5O__pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(pline_src);
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(pline_src);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version allowed by the destination file's high bound */
@@ -655,14 +655,14 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(pline);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(pline);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Number of filters:", pline->nused,
- pline->nalloc);
+ fprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Number of filters:", pline->nused,
+ pline->nalloc);
/* Loop over all the filters */
for (size_t i = 0; i < pline->nused; i++) {
@@ -671,29 +671,29 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
*/
char name[64];
- HDmemset(name, 0, 64);
+ memset(name, 0, 64);
HDsnprintf(name, sizeof(name), "Filter at position %zu", i);
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
- HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter identification:", (unsigned)(pline->filter[i].id));
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
+ fprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter identification:", (unsigned)(pline->filter[i].id));
if (pline->filter[i].name)
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter name:", pline->filter[i].name);
+ fprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter name:", pline->filter[i].name);
else
- HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), "Filter name:");
- HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Flags:", pline->filter[i].flags);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Num CD values:", pline->filter[i].cd_nelmts);
+ fprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), "Filter name:");
+ fprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Flags:", pline->filter[i].flags);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Num CD values:", pline->filter[i].cd_nelmts);
/* Filter parameters */
for (size_t j = 0; j < pline->filter[i].cd_nelmts; j++) {
char field_name[32];
HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
- HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name,
- pline->filter[i].cd_values[j]);
+ fprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name,
+ pline->filter[i].cd_values[j]);
}
}
@@ -720,8 +720,8 @@ H5O_pline_set_version(H5F_t *f, H5O_pline_t *pline)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(pline);
+ assert(f);
+ assert(pline);
/* Upgrade to the version indicated by the file's low bound if higher */
version = MAX(pline->version, H5O_pline_ver_bounds[H5F_LOW_BOUND(f)]);
diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c
index f4d3b5c..b0910e6 100644
--- a/src/H5Orefcount.c
+++ b/src/H5Orefcount.c
@@ -88,8 +88,8 @@ H5O__refcount_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -137,9 +137,9 @@ H5O__refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(refcount);
+ assert(f);
+ assert(p);
+ assert(refcount);
/* Message version */
*p++ = H5O_REFCOUNT_VERSION;
@@ -174,7 +174,7 @@ H5O__refcount_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(refcount);
+ assert(refcount);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_refcount_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -235,7 +235,7 @@ H5O__refcount_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_refcount_t, mesg);
@@ -264,8 +264,8 @@ H5O__refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_U
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(deleted);
- HDassert(cpy_info);
+ assert(deleted);
+ assert(cpy_info);
/* Always delete this message when copying objects between files. Let
* the copy routine set the correct ref. count.
@@ -295,13 +295,13 @@ H5O__refcount_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(refcount);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(refcount);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", (unsigned)*refcount);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", (unsigned)*refcount);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__refcount_debug() */
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 9bf5d6f..3e4dd87 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -115,8 +115,8 @@ H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UN
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (sdim = H5FL_CALLOC(H5S_extent_t)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "dataspace structure allocation failed")
@@ -255,13 +255,13 @@ H5O__sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(sdim);
+ assert(f);
+ assert(p);
+ assert(sdim);
/* Version */
- HDassert(sdim->version > 0);
- HDassert(sdim->type != H5S_NULL || sdim->version >= H5O_SDSPACE_VERSION_2);
+ assert(sdim->version > 0);
+ assert(sdim->type != H5S_NULL || sdim->version >= H5O_SDSPACE_VERSION_2);
*p++ = (uint8_t)sdim->version;
/* Rank */
@@ -323,7 +323,7 @@ H5O__sdspace_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = H5FL_CALLOC(H5S_extent_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -425,7 +425,7 @@ H5O__sdspace_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5S_extent_t, mesg);
@@ -458,10 +458,10 @@ H5O__sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(src_space_extent);
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(file_src);
+ assert(src_space_extent);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version allowed by the destination file's high bound */
@@ -514,35 +514,35 @@ H5O__sdspace_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(sdim);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(sdim);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Rank:", (unsigned long)(sdim->rank));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Rank:", (unsigned long)(sdim->rank));
if (sdim->rank > 0) {
unsigned u; /* local counting variable */
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
for (u = 0; u < sdim->rank; u++)
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->size[u]);
- HDfprintf(stream, "}\n");
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->size[u]);
+ fprintf(stream, "}\n");
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:");
if (sdim->max) {
- HDfprintf(stream, "{");
+ fprintf(stream, "{");
for (u = 0; u < sdim->rank; u++) {
if (H5S_UNLIMITED == sdim->max[u])
- HDfprintf(stream, "%sUNLIM", u ? ", " : "");
+ fprintf(stream, "%sUNLIM", u ? ", " : "");
else
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->max[u]);
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->max[u]);
} /* end for */
- HDfprintf(stream, "}\n");
+ fprintf(stream, "}\n");
} /* end if */
else
- HDfprintf(stream, "CONSTANT\n");
+ fprintf(stream, "CONSTANT\n");
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 22d71a0..62ff8d6 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -110,15 +110,15 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(shared);
- HDassert(type);
- HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE);
+ assert(f);
+ assert(shared);
+ assert(type);
+ assert(type->share_flags & H5O_SHARE_IS_SHARABLE);
/* This message could have a heap ID (SOHM) or the address of an object
* header on disk (named datatype)
*/
- HDassert(H5O_IS_STORED_SHARED(shared->type));
+ assert(H5O_IS_STORED_SHARED(shared->type));
/* Check for implicit shared object header message */
if (shared->type == H5O_SHARE_TYPE_SOHM) {
@@ -157,7 +157,7 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t
else {
H5O_loc_t oloc; /* Location for object header where message is stored */
- HDassert(shared->type == H5O_SHARE_TYPE_COMMITTED);
+ assert(shared->type == H5O_SHARE_TYPE_COMMITTED);
/* Build the object location for the shared message's object header */
oloc.file = f;
@@ -219,8 +219,8 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(shared);
+ assert(f);
+ assert(shared);
/* Check for type of shared message */
if (shared->type == H5O_SHARE_TYPE_COMMITTED) {
@@ -259,7 +259,7 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_
if (H5O__link_oh(f, adjust, open_oh, &deleted) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count")
- HDassert(!deleted);
+ assert(!deleted);
}
else
/* The shared message is in another object header */
@@ -267,7 +267,7 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count")
} /* end if */
else {
- HDassert(shared->type == H5O_SHARE_TYPE_SOHM || shared->type == H5O_SHARE_TYPE_HERE);
+ assert(shared->type == H5O_SHARE_TYPE_SOHM || shared->type == H5O_SHARE_TYPE_HERE);
/* Check for decrementing reference count on shared message */
if (adjust < 0) {
@@ -309,9 +309,9 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(buf);
- HDassert(type);
+ assert(f);
+ assert(buf);
+ assert(type);
/* Version */
version = *buf++;
@@ -346,7 +346,7 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b
* Otherwise, it is a named datatype, so copy an H5O_loc_t.
*/
if (sh_mesg.type == H5O_SHARE_TYPE_SOHM) {
- HDassert(version >= H5O_SHARED_VERSION_3);
+ assert(version >= H5O_SHARED_VERSION_3);
H5MM_memcpy(&sh_mesg.u.heap_id, buf, sizeof(sh_mesg.u.heap_id));
} /* end if */
else {
@@ -393,9 +393,9 @@ H5O__shared_encode(const H5F_t *f, uint8_t *buf /*out*/, const H5O_shared_t *sh_
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(buf);
- HDassert(sh_mesg);
+ assert(f);
+ assert(buf);
+ assert(sh_mesg);
/* If this message is shared in the heap, we need to use version 3 of the
* encoding and encode the SHARED_IN_HEAP flag.
@@ -403,7 +403,7 @@ H5O__shared_encode(const H5F_t *f, uint8_t *buf /*out*/, const H5O_shared_t *sh_
if (sh_mesg->type == H5O_SHARE_TYPE_SOHM)
version = H5O_SHARED_VERSION_LATEST;
else {
- HDassert(sh_mesg->type == H5O_SHARE_TYPE_COMMITTED);
+ assert(sh_mesg->type == H5O_SHARE_TYPE_COMMITTED);
version = H5O_SHARED_VERSION_2; /* version 1 is no longer used */
} /* end else */
@@ -439,8 +439,8 @@ H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(dst);
- HDassert(src);
+ assert(dst);
+ assert(src);
/* copy */
*dst = *src;
@@ -474,7 +474,7 @@ H5O__shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg)
(size_t)H5F_SIZEOF_ADDR(f); /* Sharing by another obj hdr */
} /* end if */
else {
- HDassert(sh_mesg->type == H5O_SHARE_TYPE_SOHM);
+ assert(sh_mesg->type == H5O_SHARE_TYPE_SOHM);
ret_value = 1 + /* Version */
1 + /* Type field */
H5O_FHEAP_ID_LEN; /* Shared in the heap */
@@ -503,8 +503,8 @@ H5O__shared_delete(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_sh
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(sh_mesg);
+ assert(f);
+ assert(sh_mesg);
/*
* Committed datatypes increment the OH of the original message when they
@@ -544,8 +544,8 @@ H5O__shared_link(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_shar
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(sh_mesg);
+ assert(f);
+ assert(sh_mesg);
/* Increment the reference count on the shared object */
if (H5O__shared_link_adj(f, open_oh, type, sh_mesg, 1) < 0)
@@ -582,13 +582,13 @@ H5O__shared_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, H5F_t *file_dst,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(file_dst);
- HDassert(mesg_type);
- HDassert(shared_src);
- HDassert(shared_dst);
- HDassert(recompute_size);
- HDassert(cpy_info);
+ assert(file_src);
+ assert(file_dst);
+ assert(mesg_type);
+ assert(shared_src);
+ assert(shared_dst);
+ assert(recompute_size);
+ assert(cpy_info);
/* Committed shared messages create a shared message at the destination
* and also copy the committed object that they point to.
@@ -647,9 +647,9 @@ H5O__shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(shared_src);
- HDassert(shared_dst);
+ assert(f);
+ assert(shared_src);
+ assert(shared_dst);
/* Copy the target of committed messages, try to share others */
if (shared_src->type == H5O_SHARE_TYPE_COMMITTED) {
@@ -694,35 +694,35 @@ H5O__shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
switch (mesg->type) {
case H5O_SHARE_TYPE_UNSHARED:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Unshared");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Unshared");
break;
case H5O_SHARE_TYPE_COMMITTED:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Obj Hdr");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Object address:", mesg->u.loc.oh_addr);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Obj Hdr");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Object address:", mesg->u.loc.oh_addr);
break;
case H5O_SHARE_TYPE_SOHM:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "SOHM");
- HDfprintf(stream, "%*s%-*s %016llx\n", indent, "", fwidth,
- "Heap ID:", (unsigned long long)mesg->u.heap_id.val);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "SOHM");
+ fprintf(stream, "%*s%-*s %016llx\n", indent, "", fwidth,
+ "Heap ID:", (unsigned long long)mesg->u.heap_id.val);
break;
case H5O_SHARE_TYPE_HERE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Here");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Here");
break;
default:
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Shared Message type:", "Unknown",
- (unsigned)mesg->type);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Shared Message type:", "Unknown",
+ (unsigned)mesg->type);
} /* end switch */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index b7d2353..d10b298 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -110,7 +110,7 @@ H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mes
#endif /* H5O_SHARED_ENCODE_REAL */
/* Sanity check */
- HDassert(sh_mesg->type == H5O_SHARE_TYPE_UNSHARED || sh_mesg->msg_type_id == H5O_SHARED_TYPE->id);
+ assert(sh_mesg->type == H5O_SHARE_TYPE_UNSHARED || sh_mesg->msg_type_id == H5O_SHARED_TYPE->id);
/* Check for message stored elsewhere */
if (H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) {
@@ -349,11 +349,11 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const
FUNC_ENTER_NOAPI_NOINIT
- HDassert(oloc_src->file);
- HDassert(oloc_dst->file);
- HDassert(mesg_src);
- HDassert(mesg_dst);
- HDassert(cpy_info);
+ assert(oloc_src->file);
+ assert(oloc_dst->file);
+ assert(mesg_src);
+ assert(mesg_dst);
+ assert(cpy_info);
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -384,8 +384,7 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const
/* Make sure that if the source or destination is committed, both are
* committed */
- HDassert((shared_src->type == H5O_SHARE_TYPE_COMMITTED) ==
- (shared_dst->type == H5O_SHARE_TYPE_COMMITTED));
+ assert((shared_src->type == H5O_SHARE_TYPE_COMMITTED) == (shared_dst->type == H5O_SHARE_TYPE_COMMITTED));
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c
index 8510c6e..5c9a199 100644
--- a/src/H5Oshmesg.c
+++ b/src/H5Oshmesg.c
@@ -75,8 +75,8 @@ H5O__shmesg_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (mesg = (H5O_shmesg_table_t *)H5MM_calloc(sizeof(H5O_shmesg_table_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
@@ -125,9 +125,9 @@ H5O__shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* Store version, table address, and number of indexes */
*p++ = (uint8_t)mesg->version;
@@ -161,7 +161,7 @@ H5O__shmesg_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = (H5O_shmesg_table_t *)H5MM_malloc(sizeof(H5O_shmesg_table_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
@@ -199,7 +199,7 @@ H5O__shmesg_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
+ assert(f);
ret_value = (size_t)(1 + /* Version number */
H5F_SIZEOF_ADDR(f) + /* Table address */
@@ -228,16 +228,16 @@ H5O__shmesg_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
- "Shared message table address:", mesg->addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of indexes:", mesg->nindexes);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
+ "Shared message table address:", mesg->addr);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of indexes:", mesg->nindexes);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__shmesg_debug() */
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 2428f06..f107b2b 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -90,8 +90,8 @@ H5O__stab_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (stab = H5FL_CALLOC(H5O_stab_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -133,9 +133,9 @@ H5O__stab_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(stab);
+ assert(f);
+ assert(p);
+ assert(stab);
/* encode */
H5F_addr_encode(f, &p, stab->btree_addr);
@@ -169,7 +169,7 @@ H5O__stab_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(stab);
+ assert(stab);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_stab_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
@@ -229,7 +229,7 @@ H5O__stab_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_stab_t, mesg);
@@ -256,8 +256,8 @@ H5O__stab_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
/* Free the file space for the symbol table */
if (H5G__stab_delete(f, (const H5O_stab_t *)mesg) < 0)
@@ -295,8 +295,8 @@ H5O__stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(stab_src);
- HDassert(file_dst);
+ assert(stab_src);
+ assert(file_dst);
/* Allocate space for the destination stab */
if (NULL == (stab_dst = H5FL_MALLOC(H5O_stab_t)))
@@ -356,11 +356,11 @@ H5O__stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(stab_src);
- HDassert(H5F_addr_defined(dst_oloc->addr));
- HDassert(dst_oloc->file);
- HDassert(stab_dst);
- HDassert(cpy_info);
+ assert(stab_src);
+ assert(H5F_addr_defined(dst_oloc->addr));
+ assert(dst_oloc->file);
+ assert(stab_dst);
+ assert(cpy_info);
/* If we are performing a 'shallow hierarchy' copy, get out now */
if (cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
@@ -401,15 +401,15 @@ H5O__stab_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(stab);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(stab);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "B-tree address:", stab->btree_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "B-tree address:", stab->btree_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Name heap address:", stab->heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Name heap address:", stab->heap_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__stab_debug() */
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 143286c..b1cfb90 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -117,7 +117,7 @@ H5O__is_attr_dense_test(hid_t oid)
/* Check if dense storage is being used */
if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
- HDassert(H5O__msg_count_real(oh, H5O_MSG_ATTR) == 0);
+ assert(H5O__msg_count_real(oh, H5O_MSG_ATTR) == 0);
ret_value = TRUE;
} /* end if */
@@ -194,7 +194,7 @@ H5O__is_attr_empty_test(hid_t oid)
/* Check for using dense storage */
if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
- HDassert(nattrs == 0);
+ assert(nattrs == 0);
/* Set metadata tag in API context */
H5_BEGIN_TAG(loc->addr);
@@ -214,10 +214,10 @@ H5O__is_attr_empty_test(hid_t oid)
} /* end if */
/* Verify that attribute count in object header is correct */
- HDassert(nattrs == ainfo.nattrs);
+ assert(nattrs == ainfo.nattrs);
} /* end if */
else
- HDassert(nattrs == 0);
+ assert(nattrs == 0);
} /* end if */
/* Set the return value */
@@ -296,7 +296,7 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
/* Check for using dense storage */
if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
- HDassert(obj_nattrs == 0);
+ assert(obj_nattrs == 0);
/* Set metadata tag in API context */
H5_BEGIN_TAG(loc->addr);
@@ -314,7 +314,7 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
} /* end if */
/* Verify that attribute count in object header is correct */
- HDassert(obj_nattrs == ainfo.nattrs);
+ assert(obj_nattrs == ainfo.nattrs);
} /* end if */
/* Set the number of attributes */
@@ -535,7 +535,7 @@ H5O__expunge_chunks_test(const H5O_loc_t *loc)
/* Safety check */
nchunks = oh->nchunks;
- HDassert(0 < nchunks && nchunks < NELMTS(chk_addr));
+ assert(0 < nchunks && nchunks < NELMTS(chk_addr));
/* Iterate over all the chunks, saving the chunk addresses */
for (u = 0; u < oh->nchunks; u++)
@@ -585,8 +585,8 @@ H5O__get_rc_test(const H5O_loc_t *loc, unsigned *rc)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(rc);
+ assert(loc);
+ assert(rc);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
diff --git a/src/H5Ounknown.c b/src/H5Ounknown.c
index 38b07a1..2d2dc2b 100644
--- a/src/H5Ounknown.c
+++ b/src/H5Ounknown.c
@@ -75,7 +75,7 @@ H5O__unknown_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_unknown_t, mesg);
diff --git a/src/H5P.c b/src/H5P.c
index c66e723..3aea232 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -434,7 +434,7 @@ H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value, H5P_p
/* Substitute the new property class in the ID */
if (NULL == (old_pclass = (H5P_genclass_t *)H5I_subst(cls_id, pclass)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID")
- HDassert(old_pclass == orig_pclass);
+ assert(old_pclass == orig_pclass);
/* Close the previous class */
if (H5P__close_class(old_pclass) < 0)
@@ -1124,8 +1124,8 @@ H5P__iterate_cb(H5P_genprop_t *prop, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(prop);
- HDassert(udata);
+ assert(prop);
+ assert(udata);
/* Call the user's callback routine */
ret_value = (*udata->iter_func)(udata->id, prop->name, udata->iter_data);
diff --git a/src/H5PB.c b/src/H5PB.c
index 069ee19..54a6a3a 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -78,8 +78,8 @@
#define H5PB__INSERT_LRU(page_buf, page_ptr) \
{ \
- HDassert(page_buf); \
- HDassert(page_ptr); \
+ assert(page_buf); \
+ assert(page_ptr); \
/* insert the entry at the head of the list. */ \
H5PB__PREPEND((page_ptr), (page_buf)->LRU_head_ptr, (page_buf)->LRU_tail_ptr, \
(page_buf)->LRU_list_len) \
@@ -87,8 +87,8 @@
#define H5PB__REMOVE_LRU(page_buf, page_ptr) \
{ \
- HDassert(page_buf); \
- HDassert(page_ptr); \
+ assert(page_buf); \
+ assert(page_ptr); \
/* remove the entry from the list. */ \
H5PB__REMOVE((page_ptr), (page_buf)->LRU_head_ptr, (page_buf)->LRU_tail_ptr, \
(page_buf)->LRU_list_len) \
@@ -96,8 +96,8 @@
#define H5PB__MOVE_TO_TOP_LRU(page_buf, page_ptr) \
{ \
- HDassert(page_buf); \
- HDassert(page_ptr); \
+ assert(page_buf); \
+ assert(page_ptr); \
/* Remove entry and insert at the head of the list. */ \
H5PB__REMOVE((page_ptr), (page_buf)->LRU_head_ptr, (page_buf)->LRU_tail_ptr, \
(page_buf)->LRU_list_len) \
@@ -163,7 +163,7 @@ H5PB_reset_stats(H5PB_t *page_buf)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(page_buf);
+ assert(page_buf);
page_buf->accesses[0] = 0;
page_buf->accesses[1] = 0;
@@ -205,7 +205,7 @@ H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2], u
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(page_buf);
+ assert(page_buf);
accesses[0] = page_buf->accesses[0];
accesses[1] = page_buf->accesses[1];
@@ -240,29 +240,29 @@ H5PB_print_stats(const H5PB_t *page_buf)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(page_buf);
-
- HDprintf("PAGE BUFFER STATISTICS:\n");
-
- HDprintf("******* METADATA\n");
- HDprintf("\t Total Accesses: %u\n", page_buf->accesses[0]);
- HDprintf("\t Hits: %u\n", page_buf->hits[0]);
- HDprintf("\t Misses: %u\n", page_buf->misses[0]);
- HDprintf("\t Evictions: %u\n", page_buf->evictions[0]);
- HDprintf("\t Bypasses: %u\n", page_buf->bypasses[0]);
- HDprintf("\t Hit Rate = %f%%\n",
- ((double)page_buf->hits[0] / (page_buf->accesses[0] - page_buf->bypasses[0])) * 100);
- HDprintf("*****************\n\n");
-
- HDprintf("******* RAWDATA\n");
- HDprintf("\t Total Accesses: %u\n", page_buf->accesses[1]);
- HDprintf("\t Hits: %u\n", page_buf->hits[1]);
- HDprintf("\t Misses: %u\n", page_buf->misses[1]);
- HDprintf("\t Evictions: %u\n", page_buf->evictions[1]);
- HDprintf("\t Bypasses: %u\n", page_buf->bypasses[1]);
- HDprintf("\t Hit Rate = %f%%\n",
- ((double)page_buf->hits[1] / (page_buf->accesses[1] - page_buf->bypasses[0])) * 100);
- HDprintf("*****************\n\n");
+ assert(page_buf);
+
+ printf("PAGE BUFFER STATISTICS:\n");
+
+ printf("******* METADATA\n");
+ printf("\t Total Accesses: %u\n", page_buf->accesses[0]);
+ printf("\t Hits: %u\n", page_buf->hits[0]);
+ printf("\t Misses: %u\n", page_buf->misses[0]);
+ printf("\t Evictions: %u\n", page_buf->evictions[0]);
+ printf("\t Bypasses: %u\n", page_buf->bypasses[0]);
+ printf("\t Hit Rate = %f%%\n",
+ ((double)page_buf->hits[0] / (page_buf->accesses[0] - page_buf->bypasses[0])) * 100);
+ printf("*****************\n\n");
+
+ printf("******* RAWDATA\n");
+ printf("\t Total Accesses: %u\n", page_buf->accesses[1]);
+ printf("\t Hits: %u\n", page_buf->hits[1]);
+ printf("\t Misses: %u\n", page_buf->misses[1]);
+ printf("\t Evictions: %u\n", page_buf->evictions[1]);
+ printf("\t Bypasses: %u\n", page_buf->bypasses[1]);
+ printf("\t Hit Rate = %f%%\n",
+ ((double)page_buf->hits[1] / (page_buf->accesses[1] - page_buf->bypasses[0])) * 100);
+ printf("*****************\n\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_print_stats */
@@ -287,7 +287,7 @@ H5PB_create(H5F_shared_t *f_sh, size_t size, unsigned page_buf_min_meta_perc, un
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Check args */
if (f_sh->fs_strategy != H5F_FSPACE_STRATEGY_PAGE)
@@ -364,8 +364,8 @@ H5PB__flush_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(page_entry);
- HDassert(f_sh);
+ assert(page_entry);
+ assert(f_sh);
/* Flush the page if it's dirty */
if (page_entry->is_dirty)
@@ -395,7 +395,7 @@ H5PB_flush(H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f_sh);
+ assert(f_sh);
/* Flush all the entries in the PB skiplist, if we have write access on the file */
if (f_sh->page_buf && (H5F_ACC_RDWR & H5F_SHARED_INTENT(f_sh))) {
@@ -430,9 +430,9 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checking */
- HDassert(page_entry);
- HDassert(op_data);
- HDassert(op_data->page_buf);
+ assert(page_entry);
+ assert(op_data);
+ assert(op_data->page_buf);
/* Remove entry from LRU list */
if (op_data->actual_slist) {
@@ -465,7 +465,7 @@ H5PB_dest(H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* flush and destroy the page buffer, if it exists */
if (f_sh->page_buf) {
@@ -523,9 +523,9 @@ H5PB_add_new_page(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t page_addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
page_buf = f_sh->page_buf;
- HDassert(page_buf);
+ assert(page_buf);
/* If there is an existing page, this means that at some point the
* file free space manager freed and re-allocated a page at the same
@@ -581,9 +581,9 @@ H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(page_buf);
- HDassert(size <= page_buf->page_size);
- HDassert(buf);
+ assert(page_buf);
+ assert(size <= page_buf->page_size);
+ assert(buf);
/* calculate the aligned address of the first page */
page_addr = (addr / page_buf->page_size) * page_buf->page_size;
@@ -593,7 +593,7 @@ H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf)
if (page_entry) {
haddr_t offset;
- HDassert(addr + size <= page_addr + page_buf->page_size);
+ assert(addr + size <= page_addr + page_buf->page_size);
offset = addr - page_addr;
H5MM_memcpy((uint8_t *)page_entry->page_buf_ptr + offset, buf, size);
@@ -629,22 +629,22 @@ H5PB_remove_entry(const H5F_shared_t *f_sh, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
page_buf = f_sh->page_buf;
- HDassert(page_buf);
+ assert(page_buf);
/* Search for address in the skip list */
page_entry = (H5PB_entry_t *)H5SL_search(page_buf->slist_ptr, (void *)(&addr));
/* If found, remove the entry from the PB cache */
if (page_entry) {
- HDassert(page_entry->type != H5F_MEM_PAGE_DRAW);
+ assert(page_entry->type != H5F_MEM_PAGE_DRAW);
if (NULL == H5SL_remove(page_buf->slist_ptr, &(page_entry->addr)))
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Page Entry is not in skip list")
/* Remove from LRU list */
H5PB__REMOVE_LRU(page_buf, page_entry)
- HDassert(H5SL_count(page_buf->slist_ptr) == page_buf->LRU_list_len);
+ assert(H5SL_count(page_buf->slist_ptr) == page_buf->LRU_list_len);
page_buf->meta_count--;
@@ -686,8 +686,8 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert(type != H5FD_MEM_GHEAP);
+ assert(f_sh);
+ assert(type != H5FD_MEM_GHEAP);
/* Get pointer to page buffer info for this file */
page_buf = f_sh->page_buf;
@@ -753,7 +753,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
num_touched_pages =
(last_page_addr / page_buf->page_size + 1) - (first_page_addr / page_buf->page_size);
if (first_page_addr == last_page_addr) {
- HDassert(1 == num_touched_pages);
+ assert(1 == num_touched_pages);
last_page_addr = HADDR_UNDEF;
} /* end if */
} /* end if */
@@ -788,20 +788,20 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
if (node) {
page_entry = (H5PB_entry_t *)H5SL_item(node);
- HDassert(page_entry);
+ assert(page_entry);
/* If the current page address falls out of the access
block, then there are no more pages to go over */
if (page_entry->addr >= addr + size)
break;
- HDassert(page_entry->addr == search_addr);
+ assert(page_entry->addr == search_addr);
if (page_entry->is_dirty) {
/* special handling for the first page if it is not a full page access */
if (i == 0 && first_page_addr != addr) {
offset = addr - first_page_addr;
- HDassert(page_buf->page_size > offset);
+ assert(page_buf->page_size > offset);
H5MM_memcpy(buf, (uint8_t *)page_entry->page_buf_ptr + offset,
page_buf->page_size - (size_t)offset);
@@ -836,7 +836,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
else {
/* A raw data access could span 1 or 2 PB entries at this point so
we need to handle that */
- HDassert(1 == num_touched_pages || 2 == num_touched_pages);
+ assert(1 == num_touched_pages || 2 == num_touched_pages);
for (i = 0; i < num_touched_pages; i++) {
haddr_t buf_offset;
@@ -890,7 +890,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
if (0 == can_make_space) {
/* make space can't return FALSE on second touched page since the first is of the same
* type */
- HDassert(0 == i);
+ assert(0 == i);
/* read entire block from VFD and return */
if (H5FD_read(file, type, addr, size, buf) < 0)
@@ -987,7 +987,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Get pointer to page buffer info for this file */
page_buf = f_sh->page_buf;
@@ -1061,7 +1061,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
num_touched_pages =
(last_page_addr / page_buf->page_size + 1) - (first_page_addr / page_buf->page_size);
if (first_page_addr == last_page_addr) {
- HDassert(1 == num_touched_pages);
+ assert(1 == num_touched_pages);
last_page_addr = HADDR_UNDEF;
} /* end if */
} /* end if */
@@ -1088,7 +1088,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
page_entry = (H5PB_entry_t *)H5SL_search(page_buf->slist_ptr, (void *)(&search_addr));
if (page_entry) {
offset = addr - first_page_addr;
- HDassert(page_buf->page_size > offset);
+ assert(page_buf->page_size > offset);
/* Update page's data */
H5MM_memcpy((uint8_t *)page_entry->page_buf_ptr + offset, buf,
@@ -1102,7 +1102,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
/* Special handling for the last page if it is not a full page update */
else if (num_touched_pages > 1 && i == (num_touched_pages - 1) &&
(search_addr + page_buf->page_size) != (addr + size)) {
- HDassert(search_addr + page_buf->page_size > addr + size);
+ assert(search_addr + page_buf->page_size > addr + size);
/* Lookup the page in the skip list */
page_entry = (H5PB_entry_t *)H5SL_search(page_buf->slist_ptr, (void *)(&search_addr));
@@ -1141,7 +1141,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
} /* end if */
else {
/* An access could span 1 or 2 PBs at this point so we need to handle that */
- HDassert(1 == num_touched_pages || 2 == num_touched_pages);
+ assert(1 == num_touched_pages || 2 == num_touched_pages);
for (i = 0; i < num_touched_pages; i++) {
haddr_t buf_offset;
@@ -1194,7 +1194,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
* buffer for this I/O and we need to bypass
*/
if (0 == can_make_space) {
- HDassert(0 == i);
+ assert(0 == i);
/* Write to VFD and return */
if (H5FD_write(file, type, addr, size, buf) < 0)
@@ -1222,9 +1222,9 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
if (NULL == (new_page_buf = H5FL_FAC_MALLOC(page_buf->page_fac)))
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTALLOC, FAIL,
"memory allocation failed for page buffer entry")
- HDmemset(new_page_buf, 0, (size_t)offset);
- HDmemset((uint8_t *)new_page_buf + offset + access_size, 0,
- page_size - ((size_t)offset + access_size));
+ memset(new_page_buf, 0, (size_t)offset);
+ memset((uint8_t *)new_page_buf + offset + access_size, 0,
+ page_size - ((size_t)offset + access_size));
page_entry->page_buf_ptr = new_page_buf;
@@ -1323,7 +1323,7 @@ H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Get pointer to page buffer info for this file */
page_buf = f_sh->page_buf;
@@ -1356,7 +1356,7 @@ H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled)
* returns FALSE, the calling function performs I/O avoiding the page
* buffer layer */
if (page_buf) {
- HDassert(type == H5FD_MEM_DRAW);
+ assert(type == H5FD_MEM_DRAW);
page_buf->bypasses[1]++;
} /* end if */
@@ -1402,7 +1402,7 @@ H5PB__insert_entry(H5PB_t *page_buf, H5PB_entry_t *page_entry)
/* Insert entry in skip list */
if (H5SL_insert(page_buf->slist_ptr, page_entry, &(page_entry->addr)) < 0)
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTINSERT, FAIL, "can't insert entry in skip list")
- HDassert(H5SL_count(page_buf->slist_ptr) * page_buf->page_size <= page_buf->max_size);
+ assert(H5SL_count(page_buf->slist_ptr) * page_buf->page_size <= page_buf->max_size);
/* Increment appropriate page count */
if (H5F_MEM_PAGE_DRAW == page_entry->type || H5F_MEM_PAGE_GHEAP == page_entry->type)
@@ -1445,8 +1445,8 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f_sh);
- HDassert(page_buf);
+ assert(f_sh);
+ assert(page_buf);
/* Get oldest entry */
page_entry = page_buf->LRU_tail_ptr;
@@ -1455,7 +1455,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* If threshould is 100% metadata and page buffer is full of
metadata, then we can't make space for raw data */
if (0 == page_buf->raw_count && page_buf->min_meta_count == page_buf->meta_count) {
- HDassert(page_buf->meta_count * page_buf->page_size == page_buf->max_size);
+ assert(page_buf->meta_count * page_buf->page_size == page_buf->max_size);
HGOTO_DONE(FALSE)
} /* end if */
@@ -1472,7 +1472,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* If threshould is 100% raw data and page buffer is full of
raw data, then we can't make space for meta data */
if (0 == page_buf->meta_count && page_buf->min_raw_count == page_buf->raw_count) {
- HDassert(page_buf->raw_count * page_buf->page_size == page_buf->max_size);
+ assert(page_buf->raw_count * page_buf->page_size == page_buf->max_size);
HGOTO_DONE(FALSE)
} /* end if */
@@ -1493,7 +1493,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* Remove entry from LRU list */
H5PB__REMOVE_LRU(page_buf, page_entry)
- HDassert(H5SL_count(page_buf->slist_ptr) == page_buf->LRU_list_len);
+ assert(H5SL_count(page_buf->slist_ptr) == page_buf->LRU_list_len);
/* Decrement appropriate page type counter */
if (H5F_MEM_PAGE_DRAW == page_entry->type || H5F_MEM_PAGE_GHEAP == page_entry->type)
@@ -1543,8 +1543,8 @@ H5PB__write_entry(H5F_shared_t *f_sh, H5PB_entry_t *page_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f_sh);
- HDassert(page_entry);
+ assert(f_sh);
+ assert(page_entry);
/* Retrieve the 'eoa' for the file */
if (HADDR_UNDEF == (eoa = H5F_shared_get_eoa(f_sh, (H5FD_mem_t)page_entry->type)))
diff --git a/src/H5PLint.c b/src/H5PLint.c
index 62e0074..e9156f2 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -82,7 +82,7 @@ H5PL__get_plugin_control_mask(unsigned int *mask /*out*/)
FUNC_ENTER_PACKAGE_NOERR
/* Check args - Just assert on package functions */
- HDassert(mask);
+ assert(mask);
/* Return the mask */
*mask = H5PL_plugin_control_mask_g;
@@ -329,11 +329,11 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
+ assert(path);
if (type == H5PL_TYPE_NONE)
- HDassert(!key);
- HDassert(success);
- HDassert(plugin_info);
+ assert(!key);
+ assert(success);
+ assert(plugin_info);
/* Initialize out parameters */
*success = FALSE;
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 9619b13..9575f3c 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -108,8 +108,8 @@ H5PL__insert_at(const char *path, unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
+ assert(path);
+ assert(HDstrlen(path));
/* Expand the table if it is full */
if (H5PL_num_paths_g == H5PL_path_capacity_g)
@@ -158,7 +158,7 @@ H5PL__make_space_at(unsigned int idx)
FUNC_ENTER_PACKAGE_NOERR
/* Check args - Just assert on package functions */
- HDassert(idx < H5PL_path_capacity_g);
+ assert(idx < H5PL_path_capacity_g);
/* Copy the paths back to make a space */
for (u = H5PL_num_paths_g; u > idx; u--)
@@ -189,8 +189,8 @@ H5PL__replace_at(const char *path, unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
+ assert(path);
+ assert(HDstrlen(path));
/* Check that the table entry is in use */
if (!H5PL_paths_g[idx])
@@ -359,7 +359,7 @@ H5PL__expand_path_table(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for path table failed")
/* Initialize the new memory */
- HDmemset(H5PL_paths_g + H5PL_num_paths_g, 0, (size_t)H5PL_PATH_CAPACITY_ADD * sizeof(char *));
+ memset(H5PL_paths_g + H5PL_num_paths_g, 0, (size_t)H5PL_PATH_CAPACITY_ADD * sizeof(char *));
done:
/* Set the path capacity back if there were problems */
@@ -386,8 +386,8 @@ H5PL__append_path(const char *path)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
+ assert(path);
+ assert(HDstrlen(path));
/* Insert the path at the end of the table */
if (H5PL__insert_at(path, H5PL_num_paths_g) < 0)
@@ -414,8 +414,8 @@ H5PL__prepend_path(const char *path)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
+ assert(path);
+ assert(HDstrlen(path));
/* Insert the path at the beginning of the table */
if (H5PL__insert_at(path, 0) < 0)
@@ -442,9 +442,9 @@ H5PL__replace_path(const char *path, unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
- HDassert(idx < H5PL_path_capacity_g);
+ assert(path);
+ assert(HDstrlen(path));
+ assert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
if (H5PL__replace_at(path, idx) < 0)
@@ -472,9 +472,9 @@ H5PL__insert_path(const char *path, unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
- HDassert(idx < H5PL_path_capacity_g);
+ assert(path);
+ assert(HDstrlen(path));
+ assert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
if (H5PL__insert_at(path, idx) < 0)
@@ -503,7 +503,7 @@ H5PL__remove_path(unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(idx < H5PL_path_capacity_g);
+ assert(idx < H5PL_path_capacity_g);
/* Check if the path at that index is set */
if (!H5PL_paths_g[idx])
@@ -612,8 +612,8 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
FUNC_ENTER_PACKAGE
- HDassert(plugin_path);
- HDassert(iter_op);
+ assert(plugin_path);
+ assert(iter_op);
/* Open the directory - skip the path if the directory can't be opened */
if (!(dirp = HDopendir(plugin_path)))
@@ -704,8 +704,8 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(plugin_path);
- HDassert(iter_op);
+ assert(plugin_path);
+ assert(iter_op);
/* Specify a file mask. *.* = We want everything! -
* skip the path if the directory can't be opened */
@@ -788,9 +788,9 @@ H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(search_params);
- HDassert(found);
- HDassert(plugin_info);
+ assert(search_params);
+ assert(found);
+ assert(plugin_info);
/* Initialize output parameters */
*found = FALSE;
@@ -844,10 +844,10 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(search_params);
- HDassert(found);
- HDassert(dir);
- HDassert(plugin_info);
+ assert(search_params);
+ assert(found);
+ assert(dir);
+ assert(plugin_info);
/* Initialize the found parameter */
*found = FALSE;
@@ -926,10 +926,10 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(search_params);
- HDassert(found);
- HDassert(dir);
- HDassert(plugin_info);
+ assert(search_params);
+ assert(found);
+ assert(dir);
+ assert(plugin_info);
/* Initialize the found parameter */
*found = FALSE;
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index 7d7c1d6..58b5b5b 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -186,7 +186,7 @@ H5PL__expand_cache(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for plugin cache failed")
/* Initialize the new memory */
- HDmemset(H5PL_cache_g + H5PL_num_plugins_g, 0, (size_t)H5PL_CACHE_CAPACITY_ADD * sizeof(H5PL_plugin_t));
+ memset(H5PL_cache_g + H5PL_num_plugins_g, 0, (size_t)H5PL_CACHE_CAPACITY_ADD * sizeof(H5PL_plugin_t));
done:
/* Set the cache capacity back if there were problems */
@@ -253,9 +253,9 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(search_params);
- HDassert(found);
- HDassert(plugin_info);
+ assert(search_params);
+ assert(found);
+ assert(plugin_info);
/* Initialize output parameters */
*found = FALSE;
@@ -289,7 +289,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
matched = TRUE;
}
else {
- HDassert(search_params->key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
+ assert(search_params->key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
/* Make sure the plugin cache entry key type matches our search key type */
if (H5PL_cache_g[u].key.vol.kind != H5VL_GET_CONNECTOR_BY_VALUE)
@@ -313,7 +313,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
matched = TRUE;
}
else {
- HDassert(search_params->key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
+ assert(search_params->key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
/* Make sure the plugin cache entry key type matches our search key type */
if (H5PL_cache_g[u].key.vfd.kind != H5FD_GET_DRIVER_BY_VALUE)
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index ece7af4..5a3c1f4 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -268,7 +268,7 @@ H5P__dapl_vds_file_pref_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -292,7 +292,7 @@ H5P__dapl_vds_file_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -329,7 +329,7 @@ H5P__dapl_vds_file_pref_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* encode the length of the prefix */
@@ -372,14 +372,14 @@ H5P__dapl_vds_file_pref_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
- HDassert(pp);
- HDassert(*pp);
- HDassert(vds_file_pref);
+ assert(pp);
+ assert(*pp);
+ assert(vds_file_pref);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -415,7 +415,7 @@ H5P__dapl_vds_file_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -435,7 +435,7 @@ H5P__dapl_vds_file_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNU
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -485,7 +485,7 @@ H5P__dapl_vds_file_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UN
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -508,7 +508,7 @@ H5P__dapl_efile_pref_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -532,7 +532,7 @@ H5P__dapl_efile_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -569,7 +569,7 @@ H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* encode the length of the prefix */
@@ -612,14 +612,14 @@ H5P__dapl_efile_pref_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
- HDassert(pp);
- HDassert(*pp);
- HDassert(efile_pref);
+ assert(pp);
+ assert(*pp);
+ assert(efile_pref);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -655,7 +655,7 @@ H5P__dapl_efile_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -675,7 +675,7 @@ H5P__dapl_efile_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -725,7 +725,7 @@ H5P__dapl_efile_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -873,7 +873,7 @@ H5P__encode_chunk_cache_nslots(const void *value, void **_pp, size_t *size)
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(size);
+ assert(size);
/* Determine if this is the default value, in which case only encode
* enc_size (as 255). Also set size needed for encoding. */
@@ -884,11 +884,11 @@ H5P__encode_chunk_cache_nslots(const void *value, void **_pp, size_t *size)
else {
enc_value = (uint64_t) * (const size_t *)value;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size > 0);
+ assert(enc_size > 0);
*size += (1 + enc_size);
} /* end else */
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* Encode the size */
@@ -928,13 +928,13 @@ H5P__decode_chunk_cache_nslots(const void **_pp, void *_value)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Determine if enc_size indicates that this is the default value, in which
* case set value to H5D_ACS_DATA_CACHE_NUM_SLOTS_DEF and return */
@@ -973,7 +973,7 @@ H5P__encode_chunk_cache_nbytes(const void *value, void **_pp, size_t *size)
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(size);
+ assert(size);
/* Determine if this is the default value, in which case only encode
* enc_size (as 255). Also set size needed for encoding. */
@@ -984,11 +984,11 @@ H5P__encode_chunk_cache_nbytes(const void *value, void **_pp, size_t *size)
else {
enc_value = (uint64_t) * (const size_t *)value;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size > 0);
+ assert(enc_size > 0);
*size += (1 + enc_size);
} /* end else */
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* Encode the size */
@@ -1028,13 +1028,13 @@ H5P__decode_chunk_cache_nbytes(const void **_pp, void *_value)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Determine if enc_size indicates that this is the default value, in which
* case set value to H5D_ACS_DATA_CACHE_BYTE_SIZE_DEF and return */
@@ -1143,8 +1143,8 @@ H5P__dacc_vds_view_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(view);
- HDassert(size);
+ assert(view);
+ assert(size);
if (NULL != *pp)
/* Encode EDC property */
@@ -1175,9 +1175,9 @@ H5P__dacc_vds_view_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(view);
+ assert(pp);
+ assert(*pp);
+ assert(view);
/* Decode EDC property */
*view = (H5D_vds_view_t) * (*pp)++;
@@ -1316,7 +1316,7 @@ H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t *boundary, H5D
info.func = func;
info.udata = udata;
- HDmemset(info.boundary, 0, sizeof(info.boundary));
+ memset(info.boundary, 0, sizeof(info.boundary));
/* boundary can be 0 to indicate no boundary is set */
for (u = 0; u < ndims; u++) {
if (boundary[u] != (boundary[u] & 0xffffffff)) /* negative value (including H5S_UNLIMITED) */
@@ -1366,7 +1366,7 @@ H5Pget_append_flush(hid_t plist_id, unsigned ndims, hsize_t boundary[], H5D_appe
/* Assign return values */
if (boundary) {
- HDmemset(boundary, 0, ndims * sizeof(hsize_t));
+ memset(boundary, 0, ndims * sizeof(hsize_t));
if (info.ndims > 0)
for (u = 0; u < info.ndims && u < ndims; u++)
boundary[u] = info.boundary[u];
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 298baa5..223eb3b 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -365,7 +365,7 @@ H5P__dcrt_layout_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of layout */
if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout))
@@ -402,7 +402,7 @@ H5P__dcrt_layout_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of layout */
if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout))
@@ -443,8 +443,8 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(layout);
- HDassert(size);
+ assert(layout);
+ assert(size);
if (NULL != *pp) {
/* Encode layout type */
@@ -577,9 +577,9 @@ H5P__dcrt_layout_dec(const void **_pp, void *value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode layout type */
type = (H5D_layout_t) * (*pp)++;
@@ -771,7 +771,7 @@ H5P__dcrt_layout_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old layout */
if (H5O_msg_reset(H5O_LAYOUT_ID, value) < 0)
@@ -803,7 +803,7 @@ H5P__dcrt_layout_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED siz
FUNC_ENTER_PACKAGE
- HDassert(layout);
+ assert(layout);
/* Make copy of layout */
if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout))
@@ -842,9 +842,9 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t H5_ATTR_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(layout1);
- HDassert(layout2);
- HDassert(size == sizeof(H5O_layout_t));
+ assert(layout1);
+ assert(layout2);
+ assert(size == sizeof(H5O_layout_t));
/* Check for different layout type */
if (layout1->type < layout2->type)
@@ -942,7 +942,7 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t H5_ATTR_
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
} /* end switch */
done:
@@ -970,7 +970,7 @@ H5P__dcrt_layout_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED si
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old layout */
if (H5O_msg_reset(H5O_LAYOUT_ID, value) < 0)
@@ -1004,7 +1004,7 @@ H5P__dcrt_fill_value_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of fill value */
if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill))
@@ -1041,7 +1041,7 @@ H5P__dcrt_fill_value_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of fill value */
if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill))
@@ -1084,8 +1084,8 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(ssize_t) <= sizeof(int64_t));
- HDassert(fill);
- HDassert(size);
+ assert(fill);
+ assert(size);
if (NULL != *pp) {
/* Encode alloc and fill time */
@@ -1102,7 +1102,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
*pp += fill->size;
/* Encode fill value datatype */
- HDassert(fill->type);
+ assert(fill->type);
if (H5T_encode(fill->type, NULL, &dt_size) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype")
@@ -1110,7 +1110,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
/* Encode the size of a size_t */
enc_value = (uint64_t)dt_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Encode the size */
*(*pp)++ = (uint8_t)enc_size;
@@ -1134,7 +1134,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
/* calculate those if they were not calculated earlier */
if (NULL == *pp) {
/* Get the size of the encoded datatype */
- HDassert(fill->type);
+ assert(fill->type);
if (H5T_encode(fill->type, NULL, &dt_size) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype")
enc_value = (uint64_t)dt_size;
@@ -1198,7 +1198,7 @@ H5P__dcrt_fill_value_dec(const void **_pp, void *_value)
*pp += fill->size;
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the size of encoded datatype */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -1236,7 +1236,7 @@ H5P__dcrt_fill_value_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old fill value message */
if (H5O_msg_reset(H5O_FILL_ID, value) < 0)
@@ -1268,7 +1268,7 @@ H5P__dcrt_fill_value_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
- HDassert(fill);
+ assert(fill);
/* Make copy of fill value message */
if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill))
@@ -1307,9 +1307,9 @@ H5P_fill_value_cmp(const void *_fill1, const void *_fill2, size_t H5_ATTR_UNUSED
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(fill1);
- HDassert(fill2);
- HDassert(size == sizeof(H5O_fill_t));
+ assert(fill1);
+ assert(fill2);
+ assert(size == sizeof(H5O_fill_t));
/* Check the size of fill values */
if (fill1->size < fill2->size)
@@ -1332,7 +1332,7 @@ H5P_fill_value_cmp(const void *_fill1, const void *_fill2, size_t H5_ATTR_UNUSED
if (fill1->buf != NULL && fill2->buf == NULL)
HGOTO_DONE(1);
if (fill1->buf != NULL)
- if ((cmp_value = HDmemcmp(fill1->buf, fill2->buf, (size_t)fill1->size)) != 0)
+ if ((cmp_value = memcmp(fill1->buf, fill2->buf, (size_t)fill1->size)) != 0)
HGOTO_DONE(cmp_value);
/* Check the allocation time for the fill values */
@@ -1372,7 +1372,7 @@ H5P__dcrt_fill_value_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old fill value message */
if (H5O_msg_reset(H5O_FILL_ID, value) < 0)
@@ -1406,7 +1406,7 @@ H5P__dcrt_ext_file_list_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of external file list */
if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl))
@@ -1443,7 +1443,7 @@ H5P__dcrt_ext_file_list_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of external file list */
if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl))
@@ -1484,17 +1484,17 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(efl);
+ assert(efl);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(off_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t));
- HDassert(size);
+ assert(size);
if (NULL != *pp) {
/* Encode number of slots used */
enc_value = (uint64_t)efl->nused;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -1504,7 +1504,7 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size)
len = HDstrlen(efl->slot[u].name) + 1;
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -1515,14 +1515,14 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size)
/* Encode offset */
enc_value = (uint64_t)efl->slot[u].offset;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
/* encode size */
enc_value = (uint64_t)efl->slot[u].size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
} /* end for */
@@ -1569,9 +1569,9 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pp);
- HDassert(*pp);
- HDassert(efl);
+ assert(pp);
+ assert(*pp);
+ assert(efl);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(off_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t));
@@ -1581,7 +1581,7 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value)
/* Decode number of slots used */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
nused = (size_t)enc_value;
@@ -1600,7 +1600,7 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value)
/* Decode length of slot name */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
len = (size_t)enc_value;
@@ -1610,13 +1610,13 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value)
/* decode offset */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
efl->slot[u].offset = (off_t)enc_value;
/* decode size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
efl->slot[u].size = (hsize_t)enc_value;
@@ -1650,7 +1650,7 @@ H5P__dcrt_ext_file_list_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old efl message */
if (H5O_msg_reset(H5O_EFL_ID, value) < 0)
@@ -1682,7 +1682,7 @@ H5P__dcrt_ext_file_list_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(efl);
+ assert(efl);
/* Make copy of efl message */
if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl))
@@ -1722,9 +1722,9 @@ H5P__dcrt_ext_file_list_cmp(const void *_efl1, const void *_efl2, size_t H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(efl1);
- HDassert(efl2);
- HDassert(size == sizeof(H5O_efl_t));
+ assert(efl1);
+ assert(efl2);
+ assert(size == sizeof(H5O_efl_t));
/* Check the number of allocated efl entries */
if (efl1->nalloc < efl2->nalloc)
@@ -1802,7 +1802,7 @@ H5P__dcrt_ext_file_list_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old efl message */
if (H5O_msg_reset(H5O_EFL_ID, value) < 0)
@@ -2018,7 +2018,7 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/])
/* Verify & initialize property's chunk dims */
H5MM_memcpy(&chunk_layout, &H5D_def_layout_chunk_g, sizeof(H5D_def_layout_chunk_g));
- HDmemset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim));
+ memset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim));
chunk_nelmts = 1;
for (u = 0; u < (unsigned)ndims; u++) {
if (dim[u] == 0)
@@ -2170,7 +2170,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
H5MM_memcpy(&virtual_layout, &H5D_def_layout_virtual_g, sizeof(H5D_def_layout_virtual_g));
/* Sanity check */
- HDassert(virtual_layout.storage.u.virt.list_nalloc == 0);
+ assert(virtual_layout.storage.u.virt.list_nalloc == 0);
} /* end else */
/* Expand list if necessary */
@@ -2188,7 +2188,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
/* Add virtual dataset mapping entry */
ent = &virtual_layout.storage.u.virt.list[virtual_layout.storage.u.virt.list_nused];
- HDmemset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */
+ memset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */
if (NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
if (NULL == (ent->source_file_name = H5MM_xstrdup(src_file_name)))
@@ -2359,7 +2359,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx)
/* Get the virtual space */
if (idx >= layout.storage.u.virt.list_nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
- HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
+ assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
if (NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_dset.virtual_select, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
@@ -2416,7 +2416,7 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx)
/* Check index */
if (idx >= layout.storage.u.virt.list_nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
- HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
+ assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
/* Attempt to open source dataset and patch extent if extent status is not
* H5O_VIRTUAL_STATUS_CORRECT? -NAF */
@@ -2519,8 +2519,8 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si
/* Get the virtual filename */
if (idx >= layout.storage.u.virt.list_nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
- HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
- HDassert(layout.storage.u.virt.list[idx].source_file_name);
+ assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
+ assert(layout.storage.u.virt.list[idx].source_file_name);
if (name && (size > 0))
(void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_file_name, size);
ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_file_name);
@@ -2580,8 +2580,8 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si
/* Get the virtual filename */
if (idx >= layout.storage.u.virt.list_nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
- HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
- HDassert(layout.storage.u.virt.list[idx].source_dset_name);
+ assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
+ assert(layout.storage.u.virt.list[idx].source_dset_name);
if (name && (size > 0))
(void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_dset_name, size);
ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_dset_name);
@@ -3244,7 +3244,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/
/* Check for "default" fill value */
if (fill.size == 0) {
- HDmemset(value, 0, H5T_get_size(type));
+ memset(value, 0, H5T_get_size(type));
HGOTO_DONE(SUCCEED);
} /* end if */
@@ -3358,8 +3358,8 @@ H5P_is_fill_value_defined(const H5O_fill_t *fill, H5D_fill_value_t *status)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(fill);
- HDassert(status);
+ assert(fill);
+ assert(status);
/* Check if the fill value was "unset" */
if (fill->size == -1 && !fill->buf)
@@ -3399,7 +3399,7 @@ H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(status);
+ assert(status);
/* Get the fill value struct */
if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0)
@@ -3434,7 +3434,7 @@ H5Pfill_value_defined(hid_t plist_id, H5D_fill_value_t *status)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*DF", plist_id, status);
- HDassert(status);
+ assert(status);
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c
index c02534b..abe94df 100644
--- a/src/H5Pdeprec.c
+++ b/src/H5Pdeprec.c
@@ -243,7 +243,7 @@ H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, H5P_p
/* Substitute the new property class in the ID */
if (NULL == (old_pclass = (H5P_genclass_t *)H5I_subst(cls_id, pclass)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID")
- HDassert(old_pclass == orig_pclass);
+ assert(old_pclass == orig_pclass);
/* Close the previous class */
if (H5P__close_class(orig_pclass) < 0)
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 942d6f2..e1f22a5 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -507,8 +507,8 @@ H5P__dxfr_bkgr_buf_type_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(bkgr_buf_type);
- HDassert(size);
+ assert(bkgr_buf_type);
+ assert(size);
if (NULL != *pp)
/* Encode background buffer type */
@@ -544,9 +544,9 @@ H5P__dxfr_bkgr_buf_type_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(bkgr_buf_type);
+ assert(pp);
+ assert(*pp);
+ assert(bkgr_buf_type);
/* Decode background buffer type */
*bkgr_buf_type = (H5T_bkg_t) * (*pp)++;
@@ -578,8 +578,8 @@ H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(btree_split_ratio);
- HDassert(size);
+ assert(btree_split_ratio);
+ assert(size);
if (NULL != *pp) {
/* Encode the size of a double*/
@@ -629,9 +629,9 @@ H5P__dxfr_btree_split_ratio_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(btree_split_ratio);
+ assert(pp);
+ assert(*pp);
+ assert(btree_split_ratio);
/* Decode the size */
enc_size = *(*pp)++;
@@ -669,7 +669,7 @@ H5P__dxfr_xform_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of data transform */
if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0)
@@ -701,7 +701,7 @@ H5P__dxfr_xform_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of data transform */
if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0)
@@ -740,7 +740,7 @@ H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(size);
+ assert(size);
/* Check for data transform set */
if (NULL != data_xform_prop) {
@@ -759,13 +759,13 @@ H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size)
/* encode the length of the prefix */
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
if (NULL != data_xform_prop) {
/* Sanity check */
- HDassert(pexp);
+ assert(pexp);
/* Copy the expression into the buffer */
H5MM_memcpy(*pp, (const uint8_t *)pexp, len);
@@ -811,14 +811,14 @@ H5P__dxfr_xform_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(data_xform_prop);
+ assert(pp);
+ assert(*pp);
+ assert(data_xform_prop);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the length of xform expression */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
len = (size_t)enc_value;
@@ -855,7 +855,7 @@ H5P__dxfr_xform_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam
FUNC_ENTER_PACKAGE
- HDassert(value);
+ assert(value);
if (H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree")
@@ -886,7 +886,7 @@ H5P__dxfr_xform_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of data transform */
if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0)
@@ -922,9 +922,9 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(xform1);
- HDassert(xform2);
- HDassert(size == sizeof(H5Z_data_xform_t *));
+ assert(xform1);
+ assert(xform2);
+ assert(size == sizeof(H5Z_data_xform_t *));
/* Check for a property being set */
if (*xform1 == NULL && *xform2 != NULL)
@@ -933,7 +933,7 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU
HGOTO_DONE(1);
if (*xform1) {
- HDassert(*xform2);
+ assert(*xform2);
/* Get the transform expressions */
pexp1 = H5Z_xform_extract_xform_str(*xform1);
@@ -946,7 +946,7 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU
HGOTO_DONE(1);
if (pexp1) {
- HDassert(pexp2);
+ assert(pexp2);
ret_value = HDstrcmp(pexp1, pexp2);
} /* end if */
} /* end if */
@@ -975,7 +975,7 @@ H5P__dxfr_xform_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED siz
FUNC_ENTER_PACKAGE
- HDassert(value);
+ assert(value);
if (H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree")
@@ -1592,7 +1592,7 @@ H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func, void
FUNC_ENTER_NOAPI(FAIL)
- HDassert(plist);
+ assert(plist);
/* Update property list */
if (H5P_set(plist, H5D_XFER_VLEN_ALLOC_NAME, &alloc_func) < 0)
@@ -1796,8 +1796,8 @@ H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(xfer_mode);
- HDassert(size);
+ assert(xfer_mode);
+ assert(size);
if (NULL != *pp)
/* Encode I/O transfer mode */
@@ -1833,9 +1833,9 @@ H5P__dxfr_io_xfer_mode_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(xfer_mode);
+ assert(pp);
+ assert(*pp);
+ assert(xfer_mode);
/* Decode I/O transfer mode */
*xfer_mode = (H5FD_mpio_xfer_t) * (*pp)++;
@@ -1868,8 +1868,8 @@ H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(coll_opt);
- HDassert(size);
+ assert(coll_opt);
+ assert(size);
if (NULL != *pp)
/* Encode MPI-I/O collective optimization property */
@@ -1906,9 +1906,9 @@ H5P__dxfr_mpio_collective_opt_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(coll_opt);
+ assert(pp);
+ assert(*pp);
+ assert(coll_opt);
/* Decode MPI-I/O collective optimization mode */
*coll_opt = (H5FD_mpio_collective_opt_t) * (*pp)++;
@@ -1941,8 +1941,8 @@ H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(chunk_opt);
- HDassert(size);
+ assert(chunk_opt);
+ assert(size);
if (NULL != *pp)
/* Encode MPI-I/O chunk optimization property */
@@ -1978,9 +1978,9 @@ H5P__dxfr_mpio_chunk_opt_hard_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(chunk_opt);
+ assert(pp);
+ assert(*pp);
+ assert(chunk_opt);
/* Decode MPI-I/O chunk optimization mode */
*chunk_opt = (H5FD_mpio_chunk_opt_t) * (*pp)++;
@@ -2122,8 +2122,8 @@ H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(check);
- HDassert(size);
+ assert(check);
+ assert(size);
if (NULL != *pp)
/* Encode EDC property */
@@ -2159,9 +2159,9 @@ H5P__dxfr_edc_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(check);
+ assert(pp);
+ assert(*pp);
+ assert(check);
/* Decode EDC property */
*check = (H5Z_EDC_t) * (*pp)++;
@@ -2232,9 +2232,9 @@ H5P__dxfr_dset_io_hyp_sel_cmp(const void *_space1, const void *_space2, size_t H
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space1);
- HDassert(space1);
- HDassert(size == sizeof(H5S_t *));
+ assert(space1);
+ assert(space1);
+ assert(size == sizeof(H5S_t *));
/* Check for a property being set */
if (*space1 == NULL && *space2 != NULL)
@@ -2243,7 +2243,7 @@ H5P__dxfr_dset_io_hyp_sel_cmp(const void *_space1, const void *_space2, size_t H
HGOTO_DONE(1);
if (*space1) {
- HDassert(*space2);
+ assert(*space2);
/* Compare the extents of the dataspaces */
/* (Error & not-equal count the same) */
@@ -2321,8 +2321,8 @@ H5P__dxfr_selection_io_mode_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(select_io_mode);
- HDassert(size);
+ assert(select_io_mode);
+ assert(size);
if (NULL != *pp)
/* Encode selection I/O mode property */
@@ -2358,9 +2358,9 @@ H5P__dxfr_selection_io_mode_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(select_io_mode);
+ assert(pp);
+ assert(*pp);
+ assert(select_io_mode);
/* Decode selection I/O mode property */
*select_io_mode = (H5D_selection_io_mode_t) * (*pp)++;
@@ -2631,8 +2631,8 @@ H5P__dxfr_modify_write_buf_enc(const void *value, void **_pp /*out*/, size_t *si
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(modify_write_buf);
- HDassert(size);
+ assert(modify_write_buf);
+ assert(size);
if (NULL != *pp)
/* Encode modify write buf property. Use "!!" so we always get 0 or 1 */
@@ -2665,9 +2665,9 @@ H5P__dxfr_modify_write_buf_dec(const void **_pp, void *_value /*out*/)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(modify_write_buf);
+ assert(pp);
+ assert(*pp);
+ assert(modify_write_buf);
/* Decode selection I/O mode property */
*modify_write_buf = (hbool_t) * (*pp)++;
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index 2ee02c8..d241b74 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -90,8 +90,8 @@ H5P__encode_size_t(const void *value, void **_pp, size_t *size)
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(enc_size < 256);
- HDassert(size);
+ assert(enc_size < 256);
+ assert(size);
if (NULL != *pp) {
/* Encode the size */
@@ -131,8 +131,8 @@ H5P__encode_hsize_t(const void *value, void **_pp, size_t *size)
/* Sanity checks */
HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t));
- HDassert(enc_size < 256);
- HDassert(size);
+ assert(enc_size < 256);
+ assert(size);
if (NULL != *pp) {
*(*pp)++ = (uint8_t)enc_size;
@@ -168,8 +168,8 @@ H5P__encode_unsigned(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(value);
- HDassert(size);
+ assert(value);
+ assert(size);
if (NULL != *pp) {
/* Encode the size */
@@ -206,8 +206,8 @@ H5P__encode_uint8_t(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(value);
- HDassert(size);
+ assert(value);
+ assert(size);
if (NULL != *pp) {
/* Encode the value */
@@ -241,8 +241,8 @@ H5P__encode_hbool_t(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(value);
- HDassert(size);
+ assert(value);
+ assert(size);
if (NULL != *pp)
/* Encode the value */
@@ -275,8 +275,8 @@ H5P__encode_double(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(value);
- HDassert(size);
+ assert(value);
+ assert(size);
if (NULL != *pp) {
/* Encode the size */
@@ -321,8 +321,8 @@ H5P__encode_cb(H5P_genprop_t *prop, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(prop);
- HDassert(udata);
+ assert(prop);
+ assert(udata);
/* Check if this property can be encoded */
if (prop->encode) {
@@ -450,13 +450,13 @@ H5P__decode_size_t(const void **_pp, void *_value)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -490,13 +490,13 @@ H5P__decode_hsize_t(const void **_pp, void *_value)
/* Sanity check */
HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t));
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -529,9 +529,9 @@ H5P__decode_unsigned(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
@@ -567,9 +567,9 @@ H5P__decode_uint8_t(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the value */
*value = *(*pp)++;
@@ -600,9 +600,9 @@ H5P__decode_hbool_t(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the value */
*value = (hbool_t) * (*pp)++;
@@ -634,9 +634,9 @@ H5P__decode_double(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 84d2522..64fc129 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -868,7 +868,7 @@ H5P__facc_set_def_driver(void)
if ((driver_is_registered = H5FD_is_driver_registered_by_name(driver_env_var, &driver_id)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check if VFL driver is already registered")
if (driver_is_registered) {
- HDassert(driver_id >= 0);
+ assert(driver_id >= 0);
if (H5I_inc_ref(driver_id, TRUE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, FAIL, "unable to increment ref count on VFD")
@@ -948,8 +948,8 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
FUNC_ENTER_PACKAGE
- HDassert(driver_name);
- HDassert(driver_id);
+ assert(driver_name);
+ assert(driver_id);
if (!HDstrcmp(driver_name, "sec2")) {
if ((*driver_id = H5FD_SEC2) < 0)
@@ -1166,7 +1166,7 @@ H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, const void *new_drive
/* If VFD configuration information is supplied, ensure that either binary
* configuration data or a configuration string is supplied, but not both.
*/
- HDassert(!new_driver_info || !new_driver_config_str);
+ assert(!new_driver_info || !new_driver_config_str);
if (NULL == H5I_object_verify(new_driver_id, H5I_VFL))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver ID")
@@ -1258,8 +1258,8 @@ H5P_set_driver_by_name(H5P_genplist_t *plist, const char *driver_name, const cha
FUNC_ENTER_NOAPI(FAIL)
- HDassert(plist);
- HDassert(driver_name);
+ assert(plist);
+ assert(driver_name);
/* Register the driver */
if ((new_driver_id = H5FD_register_driver_by_name(driver_name, app_ref)) < 0)
@@ -1346,8 +1346,8 @@ H5P_set_driver_by_value(H5P_genplist_t *plist, H5FD_class_value_t driver_value,
FUNC_ENTER_NOAPI(FAIL)
- HDassert(plist);
- HDassert(driver_value >= 0);
+ assert(plist);
+ assert(driver_value >= 0);
/* Register the driver */
if ((new_driver_id = H5FD_register_driver_by_value(driver_value, app_ref)) < 0)
@@ -1827,7 +1827,7 @@ H5P__facc_file_driver_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of file driver ID & info */
if (H5P__file_driver_copy(value) < 0)
@@ -1859,7 +1859,7 @@ H5P__facc_file_driver_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of file driver */
if (H5P__file_driver_copy(value) < 0)
@@ -1954,9 +1954,9 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(info1);
- HDassert(info2);
- HDassert(size == sizeof(H5FD_driver_prop_t));
+ assert(info1);
+ assert(info2);
+ assert(size == sizeof(H5FD_driver_prop_t));
/* Compare drivers */
if (NULL == (cls1 = H5FD_get_class(info1->driver_id)))
@@ -1975,14 +1975,14 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR
HGOTO_DONE(-1)
if (cls1->fapl_size > cls2->fapl_size)
HGOTO_DONE(1)
- HDassert(cls1->fapl_size == cls2->fapl_size);
+ assert(cls1->fapl_size == cls2->fapl_size);
if (info1->driver_info == NULL && info2->driver_info != NULL)
HGOTO_DONE(-1);
if (info1->driver_info != NULL && info2->driver_info == NULL)
HGOTO_DONE(1);
if (info1->driver_info) {
- HDassert(cls1->fapl_size > 0);
- if (0 != (cmp_value = HDmemcmp(info1->driver_info, info2->driver_info, cls1->fapl_size)))
+ assert(cls1->fapl_size > 0);
+ if (0 != (cmp_value = memcmp(info1->driver_info, info2->driver_info, cls1->fapl_size)))
HGOTO_DONE(cmp_value);
} /* end if */
@@ -3235,8 +3235,8 @@ H5Pget_file_image(hid_t fapl_id, void **buf /*out*/, size_t *buf_len /*out*/)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file image info")
/* verify file image field consistency */
- HDassert(((image_info.buffer != NULL) && (image_info.size > 0)) ||
- ((image_info.buffer == NULL) && (image_info.size == 0)));
+ assert(((image_info.buffer != NULL) && (image_info.size > 0)) ||
+ ((image_info.buffer == NULL) && (image_info.size == 0)));
/* Set output size */
if (buf_len != NULL)
@@ -3310,7 +3310,7 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get old file image info")
/* verify file image field consistency */
- HDassert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0)));
+ assert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0)));
/* Make sure a file image hasn't already been set */
if (info.buffer != NULL || info.size > 0)
@@ -3329,7 +3329,7 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
/* Release old udata if it exists */
if (info.callbacks.udata != NULL) {
- HDassert(info.callbacks.udata_free);
+ assert(info.callbacks.udata_free);
if (info.callbacks.udata_free(info.callbacks.udata) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "udata_free callback failed")
} /* end if */
@@ -3338,8 +3338,8 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
info.callbacks = *callbacks_ptr;
if (callbacks_ptr->udata) {
- HDassert(callbacks_ptr->udata_copy);
- HDassert(callbacks_ptr->udata_free);
+ assert(callbacks_ptr->udata_copy);
+ assert(callbacks_ptr->udata_free);
if ((info.callbacks.udata = callbacks_ptr->udata_copy(callbacks_ptr->udata)) == NULL)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't copy the supplied udata")
} /* end if */
@@ -3386,7 +3386,7 @@ H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file image info")
/* verify file image field consistency */
- HDassert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0)));
+ assert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0)));
/* verify that callbacks is not NULL */
if (NULL == callbacks)
@@ -3397,7 +3397,7 @@ H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
/* Copy udata if it exists */
if (info.callbacks.udata != NULL) {
- HDassert(info.callbacks.udata_copy);
+ assert(info.callbacks.udata_copy);
if ((callbacks->udata = info.callbacks.udata_copy(info.callbacks.udata)) == 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't copy udata")
} /* end if */
@@ -3438,8 +3438,7 @@ H5P__file_image_info_copy(void *value)
info = (H5FD_file_image_info_t *)value;
/* verify file image field consistency */
- HDassert(((info->buffer != NULL) && (info->size > 0)) ||
- ((info->buffer == NULL) && (info->size == 0)));
+ assert(((info->buffer != NULL) && (info->size > 0)) || ((info->buffer == NULL) && (info->size == 0)));
if (info->buffer && info->size > 0) {
void *old_buffer; /* Pointer to old image buffer */
@@ -3512,8 +3511,7 @@ H5P__file_image_info_free(void *value)
info = (H5FD_file_image_info_t *)value;
/* Verify file image field consistency */
- HDassert(((info->buffer != NULL) && (info->size > 0)) ||
- ((info->buffer == NULL) && (info->size == 0)));
+ assert(((info->buffer != NULL) && (info->size > 0)) || ((info->buffer == NULL) && (info->size == 0)));
/* Free buffer */
if (info->buffer != NULL && info->size > 0) {
@@ -3618,7 +3616,7 @@ H5P__facc_cache_image_config_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
if (NULL != *pp) {
/* Encode type sizes (as a safety check) */
@@ -3665,9 +3663,9 @@ H5P__facc_cache_image_config_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(config);
+ assert(pp);
+ assert(*pp);
+ assert(config);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Set property to default value */
@@ -3712,7 +3710,7 @@ H5P__facc_file_image_info_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of file image info */
if (H5P__file_image_info_copy(value) < 0)
@@ -3744,7 +3742,7 @@ H5P__facc_file_image_info_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of file image info */
if (H5P__file_image_info_copy(value) < 0)
@@ -3840,9 +3838,9 @@ H5P__facc_file_image_info_cmp(const void *_info1, const void *_info2, size_t H5_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(info1);
- HDassert(info2);
- HDassert(size == sizeof(H5FD_file_image_info_t));
+ assert(info1);
+ assert(info2);
+ assert(size == sizeof(H5FD_file_image_info_t));
/* Check for different buffer sizes */
if (info1->size < info2->size)
@@ -3878,7 +3876,7 @@ H5P__facc_file_image_info_cmp(const void *_info1, const void *_info2, size_t H5_
if (info1->buffer == NULL && info2->buffer != NULL)
HGOTO_DONE(1)
if (info1->buffer != NULL && info2->buffer != NULL)
- ret_value = HDmemcmp(info1->buffer, info2->buffer, size);
+ ret_value = memcmp(info1->buffer, info2->buffer, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -4109,7 +4107,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
if (NULL != *pp) {
@@ -4136,7 +4134,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)config->initial_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -4144,13 +4142,13 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)config->max_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
enc_value = (uint64_t)config->min_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -4168,7 +4166,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)config->max_increment;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -4190,7 +4188,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)config->max_decrement;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -4254,9 +4252,9 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(config);
+ assert(pp);
+ assert(*pp);
+ assert(config);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Set property to default value */
@@ -4287,19 +4285,19 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
H5_DECODE_UNSIGNED(*pp, config->set_initial_size);
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->initial_size = (size_t)enc_value;
H5_DECODE_DOUBLE(*pp, config->min_clean_fraction);
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->max_size = (size_t)enc_value;
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->min_size = (size_t)enc_value;
@@ -4319,7 +4317,7 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
H5_DECODE_UNSIGNED(*pp, config->apply_max_increment);
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->max_increment = (size_t)enc_value;
@@ -4340,7 +4338,7 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
H5_DECODE_UNSIGNED(*pp, config->apply_max_decrement);
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->max_decrement = (size_t)enc_value;
@@ -4386,8 +4384,8 @@ H5P__facc_fclose_degree_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(fclose_degree);
- HDassert(size);
+ assert(fclose_degree);
+ assert(size);
if (NULL != *pp)
/* Encode file close degree */
@@ -4423,9 +4421,9 @@ H5P__facc_fclose_degree_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(fclose_degree);
+ assert(pp);
+ assert(*pp);
+ assert(fclose_degree);
/* Decode file close degree */
*fclose_degree = (H5F_close_degree_t) * (*pp)++;
@@ -4457,8 +4455,8 @@ H5P__facc_multi_type_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(type);
- HDassert(size);
+ assert(type);
+ assert(size);
if (NULL != *pp)
/* Encode file close degree */
@@ -4494,9 +4492,9 @@ H5P__facc_multi_type_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(type);
+ assert(pp);
+ assert(*pp);
+ assert(type);
/* Decode multi VFD memory type */
*type = (H5FD_mem_t) * (*pp)++;
@@ -4527,8 +4525,8 @@ H5P__facc_libver_type_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(type);
- HDassert(size);
+ assert(type);
+ assert(size);
/* Encode */
if (NULL != *pp)
@@ -4563,9 +4561,9 @@ H5P__facc_libver_type_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(type);
+ assert(pp);
+ assert(*pp);
+ assert(type);
/* Decode */
*type = (H5F_libver_t) * (*pp)++;
@@ -4868,7 +4866,7 @@ H5P__facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* encode the length of the prefix */
@@ -4913,14 +4911,14 @@ H5P__facc_mdc_log_location_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
- HDassert(pp);
- HDassert(*pp);
- HDassert(log_location);
+ assert(pp);
+ assert(*pp);
+ assert(log_location);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -4957,7 +4955,7 @@ H5P__facc_mdc_log_location_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -4978,7 +4976,7 @@ H5P__facc_mdc_log_location_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -5031,7 +5029,7 @@ H5P__facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -5242,8 +5240,8 @@ H5P__encode_coll_md_read_flag_t(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(coll_md_read_flag);
- HDassert(size);
+ assert(coll_md_read_flag);
+ assert(size);
if (NULL != *pp) {
/* Encode the value */
@@ -5279,9 +5277,9 @@ H5P__decode_coll_md_read_flag_t(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(coll_md_read_flag);
+ assert(pp);
+ assert(*pp);
+ assert(coll_md_read_flag);
/* Decode file close degree */
*coll_md_read_flag = (H5P_coll_md_read_flag_t) * (*pp);
@@ -6337,7 +6335,7 @@ H5P__facc_vol_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of VOL connector ID & info */
if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0)
@@ -6366,7 +6364,7 @@ H5P__facc_vol_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of VOL connector */
if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0)
@@ -6454,9 +6452,9 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(info1);
- HDassert(info2);
- HDassert(size == sizeof(H5VL_connector_prop_t));
+ assert(info1);
+ assert(info2);
+ assert(size == sizeof(H5VL_connector_prop_t));
/* Compare connectors */
if (NULL == (cls1 = (H5VL_class_t *)H5I_object(info1->connector_id)))
@@ -6464,7 +6462,7 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
if (NULL == (cls2 = (H5VL_class_t *)H5I_object(info2->connector_id)))
HGOTO_DONE(1)
status = H5VL_cmp_connector_cls(&cmp_value, cls1, cls2);
- HDassert(status >= 0);
+ assert(status >= 0);
if (cmp_value != 0)
HGOTO_DONE(cmp_value);
@@ -6475,9 +6473,9 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
/* Use one of the classes (cls1) info comparison routines to compare the
* info objects
*/
- HDassert(cls1->info_cls.cmp == cls2->info_cls.cmp);
+ assert(cls1->info_cls.cmp == cls2->info_cls.cmp);
status = H5VL_cmp_connector_info(cls1, &cmp_value, info1->connector_info, info2->connector_info);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Set return value */
ret_value = cmp_value;
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index f5d0db4..95fe66d 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -700,8 +700,8 @@ H5P__fcrt_btree_rank_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(btree_k);
- HDassert(size);
+ assert(btree_k);
+ assert(size);
if (NULL != *pp) {
unsigned u; /* Local index variable */
@@ -749,9 +749,9 @@ H5P__fcrt_btree_rank_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(btree_k);
+ assert(pp);
+ assert(*pp);
+ assert(btree_k);
/* Decode the size */
enc_size = *(*pp)++;
@@ -987,8 +987,8 @@ H5P__fcrt_shmsg_index_types_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(type_flags);
- HDassert(size);
+ assert(type_flags);
+ assert(size);
if (NULL != *pp) {
unsigned u; /* Local index variable */
@@ -1037,9 +1037,9 @@ H5P__fcrt_shmsg_index_types_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(type_flags);
+ assert(pp);
+ assert(*pp);
+ assert(type_flags);
/* Decode the size */
enc_size = *(*pp)++;
@@ -1078,8 +1078,8 @@ H5P__fcrt_shmsg_index_minsize_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(minsizes);
- HDassert(size);
+ assert(minsizes);
+ assert(size);
if (NULL != *pp) {
unsigned u; /* Local index variable */
@@ -1128,9 +1128,9 @@ H5P__fcrt_shmsg_index_minsize_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(minsizes);
+ assert(pp);
+ assert(*pp);
+ assert(minsizes);
/* Decode the size */
enc_size = *(*pp)++;
@@ -1356,8 +1356,8 @@ H5P__fcrt_fspace_strategy_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(strategy);
- HDassert(size);
+ assert(strategy);
+ assert(size);
if (NULL != *pp)
/* Encode free-space strategy */
@@ -1393,9 +1393,9 @@ H5P__fcrt_fspace_strategy_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(strategy);
+ assert(pp);
+ assert(*pp);
+ assert(strategy);
/* Decode free-space strategy */
*strategy = (H5F_fspace_strategy_t) * (*pp)++;
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 0fd3a68..4edb61d 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -571,7 +571,7 @@ H5P__gcrt_group_info_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Set property to default value */
- HDmemset(ginfo, 0, sizeof(H5O_ginfo_t));
+ memset(ginfo, 0, sizeof(H5O_ginfo_t));
*ginfo = H5G_def_ginfo_g;
UINT32DECODE(*pp, ginfo->lheap_size_hint)
@@ -667,7 +667,7 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded")
/* Set property to default value */
- HDmemset(linfo, 0, sizeof(H5O_linfo_t));
+ memset(linfo, 0, sizeof(H5O_linfo_t));
*linfo = H5G_def_linfo_g;
H5_DECODE_UNSIGNED(*pp, crt_order_flags)
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 45647aa..88f9550 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -461,11 +461,11 @@ H5P_init_phase1(void)
H5P_libclass_t const *lib_class = init_class[u]; /* Current class to operate on */
/* Check if the current class hasn't been initialized and can be now */
- HDassert(lib_class->class_id);
+ assert(lib_class->class_id);
if (*lib_class->class_id == (-1) &&
(lib_class->par_pclass == NULL || *lib_class->par_pclass != NULL)) {
/* Sanity check - only the root class is not allowed to have a parent class */
- HDassert(lib_class->par_pclass || lib_class == H5P_CLS_ROOT);
+ assert(lib_class->par_pclass || lib_class == H5P_CLS_ROOT);
/* Allocate the new class */
if (NULL == (*lib_class->pclass = H5P__create_class(
@@ -499,7 +499,7 @@ H5P_init_phase1(void)
} while (pass_init > 0);
/* Verify that all classes were initialized */
- HDassert(tot_init == NELMTS(init_class));
+ assert(tot_init == NELMTS(init_class));
done:
if (ret_value < 0 && tot_init > 0) {
@@ -510,7 +510,7 @@ done:
for (u = 0; u < NELMTS(init_class); u++) {
H5P_libclass_t const *lib_class = init_class[u]; /* Current class to operate on */
- HDassert(lib_class->class_id);
+ assert(lib_class->class_id);
if (*lib_class->class_id >= 0) {
/* Close the class ID */
if (H5I_dec_ref(*lib_class->class_id) < 0)
@@ -706,7 +706,7 @@ H5P__close_class_cb(void *_pclass, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pclass);
+ assert(pclass);
/* Close the property list class object */
if (H5P__close_class(pclass) < 0)
@@ -737,7 +737,7 @@ H5P__close_list_cb(void *_plist, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
+ assert(plist);
/* Close the property list object */
if (H5P_close(plist) < 0)
@@ -779,10 +779,10 @@ H5P__do_prop_cb1(H5SL_t *slist, H5P_genprop_t *prop, H5P_prp_cb1_t cb)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(slist);
- HDassert(prop);
- HDassert(prop->cmp);
- HDassert(cb);
+ assert(slist);
+ assert(prop);
+ assert(prop->cmp);
+ assert(cb);
/* Allocate space for a temporary copy of the property value */
if (NULL == (tmp_value = H5MM_malloc(prop->size)))
@@ -846,7 +846,7 @@ H5P__copy_pclass(H5P_genclass_t *pclass)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
+ assert(pclass);
/*
* Create new property class object
@@ -928,7 +928,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- HDassert(old_plist);
+ assert(old_plist);
/*
* Create new property list object
@@ -1144,8 +1144,8 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
FUNC_ENTER_PACKAGE
- HDassert(oprop);
- HDassert(type != H5P_PROP_WITHIN_UNKNOWN);
+ assert(oprop);
+ assert(type != H5P_PROP_WITHIN_UNKNOWN);
/* Allocate the new property */
if (NULL == (prop = H5FL_MALLOC(H5P_genprop_t)))
@@ -1158,8 +1158,8 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
/* Duplicating property for a class */
if (type == H5P_PROP_WITHIN_CLASS) {
- HDassert(oprop->type == H5P_PROP_WITHIN_CLASS);
- HDassert(oprop->shared_name == FALSE);
+ assert(oprop->type == H5P_PROP_WITHIN_CLASS);
+ assert(oprop->shared_name == FALSE);
/* Duplicate name */
prop->name = H5MM_xstrdup(oprop->name);
@@ -1176,8 +1176,8 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
} /* end if */
/* Duplicating a property from a class */
else {
- HDassert(oprop->type == H5P_PROP_WITHIN_CLASS);
- HDassert(oprop->shared_name == FALSE);
+ assert(oprop->type == H5P_PROP_WITHIN_CLASS);
+ assert(oprop->shared_name == FALSE);
/* Share the name */
prop->shared_name = TRUE;
@@ -1189,7 +1189,7 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
/* Duplicate current value, if it exists */
if (oprop->value != NULL) {
- HDassert(prop->size > 0);
+ assert(prop->size > 0);
if (NULL == (prop->value = H5MM_malloc(prop->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
H5MM_memcpy(prop->value, oprop->value, prop->size);
@@ -1258,9 +1258,9 @@ H5P__create_prop(const char *name, size_t size, H5P_prop_within_t type, const vo
FUNC_ENTER_PACKAGE
- HDassert(name);
- HDassert((size > 0 && value != NULL) || (size == 0));
- HDassert(type != H5P_PROP_WITHIN_UNKNOWN);
+ assert(name);
+ assert((size > 0 && value != NULL) || (size == 0));
+ assert(type != H5P_PROP_WITHIN_UNKNOWN);
/* Allocate the new property */
if (NULL == (prop = H5FL_MALLOC(H5P_genprop_t)))
@@ -1339,9 +1339,9 @@ H5P__add_prop(H5SL_t *slist, H5P_genprop_t *prop)
FUNC_ENTER_PACKAGE
- HDassert(slist);
- HDassert(prop);
- HDassert(prop->type != H5P_PROP_WITHIN_UNKNOWN);
+ assert(slist);
+ assert(prop);
+ assert(prop->type != H5P_PROP_WITHIN_UNKNOWN);
/* Insert property into skip list */
if (H5SL_insert(slist, prop, prop->name) < 0)
@@ -1376,8 +1376,8 @@ H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name)
FUNC_ENTER_PACKAGE
- HDassert(plist);
- HDassert(name);
+ assert(plist);
+ assert(name);
/* Check if the property has been deleted from list */
if (H5SL_search(plist->del, name) != NULL) {
@@ -1435,8 +1435,8 @@ H5P__find_prop_pclass(H5P_genclass_t *pclass, const char *name)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
- HDassert(name);
+ assert(pclass);
+ assert(name);
/* Get the property from the skip list */
if (NULL == (ret_value = (H5P_genprop_t *)H5SL_search(pclass->props, name)))
@@ -1469,7 +1469,7 @@ H5P__free_prop(H5P_genprop_t *prop)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(prop);
+ assert(prop);
/* Release the property value if it exists */
if (prop->value)
@@ -1512,7 +1512,7 @@ H5P__free_prop_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(tprop);
+ assert(tprop);
/* Call the close callback and ignore the return value, there's nothing we can do about it */
if (make_cb && tprop->close != NULL)
@@ -1550,7 +1550,7 @@ H5P__free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
- HDassert(del_name);
+ assert(del_name);
/* Free the name */
H5MM_xfree(del_name);
@@ -1585,8 +1585,8 @@ H5P__access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pclass);
- HDassert(mod > H5P_MOD_ERR && mod < H5P_MOD_MAX);
+ assert(pclass);
+ assert(mod > H5P_MOD_ERR && mod < H5P_MOD_MAX);
switch (mod) {
case H5P_MOD_INC_CLS: /* Increment the dependent class count*/
@@ -1623,14 +1623,14 @@ H5P__access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
case H5P_MOD_ERR:
case H5P_MOD_MAX:
default:
- HDassert(0 && "Invalid H5P class modification");
+ assert(0 && "Invalid H5P class modification");
} /* end switch */
/* Check if we can release the class information now */
if (pclass->deleted && pclass->plists == 0 && pclass->classes == 0) {
H5P_genclass_t *par_class = pclass->parent; /* Pointer to class's parent */
- HDassert(pclass->name);
+ assert(pclass->name);
H5MM_xfree(pclass->name);
/* Free the class properties without making callbacks */
@@ -1680,9 +1680,9 @@ H5P__open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(obj);
- HDassert(H5I_GENPROP_CLS == H5I_get_type(id));
- HDassert(key);
+ assert(obj);
+ assert(H5I_GENPROP_CLS == H5I_get_type(id));
+ assert(key);
/* Check if the class object has the same parent as the new class */
if (obj->parent == key->parent) {
@@ -1739,11 +1739,11 @@ H5P__create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t
FUNC_ENTER_PACKAGE
- HDassert(name);
+ assert(name);
/* Allow internal classes to break some rules */
/* (This allows the root of the tree to be created with this routine -QAK) */
if (type == H5P_TYPE_USER)
- HDassert(par_class);
+ assert(par_class);
/* Allocate room for the class */
if (NULL == (pclass = H5FL_CALLOC(H5P_genclass_t)))
@@ -1835,7 +1835,7 @@ H5P__create(H5P_genclass_t *pclass)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
+ assert(pclass);
/*
* Create new property list object
@@ -1974,7 +1974,7 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- HDassert(pclass);
+ assert(pclass);
/* Create the new property list */
if ((plist = H5P__create(pclass)) == NULL)
@@ -2214,11 +2214,11 @@ H5P__register_real(H5P_genclass_t *pclass, const char *name, size_t size, const
FUNC_ENTER_PACKAGE
- HDassert(pclass);
- HDassert(0 == pclass->plists);
- HDassert(0 == pclass->classes);
- HDassert(name);
- HDassert((size > 0 && def_value != NULL) || (size == 0));
+ assert(pclass);
+ assert(0 == pclass->plists);
+ assert(0 == pclass->classes);
+ assert(name);
+ assert((size > 0 && def_value != NULL) || (size == 0));
/* Check for duplicate named properties */
if (NULL != H5SL_search(pclass->props, name))
@@ -2445,8 +2445,8 @@ H5P__register(H5P_genclass_t **ppclass, const char *name, size_t size, const voi
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ppclass);
- HDassert(pclass);
+ assert(ppclass);
+ assert(pclass);
/* Check if class needs to be split because property lists or classes have
* been created since the last modification was made to the class.
@@ -2684,9 +2684,9 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, void *value, H5
FUNC_ENTER_NOAPI_NOINIT
- HDassert(plist);
- HDassert(name);
- HDassert((size > 0 && value != NULL) || (size == 0));
+ assert(plist);
+ assert(name);
+ assert((size > 0 && value != NULL) || (size == 0));
/* Check for duplicate named properties */
if (NULL != H5SL_search(plist->props, name))
@@ -2777,10 +2777,10 @@ H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(plist_op);
- HDassert(pclass_op);
+ assert(plist);
+ assert(name);
+ assert(plist_op);
+ assert(pclass_op);
/* Check if the property has been deleted */
if (NULL != H5SL_search(plist->del, name))
@@ -2857,9 +2857,9 @@ H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_AT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Check for property size >0 */
if (0 == prop->size)
@@ -2904,10 +2904,10 @@ H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_NDEBUG_UNUSED *nam
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
- HDassert(prop->cmp);
+ assert(plist);
+ assert(name);
+ assert(prop);
+ assert(prop->cmp);
/* Check for property size >0 */
if (0 == prop->size)
@@ -2965,9 +2965,9 @@ H5P_poke(H5P_genplist_t *plist, const char *name, const void *value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(value);
+ assert(plist);
+ assert(name);
+ assert(value);
/* Find the property and set the value */
udata.value = value;
@@ -3010,9 +3010,9 @@ H5P__set_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Check for property size >0 */
if (0 == prop->size)
@@ -3087,10 +3087,10 @@ H5P__set_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
- HDassert(prop->cmp);
+ assert(plist);
+ assert(name);
+ assert(prop);
+ assert(prop->cmp);
/* Check for property size >0 */
if (0 == prop->size)
@@ -3177,9 +3177,9 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(value);
+ assert(plist);
+ assert(name);
+ assert(value);
/* Find the property and set the value */
udata.value = value;
@@ -3224,9 +3224,9 @@ H5P__class_get(const H5P_genclass_t *pclass, const char *name, void *value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pclass);
- HDassert(name);
- HDassert(value);
+ assert(pclass);
+ assert(name);
+ assert(value);
/* Find property in list */
if (NULL == (prop = (H5P_genprop_t *)H5SL_search(pclass->props, name)))
@@ -3279,9 +3279,9 @@ H5P__class_set(const H5P_genclass_t *pclass, const char *name, const void *value
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pclass);
- HDassert(name);
- HDassert(value);
+ assert(pclass);
+ assert(name);
+ assert(value);
/* Find property in list */
if (NULL == (prop = (H5P_genprop_t *)H5SL_search(pclass->props, name)))
@@ -3326,8 +3326,8 @@ H5P_exist_plist(const H5P_genplist_t *plist, const char *name)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(plist);
- HDassert(name);
+ assert(plist);
+ assert(name);
/* Check for property in deleted property list */
if (H5SL_search(plist->del, name) != NULL)
@@ -3385,8 +3385,8 @@ H5P__exist_pclass(H5P_genclass_t *pclass, const char *name)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pclass);
- HDassert(name);
+ assert(pclass);
+ assert(name);
/* Check for property in property list */
if (H5SL_search(pclass->props, name) != NULL)
@@ -3441,9 +3441,9 @@ H5P__get_size_plist(const H5P_genplist_t *plist, const char *name, size_t *size)
FUNC_ENTER_PACKAGE
- HDassert(plist);
- HDassert(name);
- HDassert(size);
+ assert(plist);
+ assert(name);
+ assert(size);
/* Find property */
if (NULL == (prop = H5P__find_prop_plist(plist, name)))
@@ -3486,9 +3486,9 @@ H5P__get_size_pclass(H5P_genclass_t *pclass, const char *name, size_t *size)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
- HDassert(name);
- HDassert(size);
+ assert(pclass);
+ assert(name);
+ assert(size);
/* Find property */
if ((prop = H5P__find_prop_pclass(pclass, name)) == NULL)
@@ -3526,8 +3526,8 @@ H5P__get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(plist);
- HDassert(nprops);
+ assert(plist);
+ assert(nprops);
/* Get property size */
*nprops = plist->nprops;
@@ -3563,8 +3563,8 @@ H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, hbool_t recu
FUNC_ENTER_NOAPI_NOERR
- HDassert(pclass);
- HDassert(nprops);
+ assert(pclass);
+ assert(nprops);
/* Get number of properties */
*nprops = pclass->nprops;
@@ -3609,8 +3609,8 @@ H5P__cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(prop1);
- HDassert(prop2);
+ assert(prop1);
+ assert(prop2);
/* Check the name */
if ((cmp_value = HDstrcmp(prop1->name, prop2->name)) != 0)
@@ -3740,8 +3740,8 @@ H5P__cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pclass1);
- HDassert(pclass2);
+ assert(pclass1);
+ assert(pclass2);
/* Use the revision number to quickly check for identical classes */
if (pclass1->revision == pclass2->revision)
@@ -3871,8 +3871,8 @@ H5P__cmp_plist_cb(H5P_genprop_t *prop, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(prop);
- HDassert(udata);
+ assert(prop);
+ assert(udata);
/* Check if the property exists in the second property list */
if ((prop2_exist = H5P_exist_plist(udata->plist2, prop->name)) < 0)
@@ -3931,9 +3931,9 @@ H5P__cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2, int *
FUNC_ENTER_PACKAGE
- HDassert(plist1);
- HDassert(plist2);
- HDassert(cmp_ret);
+ assert(plist1);
+ assert(plist2);
+ assert(cmp_ret);
/* Check the number of properties */
if (plist1->nprops < plist2->nprops) {
@@ -4008,8 +4008,8 @@ H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
FUNC_ENTER_NOAPI_NOERR
- HDassert(pclass1);
- HDassert(pclass2);
+ assert(pclass1);
+ assert(pclass2);
/* Compare property classes */
if (H5P__cmp_class(pclass1, pclass2) == 0) {
@@ -4153,8 +4153,8 @@ H5P__iterate_plist_cb(void *_item, void *_key, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(item);
- HDassert(key);
+ assert(item);
+ assert(key);
/* Check if we've found the correctly indexed property */
if (*udata->curr_idx_ptr >= udata->prev_idx) {
@@ -4206,8 +4206,8 @@ H5P__iterate_plist_pclass_cb(void *_item, void *_key, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(item);
- HDassert(key);
+ assert(item);
+ assert(key);
/* Only call iterator callback for properties we haven't seen
* before and that haven't been deleted.
@@ -4285,9 +4285,9 @@ H5P__iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop, int *idx,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(idx);
- HDassert(cb_func);
+ assert(plist);
+ assert(idx);
+ assert(cb_func);
/* Create the skip list to hold names of properties already seen */
if (NULL == (seen = H5SL_create(H5SL_TYPE_STR, NULL)))
@@ -4364,8 +4364,8 @@ H5P__iterate_pclass_cb(void *_item, void H5_ATTR_NDEBUG_UNUSED *_key, void *_uda
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(item);
- HDassert((char *)_key);
+ assert(item);
+ assert((char *)_key);
/* Check if we've found the correctly indexed property */
if (*udata->curr_idx_ptr >= udata->prev_idx) {
@@ -4443,9 +4443,9 @@ H5P__iterate_pclass(const H5P_genclass_t *pclass, int *idx, H5P_iterate_int_t cb
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(pclass);
- HDassert(idx);
- HDassert(cb_func);
+ assert(pclass);
+ assert(idx);
+ assert(cb_func);
/* Set up iterator callback info */
udata_int.cb_func = cb_func;
@@ -4497,9 +4497,9 @@ H5P__peek_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Check for property size >0 */
if (0 == prop->size)
@@ -4545,9 +4545,9 @@ H5P_peek(H5P_genplist_t *plist, const char *name, void *value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(value);
+ assert(plist);
+ assert(name);
+ assert(value);
/* Find the property and peek at the value */
udata.value = value;
@@ -4590,9 +4590,9 @@ H5P__get_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, void *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Check for property size >0 */
if (0 == prop->size)
@@ -4661,9 +4661,9 @@ H5P_get(H5P_genplist_t *plist, const char *name, void *value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(value);
+ assert(plist);
+ assert(name);
+ assert(value);
/* Find the property and get the value */
udata.value = value;
@@ -4704,9 +4704,9 @@ H5P__del_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Pass value to 'close' callback, if it exists */
if (NULL != prop->del) {
@@ -4773,9 +4773,9 @@ H5P__del_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Pass value to 'del' callback, if it exists */
if (NULL != prop->del) {
@@ -4848,8 +4848,8 @@ H5P_remove(H5P_genplist_t *plist, const char *name)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
+ assert(plist);
+ assert(name);
/* Find the property and get the value */
if (H5P__do_prop(plist, name, H5P__del_plist_cb, H5P__del_pclass_cb, NULL) < 0)
@@ -4901,7 +4901,7 @@ H5P__copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
FUNC_ENTER_PACKAGE
- HDassert(name);
+ assert(name);
/* Get the objects to operate on */
if (NULL == (src_plist = (H5P_genplist_t *)H5I_object(src_id)) ||
@@ -5012,7 +5012,7 @@ H5P__copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(name);
+ assert(name);
/* Get property list classes */
if (NULL == (src_pclass = (H5P_genclass_t *)H5I_object(src_id)))
@@ -5044,7 +5044,7 @@ H5P__copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
/* Substitute the new destination property class in the ID */
if (NULL == (old_dst_pclass = (H5P_genclass_t *)H5I_subst(dst_id, dst_pclass)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID")
- HDassert(old_dst_pclass == orig_dst_pclass);
+ assert(old_dst_pclass == orig_dst_pclass);
/* Close the previous class */
if (H5P__close_class(old_dst_pclass) < 0)
@@ -5087,8 +5087,8 @@ H5P__unregister(H5P_genclass_t *pclass, const char *name)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
- HDassert(name);
+ assert(pclass);
+ assert(name);
/* Get the property node from the skip list */
if ((prop = (H5P_genprop_t *)H5SL_search(pclass->props, name)) == NULL)
@@ -5150,7 +5150,7 @@ H5P_close(H5P_genplist_t *plist)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(plist);
+ assert(plist);
/* Make call to property list class close callback, if needed
* (up through chain of parent classes also)
@@ -5310,7 +5310,7 @@ H5P_get_class_name(H5P_genclass_t *pclass)
FUNC_ENTER_NOAPI_NOERR
- HDassert(pclass);
+ assert(pclass);
/* Get class name */
ret_value = H5MM_xstrdup(pclass->name);
@@ -5346,7 +5346,7 @@ H5P__get_class_path(H5P_genclass_t *pclass)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
+ assert(pclass);
/* Recursively build the full path */
if (pclass->parent != NULL) {
@@ -5412,11 +5412,11 @@ H5P__open_class_path(const char *path)
FUNC_ENTER_PACKAGE
- HDassert(path);
+ assert(path);
/* Duplicate the path to use */
tmp_path = H5MM_xstrdup(path);
- HDassert(tmp_path);
+ assert(tmp_path);
/* Find the generic property class with this full path */
curr_name = tmp_path;
@@ -5491,7 +5491,7 @@ H5P__get_class_parent(const H5P_genclass_t *pclass)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pclass);
+ assert(pclass);
/* Get property size */
ret_value = pclass->parent;
@@ -5523,7 +5523,7 @@ H5P__close_class(H5P_genclass_t *pclass)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(pclass);
+ assert(pclass);
/* Decrement the reference count & check if the object should go away */
if (H5P__access_class(pclass, H5P_MOD_DEC_REF) < 0)
@@ -5557,7 +5557,7 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
/* Sanity checks */
HDcompile_assert(H5P_TYPE_REFERENCE_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
- HDassert(type >= H5P_TYPE_USER && type <= H5P_TYPE_REFERENCE_ACCESS);
+ assert(type >= H5P_TYPE_USER && type <= H5P_TYPE_REFERENCE_ACCESS);
/* Check arguments */
if (type == H5P_TYPE_USER)
@@ -5693,7 +5693,7 @@ H5P_get_plist_id(const H5P_genplist_t *plist)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(plist);
+ assert(plist);
FUNC_LEAVE_NOAPI(plist->plist_id)
} /* end H5P_get_plist_id() */
@@ -5720,7 +5720,7 @@ H5P_get_class(const H5P_genplist_t *plist)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(plist);
+ assert(plist);
FUNC_LEAVE_NOAPI(plist->pclass)
} /* end H5P_get_class() */
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 469006b..c143a71 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -257,7 +257,7 @@ H5P__lacc_elink_fapl_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = *(const hid_t *)value;
@@ -299,7 +299,7 @@ H5P__lacc_elink_fapl_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = *(const hid_t *)value;
@@ -370,7 +370,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size)
/* encode the length of the plist */
enc_value = (uint64_t)fapl_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -415,9 +415,9 @@ H5P__lacc_elink_fapl_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pp);
- HDassert(*pp);
- HDassert(elink_fapl);
+ assert(pp);
+ assert(*pp);
+ assert(elink_fapl);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Determine if the FAPL is non-default */
@@ -430,7 +430,7 @@ H5P__lacc_elink_fapl_dec(const void **_pp, void *_value)
/* Decode the plist length */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
fapl_size = (size_t)enc_value;
@@ -470,7 +470,7 @@ H5P__lacc_elink_fapl_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = (*(const hid_t *)value);
@@ -505,7 +505,7 @@ H5P__lacc_elink_fapl_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = (*(const hid_t *)value);
@@ -567,7 +567,7 @@ H5P__lacc_elink_fapl_cmp(const void *value1, const void *value2, size_t H5_ATTR_
herr_t H5_ATTR_NDEBUG_UNUSED status;
status = H5P__cmp_plist(obj1, obj2, &ret_value);
- HDassert(status >= 0);
+ assert(status >= 0);
} /* end if */
done:
@@ -596,7 +596,7 @@ H5P__lacc_elink_fapl_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = (*(const hid_t *)value);
@@ -629,7 +629,7 @@ H5P__lacc_elink_pref_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -657,7 +657,7 @@ H5P__lacc_elink_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -699,7 +699,7 @@ H5P__lacc_elink_pref_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* encode the length of the prefix */
@@ -747,14 +747,14 @@ H5P__lacc_elink_pref_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
- HDassert(pp);
- HDassert(*pp);
- HDassert(elink_pref);
+ assert(pp);
+ assert(*pp);
+ assert(elink_pref);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -794,7 +794,7 @@ H5P__lacc_elink_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -818,7 +818,7 @@ H5P__lacc_elink_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -876,7 +876,7 @@ H5P__lacc_elink_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index 214c3ba..13cb66f 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -1210,7 +1210,7 @@ H5P__get_filter(const H5Z_filter_info_t *filter, unsigned int *flags /*out*/, si
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(filter);
+ assert(filter);
/* Filter flags */
if (flags)
@@ -1288,7 +1288,7 @@ H5P__ocrt_pipeline_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of I/O pipeline */
if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &new_pline))
@@ -1325,7 +1325,7 @@ H5P__ocrt_pipeline_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of I/O pipeline */
if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &new_pline))
@@ -1362,8 +1362,8 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pline);
- HDassert(size);
+ assert(pline);
+ assert(size);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
if (NULL != *pp) {
@@ -1376,7 +1376,7 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
/* encode nused value */
enc_value = (uint64_t)pline->nused;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -1406,7 +1406,7 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
/* encode cd_nelmts */
enc_value = (uint64_t)pline->filter[u].cd_nelmts;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -1467,12 +1467,12 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
/* decode nused */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
nused = (size_t)enc_value;
/* Set property default value */
- HDmemset(pline, 0, sizeof(H5O_pline_t));
+ memset(pline, 0, sizeof(H5O_pline_t));
*pline = H5O_def_pline_g;
for (u = 0; u < nused; u++) {
@@ -1498,7 +1498,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
/* decode num elements */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
filter.cd_nelmts = (size_t)enc_value;
@@ -1547,7 +1547,7 @@ H5P__ocrt_pipeline_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old I/O pipeline */
if (H5O_msg_reset(H5O_PLINE_ID, value) < 0)
@@ -1580,7 +1580,7 @@ H5P__ocrt_pipeline_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED s
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pline);
+ assert(pline);
/* Make copy of I/O pipeline */
if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &new_pline))
@@ -1619,9 +1619,9 @@ H5P__ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t H5_ATTR_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(pline1);
- HDassert(pline2);
- HDassert(size == sizeof(H5O_pline_t));
+ assert(pline1);
+ assert(pline2);
+ assert(size == sizeof(H5O_pline_t));
/* Check the number of used pipeline entries */
if (pline1->nused < pline2->nused)
@@ -1711,7 +1711,7 @@ H5P__ocrt_pipeline_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old I/O pipeline */
if (H5O_msg_reset(H5O_PLINE_ID, value) < 0)
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index 94e0a12..4260492 100644
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -238,7 +238,7 @@ H5P__copy_merge_comm_dt_list(H5O_copy_dtype_merge_list_t **value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of merge committed dtype list */
src_dt_list = *value;
@@ -301,7 +301,7 @@ H5P__ocpy_merge_comm_dt_list_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of merge committed dtype list */
if (H5P__copy_merge_comm_dt_list((H5O_copy_dtype_merge_list_t **)value) < 0)
@@ -333,7 +333,7 @@ H5P__ocpy_merge_comm_dt_list_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of merge committed dtype list */
if (H5P__copy_merge_comm_dt_list((H5O_copy_dtype_merge_list_t **)value) < 0)
@@ -368,8 +368,8 @@ H5P__ocpy_merge_comm_dt_list_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt_list_ptr);
- HDassert(size);
+ assert(dt_list_ptr);
+ assert(size);
/* Iterate over merge committed dtype list */
dt_list = *dt_list_ptr;
@@ -429,9 +429,9 @@ H5P__ocpy_merge_comm_dt_list_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pp);
- HDassert(*pp);
- HDassert(dt_list);
+ assert(pp);
+ assert(*pp);
+ assert(dt_list);
/* Start off with NULL (default value) */
*dt_list = NULL;
@@ -445,7 +445,7 @@ H5P__ocpy_merge_comm_dt_list_dec(const void **_pp, void *_value)
if (NULL == (tmp_dt_list->path = H5MM_strdup(*(const char **)pp)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed")
*pp += len + 1;
- HDassert(len == HDstrlen(tmp_dt_list->path));
+ assert(len == HDstrlen(tmp_dt_list->path));
/* Add copied node to dtype list */
if (dt_list_tail) {
@@ -497,7 +497,7 @@ H5P__ocpy_merge_comm_dt_list_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Free the merge named dtype list */
H5P__free_merge_comm_dtype_list(*(H5O_copy_dtype_merge_list_t **)value);
@@ -526,7 +526,7 @@ H5P__ocpy_merge_comm_dt_list_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of merge committed dtype list */
if (H5P__copy_merge_comm_dt_list((H5O_copy_dtype_merge_list_t **)value) < 0)
@@ -563,15 +563,15 @@ H5P__ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2, s
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(_dt_list1);
- HDassert(_dt_list2);
- HDassert(size == sizeof(H5O_copy_dtype_merge_list_t *));
+ assert(_dt_list1);
+ assert(_dt_list2);
+ assert(size == sizeof(H5O_copy_dtype_merge_list_t *));
/* Walk through the lists, comparing each path. For the lists to be the
* same, the paths must be in the same order. */
while (dt_list1 && dt_list2) {
- HDassert(dt_list1->path);
- HDassert(dt_list2->path);
+ assert(dt_list1->path);
+ assert(dt_list2->path);
/* Compare paths */
ret_value = HDstrcmp(dt_list1->path, dt_list2->path);
@@ -611,7 +611,7 @@ H5P__ocpy_merge_comm_dt_list_close(const char H5_ATTR_UNUSED *name, size_t H5_AT
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
/* Free the merge named dtype list */
H5P__free_merge_comm_dtype_list(*(H5O_copy_dtype_merge_list_t **)value);
diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c
index e27de8c..d7fabff 100644
--- a/src/H5Pstrcpl.c
+++ b/src/H5Pstrcpl.c
@@ -222,8 +222,8 @@ H5P__strcrt_char_encoding_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(encoding);
- HDassert(size);
+ assert(encoding);
+ assert(size);
if (NULL != *pp)
/* Encode character set encoding */
@@ -259,9 +259,9 @@ H5P__strcrt_char_encoding_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(encoding);
+ assert(pp);
+ assert(*pp);
+ assert(encoding);
/* Decode character set encoding */
*encoding = (H5T_cset_t) * (*pp)++;
diff --git a/src/H5R.c b/src/H5R.c
index f64141f..ce54bd2 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -146,7 +146,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token")
/* Create the reference (do not pass filename, since file_id is attached) */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
if (H5R__create_object(&obj_token, cont_info.token_size, (H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference")
@@ -247,7 +247,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token")
/* Create the reference (do not pass filename, since file_id is attached) */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
if (H5R__create_region((const H5O_token_t *)&obj_token, cont_info.token_size, space,
(H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference")
@@ -345,7 +345,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token")
/* Create the reference (do not pass filename, since file_id is attached) */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
if (H5R__create_attr((const H5O_token_t *)&obj_token, cont_info.token_size, attr_name,
(H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create attribute reference")
@@ -387,7 +387,7 @@ H5Rdestroy(H5R_ref_t *ref_ptr)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "unable to destroy reference")
/* Memset back to 0 for safety */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5RS.c b/src/H5RS.c
index 13422a3..d9a4de3 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -110,7 +110,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(rs);
+ assert(rs);
if (s) {
size_t len = HDstrlen(s);
@@ -124,7 +124,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
if (NULL == (rs->s = (char *)H5FL_BLK_MALLOC(str_buf, rs->max)))
HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed")
if (len)
- HDmemcpy(rs->s, s, len);
+ memcpy(rs->s, s, len);
rs->end = rs->s + len;
*rs->end = '\0';
rs->len = len;
@@ -138,9 +138,9 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
} /* end if */
else {
/* Sanity checks */
- HDassert(NULL == rs->end);
- HDassert(0 == rs->max);
- HDassert(0 == rs->len);
+ assert(NULL == rs->end);
+ assert(0 == rs->max);
+ assert(0 == rs->len);
} /* end else */
} /* end else */
@@ -174,7 +174,7 @@ H5RS__prepare_for_append(H5RS_str_t *rs)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(rs);
+ assert(rs);
if (NULL == rs->s) {
rs->max = H5RS_ALLOC_SIZE;
@@ -226,7 +226,7 @@ H5RS__resize_for_append(H5RS_str_t *rs, size_t len)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(rs);
+ assert(rs);
/* Check if buffer should be re-allocated */
if (len >= (rs->max - rs->len)) {
@@ -365,24 +365,24 @@ H5RS_asprintf_cat(H5RS_str_t *rs, const char *fmt, ...)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(rs);
- HDassert(fmt);
+ assert(rs);
+ assert(fmt);
/* Prepare the [possibly wrapped or empty] ref-counted string for an append */
if (H5RS__prepare_for_append(rs) < 0)
HGOTO_ERROR(H5E_RS, H5E_CANTINIT, FAIL, "can't initialize ref-counted string")
/* Attempt to write formatted output into the managed string */
- HDva_start(args1, fmt);
- HDva_copy(args2, args1);
+ va_start(args1, fmt);
+ va_copy(args2, args1);
while ((out_len = (size_t)HDvsnprintf(rs->end, (rs->max - rs->len), fmt, args1)) >= (rs->max - rs->len)) {
/* Allocate a large enough buffer */
if (H5RS__resize_for_append(rs, out_len) < 0)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer")
/* Restart the va_list */
- HDva_end(args1);
- HDva_copy(args1, args2);
+ va_end(args1);
+ va_copy(args1, args2);
} /* end while */
/* Increment the size & end of the string */
@@ -390,8 +390,8 @@ H5RS_asprintf_cat(H5RS_str_t *rs, const char *fmt, ...)
rs->end += out_len;
/* Finish access to varargs */
- HDva_end(args1);
- HDva_end(args2);
+ va_end(args1);
+ va_end(args2);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -419,8 +419,8 @@ H5RS_acat(H5RS_str_t *rs, const char *s)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(rs);
- HDassert(s);
+ assert(rs);
+ assert(s);
/* Concatenate the provided string on to the managed string */
if (*s) {
@@ -436,7 +436,7 @@ H5RS_acat(H5RS_str_t *rs, const char *s)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer")
/* Append the string */
- HDmemcpy(rs->end, s, len);
+ memcpy(rs->end, s, len);
rs->end += len;
*rs->end = '\0';
rs->len += len;
@@ -468,8 +468,8 @@ H5RS_ancat(H5RS_str_t *rs, const char *s, size_t n)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(rs);
- HDassert(s);
+ assert(rs);
+ assert(s);
/* Concatenate the provided string on to the managed string */
if (n && *s) {
@@ -488,7 +488,7 @@ H5RS_ancat(H5RS_str_t *rs, const char *s, size_t n)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer")
/* Append the string */
- HDmemcpy(rs->end, s, n);
+ memcpy(rs->end, s, n);
rs->end += n;
*rs->end = '\0';
rs->len += n;
@@ -519,8 +519,8 @@ H5RS_aputc(H5RS_str_t *rs, int c)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(rs);
- HDassert(c);
+ assert(rs);
+ assert(c);
/* Allocate the underlying string, if necessary */
if (H5RS__prepare_for_append(rs) < 0)
@@ -565,8 +565,8 @@ H5RS_decr(H5RS_str_t *rs)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs);
- HDassert(rs->n > 0);
+ assert(rs);
+ assert(rs->n > 0);
/* Decrement reference count for string */
if ((--rs->n) == 0) {
@@ -604,8 +604,8 @@ H5RS_incr(H5RS_str_t *rs)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(rs);
- HDassert(rs->n > 0);
+ assert(rs);
+ assert(rs->n > 0);
/* If the ref-counted string started life as a wrapper around an existing
* string, duplicate the string now, so that the wrapped string can go out
@@ -684,10 +684,10 @@ H5RS_cmp(const H5RS_str_t *rs1, const H5RS_str_t *rs2)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs1);
- HDassert(rs1->s);
- HDassert(rs2);
- HDassert(rs2->s);
+ assert(rs1);
+ assert(rs1->s);
+ assert(rs2);
+ assert(rs2->s);
FUNC_LEAVE_NOAPI(HDstrcmp(rs1->s, rs2->s))
} /* end H5RS_cmp() */
@@ -716,8 +716,8 @@ H5RS_len(const H5RS_str_t *rs)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs);
- HDassert(rs->s);
+ assert(rs);
+ assert(rs->s);
FUNC_LEAVE_NOAPI(HDstrlen(rs->s))
} /* end H5RS_len() */
@@ -749,8 +749,8 @@ H5RS_get_str(const H5RS_str_t *rs)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs);
- HDassert(rs->s);
+ assert(rs);
+ assert(rs->s);
FUNC_LEAVE_NOAPI(rs->s)
} /* end H5RS_get_str() */
@@ -780,8 +780,8 @@ H5RS_get_count(const H5RS_str_t *rs)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs);
- HDassert(rs->n > 0);
+ assert(rs);
+ assert(rs->n > 0);
FUNC_LEAVE_NOAPI(rs->n)
} /* end H5RS_get_count() */
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index 0e1011f..b1daf26 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -107,7 +107,7 @@ H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -173,11 +173,11 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(obj_token);
- HDassert(token_size);
- HDassert(space);
- HDassert(nalloc);
+ assert(f);
+ assert(obj_token);
+ assert(token_size);
+ assert(space);
+ assert(nalloc);
/* Get required buffer size */
if (H5R__encode_heap(f, NULL, &buf_size, NULL, (size_t)0) < 0)
@@ -194,7 +194,7 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t
/* Zero the heap ID out, may leak heap space if user is re-using
* reference and doesn't have garbage collection turned on
*/
- HDmemset(buf, 0, buf_size);
+ memset(buf, 0, buf_size);
/* Get the amount of space required to serialize the selection */
if ((data_size = H5S_SELECT_SERIAL_SIZE(space)) < 0)
@@ -412,7 +412,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -663,7 +663,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
"can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 7b22150..a14d4b3 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -91,10 +91,10 @@
#ifdef H5R_DEBUG
#define H5R_LOG_DEBUG(...) \
do { \
- HDfprintf(stdout, " # %s(): ", __func__); \
- HDfprintf(stdout, __VA_ARGS__); \
- HDfprintf(stdout, "\n"); \
- HDfflush(stdout); \
+ fprintf(stdout, " # %s(): ", __func__); \
+ fprintf(stdout, __VA_ARGS__); \
+ fprintf(stdout, "\n"); \
+ fflush(stdout); \
} while (0)
static const char *
H5R__print_token(const H5O_token_t token)
@@ -187,7 +187,7 @@ H5R__create_object(const H5O_token_t *obj_token, size_t token_size, H5R_ref_priv
FUNC_ENTER_PACKAGE
- HDassert(ref);
+ assert(ref);
/* Create new reference */
ref->info.obj.filename = NULL;
@@ -226,8 +226,8 @@ H5R__create_region(const H5O_token_t *obj_token, size_t token_size, H5S_t *space
FUNC_ENTER_PACKAGE
- HDassert(space);
- HDassert(ref);
+ assert(space);
+ assert(ref);
/* Create new reference */
ref->info.obj.filename = NULL;
@@ -275,8 +275,8 @@ H5R__create_attr(const H5O_token_t *obj_token, size_t token_size, const char *at
FUNC_ENTER_PACKAGE
- HDassert(attr_name);
- HDassert(ref);
+ assert(attr_name);
+ assert(ref);
/* Make sure that attribute name is not longer than supported encode size */
if (HDstrlen(attr_name) > H5R_MAX_STRING_LEN)
@@ -327,7 +327,7 @@ H5R__destroy(H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE
- HDassert(ref != NULL);
+ assert(ref != NULL);
H5R_LOG_DEBUG("Destroying reference, filename=%s, obj_addr=%s, encode size=%u", ref->info.obj.filename,
H5R__print_token(ref->info.obj.token), ref->encode_size);
@@ -355,11 +355,11 @@ H5R__destroy(H5R_ref_priv_t *ref)
break;
case H5R_BADTYPE:
case H5R_MAXTYPE:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -395,8 +395,8 @@ H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref)
FUNC_ENTER_PACKAGE
- HDassert(ref != NULL);
- HDassert(id != H5I_INVALID_HID);
+ assert(ref != NULL);
+ assert(id != H5I_INVALID_HID);
/* If a location ID was previously assigned, decrement refcount and
* assign new one */
@@ -440,7 +440,7 @@ H5R__get_loc_id(const H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(ref != NULL);
+ assert(ref != NULL);
ret_value = ref->loc_id;
@@ -543,7 +543,7 @@ H5R__get_type(const H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(ref != NULL);
+ assert(ref != NULL);
ret_value = (H5R_type_t)ref->type;
FUNC_LEAVE_NOAPI(ret_value)
@@ -565,8 +565,8 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
FUNC_ENTER_PACKAGE
- HDassert(ref1 != NULL);
- HDassert(ref2 != NULL);
+ assert(ref1 != NULL);
+ assert(ref2 != NULL);
/* Compare reference types */
if (ref1->type != ref2->type)
@@ -575,7 +575,7 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
/* Compare object addresses */
if (ref1->token_size != ref2->token_size)
HGOTO_DONE(FALSE);
- if (0 != HDmemcmp(&ref1->info.obj.token, &ref2->info.obj.token, ref1->token_size))
+ if (0 != memcmp(&ref1->info.obj.token, &ref2->info.obj.token, ref1->token_size))
HGOTO_DONE(FALSE);
/* Compare filenames */
@@ -594,7 +594,7 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, FAIL, "cannot compare dataspace extents")
break;
case H5R_ATTR:
- HDassert(ref1->info.attr.name && ref2->info.attr.name);
+ assert(ref1->info.attr.name && ref2->info.attr.name);
if (0 != HDstrcmp(ref1->info.attr.name, ref2->info.attr.name))
HGOTO_DONE(FALSE);
break;
@@ -602,10 +602,10 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
case H5R_DATASET_REGION1:
case H5R_BADTYPE:
case H5R_MAXTYPE:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -629,7 +629,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
FUNC_ENTER_PACKAGE
- HDassert((src_ref != NULL) && (dst_ref != NULL));
+ assert((src_ref != NULL) && (dst_ref != NULL));
H5MM_memcpy(&dst_ref->info.obj.token, &src_ref->info.obj.token, sizeof(H5O_token_t));
dst_ref->encode_size = src_ref->encode_size;
@@ -649,18 +649,18 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
break;
case H5R_OBJECT1:
case H5R_DATASET_REGION1:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
case H5R_BADTYPE:
case H5R_MAXTYPE:
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
/* We only need to keep a copy of the filename if we don't have the loc_id */
if (src_ref->loc_id == H5I_INVALID_HID) {
- HDassert(src_ref->info.obj.filename);
+ assert(src_ref->info.obj.filename);
if (NULL == (dst_ref->info.obj.filename = HDstrdup(src_ref->info.obj.filename)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy filename")
@@ -696,8 +696,8 @@ H5R__get_obj_token(const H5R_ref_priv_t *ref, H5O_token_t *obj_token, size_t *to
FUNC_ENTER_PACKAGE
- HDassert(ref != NULL);
- HDassert(ref->token_size <= H5O_MAX_TOKEN_SIZE);
+ assert(ref != NULL);
+ assert(ref->token_size <= H5O_MAX_TOKEN_SIZE);
if (obj_token) {
if (0 == ref->token_size)
@@ -727,13 +727,13 @@ H5R__set_obj_token(H5R_ref_priv_t *ref, const H5O_token_t *obj_token, size_t tok
FUNC_ENTER_PACKAGE_NOERR
- HDassert(ref != NULL);
- HDassert(obj_token);
- HDassert(token_size);
- HDassert(token_size <= H5O_MAX_TOKEN_SIZE);
+ assert(ref != NULL);
+ assert(obj_token);
+ assert(token_size);
+ assert(token_size <= H5O_MAX_TOKEN_SIZE);
H5MM_memcpy(&ref->info.obj.token, obj_token, token_size);
- HDassert(token_size <= 255);
+ assert(token_size <= 255);
ref->token_size = (uint8_t)token_size;
FUNC_LEAVE_NOAPI(ret_value)
@@ -757,9 +757,9 @@ H5R__get_region(const H5R_ref_priv_t *ref, H5S_t *space)
FUNC_ENTER_PACKAGE
- HDassert(ref != NULL);
- HDassert(ref->type == H5R_DATASET_REGION2);
- HDassert(space);
+ assert(ref != NULL);
+ assert(ref->type == H5R_DATASET_REGION2);
+ assert(space);
/* Copy reference selection to destination */
if (H5S_select_copy(space, ref->info.reg.space, FALSE) < 0)
@@ -788,7 +788,7 @@ H5R__get_file_name(const H5R_ref_priv_t *ref, char *buf, size_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(ref != NULL);
+ assert(ref != NULL);
/* Return if that reference has no filename set */
if (!ref->info.obj.filename)
@@ -796,7 +796,7 @@ H5R__get_file_name(const H5R_ref_priv_t *ref, char *buf, size_t size)
/* Get the file name length */
copy_len = HDstrlen(ref->info.obj.filename);
- HDassert(copy_len <= H5R_MAX_STRING_LEN);
+ assert(copy_len <= H5R_MAX_STRING_LEN);
/* Copy the file name */
if (buf) {
@@ -828,12 +828,12 @@ H5R__get_attr_name(const H5R_ref_priv_t *ref, char *buf, size_t size)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(ref != NULL);
- HDassert(ref->type == H5R_ATTR);
+ assert(ref != NULL);
+ assert(ref->type == H5R_ATTR);
/* Get the attribute name length */
attr_name_len = HDstrlen(ref->info.attr.name);
- HDassert(attr_name_len <= H5R_MAX_STRING_LEN);
+ assert(attr_name_len <= H5R_MAX_STRING_LEN);
/* Get the attribute name */
if (buf) {
@@ -866,8 +866,8 @@ H5R__encode(const char *filename, const H5R_ref_priv_t *ref, unsigned char *buf,
FUNC_ENTER_PACKAGE
- HDassert(ref);
- HDassert(nalloc);
+ assert(ref);
+ assert(nalloc);
/**
* Encoding format:
@@ -929,11 +929,11 @@ H5R__encode(const char *filename, const H5R_ref_priv_t *ref, unsigned char *buf,
case H5R_DATASET_REGION1:
case H5R_BADTYPE:
case H5R_MAXTYPE:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -966,9 +966,9 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(buf);
- HDassert(nbytes);
- HDassert(ref);
+ assert(buf);
+ assert(nbytes);
+ assert(ref);
/* Don't decode if buffer size isn't big enough */
buf_size = *nbytes;
@@ -1016,10 +1016,10 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref)
case H5R_DATASET_REGION1:
case H5R_BADTYPE:
case H5R_MAXTYPE:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -1055,7 +1055,7 @@ H5R__encode_obj_token(const H5O_token_t *obj_token, size_t token_size, unsigned
FUNC_ENTER_PACKAGE_NOERR
- HDassert(nalloc);
+ assert(nalloc);
/* Don't encode if buffer size isn't big enough or buffer is empty */
if (buf && *nalloc >= token_size) {
@@ -1089,10 +1089,10 @@ H5R__decode_obj_token(const unsigned char *buf, size_t *nbytes, H5O_token_t *obj
FUNC_ENTER_PACKAGE
- HDassert(buf);
- HDassert(nbytes);
- HDassert(obj_token);
- HDassert(token_size);
+ assert(buf);
+ assert(nbytes);
+ assert(obj_token);
+ assert(token_size);
/* Don't decode if buffer size isn't big enough */
if (*nbytes < sizeof(uint8_t))
@@ -1104,7 +1104,7 @@ H5R__decode_obj_token(const unsigned char *buf, size_t *nbytes, H5O_token_t *obj
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Invalid token size (%u)", *token_size)
/* Make sure that token is initialized */
- HDmemset(obj_token, 0, sizeof(H5O_token_t));
+ memset(obj_token, 0, sizeof(H5O_token_t));
/* Decode token */
H5MM_memcpy(obj_token, p, *token_size);
@@ -1133,8 +1133,8 @@ H5R__encode_region(H5S_t *space, unsigned char *buf, size_t *nalloc)
FUNC_ENTER_PACKAGE
- HDassert(space);
- HDassert(nalloc);
+ assert(space);
+ assert(nalloc);
/* Get the amount of space required to serialize the selection */
if ((buf_size = H5S_SELECT_SERIAL_SIZE(space)) < 0)
@@ -1185,9 +1185,9 @@ H5R__decode_region(const unsigned char *buf, size_t *nbytes, H5S_t **space_ptr)
FUNC_ENTER_PACKAGE
- HDassert(buf);
- HDassert(nbytes);
- HDassert(space_ptr);
+ assert(buf);
+ assert(nbytes);
+ assert(space_ptr);
/* Don't decode if buffer size isn't big enough */
if (*nbytes < (2 * sizeof(uint32_t)))
@@ -1241,8 +1241,8 @@ H5R__encode_string(const char *string, unsigned char *buf, size_t *nalloc)
FUNC_ENTER_PACKAGE
- HDassert(string);
- HDassert(nalloc);
+ assert(string);
+ assert(nalloc);
/* Get the amount of space required to serialize the string */
string_len = HDstrlen(string);
@@ -1284,9 +1284,9 @@ H5R__decode_string(const unsigned char *buf, size_t *nbytes, char **string_ptr)
FUNC_ENTER_PACKAGE
- HDassert(buf);
- HDassert(nbytes);
- HDassert(string_ptr);
+ assert(buf);
+ assert(nbytes);
+ assert(string_ptr);
/* Don't decode if buffer size isn't big enough */
if (*nbytes < sizeof(uint16_t))
@@ -1294,7 +1294,7 @@ H5R__decode_string(const unsigned char *buf, size_t *nbytes, char **string_ptr)
/* Get the string length */
UINT16DECODE(p, string_len);
- HDassert(string_len <= H5R_MAX_STRING_LEN);
+ assert(string_len <= H5R_MAX_STRING_LEN);
/* Allocate the string */
if (NULL == (string = (char *)H5MM_malloc(string_len + 1)))
@@ -1328,8 +1328,8 @@ H5R__encode_heap(H5F_t *f, unsigned char *buf, size_t *nalloc, const unsigned ch
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(nalloc);
+ assert(f);
+ assert(nalloc);
buf_size = H5HG_HEAP_ID_SIZE(f);
if (buf && *nalloc >= buf_size) {
@@ -1370,10 +1370,10 @@ H5R__decode_heap(H5F_t *f, const unsigned char *buf, size_t *nbytes, unsigned ch
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(buf);
- HDassert(nbytes);
- HDassert(data_ptr);
+ assert(f);
+ assert(buf);
+ assert(nbytes);
+ assert(data_ptr);
buf_size = H5HG_HEAP_ID_SIZE(f);
/* Don't decode if buffer size isn't big enough */
@@ -1413,9 +1413,9 @@ H5R__encode_token_obj_compat(const H5O_token_t *obj_token, size_t token_size, un
FUNC_ENTER_PACKAGE_NOERR
- HDassert(obj_token);
- HDassert(token_size);
- HDassert(nalloc);
+ assert(obj_token);
+ assert(token_size);
+ assert(nalloc);
/* Don't encode if buffer size isn't big enough or buffer is empty */
if (buf && *nalloc >= token_size)
@@ -1443,10 +1443,10 @@ H5R__decode_token_obj_compat(const unsigned char *buf, size_t *nbytes, H5O_token
FUNC_ENTER_PACKAGE
- HDassert(buf);
- HDassert(nbytes);
- HDassert(obj_token);
- HDassert(token_size);
+ assert(buf);
+ assert(nbytes);
+ assert(obj_token);
+ assert(token_size);
/* Don't decode if buffer size isn't big enough */
if (*nbytes < token_size)
@@ -1484,10 +1484,10 @@ H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf, size_t *nbyt
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(buf);
- HDassert(nbytes);
- HDassert(token_size);
+ assert(f);
+ assert(buf);
+ assert(nbytes);
+ assert(token_size);
/* Read from heap */
if (H5R__decode_heap(f, buf, nbytes, &data, &data_size) < 0)
diff --git a/src/H5S.c b/src/H5S.c
index b0f9dbf..4293ca9 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -186,8 +186,8 @@ H5S_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_DATASPACE));
- HDassert(0 == H5I_nmembers(H5I_SPACE_SEL_ITER));
+ assert(0 == H5I_nmembers(H5I_DATASPACE));
+ assert(0 == H5I_nmembers(H5I_SPACE_SEL_ITER));
/* Destroy the dataspace object id group */
n += (H5I_dec_type_ref(H5I_DATASPACE) > 0);
@@ -219,7 +219,7 @@ H5S__close_cb(void *_space, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space);
+ assert(space);
/* Close the dataspace object */
if (H5S_close(space) < 0)
@@ -280,7 +280,7 @@ H5S_create(H5S_class_t type)
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace (extent) type" && 0);
+ assert("unknown dataspace (extent) type" && 0);
break;
} /* end switch */
@@ -369,7 +369,7 @@ H5S__extent_release(H5S_extent_t *extent)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(extent);
+ assert(extent);
/* Release extent */
if (extent->type == H5S_SIMPLE) {
@@ -404,7 +404,7 @@ H5S_close(H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(ds);
+ assert(ds);
/* Release selection (this should come before the extent release) */
if (H5S_SELECT_RELEASE(ds) < 0)
@@ -556,8 +556,8 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dst);
- HDassert(src);
+ assert(dst);
+ assert(src);
/* Copy extent */
if (H5S__extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0)
@@ -629,7 +629,7 @@ H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_m
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace type" && 0);
+ assert("unknown dataspace type" && 0);
break;
} /* end switch */
@@ -716,7 +716,7 @@ H5S_get_simple_extent_npoints(const H5S_t *ds)
FUNC_ENTER_NOAPI_NOERR
/* check args */
- HDassert(ds);
+ assert(ds);
/* Get the number of elements in extent */
ret_value = (hssize_t)ds->extent.nelem;
@@ -783,7 +783,7 @@ H5S_get_npoints_max(const H5S_t *ds)
FUNC_ENTER_NOAPI(0)
/* check args */
- HDassert(ds);
+ assert(ds);
switch (H5S_GET_EXTENT_TYPE(ds)) {
case H5S_NULL:
@@ -812,7 +812,7 @@ H5S_get_npoints_max(const H5S_t *ds)
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace class" && 0);
+ assert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, 0, "internal error (unknown dataspace class)")
}
@@ -879,7 +879,7 @@ H5S_get_simple_extent_ndims(const H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(ds);
+ assert(ds);
switch (H5S_GET_EXTENT_TYPE(ds)) {
case H5S_NULL:
@@ -890,7 +890,7 @@ H5S_get_simple_extent_ndims(const H5S_t *ds)
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace class" && 0);
+ assert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)")
} /* end switch */
@@ -956,7 +956,7 @@ H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[])
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(ext);
+ assert(ext);
switch (ext->type) {
case H5S_NULL:
@@ -980,7 +980,7 @@ H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[])
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace class" && 0);
+ assert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)")
} /* end switch */
@@ -1010,7 +1010,7 @@ H5S_get_simple_extent_dims(const H5S_t *ds, hsize_t dims[], hsize_t max_dims[])
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(ds);
+ assert(ds);
/* Get dims for extent */
if ((ret_value = H5S_extent_get_dims(&ds->extent, dims, max_dims)) < 0)
@@ -1040,10 +1040,10 @@ H5S_write(H5F_t *f, H5O_t *oh, unsigned update_flags, H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(oh);
- HDassert(ds);
- HDassert(H5S_GET_EXTENT_TYPE(ds) >= 0);
+ assert(f);
+ assert(oh);
+ assert(ds);
+ assert(H5S_GET_EXTENT_TYPE(ds) >= 0);
/* Write the current dataspace extent to the dataspace message */
if (H5O_msg_write_oh(f, oh, H5O_SDSPACE_ID, 0, update_flags, &(ds->extent)) < 0)
@@ -1072,10 +1072,10 @@ H5S_append(H5F_t *f, H5O_t *oh, H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(oh);
- HDassert(ds);
- HDassert(H5S_GET_EXTENT_TYPE(ds) >= 0);
+ assert(f);
+ assert(oh);
+ assert(ds);
+ assert(H5S_GET_EXTENT_TYPE(ds) >= 0);
/* Add the dataspace message to the object header */
if (H5O_msg_append_oh(f, oh, H5O_SDSPACE_ID, 0, 0, &(ds->extent)) < 0)
@@ -1108,7 +1108,7 @@ H5S_read(const H5O_loc_t *loc)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(loc);
+ assert(loc);
if (NULL == (ds = H5FL_CALLOC(H5S_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -1153,7 +1153,7 @@ H5S__is_simple(const H5S_t *sdim)
FUNC_ENTER_PACKAGE_NOERR
/* Check args and all the boring stuff. */
- HDassert(sdim);
+ assert(sdim);
/* H5S_NULL shouldn't be simple dataspace */
ret_value =
@@ -1281,7 +1281,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hs
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(rank <= H5S_MAX_RANK);
+ assert(rank <= H5S_MAX_RANK);
/* shift out of the previous state to a "simple" dataspace. */
if (H5S__extent_release(&space->extent) < 0)
@@ -1321,7 +1321,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hs
/* Selection related cleanup */
/* Set offset to zeros */
- HDmemset(space->select.offset, 0, sizeof(hsize_t) * space->extent.rank);
+ memset(space->select.offset, 0, sizeof(hsize_t) * space->extent.rank);
space->select.offset_changed = FALSE;
/* If the selection is 'all', update the number of elements selected */
@@ -1422,7 +1422,7 @@ H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], const hsize_t max
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(rank <= H5S_MAX_RANK);
+ assert(rank <= H5S_MAX_RANK);
/* Create the space and set the extent */
if (NULL == (ret_value = H5S_create(H5S_SIMPLE)))
@@ -1696,7 +1696,7 @@ H5S_get_simple_extent_type(const H5S_t *space)
FUNC_ENTER_NOAPI_NOERR
- HDassert(space);
+ assert(space);
ret_value = H5S_GET_EXTENT_TYPE(space);
@@ -1794,8 +1794,8 @@ H5S_set_extent(H5S_t *space, const hsize_t *size)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
- HDassert(size);
+ assert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
+ assert(size);
/* Verify that the dimensions being changed are allowed to change */
for (u = 0; u < space->extent.rank; u++)
@@ -1841,7 +1841,7 @@ H5S_has_extent(const H5S_t *ds)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(ds);
+ assert(ds);
if (0 == ds->extent.rank && 0 == ds->extent.nelem && H5S_NULL != ds->extent.type)
ret_value = FALSE;
@@ -1874,8 +1874,8 @@ H5S_set_extent_real(H5S_t *space, const hsize_t *size)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
- HDassert(size);
+ assert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
+ assert(size);
/* Change the dataspace size & re-compute the number of elements in the extent */
for (u = 0, nelem = 1; u < space->extent.rank; u++) {
@@ -1956,8 +1956,8 @@ H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(ds1);
- HDassert(ds2);
+ assert(ds1);
+ assert(ds2);
/* Make certain the dataspaces are the same type */
if (ds1->extent.type != ds2->extent.type)
@@ -1969,8 +1969,8 @@ H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2)
/* Make certain the dataspaces' current dimensions are the same size */
if (ds1->extent.rank > 0) {
- HDassert(ds1->extent.size);
- HDassert(ds2->extent.size);
+ assert(ds1->extent.size);
+ assert(ds2->extent.size);
for (u = 0; u < ds1->extent.rank; u++)
if (ds1->extent.size[u] != ds2->extent.size[u])
HGOTO_DONE(FALSE)
@@ -2012,7 +2012,7 @@ H5S_extent_nelem(const H5S_extent_t *ext)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(ext);
+ assert(ext);
/* Return the number of elements in extent */
FUNC_LEAVE_NOAPI(ext->nelem)
@@ -2038,8 +2038,8 @@ H5S_set_version(H5F_t *f, H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(ds);
+ assert(f);
+ assert(ds);
/* Upgrade to the version indicated by the file's low bound if higher */
version = MAX(ds->extent.version, H5O_sdspace_ver_bounds[H5F_LOW_BOUND(f)]);
diff --git a/src/H5SL.c b/src/H5SL.c
index 11ccb9f..a65a144 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -158,17 +158,17 @@
/* Check if we need to increase allocation of forward pointers */ \
if (LVL + 1 >= ((size_t)1) << X->log_nalloc) { \
H5SL_node_t **_tmp; \
- HDassert(LVL + 1 == ((size_t)1) << X->log_nalloc); \
+ assert(LVL + 1 == ((size_t)1) << X->log_nalloc); \
/* Double the amount of allocated space */ \
X->log_nalloc++; \
\
/* Check if we need to create a new factory */ \
if (X->log_nalloc >= H5SL_fac_nused_g) { \
- HDassert(X->log_nalloc == H5SL_fac_nused_g); \
+ assert(X->log_nalloc == H5SL_fac_nused_g); \
\
/* Check if we need to allocate space for the factory pointer*/ \
if (H5SL_fac_nused_g >= H5SL_fac_nalloc_g) { \
- HDassert(H5SL_fac_nused_g == H5SL_fac_nalloc_g); \
+ assert(H5SL_fac_nused_g == H5SL_fac_nalloc_g); \
/* Double the size of the array of factory pointers */ \
H5SL_fac_nalloc_g *= 2; \
if (NULL == (H5SL_fac_g = (H5FL_fac_head_t **)H5MM_realloc( \
@@ -200,7 +200,7 @@
/* Check if we can reduce the allocation of forward pointers */ \
if (LVL <= ((size_t)1) << (X->log_nalloc - 1)) { \
H5SL_node_t **_tmp; \
- HDassert(LVL == ((size_t)1) << (X->log_nalloc - 1)); \
+ assert(LVL == ((size_t)1) << (X->log_nalloc - 1)); \
X->log_nalloc--; \
\
/* Allocate space for new forward pointers */ \
@@ -224,14 +224,14 @@
H5SL_GROW(X, _lvl, ERR); \
\
if (_lvl == (size_t)SLIST->curr_level) { \
- HDassert(PREV == SLIST->header); \
+ assert(PREV == SLIST->header); \
/* Grow the head */ \
H5SL_GROW(PREV, _lvl, ERR) \
SLIST->curr_level++; \
X->forward[_lvl + 1] = NULL; \
} \
else { \
- HDassert(_lvl < (size_t)SLIST->curr_level); \
+ assert(_lvl < (size_t)SLIST->curr_level); \
X->forward[_lvl + 1] = PREV->forward[_lvl + 1]; \
} \
PREV->forward[_lvl + 1] = X; \
@@ -243,7 +243,7 @@
{ \
size_t _lvl = X->level; \
\
- HDassert(PREV->forward[_lvl] == X); \
+ assert(PREV->forward[_lvl] == X); \
PREV->forward[_lvl] = X->forward[_lvl]; \
H5SL_SHRINK(X, _lvl); \
}
@@ -287,12 +287,12 @@
} \
X = X->forward[_i]; \
} \
- HDassert(!_drop->forward[_i] || \
- !H5_GLUE3(H5SL_LOCATE_, CMP, _CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
+ assert(!_drop->forward[_i] || \
+ !H5_GLUE3(H5SL_LOCATE_, CMP, _CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
\
/* Promote the middle node if necessary */ \
if (_count == 3) { \
- HDassert(X == _last->forward[_i]->forward[_i]); \
+ assert(X == _last->forward[_i]->forward[_i]); \
H5SL_PROMOTE(SLIST, X, _last, NULL) \
} \
\
@@ -351,7 +351,7 @@
/* If we have already found the node to drop into and there */ \
/* is more than one node in this gap, we can stop searching */ \
if (_drop) { \
- HDassert(_count >= 1); \
+ assert(_count >= 1); \
_count = 2; \
break; \
} \
@@ -378,9 +378,9 @@
} \
X = X->forward[_i]; \
} \
- HDassert(_count >= 1 && _count <= 3); \
- HDassert(!_drop->forward[_i] || \
- !H5_GLUE3(H5SL_LOCATE_, CMP, _CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
+ assert(_count >= 1 && _count <= 3); \
+ assert(!_drop->forward[_i] || \
+ !H5_GLUE3(H5SL_LOCATE_, CMP, _CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
\
/* Check if we need to adjust node heights */ \
if (_count == 1) { \
@@ -402,8 +402,8 @@
} \
else if (!_head->forward[_i + 1]) { \
/* shrink the header */ \
- HDassert(_i == SLIST->curr_level - 1); \
- HDassert((size_t)SLIST->curr_level == _head->level); \
+ assert(_i == SLIST->curr_level - 1); \
+ assert((size_t)SLIST->curr_level == _head->level); \
\
H5SL_SHRINK(_head, (size_t)(_i + 1)) \
SLIST->curr_level--; \
@@ -417,7 +417,7 @@
X = _llast->forward[_i]; \
for (_count = 1; _count < 3 && X->forward[_i] != _last; _count++) \
X = X->forward[_i]; \
- HDassert(X->forward[_i] == _last); \
+ assert(X->forward[_i] == _last); \
\
/* Demote the separator node */ \
H5SL_DEMOTE(_last, _llast) \
@@ -427,8 +427,8 @@
H5SL_PROMOTE(SLIST, X, _llast, NULL) \
else if (!_head->forward[_i + 1]) { \
/* shrink the header */ \
- HDassert(_i == SLIST->curr_level - 1); \
- HDassert((size_t)SLIST->curr_level == _head->level); \
+ assert(_i == SLIST->curr_level - 1); \
+ assert((size_t)SLIST->curr_level == _head->level); \
\
H5SL_SHRINK(_head, (size_t)(_i + 1)) \
SLIST->curr_level--; \
@@ -455,7 +455,7 @@
_next->item = X->item; \
_next->hashval = X->hashval; \
} \
- HDassert(!X->level); \
+ assert(!X->level); \
\
/* Remove the node */ \
X->backward->forward[0] = X->forward[0]; \
@@ -538,12 +538,12 @@ H5SL_init(void)
/* Allocate space for array of factories */
H5SL_fac_g = (H5FL_fac_head_t **)H5MM_malloc(sizeof(H5FL_fac_head_t *));
- HDassert(H5SL_fac_g);
+ assert(H5SL_fac_g);
H5SL_fac_nalloc_g = 1;
/* Initialize first factory */
H5SL_fac_g[0] = H5FL_fac_init(sizeof(H5SL_node_t *));
- HDassert(H5SL_fac_g[0]);
+ assert(H5SL_fac_g[0]);
H5SL_fac_nused_g = 1;
FUNC_LEAVE_NOAPI(ret_value)
@@ -582,7 +582,7 @@ H5SL_term_package(void)
for (i = 0; i < H5SL_fac_nused_g; i++) {
ret = H5FL_fac_term(H5SL_fac_g[i]);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
H5SL_fac_nused_g = 0;
@@ -680,8 +680,8 @@ H5SL__insert_common(H5SL_t *slist, void *item, const void *key)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -730,7 +730,7 @@ H5SL__insert_common(H5SL_t *slist, void *item, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* 'key' must not have been found in existing list, if we get here */
@@ -749,7 +749,7 @@ H5SL__insert_common(H5SL_t *slist, void *item, const void *key)
if (x->forward[0])
x->forward[0]->backward = x;
else {
- HDassert(slist->last == prev);
+ assert(slist->last == prev);
slist->last = x;
}
@@ -796,7 +796,7 @@ H5SL__release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -874,7 +874,7 @@ H5SL__close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -922,7 +922,7 @@ H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp)
FUNC_ENTER_NOAPI(NULL)
/* Check args */
- HDassert(type >= H5SL_TYPE_INT && type <= H5SL_TYPE_GENERIC);
+ assert(type >= H5SL_TYPE_INT && type <= H5SL_TYPE_GENERIC);
/* Allocate skip list structure */
if (NULL == (new_slist = H5FL_MALLOC(H5SL_t)))
@@ -930,7 +930,7 @@ H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp)
/* Set the static internal fields */
new_slist->type = type;
- HDassert((type == H5SL_TYPE_GENERIC) == !!cmp);
+ assert((type == H5SL_TYPE_GENERIC) == !!cmp);
new_slist->cmp = cmp;
/* Set the dynamic internal fields */
@@ -988,7 +988,7 @@ H5SL_count(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1025,8 +1025,8 @@ H5SL_insert(H5SL_t *slist, void *item, const void *key)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1071,8 +1071,8 @@ H5SL_add(H5SL_t *slist, void *item, const void *key)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1114,8 +1114,8 @@ H5SL_remove(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1164,7 +1164,7 @@ H5SL_remove(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
done:
@@ -1202,7 +1202,7 @@ H5SL_remove_first(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Assign level */
H5_CHECK_OVERFLOW(slist->curr_level, int, size_t);
@@ -1218,8 +1218,8 @@ H5SL_remove_first(H5SL_t *slist)
/* Assign return value */
ret_value = tmp->item;
- HDassert(level == head->level);
- HDassert(0 == tmp->level);
+ assert(level == head->level);
+ assert(0 == tmp->level);
/* Remove the first node */
head->forward[0] = tmp->forward[0];
@@ -1235,14 +1235,14 @@ H5SL_remove_first(H5SL_t *slist)
/* Reshape the skip list as necessary to maintain 1-2-3 condition */
for (i = 0; i < level; i++) {
next = head->forward[i + 1];
- HDassert(next);
+ assert(next);
/* Check if head->forward[i] == head->forward[i+1] (illegal) */
if (head->forward[i] == next) {
tmp = next;
next = next->forward[i + 1];
- HDassert(tmp->level == i + 1);
+ assert(tmp->level == i + 1);
/* Demote head->forward[i] */
H5SL_DEMOTE(tmp, head)
@@ -1250,8 +1250,8 @@ H5SL_remove_first(H5SL_t *slist)
/* Check if we need to promote the following node to maintain
* 1-2-3 condition */
if (tmp->forward[i]->forward[i] != next) {
- HDassert(tmp->forward[i]->forward[i]->forward[i] == next ||
- tmp->forward[i]->forward[i]->forward[i]->forward[i] == next);
+ assert(tmp->forward[i]->forward[i]->forward[i] == next ||
+ tmp->forward[i]->forward[i]->forward[i]->forward[i] == next);
tmp = tmp->forward[i];
H5SL_PROMOTE(slist, tmp, head, NULL);
/* In this case, since there is a node of height = i+1 here
@@ -1261,7 +1261,7 @@ H5SL_remove_first(H5SL_t *slist)
}
else if (!head->forward[i + 1]) {
/* We just shrunk the largest node, shrink the header */
- HDassert(i == level - 1);
+ assert(i == level - 1);
H5SL_SHRINK(head, level)
slist->curr_level--;
@@ -1305,8 +1305,8 @@ H5SL_search(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1355,7 +1355,7 @@ H5SL_search(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* 'key' must not have been found in list, if we get here */
@@ -1397,8 +1397,8 @@ H5SL_less(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1447,7 +1447,7 @@ H5SL_less(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1502,8 +1502,8 @@ H5SL_greater(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1552,7 +1552,7 @@ H5SL_greater(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1597,8 +1597,8 @@ H5SL_find(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1647,7 +1647,7 @@ H5SL_find(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* 'key' must not have been found in list, if we get here */
@@ -1689,8 +1689,8 @@ H5SL_below(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1739,7 +1739,7 @@ H5SL_below(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1794,8 +1794,8 @@ H5SL_above(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1844,7 +1844,7 @@ H5SL_above(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1883,7 +1883,7 @@ H5SL_first(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1916,7 +1916,7 @@ H5SL_next(H5SL_node_t *slist_node)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist_node);
+ assert(slist_node);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1949,7 +1949,7 @@ H5SL_prev(H5SL_node_t *slist_node)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist_node);
+ assert(slist_node);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1983,7 +1983,7 @@ H5SL_last(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2016,7 +2016,7 @@ H5SL_item(H5SL_node_t *slist_node)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist_node);
+ assert(slist_node);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2067,7 +2067,7 @@ H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2125,7 +2125,7 @@ H5SL_release(H5SL_t *slist)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2174,7 +2174,7 @@ H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2221,7 +2221,7 @@ H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2261,7 +2261,7 @@ H5SL_close(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
diff --git a/src/H5SM.c b/src/H5SM.c
index b481134..a2ced45 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -120,9 +120,9 @@ H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist, const H5O_loc_t *ext_loc)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
- HDassert(f);
+ assert(f);
/* File should not already have a SOHM table */
- HDassert(!H5F_addr_defined(H5F_SOHM_ADDR(f)));
+ assert(!H5F_addr_defined(H5F_SOHM_ADDR(f)));
/* Set the ring type in the DXPL */
H5AC_set_ring(H5AC_RING_USER, &orig_ring);
@@ -159,15 +159,15 @@ H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist, const H5O_loc_t *ext_loc)
/* Check that number of indexes in table and in superblock make sense.
* Right now we just use one byte to hold the number of indexes.
*/
- HDassert(table->num_indexes < 256);
+ assert(table->num_indexes < 256);
/* Check that list and btree cutoffs make sense. There can't be any
* values greater than the list max but less than the btree min; the
* list max has to be greater than or equal to one less than the btree
* min.
*/
- HDassert(list_max + 1 >= btree_min);
- HDassert(table->num_indexes > 0 && table->num_indexes <= H5O_SHMESG_MAX_NINDEXES);
+ assert(list_max + 1 >= btree_min);
+ assert(table->num_indexes > 0 && table->num_indexes <= H5O_SHMESG_MAX_NINDEXES);
/* Allocate the SOHM indexes as an array. */
if (NULL == (table->indexes =
@@ -404,8 +404,8 @@ H5SM_get_fheap_addr(H5F_t *f, unsigned type_id, haddr_t *fheap_addr)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(fheap_addr);
+ assert(f);
+ assert(fheap_addr);
/* Set up user data for callback */
cache_udata.f = f;
@@ -453,9 +453,9 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(header);
- HDassert(header->index_addr == HADDR_UNDEF);
- HDassert(header->btree_min <= header->list_max + 1);
+ assert(header);
+ assert(header->index_addr == HADDR_UNDEF);
+ assert(header->btree_min <= header->list_max + 1);
/* In most cases, the index starts as a list */
if (header->list_max > 0) {
@@ -493,7 +493,7 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
} /* end else */
/* Create a heap to hold the shared messages that the list or B-tree will index */
- HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
+ memset(&fheap_cparam, 0, sizeof(fheap_cparam));
fheap_cparam.managed.width = H5O_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5O_FHEAP_MAN_START_BLOCK_SIZE;
fheap_cparam.managed.max_direct_size = H5O_FHEAP_MAN_MAX_DIRECT_SIZE;
@@ -515,7 +515,7 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
/* Sanity check ID length */
if (H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
- HDassert(fheap_id_len == H5O_FHEAP_ID_LEN);
+ assert(fheap_id_len == H5O_FHEAP_ID_LEN);
}
#endif /* NDEBUG */
@@ -566,8 +566,8 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap)
/* If the index list is in the cache, expunge it now */
if (index_status & H5AC_ES__IN_CACHE) {
/* Sanity checks on index list */
- HDassert(!(index_status & H5AC_ES__IS_PINNED));
- HDassert(!(index_status & H5AC_ES__IS_PROTECTED));
+ assert(!(index_status & H5AC_ES__IS_PINNED));
+ assert(!(index_status & H5AC_ES__IS_PROTECTED));
/* Evict the index list from the metadata cache */
if (H5AC_expunge_entry(f, H5AC_SOHM_LIST, header->index_addr, H5AC__FREE_FILE_SPACE_FLAG) < 0)
@@ -575,7 +575,7 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap)
} /* end if */
} /* end if */
else {
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Delete the B-tree. */
if (H5B2_delete(f, header->index_addr, f, NULL, NULL) < 0)
@@ -627,8 +627,8 @@ H5SM__create_list(H5F_t *f, H5SM_index_header_t *header)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(header);
+ assert(f);
+ assert(header);
num_entries = header->list_max;
@@ -707,8 +707,8 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t *
FUNC_ENTER_PACKAGE
- HDassert(_list && *_list);
- HDassert(header);
+ assert(_list && *_list);
+ assert(header);
/* Get pointer to list of messages to convert */
list = *_list;
@@ -810,16 +810,16 @@ H5SM__bt2_convert_to_list_op(const void *record, void *op_data)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(record);
- HDassert(op_data);
+ assert(record);
+ assert(op_data);
/* Get the message index, and increment the # of messages in list */
mesg_idx = list->header->num_messages++;
- HDassert(list->header->num_messages <= list->header->list_max);
+ assert(list->header->num_messages <= list->header->list_max);
/* Insert this message at the end of the list */
- HDassert(list->messages[mesg_idx].location == H5SM_NO_LOC);
- HDassert(message->location != H5SM_NO_LOC);
+ assert(list->messages[mesg_idx].location == H5SM_NO_LOC);
+ assert(message->location != H5SM_NO_LOC);
H5MM_memcpy(&(list->messages[mesg_idx]), message, sizeof(H5SM_sohm_t));
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1139,19 +1139,19 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id,
if (((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE)
*mesg_flags |= H5O_MSG_FLAG_SHAREABLE;
else {
- HDassert(((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
+ assert(((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
*mesg_flags |= H5O_MSG_FLAG_SHARED;
} /* end else */
} /* end if */
done:
- HDassert((ret_value != TRUE) || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE ||
- ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
+ assert((ret_value != TRUE) || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE ||
+ ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
#ifndef NDEBUG
/* If we previously deferred this operation, make sure the saved message
* type is the same as the one we get here. */
if (defer_flags & H5SM_WAS_DEFERRED)
- HDassert(deferred_type == ((H5O_shared_t *)mesg)->type);
+ assert(deferred_type == ((H5O_shared_t *)mesg)->type);
#endif /* NDEBUG */
/* Release the master SOHM table */
@@ -1187,15 +1187,15 @@ H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed)
FUNC_ENTER_PACKAGE
- HDassert(record);
- HDassert(op_data);
- HDassert(changed);
+ assert(record);
+ assert(op_data);
+ assert(changed);
/* If the message was previously shared in an object header, share
* it in the heap now.
*/
if (message->location == H5SM_IN_OH) {
- HDassert(op_data->key && op_data->key->fheap);
+ assert(op_data->key && op_data->key->fheap);
/* Put the message in the heap and record its new heap ID */
if (H5HF_insert(op_data->key->fheap, op_data->key->encoding_size, op_data->key->encoding,
@@ -1206,7 +1206,7 @@ H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed)
message->u.heap_loc.ref_count = 2;
} /* end if */
else {
- HDassert(message->location == H5SM_IN_HEAP);
+ assert(message->location == H5SM_IN_HEAP);
/* If it's already in the heap, just increment the ref count */
++message->u.heap_loc.ref_count;
} /* end else */
@@ -1273,9 +1273,9 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(header);
- HDassert(header->index_type != H5SM_BADTYPE);
- HDassert(cache_flags_ptr);
+ assert(header);
+ assert(header->index_type != H5SM_BADTYPE);
+ assert(cache_flags_ptr);
/* Encode the message to be written */
if ((buf_size = H5O_msg_raw_size(f, type_id, TRUE, mesg)) == 0)
@@ -1341,7 +1341,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
} /* end if */
else {
/* If the message was already in the heap, increase its ref count */
- HDassert(list->messages[list_pos].location == H5SM_IN_HEAP);
+ assert(list->messages[list_pos].location == H5SM_IN_HEAP);
++(list->messages[list_pos].u.heap_loc.ref_count);
} /* end else */
@@ -1353,7 +1353,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
} /* end if */
/* Index is a B-tree */
else {
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
if (NULL == (bt2 = H5B2_open(f, header->index_addr, f)))
@@ -1402,7 +1402,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
* shared message is serialized. -QAK
*/
if (defer)
- HDmemset(&shared.u, 0, sizeof(shared.u));
+ memset(&shared.u, 0, sizeof(shared.u));
#endif /* H5_USING_MEMCHECKER */
} /* end if */
else {
@@ -1487,13 +1487,13 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to find empty entry in list")
}
/* Insert message into list */
- HDassert(list->messages[empty_pos].location == H5SM_NO_LOC);
- HDassert(key.message.location != H5SM_NO_LOC);
+ assert(list->messages[empty_pos].location == H5SM_NO_LOC);
+ assert(key.message.location != H5SM_NO_LOC);
list->messages[empty_pos] = key.message;
} /* end if */
/* Index is a B-tree */
else {
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree, if it isn't already */
if (NULL == bt2) {
@@ -1570,9 +1570,9 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
- HDassert(f);
- HDassert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
- HDassert(sh_mesg);
+ assert(f);
+ assert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
+ assert(sh_mesg);
/* Get message type */
type_id = sh_mesg->msg_type_id;
@@ -1665,9 +1665,9 @@ H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t *
FUNC_ENTER_PACKAGE
- HDassert(list);
+ assert(list);
/* Both key and empty_pos can be NULL, but not both! */
- HDassert(key || empty_pos);
+ assert(key || empty_pos);
/* Initialize empty_pos to an invalid value */
if (empty_pos)
@@ -1730,9 +1730,9 @@ H5SM__decr_ref(void *record, void *op_data, hbool_t *changed)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(record);
- HDassert(op_data);
- HDassert(changed);
+ assert(record);
+ assert(op_data);
+ assert(changed);
/* Adjust the message's reference count if it's stored in the heap.
* Messages stored in object headers always have refcounts of 1,
@@ -1784,11 +1784,11 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(header);
- HDassert(mesg);
- HDassert(cache_flags);
- HDassert(*encoded_mesg == NULL);
+ assert(f);
+ assert(header);
+ assert(mesg);
+ assert(cache_flags);
+ assert(*encoded_mesg == NULL);
/* Get the message type for later */
type_id = mesg->msg_type_id;
@@ -1851,7 +1851,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c
} /* end if */
else {
/* Index is a B-tree */
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
if (NULL == (bt2 = H5B2_open(f, header->index_addr, f)))
@@ -1910,7 +1910,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c
HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list")
list = NULL;
- HDassert(fheap);
+ assert(fheap);
if (H5HF_close(fheap) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap")
fheap = NULL;
@@ -1976,9 +1976,9 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
/* Sanity check */
- HDassert(ext_loc);
- HDassert(f);
- HDassert(fc_plist);
+ assert(ext_loc);
+ assert(f);
+ assert(fc_plist);
/* Check for the extension having a 'shared message info' message */
if ((status = H5O_msg_exists(ext_loc, H5O_SHMESG_ID)) < 0)
@@ -1996,15 +1996,15 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "shared message info message not present")
/* Portably initialize the arrays */
- HDmemset(index_flags, 0, sizeof(index_flags));
- HDmemset(minsizes, 0, sizeof(minsizes));
+ memset(index_flags, 0, sizeof(index_flags));
+ memset(minsizes, 0, sizeof(minsizes));
/* Set SOHM info from file */
H5F_SET_SOHM_ADDR(f, sohm_table.addr);
H5F_SET_SOHM_VERS(f, sohm_table.version);
H5F_SET_SOHM_NINDEXES(f, sohm_table.nindexes);
- HDassert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
- HDassert(H5F_SOHM_NINDEXES(f) > 0 && H5F_SOHM_NINDEXES(f) <= H5O_SHMESG_MAX_NINDEXES);
+ assert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
+ assert(H5F_SOHM_NINDEXES(f) > 0 && H5F_SOHM_NINDEXES(f) <= H5O_SHMESG_MAX_NINDEXES);
/* Set up user data for callback */
cache_udata.f = f;
@@ -2028,8 +2028,8 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist)
minsizes[u] = (unsigned)table->indexes[u].min_mesg_size;
/* Sanity check */
- HDassert(sohm_l2b == table->indexes[u].list_max);
- HDassert(sohm_b2l == table->indexes[u].btree_min);
+ assert(sohm_l2b == table->indexes[u].list_max);
+ assert(sohm_b2l == table->indexes[u].btree_min);
/* Check for sharing attributes in this file, which means that creation
* indices must be tracked on object header message in the file.
@@ -2094,7 +2094,7 @@ H5SM_reconstitute(H5O_shared_t *sh_mesg, H5F_t *f, unsigned msg_type_id, H5O_fhe
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check args */
- HDassert(sh_mesg);
+ assert(sh_mesg);
/* Set flag for shared message */
sh_mesg->type = H5O_SHARE_TYPE_SOHM;
@@ -2128,8 +2128,8 @@ H5SM__get_refcount_bt2_cb(const void *_record, void *_op_data)
/*
* Check arguments.
*/
- HDassert(record);
- HDassert(op_data);
+ assert(record);
+ assert(op_data);
/* Make a copy of the record */
*op_data = *record;
@@ -2168,9 +2168,9 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
FUNC_ENTER_NOAPI_NOINIT_TAG(H5AC__SOHM_TAG)
/* Sanity check */
- HDassert(f);
- HDassert(sh_mesg);
- HDassert(ref_count);
+ assert(f);
+ assert(sh_mesg);
+ assert(ref_count);
/* Set up user data for callback */
tbl_cache_udata.f = f;
@@ -2232,7 +2232,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
hbool_t msg_exists; /* Whether the message exists in the v2 B-tree */
/* Index is a B-tree */
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
if (NULL == (bt2 = H5B2_open(f, header->index_addr, f)))
@@ -2247,7 +2247,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
} /* end else */
/* Set the refcount for the message */
- HDassert(message.location == H5SM_IN_HEAP);
+ assert(message.location == H5SM_IN_HEAP);
*ref_count = message.u.heap_loc.ref_count;
done:
@@ -2296,10 +2296,10 @@ H5SM__read_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
/*
* Check arguments.
*/
- HDassert(oh);
- HDassert(mesg);
- HDassert(udata);
- HDassert(NULL == udata->encoding_buf);
+ assert(oh);
+ assert(mesg);
+ assert(udata);
+ assert(NULL == udata->encoding_buf);
/* Check the creation index for this message */
if (sequence == udata->idx) {
@@ -2310,7 +2310,7 @@ H5SM__read_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
/* Get the message's encoded size */
udata->buf_size = mesg->raw_size;
- HDassert(udata->buf_size);
+ assert(udata->buf_size);
/* Allocate buffer to return the message in */
if (NULL == (udata->encoding_buf = H5MM_malloc(udata->buf_size)))
@@ -2385,9 +2385,9 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(mesg);
- HDassert(fheap);
+ assert(f);
+ assert(mesg);
+ assert(fheap);
/* Set up user data for message iteration */
udata.file = f;
@@ -2404,7 +2404,7 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
H5O_mesg_operator_t op; /* Wrapper for operator */
type = H5O_msg_class_g[mesg->msg_type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Reset object location for operation */
if (H5O_loc_reset(&oloc) < 0)
@@ -2431,14 +2431,14 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
HGOTO_ERROR(H5E_SOHM, H5E_BADITER, FAIL, "unable to iterate over object header messages")
} /* end if */
else {
- HDassert(mesg->location == H5SM_IN_HEAP);
+ assert(mesg->location == H5SM_IN_HEAP);
/* Copy the message from the heap */
if (H5HF_op(fheap, &(mesg->u.heap_loc.fheap_id), H5SM__read_mesg_fh_cb, &udata) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "can't read message from fractal heap.")
} /* end else */
- HDassert(udata.encoding_buf);
- HDassert(udata.buf_size);
+ assert(udata.encoding_buf);
+ assert(udata.buf_size);
/* Record the returned values */
*encoded_mesg = udata.encoding_buf;
@@ -2478,8 +2478,8 @@ H5SM__table_free(H5SM_master_table_t *table)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(table);
- HDassert(table->indexes);
+ assert(table);
+ assert(table->indexes);
table->indexes = H5FL_ARR_FREE(H5SM_index_header_t, table->indexes);
@@ -2505,8 +2505,8 @@ H5SM__list_free(H5SM_list_t *list)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(list);
- HDassert(list->messages);
+ assert(list);
+ assert(list->messages);
list->messages = H5FL_ARR_FREE(H5SM_sohm_t, list->messages);
@@ -2541,11 +2541,11 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
- HDassert(f);
- HDassert(table_addr != HADDR_UNDEF);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(table_addr != HADDR_UNDEF);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* If table_vers and num_indexes are UINT_MAX, replace them with values from
* userblock
@@ -2553,11 +2553,11 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi
if (table_vers == UINT_MAX)
table_vers = H5F_SOHM_VERS(f);
else if (table_vers != H5F_SOHM_VERS(f))
- HDfprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n");
+ fprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n");
if (num_indexes == UINT_MAX)
num_indexes = H5F_SOHM_NINDEXES(f);
else if (num_indexes != H5F_SOHM_NINDEXES(f))
- HDfprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n");
+ fprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n");
/* Check arguments. Version must be 0, the only version implemented so far */
if (table_vers > HDF5_SHAREDHEADER_VERSION)
@@ -2574,28 +2574,28 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi
H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
- HDfprintf(stream, "%*sShared Message Master Table...\n", indent, "");
+ fprintf(stream, "%*sShared Message Master Table...\n", indent, "");
for (x = 0; x < num_indexes; ++x) {
- HDfprintf(stream, "%*sIndex %d...\n", indent, "", x);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "SOHM Index Type:",
- (table->indexes[x].index_type == H5SM_LIST
- ? "List"
- : (table->indexes[x].index_type == H5SM_BTREE ? "B-Tree" : "Unknown")));
-
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
- "Address of index:", table->indexes[x].index_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
- "Address of index's heap:", table->indexes[x].heap_addr);
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent + 3, "", fwidth,
- "Message type flags:", table->indexes[x].mesg_types);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
- "Minimum size of messages:", table->indexes[x].min_mesg_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
- "Number of messages:", table->indexes[x].num_messages);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
- "Maximum list size:", table->indexes[x].list_max);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
- "Minimum B-tree size:", table->indexes[x].btree_min);
+ fprintf(stream, "%*sIndex %d...\n", indent, "", x);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "SOHM Index Type:",
+ (table->indexes[x].index_type == H5SM_LIST
+ ? "List"
+ : (table->indexes[x].index_type == H5SM_BTREE ? "B-Tree" : "Unknown")));
+
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
+ "Address of index:", table->indexes[x].index_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
+ "Address of index's heap:", table->indexes[x].heap_addr);
+ fprintf(stream, "%*s%-*s 0x%08x\n", indent + 3, "", fwidth,
+ "Message type flags:", table->indexes[x].mesg_types);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
+ "Minimum size of messages:", table->indexes[x].min_mesg_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
+ "Number of messages:", table->indexes[x].num_messages);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
+ "Maximum list size:", table->indexes[x].list_max);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
+ "Minimum B-tree size:", table->indexes[x].btree_min);
} /* end for */
done:
@@ -2633,11 +2633,11 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidt
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
- HDassert(f);
- HDassert(list_addr != HADDR_UNDEF);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(list_addr != HADDR_UNDEF);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Set up user data for callback */
tbl_cache_udata.f = f;
@@ -2673,31 +2673,31 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidt
if (NULL == (fh = H5HF_open(f, table->indexes[index_num].heap_addr)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open SOHM heap")
- HDfprintf(stream, "%*sShared Message List Index...\n", indent, "");
+ fprintf(stream, "%*sShared Message List Index...\n", indent, "");
for (x = 0; x < table->indexes[index_num].num_messages; ++x) {
- HDfprintf(stream, "%*sShared Object Header Message %d...\n", indent, "", x);
- HDfprintf(stream, "%*s%-*s %08lu\n", indent + 3, "", fwidth,
- "Hash value:", (unsigned long)list->messages[x].hash);
+ fprintf(stream, "%*sShared Object Header Message %d...\n", indent, "", x);
+ fprintf(stream, "%*s%-*s %08lu\n", indent + 3, "", fwidth,
+ "Hash value:", (unsigned long)list->messages[x].hash);
if (list->messages[x].location == H5SM_IN_HEAP) {
- HDassert(fh);
+ assert(fh);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in heap");
- HDfprintf(stream, "%*s%-*s 0x%" PRIx64 "\n", indent + 3, "", fwidth,
- "Heap ID:", list->messages[x].u.heap_loc.fheap_id.val);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", fwidth,
- "Reference count:", list->messages[x].u.heap_loc.ref_count);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in heap");
+ fprintf(stream, "%*s%-*s 0x%" PRIx64 "\n", indent + 3, "", fwidth,
+ "Heap ID:", list->messages[x].u.heap_loc.fheap_id.val);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", fwidth,
+ "Reference count:", list->messages[x].u.heap_loc.ref_count);
} /* end if */
else if (list->messages[x].location == H5SM_IN_OH) {
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in object header");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
- "Object header address:", list->messages[x].u.mesg_loc.oh_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
- "Message creation index:", list->messages[x].u.mesg_loc.oh_addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth,
- "Message type ID:", list->messages[x].msg_type_id);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in object header");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
+ "Object header address:", list->messages[x].u.mesg_loc.oh_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
+ "Message creation index:", list->messages[x].u.mesg_loc.oh_addr);
+ fprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth,
+ "Message type ID:", list->messages[x].msg_type_id);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "invalid");
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "invalid");
} /* end for */
done:
@@ -2740,10 +2740,10 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
- HDassert(hdr_size);
- HDassert(ih_info);
+ assert(f);
+ assert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
+ assert(hdr_size);
+ assert(ih_info);
/* Set up user data for callback */
cache_udata.f = f;
@@ -2775,7 +2775,7 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info)
} /* end if */
} /* end if */
else {
- HDassert(table->indexes[u].index_type == H5SM_LIST);
+ assert(table->indexes[u].index_type == H5SM_LIST);
ih_info->index_size += table->indexes[u].list_size;
} /* end else */
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index 15b0125..461fdcf 100644
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -92,7 +92,7 @@ H5SM__bt2_crt_context(void *_f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Allocate callback context */
if (NULL == (ctx = H5FL_MALLOC(H5SM_bt2_ctx_t)))
@@ -129,7 +129,7 @@ H5SM__bt2_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Release callback context */
ctx = H5FL_FREE(H5SM_bt2_ctx_t, ctx);
@@ -186,14 +186,14 @@ H5SM__bt2_debug(FILE *stream, int indent, int fwidth, const void *record, const
FUNC_ENTER_PACKAGE_NOERR
if (sohm->location == H5SM_IN_HEAP)
- HDfprintf(stream, "%*s%-*s {%" PRIu64 ", %" PRIo32 ", %" PRIxHSIZE "}\n", indent, "", fwidth,
- "Shared Message in heap:", sohm->u.heap_loc.fheap_id.val, sohm->hash,
- sohm->u.heap_loc.ref_count);
+ fprintf(stream, "%*s%-*s {%" PRIu64 ", %" PRIo32 ", %" PRIxHSIZE "}\n", indent, "", fwidth,
+ "Shared Message in heap:", sohm->u.heap_loc.fheap_id.val, sohm->hash,
+ sohm->u.heap_loc.ref_count);
else {
- HDassert(sohm->location == H5SM_IN_OH);
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIo32 ", %x, %" PRIx32 "}\n", indent, "", fwidth,
- "Shared Message in OH:", sohm->u.mesg_loc.oh_addr, sohm->hash, sohm->msg_type_id,
- sohm->u.mesg_loc.index);
+ assert(sohm->location == H5SM_IN_OH);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIo32 ", %x, %" PRIx32 "}\n", indent, "", fwidth,
+ "Shared Message in OH:", sohm->u.mesg_loc.oh_addr, sohm->hash, sohm->msg_type_id,
+ sohm->u.mesg_loc.index);
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 64d34c8..694a82f 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -134,9 +134,9 @@ H5SM__cache_table_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = H5SM_TABLE_SIZE(udata->f);
@@ -168,7 +168,7 @@ H5SM__cache_table_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -210,17 +210,17 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->f);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->f);
f = udata->f;
- HDassert(dirty);
+ assert(dirty);
/* Verify that we're reading version 0 of the table; this is the only
* version defined so far.
*/
- HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
+ assert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
/* Allocate space for the master table in memory */
if (NULL == (table = H5FL_CALLOC(H5SM_master_table_t)))
@@ -228,16 +228,16 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
/* Read number of indexes and version from file superblock */
table->num_indexes = H5F_SOHM_NINDEXES(f);
- HDassert(table->num_indexes > 0);
+ assert(table->num_indexes > 0);
/* Compute the size of the SOHM table header on disk. This is the "table"
* itself plus each index within the table
*/
table->table_size = H5SM_TABLE_SIZE(f);
- HDassert(table->table_size == len);
+ assert(table->table_size == len);
/* Check magic number */
- if (HDmemcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM table signature")
image += H5_SIZEOF_MAGIC;
@@ -286,7 +286,7 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == table->table_size);
+ assert((size_t)(image - (const uint8_t *)_image) == table->table_size);
/* Set return value */
ret_value = table;
@@ -323,10 +323,10 @@ H5SM__cache_table_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(table);
- HDassert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(table->cache_info.type == H5AC_SOHM_TABLE);
- HDassert(image_len);
+ assert(table);
+ assert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(table->cache_info.type == H5AC_SOHM_TABLE);
+ assert(image_len);
*image_len = table->table_size;
@@ -358,17 +358,17 @@ H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(table);
- HDassert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(table->cache_info.type == H5AC_SOHM_TABLE);
- HDassert(table->table_size == len);
+ assert(f);
+ assert(image);
+ assert(table);
+ assert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(table->cache_info.type == H5AC_SOHM_TABLE);
+ assert(table->table_size == len);
/* Verify that we're writing version 0 of the table; this is the only
* version defined so far.
*/
- HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
+ assert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
/* Encode magic number */
H5MM_memcpy(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -409,7 +409,7 @@ H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_
UINT32ENCODE(image, computed_chksum);
/* sanity check */
- HDassert((size_t)(image - ((uint8_t *)_image)) == table->table_size);
+ assert((size_t)(image - ((uint8_t *)_image)) == table->table_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM__cache_table_serialize() */
@@ -444,9 +444,9 @@ H5SM__cache_table_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(table);
- HDassert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(table->cache_info.type == H5AC_SOHM_TABLE);
+ assert(table);
+ assert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(table->cache_info.type == H5AC_SOHM_TABLE);
/* Destroy Shared Object Header Message table */
if (H5SM__table_free(table) < 0)
@@ -479,10 +479,10 @@ H5SM__cache_list_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->header);
- HDassert(udata->header->list_size > 0);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->header);
+ assert(udata->header->list_size > 0);
+ assert(image_len);
/* Set the image length size */
*image_len = udata->header->list_size;
@@ -516,8 +516,8 @@ H5SM__cache_list_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Exact size with checksum at the end */
chk_size = H5SM_LIST_SIZE(udata->f, udata->header->num_messages);
@@ -561,17 +561,17 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->header);
- HDassert(udata->header->list_size == len);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->header);
+ assert(udata->header->list_size == len);
+ assert(dirty);
/* Allocate space for the SOHM list data structure */
if (NULL == (list = H5FL_MALLOC(H5SM_list_t)))
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed")
- HDmemset(&list->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&list->cache_info, 0, sizeof(H5AC_info_t));
/* Allocate list in memory as an array*/
if (NULL == (list->messages = (H5SM_sohm_t *)H5FL_ARR_MALLOC(H5SM_sohm_t, udata->header->list_max)))
@@ -579,7 +579,7 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
list->header = udata->header;
/* Check magic number */
- if (HDmemcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM list signature")
image += H5_SIZEOF_MAGIC;
@@ -598,7 +598,7 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= udata->header->list_size);
+ assert((size_t)(image - (const uint8_t *)_image) <= udata->header->list_size);
/* Initialize the rest of the array */
for (u = udata->header->num_messages; u < udata->header->list_max; u++)
@@ -638,11 +638,11 @@ H5SM__cache_list_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(list);
- HDassert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(list->cache_info.type == H5AC_SOHM_LIST);
- HDassert(list->header);
- HDassert(image_len);
+ assert(list);
+ assert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(list->cache_info.type == H5AC_SOHM_LIST);
+ assert(list->header);
+ assert(image_len);
*image_len = list->header->list_size;
@@ -677,13 +677,13 @@ H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_U
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(list);
- HDassert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(list->cache_info.type == H5AC_SOHM_LIST);
- HDassert(list->header);
- HDassert(list->header->list_size == len);
+ assert(f);
+ assert(image);
+ assert(list);
+ assert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(list->cache_info.type == H5AC_SOHM_LIST);
+ assert(list->header);
+ assert(list->header->list_size == len);
/* Encode magic number */
H5MM_memcpy(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -702,17 +702,17 @@ H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_U
} /* end if */
} /* end for */
- HDassert(mesgs_serialized == list->header->num_messages);
+ assert(mesgs_serialized == list->header->num_messages);
/* Compute checksum on buffer */
computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0);
UINT32ENCODE(image, computed_chksum);
/* sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= list->header->list_size);
+ assert((size_t)(image - (uint8_t *)_image) <= list->header->list_size);
/* Clear memory */
- HDmemset(image, 0, (list->header->list_size - (size_t)(image - (uint8_t *)_image)));
+ memset(image, 0, (list->header->list_size - (size_t)(image - (uint8_t *)_image)));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -748,9 +748,9 @@ H5SM__cache_list_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(list);
- HDassert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(list->cache_info.type == H5AC_SOHM_LIST);
+ assert(list);
+ assert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(list->cache_info.type == H5AC_SOHM_LIST);
/* Destroy Shared Object Header Message list */
if (H5SM__list_free(list) < 0)
diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c
index 4714b52..b8b55e5 100644
--- a/src/H5SMmessage.c
+++ b/src/H5SMmessage.c
@@ -90,7 +90,7 @@ H5SM__compare_cb(const void *obj, size_t obj_len, void *_udata)
udata->ret = -1;
else
/* Sizes are the same. Return result of memcmp */
- udata->ret = HDmemcmp(udata->key->encoding, obj, obj_len);
+ udata->ret = memcmp(udata->key->encoding, obj, obj_len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM__compare_cb() */
@@ -123,16 +123,16 @@ H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
/*
* Check arguments.
*/
- HDassert(oh);
- HDassert(mesg);
- HDassert(udata && udata->key);
+ assert(oh);
+ assert(mesg);
+ assert(udata && udata->key);
/* Check the creation index for this message */
if (sequence == udata->idx) {
size_t aligned_encoded_size = H5O_ALIGN_OH(oh, udata->key->encoding_size);
/* Sanity check the message's length */
- HDassert(mesg->raw_size > 0);
+ assert(mesg->raw_size > 0);
if (aligned_encoded_size > mesg->raw_size)
udata->ret = 1;
@@ -145,8 +145,8 @@ H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, H5_ITER_ERROR,
"unable to encode object header message")
- HDassert(udata->key->encoding_size <= mesg->raw_size);
- udata->ret = HDmemcmp(udata->key->encoding, mesg->raw, udata->key->encoding_size);
+ assert(udata->key->encoding_size <= mesg->raw_size);
+ udata->ret = memcmp(udata->key->encoding, mesg->raw, udata->key->encoding_size);
} /* end else */
/* Indicate that we found the message we were looking for */
@@ -215,8 +215,8 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result)
*/
H5SM_compare_udata_t udata;
- HDassert(key->message.hash == mesg->hash);
- HDassert(key->encoding_size > 0 && key->encoding);
+ assert(key->message.hash == mesg->hash);
+ assert(key->encoding_size > 0 && key->encoding);
/* Set up user data for callback */
udata.key = key;
@@ -234,8 +234,8 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result)
H5O_mesg_operator_t op; /* Message operator */
/* Sanity checks */
- HDassert(key->file);
- HDassert(mesg->location == H5SM_IN_OH);
+ assert(key->file);
+ assert(mesg->location == H5SM_IN_OH);
/* Reset the object location */
if (H5O_loc_reset(&oloc) < 0)
@@ -284,7 +284,7 @@ H5SM__message_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
*raw++ = (uint8_t)message->location;
UINT32ENCODE(raw, message->hash);
@@ -294,7 +294,7 @@ H5SM__message_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5MM_memcpy(raw, message->u.heap_loc.fheap_id.id, (size_t)H5O_FHEAP_ID_LEN);
} /* end if */
else {
- HDassert(message->location == H5SM_IN_OH);
+ assert(message->location == H5SM_IN_OH);
*raw++ = 0; /* reserved (possible flags byte) */
*raw++ = (uint8_t)message->msg_type_id;
@@ -334,7 +334,7 @@ H5SM__message_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5MM_memcpy(message->u.heap_loc.fheap_id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
} /* end if */
else {
- HDassert(message->location == H5SM_IN_OH);
+ assert(message->location == H5SM_IN_OH);
raw++; /* reserved */
message->msg_type_id = *raw++;
diff --git a/src/H5SMtest.c b/src/H5SMtest.c
index 72f6547..66c3f79 100644
--- a/src/H5SMtest.c
+++ b/src/H5SMtest.c
@@ -72,8 +72,8 @@ H5SM__get_mesg_count_test(H5F_t *f, unsigned type_id, size_t *mesg_count)
FUNC_ENTER_PACKAGE_TAG(H5AC__SOHM_TAG)
/* Sanity check */
- HDassert(f);
- HDassert(mesg_count);
+ assert(f);
+ assert(mesg_count);
/* Check for shared messages being enabled */
if (H5F_addr_defined(H5F_SOHM_ADDR(f))) {
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 7f5633f..a5d86ae 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -148,8 +148,8 @@ H5S__all_iter_init(H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
- HDassert(iter);
+ assert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
+ assert(iter);
/* Start at the upper left location */
iter->u.all.elmt_offset = 0;
@@ -182,8 +182,8 @@ H5S__all_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(iter);
- HDassert(coords);
+ assert(iter);
+ assert(coords);
/* Calculate the coordinates for the current iterator offset */
if (H5VM_array_calc(iter->u.all.elmt_offset, iter->rank, iter->dims, coords) < 0)
@@ -214,9 +214,9 @@ H5S__all_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(start);
- HDassert(end);
+ assert(iter);
+ assert(start);
+ assert(end);
for (u = 0; u < iter->rank; u++) {
/* Set the start of the 'all' block */
@@ -249,7 +249,7 @@ H5S__all_iter_nelmts(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* end H5S__all_iter_nelmts() */
@@ -277,7 +277,7 @@ H5S__all_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(FALSE)
} /* end H5S__all_iter_has_next_block() */
@@ -306,8 +306,8 @@ H5S__all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(nelem > 0);
+ assert(iter);
+ assert(nelem > 0);
/* Increment the iterator */
iter->u.all.elmt_offset += nelem;
@@ -339,7 +339,7 @@ H5S__all_iter_next_block(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__all_iter_next_block() */
@@ -382,18 +382,18 @@ H5S__all_iter_get_seq_list(H5S_sel_iter_t *iter, size_t H5_ATTR_UNUSED maxseq, s
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Determine the actual number of elements to use */
H5_CHECK_OVERFLOW(iter->elmt_left, hsize_t, size_t);
elem_used = MIN(maxelem, (size_t)iter->elmt_left);
- HDassert(elem_used > 0);
+ assert(elem_used > 0);
/* Compute the offset in the dataset */
off[0] = iter->u.all.byte_offset;
@@ -436,7 +436,7 @@ H5S__all_iter_release(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__all_iter_release() */
@@ -464,7 +464,7 @@ H5S__all_release(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Reset the number of elements in the selection */
space->select.num_elem = 0;
@@ -497,8 +497,8 @@ H5S__all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSE
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Set number of elements in selection */
dst->select.num_elem = (hsize_t)H5S_GET_EXTENT_NPOINTS(dst);
@@ -531,7 +531,7 @@ H5S__all_is_valid(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_is_valid() */
@@ -560,7 +560,7 @@ H5S__all_serial_size(H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Basic number of bytes required to serialize point selection:
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
@@ -598,9 +598,9 @@ H5S__all_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(p);
- HDassert(pp);
+ assert(space);
+ assert(p);
+ assert(pp);
/* Store the preamble information */
UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
@@ -646,8 +646,8 @@ H5S__all_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hboo
const uint8_t *p_end = *p + p_size - 1; /* Pointer to last valid byte in buffer */
FUNC_ENTER_PACKAGE
- HDassert(p);
- HDassert(*p);
+ assert(p);
+ assert(*p);
/* As part of the efforts to push all selection-type specific coding
to the callbacks, the coding for the allocation of a null dataspace
@@ -725,9 +725,9 @@ H5S__all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
/* Get the dataspace extent rank */
rank = space->extent.rank;
@@ -766,8 +766,8 @@ H5S__all_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* 'All' selections always start at offset 0 */
*offset = 0;
@@ -827,7 +827,7 @@ H5S__all_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_is_contiguous() */
@@ -855,7 +855,7 @@ H5S__all_is_single(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_is_single() */
@@ -885,7 +885,7 @@ H5S__all_is_regular(H5S_t H5_ATTR_UNUSED *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_is_regular() */
@@ -919,8 +919,8 @@ H5S__all_shape_same(H5S_t *space1, H5S_t *space2)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
/* Initialize dataspace dims */
space1_dim = (int)space1->extent.rank - 1;
@@ -979,10 +979,10 @@ H5S__all_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUS
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
+ assert(start);
+ assert(end);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_intersect_block() */
@@ -1011,8 +1011,8 @@ H5S__all_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *off
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__all_adjust_u() */
@@ -1041,8 +1041,8 @@ H5S__all_adjust_s(H5S_t H5_ATTR_UNUSED *space, const hssize_t H5_ATTR_UNUSED *of
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__all_adjust_s() */
@@ -1066,8 +1066,8 @@ H5S__all_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
- HDassert(offset);
+ assert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
+ assert(offset);
/* Set offset of selection in projected buffer */
*offset = 0;
@@ -1097,9 +1097,9 @@ H5S__all_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_space
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(offset);
+ assert(base_space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(offset);
/* Select the entire new space */
if (H5S_select_all(new_space, TRUE) < 0)
@@ -1135,7 +1135,7 @@ H5S_select_all(H5S_t *space, hbool_t rel_prev)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
+ assert(space);
/* Remove current selection first */
if (rel_prev)
diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c
index f4d027b..39c9cfb 100644
--- a/src/H5Sdbg.c
+++ b/src/H5Sdbg.c
@@ -83,22 +83,22 @@ H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth)
switch (H5S_GET_EXTENT_TYPE(mesg)) {
case H5S_NULL:
- HDfprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth, "Space class:");
+ fprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth, "Space class:");
break;
case H5S_SCALAR:
- HDfprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth, "Space class:");
+ fprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth, "Space class:");
break;
case H5S_SIMPLE:
- HDfprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth, "Space class:");
+ fprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth, "Space class:");
H5O_debug_id(H5O_SDSPACE_ID, f, &(mesg->extent), stream, indent + 3, MAX(0, fwidth - 3));
break;
case H5S_NO_CLASS:
default:
- HDfprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth,
- "Space class:", (long)(H5S_GET_EXTENT_TYPE(mesg)));
+ fprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth,
+ "Space class:", (long)(H5S_GET_EXTENT_TYPE(mesg)));
break;
} /* end switch */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index ad77ce8..de5668d 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -296,12 +296,12 @@ H5S__hyper_print_spans_helper(FILE *f, const H5S_hyper_span_t *span, unsigned de
FUNC_ENTER_PACKAGE_NOERR
while (span) {
- HDfprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", __func__,
- depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next);
+ fprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", __func__,
+ depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next);
if (span->down) {
- HDfprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n",
- __func__, (depth + 1) * 2, "", (void *)span->down, span->down->count,
- span->down->low_bounds[0], span->down->high_bounds[0], (void *)span->down->head);
+ fprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n",
+ __func__, (depth + 1) * 2, "", (void *)span->down, span->down->count,
+ span->down->low_bounds[0], span->down->high_bounds[0], (void *)span->down->head);
H5S__hyper_print_spans_helper(f, span->down->head, depth + 1);
} /* end if */
span = span->next;
@@ -316,9 +316,9 @@ H5S__hyper_print_spans(FILE *f, const H5S_hyper_span_info_t *span_lst)
FUNC_ENTER_PACKAGE_NOERR
if (span_lst != NULL) {
- HDfprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n",
- __func__, (void *)span_lst, span_lst->count, span_lst->low_bounds[0],
- span_lst->high_bounds[0], (void *)span_lst->head);
+ fprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", __func__,
+ (void *)span_lst, span_lst->count, span_lst->low_bounds[0], span_lst->high_bounds[0],
+ (void *)span_lst->head);
H5S__hyper_print_spans_helper(f, span_lst->head, 0);
} /* end if */
@@ -343,21 +343,21 @@ H5S__hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, cons
FUNC_ENTER_PACKAGE_NOERR
if (dinfo != NULL) {
- HDfprintf(f, "%s: %s: start=[", __func__, field);
+ fprintf(f, "%s: %s: start=[", __func__, field);
for (u = 0; u < ndims; u++)
- HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n"));
- HDfprintf(f, "%s: %s: stride=[", __func__, field);
+ fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n"));
+ fprintf(f, "%s: %s: stride=[", __func__, field);
for (u = 0; u < ndims; u++)
- HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n"));
- HDfprintf(f, "%s: %s: count=[", __func__, field);
+ fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n"));
+ fprintf(f, "%s: %s: count=[", __func__, field);
for (u = 0; u < ndims; u++)
- HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n"));
- HDfprintf(f, "%s: %s: block=[", __func__, field);
+ fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n"));
+ fprintf(f, "%s: %s: block=[", __func__, field);
for (u = 0; u < ndims; u++)
- HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n"));
+ fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n"));
} /* end if */
else
- HDfprintf(f, "%s: %s==NULL\n", __func__, field);
+ fprintf(f, "%s: %s==NULL\n", __func__, field);
FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -404,7 +404,7 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, unsig
/* get the actual tail from head */
cur_elem = span_lst->head;
- HDassert(cur_elem); /* at least 1 element */
+ assert(cur_elem); /* at least 1 element */
while (cur_elem) {
actual_tail = cur_elem;
cur_elem = cur_elem->next;
@@ -412,32 +412,32 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, unsig
} /* end while */
for (u = 0; u < depth; u++)
- HDfprintf(f, "\t");
- HDfprintf(f, "DIM[%u]: ref_count=%u, #elems=%u, head=%p, tail=%p, actual_tail=%p, matched=%d\n", depth,
- span_lst->count, num_elems, (void *)span_lst->head, (void *)span_lst->tail, (void *)actual_tail,
- (span_lst->tail == actual_tail));
+ fprintf(f, "\t");
+ fprintf(f, "DIM[%u]: ref_count=%u, #elems=%u, head=%p, tail=%p, actual_tail=%p, matched=%d\n", depth,
+ span_lst->count, num_elems, (void *)span_lst->head, (void *)span_lst->tail, (void *)actual_tail,
+ (span_lst->tail == actual_tail));
for (u = 0; u < depth; u++)
- HDfprintf(f, "\t");
- HDfprintf(f, "low_bounds=[");
+ fprintf(f, "\t");
+ fprintf(f, "low_bounds=[");
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", span_lst->low_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->low_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", span_lst->low_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", span_lst->low_bounds[dims - 1]);
for (u = 0; u < depth; u++)
- HDfprintf(f, "\t");
- HDfprintf(f, "high_bounds=[");
+ fprintf(f, "\t");
+ fprintf(f, "high_bounds=[");
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", span_lst->high_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->high_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", span_lst->high_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", span_lst->high_bounds[dims - 1]);
cur_elem = span_lst->head;
elem_idx = 0;
while (cur_elem) {
for (u = 0; u < depth; u++)
- HDfprintf(f, "\t");
- HDfprintf(f, "ELEM[%u]: ptr=%p, low=%" PRIuHSIZE ", high=%" PRIuHSIZE ", down=%p\n", elem_idx++,
- (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down);
+ fprintf(f, "\t");
+ fprintf(f, "ELEM[%u]: ptr=%p, low=%" PRIuHSIZE ", high=%" PRIuHSIZE ", down=%p\n", elem_idx++,
+ (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down);
if (cur_elem->down)
H5S__hyper_print_spans_dfs(f, cur_elem->down, depth + 1, dims);
cur_elem = cur_elem->next;
@@ -471,39 +471,39 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(hslab);
+ assert(hslab);
- HDfprintf(f, "=======================\n");
- HDfprintf(f, "SPACE: span_lst=%p, #dims=%u, offset_changed=%d\n", (void *)hslab->span_lst, dims,
- space->select.offset_changed);
+ fprintf(f, "=======================\n");
+ fprintf(f, "SPACE: span_lst=%p, #dims=%u, offset_changed=%d\n", (void *)hslab->span_lst, dims,
+ space->select.offset_changed);
- HDfprintf(f, " offset=[");
+ fprintf(f, " offset=[");
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%lld,", space->select.offset[u]);
- HDfprintf(f, "%lld]\n", space->select.offset[dims - 1]);
+ fprintf(f, "%lld,", space->select.offset[u]);
+ fprintf(f, "%lld]\n", space->select.offset[dims - 1]);
- HDfprintf(f, " low_bounds=[");
+ fprintf(f, " low_bounds=[");
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.low_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.low_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]);
} /* end if */
else {
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->low_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->low_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]);
} /* end else */
- HDfprintf(f, " high_bounds=[");
+ fprintf(f, " high_bounds=[");
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.high_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.high_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]);
} /* end if */
else {
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->high_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->high_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]);
} /* end else */
/* Print out diminfo, if it's valid */
@@ -513,7 +513,7 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space)
/* Start print out the highest-order of dimension */
if (hslab->span_lst)
H5S__hyper_print_spans_dfs(f, hslab->span_lst, 0, dims);
- HDfprintf(f, "=======================\n\n");
+ fprintf(f, "=======================\n\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_print_space_dfs() */
@@ -573,9 +573,9 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
- HDassert(iter);
- HDassert(space->select.sel_info.hslab->unlim_dim < 0);
+ assert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
+ assert(iter);
+ assert(space->select.sel_info.hslab->unlim_dim < 0);
/* Initialize the hyperslab iterator's rank */
iter->u.hyp.iter_rank = 0;
@@ -639,7 +639,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
for (i = (int)rank - 1, acc = 1; i >= 0; i--) {
if (tdiminfo[i].block == mem_size[i] && i > 0) {
/* "Flatten" this dimension */
- HDassert(tdiminfo[i].start == 0);
+ assert(tdiminfo[i].start == 0);
acc *= mem_size[i];
/* Indicate that the dimension was flattened */
@@ -731,7 +731,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
} /* end if */
else {
/* Share the source dataspace's span tree by incrementing the reference count on it */
- HDassert(space->select.sel_info.hslab->span_lst);
+ assert(space->select.sel_info.hslab->span_lst);
iter->u.hyp.spans = space->select.sel_info.hslab->span_lst;
iter->u.hyp.spans->count++;
} /* end else */
@@ -740,8 +740,8 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
spans = iter->u.hyp.spans;
for (u = 0; u < rank; u++) {
/* Set the pointers to the initial span in each dimension */
- HDassert(spans);
- HDassert(spans->head);
+ assert(spans);
+ assert(spans->head);
/* Set the pointer to the first span in the list for this node */
iter->u.hyp.span[u] = spans->head;
@@ -802,8 +802,8 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(coords);
+ assert(iter);
+ assert(coords);
/* Copy the offset of the current point */
@@ -832,7 +832,7 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
u = 0;
/* Sanity check */
- HDassert(v >= 0);
+ assert(v >= 0);
/* Compute the coords for the flattened dimensions */
H5VM_array_calc(iter->u.hyp.off[v], (unsigned)((begin - u) + 1), &(iter->dims[u]),
@@ -846,7 +846,7 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
/* Walk up through as many non-flattened dimensions as possible */
while (u >= 0 && !iter->u.hyp.flattened[u]) {
/* Sanity check */
- HDassert(v >= 0);
+ assert(v >= 0);
/* Copy the coordinate */
coords[u] = iter->u.hyp.off[v];
@@ -857,7 +857,7 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
} /* end while */
} /* end else */
} /* end while */
- HDassert(v < 0);
+ assert(v < 0);
} /* end if */
else
H5MM_memcpy(coords, iter->u.hyp.off, sizeof(hsize_t) * iter->rank);
@@ -892,9 +892,9 @@ H5S__hyper_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(start);
- HDassert(end);
+ assert(iter);
+ assert(start);
+ assert(end);
/* Copy the offset of the current point */
@@ -935,7 +935,7 @@ H5S__hyper_iter_nelmts(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* end H5S__hyper_iter_nelmts() */
@@ -966,7 +966,7 @@ H5S__hyper_iter_has_next_block(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
/* Check for a single "regular" hyperslab */
if (iter->u.hyp.diminfo_valid) {
@@ -1178,9 +1178,9 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
if (curr_dim >= 0) {
/* Walk back down the iterator positions, resetting them */
while (curr_dim < fast_dim) {
- HDassert(curr_span);
- HDassert(curr_span->down);
- HDassert(curr_span->down->head);
+ assert(curr_span);
+ assert(curr_span->down);
+ assert(curr_span->down->head);
/* Increment current dimension */
curr_dim++;
@@ -1196,7 +1196,7 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- HDassert(curr_span == ispan[fast_dim]);
+ assert(curr_span == ispan[fast_dim]);
} /* end if */
} /* end while */
} /* end else */
@@ -1355,9 +1355,9 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter)
if (curr_dim >= 0) {
/* Walk back down the iterator positions, resetting them */
while (curr_dim < fast_dim) {
- HDassert(curr_span);
- HDassert(curr_span->down);
- HDassert(curr_span->down->head);
+ assert(curr_span);
+ assert(curr_span->down);
+ assert(curr_span->down->head);
/* Increment current dimension */
curr_dim++;
@@ -1373,7 +1373,7 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter)
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- HDassert(curr_span == ispan[fast_dim]);
+ assert(curr_span == ispan[fast_dim]);
} /* end if */
} /* end else */
@@ -1437,13 +1437,13 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Set the rank of the fastest changing dimension */
ndims = iter->rank;
@@ -1516,7 +1516,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
/* Check if we are still within the span */
if (abs_arr[fast_dim] <= curr_span->high) {
/* Sanity check */
- HDassert(ispan[fast_dim] == curr_span);
+ assert(ispan[fast_dim] == curr_span);
/* Update byte offset */
loc_arr[fast_dim] += span_size;
@@ -1593,9 +1593,9 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
if (curr_dim >= 0) {
/* Walk back down the iterator positions, resetting them */
while ((unsigned)curr_dim < fast_dim) {
- HDassert(curr_span);
- HDassert(curr_span->down);
- HDassert(curr_span->down->head);
+ assert(curr_span);
+ assert(curr_span->down);
+ assert(curr_span->down->head);
/* Increment current dimension */
curr_dim++;
@@ -1615,7 +1615,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- HDassert(curr_span == ispan[fast_dim]);
+ assert(curr_span == ispan[fast_dim]);
/* Reset the buffer offset */
for (u = 0, loc_off = 0; u < ndims; u++)
@@ -1623,7 +1623,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
} /* end else */
else
/* We had better be done with I/O or bad things are going to happen... */
- HDassert(io_elmts_left == 0);
+ assert(io_elmts_left == 0);
} /* end if */
} /* end if */
@@ -1632,7 +1632,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
H5S_hyper_span_t *prev_span; /* Previous hyperslab span node */
/* Sanity check */
- HDassert(curr_span);
+ assert(curr_span);
/* Set to current span, so the first adjustment to loc_off is 0 */
prev_span = curr_span;
@@ -1795,15 +1795,15 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
/* Check if we are finished with the spans in the tree */
if (curr_dim < 0) {
/* We had better be done with I/O or bad things are going to happen... */
- HDassert(io_elmts_left == 0);
+ assert(io_elmts_left == 0);
break;
} /* end if */
else {
/* Walk back down the iterator positions, resetting them */
while ((unsigned)curr_dim < fast_dim) {
- HDassert(curr_span);
- HDassert(curr_span->down);
- HDassert(curr_span->down->head);
+ assert(curr_span);
+ assert(curr_span->down);
+ assert(curr_span->down->head);
/* Increment current dimension to the next dimension down */
curr_dim++;
@@ -1823,7 +1823,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- HDassert(curr_span == ispan[fast_dim]);
+ assert(curr_span == ispan[fast_dim]);
} /* end else */
/* Reset the buffer offset */
@@ -1910,13 +1910,13 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Set the local copy of the diminfo pointer */
tdiminfo = iter->u.hyp.diminfo;
@@ -1953,8 +1953,8 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
io_left = MIN((size_t)iter->elmt_left, maxelem);
/* Sanity check that there aren't any "remainder" sequences in process */
- HDassert(!((iter->u.hyp.off[fast_dim] - tdiminfo[fast_dim].start) % tdiminfo[fast_dim].stride != 0 ||
- ((iter->u.hyp.off[fast_dim] != tdiminfo[fast_dim].start) && tdiminfo[fast_dim].count == 1)));
+ assert(!((iter->u.hyp.off[fast_dim] - tdiminfo[fast_dim].start) % tdiminfo[fast_dim].stride != 0 ||
+ ((iter->u.hyp.off[fast_dim] != tdiminfo[fast_dim].start) && tdiminfo[fast_dim].count == 1)));
/* We've cleared the "remainder" of the previous fastest dimension
* sequence before calling this routine, so we must be at the beginning of
@@ -2137,7 +2137,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
duffs_index = (fast_dim_count + 7) / 8;
switch (fast_dim_count % 8) {
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
break;
case 0:
do {
@@ -2273,7 +2273,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
} /* end if */
/* don't bother checking slower dimensions */
- HDassert(io_left == 0 || curr_seq == maxseq);
+ assert(io_left == 0 || curr_seq == maxseq);
} /* end if */
/* Update the iterator */
@@ -2349,13 +2349,13 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Set a local copy of the diminfo pointer */
tdiminfo = iter->u.hyp.diminfo;
@@ -2428,8 +2428,8 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
/* Check for 1-dim selection */
if (0 == fast_dim) {
/* Sanity checks */
- HDassert(1 == tot_blk_count);
- HDassert(io_left == actual_elem);
+ assert(1 == tot_blk_count);
+ assert(io_left == actual_elem);
/* Store the sequence information */
*off++ = loc;
@@ -2546,8 +2546,8 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
/* Compute elements left */
elmt_remainder = io_left - (tot_blk_count * actual_elem);
- HDassert(elmt_remainder < fast_dim_block);
- HDassert(elmt_remainder > 0);
+ assert(elmt_remainder < fast_dim_block);
+ assert(elmt_remainder > 0);
/* Store the sequence information */
*off++ = loc;
@@ -2567,8 +2567,8 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
} /* end if */
/* Sanity check */
- HDassert(*nseq > 0);
- HDassert(*nelem > 0);
+ assert(*nseq > 0);
+ assert(*nelem > 0);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_get_seq_list_single() */
@@ -2612,14 +2612,14 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(iter->elmt_left > 0);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(iter->elmt_left > 0);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Check for the special case of just one H5Sselect_hyperslab call made */
if (iter->u.hyp.diminfo_valid) {
@@ -2765,7 +2765,7 @@ H5S__hyper_iter_release(H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(iter);
+ assert(iter);
/* Free the copy of the hyperslab selection span tree */
if (iter->u.hyp.spans != NULL)
@@ -2849,8 +2849,8 @@ H5S__hyper_new_span_info(unsigned rank)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(rank > 0);
- HDassert(rank <= H5S_MAX_RANK);
+ assert(rank > 0);
+ assert(rank <= H5S_MAX_RANK);
/* Allocate a new span info node */
if (NULL == (ret_value = (H5S_hyper_span_info_t *)H5FL_ARR_CALLOC(hbounds_t, rank * 2)))
@@ -2896,7 +2896,7 @@ H5S__hyper_copy_span_helper(H5S_hyper_span_info_t *spans, unsigned rank, unsigne
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(spans);
+ assert(spans);
/* Check if the span tree was already copied */
if (spans->op_info[op_info_i].op_gen == op_gen) {
@@ -2987,7 +2987,7 @@ H5S__hyper_copy_span(H5S_hyper_span_info_t *spans, unsigned rank)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Acquire an operation generation value for this operation */
op_gen = H5S__hyper_get_op_gen();
@@ -3051,8 +3051,8 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp
span2 = span_info2->head;
/* Sanity checking */
- HDassert(span1);
- HDassert(span2);
+ assert(span1);
+ assert(span2);
/* infinite loop which must be broken out of */
while (1) {
@@ -3184,7 +3184,7 @@ H5S__hyper_free_span(H5S_hyper_span_t *span)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(span);
+ assert(span);
/* Decrement the reference count of the 'down spans', freeing them if appropriate */
if (span->down != NULL)
@@ -3233,8 +3233,8 @@ H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Allocate space for the hyperslab selection information */
if (NULL == (dst->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t)))
@@ -3302,7 +3302,7 @@ H5S__hyper_is_valid(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Check for unlimited selection */
if (space->select.sel_info.hslab->unlim_dim >= 0)
@@ -3358,7 +3358,7 @@ H5S__hyper_span_nblocks_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Check if the span tree was already counted */
if (spans->op_info[op_info_i].op_gen == op_gen)
@@ -3462,8 +3462,8 @@ H5S__get_select_hyper_nblocks(const H5S_t *space, hbool_t app_ref)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(space->select.sel_info.hslab->unlim_dim < 0);
+ assert(space);
+ assert(space->select.sel_info.hslab->unlim_dim < 0);
/* Check for a "regular" hyperslab selection */
/* (No need to rebuild the dimension info yet -QAK) */
@@ -3608,7 +3608,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
FUNC_ENTER_PACKAGE
/* Get bounding box for the selection */
- HDmemset(bounds_end, 0, sizeof(bounds_end));
+ memset(bounds_end, 0, sizeof(bounds_end));
if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
/* Get bounding box for the selection */
@@ -3704,7 +3704,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
} /* end if */
else {
hsize_t max_size = block_count;
- HDassert(space->select.sel_info.hslab->unlim_dim < 0);
+ assert(space->select.sel_info.hslab->unlim_dim < 0);
/* Find max for block_count and bounds_end[] */
for (u = 0; u < space->extent.rank; u++)
@@ -3754,7 +3754,7 @@ H5S__hyper_serial_size(H5S_t *space)
FUNC_ENTER_PACKAGE
- HDassert(space);
+ assert(space);
/* Determine the number of blocks */
if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
@@ -3796,12 +3796,12 @@ H5S__hyper_serial_size(H5S_t *space)
* (4 (start/stride/count/block) * <enc_size (8 bytes)> * <rank>) =
* 17 + (4 * 8 * rank) bytes
*/
- HDassert(enc_size == 8);
+ assert(enc_size == 8);
ret_value = (hssize_t)17 + ((hssize_t)4 * (hssize_t)8 * (hssize_t)space->extent.rank);
}
else {
- HDassert(version == H5S_HYPER_VERSION_1);
- HDassert(enc_size == 4);
+ assert(version == H5S_HYPER_VERSION_1);
+ assert(enc_size == 4);
/* Version 1 */
/* Basic number of bytes required to serialize hyperslab selection:
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
@@ -3851,11 +3851,11 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, hsize_t *start,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(spans);
- HDassert(start);
- HDassert(end);
- HDassert(rank < H5S_MAX_RANK);
- HDassert(p && pp);
+ assert(spans);
+ assert(start);
+ assert(end);
+ assert(rank < H5S_MAX_RANK);
+ assert(p && pp);
/* Walk through the list of spans, recursing or outputting them */
curr = spans->head;
@@ -3923,7 +3923,7 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, hsize_t *start,
break;
default:
- HDassert(0 && "Unknown enc size?!?");
+ assert(0 && "Unknown enc size?!?");
} /* end switch */
} /* end else */
@@ -3984,10 +3984,10 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(space);
- HDassert(p);
+ assert(space);
+ assert(p);
pp = (*p);
- HDassert(pp);
+ assert(pp);
/* Set some convenience values */
ndims = space->extent.rank;
@@ -4029,13 +4029,13 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
if (is_regular) {
if (version >= H5S_HYPER_VERSION_2) {
- HDassert(H5S_UNLIMITED == HSIZE_UNDEF);
+ assert(H5S_UNLIMITED == HSIZE_UNDEF);
/* Iterate over dimensions */
/* Encode start/stride/block/count */
switch (enc_size) {
case H5S_SELECT_INFO_ENC_SIZE_2:
- HDassert(version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_3);
for (u = 0; u < space->extent.rank; u++) {
UINT16ENCODE(pp, diminfo[u].start);
UINT16ENCODE(pp, diminfo[u].stride);
@@ -4051,7 +4051,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
break;
case H5S_SELECT_INFO_ENC_SIZE_4:
- HDassert(version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_3);
for (u = 0; u < space->extent.rank; u++) {
UINT32ENCODE(pp, diminfo[u].start);
UINT32ENCODE(pp, diminfo[u].stride);
@@ -4067,7 +4067,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
break;
case H5S_SELECT_INFO_ENC_SIZE_8:
- HDassert(version == H5S_HYPER_VERSION_2 || version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_2 || version == H5S_HYPER_VERSION_3);
for (u = 0; u < space->extent.rank; u++) {
UINT64ENCODE(pp, diminfo[u].start);
UINT64ENCODE(pp, diminfo[u].stride);
@@ -4090,7 +4090,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
} /* end switch */
} /* end if */
else {
- HDassert(version == H5S_HYPER_VERSION_1);
+ assert(version == H5S_HYPER_VERSION_1);
/* Set some convenience values */
fast_dim = ndims - 1;
@@ -4171,19 +4171,19 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
/* Encode number of hyperslabs */
switch (enc_size) {
case H5S_SELECT_INFO_ENC_SIZE_2:
- HDassert(version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_3);
H5_CHECK_OVERFLOW(block_count, hsize_t, uint16_t);
UINT16ENCODE(pp, (uint16_t)block_count);
break;
case H5S_SELECT_INFO_ENC_SIZE_4:
- HDassert(version == H5S_HYPER_VERSION_1 || version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_1 || version == H5S_HYPER_VERSION_3);
H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t);
UINT32ENCODE(pp, (uint32_t)block_count);
break;
case H5S_SELECT_INFO_ENC_SIZE_8:
- HDassert(version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_3);
UINT64ENCODE(pp, block_count);
break;
@@ -4256,9 +4256,9 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(p);
+ assert(p);
pp = (*p);
- HDassert(pp);
+ assert(pp);
/* As part of the efforts to push all selection-type specific coding
to the callbacks, the coding for the allocation of a null dataspace
@@ -4325,7 +4325,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
if (!*space) {
/* Patch the rank of the allocated dataspace */
- HDmemset(dims, 0, (size_t)rank * sizeof(dims[0]));
+ memset(dims, 0, (size_t)rank * sizeof(dims[0]));
if (H5S_set_extent_simple(tmp_space, rank, dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions")
} /* end if */
@@ -4340,8 +4340,8 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
hsize_t count[H5S_MAX_RANK]; /* Hyperslab count information */
/* Sanity checks */
- HDassert(H5S_UNLIMITED == HSIZE_UNDEF);
- HDassert(version >= H5S_HYPER_VERSION_2);
+ assert(H5S_UNLIMITED == HSIZE_UNDEF);
+ assert(version >= H5S_HYPER_VERSION_2);
/* Decode start/stride/block/count */
switch (enc_size) {
@@ -4565,13 +4565,13 @@ H5S__hyper_span_blocklist(const H5S_hyper_span_info_t *spans, hsize_t start[], h
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(spans);
- HDassert(rank < H5S_MAX_RANK);
- HDassert(start);
- HDassert(end);
- HDassert(startblock);
- HDassert(numblocks && *numblocks > 0);
- HDassert(buf && *buf);
+ assert(spans);
+ assert(rank < H5S_MAX_RANK);
+ assert(start);
+ assert(end);
+ assert(startblock);
+ assert(numblocks && *numblocks > 0);
+ assert(buf && *buf);
/* Walk through the list of spans, recursing or outputting them */
curr = spans->head;
@@ -4662,9 +4662,9 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(buf);
- HDassert(space->select.sel_info.hslab->unlim_dim < 0);
+ assert(space);
+ assert(buf);
+ assert(space->select.sel_info.hslab->unlim_dim < 0);
/* Attempt to rebuild diminfo if it is invalid and has not been confirmed
* to be impossible.
@@ -4737,7 +4737,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
/* Iterate over the blocks in the fastest dimension */
while (tmp_count[fast_dim] > 0 && numblocks > 0) {
/* Sanity check */
- HDassert(startblock == 0);
+ assert(startblock == 0);
/* Copy the starting location */
H5MM_memcpy(buf, offset, sizeof(hsize_t) * ndims);
@@ -4901,9 +4901,9 @@ H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
/* Check which set of low & high bounds we should be using */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
@@ -4922,7 +4922,7 @@ H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
/* Loop over dimensions */
for (u = 0; u < space->extent.rank; u++) {
/* Sanity check */
- HDassert(low_bounds[u] <= high_bounds[u]);
+ assert(low_bounds[u] <= high_bounds[u]);
/* Check for offset moving selection negative */
if (((hssize_t)low_bounds[u] + space->select.offset[u]) < 0)
@@ -4978,8 +4978,8 @@ H5S__hyper_offset(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_PACKAGE
- HDassert(space && space->extent.rank > 0);
- HDassert(offset);
+ assert(space && space->extent.rank > 0);
+ assert(offset);
/* Start at linear offset 0 */
*offset = 0;
@@ -5044,7 +5044,7 @@ H5S__hyper_offset(const H5S_t *space, hsize_t *offset)
/* Advance to first span in "down" dimension */
if (span->down) {
- HDassert(span->down->head);
+ assert(span->down->head);
span = span->down->head;
} /* end if */
else
@@ -5111,8 +5111,8 @@ H5S__hyper_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space);
- HDassert(num_elem_non_unlim);
+ assert(space);
+ assert(num_elem_non_unlim);
/* Get number of elements in the non-unlimited dimensions */
if (space->select.sel_info.hslab->unlim_dim >= 0)
@@ -5152,7 +5152,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Check for a "regular" hyperslab selection */
/* (No need to rebuild the dimension info yet -QAK) */
@@ -5337,7 +5337,7 @@ H5S__hyper_is_single(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Check for a "single" hyperslab selection */
/* (No need to rebuild the dimension info yet, since the span-tree
@@ -5411,7 +5411,7 @@ H5S__hyper_is_regular(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Attempt to rebuild diminfo if it is invalid and has not been confirmed
* to be impossible.
@@ -5463,10 +5463,10 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(span_info1);
- HDassert(span_info2);
- HDassert(offset);
- HDassert(rest_zeros);
+ assert(span_info1);
+ assert(span_info2);
+ assert(offset);
+ assert(rest_zeros);
/* Compare low & high bounds for this span list */
/* (Could compare lower dimensions also, but not certain if
@@ -5485,8 +5485,8 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
span2 = span_info2->head;
/* Sanity checking */
- HDassert(span1);
- HDassert(span2);
+ assert(span1);
+ assert(span2);
/* infinite loop which must be broken out of */
while (1) {
@@ -5573,13 +5573,13 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(span_info1);
- HDassert(span_info2);
- HDassert(ndims > 0);
+ assert(span_info1);
+ assert(span_info2);
+ assert(ndims > 0);
/* Initialize arrays */
- HDmemset(offset, 0, sizeof(offset));
- HDmemset(rest_zeros, 0, sizeof(rest_zeros));
+ memset(offset, 0, sizeof(offset));
+ memset(rest_zeros, 0, sizeof(rest_zeros));
/* Check for an offset between the two selections */
span1 = span_info1->head;
@@ -5597,7 +5597,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Sanity check */
/* (Both span trees must have the same depth) */
- HDassert((span1->down && span2->down) || (NULL == span1->down && NULL == span2->down));
+ assert((span1->down && span2->down) || (NULL == span1->down && NULL == span2->down));
/* Advance to next dimension */
if (span1->down) {
@@ -5619,7 +5619,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Sanity check */
/* (Must eventually have found a non-zero offset) */
- HDassert(i >= 0);
+ assert(i >= 0);
} /* end if */
/* If the offset vector is all zero, we can use the faster span tree
@@ -5668,16 +5668,16 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
/* Get dataspace ranks */
space1_rank = space1->extent.rank;
space2_rank = space2->extent.rank;
/* Sanity check */
- HDassert(space1_rank >= space2_rank);
- HDassert(space2_rank > 0);
+ assert(space1_rank >= space2_rank);
+ assert(space2_rank > 0);
/* Rebuild diminfo if it is invalid and has not been confirmed to be
* impossible */
@@ -5766,7 +5766,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
} /* end while */
/* Sanity check */
- HDassert(spans1);
+ assert(spans1);
} /* end if */
else
spans1 = space1->select.sel_info.hslab->span_lst;
@@ -5806,7 +5806,7 @@ H5S__hyper_release(H5S_t *space)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
+ assert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
/* Reset the number of points selected */
space->select.num_elem = 0;
@@ -5852,8 +5852,8 @@ H5S__hyper_coord_to_span(unsigned rank, const hsize_t *coords)
FUNC_ENTER_PACKAGE
- HDassert(rank > 0);
- HDassert(coords);
+ assert(rank > 0);
+ assert(coords);
/* Search for location to insert new element in tree */
if (rank > 1) {
@@ -5919,10 +5919,10 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(span_tree);
- HDassert(rank > 0);
- HDassert(coords);
- HDassert(first_dim_modified);
+ assert(span_tree);
+ assert(rank > 0);
+ assert(coords);
+ assert(first_dim_modified);
/* Get pointer to last span in span tree */
tail_span = span_tree->tail;
@@ -5938,7 +5938,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
prev_down_tail_span_high = tail_span->down->tail->high;
/* Drop down a dimension */
- HDassert(rank > 1);
+ assert(rank > 1);
if (H5S__hyper_add_span_element_helper(tail_span->down, rank - 1, &coords[1], first_dim_modified) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert coordinate into span tree")
@@ -5983,14 +5983,14 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
/* Determine which span to stop at */
if (tail_span->down->tail != prev_down_tail_span) {
/* Sanity check */
- HDassert(prev_down_tail_span->next == tail_span->down->tail);
+ assert(prev_down_tail_span->next == tail_span->down->tail);
/* Set the span to stop at */
stop_span = prev_down_tail_span;
} /* end if */
else {
/* Sanity check */
- HDassert(prev_down_tail_span_high != tail_span->down->tail->high);
+ assert(prev_down_tail_span_high != tail_span->down->tail->high);
/* Set the span to stop at */
stop_span = tail_span->down->tail;
@@ -6043,13 +6043,13 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
/* Update pointers appropriately */
if (stop_span == prev_down_tail_span) {
/* Sanity check */
- HDassert(stop_span->next == tail_span->down->tail);
+ assert(stop_span->next == tail_span->down->tail);
tmp_span->next = stop_span->next;
} /* end if */
else {
/* Sanity check */
- HDassert(tmp_span->next == tail_span->down->tail);
+ assert(tmp_span->next == tail_span->down->tail);
tmp_span->next = NULL;
tail_span->down->tail = tmp_span;
@@ -6105,7 +6105,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
} /* end else */
/* Update high bound for current span tree */
- HDassert(coords[0] > span_tree->high_bounds[0]);
+ assert(coords[0] > span_tree->high_bounds[0]);
span_tree->high_bounds[0] = coords[0];
/* Update high bounds for dimensions below this one */
@@ -6167,10 +6167,10 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsize_t *coords)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(space);
- HDassert(rank > 0);
- HDassert(coords);
- HDassert(space->extent.rank == rank);
+ assert(space);
+ assert(rank > 0);
+ assert(coords);
+ assert(space->extent.rank == rank);
/* Check if this is the first element in the selection */
if (NULL == space->select.sel_info.hslab) {
@@ -6263,9 +6263,9 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
- HDassert(start);
- HDassert(end);
+ assert(spans);
+ assert(start);
+ assert(end);
/* Check if we've already visited this span tree */
if (spans->op_info[op_info_i].op_gen != op_gen) {
@@ -6350,10 +6350,10 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
+ assert(start);
+ assert(end);
/* Attempt to rebuild diminfo if it is invalid and has not been confirmed
* to be impossible.
@@ -6400,7 +6400,7 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
nstride = 0;
/* Sanity check */
- HDassert(nstride <= space->select.sel_info.hslab->diminfo.opt[u].count);
+ assert(nstride <= space->select.sel_info.hslab->diminfo.opt[u].count);
/* "Rebase" the adjusted start coord into the same range
* range of values as the selections's first block.
@@ -6481,8 +6481,8 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(spans);
- HDassert(offset);
+ assert(spans);
+ assert(offset);
/* Check if we've already set this span tree */
if (spans->op_info[op_info_i].op_gen != op_gen) {
@@ -6491,7 +6491,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
/* Adjust the span tree's low & high bounds */
for (u = 0; u < rank; u++) {
- HDassert(spans->low_bounds[u] >= offset[u]);
+ assert(spans->low_bounds[u] >= offset[u]);
spans->low_bounds[u] -= offset[u];
spans->high_bounds[u] -= offset[u];
} /* end for */
@@ -6500,7 +6500,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
span = spans->head;
while (span != NULL) {
/* Adjust span offset */
- HDassert(span->low >= *offset);
+ assert(span->low >= *offset);
span->low -= *offset;
span->high -= *offset;
@@ -6546,8 +6546,8 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
@@ -6562,11 +6562,11 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
/* (No need to rebuild the dimension info yet -QAK) */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
for (u = 0; u < space->extent.rank; u++) {
- HDassert(space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]);
+ assert(space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]);
space->select.sel_info.hslab->diminfo.opt[u].start -= offset[u];
/* Adjust the low & high bounds */
- HDassert(space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]);
+ assert(space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]);
space->select.sel_info.hslab->diminfo.low_bounds[u] -= offset[u];
space->select.sel_info.hslab->diminfo.high_bounds[u] -= offset[u];
} /* end for */
@@ -6611,8 +6611,8 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
- HDassert(offset);
+ assert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
+ assert(offset);
/* Check for a "regular" hyperslab selection */
/* (No need to rebuild the dimension info yet -QAK) */
@@ -6624,11 +6624,11 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset)
/* Build the table of the initial offset */
for (u = 0; u < space->extent.rank; u++) {
/* Sanity check diminfo */
- HDassert(1 == diminfo[u].count);
- HDassert(1 == diminfo[u].block);
+ assert(1 == diminfo[u].count);
+ assert(1 == diminfo[u].block);
/* Sanity check bounds, while we're here */
- HDassert(diminfo[u].start == space->select.sel_info.hslab->diminfo.low_bounds[u]);
+ assert(diminfo[u].start == space->select.sel_info.hslab->diminfo.low_bounds[u]);
/* Keep the offset for later */
block[u] = diminfo[u].start;
@@ -6643,9 +6643,9 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset)
curr_dim = 0;
while (1) {
/* Sanity checks */
- HDassert(NULL == curr->next);
- HDassert(curr->low == curr->high);
- HDassert(curr_dim < space->extent.rank);
+ assert(NULL == curr->next);
+ assert(curr->low == curr->high);
+ assert(curr_dim < space->extent.rank);
/* Save the location of the selection in current dimension */
block[curr_dim] = curr->low;
@@ -6689,16 +6689,16 @@ H5S__hyper_project_simple_lower(const H5S_t *base_space, H5S_t *new_space)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(new_space->extent.rank < base_space->extent.rank);
+ assert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(new_space->extent.rank < base_space->extent.rank);
/* Walk down the span tree until we reach the selection to project */
down = base_space->select.sel_info.hslab->span_lst;
curr_dim = 0;
while (down && curr_dim < (base_space->extent.rank - new_space->extent.rank)) {
/* Sanity check */
- HDassert(NULL == down->head->next);
+ assert(NULL == down->head->next);
/* Advance down to next dimension */
down = down->head->down;
@@ -6740,9 +6740,9 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(new_space->extent.rank > base_space->extent.rank);
+ assert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(new_space->extent.rank > base_space->extent.rank);
/* Create nodes until reaching the correct # of dimensions */
new_space->select.sel_info.hslab->span_lst = NULL;
@@ -6765,7 +6765,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space)
/* Allocate a new node */
if (NULL == (new_span = H5S__hyper_new_span((hsize_t)0, (hsize_t)0, NULL, NULL))) {
- HDassert(new_span_info);
+ assert(new_span_info);
if (!prev_span)
(void)H5FL_ARR_FREE(hbounds_t, new_span_info);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span")
@@ -6800,7 +6800,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space)
} /* end while */
if (NULL == new_space->select.sel_info.hslab->span_lst)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "NULL span list pointer")
- HDassert(prev_span);
+ assert(prev_span);
/* Share the underlying hyperslab span information */
prev_span->down = base_space->select.sel_info.hslab->span_lst;
@@ -6840,9 +6840,9 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(offset);
+ assert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(offset);
/* We are setting a new selection, remove any current selection in new dataspace */
if (H5S_SELECT_RELEASE(new_space) < 0)
@@ -6869,7 +6869,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
hsize_t block[H5S_MAX_RANK]; /* Block selected in base dataspace */
/* Compute the offset for the down-projection */
- HDmemset(block, 0, sizeof(block));
+ memset(block, 0, sizeof(block));
for (u = 0; u < (base_space->extent.rank - new_space->extent.rank); u++)
block[u] = opt_diminfo[u].start;
*offset = H5VM_array_offset(base_space->extent.rank, base_space->extent.size, block);
@@ -6879,7 +6879,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
new_space_dim = 0;
} /* end if */
else {
- HDassert(new_space->extent.rank > base_space->extent.rank);
+ assert(new_space->extent.rank > base_space->extent.rank);
/* The offset is zero when projected into higher dimensions */
*offset = 0;
@@ -6952,7 +6952,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
unsigned curr_dim; /* Current dimension being operated on */
/* Clear the block buffer */
- HDmemset(block, 0, sizeof(block));
+ memset(block, 0, sizeof(block));
/* Advance down selected spans */
curr = base_space->select.sel_info.hslab->span_lst->head;
@@ -6975,7 +6975,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
"can't project hyperslab selection into less dimensions")
} /* end if */
else {
- HDassert(new_space->extent.rank > base_space->extent.rank);
+ assert(new_space->extent.rank > base_space->extent.rank);
/* The offset is zero when projected into higher dimensions */
*offset = 0;
@@ -7028,8 +7028,8 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(spans);
- HDassert(offset);
+ assert(spans);
+ assert(offset);
/* Check if we've already set this span tree */
if (spans->op_info[op_info_i].op_gen != op_gen) {
@@ -7038,7 +7038,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
/* Adjust the span tree's low & high bounds */
for (u = 0; u < rank; u++) {
- HDassert((hssize_t)spans->low_bounds[u] >= offset[u]);
+ assert((hssize_t)spans->low_bounds[u] >= offset[u]);
spans->low_bounds[u] = (hsize_t)((hssize_t)spans->low_bounds[u] - offset[u]);
spans->high_bounds[u] = (hsize_t)((hssize_t)spans->high_bounds[u] - offset[u]);
} /* end for */
@@ -7047,7 +7047,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
span = spans->head;
while (span != NULL) {
/* Adjust span offset */
- HDassert((hssize_t)span->low >= *offset);
+ assert((hssize_t)span->low >= *offset);
span->low = (hsize_t)((hssize_t)span->low - *offset);
span->high = (hsize_t)((hssize_t)span->high - *offset);
@@ -7093,8 +7093,8 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
@@ -7109,12 +7109,12 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
/* (No need to rebuild the dimension info yet -QAK) */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
for (u = 0; u < space->extent.rank; u++) {
- HDassert((hssize_t)space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]);
+ assert((hssize_t)space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]);
space->select.sel_info.hslab->diminfo.opt[u].start =
(hsize_t)((hssize_t)space->select.sel_info.hslab->diminfo.opt[u].start - offset[u]);
/* Adjust the low & high bounds */
- HDassert((hssize_t)space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]);
+ assert((hssize_t)space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]);
space->select.sel_info.hslab->diminfo.low_bounds[u] =
(hsize_t)((hssize_t)space->select.sel_info.hslab->diminfo.low_bounds[u] - offset[u]);
space->select.sel_info.hslab->diminfo.high_bounds[u] =
@@ -7169,8 +7169,8 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(space);
- HDassert(old_offset);
+ assert(space);
+ assert(old_offset);
/* Check for hyperslab selection & offset changed */
if (H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS && space->select.offset_changed) {
@@ -7187,7 +7187,7 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection")
/* Zero out the selection offset */
- HDmemset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank);
+ memset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank);
/* Indicate that the offset was normalized */
ret_value = TRUE;
@@ -7226,8 +7226,8 @@ H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_offset)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(space);
- HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
+ assert(space);
+ assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
/* Call the 'adjust' routine */
if (H5S__hyper_adjust_s(space, old_offset) < 0)
@@ -7271,7 +7271,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(span_tree);
+ assert(span_tree);
/* Check for adding first node to merged spans */
if (*span_tree == NULL) {
@@ -7295,7 +7295,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
(*span_tree)->high_bounds[0] = high;
if (down) {
/* Sanity check */
- HDassert(ndims > 1);
+ assert(ndims > 1);
H5MM_memcpy(&((*span_tree)->low_bounds[1]), down->low_bounds, sizeof(hsize_t) * (ndims - 1));
H5MM_memcpy(&((*span_tree)->high_bounds[1]), down->high_bounds, sizeof(hsize_t) * (ndims - 1));
@@ -7320,7 +7320,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
/* Sanity check */
/* (If down_cmp was set to TRUE above, we won't be in this branch) */
- HDassert(down_cmp != TRUE);
+ assert(down_cmp != TRUE);
/* Check if there is actually a down span */
if (down) {
@@ -7345,8 +7345,8 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
/* Update low & high bounds in lower dimensions, if there are any */
if (down) {
/* Sanity checks */
- HDassert(ndims > 1);
- HDassert(down_cmp >= 0);
+ assert(ndims > 1);
+ assert(down_cmp >= 0);
/* Check if we are sharing down spans with a previous node */
/* (Only need to check for bounds changing if down spans aren't shared) */
@@ -7431,11 +7431,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(a_spans);
- HDassert(b_spans);
- HDassert(a_not_b);
- HDassert(a_and_b);
- HDassert(b_not_a);
+ assert(a_spans);
+ assert(b_spans);
+ assert(a_not_b);
+ assert(a_and_b);
+ assert(b_not_a);
/* Set which list(s) to be generated, based on selector */
need_a_not_b = ((selector & H5S_HYPER_COMPUTE_A_NOT_B) != 0);
@@ -7539,8 +7539,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between upper part of span 'a' and lower part of span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- HDassert((span_a->down != NULL && span_b->down != NULL) ||
- (span_a->down == NULL && span_b->down == NULL));
+ assert((span_a->down != NULL && span_b->down != NULL) ||
+ (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if (span_a->down == NULL) {
@@ -7569,7 +7569,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- HDassert(need_a_not_b == TRUE);
+ assert(need_a_not_b == TRUE);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_a->high,
@@ -7584,7 +7584,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- HDassert(need_a_and_b == TRUE);
+ assert(need_a_and_b == TRUE);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_a->high,
@@ -7599,7 +7599,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- HDassert(need_b_not_a == TRUE);
+ assert(need_b_not_a == TRUE);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_a->high,
@@ -7653,8 +7653,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between middle part of span 'a' and span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- HDassert((span_a->down != NULL && span_b->down != NULL) ||
- (span_a->down == NULL && span_b->down == NULL));
+ assert((span_a->down != NULL && span_b->down != NULL) ||
+ (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if (span_a->down == NULL) {
@@ -7679,7 +7679,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- HDassert(need_a_not_b == TRUE);
+ assert(need_a_not_b == TRUE);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_b->high,
@@ -7694,7 +7694,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- HDassert(need_a_and_b == TRUE);
+ assert(need_a_and_b == TRUE);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_b->high,
@@ -7709,7 +7709,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- HDassert(need_b_not_a == TRUE);
+ assert(need_b_not_a == TRUE);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_b->high,
@@ -7760,8 +7760,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between span 'a' and midle of span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- HDassert((span_a->down != NULL && span_b->down != NULL) ||
- (span_a->down == NULL && span_b->down == NULL));
+ assert((span_a->down != NULL && span_b->down != NULL) ||
+ (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if (span_a->down == NULL) {
@@ -7786,7 +7786,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- HDassert(need_a_not_b == TRUE);
+ assert(need_a_not_b == TRUE);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_a->high,
@@ -7801,7 +7801,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- HDassert(need_a_and_b == TRUE);
+ assert(need_a_and_b == TRUE);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_a->high,
@@ -7816,7 +7816,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- HDassert(need_b_not_a == TRUE);
+ assert(need_b_not_a == TRUE);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_a->high,
@@ -7877,8 +7877,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between lower part of span 'a' and upper part of span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- HDassert((span_a->down != NULL && span_b->down != NULL) ||
- (span_a->down == NULL && span_b->down == NULL));
+ assert((span_a->down != NULL && span_b->down != NULL) ||
+ (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if (span_a->down == NULL) {
@@ -7903,7 +7903,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- HDassert(need_a_not_b == TRUE);
+ assert(need_a_not_b == TRUE);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_b->high,
@@ -7918,7 +7918,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- HDassert(need_a_and_b == TRUE);
+ assert(need_a_and_b == TRUE);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_b->high,
@@ -7933,7 +7933,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- HDassert(need_b_not_a == TRUE);
+ assert(need_b_not_a == TRUE);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_b->high,
@@ -8037,7 +8037,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
} /* end if */
else
/* Sanity check */
- HDassert(span_a == NULL && span_b == NULL);
+ assert(span_a == NULL && span_b == NULL);
} /* end else */
} /* end else */
@@ -8077,7 +8077,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
FUNC_ENTER_PACKAGE
/* Make certain both 'a' & 'b' spans have down span trees or neither does */
- HDassert((a_spans != NULL && b_spans != NULL) || (a_spans == NULL && b_spans == NULL));
+ assert((a_spans != NULL && b_spans != NULL) || (a_spans == NULL && b_spans == NULL));
/* Check if the span trees for the 'a' span and the 'b' span are the same */
if (H5S__hyper_cmp_spans(a_spans, b_spans)) {
@@ -8410,8 +8410,8 @@ H5S__hyper_merge_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(space);
- HDassert(new_spans);
+ assert(space);
+ assert(new_spans);
/* If this is the first span tree in the hyperslab selection, just use it */
if (space->select.sel_info.hslab->span_lst == NULL) {
@@ -8465,7 +8465,7 @@ H5S__hyper_spans_nelem_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Check if the span tree was already counted */
if (spans->op_info[op_info_i].op_gen == op_gen)
@@ -8535,7 +8535,7 @@ H5S__hyper_spans_nelem(H5S_hyper_span_info_t *spans)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Acquire an operation generation value for this operation */
op_gen = H5S__hyper_get_op_gen();
@@ -8579,8 +8579,8 @@ H5S__hyper_add_disjoint_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(new_spans);
+ assert(space);
+ assert(new_spans);
/* Update the number of elements in the selection */
space->select.num_elem += H5S__hyper_spans_nelem(new_spans);
@@ -8635,11 +8635,11 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(rank > 0);
- HDassert(start);
- HDassert(stride);
- HDassert(count);
- HDassert(block);
+ assert(rank > 0);
+ assert(start);
+ assert(stride);
+ assert(count);
+ assert(block);
/* Start creating spans in fastest changing dimension */
for (i = (int)(rank - 1); i >= 0; i--) {
@@ -8783,8 +8783,8 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(new_hyper_diminfo);
+ assert(space);
+ assert(new_hyper_diminfo);
/* Check for conditions that prevent us from using the fast algorithm here */
/* (and instead require H5S__hyper_rebuild) */
@@ -8939,13 +8939,13 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
/* Set the new diminfo values */
space->select.sel_info.hslab->diminfo.app[curr_dim].start =
space->select.sel_info.hslab->diminfo.opt[curr_dim].start = tmp_diminfo[curr_dim].start;
- HDassert(tmp_diminfo[curr_dim].stride > 0);
+ assert(tmp_diminfo[curr_dim].stride > 0);
space->select.sel_info.hslab->diminfo.app[curr_dim].stride =
space->select.sel_info.hslab->diminfo.opt[curr_dim].stride = tmp_diminfo[curr_dim].stride;
- HDassert(tmp_diminfo[curr_dim].count > 0);
+ assert(tmp_diminfo[curr_dim].count > 0);
space->select.sel_info.hslab->diminfo.app[curr_dim].count =
space->select.sel_info.hslab->diminfo.opt[curr_dim].count = tmp_diminfo[curr_dim].count;
- HDassert(tmp_diminfo[curr_dim].block > 0);
+ assert(tmp_diminfo[curr_dim].block > 0);
space->select.sel_info.hslab->diminfo.app[curr_dim].block =
space->select.sel_info.hslab->diminfo.opt[curr_dim].block = tmp_diminfo[curr_dim].block;
@@ -9000,7 +9000,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Initialization */
span = spans->head;
@@ -9026,7 +9026,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
hsize_t curr_block; /* Block size of current span */
/* Sanity check */
- HDassert(prev_span);
+ assert(prev_span);
/* Check that down spans match current slab info */
/* (Can skip check if previous span's down pointer is same as current one) */
@@ -9099,8 +9099,8 @@ H5S__hyper_rebuild(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(space->select.sel_info.hslab->span_lst);
+ assert(space);
+ assert(space->select.sel_info.hslab->span_lst);
/* Check whether the slab can be rebuilt */
/* (Only regular selection can be rebuilt. If yes, fill in correct values) */
@@ -9152,8 +9152,8 @@ H5S__hyper_generate_spans(H5S_t *space)
FUNC_ENTER_PACKAGE
- HDassert(space);
- HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
+ assert(space);
+ assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
/* Get the diminfo */
for (u = 0; u < space->extent.rank; u++) {
@@ -9206,8 +9206,8 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(spans1);
- HDassert(spans2);
+ assert(spans1);
+ assert(spans2);
/* Use low & high bounds to try to avoid spinning through the span lists */
if (H5S_RANGE_OVERLAP(spans1->low_bounds[0], spans1->high_bounds[0], spans2->low_bounds[0],
@@ -9223,7 +9223,7 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
/* Check for spans in lowest dimension already */
if (span1->down) {
/* Sanity check */
- HDassert(span2->down);
+ assert(span2->down);
/* Check lower dimensions for overlap */
if (H5S__check_spans_overlap(span1->down, span2->down))
@@ -9251,8 +9251,8 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
} /* end while */
/* Make certain we've exhausted our comparisons */
- HDassert((NULL == span1 && (NULL != span2 && NULL == span2->next)) ||
- ((NULL != span1 && NULL == span1->next) && NULL == span2));
+ assert((NULL == span1 && (NULL != span2 && NULL == span2->next)) ||
+ ((NULL != span1 && NULL == span1->next) && NULL == span2));
} /* end of */
done:
@@ -9303,13 +9303,13 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
FUNC_ENTER_PACKAGE
- HDassert(space1);
- HDassert(space2_span_lst);
- HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
+ assert(space1);
+ assert(space2_span_lst);
+ assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
/* The result is either a to-be-created space or an empty one */
- HDassert(*result == NULL || *result == space1);
- HDassert(space1->select.sel_info.hslab->span_lst);
- HDassert(span2_owned);
+ assert(*result == NULL || *result == space1);
+ assert(space1->select.sel_info.hslab->span_lst);
+ assert(span2_owned);
/* Reset flags to return */
*span2_owned = FALSE;
@@ -9372,7 +9372,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
case H5S_SELECT_NOTA:
if (!is_result_new) {
- HDassert(space1 == *result);
+ assert(space1 == *result);
/* Free the current selection */
if (H5S__hyper_free_span_info(space1->select.sel_info.hslab->span_lst) < 0)
@@ -9455,7 +9455,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
case H5S_SELECT_NOTB:
case H5S_SELECT_NOTA:
if (!is_result_new) {
- HDassert(space1 == *result);
+ assert(space1 == *result);
/* Free the current selection */
if (H5S__hyper_free_span_info(space1->select.sel_info.hslab->span_lst) < 0)
@@ -9482,7 +9482,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
/* Other than OR, the span_lst is set to NULL. And in OR,
* a_not_b is not needed
*/
- HDassert(NULL == (*result)->select.sel_info.hslab->span_lst);
+ assert(NULL == (*result)->select.sel_info.hslab->span_lst);
/* The results dataspace takes ownership of the spans */
/* (Since it must be NULL) */
@@ -9505,7 +9505,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
* 2. a_not_b will never be computed together with a_and_b
* because merging these two equals to a.
*/
- HDassert(NULL == (*result)->select.sel_info.hslab->span_lst);
+ assert(NULL == (*result)->select.sel_info.hslab->span_lst);
/* The results dataspace takes ownership of the spans */
/* (Since it must be NULL) */
@@ -9588,12 +9588,12 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
- HDassert(start);
- HDassert(stride);
- HDassert(count);
- HDassert(block);
+ assert(space);
+ assert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
+ assert(start);
+ assert(stride);
+ assert(count);
+ assert(block);
/* Generate span tree for new hyperslab information */
if (NULL == (new_spans = H5S__hyper_make_spans(space->extent.rank, start, stride, count, block)))
@@ -9629,7 +9629,7 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(space->select.sel_info.hslab->span_lst->head);
+ assert(space->select.sel_info.hslab->span_lst->head);
/* Build diminfo struct */
for (u = 0; u < space->extent.rank; u++) {
@@ -9680,14 +9680,14 @@ H5S__set_regular_hyperslab(H5S_t *space, const hsize_t start[], const hsize_t *a
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(app_stride);
- HDassert(app_count);
- HDassert(app_block);
- HDassert(opt_stride);
- HDassert(opt_count);
- HDassert(opt_block);
+ assert(space);
+ assert(start);
+ assert(app_stride);
+ assert(app_count);
+ assert(app_block);
+ assert(opt_stride);
+ assert(opt_count);
+ assert(opt_block);
/* If we are setting a new selection, remove current selection first */
if (H5S_SELECT_RELEASE(space) < 0)
@@ -9781,9 +9781,9 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(block);
+ assert(space);
+ assert(start);
+ assert(block);
/* Check for single block selection in dataspace */
single_block = TRUE;
@@ -9939,7 +9939,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
} /* end if */
/* Sanity check */
- HDassert(first_span_start <= last_span_start);
+ assert(first_span_start <= last_span_start);
/* Compute new start / count / block values */
new_start[u] = first_span_start;
@@ -10014,10 +10014,10 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(count);
- HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
+ assert(space);
+ assert(start);
+ assert(count);
+ assert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
/* Point to the correct stride values */
if (stride == NULL)
@@ -10098,8 +10098,8 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
if (count[u] == 1)
int_stride[u] = 1;
else {
- HDassert((stride[u] > block[u]) ||
- ((stride[u] == block[u]) && (count[u] == H5S_UNLIMITED)));
+ assert((stride[u] > block[u]) ||
+ ((stride[u] == block[u]) && (count[u] == H5S_UNLIMITED)));
int_stride[u] = stride[u];
} /* end else */
int_count[u] = count[u];
@@ -10117,7 +10117,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
"cannot modify unlimited selection with another unlimited selection")
if (!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTA)))
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection")
- HDassert(space->select.sel_info.hslab->diminfo_valid);
+ assert(space->select.sel_info.hslab->diminfo_valid);
/* Clip unlimited selection to include new selection */
if (H5S_hyper_clip_unlim(space,
@@ -10128,7 +10128,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection")
/* If an empty space was returned it must be "none" */
- HDassert((space->select.num_elem > (hsize_t)0) || (space->select.type->type == H5S_SEL_NONE));
+ assert((space->select.num_elem > (hsize_t)0) || (space->select.type->type == H5S_SEL_NONE));
} /* end if */
/* Fixup operation for non-hyperslab selections */
@@ -10234,7 +10234,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
hbool_t single_block; /* Whether the selection is a single block */
/* Sanity check */
- HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
+ assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
/* Handle unlimited selections */
if (unlim_dim >= 0) {
@@ -10260,14 +10260,14 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
*/
H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block,
bounds_end[unlim_dim] + (hsize_t)1);
- HDassert((tmp_count == 1) || (opt_count != H5S_hyper_ones_g));
- HDassert((tmp_block == 1) || (opt_block != H5S_hyper_ones_g));
+ assert((tmp_count == 1) || (opt_count != H5S_hyper_ones_g));
+ assert((tmp_block == 1) || (opt_block != H5S_hyper_ones_g));
if (opt_count != H5S_hyper_ones_g) {
- HDassert(opt_count == int_count);
+ assert(opt_count == int_count);
int_count[unlim_dim] = tmp_count;
} /* end if */
if (opt_block != H5S_hyper_ones_g) {
- HDassert(opt_block == int_block);
+ assert(opt_block == int_block);
int_block[unlim_dim] = tmp_block;
} /* end if */
} /* end if */
@@ -10413,12 +10413,12 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(old_space);
- HDassert(start);
- HDassert(count);
- HDassert(op >= H5S_SELECT_SET && op <= H5S_SELECT_NOTA);
- HDassert(new_space);
- HDassert(*new_space == NULL);
+ assert(old_space);
+ assert(start);
+ assert(count);
+ assert(op >= H5S_SELECT_SET && op <= H5S_SELECT_NOTA);
+ assert(new_space);
+ assert(*new_space == NULL);
/* Point to the correct stride values */
if (stride == NULL)
@@ -10603,14 +10603,14 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space1);
- HDassert(space2);
- HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
- HDassert(space1->extent.rank == space2->extent.rank);
+ assert(space1);
+ assert(space2);
+ assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
+ assert(space1->extent.rank == space2->extent.rank);
/* The result is either a to-be-created space or an empty one */
- HDassert(NULL == *result || *result == space1);
- HDassert(space1->select.sel_info.hslab->span_lst);
- HDassert(space2->select.sel_info.hslab->span_lst);
+ assert(NULL == *result || *result == space1);
+ assert(space1->select.sel_info.hslab->span_lst);
+ assert(space2->select.sel_info.hslab->span_lst);
/* Note: the offset of space2 is not considered here for bounding box */
if (H5S__fill_in_new_space(space1, op, space2->select.sel_info.hslab->span_lst, FALSE, &span2_owned,
@@ -10619,7 +10619,7 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu
/* Update diminfo if space2's diminfo was valid, otherwise just mark it as
* invalid if the spans were updated */
- HDassert(result);
+ assert(result);
if (updated_spans) {
if (space2->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
if (H5S__hyper_update_diminfo(*result, op, space2->select.sel_info.hslab->diminfo.opt) < 0)
@@ -10717,9 +10717,9 @@ H5S__combine_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space1);
- HDassert(space2);
- HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
+ assert(space1);
+ assert(space2);
+ assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
/* Check if space1 selections has span trees */
if (NULL == space1->select.sel_info.hslab->span_lst)
@@ -10858,9 +10858,9 @@ H5S__modify_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space1);
- HDassert(space2);
- HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
+ assert(space1);
+ assert(space2);
+ assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
/* Check that the space selections both have span trees */
if (NULL == space1->select.sel_info.hslab->span_lst)
@@ -11008,14 +11008,14 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
FUNC_ENTER_PACKAGE
- HDassert(udata->nelem > 0);
+ assert(udata->nelem > 0);
/*
* Skip over skipped elements
*/
if (udata->skip > 0) {
/* Work upwards, finishing each span tree before moving up */
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
do {
/* Check for lowest dimension */
if (udata->ds_span[udata->depth]->down) {
@@ -11038,11 +11038,11 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
} /* end if */
} /* end if */
else {
- HDassert(udata->ds_rank - udata->depth == 1);
+ assert(udata->ds_rank - udata->depth == 1);
/* If we will run out of elements to skip in this span,
* skip the remainder of the skipped elements and break out */
- HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
+ assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
if (udata->skip < (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) {
udata->ds_low[udata->depth] += udata->skip;
udata->skip = 0;
@@ -11073,7 +11073,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Ran out of spans, move up one dimension */
udata->depth--;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth]++;
}
else
@@ -11082,9 +11082,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
} while ((udata->skip > 0) || (udata->ds_low[udata->depth] > udata->ds_span[udata->depth]->high));
/* Work downwards until skip is 0 */
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
while (udata->skip > 0) {
- HDassert(udata->ds_span[udata->depth]->down);
+ assert(udata->ds_span[udata->depth]->down);
udata->depth++;
udata->ds_span[udata->depth] = udata->ds_span[udata->depth - 1]->down->head;
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
@@ -11108,7 +11108,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Advance to next span */
udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
} while (udata->skip > 0);
} /* end if */
@@ -11128,7 +11128,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Advance to next span */
udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
} while (udata->skip > 0);
} /* end else */
@@ -11140,7 +11140,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
*/
/* Work upwards, adding all elements of each span tree until it can't fit
* all elements */
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
do {
/* Check for lowest dimension */
if (udata->ds_span[udata->depth]->down) {
@@ -11223,11 +11223,11 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
} /* end if */
} /* end if */
else {
- HDassert(udata->ds_rank - udata->depth == 1);
+ assert(udata->ds_rank - udata->depth == 1);
/* If we will run out of elements to add in this span, add the
* remainder of the elements and break out */
- HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
+ assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
if (udata->nelem < (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) {
if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], 1, udata->ds_low[udata->depth],
udata->ds_low[udata->depth] + udata->nelem - 1, NULL) < 0)
@@ -11251,7 +11251,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
else if (udata->depth > 0) {
/* Append this span tree to the higher dimension's, and release
* ownership of it */
- HDassert(udata->ps_span_info[udata->depth]);
+ assert(udata->ps_span_info[udata->depth]);
if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth - 1],
udata->ds_rank - udata->depth + 1, udata->ds_low[udata->depth - 1],
udata->ds_low[udata->depth - 1],
@@ -11263,7 +11263,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Ran out of spans, move up one dimension */
udata->depth--;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth]++;
} /* end if */
else {
@@ -11277,9 +11277,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
} while ((udata->nelem > 0) || (udata->ds_low[udata->depth] > udata->ds_span[udata->depth]->high));
/* Work downwards until nelem is 0 */
- HDassert(udata->ds_span[udata->depth] || (udata->nelem == 0));
+ assert(udata->ds_span[udata->depth] || (udata->nelem == 0));
while (udata->nelem > 0) {
- HDassert(udata->ds_span[udata->depth]->down);
+ assert(udata->ds_span[udata->depth]->down);
udata->depth++;
udata->ds_span[udata->depth] = udata->ds_span[udata->depth - 1]->down->head;
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
@@ -11289,7 +11289,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
* any complete spans, advance to the first not fully added
* span and continue down
*/
- HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
+ assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
if (udata->nelem <
H5S__hyper_spans_nelem_helper(udata->ds_span[udata->depth]->down, 0, udata->op_gen) *
(udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) {
@@ -11364,16 +11364,16 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Advance to next span */
udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
} while (udata->nelem > 0);
} /* end if */
else {
- HDassert(udata->ds_rank - udata->depth == 1);
+ assert(udata->ds_rank - udata->depth == 1);
do {
/* If we will run out of elements to add in this span, add
* the remainder of the elements and break out */
- HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
+ assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
if (udata->nelem < (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) {
if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], 1,
udata->ds_low[udata->depth],
@@ -11392,14 +11392,14 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Advance to next span */
udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
} while (udata->nelem > 0);
} /* end else */
} /* end while */
- HDassert(udata->skip == 0);
- HDassert(udata->nelem == 0);
+ assert(udata->skip == 0);
+ assert(udata->nelem == 0);
/* Mark projected space as changed (for all ranks) */
udata->ps_clean_bitmap = 0;
@@ -11407,7 +11407,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
done:
/* Cleanup on failure */
if (copied_span_info) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5S__hyper_free_span_info(copied_span_info) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info")
copied_span_info = NULL;
@@ -11484,7 +11484,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
for (u = 0; u < count; u++) {
ss_span = ss_span_info->head;
sis_span = sis_span_info->head;
- HDassert(ss_span && sis_span);
+ assert(ss_span && sis_span);
ss_low = ss_span->low;
sis_low = sis_span->low;
@@ -11513,7 +11513,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
"can't iterate over source selections")
} /* end if */
else {
- HDassert(depth == udata->ss_rank - 1);
+ assert(depth == udata->ss_rank - 1);
/* Add skipped elements if there's a pre-gap */
if (ss_low < sis_low) {
@@ -11539,7 +11539,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
} /* end if */
else if (ss_span->high == high) {
/* Advance source span */
- HDassert(ss_span->high < sis_span->high);
+ assert(ss_span->high < sis_span->high);
sis_low = high + 1;
ss_span = ss_span->next;
if (ss_span)
@@ -11547,7 +11547,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
} /* end if */
else {
/* Advance source intersect span */
- HDassert(ss_span->high > sis_span->high);
+ assert(ss_span->high > sis_span->high);
ss_low = high + 1;
sis_span = sis_span->next;
if (sis_span)
@@ -11574,7 +11574,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
} /* end if */
else {
/* Advance source intersect span */
- HDassert(ss_low > sis_span->high);
+ assert(ss_low > sis_span->high);
sis_span = sis_span->next;
if (sis_span)
sis_low = sis_span->low;
@@ -11614,18 +11614,18 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
* first iteration of the loop, if so we do not need to continue
* looping and can just copy the result */
if (udata->ps_clean_bitmap & (((uint32_t)1) << depth)) {
- HDassert(u == 0);
+ assert(u == 0);
if (udata->skip == old_skip) {
/* First case: algorithm added only elements */
- HDassert(udata->nelem >= old_nelem);
+ assert(udata->nelem >= old_nelem);
udata->nelem += (count - 1) * (udata->nelem - old_nelem);
} /* end if */
else if (udata->nelem == 0) {
/* Second case: algorithm added only skip. In this case,
* nelem must be 0 since otherwise adding skip would have
* triggered a change in the projected space */
- HDassert(old_nelem == 0);
- HDassert(udata->skip > old_skip);
+ assert(old_nelem == 0);
+ assert(udata->skip > old_skip);
udata->skip += (count - 1) * (udata->skip - old_skip);
} /* end if */
else {
@@ -11635,9 +11635,9 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
hsize_t skip_add;
hsize_t nelem_add;
- HDassert(udata->nelem > 0);
- HDassert(udata->skip > old_skip);
- HDassert(old_nelem == 0);
+ assert(udata->nelem > 0);
+ assert(udata->skip > old_skip);
+ assert(old_nelem == 0);
skip_add = udata->skip - old_skip;
nelem_add = udata->nelem - old_nelem;
@@ -11719,18 +11719,18 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(src_space);
- HDassert(dst_space);
- HDassert(src_intersect_space);
- HDassert(proj_space);
+ assert(src_space);
+ assert(dst_space);
+ assert(src_intersect_space);
+ assert(proj_space);
/* Assert that src_space and src_intersect_space have same rank and there
* are no point selections */
- HDassert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space));
- HDassert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space));
- HDassert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_POINTS);
- HDassert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_POINTS);
- HDassert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS);
+ assert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space));
+ assert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space));
+ assert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_POINTS);
+ assert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_POINTS);
+ assert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS);
/* Set up ss_span_info */
if (H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_HYPERSLABS) {
@@ -11745,7 +11745,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
} /* end if */
else {
/* Create temporary span tree from all selection */
- HDassert(H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_ALL);
+ assert(H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_ALL);
if (NULL == (ss_span_info_buf =
H5S__hyper_make_spans(H5S_GET_EXTENT_NDIMS(src_space), H5S_hyper_zeros_g,
@@ -11767,7 +11767,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
} /* end if */
else {
/* Create temporary span tree from all selection */
- HDassert(H5S_GET_SELECT_TYPE(dst_space) == H5S_SEL_ALL);
+ assert(H5S_GET_SELECT_TYPE(dst_space) == H5S_SEL_ALL);
if (NULL == (ds_span_info_buf =
H5S__hyper_make_spans(H5S_GET_EXTENT_NDIMS(dst_space), H5S_hyper_zeros_g,
@@ -11784,7 +11784,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Initialize udata */
/* We will use op_info[0] for nelem and op_info[1] for copied spans */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
udata.ds_span[0] = ds_span_info->head;
udata.ds_low[0] = udata.ds_span[0]->low;
udata.ss_rank = H5S_GET_EXTENT_NDIMS(src_space);
@@ -11865,7 +11865,7 @@ done:
unsigned u;
for (u = 0; u < H5S_MAX_RANK; u++)
- HDassert(!udata.ps_span_info[u]);
+ assert(!udata.ps_span_info[u]);
}
#endif /* NDEBUG */
@@ -11915,11 +11915,11 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, hsize
*count = (hsize_t)1;
} /* end if */
else {
- HDassert(*count == H5S_UNLIMITED);
+ assert(*count == H5S_UNLIMITED);
/* Calculate initial count (last block may be partial) */
*count = (clip_size - start + stride - (hsize_t)1) / stride;
- HDassert(*count > (hsize_t)0);
+ assert(*count > (hsize_t)0);
} /* end else */
FUNC_LEAVE_NOAPI_VOID
@@ -11958,11 +11958,11 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
FUNC_ENTER_NOAPI(FAIL)
/* Check parameters */
- HDassert(space);
+ assert(space);
hslab = space->select.sel_info.hslab;
- HDassert(hslab);
- HDassert(hslab->unlim_dim >= 0);
- HDassert(!hslab->span_lst);
+ assert(hslab);
+ assert(hslab->unlim_dim >= 0);
+ assert(!hslab->span_lst);
/* Save original unlimited dimension */
orig_unlim_dim = hslab->unlim_dim;
@@ -12003,7 +12003,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
/* Check if last block is partial. If superset is set, just keep the
* last block complete to speed computation. */
- HDassert(clip_size > diminfo->start);
+ assert(clip_size > diminfo->start);
if (((diminfo->stride * (diminfo->count - (hsize_t)1)) + diminfo->block) >
(clip_size - diminfo->start)) {
hsize_t start[H5S_MAX_RANK];
@@ -12012,7 +12012,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
/* Last block is partial, need to construct compound selection */
/* Fill start with zeros */
- HDmemset(start, 0, sizeof(start));
+ memset(start, 0, sizeof(start));
/* Set block to clip_size in unlimited dimension, H5S_MAX_SIZE in
* others so only unlimited dimension is clipped */
@@ -12089,9 +12089,9 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbo
FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
- HDassert(clip_space);
- HDassert(clip_space->select.sel_info.hslab);
- HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
+ assert(clip_space);
+ assert(clip_space->select.sel_info.hslab);
+ assert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
diminfo = &clip_space->select.sel_info.hslab->diminfo.opt[clip_space->select.sel_info.hslab->unlim_dim];
@@ -12104,7 +12104,7 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbo
else {
/* Unlimited count, need to match extent so a block (possibly) gets cut
* off so the number of slices matches num_slices */
- HDassert(diminfo->count == H5S_UNLIMITED);
+ assert(diminfo->count == H5S_UNLIMITED);
/* Calculate number of complete blocks in clip_space */
count = num_slices / diminfo->block;
@@ -12156,20 +12156,20 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, hbo
FUNC_ENTER_NOAPI_NOERR
/* Check parameters */
- HDassert(clip_space);
- HDassert(match_space);
- HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
+ assert(clip_space);
+ assert(match_space);
+ assert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
/* Check for "none" match space */
if (match_space->select.type->type == H5S_SEL_NONE)
num_slices = (hsize_t)0;
else {
- HDassert(match_space->select.type->type == H5S_SEL_HYPERSLABS);
- HDassert(match_space->select.sel_info.hslab);
+ assert(match_space->select.type->type == H5S_SEL_HYPERSLABS);
+ assert(match_space->select.sel_info.hslab);
/* Calculate number of slices */
num_slices = match_space->select.num_elem / clip_space->select.sel_info.hslab->num_elem_non_unlim;
- HDassert((match_space->select.num_elem % clip_space->select.sel_info.hslab->num_elem_non_unlim) == 0);
+ assert((match_space->select.num_elem % clip_space->select.sel_info.hslab->num_elem_non_unlim) == 0);
} /* end else */
/* Call "real" get_clip_extent function */
@@ -12213,14 +12213,14 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_spac
FUNC_ENTER_NOAPI_NOERR
/* Check parameters */
- HDassert(clip_space);
- HDassert(match_space);
- HDassert(clip_space->select.sel_info.hslab);
- HDassert(match_space->select.sel_info.hslab);
- HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
- HDassert(match_space->select.sel_info.hslab->unlim_dim >= 0);
- HDassert(clip_space->select.sel_info.hslab->num_elem_non_unlim ==
- match_space->select.sel_info.hslab->num_elem_non_unlim);
+ assert(clip_space);
+ assert(match_space);
+ assert(clip_space->select.sel_info.hslab);
+ assert(match_space->select.sel_info.hslab);
+ assert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
+ assert(match_space->select.sel_info.hslab->unlim_dim >= 0);
+ assert(clip_space->select.sel_info.hslab->num_elem_non_unlim ==
+ match_space->select.sel_info.hslab->num_elem_non_unlim);
match_diminfo =
&match_space->select.sel_info.hslab->diminfo.opt[match_space->select.sel_info.hslab->unlim_dim];
@@ -12242,12 +12242,12 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_spac
num_slices = block * count;
/* Check for partial last block */
- HDassert(match_clip_size >= match_diminfo->start);
+ assert(match_clip_size >= match_diminfo->start);
if (((match_diminfo->stride * (count - (hsize_t)1)) + block) >
(match_clip_size - match_diminfo->start)) {
/* Subtract slices missing from last block */
- HDassert((((match_diminfo->stride * (count - (hsize_t)1)) + block) -
- (match_clip_size - match_diminfo->start)) < num_slices);
+ assert((((match_diminfo->stride * (count - (hsize_t)1)) + block) -
+ (match_clip_size - match_diminfo->start)) < num_slices);
num_slices -= ((match_diminfo->stride * (count - (hsize_t)1)) + block) -
(match_clip_size - match_diminfo->start);
} /* end if */
@@ -12296,11 +12296,11 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index)
FUNC_ENTER_NOAPI(NULL)
/* Check parameters */
- HDassert(space);
+ assert(space);
hslab = space->select.sel_info.hslab;
- HDassert(hslab);
- HDassert(hslab->unlim_dim >= 0);
- HDassert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED);
+ assert(hslab);
+ assert(hslab->unlim_dim >= 0);
+ assert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED);
/* Set start to select block_indexth block in unlimited dimension and set
* count to 1 in that dimension to only select that block. Copy all other
@@ -12374,11 +12374,11 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *pa
FUNC_ENTER_NOAPI_NOERR
/* Check parameters */
- HDassert(space);
+ assert(space);
hslab = space->select.sel_info.hslab;
- HDassert(hslab);
- HDassert(hslab->unlim_dim >= 0);
- HDassert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED);
+ assert(hslab);
+ assert(hslab->unlim_dim >= 0);
+ assert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED);
diminfo = &hslab->diminfo.opt[hslab->unlim_dim];
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index c1465d0..417ade6 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -126,7 +126,7 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
+ assert(space);
/* Just treat the entire extent as a block of bytes */
if ((snelmts = (hssize_t)H5S_GET_EXTENT_NPOINTS(space)) < 0)
@@ -380,7 +380,7 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
+ assert(space);
/* Get the total number of points selected */
if ((snum_points = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0)
@@ -520,7 +520,7 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
+ assert(space);
/* Get the total number of points selected */
if ((snum_points = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0)
@@ -681,8 +681,8 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(sizeof(MPI_Aint) >= sizeof(elmt_size));
+ assert(space);
+ assert(sizeof(MPI_Aint) >= sizeof(elmt_size));
bigio_count = H5_mpi_get_bigio_count();
@@ -697,7 +697,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
/* Abbreviate args */
diminfo = sel_iter->u.hyp.diminfo;
- HDassert(diminfo);
+ assert(diminfo);
/* Make a local copy of the dimension info so we can operate with them */
@@ -707,7 +707,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
rank = sel_iter->u.hyp.iter_rank;
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "%s: Flattened selection\n", __func__);
+ fprintf(H5DEBUG(S), "%s: Flattened selection\n", __func__);
#endif
for (u = 0; u < rank; ++u) {
H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t)
@@ -719,21 +719,21 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S),
- "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
- " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
- __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
+ fprintf(H5DEBUG(S),
+ "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
+ " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
+ __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
if (u == 0)
- HDfprintf(H5DEBUG(S), " rank=%u\n", rank);
+ fprintf(H5DEBUG(S), " rank=%u\n", rank);
else
- HDfprintf(H5DEBUG(S), "\n");
+ fprintf(H5DEBUG(S), "\n");
}
#endif
/* Sanity check */
- HDassert(d[u].block > 0);
- HDassert(d[u].count > 0);
- HDassert(d[u].xtent > 0);
+ assert(d[u].block > 0);
+ assert(d[u].count > 0);
+ assert(d[u].xtent > 0);
} /* end for */
} /* end if */
else {
@@ -741,7 +741,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
rank = space->extent.rank;
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "%s: Non-flattened selection\n", __func__);
+ fprintf(H5DEBUG(S), "%s: Non-flattened selection\n", __func__);
#endif
for (u = 0; u < rank; ++u) {
H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t)
@@ -753,21 +753,21 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S),
- "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
- " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
- __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
+ fprintf(H5DEBUG(S),
+ "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
+ " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
+ __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
if (u == 0)
- HDfprintf(H5DEBUG(S), " rank=%u\n", rank);
+ fprintf(H5DEBUG(S), " rank=%u\n", rank);
else
- HDfprintf(H5DEBUG(S), "\n");
+ fprintf(H5DEBUG(S), "\n");
}
#endif
/* Sanity check */
- HDassert(d[u].block > 0);
- HDassert(d[u].count > 0);
- HDassert(d[u].xtent > 0);
+ assert(d[u].block > 0);
+ assert(d[u].count > 0);
+ assert(d[u].xtent > 0);
} /* end for */
} /* end else */
@@ -780,8 +780,8 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
i = ((int)rank) - 1;
- HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i,
- max_xtent[i]);
+ fprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i,
+ max_xtent[i]);
}
#endif
for (i = ((int)rank) - 2; i >= 0; --i) {
@@ -789,8 +789,8 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
max_xtent[i] = max_xtent[i + 1] * d[i].xtent;
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i,
- offset[i], i, max_xtent[i]);
+ fprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i],
+ i, max_xtent[i]);
#endif
} /* end for */
@@ -805,9 +805,9 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
*******************************************************/
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", __func__, elmt_size);
+ fprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", __func__, elmt_size);
for (i = ((int)rank) - 1; i >= 0; --i)
- HDfprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent);
+ fprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent);
}
#endif
@@ -835,16 +835,16 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
for (i = ((int)rank) - 1; i >= 0; --i) {
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S),
- "%s: Dimension i=%d \n"
- "start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " stride=%" PRIuHSIZE
- ", xtent=%" PRIuHSIZE " max_xtent=%" PRIuHSIZE "\n",
- __func__, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]);
+ fprintf(H5DEBUG(S),
+ "%s: Dimension i=%d \n"
+ "start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " stride=%" PRIuHSIZE
+ ", xtent=%" PRIuHSIZE " max_xtent=%" PRIuHSIZE "\n",
+ __func__, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]);
#endif
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", __func__, i);
+ fprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", __func__, i);
#endif
/****************************************
* Build vector type of the selection.
@@ -943,7 +943,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
MPI_Datatype interm_type;
int block_len = 1;
- HDassert(0 == lb);
+ assert(0 == lb);
mpi_code = MPI_Type_create_hindexed(1, &block_len, &start_disp, outer_type, &interm_type);
MPI_Type_free(&outer_type);
@@ -981,8 +981,8 @@ done:
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", __func__, *count,
- (*is_derived_type) ? "TRUE" : "FALSE");
+ fprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", __func__, *count,
+ (*is_derived_type) ? "TRUE" : "FALSE");
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__mpio_reg_hyper_type() */
@@ -1021,10 +1021,10 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(space->extent.size);
- HDassert(space->select.sel_info.hslab->span_lst);
- HDassert(space->select.sel_info.hslab->span_lst->head);
+ assert(space);
+ assert(space->extent.size);
+ assert(space->select.sel_info.hslab->span_lst);
+ assert(space->select.sel_info.hslab->span_lst->head);
bigio_count = H5_mpi_get_bigio_count();
/* Create the base type for an element */
@@ -1092,7 +1092,7 @@ H5S__release_datatype(H5S_mpio_mpitype_list_t *type_list)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type_list);
+ assert(type_list);
/* Iterate over the list, freeing the MPI data types */
curr = type_list->head;
@@ -1151,8 +1151,8 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(spans);
- HDassert(type_list);
+ assert(spans);
+ assert(type_list);
bigio_count = H5_mpi_get_bigio_count();
/* Check if we've visited this span tree before */
@@ -1396,8 +1396,8 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(space);
- HDassert(elmt_size);
+ assert(space);
+ assert(elmt_size);
/* Create MPI type based on the kind of selection */
switch (H5S_GET_EXTENT_TYPE(space)) {
@@ -1420,7 +1420,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
case H5S_SEL_POINTS:
case H5S_SEL_HYPERSLABS:
/* Sanity check */
- HDassert(!do_permute);
+ assert(!do_permute);
if (H5S__mpio_permute_type(space, elmt_size, permute_map, new_type, count,
is_derived_type) < 0)
@@ -1431,7 +1431,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert("unknown selection type" && 0);
+ assert("unknown selection type" && 0);
break;
} /* end switch */
} /* end if */
@@ -1473,7 +1473,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert("unknown selection type" && 0);
+ assert("unknown selection type" && 0);
break;
} /* end switch */
} /* end else */
@@ -1481,7 +1481,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace type" && 0);
+ assert("unknown dataspace type" && 0);
break;
} /* end switch */
diff --git a/src/H5Snone.c b/src/H5Snone.c
index c6e862c..f7f0b8a 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -148,8 +148,8 @@ H5S__none_iter_init(H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
- HDassert(iter);
+ assert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
+ assert(iter);
/* Initialize type of selection iterator */
iter->type = H5S_sel_iter_none;
@@ -176,8 +176,8 @@ H5S__none_iter_coords(const H5S_sel_iter_t H5_ATTR_UNUSED *iter, hsize_t H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(coords);
+ assert(iter);
+ assert(coords);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_iter_coords() */
@@ -202,9 +202,9 @@ H5S__none_iter_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter, hsize_t H5_ATTR_
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(start);
- HDassert(end);
+ assert(iter);
+ assert(start);
+ assert(end);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_iter_block() */
@@ -227,7 +227,7 @@ H5S__none_iter_nelmts(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(0)
} /* end H5S__none_iter_nelmts() */
@@ -255,7 +255,7 @@ H5S__none_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_iter_has_next_block() */
@@ -284,8 +284,8 @@ H5S__none_iter_next(H5S_sel_iter_t H5_ATTR_UNUSED *iter, size_t H5_ATTR_UNUSED n
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(nelem > 0);
+ assert(iter);
+ assert(nelem > 0);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_iter_next() */
@@ -313,7 +313,7 @@ H5S__none_iter_next_block(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_iter_next_block() */
@@ -355,13 +355,13 @@ H5S__none_iter_get_seq_list(H5S_sel_iter_t H5_ATTR_UNUSED *iter, size_t H5_ATTR_
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* "none" selections don't generate sequences of bytes */
*nseq = 0;
@@ -395,7 +395,7 @@ H5S__none_iter_release(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_iter_release() */
@@ -423,7 +423,7 @@ H5S__none_release(H5S_t H5_ATTR_UNUSED *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_release() */
@@ -453,8 +453,8 @@ H5S__none_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUS
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Set number of elements in selection */
dst->select.num_elem = 0;
@@ -487,7 +487,7 @@ H5S__none_is_valid(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__none_is_valid() */
@@ -516,7 +516,7 @@ H5S__none_serial_size(H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Basic number of bytes required to serialize point selection:
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
@@ -554,9 +554,9 @@ H5S__none_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(p);
- HDassert(pp);
+ assert(space);
+ assert(p);
+ assert(pp);
/* Store the preamble information */
UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
@@ -603,8 +603,8 @@ H5S__none_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbo
FUNC_ENTER_PACKAGE
- HDassert(p);
- HDassert(*p);
+ assert(p);
+ assert(*p);
/* As part of the efforts to push all selection-type specific coding
to the callbacks, the coding for the allocation of a null dataspace
@@ -679,9 +679,9 @@ H5S__none_bounds(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *star
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S_none_bounds() */
@@ -711,8 +711,8 @@ H5S__none_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *offs
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_offset() */
@@ -767,7 +767,7 @@ H5S__none_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(FALSE)
} /* end H5S__none_is_contiguous() */
@@ -795,7 +795,7 @@ H5S__none_is_single(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(FALSE)
} /* end H5S__none_is_single() */
@@ -825,7 +825,7 @@ H5S__none_is_regular(H5S_t H5_ATTR_UNUSED *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__none_is_regular() */
@@ -855,8 +855,8 @@ H5S__none_shape_same(H5S_t H5_ATTR_UNUSED *space1, H5S_t H5_ATTR_UNUSED *space2)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__none_shape_same() */
@@ -887,10 +887,10 @@ H5S__none_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
+ assert(start);
+ assert(end);
FUNC_LEAVE_NOAPI(FALSE)
} /* end H5S__none_intersect_block() */
@@ -919,8 +919,8 @@ H5S__none_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *of
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_adjust_u() */
@@ -949,8 +949,8 @@ H5S__none_adjust_s(H5S_t H5_ATTR_UNUSED *space, const hssize_t H5_ATTR_UNUSED *o
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_adjust_s() */
@@ -973,8 +973,8 @@ H5S__none_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUS
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
- HDassert(offset);
+ assert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
+ assert(offset);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_project_scalar() */
@@ -1001,9 +1001,9 @@ H5S__none_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_spac
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(offset);
+ assert(base_space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(offset);
/* Select the entire new space */
if (H5S_select_none(new_space) < 0)
@@ -1038,7 +1038,7 @@ H5S_select_none(H5S_t *space)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
+ assert(space);
/* Remove current selection first */
if (H5S_SELECT_RELEASE(space) < 0)
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 5233946..d9a7e1e 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -176,8 +176,8 @@ H5S__point_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
- HDassert(iter);
+ assert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
+ assert(iter);
/* If this iterator is created from an API call, by default we clone the
* selection now, as the dataspace could be modified or go out of scope.
@@ -227,8 +227,8 @@ H5S__point_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(coords);
+ assert(iter);
+ assert(coords);
/* Copy the offset of the current point */
H5MM_memcpy(coords, iter->u.pnt.curr->pnt, sizeof(hsize_t) * iter->rank);
@@ -255,9 +255,9 @@ H5S__point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(start);
- HDassert(end);
+ assert(iter);
+ assert(start);
+ assert(end);
/* Copy the current point as a block */
H5MM_memcpy(start, iter->u.pnt.curr->pnt, sizeof(hsize_t) * iter->rank);
@@ -284,7 +284,7 @@ H5S__point_iter_nelmts(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* end H5S__point_iter_nelmts() */
@@ -314,7 +314,7 @@ H5S__point_iter_has_next_block(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
/* Check if there is another point in the list */
if (iter->u.pnt.curr->next == NULL)
@@ -348,8 +348,8 @@ H5S__point_iter_next(H5S_sel_iter_t *iter, size_t nelem)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(nelem > 0);
+ assert(iter);
+ assert(nelem > 0);
/* Increment the iterator */
while (nelem > 0) {
@@ -383,7 +383,7 @@ H5S__point_iter_next_block(H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
/* Increment the iterator */
iter->u.pnt.curr = iter->u.pnt.curr->next;
@@ -437,13 +437,13 @@ H5S__point_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Choose the minimum number of bytes to sequence through */
H5_CHECK_OVERFLOW(iter->elmt_left, hsize_t, size_t);
@@ -544,7 +544,7 @@ H5S__point_iter_release(H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
/* If this iterator copied the point list, we must free it */
if ((iter->flags & H5S_SEL_ITER_API_CALL) && !(iter->flags & H5S_SEL_ITER_SHARE_WITH_DATASPACE))
@@ -582,10 +582,10 @@ H5S__point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *c
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(space);
- HDassert(num_elem > 0);
- HDassert(coord);
- HDassert(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND);
+ assert(space);
+ assert(num_elem > 0);
+ assert(coord);
+ assert(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND);
for (u = 0; u < num_elem; u++) {
unsigned dim; /* Counter for dimensions */
@@ -640,7 +640,7 @@ H5S__point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *c
tmp_node = space->select.sel_info.pnt_lst->head;
if (tmp_node != NULL) {
- HDassert(space->select.sel_info.pnt_lst->tail);
+ assert(space->select.sel_info.pnt_lst->tail);
space->select.sel_info.pnt_lst->tail->next = top;
} /* end if */
else
@@ -694,7 +694,7 @@ H5S__point_release(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Free the point list */
H5S__free_pnt_list(space->select.sel_info.pnt_lst);
@@ -743,10 +743,10 @@ H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
- HDassert(num_elem);
- HDassert(coord);
- HDassert(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND);
+ assert(space);
+ assert(num_elem);
+ assert(coord);
+ assert(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND);
/* If we are setting a new selection, remove current selection first */
if (op == H5S_SELECT_SET || H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS)
@@ -763,7 +763,7 @@ H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize
/* Set the bound box to the default value */
H5VM_array_fill(space->select.sel_info.pnt_lst->low_bounds, &tmp, sizeof(hsize_t),
space->extent.rank);
- HDmemset(space->select.sel_info.pnt_lst->high_bounds, 0, sizeof(hsize_t) * space->extent.rank);
+ memset(space->select.sel_info.pnt_lst->high_bounds, 0, sizeof(hsize_t) * space->extent.rank);
}
/* Add points to selection */
@@ -806,8 +806,8 @@ H5S__copy_pnt_list(const H5S_pnt_list_t *src, unsigned rank)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(src);
- HDassert(rank > 0);
+ assert(src);
+ assert(rank > 0);
/* Allocate room for the head of the point list */
if (NULL == (dst = H5FL_MALLOC(H5S_pnt_list_t)))
@@ -881,7 +881,7 @@ H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pnt_lst);
+ assert(pnt_lst);
/* Traverse the list, freeing all memory */
curr = pnt_lst->head;
@@ -925,8 +925,8 @@ H5S__point_copy(H5S_t *dst, const H5S_t *src, hbool_t H5_ATTR_UNUSED share_selec
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Allocate room for the head of the point list */
if (NULL ==
@@ -965,7 +965,7 @@ H5S__point_is_valid(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Check each dimension */
for (u = 0; u < space->extent.rank; u++) {
@@ -1065,7 +1065,7 @@ H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t *
FUNC_ENTER_PACKAGE
/* Get bounding box for the selection */
- HDmemset(bounds_end, 0, sizeof(bounds_end));
+ memset(bounds_end, 0, sizeof(bounds_end));
if (H5S__point_bounds(space, bounds_start, bounds_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds")
@@ -1166,7 +1166,7 @@ H5S__point_serial_size(H5S_t *space)
FUNC_ENTER_PACKAGE
- HDassert(space);
+ assert(space);
/* Determine the version and encoded size for point selection */
if (H5S__point_get_version_enc_size(space, &version, &enc_size) < 0)
@@ -1232,10 +1232,10 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(p);
+ assert(space);
+ assert(p);
pp = (*p);
- HDassert(pp);
+ assert(pp);
/* Determine the version and encoded size for point selection info */
if (H5S__point_get_version_enc_size(space, &version, &enc_size) < 0)
@@ -1249,7 +1249,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
*(pp)++ = enc_size; /* Store size of point info */
}
else {
- HDassert(version == H5S_POINT_VERSION_1);
+ assert(version == H5S_POINT_VERSION_1);
UINT32ENCODE(pp, (uint32_t)0); /* Store the un-used padding */
lenp = pp; /* Keep the pointer to the length location for later */
pp += 4; /* Skip over space for length */
@@ -1261,7 +1261,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
switch (enc_size) {
case H5S_SELECT_INFO_ENC_SIZE_2:
- HDassert(version == H5S_POINT_VERSION_2);
+ assert(version == H5S_POINT_VERSION_2);
/* Encode number of elements */
UINT16ENCODE(pp, (uint16_t)space->select.num_elem);
@@ -1277,7 +1277,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
break;
case H5S_SELECT_INFO_ENC_SIZE_4:
- HDassert(version == H5S_POINT_VERSION_1 || version == H5S_POINT_VERSION_2);
+ assert(version == H5S_POINT_VERSION_1 || version == H5S_POINT_VERSION_2);
/* Encode number of elements */
UINT32ENCODE(pp, (uint32_t)space->select.num_elem);
@@ -1297,7 +1297,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
break;
case H5S_SELECT_INFO_ENC_SIZE_8:
- HDassert(version == H5S_POINT_VERSION_2);
+ assert(version == H5S_POINT_VERSION_2);
/* Encode number of elements */
UINT64ENCODE(pp, space->select.num_elem);
@@ -1370,9 +1370,9 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(p);
+ assert(p);
pp = (*p);
- HDassert(pp);
+ assert(pp);
/* As part of the efforts to push all selection-type specific coding
to the callbacks, the coding for the allocation of a null dataspace
@@ -1419,7 +1419,7 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
if (!*space) {
/* Patch the rank of the allocated dataspace */
- (void)HDmemset(dims, 0, (size_t)rank * sizeof(dims[0]));
+ (void)memset(dims, 0, (size_t)rank * sizeof(dims[0]));
if (H5S_set_extent_simple(tmp_space, rank, dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions")
} /* end if */
@@ -1564,8 +1564,8 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(buf);
+ assert(space);
+ assert(buf);
/* Get the dataspace extent rank */
rank = space->extent.rank;
@@ -1688,15 +1688,15 @@ H5S__point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
/* Loop over dimensions */
for (u = 0; u < space->extent.rank; u++) {
/* Sanity check */
- HDassert(space->select.sel_info.pnt_lst->low_bounds[u] <=
- space->select.sel_info.pnt_lst->high_bounds[u]);
+ assert(space->select.sel_info.pnt_lst->low_bounds[u] <=
+ space->select.sel_info.pnt_lst->high_bounds[u]);
/* Check for offset moving selection negative */
if (((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] + space->select.offset[u]) < 0)
@@ -1745,8 +1745,8 @@ H5S__point_offset(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_PACKAGE
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Start at linear offset 0 */
*offset = 0;
@@ -1832,7 +1832,7 @@ H5S__point_is_contiguous(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* One point is definitely contiguous */
if (space->select.num_elem == 1)
@@ -1869,7 +1869,7 @@ H5S__point_is_single(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* One point is definitely 'single' :-) */
if (space->select.num_elem == 1)
@@ -1909,7 +1909,7 @@ H5S__point_is_regular(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Only simple check for regular points for now... */
if (space->select.num_elem == 1)
@@ -1953,16 +1953,16 @@ H5S__point_shape_same(H5S_t *space1, H5S_t *space2)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
/* Get dataspace ranks */
space1_rank = space1->extent.rank;
space2_rank = space2->extent.rank;
/* Sanity check */
- HDassert(space1_rank >= space2_rank);
- HDassert(space2_rank > 0);
+ assert(space1_rank >= space2_rank);
+ assert(space2_rank > 0);
/* Initialize dimensions */
space1_dim = (int)space1_rank - 1;
@@ -2054,10 +2054,10 @@ H5S__point_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
+ assert(start);
+ assert(end);
/* Loop over points */
pnt = space->select.sel_info.pnt_lst->head;
@@ -2109,8 +2109,8 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
@@ -2128,7 +2128,7 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
/* Adjust each coordinate for point node */
for (u = 0; u < rank; u++) {
/* Check for offset moving selection negative */
- HDassert(node->pnt[u] >= offset[u]);
+ assert(node->pnt[u] >= offset[u]);
/* Adjust node's coordinate location */
node->pnt[u] -= offset[u];
@@ -2176,8 +2176,8 @@ H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
@@ -2195,7 +2195,7 @@ H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
/* Adjust each coordinate for point node */
for (u = 0; u < rank; u++) {
/* Check for offset moving selection negative */
- HDassert((hssize_t)node->pnt[u] >= offset[u]);
+ assert((hssize_t)node->pnt[u] >= offset[u]);
/* Adjust node's coordinate location */
node->pnt[u] = (hsize_t)((hssize_t)node->pnt[u] - offset[u]);
@@ -2207,7 +2207,7 @@ H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
/* update the bound box of the selection */
for (u = 0; u < rank; u++) {
- HDassert((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] >= offset[u]);
+ assert((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] >= offset[u]);
space->select.sel_info.pnt_lst->low_bounds[u] =
(hsize_t)((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] - offset[u]);
space->select.sel_info.pnt_lst->high_bounds[u] =
@@ -2240,8 +2240,8 @@ H5S__point_project_scalar(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
- HDassert(offset);
+ assert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
+ assert(offset);
/* Get the head of the point list */
node = space->select.sel_info.pnt_lst->head;
@@ -2284,9 +2284,9 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(offset);
+ assert(base_space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(offset);
/* We are setting a new selection, remove any current selection in new dataspace */
if (H5S_SELECT_RELEASE(new_space) < 0)
@@ -2304,7 +2304,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
rank_diff = base_space->extent.rank - new_space->extent.rank;
/* Calculate offset of selection in projected buffer */
- HDmemset(block, 0, sizeof(block));
+ memset(block, 0, sizeof(block));
H5MM_memcpy(block, base_space->select.sel_info.pnt_lst->head->pnt, sizeof(hsize_t) * rank_diff);
*offset = H5VM_array_offset(base_space->extent.rank, base_space->extent.size, block);
@@ -2342,7 +2342,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
} /* end for */
} /* end if */
else {
- HDassert(new_space->extent.rank > base_space->extent.rank);
+ assert(new_space->extent.rank > base_space->extent.rank);
/* Compute the difference in ranks */
rank_diff = new_space->extent.rank - base_space->extent.rank;
@@ -2360,7 +2360,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
new_node->next = NULL;
/* Copy over the point's coordinates */
- HDmemset(new_node->pnt, 0, sizeof(hsize_t) * rank_diff);
+ memset(new_node->pnt, 0, sizeof(hsize_t) * rank_diff);
H5MM_memcpy(&new_node->pnt[rank_diff], base_node->pnt,
(base_space->extent.rank * sizeof(hsize_t)));
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 28c30ea..37f2192 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -95,9 +95,9 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(0 < space->extent.rank && space->extent.rank <= H5S_MAX_RANK);
- HDassert(offset);
+ assert(space);
+ assert(0 < space->extent.rank && space->extent.rank <= H5S_MAX_RANK);
+ assert(offset);
/* Copy the offset over */
H5MM_memcpy(space->select.offset, offset, sizeof(hssize_t) * space->extent.rank);
@@ -228,8 +228,8 @@ H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(dst);
- HDassert(src);
+ assert(dst);
+ assert(src);
/* Release the current selection */
if (H5S_SELECT_RELEASE(dst) < 0)
@@ -269,7 +269,7 @@ H5S_select_release(H5S_t *ds)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(ds);
+ assert(ds);
/* Call the selection type's release function */
if ((ds->select.type) && ((ret_value = (*ds->select.type->release)(ds)) < 0))
@@ -303,7 +303,7 @@ H5S_select_serial_size(H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(space);
+ assert(space);
/* Call the selection type's serial_size function */
ret_value = (*space->select.type->serial_size)(space);
@@ -342,8 +342,8 @@ H5S_select_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(space);
- HDassert(p);
+ assert(space);
+ assert(p);
/* Call the selection type's serialize function */
ret_value = (*space->select.type->serialize)(space, p);
@@ -413,7 +413,7 @@ H5S_get_select_npoints(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(space->select.num_elem)
} /* end H5S_get_select_npoints() */
@@ -487,7 +487,7 @@ H5S_select_valid(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->is_valid)(space);
@@ -529,7 +529,7 @@ H5S_select_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size)
hbool_t skip = (p_size == SIZE_MAX ? TRUE : FALSE); /* If p_size is unknown, skip buffer checks */
FUNC_ENTER_NOAPI(FAIL)
- HDassert(space);
+ assert(space);
/* Selection-type specific coding is moved to the callbacks. */
@@ -653,9 +653,9 @@ H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
ret_value = (*space->select.type->bounds)(space, start, end);
@@ -693,8 +693,8 @@ H5S_get_select_offset(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
ret_value = (*space->select.type->offset)(space, offset);
@@ -731,7 +731,7 @@ H5S_get_select_unlim_dim(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->unlim_dim)(space);
@@ -766,8 +766,8 @@ H5S_get_select_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unli
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
- HDassert(num_elem_non_unlim);
+ assert(space);
+ assert(num_elem_non_unlim);
/* Check for selection callback */
if (!space->select.type->num_elem_non_unlim)
@@ -811,7 +811,7 @@ H5S_select_is_contiguous(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->is_contiguous)(space);
@@ -847,7 +847,7 @@ H5S_select_is_single(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->is_single)(space);
@@ -883,7 +883,7 @@ H5S_select_is_regular(H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->is_regular)(space);
@@ -919,8 +919,8 @@ H5S_select_adjust_u(H5S_t *space, const hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Perform operation */
ret_value = (*space->select.type->adjust_u)(space, offset);
@@ -957,8 +957,8 @@ H5S_select_adjust_s(H5S_t *space, const hssize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Perform operation */
ret_value = (*space->select.type->adjust_s)(space, offset);
@@ -1045,8 +1045,8 @@ H5S_select_project_scalar(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
ret_value = (*space->select.type->project_scalar)(space, offset);
@@ -1084,9 +1084,9 @@ H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(new_space);
- HDassert(offset);
+ assert(space);
+ assert(new_space);
+ assert(offset);
ret_value = (*space->select.type->project_simple)(space, new_space, offset);
@@ -1119,8 +1119,8 @@ H5S_select_iter_init(H5S_sel_iter_t *sel_iter, H5S_t *space, size_t elmt_size, u
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(sel_iter);
- HDassert(space);
+ assert(sel_iter);
+ assert(space);
/* Initialize common information */
@@ -1144,7 +1144,7 @@ H5S_select_iter_init(H5S_sel_iter_t *sel_iter, H5S_t *space, size_t elmt_size, u
/* Call initialization routine for selection type */
ret_value = (*space->select.type->iter_init)(space, sel_iter);
- HDassert(sel_iter->type);
+ assert(sel_iter->type);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_select_iter_init() */
@@ -1179,8 +1179,8 @@ H5S_select_iter_coords(const H5S_sel_iter_t *sel_iter, hsize_t *coords)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(sel_iter);
- HDassert(coords);
+ assert(sel_iter);
+ assert(coords);
/* Call iter_coords routine for selection type */
ret_value = (*sel_iter->type->iter_coords)(sel_iter, coords);
@@ -1216,7 +1216,7 @@ H5S_select_iter_nelmts(const H5S_sel_iter_t *sel_iter)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(sel_iter);
+ assert(sel_iter);
/* Call iter_nelmts routine for selection type */
ret_value = (*sel_iter->type->iter_nelmts)(sel_iter);
@@ -1254,8 +1254,8 @@ H5S_select_iter_next(H5S_sel_iter_t *iter, size_t nelem)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(iter);
- HDassert(nelem > 0);
+ assert(iter);
+ assert(nelem > 0);
/* Call iter_next routine for selection type */
ret_value = (*iter->type->iter_next)(iter, nelem);
@@ -1292,7 +1292,7 @@ H5S_select_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelmt
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(iter);
+ assert(iter);
/* Call the selection type's get_seq_list function */
if ((ret_value = (*iter->type->iter_get_seq_list)(iter, maxseq, maxelmts, nseq, nelmts, off, len)) < 0)
@@ -1330,7 +1330,7 @@ H5S_select_iter_release(H5S_sel_iter_t *sel_iter)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(sel_iter);
+ assert(sel_iter);
/* Call selection type-specific release routine */
ret_value = (*sel_iter->type->iter_release)(sel_iter);
@@ -1384,10 +1384,10 @@ H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_ite
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(buf);
- HDassert(type);
- HDassert(space);
- HDassert(op);
+ assert(buf);
+ assert(type);
+ assert(space);
+ assert(op);
/* Get the datatype size */
if (0 == (elmt_size = H5T_get_size(type)))
@@ -1411,7 +1411,7 @@ H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_ite
if (ndims > 0) {
/* Copy the size of the space */
- HDassert(space->extent.size);
+ assert(space->extent.size);
H5MM_memcpy(space_size, space->extent.size, ndims * sizeof(hsize_t));
} /* end if */
space_size[ndims] = elmt_size;
@@ -1576,7 +1576,7 @@ H5S_get_select_type(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Set return value */
ret_value = H5S_GET_SELECT_TYPE(space);
@@ -1619,8 +1619,8 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
/* Check for different number of elements selected */
if (H5S_GET_SELECT_NPOINTS(space1) != H5S_GET_SELECT_NPOINTS(space2))
@@ -1662,8 +1662,8 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
} /* end else */
space_a_rank = space_a->extent.rank;
space_b_rank = space_b->extent.rank;
- HDassert(space_a_rank >= space_b_rank);
- HDassert(space_b_rank > 0);
+ assert(space_a_rank >= space_b_rank);
+ assert(space_b_rank > 0);
/* Get selection type for both dataspaces */
sel_a_type = H5S_GET_SELECT_TYPE(space_a);
@@ -1689,8 +1689,8 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
space_b_dim = (int)space_b_rank - 1;
while (space_b_dim >= 0) {
/* Sanity check */
- HDassert(low_a[space_a_dim] <= high_a[space_a_dim]);
- HDassert(low_a[space_b_dim] <= high_a[space_b_dim]);
+ assert(low_a[space_a_dim] <= high_a[space_a_dim]);
+ assert(low_a[space_b_dim] <= high_a[space_b_dim]);
/* Verify that the ranges are the same */
if ((high_a[space_a_dim] - low_a[space_a_dim]) != (high_b[space_b_dim] - low_b[space_b_dim]))
@@ -1704,7 +1704,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
/* Check that the rest of the ranges in space a are "flat" */
while (space_a_dim >= 0) {
/* Sanity check */
- HDassert(low_a[space_a_dim] <= high_a[space_a_dim]);
+ assert(low_a[space_a_dim] <= high_a[space_a_dim]);
/* This range should be flat to be the same in a lower dimension */
if (low_a[space_a_dim] != high_a[space_a_dim])
@@ -1939,9 +1939,9 @@ H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
/* If selections aren't "none", compare their bounds */
if (H5S_SEL_NONE != H5S_GET_SELECT_TYPE(space)) {
@@ -2091,19 +2091,19 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(base_space != NULL);
- HDassert((H5S_GET_EXTENT_TYPE(base_space) == H5S_SCALAR) ||
- (H5S_GET_EXTENT_TYPE(base_space) == H5S_SIMPLE));
- HDassert(new_space_ptr != NULL);
- HDassert((new_space_rank != 0) || (H5S_GET_SELECT_NPOINTS(base_space) <= 1));
- HDassert(new_space_rank <= H5S_MAX_RANK);
- HDassert(element_size > 0);
+ assert(base_space != NULL);
+ assert((H5S_GET_EXTENT_TYPE(base_space) == H5S_SCALAR) ||
+ (H5S_GET_EXTENT_TYPE(base_space) == H5S_SIMPLE));
+ assert(new_space_ptr != NULL);
+ assert((new_space_rank != 0) || (H5S_GET_SELECT_NPOINTS(base_space) <= 1));
+ assert(new_space_rank <= H5S_MAX_RANK);
+ assert(element_size > 0);
/* Get the extent info for the base dataspace */
if ((sbase_space_rank = H5S_get_simple_extent_dims(base_space, base_space_dims, base_space_maxdims)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimensionality of base space")
base_space_rank = (unsigned)sbase_space_rank;
- HDassert(base_space_rank != new_space_rank);
+ assert(base_space_rank != new_space_rank);
/* Check if projected space is scalar */
if (new_space_rank == 0) {
@@ -2112,7 +2112,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
/* Retrieve the number of elements selected */
if ((npoints = (hssize_t)H5S_GET_SELECT_NPOINTS(base_space)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get number of points selected")
- HDassert(npoints <= 1);
+ assert(npoints <= 1);
/* Create new scalar dataspace */
if (NULL == (new_space = H5S_create(H5S_SCALAR)))
@@ -2146,7 +2146,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to project scalar selection")
} /* end if */
else {
- HDassert(0 == npoints);
+ assert(0 == npoints);
if (H5S_select_none(new_space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't delete default selection")
@@ -2238,7 +2238,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
*/
if (H5S_GET_EXTENT_TYPE(base_space) == H5S_SIMPLE && base_space->select.offset_changed) {
if (new_space_rank > base_space_rank) {
- HDmemset(new_space->select.offset, 0, sizeof(new_space->select.offset[0]) * rank_diff);
+ memset(new_space->select.offset, 0, sizeof(new_space->select.offset[0]) * rank_diff);
H5MM_memcpy(&new_space->select.offset[rank_diff], base_space->select.offset,
sizeof(new_space->select.offset[0]) * base_space_rank);
} /* end if */
@@ -2254,7 +2254,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
/* If we have done the projection correctly, the following assertion
* should hold.
*/
- HDassert(TRUE == H5S_select_shape_same(base_space, new_space));
+ assert(TRUE == H5S_select_shape_same(base_space, new_space));
/* load the address of the new space into *new_space_ptr */
*new_space_ptr = new_space;
@@ -2316,10 +2316,10 @@ H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(fill);
- HDassert(fill_size > 0);
- HDassert(space);
- HDassert(_buf);
+ assert(fill);
+ assert(fill_size > 0);
+ assert(space);
+ assert(_buf);
/* Allocate the selection iterator */
if (NULL == (iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -2362,7 +2362,7 @@ H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf)
buf = (uint8_t *)_buf + off[curr_seq];
/* Fill each sequence in memory with fill value */
- HDassert((len[curr_seq] % fill_size) == 0);
+ assert((len[curr_seq] % fill_size) == 0);
H5VM_array_fill(buf, fill, fill_size, (len[curr_seq] / fill_size));
} /* end for */
@@ -2433,12 +2433,12 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(src_space);
- HDassert(dst_space);
- HDassert(src_intersect_space);
- HDassert(new_space_ptr);
- HDassert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space));
- HDassert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space));
+ assert(src_space);
+ assert(dst_space);
+ assert(src_intersect_space);
+ assert(new_space_ptr);
+ assert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space));
+ assert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space));
if (NULL == (ss_iter = H5FL_CALLOC(H5S_sel_iter_t)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator")
@@ -2473,8 +2473,8 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
* covered above, and the source intersect space must have the same
* rank, so it also cannot be scalar, as scalar dataspaces have a rank
* of 0. */
- HDassert(H5S_GET_EXTENT_TYPE(src_space) != H5S_SCALAR);
- HDassert(H5S_GET_EXTENT_TYPE(src_intersect_space) != H5S_SCALAR);
+ assert(H5S_GET_EXTENT_TYPE(src_space) != H5S_SCALAR);
+ assert(H5S_GET_EXTENT_TYPE(src_intersect_space) != H5S_SCALAR);
/* Check for scalar dst_space. In this case we simply check if the
* (single) point selected in src_space intersects src_intersect_space,
@@ -2487,8 +2487,8 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Get source space bounds. Should be a single point. */
if (H5S_SELECT_BOUNDS(src_space, coords_start, coords_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get source space bounds")
- HDassert(0 == HDmemcmp(coords_start, coords_end,
- H5S_GET_EXTENT_NDIMS(src_space) * sizeof(coords_start[0])));
+ assert(0 == memcmp(coords_start, coords_end,
+ H5S_GET_EXTENT_NDIMS(src_space) * sizeof(coords_start[0])));
/* Check for intersection */
if ((intersect = H5S_SELECT_INTERSECT_BLOCK(src_intersect_space, coords_start, coords_end)) < 0)
@@ -2536,7 +2536,7 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
} /* end for */
/* By this point, src_intersect_space must be a hyperslab selection */
- HDassert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS);
+ assert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS);
/* If either the source space or the destination space is a point
* selection, iterate element by element */
@@ -2561,8 +2561,8 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Iterate over points */
do {
- HDassert(ss_iter->elmt_left > 0);
- HDassert(ss_iter->elmt_left > 0);
+ assert(ss_iter->elmt_left > 0);
+ assert(ss_iter->elmt_left > 0);
/* Get SS coords */
if (H5S_SELECT_ITER_COORDS(ss_iter, coords) < 0)
@@ -2596,11 +2596,11 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
"can't advacne destination selection iterator")
ds_iter->elmt_left--;
} while (ss_iter->elmt_left > 0);
- HDassert(H5S_SELECT_ITER_NELMTS(ds_iter) == 0);
+ assert(H5S_SELECT_ITER_NELMTS(ds_iter) == 0);
} /* end if */
else {
- HDassert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_NONE);
- HDassert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_NONE);
+ assert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_NONE);
+ assert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_NONE);
/* Source and destination selections are all or hyperslab,
* intersecting selection is hyperslab. Call the hyperslab routine
@@ -2746,8 +2746,8 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(space);
- HDassert(subtract_space);
+ assert(space);
+ assert(subtract_space);
/* If either space is using the none selection, then we do not need to do
* anything */
@@ -2788,8 +2788,8 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection")
} /* end if */
- HDassert(space->select.type->type == H5S_SEL_HYPERSLABS);
- HDassert(subtract_space->select.type->type == H5S_SEL_HYPERSLABS);
+ assert(space->select.type->type == H5S_SEL_HYPERSLABS);
+ assert(subtract_space->select.type->type == H5S_SEL_HYPERSLABS);
/* Both spaces are now hyperslabs, perform the operation */
if (H5S__modify_select(space, H5S_SELECT_NOTB, subtract_space) < 0)
@@ -2980,7 +2980,7 @@ H5S_select_contig_block(H5S_t *space, hbool_t *is_contig, hsize_t *off, size_t *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(space);
+ assert(space);
/* Allocate and initialize the iterator */
if (NULL == (iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -3087,7 +3087,7 @@ H5S__sel_iter_close_cb(H5S_sel_iter_t *_sel_iter, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sel_iter);
+ assert(sel_iter);
/* Close the selection iterator object */
if (H5S_sel_iter_close(sel_iter) < 0)
@@ -3117,7 +3117,7 @@ H5S_sel_iter_close(H5S_sel_iter_t *sel_iter)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(sel_iter);
+ assert(sel_iter);
/* Call selection type-specific release routine */
if (H5S_SELECT_ITER_RELEASE(sel_iter) < 0)
diff --git a/src/H5Stest.c b/src/H5Stest.c
index 520de76..4bbbf87 100644
--- a/src/H5Stest.c
+++ b/src/H5Stest.c
@@ -87,8 +87,8 @@ H5S__get_rebuild_status_test(hid_t space_id, H5S_diminfo_valid_t *status1, H5S_d
FUNC_ENTER_PACKAGE
- HDassert(status1);
- HDassert(status2);
+ assert(status1);
+ assert(status2);
/* Get dataspace structures */
if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
@@ -134,7 +134,7 @@ H5S__get_diminfo_status_test(hid_t space_id, H5S_diminfo_valid_t *status)
FUNC_ENTER_PACKAGE
- HDassert(status);
+ assert(status);
/* Get dataspace structures */
if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
@@ -174,7 +174,7 @@ H5S__check_spans_tail_ptr(const H5S_hyper_span_info_t *span_lst)
FUNC_ENTER_PACKAGE
- HDassert(span_lst);
+ assert(span_lst);
cur_elem = span_lst->head;
while (cur_elem) {
@@ -223,7 +223,7 @@ H5S__check_points_tail_ptr(const H5S_pnt_list_t *pnt_lst)
FUNC_ENTER_PACKAGE
- HDassert(pnt_lst);
+ assert(pnt_lst);
cur_elem = pnt_lst->head;
while (cur_elem) {
@@ -268,7 +268,7 @@ H5S__check_internal_consistency(const H5S_t *space)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
+ assert(space);
if (space->select.type->type == H5S_SEL_NONE)
HGOTO_DONE(ret_value);
diff --git a/src/H5T.c b/src/H5T.c
index 9cbf546..fb4dc0e 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1394,7 +1394,7 @@ H5T_init(void)
/* Only register the default property list if it hasn't been created yet */
if (H5P_LST_DATATYPE_CREATE_ID_g == (-1)) {
/* ========== Datatype Creation Property Class Initialization ============*/
- HDassert(H5P_CLS_DATATYPE_CREATE_g != NULL);
+ assert(H5P_CLS_DATATYPE_CREATE_g != NULL);
/* Register the default datatype creation property list */
if ((H5P_LST_DATATYPE_CREATE_ID_g = H5P_create_id(H5P_CLS_DATATYPE_CREATE_g, FALSE)) < 0)
@@ -1452,8 +1452,8 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
if (H5T_STATE_IMMUTABLE == dt->shared->state) {
dt->shared->state = H5T_STATE_RDONLY;
@@ -1492,7 +1492,7 @@ H5T_top_term_package(void)
H5T_path_t *path;
path = H5T_g.path[i];
- HDassert(path);
+ assert(path);
if (path->conv.u.app_func) {
H5T__print_stats(path, &nprint /*in,out*/);
path->cdata.command = H5T_CONV_FREE;
@@ -1501,11 +1501,11 @@ H5T_top_term_package(void)
(size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function "
- "0x%016zx failed to free private data for "
- "%s (ignored)\n",
- (size_t)path->conv.u.app_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function "
+ "0x%016zx failed to free private data for "
+ "%s (ignored)\n",
+ (size_t)path->conv.u.app_func, path->name);
} /* end if */
#endif
H5E_clear_stack(NULL); /*ignore the error*/
@@ -1516,11 +1516,11 @@ H5T_top_term_package(void)
(size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function "
- "0x%016zx failed to free private data for "
- "%s (ignored)\n",
- (size_t)path->conv.u.lib_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function "
+ "0x%016zx failed to free private data for "
+ "%s (ignored)\n",
+ (size_t)path->conv.u.lib_func, path->name);
} /* end if */
#endif
H5E_clear_stack(NULL); /*ignore the error*/
@@ -1686,7 +1686,7 @@ H5T_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(0 == H5I_nmembers(H5I_DATATYPE));
+ assert(0 == H5I_nmembers(H5I_DATATYPE));
/* Destroy the datatype object id group */
n += (H5I_dec_type_ref(H5I_DATATYPE) > 0);
@@ -1711,8 +1711,8 @@ H5T__close_cb(H5T_t *dt, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
/* If this datatype is VOL-managed (i.e.: has a VOL object),
* close it through the VOL connector.
@@ -2111,7 +2111,7 @@ H5T_get_class(const H5T_t *dt, htri_t internal)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
/* Externally, a VL string is a string; internally, a VL string is a VL. */
if (internal) {
@@ -2183,8 +2183,8 @@ H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
- HDassert(cls > H5T_NO_CLASS && cls < H5T_NCLASSES);
+ assert(dt);
+ assert(cls > H5T_NO_CLASS && cls < H5T_NCLASSES);
/* Consider VL string as a string for API, as a VL for internal use. */
/* (note that this check must be performed before checking if the VL
@@ -2444,7 +2444,7 @@ H5T_get_super(const H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
if (!dt->shared->parent)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "not a derived data type");
@@ -2475,11 +2475,11 @@ H5T__register_int(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
- HDassert(name && *name);
- HDassert(src);
- HDassert(dst);
- HDassert(func);
+ assert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
+ assert(name && *name);
+ assert(src);
+ assert(dst);
+ assert(func);
/* Set up conversion function wrapper */
conv_func.is_app = FALSE;
@@ -2526,11 +2526,11 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(src);
- HDassert(dst);
- HDassert(conv);
- HDassert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
- HDassert(name && *name);
+ assert(src);
+ assert(dst);
+ assert(conv);
+ assert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
+ assert(name && *name);
if (H5T_PERS_HARD == pers) {
/* Only bother to register the path if it's not a no-op path (for this machine) */
@@ -2575,7 +2575,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
*/
for (i = 1; i < H5T_g.npaths; i++) {
old_path = H5T_g.path[i];
- HDassert(old_path);
+ assert(old_path);
/* Does the new soft conversion function apply to this path? */
if (old_path->is_hard || old_path->src->shared->type != src->shared->type ||
@@ -2586,7 +2586,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(tmp_did = H5I_register(H5I_DATATYPE, H5T_copy(old_path->dst, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"unable to register data types for conv query")
- HDmemset(&cdata, 0, sizeof cdata);
+ memset(&cdata, 0, sizeof cdata);
cdata.command = H5T_CONV_INIT;
if (conv->is_app) {
if ((conv->u.app_func)(tmp_sid, tmp_did, &cdata, (size_t)0, (size_t)0, (size_t)0, NULL, NULL,
@@ -2631,10 +2631,10 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx "
- "failed to free private data for %s (ignored)\n",
- (size_t)old_path->conv.u.app_func, old_path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx "
+ "failed to free private data for %s (ignored)\n",
+ (size_t)old_path->conv.u.app_func, old_path->name);
#endif
} /* end if */
} /* end if */
@@ -2642,10 +2642,10 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx "
- "failed to free private data for %s (ignored)\n",
- (size_t)old_path->conv.u.lib_func, old_path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx "
+ "failed to free private data for %s (ignored)\n",
+ (size_t)old_path->conv.u.lib_func, old_path->name);
#endif
} /* end if */
(void)H5T_close_real(old_path->src);
@@ -2763,7 +2763,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
if (H5T_PERS_DONTCARE == pers || H5T_PERS_SOFT == pers) {
for (i = H5T_g.nsoft - 1; i >= 0; --i) {
soft = H5T_g.soft + i;
- HDassert(soft);
+ assert(soft);
if (name && *name && HDstrcmp(name, soft->name) != 0)
continue;
if (src && src->shared->type != soft->src)
@@ -2782,7 +2782,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
/* Remove matching conversion paths, except no-op path */
for (i = H5T_g.npaths - 1; i > 0; --i) {
path = H5T_g.path[i];
- HDassert(path);
+ assert(path);
/* Not a match */
if (((H5T_PERS_SOFT == pers && path->is_hard) || (H5T_PERS_HARD == pers && !path->is_hard)) ||
@@ -2811,10 +2811,10 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx failed "
- "to free private data for %s (ignored)\n",
- (size_t)path->conv.u.app_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx failed "
+ "to free private data for %s (ignored)\n",
+ (size_t)path->conv.u.app_func, path->name);
#endif
} /* end if */
} /* end if */
@@ -2822,10 +2822,10 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
(size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx failed "
- "to free private data for %s (ignored)\n",
- (size_t)path->conv.u.lib_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx failed "
+ "to free private data for %s (ignored)\n",
+ (size_t)path->conv.u.lib_func, path->name);
#endif
} /* end if */
(void)H5T_close_real(path->src);
@@ -3568,7 +3568,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo
if (NULL == (tmp = (*copyfn)(old_dt->shared->u.compnd.memb[i].type)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy compound field's datatype")
new_dt->shared->u.compnd.memb[i].type = tmp;
- HDassert(tmp != NULL);
+ assert(tmp != NULL);
/* Range check against compound member's offset */
if ((accum_change < 0) &&
@@ -3726,7 +3726,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(old_dt);
+ assert(old_dt);
/* Allocate and copy core datatype information */
if (NULL == (new_dt = H5T__initiate_copy(old_dt)))
@@ -3768,7 +3768,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
done:
if (ret_value == NULL)
if (new_dt) {
- HDassert(new_dt->shared);
+ assert(new_dt->shared);
if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
@@ -3802,7 +3802,7 @@ H5T_copy_reopen(H5T_t *old_dt)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(old_dt);
+ assert(old_dt);
/* Allocate and copy core datatype information */
if (NULL == (new_dt = H5T__initiate_copy(old_dt)))
@@ -3875,7 +3875,7 @@ H5T_copy_reopen(H5T_t *old_dt)
done:
if (ret_value == NULL)
if (new_dt) {
- HDassert(new_dt->shared);
+ assert(new_dt->shared);
if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
@@ -3908,7 +3908,7 @@ H5T_lock(H5T_t *dt, hbool_t immutable)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -3973,7 +3973,7 @@ done:
if (ret_value == NULL)
if (dt) {
if (dt->shared) {
- HDassert(!dt->shared->owned_vol_obj);
+ assert(!dt->shared->owned_vol_obj);
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
} /* end if */
dt = H5FL_FREE(H5T_t, dt);
@@ -4004,7 +4004,7 @@ H5T__free(H5T_t *dt)
FUNC_ENTER_PACKAGE
- HDassert(dt && dt->shared);
+ assert(dt && dt->shared);
/* Free the ID to name info */
H5G_name_free(&(dt->path));
@@ -4052,7 +4052,7 @@ H5T__free(H5T_t *dt)
dt->shared->type = H5T_NO_CLASS;
/* Close the parent */
- HDassert(dt->shared->parent != dt);
+ assert(dt->shared->parent != dt);
if (dt->shared->parent && H5T_close_real(dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close parent data type")
dt->shared->parent = NULL;
@@ -4089,14 +4089,14 @@ H5T_close_real(H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt && dt->shared);
+ assert(dt && dt->shared);
/* Clean up resources, depending on shared state */
if (dt->shared->state != H5T_STATE_OPEN) {
if (H5T__free(dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype");
- HDassert(!dt->shared->owned_vol_obj);
+ assert(!dt->shared->owned_vol_obj);
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
} /* end if */
else
@@ -4131,8 +4131,8 @@ H5T_close(H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
/* Named datatype cleanups */
if (dt->shared->state == H5T_STATE_OPEN) {
@@ -4140,9 +4140,9 @@ H5T_close(H5T_t *dt)
dt->shared->fo_count--;
/* Sanity checks */
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
- HDassert(H5F_addr_defined(dt->sh_loc.u.loc.oh_addr));
- HDassert(H5F_addr_defined(dt->oloc.addr));
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(H5F_addr_defined(dt->sh_loc.u.loc.oh_addr));
+ assert(H5F_addr_defined(dt->oloc.addr));
/* If a named type is being closed then close the object header and
* remove from the list of open objects in the file.
@@ -4230,11 +4230,11 @@ H5T__set_size(H5T_t *dt, size_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt);
- HDassert(dt->shared);
- HDassert(size != 0);
- HDassert(H5T_REFERENCE != dt->shared->type);
- HDassert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
+ assert(dt);
+ assert(dt->shared);
+ assert(size != 0);
+ assert(H5T_REFERENCE != dt->shared->type);
+ assert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
if (H5T__set_size(dt->shared->parent, size) < 0)
@@ -4300,7 +4300,7 @@ H5T__set_size(H5T_t *dt, size_t size)
/* Compound must not have been packed previously */
/* We will check if resizing changed the packed state of
* this type at the end of this function */
- HDassert(!dt->shared->u.compnd.packed);
+ assert(!dt->shared->u.compnd.packed);
} /* end if */
break;
@@ -4365,16 +4365,16 @@ H5T__set_size(H5T_t *dt, size_t size)
case H5T_VLEN:
case H5T_ARRAY:
case H5T_REFERENCE:
- HDassert("can't happen" && 0);
+ assert("can't happen" && 0);
break;
case H5T_NO_CLASS:
case H5T_NCLASSES:
- HDassert("invalid type" && 0);
+ assert("invalid type" && 0);
break;
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
break;
} /* end switch */
@@ -4418,8 +4418,8 @@ H5T_get_size(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
FUNC_LEAVE_NOAPI(dt->shared->size)
} /* end H5T_get_size() */
@@ -4444,8 +4444,8 @@ H5T_get_force_conv(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
FUNC_LEAVE_NOAPI(dt->shared->force_conv)
} /* end H5T_get_force_conv() */
@@ -4479,15 +4479,15 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
FUNC_ENTER_NOAPI(0)
/* Sanity check */
- HDassert(dt1);
- HDassert(dt2);
+ assert(dt1);
+ assert(dt2);
/* the easy case */
if (dt1 == dt2)
HGOTO_DONE(0);
- HDassert(dt1->shared);
- HDassert(dt2->shared);
+ assert(dt1->shared);
+ assert(dt2->shared);
/* compare */
if (dt1->shared->type < dt2->shared->type)
@@ -4560,10 +4560,10 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
#ifdef H5T_DEBUG
/* I don't quite trust the code above yet :-) --RPM */
for (u = 0; u < dt1->shared->u.compnd.nmembs - 1; u++) {
- HDassert(HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
- dt1->shared->u.compnd.memb[idx1[u + 1]].name));
- HDassert(HDstrcmp(dt2->shared->u.compnd.memb[idx2[u]].name,
- dt2->shared->u.compnd.memb[idx2[u + 1]].name));
+ assert(HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
+ dt1->shared->u.compnd.memb[idx1[u + 1]].name));
+ assert(HDstrcmp(dt2->shared->u.compnd.memb[idx2[u]].name,
+ dt2->shared->u.compnd.memb[idx2[u + 1]].name));
}
#endif
@@ -4657,9 +4657,9 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
#ifdef H5T_DEBUG
/* I don't quite trust the code above yet :-) --RPM */
for (u = 0; u < dt1->shared->u.enumer.nmembs - 1; u++) {
- HDassert(
+ assert(
HDstrcmp(dt1->shared->u.enumer.name[idx1[u]], dt1->shared->u.enumer.name[idx1[u + 1]]));
- HDassert(
+ assert(
HDstrcmp(dt2->shared->u.enumer.name[idx2[u]], dt2->shared->u.enumer.name[idx2[u + 1]]));
}
#endif
@@ -4707,8 +4707,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
idx = u;
} /* end else */
- tmp = HDmemcmp((uint8_t *)dt1->shared->u.enumer.value + idx1[u] * base_size,
- (uint8_t *)dt2->shared->u.enumer.value + idx2[idx] * base_size, base_size);
+ tmp = memcmp((uint8_t *)dt1->shared->u.enumer.value + idx1[u] * base_size,
+ (uint8_t *)dt2->shared->u.enumer.value + idx2[idx] * base_size, base_size);
if (tmp < 0)
HGOTO_DONE(-1);
if (tmp > 0)
@@ -4717,12 +4717,12 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
break;
case H5T_VLEN:
- HDassert(dt1->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
- dt1->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
- HDassert(dt2->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
- dt2->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
- HDassert(dt1->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt1->shared->u.vlen.loc < H5T_LOC_MAXLOC);
- HDassert(dt2->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt2->shared->u.vlen.loc < H5T_LOC_MAXLOC);
+ assert(dt1->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
+ dt1->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
+ assert(dt2->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
+ dt2->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
+ assert(dt1->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt1->shared->u.vlen.loc < H5T_LOC_MAXLOC);
+ assert(dt2->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt2->shared->u.vlen.loc < H5T_LOC_MAXLOC);
/* Arbitrarily sort sequence VL datatypes before string VL datatypes */
if (dt1->shared->u.vlen.type == H5T_VLEN_SEQUENCE &&
@@ -4908,7 +4908,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
case H5T_ARRAY:
case H5T_NCLASSES:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
break;
}
break;
@@ -4952,10 +4952,10 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst)
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(src);
- HDassert(src->shared);
- HDassert(dst);
- HDassert(dst->shared);
+ assert(src);
+ assert(src->shared);
+ assert(dst);
+ assert(dst->shared);
/* Set up conversion function wrapper */
conv_func.is_app = FALSE;
@@ -5012,10 +5012,10 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(src);
- HDassert(src->shared);
- HDassert(dst);
- HDassert(dst->shared);
+ assert(src);
+ assert(src->shared);
+ assert(dst);
+ assert(dst->shared);
/*
* Make sure the first entry in the table is the no-op conversion path.
@@ -5035,7 +5035,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
+ fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
#endif
H5E_clear_stack(NULL); /*ignore the error*/
} /* end if */
@@ -5064,7 +5064,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
while (cmp && lt < rt) {
md = (lt + rt) / 2;
- HDassert(H5T_g.path[md]);
+ assert(H5T_g.path[md]);
cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE);
if (0 == cmp)
cmp = H5T_cmp(dst, H5T_g.path[md]->dst, FALSE);
@@ -5113,8 +5113,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
*/
if (conv->u.app_func &&
(!table || (table && conv->is_app) || (table && !table->is_hard && !conv->is_app))) {
- HDassert(path != table);
- HDassert(NULL == path->conv.u.app_func);
+ assert(path != table);
+ assert(NULL == path->conv.u.app_func);
if (path->src && (src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register source conversion type for query")
@@ -5145,7 +5145,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
* for an applicable function and add it to the path. This can't happen
* for the no-op conversion path.
*/
- HDassert(path->conv.u.app_func || (src && dst));
+ assert(path->conv.u.app_func || (src && dst));
for (i = H5T_g.nsoft - 1; i >= 0 && !path->conv.u.app_func; --i) {
hbool_t path_init_error = FALSE;
@@ -5161,14 +5161,14 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
if (H5T_g.soft[i].conv.is_app) {
if ((H5T_g.soft[i].conv.u.app_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0,
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
- HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
+ memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
} /* end if */
else if ((H5T_g.soft[i].conv.u.lib_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0,
(size_t)0, NULL, NULL) < 0) {
- HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
+ memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
@@ -5197,7 +5197,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
while (cmp && lt < rt) {
md = (lt + rt) / 2;
- HDassert(H5T_g.path[md]);
+ assert(H5T_g.path[md]);
cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE);
if (0 == cmp)
cmp = H5T_cmp(dst, H5T_g.path[md]->dst, FALSE);
@@ -5212,7 +5212,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
/* Replace an existing table entry or add a new entry */
if (table && path != table) {
- HDassert(table == H5T_g.path[md]);
+ assert(table == H5T_g.path[md]);
H5T__print_stats(table, &nprint /*in,out*/);
table->cdata.command = H5T_CONV_FREE;
if (table->conv.is_app) {
@@ -5220,8 +5220,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
- (size_t)path->conv.u.app_func, path->name);
+ fprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
+ (size_t)path->conv.u.app_func, path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
} /* end if */
@@ -5230,8 +5230,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
(size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
- (size_t)path->conv.u.lib_func, path->name);
+ fprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
+ (size_t)path->conv.u.lib_func, path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
} /* end if */
@@ -5244,7 +5244,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
H5T_g.path[md] = path;
} /* end if */
else if (path != table) {
- HDassert(cmp);
+ assert(cmp);
if ((size_t)H5T_g.npaths >= H5T_g.apaths) {
size_t na = MAX(128, 2 * H5T_g.apaths);
H5T_path_t **x;
@@ -5308,7 +5308,7 @@ H5T_path_noop(const H5T_path_t *p)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(p);
+ assert(p);
FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0 == H5T_cmp(p->src, p->dst, FALSE)))
} /* end H5T_path_noop() */
@@ -5343,7 +5343,7 @@ H5T_path_compound_subset(const H5T_path_t *p)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(p);
+ assert(p);
if (p->are_compounds)
ret_value = H5T__conv_struct_subset(&(p->cdata));
@@ -5367,7 +5367,7 @@ H5T_path_bkg(const H5T_path_t *p)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(p);
+ assert(p);
FUNC_LEAVE_NOAPI(p->cdata.need_bkg)
} /* end H5T_path_bkg() */
@@ -5487,7 +5487,7 @@ H5T_oloc(H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -5496,7 +5496,7 @@ H5T_oloc(H5T_t *dt)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "not a named datatype")
case H5T_STATE_NAMED:
case H5T_STATE_OPEN:
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
ret_value = &dt->oloc;
break;
default:
@@ -5527,7 +5527,7 @@ H5T_nameof(H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -5566,7 +5566,7 @@ H5T_is_immutable(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->shared->state == H5T_STATE_IMMUTABLE)
ret_value = TRUE;
@@ -5590,7 +5590,7 @@ H5T_is_named(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->vol_obj)
ret_value = TRUE;
@@ -5624,11 +5624,11 @@ H5T_convert_committed_datatype(H5T_t *dt, H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
- HDassert(f);
+ assert(dt);
+ assert(f);
if (H5T_is_named(dt) && (dt->sh_loc.file != f)) {
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
H5O_msg_reset_share(H5O_DTYPE_ID, dt);
if (H5O_loc_free(&dt->oloc) < 0)
@@ -5676,7 +5676,7 @@ H5T_get_ref_type(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->shared->type == H5T_REFERENCE)
ret_value = dt->shared->u.atomic.u.r.rtype;
@@ -5705,7 +5705,7 @@ H5T_is_sensible(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
switch (dt->shared->type) {
case H5T_COMPOUND:
@@ -5775,8 +5775,8 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
- HDassert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
+ assert(dt);
+ assert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
/* Datatypes can't change in size if the force_conv flag is not set */
if (dt->shared->force_conv) {
@@ -5936,7 +5936,7 @@ H5T_is_relocatable(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(dt);
+ assert(dt);
/* VL and reference datatypes are relocatable */
if (H5T_detect_class(dt, H5T_VLEN, FALSE) || H5T_detect_class(dt, H5T_REFERENCE, FALSE))
@@ -5968,7 +5968,7 @@ H5T__detect_vlen_ref(const H5T_t *dt)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dt);
+ assert(dt);
/* Check if this datatype is a vlen reference */
/* TODO currently H5T_STD_REF is always considered as a vlen type */
@@ -6035,7 +6035,7 @@ H5T_is_vl_storage(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(dt);
+ assert(dt);
/* VL and region reference datatypes are stored in variable-length form */
if (H5T_detect_class(dt, H5T_VLEN, FALSE))
@@ -6071,8 +6071,8 @@ H5T__upgrade_version_cb(H5T_t *dt, void *op_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(dt);
- HDassert(op_value);
+ assert(dt);
+ assert(op_value);
/* Special behavior for each type of datatype */
switch (dt->shared->type) {
@@ -6127,7 +6127,7 @@ H5T__upgrade_version(H5T_t *dt, unsigned new_version)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dt);
+ assert(dt);
/* Iterate over entire datatype, upgrading the version of components, if it's useful */
if (H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T__upgrade_version_cb, &new_version) <
@@ -6160,8 +6160,8 @@ H5T_set_version(H5F_t *f, H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(dt);
+ assert(f);
+ assert(dt);
vers = H5O_dtype_ver_bounds[H5F_LOW_BOUND(f)];
if (vers > dt->shared->version) {
@@ -6201,8 +6201,8 @@ H5T_patch_file(H5T_t *dt, H5F_t *f)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(dt);
- HDassert(f);
+ assert(dt);
+ assert(f);
if (H5T_STATE_OPEN == dt->shared->state || H5T_STATE_NAMED == dt->shared->state) {
dt->oloc.file = f;
@@ -6230,9 +6230,9 @@ H5T_patch_vlen_file(H5T_t *dt, H5VL_object_t *file)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
- HDassert(file);
+ assert(dt);
+ assert(dt->shared);
+ assert(file);
if ((dt->shared->type == H5T_VLEN) && dt->shared->u.vlen.file != file)
dt->shared->u.vlen.file = file;
@@ -6259,9 +6259,9 @@ H5T_own_vol_obj(H5T_t *dt, H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
- HDassert(vol_obj);
+ assert(dt);
+ assert(dt->shared);
+ assert(vol_obj);
/* Currently no support for owning multiple VOL objects, free the previous
* owned object. Currently this is only used for holding open VOL objects
diff --git a/src/H5TS.c b/src/H5TS.c
index ebc2d42..2f34480 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -159,9 +159,9 @@ H5TS__key_destructor(void *key_val)
{
FUNC_ENTER_PACKAGE_NAMECHECK_ONLY
- /* Use HDfree here instead of H5MM_xfree(), to avoid calling the H5CS routines */
+ /* Use free here instead of H5MM_xfree(), to avoid calling the H5CS routines */
if (key_val != NULL)
- HDfree(key_val);
+ free(key_val);
FUNC_LEAVE_NOAPI_VOID_NAMECHECK_ONLY
} /* end H5TS__key_destructor() */
@@ -270,7 +270,7 @@ H5TS_thread_id(void)
/* If a prototype ID record was established, copy it to the heap. */
if (tid == &proto_tid)
- if ((tid = HDmalloc(sizeof(*tid))) != NULL)
+ if ((tid = malloc(sizeof(*tid))) != NULL)
*tid = proto_tid;
if (tid == NULL)
@@ -716,17 +716,17 @@ H5TS_cancel_count_inc(void)
* First time thread calls library - create new counter and associate
* with key.
*
- * Don't use H5MM calls here since the destructor has to use HDfree in
+ * Don't use H5MM calls here since the destructor has to use free in
* order to avoid codestack calls.
*/
- cancel_counter = (H5TS_cancel_t *)HDcalloc(1, sizeof(H5TS_cancel_t));
+ cancel_counter = (H5TS_cancel_t *)calloc(1, sizeof(H5TS_cancel_t));
if (NULL == cancel_counter)
HGOTO_DONE(FAIL);
/* Set the thread's cancellation counter with the new object */
ret_value = pthread_setspecific(H5TS_cancel_key_s, (void *)cancel_counter);
if (ret_value) {
- HDfree(cancel_counter);
+ free(cancel_counter);
HGOTO_DONE(FAIL);
} /* end if */
} /* end if */
diff --git a/src/H5Tarray.c b/src/H5Tarray.c
index d3d4c8d..e52a461 100644
--- a/src/H5Tarray.c
+++ b/src/H5Tarray.c
@@ -143,9 +143,9 @@ H5T__array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */])
FUNC_ENTER_PACKAGE
- HDassert(base);
- HDassert(ndims <= H5S_MAX_RANK);
- HDassert(dim);
+ assert(base);
+ assert(ndims <= H5S_MAX_RANK);
+ assert(dim);
/* Build new type */
if (NULL == (ret_value = H5T__alloc()))
@@ -233,8 +233,8 @@ H5T__get_array_ndims(const H5T_t *dt)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(dt->shared->type == H5T_ARRAY);
+ assert(dt);
+ assert(dt->shared->type == H5T_ARRAY);
/* Retrieve the number of dimensions */
FUNC_LEAVE_NOAPI((int)dt->shared->u.array.ndims)
@@ -296,8 +296,8 @@ H5T__get_array_dims(const H5T_t *dt, hsize_t dims[])
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(dt->shared->type == H5T_ARRAY);
+ assert(dt);
+ assert(dt->shared->type == H5T_ARRAY);
/* Retrieve the sizes of the dimensions */
if (dims)
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index c663145..032ecb8 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -174,8 +174,8 @@ H5T__bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(buf);
- HDassert(size);
+ assert(buf);
+ assert(size);
if (shift_dist) {
size_t abs_shift_dist = (size_t)ABS(shift_dist);
@@ -240,7 +240,7 @@ H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(8 * sizeof(val) >= size);
+ assert(8 * sizeof(val) >= size);
H5T__bit_copy((uint8_t *)&val, (size_t)0, buf, offset, size);
switch (H5T_native_order_g) {
@@ -261,7 +261,7 @@ H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size)
case H5T_ORDER_MIXED:
default:
/* This function can't return errors */
- HDassert(0 && "unknown byte order");
+ assert(0 && "unknown byte order");
}
/* Set return value */
@@ -286,7 +286,7 @@ H5T__bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(8 * sizeof(val) >= size);
+ assert(8 * sizeof(val) >= size);
switch (H5T_native_order_g) {
case H5T_ORDER_LE:
@@ -394,7 +394,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
FUNC_ENTER_PACKAGE_NOERR
/* Some functions call this with value=TRUE */
- HDassert(TRUE == 1);
+ assert(TRUE == 1);
switch (direction) {
case H5T_BIT_LSB:
@@ -464,7 +464,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
break;
default:
- HDassert(0 && "Unknown bit search direction");
+ assert(0 && "Unknown bit search direction");
} /* end switch */
done:
@@ -491,7 +491,7 @@ H5T__bit_inc(uint8_t *buf, size_t start, size_t size)
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
FUNC_ENTER_PACKAGE_NOERR
- HDassert(buf);
+ assert(buf);
start %= 8;
@@ -556,8 +556,8 @@ H5T__bit_dec(uint8_t *buf, size_t start, size_t size)
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
FUNC_ENTER_PACKAGE_NOERR
- HDassert(buf);
- HDassert(size);
+ assert(buf);
+ assert(size);
/* The first partial byte */
if ((size + start - 1) / 8 > idx) {
@@ -631,8 +631,8 @@ H5T__bit_neg(uint8_t *buf, size_t start, size_t size)
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
FUNC_ENTER_PACKAGE_NOERR
- HDassert(buf);
- HDassert(size);
+ assert(buf);
+ assert(size);
/* The first partial byte */
tmp[0] = (uint8_t)~buf[idx];
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 76d4083..04fa3d4 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -249,11 +249,11 @@ H5T__commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt, hid_t lcpl_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(dt);
- HDassert(lcpl_id != H5P_DEFAULT);
- HDassert(tcpl_id != H5P_DEFAULT);
+ assert(loc);
+ assert(name && *name);
+ assert(dt);
+ assert(lcpl_id != H5P_DEFAULT);
+ assert(tcpl_id != H5P_DEFAULT);
/* Record the type's state so that we can revert to it if linking fails */
old_state = dt->shared->state;
@@ -270,7 +270,7 @@ H5T__commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt, hid_t lcpl_
/* Create the new named datatype and link it to its parent group */
if (H5L_link_object(loc, name, &ocrt_info, lcpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create and link to named datatype")
- HDassert(ocrt_info.new_obj);
+ assert(ocrt_info.new_obj);
done:
/* If the datatype was committed but something failed after that, we need
@@ -402,9 +402,9 @@ H5T__commit_anon(H5F_t *file, H5T_t *type, hid_t tcpl_id)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
- HDassert(type);
- HDassert(tcpl_id != H5P_DEFAULT);
+ assert(file);
+ assert(type);
+ assert(tcpl_id != H5P_DEFAULT);
/* Commit the type */
if (H5T__commit(file, type, tcpl_id) < 0)
@@ -448,9 +448,9 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(type);
- HDassert(tcpl_id != H5P_DEFAULT);
+ assert(file);
+ assert(type);
+ assert(tcpl_id != H5P_DEFAULT);
/* Check if we are allowed to write to this file */
if (0 == (H5F_INTENT(file) & H5F_ACC_RDWR))
@@ -489,7 +489,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
/* Calculate message size information, for creating object header */
dtype_size = H5O_msg_size_f(file, tcpl_id, H5O_DTYPE_ID, type, (size_t)0);
- HDassert(dtype_size);
+ assert(dtype_size);
/*
* Create the object header and open it for write access. Insert the data
@@ -600,8 +600,8 @@ H5T_link(const H5T_t *type, int adjust)
FUNC_ENTER_NOAPI((-1))
- HDassert(type);
- HDassert(type->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(type);
+ assert(type->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
/* Adjust the link count on the named datatype */
if ((ret_value = H5O_link(&type->oloc, adjust)) < 0)
@@ -937,7 +937,7 @@ H5T__get_create_plist(const H5T_t *type)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type);
+ assert(type);
/* Copy the default datatype creation property list */
if (NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_ID_g)))
@@ -992,8 +992,8 @@ H5T__open_name(const H5G_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Set up datatype location to fill in */
type_loc.oloc = &oloc;
@@ -1053,7 +1053,7 @@ H5T_open(const H5G_loc_t *loc)
FUNC_ENTER_NOAPI(NULL)
- HDassert(loc);
+ assert(loc);
/* Check if datatype was already open */
if (NULL == (shared_fo = (H5T_shared_t *)H5FO_opened(loc->oloc->file, loc->oloc->addr))) {
@@ -1172,7 +1172,7 @@ H5T__open_oid(const H5G_loc_t *loc)
FUNC_ENTER_PACKAGE_TAG(loc->oloc->addr)
- HDassert(loc);
+ assert(loc);
/* Open named datatype object in file */
if (H5O_open(loc->oloc) < 0)
@@ -1224,7 +1224,7 @@ H5T_update_shared(H5T_t *dt)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(dt);
+ assert(dt);
/* Set the shared location fields from the named datatype info */
H5O_UPDATE_SHARED(&(dt->sh_loc), H5O_SHARE_TYPE_COMMITTED, dt->oloc.file, H5O_DTYPE_ID, 0, dt->oloc.addr)
@@ -1358,7 +1358,7 @@ H5T_save_refresh_state(hid_t tid, H5O_shared_t *cached_H5O_shared)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cached_H5O_shared);
+ assert(cached_H5O_shared);
if (NULL == (dt = (H5T_t *)H5I_object_verify(tid, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not a datatype ID")
@@ -1398,7 +1398,7 @@ H5T_restore_refresh_state(hid_t tid, H5O_shared_t *cached_H5O_shared)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cached_H5O_shared);
+ assert(cached_H5O_shared);
if (NULL == (dt = (H5T_t *)H5I_object_verify(tid, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid not a datatype ID")
@@ -1435,7 +1435,7 @@ H5T_already_vol_managed(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(dt);
+ assert(dt);
FUNC_LEAVE_NOAPI(dt->vol_obj != NULL)
} /* end H5T_already_vol_managed() */
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index 8ba3d69..8999515 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -130,8 +130,8 @@ H5T_get_member_offset(const H5T_t *dt, unsigned membno)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(dt);
- HDassert(membno < dt->shared->u.compnd.nmembs);
+ assert(dt);
+ assert(membno < dt->shared->u.compnd.nmembs);
FUNC_LEAVE_NOAPI(dt->shared->u.compnd.memb[membno].offset)
} /* end H5T_get_member_offset() */
@@ -248,8 +248,8 @@ H5T_get_member_type(const H5T_t *dt, unsigned membno)
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(dt);
- HDassert(membno < dt->shared->u.compnd.nmembs);
+ assert(dt);
+ assert(membno < dt->shared->u.compnd.nmembs);
/* Copy datatype */
if (NULL == (ret_value = H5T_copy(dt->shared->u.compnd.memb[membno].type, H5T_COPY_TRANSIENT)))
@@ -284,8 +284,8 @@ H5T__reopen_member_type(const H5T_t *dt, unsigned membno)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dt);
- HDassert(membno < dt->shared->u.compnd.nmembs);
+ assert(dt);
+ assert(membno < dt->shared->u.compnd.nmembs);
/* Copy datatype, possibly re-opening it */
if (NULL == (ret_value = H5T_copy_reopen(dt->shared->u.compnd.memb[membno].type)))
@@ -313,8 +313,8 @@ H5T__get_member_size(const H5T_t *dt, unsigned membno)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(membno < dt->shared->u.compnd.nmembs);
+ assert(dt);
+ assert(membno < dt->shared->u.compnd.nmembs);
FUNC_LEAVE_NOAPI(dt->shared->u.compnd.memb[membno].type->shared->size)
} /* end H5T__get_member_size() */
@@ -433,10 +433,10 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(parent && H5T_COMPOUND == parent->shared->type);
- HDassert(H5T_STATE_TRANSIENT == parent->shared->state);
- HDassert(member);
- HDassert(name && *name);
+ assert(parent && H5T_COMPOUND == parent->shared->type);
+ assert(H5T_STATE_TRANSIENT == parent->shared->state);
+ assert(member);
+ assert(name && *name);
/* Does NAME already exist in PARENT? */
for (i = 0; i < parent->shared->u.compnd.nmembs; i++)
@@ -480,7 +480,7 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
/* It should not be possible to get this far if the type is already packed
* - the new member would overlap something */
- HDassert(!(parent->shared->u.compnd.packed));
+ assert(!(parent->shared->u.compnd.packed));
/* Determine if the compound datatype becomes packed */
H5T__update_packed(parent);
@@ -522,7 +522,7 @@ H5T__pack(const H5T_t *dt)
FUNC_ENTER_PACKAGE
- HDassert(dt);
+ assert(dt);
if (H5T_detect_class(dt, H5T_COMPOUND, FALSE) > 0) {
/* If datatype has been packed, skip packing it and indicate success */
@@ -597,7 +597,7 @@ H5T__is_packed(const H5T_t *dt)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
+ assert(dt);
/* Go up the chain as far as possible */
while (dt->shared->parent)
@@ -632,8 +632,8 @@ H5T__update_packed(const H5T_t *dt)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(dt->shared->type == H5T_COMPOUND);
+ assert(dt);
+ assert(dt->shared->type == H5T_COMPOUND);
/* First check if all space is used in the "top level" type */
if (dt->shared->size == dt->shared->u.compnd.memb_size) {
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 8118eb0..840b055 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -745,8 +745,8 @@
case H5T_CONV_CONV: \
/* Initialize source & destination strides */ \
if (buf_stride) { \
- HDassert(buf_stride >= sizeof(ST)); \
- HDassert(buf_stride >= sizeof(DT)); \
+ assert(buf_stride >= sizeof(ST)); \
+ assert(buf_stride >= sizeof(DT)); \
s_stride = d_stride = (ssize_t)buf_stride; \
} \
else { \
@@ -870,13 +870,13 @@ done:
#define H5T_CONV_SET_PREC_Y \
/* Get source & destination precisions into a variable */ \
tclass = st->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ assert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
if (tclass == H5T_INTEGER) \
sprec = st->shared->u.atomic.prec; \
else \
sprec = 1 + st->shared->u.atomic.u.f.msize; \
tclass = dt->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ assert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
if (tclass == H5T_INTEGER) \
dprec = dt->shared->u.atomic.prec; \
else \
@@ -1002,12 +1002,12 @@ done:
#define CI_PRINT_STATS(STYPE, DTYPE) \
{ \
if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
- HDfprintf(H5DEBUG(T), " %zu src elements aligned on %zu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->s_aligned, H5T_NATIVE_##STYPE##_ALIGN_g); \
+ fprintf(H5DEBUG(T), " %zu src elements aligned on %zu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->s_aligned, H5T_NATIVE_##STYPE##_ALIGN_g); \
} \
if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
- HDfprintf(H5DEBUG(T), " %zu dst elements aligned on %zu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->d_aligned, H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ fprintf(H5DEBUG(T), " %zu dst elements aligned on %zu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->d_aligned, H5T_NATIVE_##DTYPE##_ALIGN_g); \
} \
}
@@ -1773,11 +1773,11 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf)
- HDassert((dp >= sp && dp < sp + src->shared->size) ||
- (sp >= dp && sp < dp + dst->shared->size));
+ assert((dp >= sp && dp < sp + src->shared->size) ||
+ (sp >= dp && sp < dp + dst->shared->size));
else
- HDassert((dp < sp && dp + dst->shared->size <= sp) ||
- (sp < dp && sp + src->shared->size <= dp));
+ assert((dp < sp && dp + dst->shared->size <= sp) ||
+ (sp < dp && sp + src->shared->size <= dp));
#endif
/*
@@ -1938,9 +1938,9 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv)
int H5_ATTR_NDEBUG_UNUSED status;
status = H5I_dec_ref(src_memb_id[i]);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5I_dec_ref(dst_memb_id[src2dst[i]]);
- HDassert(status >= 0);
+ assert(status >= 0);
} /* end if */
H5MM_xfree(src2dst);
@@ -2055,12 +2055,12 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
type = H5T_copy(src->shared->u.compnd.memb[i].type, H5T_COPY_ALL);
tid = H5I_register(H5I_DATATYPE, type, FALSE);
- HDassert(tid >= 0);
+ assert(tid >= 0);
priv->src_memb_id[i] = tid;
type = H5T_copy(dst->shared->u.compnd.memb[src2dst[i]].type, H5T_COPY_ALL);
tid = H5I_register(H5I_DATATYPE, type, FALSE);
- HDassert(tid >= 0);
+ assert(tid >= 0);
priv->dst_memb_id[src2dst[i]] = tid;
} /* end if */
} /* end for */
@@ -2182,8 +2182,8 @@ H5T__conv_struct_subset(const H5T_cdata_t *cdata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(cdata);
- HDassert(cdata->priv);
+ assert(cdata);
+ assert(cdata->priv);
priv = (H5T_conv_struct_t *)(cdata->priv);
@@ -2271,8 +2271,8 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype")
- HDassert(priv);
- HDassert(bkg && cdata->need_bkg);
+ assert(priv);
+ assert(bkg && cdata->need_bkg);
if (cdata->recalc && H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
@@ -2367,7 +2367,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
offset -= dst_memb->size;
HDmemmove(xbkg + dst_memb->offset, xbuf + offset, dst_memb->size);
} /* end for */
- HDassert(0 == offset);
+ assert(0 == offset);
/*
* Update pointers
@@ -2543,9 +2543,9 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
if (cdata->recalc && H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
priv = (H5T_conv_struct_t *)(cdata->priv);
- HDassert(priv);
+ assert(priv);
src2dst = priv->src2dst;
- HDassert(bkg && cdata->need_bkg);
+ assert(bkg && cdata->need_bkg);
/*
* Insure that members are sorted.
@@ -2769,7 +2769,7 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
}
} /* end for */
- HDassert(domain[1] >= domain[0]);
+ assert(domain[1] >= domain[0]);
length = (unsigned)(domain[1] - domain[0]) + 1;
if (src->shared->u.enumer.nmembs < 2 ||
(double)length / src->shared->u.enumer.nmembs < (double)(1.2F)) {
@@ -2789,8 +2789,8 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
n = *(
(int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
n -= priv->base;
- HDassert(n >= 0 && (unsigned)n < priv->length);
- HDassert(map[n] < 0);
+ assert(n >= 0 && (unsigned)n < priv->length);
+ assert(map[n] < 0);
map[n] = priv->src2dst[i];
} /* end for */
@@ -2869,9 +2869,8 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
case H5T_CONV_FREE:
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- HDfprintf(H5DEBUG(T), " Using %s mapping function%s\n",
- priv->length ? "O(1)" : "O(log N)",
- priv->length ? "" : ", where N is the number of enum members");
+ fprintf(H5DEBUG(T), " Using %s mapping function%s\n", priv->length ? "O(1)" : "O(log N)",
+ priv->length ? "" : ", where N is the number of enum members");
}
#endif
if (priv) {
@@ -2948,7 +2947,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
cb_struct.user_data);
if (except_ret == H5T_CONV_UNHANDLED)
- HDmemset(d, 0xff, dst->shared->size);
+ memset(d, 0xff, dst->shared->size);
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception")
@@ -2968,8 +2967,8 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
while (lt < rt) {
md = (lt + rt) / 2;
- cmp = HDmemcmp(s, (uint8_t *)src->shared->u.enumer.value + (md * src->shared->size),
- src->shared->size);
+ cmp = memcmp(s, (uint8_t *)src->shared->u.enumer.value + (md * src->shared->size),
+ src->shared->size);
if (cmp < 0)
rt = md;
else if (cmp > 0)
@@ -2985,13 +2984,13 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
cb_struct.user_data);
if (except_ret == H5T_CONV_UNHANDLED)
- HDmemset(d, 0xff, dst->shared->size);
+ memset(d, 0xff, dst->shared->size);
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception")
} /* end if */
else {
- HDassert(priv->src2dst[md] >= 0);
+ assert(priv->src2dst[md] >= 0);
H5MM_memcpy(d,
(uint8_t *)dst->shared->u.enumer.value +
((unsigned)priv->src2dst[md] * dst->shared->size),
@@ -3189,8 +3188,8 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* Initialize source & destination strides */
if (buf_stride) {
- HDassert(buf_stride >= src->shared->size);
- HDassert(buf_stride >= dst->shared->size);
+ assert(buf_stride >= src->shared->size);
+ assert(buf_stride >= dst->shared->size);
H5_CHECK_OVERFLOW(buf_stride, size_t, ssize_t);
s_stride = d_stride = (ssize_t)buf_stride;
} /* end if */
@@ -3272,9 +3271,9 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* Check if we need to go backwards through the buffer */
if (d_stride > s_stride) {
/* Sanity check */
- HDassert(s_stride > 0);
- HDassert(d_stride > 0);
- HDassert(b_stride >= 0);
+ assert(s_stride > 0);
+ assert(d_stride > 0);
+ assert(b_stride >= 0);
/* Compute the number of "safe" destination elements at */
/* the end of the buffer (Those which don't overlap with */
@@ -3356,7 +3355,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
if (NULL == (conv_buf = H5FL_BLK_REALLOC(vlen_seq, conv_buf, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(conv_buf, 0, conv_buf_size);
+ memset(conv_buf, 0, conv_buf_size);
} /* end else-if */
/* Read in VL sequence */
@@ -3374,14 +3373,14 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
if (NULL == (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(tmp_buf, 0, tmp_buf_size);
+ memset(tmp_buf, 0, tmp_buf_size);
} /* end if */
/* If we are writing and there is a nested VL type, read
* the sequence into the background buffer */
if (nested) {
/* Sanity check */
- HDassert(write_to_file);
+ assert(write_to_file);
/* Get length of background element sequence */
if ((*(dst->shared->u.vlen.cls->getlen))(dst->shared->u.vlen.file, b,
@@ -3396,7 +3395,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
(tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(tmp_buf, 0, tmp_buf_size);
+ memset(tmp_buf, 0, tmp_buf_size);
} /* end if */
/* Read in background VL sequence */
@@ -3408,8 +3407,8 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* If the sequence gets shorter, pad out the original sequence with zeros */
if (bg_seq_len < seq_len)
- HDmemset((uint8_t *)tmp_buf + dst_base_size * bg_seq_len, 0,
- (seq_len - bg_seq_len) * dst_base_size);
+ memset((uint8_t *)tmp_buf + dst_base_size * bg_seq_len, 0,
+ (seq_len - bg_seq_len) * dst_base_size);
} /* end if */
/* Convert VL sequence */
@@ -3431,7 +3430,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
size_t u;
/* Sanity check */
- HDassert(write_to_file);
+ assert(write_to_file);
tmp = (uint8_t *)tmp_buf + seq_len * dst_base_size;
for (u = seq_len; u < bg_seq_len; u++, tmp += dst_base_size) {
@@ -3523,8 +3522,8 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s
*/
if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- HDassert(H5T_ARRAY == src->shared->type);
- HDassert(H5T_ARRAY == dst->shared->type);
+ assert(H5T_ARRAY == src->shared->type);
+ assert(H5T_ARRAY == dst->shared->type);
/* Check the number and sizes of the dimensions */
if (src->shared->u.array.ndims != dst->shared->u.array.ndims)
@@ -3696,12 +3695,12 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- HDassert(src->shared->u.atomic.u.r.cls);
+ assert(src->shared->u.atomic.u.r.cls);
/* Initialize source & destination strides */
if (buf_stride) {
- HDassert(buf_stride >= src->shared->size);
- HDassert(buf_stride >= dst->shared->size);
+ assert(buf_stride >= src->shared->size);
+ assert(buf_stride >= dst->shared->size);
H5_CHECK_OVERFLOW(buf_stride, size_t, ssize_t);
s_stride = d_stride = (ssize_t)buf_stride;
} /* end if */
@@ -3726,9 +3725,9 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* Check if we need to go backwards through the buffer */
if (d_stride > s_stride) {
/* Sanity check */
- HDassert(s_stride > 0);
- HDassert(d_stride > 0);
- HDassert(b_stride >= 0);
+ assert(s_stride > 0);
+ assert(d_stride > 0);
+ assert(b_stride >= 0);
/* Compute the number of "safe" destination elements at */
/* the end of the buffer (Those which don't overlap with */
@@ -3793,7 +3792,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (NULL == (conv_buf = H5FL_BLK_REALLOC(ref_seq, conv_buf, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(conv_buf, 0, conv_buf_size);
+ memset(conv_buf, 0, conv_buf_size);
} /* end if */
if (dst_copy && (src->shared->u.atomic.u.r.loc == H5T_LOC_DISK))
@@ -3964,12 +3963,12 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src->shared->size) ||
- (sp >= dp && sp < dp + dst->shared->size));
+ assert((dp >= sp && dp < sp + src->shared->size) ||
+ (sp >= dp && sp < dp + dst->shared->size));
}
else {
- HDassert((dp < sp && dp + dst->shared->size <= sp) ||
- (sp < dp && sp + src->shared->size <= dp));
+ assert((dp < sp && dp + dst->shared->size <= sp) ||
+ (sp < dp && sp + src->shared->size <= dp));
}
#endif
@@ -4231,14 +4230,14 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* Set padding areas in destination.
*/
if (dst->shared->u.atomic.offset > 0) {
- HDassert(H5T_PAD_ZERO == dst->shared->u.atomic.lsb_pad ||
- H5T_PAD_ONE == dst->shared->u.atomic.lsb_pad);
+ assert(H5T_PAD_ZERO == dst->shared->u.atomic.lsb_pad ||
+ H5T_PAD_ONE == dst->shared->u.atomic.lsb_pad);
H5T__bit_set(d, (size_t)0, dst->shared->u.atomic.offset,
(hbool_t)(H5T_PAD_ONE == dst->shared->u.atomic.lsb_pad));
}
if (dst->shared->u.atomic.offset + dst->shared->u.atomic.prec != 8 * dst->shared->size) {
- HDassert(H5T_PAD_ZERO == dst->shared->u.atomic.msb_pad ||
- H5T_PAD_ONE == dst->shared->u.atomic.msb_pad);
+ assert(H5T_PAD_ZERO == dst->shared->u.atomic.msb_pad ||
+ H5T_PAD_ONE == dst->shared->u.atomic.msb_pad);
H5T__bit_set(d, dst->shared->u.atomic.offset + dst->shared->u.atomic.prec,
8 * dst->shared->size -
(dst->shared->u.atomic.offset + dst->shared->u.atomic.prec),
@@ -4428,12 +4427,12 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src_p->shared->size) ||
- (sp >= dp && sp < dp + dst_p->shared->size));
+ assert((dp >= sp && dp < sp + src_p->shared->size) ||
+ (sp >= dp && sp < dp + dst_p->shared->size));
}
else {
- HDassert((dp < sp && dp + dst_p->shared->size <= sp) ||
- (sp < dp && sp + src_p->shared->size <= dp));
+ assert((dp < sp && dp + dst_p->shared->size <= sp) ||
+ (sp < dp && sp + src_p->shared->size <= dp));
}
#endif
@@ -4452,7 +4451,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else if (H5T_ORDER_VAX == src.order) {
tsize = src_p->shared->size;
- HDassert(0 == tsize % 2);
+ assert(0 == tsize % 2);
for (i = 0; i < tsize; i += 4) {
tmp1 = s[i];
@@ -4633,7 +4632,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* the source exponent bias.
*/
if (0 == expo || H5T_NORM_NONE == src.u.f.norm) {
- HDassert(bitno >= 0);
+ assert(bitno >= 0);
expo -= (int64_t)((src.u.f.ebias - 1) + (src.u.f.msize - (size_t)bitno));
}
else if (H5T_NORM_IMPLIED == src.u.f.norm) {
@@ -4713,7 +4712,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
if (msize > 0 && mrsh <= dst.u.f.msize && mrsh + msize > dst.u.f.msize) {
bitno = (ssize_t)(mrsh + msize - dst.u.f.msize);
- HDassert(bitno >= 0 && (size_t)bitno <= msize);
+ assert(bitno >= 0 && (size_t)bitno <= msize);
/* If the 1st bit being cut off is set and source isn't denormalized.*/
if (H5T__bit_get_d(s, (mpos + (size_t)bitno) - 1, (size_t)1) && !denormalized) {
/* Don't do rounding if exponent is 111...110 and mantissa is 111...11.
@@ -4807,11 +4806,11 @@ padding:
* Set external padding areas
*/
if (dst.offset > 0) {
- HDassert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
+ assert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
H5T__bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE == dst.lsb_pad));
}
if (dst.offset + dst.prec != 8 * dst_p->shared->size) {
- HDassert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
+ assert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
H5T__bit_set(d, dst.offset + dst.prec, 8 * dst_p->shared->size - (dst.offset + dst.prec),
(hbool_t)(H5T_PAD_ONE == dst.msb_pad));
}
@@ -4830,7 +4829,7 @@ padding:
}
else if (H5T_ORDER_VAX == dst.order && reverse) {
tsize = dst_p->shared->size;
- HDassert(0 == tsize % 2);
+ assert(0 == tsize % 2);
for (i = 0; i < tsize; i += 4) {
tmp1 = d[i];
@@ -4995,15 +4994,15 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (src->shared->size == dst->shared->size || buf_stride) {
- HDassert(s == d);
+ assert(s == d);
}
else if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src->shared->size) ||
- (sp >= dp && sp < dp + dst->shared->size));
+ assert((dp >= sp && dp < sp + src->shared->size) ||
+ (sp >= dp && sp < dp + dst->shared->size));
}
else {
- HDassert((dp < sp && dp + dst->shared->size <= sp) ||
- (sp < dp && sp + src->shared->size <= dp));
+ assert((dp < sp && dp + dst->shared->size <= sp) ||
+ (sp < dp && sp + src->shared->size <= dp));
}
#endif
@@ -8528,12 +8527,12 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src_p->shared->size) ||
- (sp >= dp && sp < dp + dst_p->shared->size));
+ assert((dp >= sp && dp < sp + src_p->shared->size) ||
+ (sp >= dp && sp < dp + dst_p->shared->size));
}
else {
- HDassert((dp < sp && dp + dst_p->shared->size <= sp) ||
- (sp < dp && sp + src_p->shared->size <= dp));
+ assert((dp < sp && dp + dst_p->shared->size <= sp) ||
+ (sp < dp && sp + src_p->shared->size <= dp));
}
#endif
/*
@@ -8551,7 +8550,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else if (H5T_ORDER_VAX == src.order) {
tsize = src_p->shared->size;
- HDassert(0 == tsize % 2);
+ assert(0 == tsize % 2);
for (i = 0; i < tsize; i += 4) {
tmp1 = s[i];
@@ -8961,11 +8960,11 @@ padding:
* Set padding areas in destination.
*/
if (dst.offset > 0) {
- HDassert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
+ assert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
H5T__bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE == dst.lsb_pad));
}
if (dst.offset + dst.prec != 8 * dst_p->shared->size) {
- HDassert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
+ assert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
H5T__bit_set(d, dst.offset + dst.prec, 8 * dst_p->shared->size - (dst.offset + dst.prec),
(hbool_t)(H5T_PAD_ONE == dst.msb_pad));
}
@@ -8999,7 +8998,7 @@ next:
dp += direction * (ssize_t)dst_p->shared->size;
}
- HDmemset(int_buf, 0, buf_size);
+ memset(int_buf, 0, buf_size);
}
break;
@@ -9161,12 +9160,12 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src_p->shared->size) ||
- (sp >= dp && sp < dp + dst_p->shared->size));
+ assert((dp >= sp && dp < sp + src_p->shared->size) ||
+ (sp >= dp && sp < dp + dst_p->shared->size));
}
else {
- HDassert((dp < sp && dp + dst_p->shared->size <= sp) ||
- (sp < dp && sp + src_p->shared->size <= dp));
+ assert((dp < sp && dp + dst_p->shared->size <= sp) ||
+ (sp < dp && sp + src_p->shared->size <= dp));
}
#endif
@@ -9355,7 +9354,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/*make destination infinity by setting exponent to maximal number and
*mantissa to zero.*/
expo = expo_max;
- HDmemset(int_buf, 0, buf_size);
+ memset(int_buf, 0, buf_size);
}
}
@@ -9373,11 +9372,11 @@ padding:
* Set padding areas in destination.
*/
if (dst.offset > 0) {
- HDassert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
+ assert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
H5T__bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE == dst.lsb_pad));
}
if (dst.offset + dst.prec != 8 * dst_p->shared->size) {
- HDassert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
+ assert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
H5T__bit_set(d, dst.offset + dst.prec, 8 * dst_p->shared->size - (dst.offset + dst.prec),
(hbool_t)(H5T_PAD_ONE == dst.msb_pad));
}
@@ -9396,7 +9395,7 @@ padding:
}
else if (H5T_ORDER_VAX == dst.order && reverse) {
tsize = dst_p->shared->size;
- HDassert(0 == tsize % 2);
+ assert(0 == tsize % 2);
for (i = 0; i < tsize; i += 4) {
tmp1 = d[i];
@@ -9425,7 +9424,7 @@ padding:
dp += direction * (ssize_t)dst_p->shared->size;
}
- HDmemset(int_buf, 0, buf_size);
+ memset(int_buf, 0, buf_size);
}
break;
@@ -9466,8 +9465,8 @@ H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(s);
- HDassert(size);
+ assert(s);
+ assert(size);
if (H5T_ORDER_VAX == order) {
for (i = 0; i < size; i += 2) {
@@ -9509,9 +9508,9 @@ H5T_reclaim(hid_t type_id, H5S_t *space, void *buf)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(H5I_DATATYPE == H5I_get_type(type_id));
- HDassert(space);
- HDassert(buf);
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
+ assert(space);
+ assert(buf);
if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
@@ -9549,15 +9548,15 @@ H5T_reclaim_cb(void *elem, const H5T_t *dt, unsigned H5_ATTR_UNUSED ndim, const
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(elem);
- HDassert(dt);
+ assert(elem);
+ assert(dt);
if (dt->shared->type == H5T_REFERENCE) {
if (H5T__ref_reclaim(elem, dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim ref elements")
}
else {
- HDassert(op_data);
+ assert(op_data);
/* Allow vlen reclaim to recurse into that routine */
if (H5T__vlen_reclaim(elem, dt, (H5T_vlen_alloc_info_t *)op_data) < 0)
diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c
index 8b63878..4f09192 100644
--- a/src/H5Tdbg.c
+++ b/src/H5Tdbg.c
@@ -99,11 +99,11 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i
H5_timer_get_time_string(path->stats.times.elapsed)};
if (nprint && 0 == (*nprint)++) {
- HDfprintf(H5DEBUG(T), "H5T: type conversion statistics:\n");
- HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "Conversion", "Elmts", "Calls",
- "User", "System", "Elapsed", "Bandwidth");
- HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "----------", "-----", "-----",
- "----", "------", "-------", "---------");
+ fprintf(H5DEBUG(T), "H5T: type conversion statistics:\n");
+ fprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "Conversion", "Elmts", "Calls",
+ "User", "System", "Elapsed", "Bandwidth");
+ fprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "----------", "-----", "-----",
+ "----", "------", "-------", "---------");
} /* end if */
if (path->src && path->dst)
@@ -116,12 +116,12 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i
nbytes = 0;
nbytes *= path->stats.nelmts;
H5_bandwidth(bandwidth, sizeof(bandwidth), (double)nbytes, path->stats.times.elapsed);
- HDfprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n", path->name,
- path->stats.nelmts, path->stats.ncalls, timestrs.user, timestrs.system, timestrs.elapsed,
- bandwidth);
- HDfree(timestrs.user);
- HDfree(timestrs.system);
- HDfree(timestrs.elapsed);
+ fprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n", path->name,
+ path->stats.nelmts, path->stats.ncalls, timestrs.user, timestrs.system, timestrs.elapsed,
+ bandwidth);
+ free(timestrs.user);
+ free(timestrs.system);
+ free(timestrs.elapsed);
}
#endif
@@ -148,8 +148,8 @@ H5T_debug(const H5T_t *dt, FILE *stream)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(dt);
- HDassert(stream);
+ assert(dt);
+ assert(stream);
switch (dt->shared->type) {
case H5T_NO_CLASS:
@@ -224,10 +224,10 @@ H5T_debug(const H5T_t *dt, FILE *stream)
s2 = "[named,open]";
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
- HDfprintf(stream, "%s%s {nbytes=%lu", s1, s2, (unsigned long)(dt->shared->size));
+ fprintf(stream, "%s%s {nbytes=%lu", s1, s2, (unsigned long)(dt->shared->size));
if (H5T_IS_ATOMIC(dt->shared)) {
uint64_t tmp;
@@ -259,12 +259,12 @@ H5T_debug(const H5T_t *dt, FILE *stream)
break;
} /* end switch */
- HDfprintf(stream, ", %s", s1);
+ fprintf(stream, ", %s", s1);
if (dt->shared->u.atomic.offset)
- HDfprintf(stream, ", offset=%lu", (unsigned long)(dt->shared->u.atomic.offset));
+ fprintf(stream, ", offset=%lu", (unsigned long)(dt->shared->u.atomic.offset));
if (dt->shared->u.atomic.prec != 8 * dt->shared->size)
- HDfprintf(stream, ", prec=%lu", (unsigned long)(dt->shared->u.atomic.prec));
+ fprintf(stream, ", prec=%lu", (unsigned long)(dt->shared->u.atomic.prec));
switch (dt->shared->type) {
case H5T_NO_CLASS:
@@ -292,7 +292,7 @@ H5T_debug(const H5T_t *dt, FILE *stream)
} /* end switch */
if (s1)
- HDfprintf(stream, ", %s", s1);
+ fprintf(stream, ", %s", s1);
break;
case H5T_FLOAT:
@@ -318,20 +318,20 @@ H5T_debug(const H5T_t *dt, FILE *stream)
break;
} /* end switch */
- HDfprintf(stream, ", sign=%lu+1", (unsigned long)(dt->shared->u.atomic.u.f.sign));
- HDfprintf(stream, ", mant=%lu+%lu (%s)", (unsigned long)(dt->shared->u.atomic.u.f.mpos),
- (unsigned long)(dt->shared->u.atomic.u.f.msize), s1);
- HDfprintf(stream, ", exp=%lu+%lu", (unsigned long)(dt->shared->u.atomic.u.f.epos),
- (unsigned long)(dt->shared->u.atomic.u.f.esize));
+ fprintf(stream, ", sign=%lu+1", (unsigned long)(dt->shared->u.atomic.u.f.sign));
+ fprintf(stream, ", mant=%lu+%lu (%s)", (unsigned long)(dt->shared->u.atomic.u.f.mpos),
+ (unsigned long)(dt->shared->u.atomic.u.f.msize), s1);
+ fprintf(stream, ", exp=%lu+%lu", (unsigned long)(dt->shared->u.atomic.u.f.epos),
+ (unsigned long)(dt->shared->u.atomic.u.f.esize));
tmp = dt->shared->u.atomic.u.f.ebias >> 32;
if (tmp) {
size_t hi = (size_t)tmp;
size_t lo = (size_t)(dt->shared->u.atomic.u.f.ebias & 0xffffffff);
- HDfprintf(stream, " bias=0x%08lx%08lx", (unsigned long)hi, (unsigned long)lo);
+ fprintf(stream, " bias=0x%08lx%08lx", (unsigned long)hi, (unsigned long)lo);
}
else {
size_t lo = (size_t)(dt->shared->u.atomic.u.f.ebias & 0xffffffff);
- HDfprintf(stream, " bias=0x%08lx", (unsigned long)lo);
+ fprintf(stream, " bias=0x%08lx", (unsigned long)lo);
}
break;
@@ -353,12 +353,12 @@ H5T_debug(const H5T_t *dt, FILE *stream)
else if (H5T_COMPOUND == dt->shared->type) {
/* Compound data type */
for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
- HDfprintf(stream, "\n\"%s\" @%lu", dt->shared->u.compnd.memb[i].name,
- (unsigned long)(dt->shared->u.compnd.memb[i].offset));
- HDfprintf(stream, " ");
+ fprintf(stream, "\n\"%s\" @%lu", dt->shared->u.compnd.memb[i].name,
+ (unsigned long)(dt->shared->u.compnd.memb[i].offset));
+ fprintf(stream, " ");
H5T_debug(dt->shared->u.compnd.memb[i].type, stream);
} /* end for */
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
}
else if (H5T_VLEN == dt->shared->type) {
switch (dt->shared->u.vlen.loc) {
@@ -367,54 +367,53 @@ H5T_debug(const H5T_t *dt, FILE *stream)
break;
case H5T_LOC_MEMORY:
- HDfprintf(stream, ", loc=memory");
+ fprintf(stream, ", loc=memory");
break;
case H5T_LOC_DISK:
- HDfprintf(stream, ", loc=disk");
+ fprintf(stream, ", loc=disk");
break;
case H5T_LOC_MAXLOC:
default:
- HDfprintf(stream, ", loc=UNKNOWN");
+ fprintf(stream, ", loc=UNKNOWN");
break;
} /* end switch */
if (H5T_IS_VL_STRING(dt->shared))
/* Variable length string datatype */
- HDfprintf(stream, ", variable-length");
+ fprintf(stream, ", variable-length");
else {
/* Variable length sequence datatype */
- HDfprintf(stream, " VLEN ");
+ fprintf(stream, " VLEN ");
H5T_debug(dt->shared->parent, stream);
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
} /* end else */
}
else if (H5T_ENUM == dt->shared->type) {
size_t base_size;
/* Enumeration data type */
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
H5T_debug(dt->shared->parent, stream);
base_size = dt->shared->parent->shared->size;
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
size_t k;
- HDfprintf(stream, "\n\"%s\" = 0x", dt->shared->u.enumer.name[i]);
+ fprintf(stream, "\n\"%s\" = 0x", dt->shared->u.enumer.name[i]);
for (k = 0; k < base_size; k++)
- HDfprintf(stream, "%02" PRIx8,
- *((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k));
+ fprintf(stream, "%02" PRIx8, *((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k));
} /* end for */
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
}
else if (H5T_OPAQUE == dt->shared->type) {
- HDfprintf(stream, ", tag=\"%s\"", dt->shared->u.opaque.tag);
+ fprintf(stream, ", tag=\"%s\"", dt->shared->u.opaque.tag);
}
else {
/* Unknown */
- HDfprintf(stream, "unknown class %d\n", (int)(dt->shared->type));
+ fprintf(stream, "unknown class %d\n", (int)(dt->shared->type));
}
- HDfprintf(stream, "}");
+ fprintf(stream, "}");
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index bf9b671..c837ae0 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -92,14 +92,14 @@ H5T__enum_create(const H5T_t *parent)
FUNC_ENTER_PACKAGE
- HDassert(parent);
+ assert(parent);
/* Build new type */
if (NULL == (ret_value = H5T__alloc()))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
ret_value->shared->type = H5T_ENUM;
ret_value->shared->parent = H5T_copy(parent, H5T_COPY_ALL);
- HDassert(ret_value->shared->parent);
+ assert(ret_value->shared->parent);
ret_value->shared->size = ret_value->shared->parent->shared->size;
done:
@@ -177,16 +177,15 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
FUNC_ENTER_PACKAGE
- HDassert(dt);
- HDassert(name && *name);
- HDassert(value);
+ assert(dt);
+ assert(name && *name);
+ assert(value);
/* The name and value had better not already exist */
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
if (!HDstrcmp(dt->shared->u.enumer.name[i], name))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "name redefinition")
- if (!HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value,
- dt->shared->size))
+ if (!memcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value, dt->shared->size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "value redefinition")
}
@@ -276,8 +275,8 @@ H5T__get_member_value(const H5T_t *dt, unsigned membno, void *value /*out*/)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(value);
+ assert(dt);
+ assert(value);
H5MM_memcpy(value, (uint8_t *)dt->shared->u.enumer.value + (membno * dt->shared->size), dt->shared->size);
@@ -365,9 +364,9 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt && H5T_ENUM == dt->shared->type);
- HDassert(value);
- HDassert(name || 0 == size);
+ assert(dt && H5T_ENUM == dt->shared->type);
+ assert(value);
+ assert(name || 0 == size);
if (name && size > 0)
*name = '\0';
@@ -387,8 +386,8 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t
rt = copied_dt->shared->u.enumer.nmembs;
while (lt < rt) {
md = (lt + rt) / 2;
- cmp = HDmemcmp(value, (uint8_t *)copied_dt->shared->u.enumer.value + (md * copied_dt->shared->size),
- copied_dt->shared->size);
+ cmp = memcmp(value, (uint8_t *)copied_dt->shared->u.enumer.value + (md * copied_dt->shared->size),
+ copied_dt->shared->size);
if (cmp < 0)
rt = md;
else if (cmp > 0)
@@ -495,9 +494,9 @@ H5T__enum_valueof(const H5T_t *dt, const char *name, void *value /*out*/)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt && H5T_ENUM == dt->shared->type);
- HDassert(name && *name);
- HDassert(value);
+ assert(dt && H5T_ENUM == dt->shared->type);
+ assert(name && *name);
+ assert(value);
/* Sanity check */
if (dt->shared->u.enumer.nmembs == 0)
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index 9317ab9..c9ed237 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -85,7 +85,7 @@ H5T_get_nmembers(const H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
+ assert(dt);
if (H5T_COMPOUND == dt->shared->type)
ret_value = (int)dt->shared->u.compnd.nmembs;
@@ -161,7 +161,7 @@ H5T__get_member_name(H5T_t const *dt, unsigned membno)
FUNC_ENTER_PACKAGE
- HDassert(dt);
+ assert(dt);
switch (dt->shared->type) {
case H5T_COMPOUND:
@@ -222,7 +222,7 @@ H5Tget_member_index(hid_t type_id, const char *name)
H5TRACE2("Is", "i*s", type_id, name);
/* Check arguments */
- HDassert(name);
+ assert(name);
if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
@@ -287,8 +287,8 @@ H5T__sort_value(const H5T_t *dt, int *map)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(dt);
- HDassert(H5T_COMPOUND == dt->shared->type || H5T_ENUM == dt->shared->type);
+ assert(dt);
+ assert(H5T_COMPOUND == dt->shared->type || H5T_ENUM == dt->shared->type);
/* Use a bubble sort because we can short circuit */
if (H5T_COMPOUND == dt->shared->type) {
@@ -314,7 +314,7 @@ H5T__sort_value(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < (nmembs - 1); i++)
- HDassert(dt->shared->u.compnd.memb[i].offset < dt->shared->u.compnd.memb[i + 1].offset);
+ assert(dt->shared->u.compnd.memb[i].offset < dt->shared->u.compnd.memb[i + 1].offset);
#endif
} /* end if */
}
@@ -323,11 +323,11 @@ H5T__sort_value(const H5T_t *dt, int *map)
dt->shared->u.enumer.sorted = H5T_SORT_VALUE;
nmembs = dt->shared->u.enumer.nmembs;
size = dt->shared->size;
- HDassert(size <= sizeof(tbuf));
+ assert(size <= sizeof(tbuf));
for (i = (nmembs - 1), swapped = TRUE; i > 0 && swapped; --i) {
for (j = 0, swapped = FALSE; j < i; j++) {
- if (HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (j * size),
- (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) {
+ if (memcmp((uint8_t *)dt->shared->u.enumer.value + (j * size),
+ (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) {
/* Swap names */
char *tmp = dt->shared->u.enumer.name[j];
dt->shared->u.enumer.name[j] = dt->shared->u.enumer.name[j + 1];
@@ -354,8 +354,8 @@ H5T__sort_value(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < (nmembs - 1); i++)
- HDassert(HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * size),
- (uint8_t *)dt->shared->u.enumer.value + ((i + 1) * size), size) < 0);
+ assert(memcmp((uint8_t *)dt->shared->u.enumer.value + (i * size),
+ (uint8_t *)dt->shared->u.enumer.value + ((i + 1) * size), size) < 0);
#endif
} /* end if */
} /* end else */
@@ -390,8 +390,8 @@ H5T__sort_name(const H5T_t *dt, int *map)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(dt);
- HDassert(H5T_COMPOUND == dt->shared->type || H5T_ENUM == dt->shared->type);
+ assert(dt);
+ assert(H5T_COMPOUND == dt->shared->type || H5T_ENUM == dt->shared->type);
/* Use a bubble sort because we can short circuit */
if (H5T_COMPOUND == dt->shared->type) {
@@ -417,8 +417,8 @@ H5T__sort_name(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < nmembs - 1; i++) {
- HDassert(HDstrcmp(dt->shared->u.compnd.memb[i].name, dt->shared->u.compnd.memb[i + 1].name) <
- 0);
+ assert(HDstrcmp(dt->shared->u.compnd.memb[i].name, dt->shared->u.compnd.memb[i + 1].name) <
+ 0);
}
#endif
}
@@ -428,7 +428,7 @@ H5T__sort_name(const H5T_t *dt, int *map)
dt->shared->u.enumer.sorted = H5T_SORT_NAME;
nmembs = dt->shared->u.enumer.nmembs;
size = dt->shared->size;
- HDassert(size <= sizeof(tbuf));
+ assert(size <= sizeof(tbuf));
for (i = nmembs - 1, swapped = TRUE; i > 0 && swapped; --i) {
for (j = 0, swapped = FALSE; j < i; j++) {
if (HDstrcmp(dt->shared->u.enumer.name[j], dt->shared->u.enumer.name[j + 1]) > 0) {
@@ -457,7 +457,7 @@ H5T__sort_name(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < nmembs - 1; i++)
- HDassert(HDstrcmp(dt->shared->u.enumer.name[i], dt->shared->u.enumer.name[i + 1]) < 0);
+ assert(HDstrcmp(dt->shared->u.enumer.name[i], dt->shared->u.enumer.name[i + 1]) < 0);
#endif
}
}
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index 9bf7da3..02b158b 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -77,7 +77,7 @@ H5T_get_sign(H5T_t const *dt)
FUNC_ENTER_NOAPI(H5T_SGN_ERROR)
- HDassert(dt);
+ assert(dt);
/* Defer to parent */
while (dt->shared->parent)
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 5fe4998..71ff1ee 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -141,7 +141,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
FUNC_ENTER_PACKAGE
- HDassert(dtype);
+ assert(dtype);
if (H5T_NO_CLASS == (h5_class = H5T_get_class(dtype, FALSE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid class")
@@ -668,7 +668,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
} /* end switch */
/* Create new native type */
- HDassert(tid >= 0);
+ assert(tid >= 0);
if (NULL == (dt = (H5T_t *)H5I_object(tid)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
@@ -724,7 +724,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
FUNC_ENTER_PACKAGE
- HDassert(size > 0);
+ assert(size > 0);
if (direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
if (size <= sizeof(float)) {
@@ -782,7 +782,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
} /* end switch */
/* Create new native type */
- HDassert(tid >= 0);
+ assert(tid >= 0);
if (NULL == (dt = (H5T_t *)H5I_object(tid)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
if ((ret_value = H5T_copy(dt, H5T_COPY_TRANSIENT)) == NULL)
@@ -883,7 +883,7 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction, size_t *struct_
}
/* Create new native type */
- HDassert(tid >= 0);
+ assert(tid >= 0);
if (NULL == (dt = (H5T_t *)H5I_object(tid)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
diff --git a/src/H5Toffset.c b/src/H5Toffset.c
index 99f3aa0..a99aedb 100644
--- a/src/H5Toffset.c
+++ b/src/H5Toffset.c
@@ -232,12 +232,12 @@ H5T__set_offset(const H5T_t *dt, size_t offset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt);
- HDassert(H5T_STRING != dt->shared->type || 0 == offset);
- HDassert(H5T_REFERENCE != dt->shared->type);
- HDassert(H5T_OPAQUE != dt->shared->type);
- HDassert(H5T_COMPOUND != dt->shared->type);
- HDassert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
+ assert(dt);
+ assert(H5T_STRING != dt->shared->type || 0 == offset);
+ assert(H5T_REFERENCE != dt->shared->type);
+ assert(H5T_OPAQUE != dt->shared->type);
+ assert(H5T_COMPOUND != dt->shared->type);
+ assert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
if (H5T__set_offset(dt->shared->parent, offset) < 0)
diff --git a/src/H5Toh.c b/src/H5Toh.c
index a1891a6..50c0236 100644
--- a/src/H5Toh.c
+++ b/src/H5Toh.c
@@ -93,7 +93,7 @@ H5O__dtype_isa(const H5O_t *oh)
FUNC_ENTER_PACKAGE
- HDassert(oh);
+ assert(oh);
if ((ret_value = H5O_msg_exists_oh(oh, H5O_DTYPE_ID)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to read object header")
@@ -123,7 +123,7 @@ H5O__dtype_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
FUNC_ENTER_PACKAGE
- HDassert(obj_loc);
+ assert(obj_loc);
*opened_type = H5I_DATATYPE;
@@ -163,9 +163,9 @@ H5O__dtype_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(crt_info);
- HDassert(obj_loc);
+ assert(f);
+ assert(crt_info);
+ assert(obj_loc);
/* Commit the type to the file */
if (H5T__commit(f, crt_info->dt, crt_info->tcpl_id) < 0)
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index 4505ea3..b26168c 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -193,12 +193,12 @@ H5T__set_precision(const H5T_t *dt, size_t prec)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt);
- HDassert(prec > 0);
- HDassert(H5T_OPAQUE != dt->shared->type);
- HDassert(H5T_COMPOUND != dt->shared->type);
- HDassert(H5T_STRING != dt->shared->type);
- HDassert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
+ assert(dt);
+ assert(prec > 0);
+ assert(H5T_OPAQUE != dt->shared->type);
+ assert(H5T_COMPOUND != dt->shared->type);
+ assert(H5T_STRING != dt->shared->type);
+ assert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
if (H5T__set_precision(dt->shared->parent, prec) < 0)
diff --git a/src/H5Tref.c b/src/H5Tref.c
index f96d181..0f59715 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -45,10 +45,10 @@
#ifdef H5T_REF_DEBUG
#define H5T_REF_LOG_DEBUG(...) \
do { \
- HDfprintf(stdout, " # %s(): ", __func__); \
- HDfprintf(stdout, __VA_ARGS__); \
- HDfprintf(stdout, "\n"); \
- HDfflush(stdout); \
+ fprintf(stdout, " # %s(): ", __func__); \
+ fprintf(stdout, __VA_ARGS__); \
+ fprintf(stdout, "\n"); \
+ fflush(stdout); \
} while (0)
#else
#define H5T_REF_LOG_DEBUG(...) \
@@ -163,9 +163,9 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("loc=%d", (int)loc);
- HDassert(dt);
+ assert(dt);
/* f is NULL when loc == H5T_LOC_MEMORY */
- HDassert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
+ assert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
/* Only change the location if it's different */
if (loc == dt->shared->u.atomic.u.r.loc && file == dt->shared->u.atomic.u.r.file)
@@ -219,7 +219,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
break;
case H5T_LOC_DISK: /* Disk based reference datatype */
- HDassert(file);
+ assert(file);
/* Mark this type as being stored on disk */
dt->shared->u.atomic.u.r.loc = H5T_LOC_DISK;
@@ -244,7 +244,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
"can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -272,7 +272,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
"can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -302,7 +302,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get container info")
/* Retrieve min encode size (when references have no vlen part) */
- HDmemset(&fixed_ref, 0, sizeof(fixed_ref));
+ memset(&fixed_ref, 0, sizeof(fixed_ref));
fixed_ref.type = (int8_t)H5R_OBJECT2;
fixed_ref.token_size = (uint8_t)cont_info.token_size;
if (H5R__encode(NULL, &fixed_ref, NULL, &ref_encode_size, 0) < 0)
@@ -366,10 +366,10 @@ H5T__ref_mem_isnull(const H5VL_object_t H5_ATTR_UNUSED *src_file, const void *sr
H5T_REF_LOG_DEBUG("");
/* Check parameters */
- HDassert(src_buf);
- HDassert(isnull);
+ assert(src_buf);
+ assert(isnull);
- *isnull = (0 == HDmemcmp(src_buf, zeros, H5T_REF_MEM_SIZE)) ? TRUE : FALSE;
+ *isnull = (0 == memcmp(src_buf, zeros, H5T_REF_MEM_SIZE)) ? TRUE : FALSE;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__ref_mem_isnull() */
@@ -391,7 +391,7 @@ H5T__ref_mem_setnull(H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, H5_A
FUNC_ENTER_PACKAGE_NOERR
H5T_REF_LOG_DEBUG("");
- HDmemset(dst_buf, 0, H5T_REF_MEM_SIZE);
+ memset(dst_buf, 0, H5T_REF_MEM_SIZE);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__ref_mem_setnull() */
@@ -420,8 +420,8 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf
H5T_REF_LOG_DEBUG("");
/* Sanity check */
- HDassert(src_buf);
- HDassert(src_size == H5T_REF_MEM_SIZE);
+ assert(src_buf);
+ assert(src_size == H5T_REF_MEM_SIZE);
if (NULL != dst_file) {
hbool_t files_equal = TRUE; /* Whether src & dst references are in same file */
@@ -540,10 +540,10 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s
H5T_REF_LOG_DEBUG("");
/* Sanity check */
- HDassert(src_buf);
- HDassert(src_size == H5T_REF_MEM_SIZE);
- HDassert(dst_buf);
- HDassert(dst_size);
+ assert(src_buf);
+ assert(src_size == H5T_REF_MEM_SIZE);
+ assert(dst_buf);
+ assert(dst_size);
/* Memory-to-memory conversion to support vlen conversion */
if (NULL == dst_file) {
@@ -651,10 +651,10 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
H5T_REF_LOG_DEBUG("");
/* Sanity check */
- HDassert(src_buf);
- HDassert(src_size);
- HDassert(dst_buf);
- HDassert(dst_size == H5T_REF_MEM_SIZE);
+ assert(src_buf);
+ assert(src_size);
+ assert(dst_buf);
+ assert(dst_size == H5T_REF_MEM_SIZE);
HDcompile_assert(sizeof(*dst_ref) == sizeof(tmp_ref));
/* Memory-to-memory conversion to support vlen conversion */
@@ -672,7 +672,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -681,7 +681,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
/* Make sure reference buffer is correctly initialized */
- HDmemset(&tmp_ref, 0, sizeof(tmp_ref));
+ memset(&tmp_ref, 0, sizeof(tmp_ref));
switch (src_type) {
case H5R_OBJECT1: {
@@ -719,7 +719,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
case H5R_BADTYPE:
case H5R_MAXTYPE:
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -736,7 +736,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
} /* end if */
/* Set output info */
- HDmemcpy(dst_ref, &tmp_ref, sizeof(tmp_ref));
+ memcpy(dst_ref, &tmp_ref, sizeof(tmp_ref));
done:
if ((file_id != H5I_INVALID_HID) && (H5I_dec_ref(file_id) < 0))
@@ -772,9 +772,9 @@ H5T__ref_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t
H5T_REF_LOG_DEBUG("");
/* Check parameters */
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(isnull);
+ assert(src_file);
+ assert(src_buf);
+ assert(isnull);
/* Try to check encoded reference type */
ref_type = (H5R_type_t)*p++;
@@ -822,8 +822,8 @@ H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf)
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(dst_file);
- HDassert(dst_buf);
+ assert(dst_file);
+ assert(dst_buf);
/* TODO Should get rid of bg stuff */
if (p_bg) {
@@ -839,7 +839,7 @@ H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf)
} /* end if */
/* Copy header manually so that it does not get encoded into the blob */
- HDmemset(q, 0, H5R_ENCODE_HEADER_SIZE);
+ memset(q, 0, H5R_ENCODE_HEADER_SIZE);
q += H5R_ENCODE_HEADER_SIZE;
/* Set the size */
@@ -877,7 +877,7 @@ H5T__ref_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_bu
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_buf);
+ assert(src_buf);
/* Set reference type */
ref_type = (H5R_type_t)*p++;
@@ -926,10 +926,10 @@ H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(dst_buf);
- HDassert(dst_size);
+ assert(src_file);
+ assert(src_buf);
+ assert(dst_buf);
+ assert(dst_size);
/* Copy header manually */
H5MM_memcpy(q, p, H5R_ENCODE_HEADER_SIZE);
@@ -939,7 +939,7 @@ H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_
/* Skip the size */
p += sizeof(uint32_t);
- HDassert(src_size > (H5R_ENCODE_HEADER_SIZE + sizeof(uint32_t)));
+ assert(src_size > (H5R_ENCODE_HEADER_SIZE + sizeof(uint32_t)));
/* Retrieve blob */
if (H5VL_blob_get(src_file, p, q, blob_size, NULL) < 0)
@@ -971,10 +971,10 @@ H5T__ref_disk_write(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_buf);
- HDassert(src_size);
- HDassert(dst_file);
- HDassert(dst_buf);
+ assert(src_buf);
+ assert(src_size);
+ assert(dst_file);
+ assert(dst_buf);
/* TODO Should get rid of bg stuff */
if (p_bg) {
@@ -985,7 +985,7 @@ H5T__ref_disk_write(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
#ifndef NDEBUG
size_t p_buf_size_left = dst_size;
- HDassert(p_buf_size_left > (sizeof(uint32_t) + H5R_ENCODE_HEADER_SIZE));
+ assert(p_buf_size_left > (sizeof(uint32_t) + H5R_ENCODE_HEADER_SIZE));
#endif
/* Set up VOL callback arguments */
@@ -1041,9 +1041,9 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo
H5T_REF_LOG_DEBUG("");
/* Check parameters */
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(isnull);
+ assert(src_file);
+ assert(src_buf);
+ assert(isnull);
#ifndef NDEBUG
{
@@ -1054,7 +1054,7 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1092,8 +1092,8 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_file);
- HDassert(src_buf);
+ assert(src_file);
+ assert(src_buf);
#ifndef NDEBUG
{
@@ -1104,7 +1104,7 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1112,7 +1112,7 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr
if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object")
- HDassert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f));
+ assert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f));
ret_value = H5T_REF_OBJ_DISK_SIZE(src_f);
@@ -1139,9 +1139,9 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(dst_buf);
+ assert(src_file);
+ assert(src_buf);
+ assert(dst_buf);
#ifndef NDEBUG
{
@@ -1152,7 +1152,7 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1160,8 +1160,8 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_
if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
- HDassert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f));
- HDassert(dst_size == H5F_SIZEOF_ADDR(src_f));
+ assert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f));
+ assert(dst_size == H5F_SIZEOF_ADDR(src_f));
/* Get object address */
if (H5R__decode_token_obj_compat((const unsigned char *)src_buf, &src_size, (H5O_token_t *)dst_buf,
@@ -1193,9 +1193,9 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf,
H5T_REF_LOG_DEBUG("");
/* Check parameters */
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(isnull);
+ assert(src_file);
+ assert(src_buf);
+ assert(isnull);
#ifndef NDEBUG
{
@@ -1206,7 +1206,7 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1247,7 +1247,7 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void
#endif
H5T_REF_LOG_DEBUG("");
- HDassert(src_buf);
+ assert(src_buf);
#ifndef NDEBUG
{
@@ -1259,13 +1259,13 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
/* Retrieve file from VOL object */
if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object")
- HDassert(src_size == H5T_REF_DSETREG_DISK_SIZE(src_f));
+ assert(src_size == H5T_REF_DSETREG_DISK_SIZE(src_f));
}
#endif /* NDEBUG */
@@ -1296,10 +1296,10 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(dst_buf);
- HDassert(dst_size == sizeof(struct H5Tref_dsetreg));
+ assert(src_file);
+ assert(src_buf);
+ assert(dst_buf);
+ assert(dst_size == sizeof(struct H5Tref_dsetreg));
#ifndef NDEBUG
{
@@ -1310,7 +1310,7 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1318,7 +1318,7 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t
if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
- HDassert(src_size == H5T_REF_DSETREG_DISK_SIZE(src_f));
+ assert(src_size == H5T_REF_DSETREG_DISK_SIZE(src_f));
/* Retrieve object address and space */
if (H5R__decode_token_region_compat(src_f, (const unsigned char *)src_buf, &src_size, &dst_reg->token,
@@ -1347,8 +1347,8 @@ H5T__ref_reclaim(void *elem, const H5T_t *dt)
H5T_REF_LOG_DEBUG("");
/* Sanity checks */
- HDassert(elem);
- HDassert(dt && (dt->shared->type == H5T_REFERENCE));
+ assert(elem);
+ assert(dt && (dt->shared->type == H5T_REFERENCE));
if (dt->shared->u.atomic.u.r.opaque && H5R__destroy((H5R_ref_priv_t *)elem) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "cannot free reference")
diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c
index f5ee19a..f5d1ec7 100644
--- a/src/H5Tvisit.c
+++ b/src/H5Tvisit.c
@@ -91,8 +91,8 @@ H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dt);
- HDassert(op);
+ assert(dt);
+ assert(op);
/* Check for complex datatype */
is_complex = H5T_IS_COMPLEX(dt->shared->type);
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 0fcf8c9..c1d6072 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -191,7 +191,7 @@ H5T__vlen_create(const H5T_t *base)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base);
+ assert(base);
/* Build new type */
if (NULL == (dt = H5T__alloc()))
@@ -251,14 +251,14 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(dt);
- HDassert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
+ assert(dt);
+ assert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
/* Only change the location if it's different */
if (loc != dt->shared->u.vlen.loc || file != dt->shared->u.vlen.file) {
switch (loc) {
case H5T_LOC_MEMORY: /* Memory based VL datatype */
- HDassert(NULL == file);
+ assert(NULL == file);
/* Mark this type as being stored in memory */
dt->shared->u.vlen.loc = H5T_LOC_MEMORY;
@@ -278,7 +278,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
dt->shared->u.vlen.cls = &H5T_vlen_mem_str_g;
} /* end else-if */
else
- HDassert(0 && "Invalid VL type");
+ assert(0 && "Invalid VL type");
/* Release owned file */
if (dt->shared->owned_vol_obj) {
@@ -296,7 +296,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
H5VL_file_get_args_t vol_cb_args; /* Arguments to VOL callback */
- HDassert(file);
+ assert(file);
/* Mark this type as being stored on disk */
dt->shared->u.vlen.loc = H5T_LOC_DISK;
@@ -373,13 +373,13 @@ H5T__vlen_mem_seq_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
FUNC_ENTER_PACKAGE_NOERR
/* Check parameter */
- HDassert(_vl);
- HDassert(len);
+ assert(_vl);
+ assert(len);
/* Copy to ensure correct alignment. memcpy is best here because
* it optimizes to fast code.
*/
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
*len = vl.len;
@@ -406,9 +406,9 @@ H5T__vlen_mem_seq_getptr(void *_vl)
FUNC_ENTER_PACKAGE_NOERR
/* check parameters, return result */
- HDassert(_vl);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
FUNC_LEAVE_NOAPI(vl.p)
} /* end H5T__vlen_mem_seq_getptr() */
@@ -433,10 +433,10 @@ H5T__vlen_mem_seq_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hb
FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
- HDassert(_vl);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
*isnull = ((vl.len == 0 || vl.p == NULL) ? TRUE : FALSE);
@@ -463,7 +463,7 @@ H5T__vlen_mem_seq_setnull(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void H5
FUNC_ENTER_PACKAGE_NOERR
/* check parameters */
- HDassert(_vl);
+ assert(_vl);
/* Set the "nil" hvl_t */
vl.len = 0;
@@ -495,11 +495,11 @@ H5T__vlen_mem_seq_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf,
FUNC_ENTER_PACKAGE_NOERR
/* check parameters, copy data */
- HDassert(buf);
- HDassert(_vl);
+ assert(buf);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
- HDassert(vl.p);
+ memcpy(&vl, _vl, sizeof(hvl_t));
+ assert(vl.p);
H5MM_memcpy(buf, vl.p, len);
@@ -528,8 +528,8 @@ H5T__vlen_mem_seq_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(_vl);
- HDassert(buf);
+ assert(_vl);
+ assert(buf);
if (seq_len) {
size_t len = seq_len * base_size; /* Sequence size */
@@ -541,7 +541,7 @@ H5T__vlen_mem_seq_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
"application memory allocation routine failed for VL data")
} /* end if */
else /* Default to system malloc */
- if (NULL == (vl.p = HDmalloc(len)))
+ if (NULL == (vl.p = malloc(len)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data")
/* Copy the data into the newly allocated buffer */
@@ -580,10 +580,10 @@ H5T__vlen_mem_str_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
FUNC_ENTER_PACKAGE_NOERR
/* check parameters */
- HDassert(_vl);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
*len = HDstrlen(s);
@@ -610,9 +610,9 @@ H5T__vlen_mem_str_getptr(void *_vl)
FUNC_ENTER_PACKAGE_NOERR
/* check parameters */
- HDassert(_vl);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
FUNC_LEAVE_NOAPI(s)
} /* end H5T__vlen_mem_str_getptr() */
@@ -637,7 +637,7 @@ H5T__vlen_mem_str_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hb
FUNC_ENTER_PACKAGE_NOERR
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
*isnull = (s == NULL ? TRUE : FALSE);
@@ -690,10 +690,10 @@ H5T__vlen_mem_str_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf,
if (len > 0) {
/* check parameters */
- HDassert(buf);
- HDassert(_vl);
+ assert(buf);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
H5MM_memcpy(buf, s, len);
} /* end if */
@@ -724,7 +724,7 @@ H5T__vlen_mem_str_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(buf);
+ assert(buf);
/* Use the user's memory allocation routine if one is defined */
if (vl_alloc_info->alloc_func != NULL) {
@@ -734,7 +734,7 @@ H5T__vlen_mem_str_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
"application memory allocation routine failed for VL data")
} /* end if */
else /* Default to system malloc */
- if (NULL == (t = (char *)HDmalloc((seq_len + 1) * base_size)))
+ if (NULL == (t = (char *)malloc((seq_len + 1) * base_size)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data")
/* 'write' the string into the buffer, with memcpy() */
@@ -769,8 +769,8 @@ H5T__vlen_disk_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, size_
FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
- HDassert(vl);
- HDassert(seq_len);
+ assert(vl);
+ assert(seq_len);
/* Get length of sequence (different from blob size) */
UINT32DECODE(vl, *seq_len);
@@ -800,9 +800,9 @@ H5T__vlen_disk_isnull(const H5VL_object_t *file, void *_vl, hbool_t *isnull)
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(file);
- HDassert(vl);
- HDassert(isnull);
+ assert(file);
+ assert(vl);
+ assert(isnull);
/* Skip the sequence's length */
vl += 4;
@@ -841,8 +841,8 @@ H5T__vlen_disk_setnull(H5VL_object_t *file, void *_vl, void *bg)
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(file);
- HDassert(vl);
+ assert(file);
+ assert(vl);
/* Free heap object for old data */
if (bg != NULL)
@@ -885,9 +885,9 @@ H5T__vlen_disk_read(H5VL_object_t *file, void *_vl, void *buf, size_t len)
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(file);
- HDassert(vl);
- HDassert(buf);
+ assert(file);
+ assert(vl);
+ assert(buf);
/* Skip the length of the sequence */
vl += 4;
@@ -923,9 +923,9 @@ H5T__vlen_disk_write(H5VL_object_t *file, const H5T_vlen_alloc_info_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(vl);
- HDassert(seq_len == 0 || buf);
- HDassert(file);
+ assert(vl);
+ assert(seq_len == 0 || buf);
+ assert(file);
/* Free heap object for old data, if non-NULL */
if (bg != NULL)
@@ -964,7 +964,7 @@ H5T__vlen_disk_delete(H5VL_object_t *file, void *_vl)
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(file);
+ assert(file);
/* Free heap object for old data */
if (vl != NULL) {
@@ -1012,9 +1012,9 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(elem);
- HDassert(dt);
- HDassert(alloc_info);
+ assert(elem);
+ assert(dt);
+ assert(alloc_info);
free_func = alloc_info->free_func;
free_info = alloc_info->free_info;
@@ -1074,7 +1074,7 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info
if (free_func != NULL)
(*free_func)(vl->p, free_info);
else
- HDfree(vl->p);
+ free(vl->p);
} /* end if */
}
else if (dt->shared->u.vlen.type == H5T_VLEN_STRING) {
@@ -1082,10 +1082,10 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info
if (free_func != NULL)
(*free_func)(*(char **)elem, free_info);
else
- HDfree(*(char **)elem);
+ free(*(char **)elem);
}
else {
- HDassert(0 && "Invalid VL type");
+ assert(0 && "Invalid VL type");
} /* end else */
break;
@@ -1135,8 +1135,8 @@ H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt)
H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */
herr_t ret_value = SUCCEED; /* return value */
- HDassert(dt);
- HDassert(elem);
+ assert(dt);
+ assert(elem);
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5UC.c b/src/H5UC.c
index 22e35e5..60a4456 100644
--- a/src/H5UC.c
+++ b/src/H5UC.c
@@ -58,8 +58,8 @@ H5UC_create(void *o, H5UC_free_func_t free_func)
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(o);
- HDassert(free_func);
+ assert(o);
+ assert(free_func);
/* Allocate ref-counted string structure */
if (NULL == (ret_value = H5FL_MALLOC(H5UC_t)))
@@ -101,10 +101,10 @@ H5UC_decr(H5UC_t *rc)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(rc);
- HDassert(rc->o);
- HDassert(rc->n > 0);
- HDassert(rc->free_func);
+ assert(rc);
+ assert(rc->o);
+ assert(rc->n > 0);
+ assert(rc->free_func);
/* Decrement reference count */
rc->n--;
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index 8191d29..d5bdb50 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -392,7 +392,7 @@ H5VL_copy_connector_info(const H5VL_class_t *connector, void **dst_info, const v
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(connector);
+ assert(connector);
/* Check for actual source info */
if (src_info) {
@@ -469,8 +469,8 @@ H5VL_cmp_connector_info(const H5VL_class_t *connector, int *cmp_value, const voi
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(connector);
- HDassert(cmp_value);
+ assert(connector);
+ assert(cmp_value);
/* Take care of cases where one or both pointers is NULL */
if (info1 == NULL && info2 != NULL) {
@@ -495,8 +495,8 @@ H5VL_cmp_connector_info(const H5VL_class_t *connector, int *cmp_value, const voi
HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector info")
} /* end if */
else {
- HDassert(connector->info_cls.size > 0);
- *cmp_value = HDmemcmp(info1, info2, connector->info_cls.size);
+ assert(connector->info_cls.size > 0);
+ *cmp_value = memcmp(info1, info2, connector->info_cls.size);
} /* end else */
done:
@@ -558,7 +558,7 @@ H5VL_free_connector_info(hid_t connector_id, const void *info)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(connector_id > 0);
+ assert(connector_id > 0);
/* Check args and get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -726,14 +726,14 @@ H5VL_get_wrap_ctx(const H5VL_class_t *connector, void *obj, void **wrap_ctx)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(connector);
- HDassert(obj);
- HDassert(wrap_ctx);
+ assert(connector);
+ assert(obj);
+ assert(wrap_ctx);
/* Allow the connector to copy or do it ourselves */
if (connector->wrap_cls.get_wrap_ctx) {
/* Sanity check */
- HDassert(connector->wrap_cls.free_wrap_ctx);
+ assert(connector->wrap_cls.free_wrap_ctx);
/* Invoke connector's callback */
if ((connector->wrap_cls.get_wrap_ctx)(obj, wrap_ctx) < 0)
@@ -795,8 +795,8 @@ H5VL_wrap_object(const H5VL_class_t *connector, void *wrap_ctx, void *obj, H5I_t
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(connector);
- HDassert(obj);
+ assert(connector);
+ assert(obj);
/* Only wrap object if there's a wrap context */
if (wrap_ctx) {
@@ -862,8 +862,8 @@ H5VL_unwrap_object(const H5VL_class_t *connector, void *obj)
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(connector);
- HDassert(obj);
+ assert(connector);
+ assert(obj);
/* Only unwrap object if there's an unwrap callback */
if (connector->wrap_cls.wrap_object) {
@@ -929,7 +929,7 @@ H5VL_free_wrap_ctx(const H5VL_class_t *connector, void *wrap_ctx)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(connector);
+ assert(connector);
/* Only free wrap context, if it's non-NULL */
if (wrap_ctx) {
@@ -1769,7 +1769,7 @@ H5VL_attr_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Call the corresponding internal VOL routine */
if (H5VL__attr_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0)
@@ -2075,8 +2075,8 @@ H5VL_dataset_read_direct(size_t count, void *obj[], H5VL_t *connector, hid_t mem
FUNC_ENTER_NOAPI(FAIL)
- HDassert(obj);
- HDassert(connector);
+ assert(obj);
+ assert(connector);
/* Set wrapper info in API context */
tmp_vol_obj.data = obj[0];
@@ -2121,8 +2121,8 @@ H5VL_dataset_read(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_i
FUNC_ENTER_NOAPI(FAIL)
- HDassert(vol_obj);
- HDassert(vol_obj[0]);
+ assert(vol_obj);
+ assert(vol_obj[0]);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj[0]) < 0)
@@ -2265,8 +2265,8 @@ H5VL_dataset_write_direct(size_t count, void *obj[], H5VL_t *connector, hid_t me
FUNC_ENTER_NOAPI(FAIL)
- HDassert(obj);
- HDassert(connector);
+ assert(obj);
+ assert(connector);
/* Set wrapper info in API context */
tmp_vol_obj.data = obj[0];
@@ -2311,8 +2311,8 @@ H5VL_dataset_write(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_
FUNC_ENTER_NOAPI(FAIL)
- HDassert(vol_obj);
- HDassert(vol_obj[0]);
+ assert(vol_obj);
+ assert(vol_obj[0]);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj[0]) < 0)
@@ -2759,8 +2759,8 @@ H5VL__dataset_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **re
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
+ assert(obj);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->dataset_cls.close)
@@ -2793,10 +2793,10 @@ H5VL_dataset_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(vol_obj->data);
- HDassert(vol_obj->connector);
- HDassert(vol_obj->connector->cls);
+ assert(vol_obj);
+ assert(vol_obj->data);
+ assert(vol_obj->connector);
+ assert(vol_obj->connector->cls);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -3341,7 +3341,7 @@ H5VL_datatype_optional_op(H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hi
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set up vol_obj_ptr */
*vol_obj_ptr = vol_obj;
@@ -3712,11 +3712,11 @@ H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_in
FUNC_ENTER_PACKAGE
- HDassert(udata);
- HDassert(udata->filename);
- HDassert(udata->connector_prop);
- HDassert(cls);
- HDassert(plugin_type == H5PL_TYPE_VOL);
+ assert(udata);
+ assert(udata->filename);
+ assert(udata->connector_prop);
+ assert(cls);
+ assert(plugin_type == H5PL_TYPE_VOL);
/* Silence compiler */
(void)plugin_type;
@@ -4066,7 +4066,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args
if (args->op_type == H5VL_FILE_IS_ACCESSIBLE)
fapl_id = args->args.is_accessible.fapl_id;
else {
- HDassert(args->op_type == H5VL_FILE_DELETE);
+ assert(args->op_type == H5VL_FILE_DELETE);
fapl_id = args->args.del.fapl_id;
}
@@ -4083,7 +4083,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args
/* Set wrapper info in API context, for all other operations */
else {
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
@@ -4298,8 +4298,8 @@ H5VL__file_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
+ assert(obj);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->file_cls.close)
@@ -4943,8 +4943,8 @@ H5VL__group_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req)
herr_t ret_value = SUCCEED; /* Return value */
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
+ assert(obj);
+ assert(cls);
FUNC_ENTER_PACKAGE
@@ -6319,10 +6319,10 @@ H5VL__introspect_get_conn_cls(void *obj, const H5VL_class_t *cls, H5VL_get_conn_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(lvl >= H5VL_GET_CONN_LVL_CURR && lvl <= H5VL_GET_CONN_LVL_TERM);
- HDassert(conn_cls);
+ assert(obj);
+ assert(cls);
+ assert(lvl >= H5VL_GET_CONN_LVL_CURR && lvl <= H5VL_GET_CONN_LVL_TERM);
+ assert(conn_cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->introspect_cls.get_conn_cls)
@@ -6431,8 +6431,8 @@ H5VL_introspect_get_cap_flags(const void *info, const H5VL_class_t *cls, uint64_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(cls);
- HDassert(cap_flags);
+ assert(cls);
+ assert(cap_flags);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->introspect_cls.get_cap_flags)
@@ -6600,9 +6600,9 @@ H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5VL_re
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(req);
- HDassert(cls);
- HDassert(status);
+ assert(req);
+ assert(cls);
+ assert(status);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.wait)
@@ -6635,7 +6635,7 @@ H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5VL_request_s
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -6704,8 +6704,8 @@ H5VL__request_notify(void *req, const H5VL_class_t *cls, H5VL_request_notify_t c
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.notify)
@@ -6739,7 +6739,7 @@ H5VL_request_notify(const H5VL_object_t *vol_obj, H5VL_request_notify_t cb, void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -6808,8 +6808,8 @@ H5VL__request_cancel(void *req, const H5VL_class_t *cls, H5VL_request_status_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.cancel)
@@ -6842,7 +6842,7 @@ H5VL_request_cancel(const H5VL_object_t *vol_obj, H5VL_request_status_t *status)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -6910,8 +6910,8 @@ H5VL__request_specific(void *req, const H5VL_class_t *cls, H5VL_request_specific
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.specific)
@@ -6945,7 +6945,7 @@ H5VL_request_specific(const H5VL_object_t *vol_obj, H5VL_request_specific_args_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -7015,8 +7015,8 @@ H5VL__request_optional(void *req, const H5VL_class_t *cls, H5VL_optional_args_t
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.optional)
@@ -7050,7 +7050,7 @@ H5VL_request_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -7157,8 +7157,8 @@ H5VL__request_free(void *req, const H5VL_class_t *cls)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.free)
@@ -7191,7 +7191,7 @@ H5VL_request_free(const H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -7258,10 +7258,10 @@ H5VL__blob_put(void *obj, const H5VL_class_t *cls, const void *buf, size_t size,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(size == 0 || buf);
- HDassert(blob_id);
+ assert(obj);
+ assert(cls);
+ assert(size == 0 || buf);
+ assert(blob_id);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->blob_cls.put)
@@ -7295,9 +7295,9 @@ H5VL_blob_put(const H5VL_object_t *vol_obj, const void *buf, size_t size, void *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(size == 0 || buf);
- HDassert(blob_id);
+ assert(vol_obj);
+ assert(size == 0 || buf);
+ assert(blob_id);
/* Call the corresponding VOL callback */
if (H5VL__blob_put(vol_obj->data, vol_obj->connector->cls, buf, size, blob_id, ctx) < 0)
@@ -7356,10 +7356,10 @@ H5VL__blob_get(void *obj, const H5VL_class_t *cls, const void *blob_id, void *bu
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(blob_id);
- HDassert(buf);
+ assert(obj);
+ assert(cls);
+ assert(blob_id);
+ assert(buf);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->blob_cls.get)
@@ -7390,9 +7390,9 @@ H5VL_blob_get(const H5VL_object_t *vol_obj, const void *blob_id, void *buf, size
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(blob_id);
- HDassert(buf);
+ assert(vol_obj);
+ assert(blob_id);
+ assert(buf);
/* Call the corresponding VOL callback */
if (H5VL__blob_get(vol_obj->data, vol_obj->connector->cls, blob_id, buf, size, ctx) < 0)
@@ -7454,9 +7454,9 @@ H5VL__blob_specific(void *obj, const H5VL_class_t *cls, void *blob_id, H5VL_blob
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(blob_id);
+ assert(obj);
+ assert(cls);
+ assert(blob_id);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->blob_cls.specific)
@@ -7488,8 +7488,8 @@ H5VL_blob_specific(const H5VL_object_t *vol_obj, void *blob_id, H5VL_blob_specif
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(blob_id);
+ assert(vol_obj);
+ assert(blob_id);
/* Call the corresponding internal VOL routine */
if (H5VL__blob_specific(vol_obj->data, vol_obj->connector->cls, blob_id, args) < 0)
@@ -7551,9 +7551,9 @@ H5VL__blob_optional(void *obj, const H5VL_class_t *cls, void *blob_id, H5VL_opti
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(blob_id);
+ assert(obj);
+ assert(cls);
+ assert(blob_id);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->blob_cls.optional)
@@ -7585,8 +7585,8 @@ H5VL_blob_optional(const H5VL_object_t *vol_obj, void *blob_id, H5VL_optional_ar
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(blob_id);
+ assert(vol_obj);
+ assert(blob_id);
/* Call the corresponding internal VOL routine */
if (H5VL__blob_optional(vol_obj->data, vol_obj->connector->cls, blob_id, args) < 0)
@@ -7650,9 +7650,9 @@ H5VL__token_cmp(void *obj, const H5VL_class_t *cls, const H5O_token_t *token1, c
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj);
- HDassert(cls);
- HDassert(cmp_value);
+ assert(obj);
+ assert(cls);
+ assert(cmp_value);
/* Take care of cases where one or both pointers is NULL */
if (token1 == NULL && token2 != NULL)
@@ -7671,7 +7671,7 @@ H5VL__token_cmp(void *obj, const H5VL_class_t *cls, const H5O_token_t *token1, c
HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare object tokens")
} /* end if */
else
- *cmp_value = HDmemcmp(token1, token2, sizeof(H5O_token_t));
+ *cmp_value = memcmp(token1, token2, sizeof(H5O_token_t));
} /* end else */
done:
@@ -7700,8 +7700,8 @@ H5VL_token_cmp(const H5VL_object_t *vol_obj, const H5O_token_t *token1, const H5
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(cmp_value);
+ assert(vol_obj);
+ assert(cmp_value);
/* Call the corresponding internal VOL routine */
if (H5VL__token_cmp(vol_obj->data, vol_obj->connector->cls, token1, token2, cmp_value) < 0)
@@ -7771,10 +7771,10 @@ H5VL__token_to_str(void *obj, H5I_type_t obj_type, const H5VL_class_t *cls, cons
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj);
- HDassert(cls);
- HDassert(token);
- HDassert(token_str);
+ assert(obj);
+ assert(cls);
+ assert(token);
+ assert(token_str);
/* Use the class's token serialization routine on the token if there is a
* callback, otherwise just set the token_str to NULL.
@@ -7809,9 +7809,9 @@ H5VL_token_to_str(const H5VL_object_t *vol_obj, H5I_type_t obj_type, const H5O_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(token);
- HDassert(token_str);
+ assert(vol_obj);
+ assert(token);
+ assert(token_str);
/* Call the corresponding internal VOL routine */
if (H5VL__token_to_str(vol_obj->data, obj_type, vol_obj->connector->cls, token, token_str) < 0)
@@ -7878,10 +7878,10 @@ H5VL__token_from_str(void *obj, H5I_type_t obj_type, const H5VL_class_t *cls, co
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj);
- HDassert(cls);
- HDassert(token_str);
- HDassert(token);
+ assert(obj);
+ assert(cls);
+ assert(token_str);
+ assert(token);
/* Use the class's token deserialization routine on the token if there is a
* callback, otherwise just set the token to H5_TOKEN_UNDEF.
@@ -7916,9 +7916,9 @@ H5VL_token_from_str(const H5VL_object_t *vol_obj, H5I_type_t obj_type, const cha
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(token);
- HDassert(token_str);
+ assert(vol_obj);
+ assert(token);
+ assert(token_str);
/* Call the corresponding internal VOL routine */
if (H5VL__token_from_str(vol_obj->data, obj_type, vol_obj->connector->cls, token_str, token) < 0)
diff --git a/src/H5VLdyn_ops.c b/src/H5VLdyn_ops.c
index d3d4fda..3f6a3d7 100644
--- a/src/H5VLdyn_ops.c
+++ b/src/H5VLdyn_ops.c
@@ -195,8 +195,8 @@ H5VL__register_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *o
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(op_val);
- HDassert(op_name && *op_name);
+ assert(op_val);
+ assert(op_name && *op_name);
/* Check for duplicate operation */
if (H5VL_opt_ops_g[subcls]) {
@@ -270,8 +270,8 @@ H5VL__find_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *op_va
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(op_val);
- HDassert(op_name && *op_name);
+ assert(op_val);
+ assert(op_name && *op_name);
/* Check for dynamic operations in the VOL subclass */
if (H5VL_opt_ops_g[subcls]) {
@@ -309,7 +309,7 @@ H5VL__unregister_opt_operation(H5VL_subclass_t subcls, const char *op_name)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(op_name && *op_name);
+ assert(op_name && *op_name);
/* Check for dynamic operations in the VOL subclass */
if (H5VL_opt_ops_g[subcls]) {
diff --git a/src/H5VLint.c b/src/H5VLint.c
index e1d7005..b6e4e4a 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -205,8 +205,8 @@ H5VL_init_phase2(void)
/* clang-format on */
/* Sanity check default VOL connector */
- HDassert(H5VL_def_conn_s.connector_id == (-1));
- HDassert(H5VL_def_conn_s.connector_info == NULL);
+ assert(H5VL_def_conn_s.connector_id == (-1));
+ assert(H5VL_def_conn_s.connector_info == NULL);
/* Set up the default VOL connector in the default FAPL */
if (H5VL__set_def_conn() < 0)
@@ -283,7 +283,7 @@ H5VL__free_cls(H5VL_class_t *cls, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(cls);
+ assert(cls);
/* Shut down the VOL connector */
if (cls->terminate && cls->terminate() < 0)
@@ -327,7 +327,7 @@ H5VL__get_connector_cb(void *obj, hid_t id, void *_op_data)
} /* end if */
} /* end if */
else {
- HDassert(H5VL_GET_CONNECTOR_BY_VALUE == op_data->key.kind);
+ assert(H5VL_GET_CONNECTOR_BY_VALUE == op_data->key.kind);
if (cls->value == op_data->key.u.value) {
op_data->found_id = id;
ret_value = H5_ITER_STOP;
@@ -501,7 +501,7 @@ H5VL__wrap_obj(void *obj, H5I_type_t obj_type)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(obj);
+ assert(obj);
/* Retrieve the VOL object wrapping context */
if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0)
@@ -544,8 +544,8 @@ H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(object);
- HDassert(vol_connector);
+ assert(object);
+ assert(vol_connector);
/* Make sure type number is valid */
if (type != H5I_ATTR && type != H5I_DATASET && type != H5I_DATATYPE && type != H5I_FILE &&
@@ -693,8 +693,8 @@ H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t app_
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Check arguments */
- HDassert(object);
- HDassert(vol_connector);
+ assert(object);
+ assert(vol_connector);
/* Set up VOL object for the passed-in data */
/* (Does not wrap object, since it's from a VOL callback) */
@@ -737,8 +737,8 @@ H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_conne
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(object);
- HDassert(vol_connector);
+ assert(object);
+ assert(vol_connector);
/* Set up VOL object for the passed-in data */
/* (Wraps object, since it's a library object) */
@@ -865,8 +865,8 @@ H5VL_create_object(void *object, H5VL_t *vol_connector)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(object);
- HDassert(vol_connector);
+ assert(object);
+ assert(vol_connector);
/* Set up VOL object for the passed-in data */
/* (Does not wrap object, since it's from a VOL callback) */
@@ -958,7 +958,7 @@ H5VL_conn_inc_rc(H5VL_t *connector)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(connector);
+ assert(connector);
/* Increment refcount for connector */
connector->nrefs++;
@@ -988,7 +988,7 @@ H5VL_conn_dec_rc(H5VL_t *connector)
FUNC_ENTER_NOAPI(-1)
/* Check arguments */
- HDassert(connector);
+ assert(connector);
/* Decrement refcount for connector */
connector->nrefs--;
@@ -1025,7 +1025,7 @@ H5VL_object_inc_rc(H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Check arguments */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Increment refcount for object and return */
FUNC_LEAVE_NOAPI(++vol_obj->rc)
@@ -1049,7 +1049,7 @@ H5VL_free_object(H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(vol_obj);
+ assert(vol_obj);
if (--vol_obj->rc == 0) {
/* Decrement refcount on connector */
@@ -1087,8 +1087,8 @@ H5VL_object_is_native(const H5VL_object_t *obj, hbool_t *is_native)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(obj);
- HDassert(is_native);
+ assert(obj);
+ assert(is_native);
/* Retrieve the terminal connector class for the object */
cls = NULL;
@@ -1133,9 +1133,9 @@ H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(vol_obj1);
- HDassert(vol_obj2);
- HDassert(same_file);
+ assert(vol_obj1);
+ assert(vol_obj2);
+ assert(same_file);
/* Retrieve the terminal connectors for each object */
cls1 = NULL;
@@ -1200,7 +1200,7 @@ H5VL__register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(cls);
+ assert(cls);
/* Copy the class structure so the caller can reuse or free it */
if (NULL == (saved = H5FL_MALLOC(H5VL_class_t)))
@@ -1989,8 +1989,8 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cls1);
- HDassert(cls2);
+ assert(cls1);
+ assert(cls2);
/* If the pointers are the same the classes are the same */
if (cls1 == cls2) {
@@ -2007,7 +2007,7 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
*cmp_value = 1;
HGOTO_DONE(SUCCEED)
} /* end if */
- HDassert(cls1->value == cls2->value);
+ assert(cls1->value == cls2->value);
/* Compare connector names */
if (cls1->name == NULL && cls2->name != NULL) {
@@ -2030,7 +2030,7 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
*cmp_value = 1;
HGOTO_DONE(SUCCEED)
} /* end if */
- HDassert(cls1->version == cls2->version);
+ assert(cls1->version == cls2->version);
/* Compare connector info */
if (cls1->info_cls.size < cls2->info_cls.size) {
@@ -2041,7 +2041,7 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
*cmp_value = 1;
HGOTO_DONE(SUCCEED)
} /* end if */
- HDassert(cls1->info_cls.size == cls2->info_cls.size);
+ assert(cls1->info_cls.size == cls2->info_cls.size);
/* Set comparison value to 'equal' */
*cmp_value = 0;
@@ -2071,7 +2071,7 @@ H5VL_retrieve_lib_state(void **state)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(state);
+ assert(state);
/* Retrieve the API context state */
if (H5CX_retrieve_state((H5CX_state_t **)state) < 0)
@@ -2134,7 +2134,7 @@ H5VL_restore_lib_state(const void *state)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(state);
+ assert(state);
/* Restore the API context state */
if (H5CX_restore_state((const H5CX_state_t *)state) < 0)
@@ -2202,7 +2202,7 @@ H5VL_free_lib_state(void *state)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(state);
+ assert(state);
/* Free the API context state */
if (H5CX_free_state((H5CX_state_t *)state) < 0)
@@ -2232,10 +2232,10 @@ H5VL__free_vol_wrapper(H5VL_wrap_ctx_t *vol_wrap_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(vol_wrap_ctx);
- HDassert(0 == vol_wrap_ctx->rc);
- HDassert(vol_wrap_ctx->connector);
- HDassert(vol_wrap_ctx->connector->cls);
+ assert(vol_wrap_ctx);
+ assert(0 == vol_wrap_ctx->rc);
+ assert(vol_wrap_ctx->connector);
+ assert(vol_wrap_ctx->connector->cls);
/* If there is a VOL connector object wrapping context, release it */
if (vol_wrap_ctx->obj_wrap_ctx)
@@ -2273,7 +2273,7 @@ H5VL_set_vol_wrapper(const H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Retrieve the VOL object wrap context */
if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0)
@@ -2284,13 +2284,13 @@ H5VL_set_vol_wrapper(const H5VL_object_t *vol_obj)
void *obj_wrap_ctx = NULL; /* VOL connector's wrapping context */
/* Sanity checks */
- HDassert(vol_obj->data);
- HDassert(vol_obj->connector);
+ assert(vol_obj->data);
+ assert(vol_obj->connector);
/* Check if the connector can create a wrap context */
if (vol_obj->connector->cls->wrap_cls.get_wrap_ctx) {
/* Sanity check */
- HDassert(vol_obj->connector->cls->wrap_cls.free_wrap_ctx);
+ assert(vol_obj->connector->cls->wrap_cls.free_wrap_ctx);
/* Get the wrap context from the connector */
if ((vol_obj->connector->cls->wrap_cls.get_wrap_ctx)(vol_obj->data, &obj_wrap_ctx) < 0)
@@ -2463,7 +2463,7 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Sanity check */
- HDassert(obj);
+ assert(obj);
/* Retrieve the VOL object wrapping context */
if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0)
@@ -2517,9 +2517,9 @@ H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cls);
- HDassert(key);
- HDassert(success);
+ assert(cls);
+ assert(key);
+ assert(success);
/* Which kind of key are we looking for? */
if (key->vol.kind == H5VL_GET_CONNECTOR_BY_NAME) {
@@ -2529,7 +2529,7 @@ H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *
} /* end if */
else {
/* Sanity check */
- HDassert(key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
+ assert(key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
/* Check if plugin value matches VOL connector class value */
if (cls->value == key->vol.u.value)
@@ -2558,7 +2558,7 @@ H5VL__is_default_conn(hid_t fapl_id, hid_t connector_id, hbool_t *is_default)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(is_default);
+ assert(is_default);
/* Determine if the default VOL connector will be used, based on non-default
* values in the FAPL, connector ID, or the HDF5_VOL_CONNECTOR environment
@@ -2587,7 +2587,7 @@ H5VL_setup_args(hid_t loc_id, H5I_type_t id_type, H5VL_object_t **vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Get attribute pointer */
if (NULL == (*vol_obj = (H5VL_object_t *)H5I_object_verify(loc_id, id_type)))
@@ -2618,8 +2618,8 @@ H5VL_setup_loc_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *lo
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Get the location object */
if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id)))
@@ -2655,10 +2655,10 @@ H5VL_setup_acc_args(hid_t loc_id, const H5P_libclass_t *libclass, hbool_t is_col
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(libclass);
- HDassert(acspl_id);
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(libclass);
+ assert(acspl_id);
+ assert(vol_obj);
+ assert(loc_params);
/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(acspl_id, libclass, loc_id, is_collective) < 0)
@@ -2693,8 +2693,8 @@ H5VL_setup_self_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *l
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Get the location object */
if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id)))
@@ -2726,8 +2726,8 @@ H5VL_setup_name_args(hid_t loc_id, const char *name, hbool_t is_collective, hid_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Check args */
if (!name)
@@ -2772,8 +2772,8 @@ H5VL_setup_idx_args(hid_t loc_id, const char *name, H5_index_t idx_type, H5_iter
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Check args */
if (!name)
@@ -2824,8 +2824,8 @@ H5VL_setup_token_args(hid_t loc_id, H5O_token_t *obj_token, H5VL_object_t **vol_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Get the location object */
if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id)))
@@ -2861,7 +2861,7 @@ H5VL_get_cap_flags(const H5VL_connector_prop_t *connector_prop, uint64_t *cap_fl
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(connector_prop);
+ assert(connector_prop);
/* Copy the connector ID & info, if there is one */
if (connector_prop->connector_id > 0) {
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index b667808..679edb6 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -250,7 +250,7 @@ H5VL__native_introspect_get_conn_cls(void H5_ATTR_UNUSED *obj, H5VL_get_conn_lvl
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(conn_cls);
+ assert(conn_cls);
/* Retrieve the native VOL connector class */
*conn_cls = &H5VL_native_cls_g;
@@ -276,7 +276,7 @@ H5VL__native_introspect_get_cap_flags(const void H5_ATTR_UNUSED *info, uint64_t
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(cap_flags);
+ assert(cap_flags);
/* Set the flags from the connector's field */
*cap_flags = H5VL_native_cls_g.cap_flags;
@@ -305,7 +305,7 @@ H5VL_native_get_file_addr_len(hid_t loc_id, size_t *addr_len)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(addr_len);
+ assert(addr_len);
/* Get object type */
if ((vol_obj_type = H5I_get_type(loc_id)) < 0)
@@ -343,8 +343,8 @@ H5VL__native_get_file_addr_len(void *obj, H5I_type_t obj_type, size_t *addr_len)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(obj);
- HDassert(addr_len);
+ assert(obj);
+ assert(addr_len);
/* Retrieve file from the VOL object */
if (H5VL_native_get_file_struct(obj, obj_type, &file) < 0)
@@ -402,7 +402,7 @@ H5VLnative_addr_to_token(hid_t loc_id, haddr_t addr, H5O_token_t *token)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL,
"can't determine if VOL object is native connector object")
- HDassert(is_native_vol_obj && "not a native VOL connector object");
+ assert(is_native_vol_obj && "not a native VOL connector object");
}
#endif
@@ -433,15 +433,15 @@ H5VL_native_addr_to_token(void *obj, H5I_type_t obj_type, haddr_t addr, H5O_toke
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(obj);
- HDassert(token);
+ assert(obj);
+ assert(token);
/* Get the length of an haddr_t in the file */
if (H5VL__native_get_file_addr_len(obj, obj_type, &addr_len) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "couldn't get length of haddr_t from VOL object")
/* Ensure that token is initialized */
- HDmemset(token, 0, sizeof(H5O_token_t));
+ memset(token, 0, sizeof(H5O_token_t));
/* Encode token */
p = (uint8_t *)token;
@@ -496,7 +496,7 @@ H5VLnative_token_to_addr(hid_t loc_id, H5O_token_t token, haddr_t *addr)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL,
"can't determine if VOL object is native connector object")
- HDassert(is_native_vol_obj && "not a native VOL connector object");
+ assert(is_native_vol_obj && "not a native VOL connector object");
}
#endif
@@ -527,8 +527,8 @@ H5VL_native_token_to_addr(void *obj, H5I_type_t obj_type, H5O_token_t token, had
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(obj);
- HDassert(addr);
+ assert(obj);
+ assert(addr);
/* Get the length of an haddr_t in the file */
if (H5VL__native_get_file_addr_len(obj, obj_type, &addr_len) < 0)
diff --git a/src/H5VLnative_blob.c b/src/H5VLnative_blob.c
index 606bdeb..b70f09d 100644
--- a/src/H5VLnative_blob.c
+++ b/src/H5VLnative_blob.c
@@ -70,9 +70,9 @@ H5VL__native_blob_put(void *obj, const void *buf, size_t size, void *blob_id, vo
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(f);
- HDassert(size == 0 || buf);
- HDassert(id);
+ assert(f);
+ assert(size == 0 || buf);
+ assert(id);
/* Write the VL information to disk (allocates space also) */
if (H5HG_insert(f, size, buf, &hobjid) < 0)
@@ -110,9 +110,9 @@ H5VL__native_blob_get(void *obj, const void *blob_id, void *buf, size_t size, vo
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(id);
- HDassert(buf);
+ assert(f);
+ assert(id);
+ assert(buf);
/* Get the heap information */
H5F_addr_decode(f, &id, &hobjid.addr);
@@ -153,8 +153,8 @@ H5VL__native_blob_specific(void *obj, void *blob_id, H5VL_blob_specific_args_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(blob_id);
+ assert(f);
+ assert(blob_id);
switch (args->op_type) {
case H5VL_BLOB_ISNULL: {
diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c
index 9bd711b..a4e7d77 100644
--- a/src/H5VLnative_dataset.c
+++ b/src/H5VLnative_dataset.c
@@ -89,7 +89,7 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dinfo);
+ assert(dinfo);
/* Get shared file */
f_sh = H5F_SHARED(((H5D_t *)obj[0])->oloc.file);
@@ -98,7 +98,7 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi
for (i = 0; i < count; i++) {
/* Set up dset */
dinfo[i].dset = (H5D_t *)obj[i];
- HDassert(dinfo[i].dset);
+ assert(dinfo[i].dset);
/* Check dataset's file pointer is valid */
if (NULL == dinfo[i].dset->oloc.file)
@@ -205,7 +205,7 @@ H5VL__native_dataset_io_cleanup(size_t count, hid_t mem_space_id[], hid_t file_s
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dinfo);
+ assert(dinfo);
/* Iterate over datasets */
for (i = 0; i < count; i++) {
@@ -561,7 +561,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
+ assert(dset);
/* Set DXPL for operation */
H5CX_set_dxpl(dxpl_id);
@@ -634,8 +634,8 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
H5VL_native_dataset_get_num_chunks_t *gnc_args = &opt_args->get_num_chunks;
const H5S_t *space = NULL;
- HDassert(dset->shared);
- HDassert(dset->shared->space);
+ assert(dset->shared);
+ assert(dset->shared->space);
/* When default dataspace is given, use the dataset's dataspace */
if (gnc_args->space_id == H5S_ALL)
@@ -660,8 +660,8 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
H5VL_native_dataset_get_chunk_info_by_idx_t *gcibi_args = &opt_args->get_chunk_info_by_idx;
const H5S_t *space;
- HDassert(dset->shared);
- HDassert(dset->shared->space);
+ assert(dset->shared);
+ assert(dset->shared->space);
/* When default dataspace is given, use the dataset's dataspace */
if (gcibi_args->space_id == H5S_ALL)
@@ -686,7 +686,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
case H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COORD: {
H5VL_native_dataset_get_chunk_info_by_coord_t *gcibc_args = &opt_args->get_chunk_info_by_coord;
- HDassert(dset->shared);
+ assert(dset->shared);
/* Make sure the dataset is chunked */
if (H5D_CHUNKED != dset->shared->layout.type)
@@ -770,7 +770,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
/* H5Dchunk_iter */
case H5VL_NATIVE_DATASET_CHUNK_ITER: {
/* Sanity check */
- HDassert(dset->shared);
+ assert(dset->shared);
/* Make sure the dataset is chunked */
if (H5D_CHUNKED != dset->shared->layout.type)
diff --git a/src/H5VLnative_file.c b/src/H5VLnative_file.c
index f2f0ea7..ba6d16d 100644
--- a/src/H5VLnative_file.c
+++ b/src/H5VLnative_file.c
@@ -753,7 +753,7 @@ H5VL__native_file_close(void *file, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_U
FUNC_ENTER_PACKAGE
/* This routine should only be called when a file ID's ref count drops to zero */
- HDassert(f->shared == NULL || H5F_ID_EXISTS(f));
+ assert(f->shared == NULL || H5F_ID_EXISTS(f));
if (f->shared == NULL)
f = H5FL_FREE(H5F_t, f);
diff --git a/src/H5VLnative_group.c b/src/H5VLnative_group.c
index 0cc22f8..163e03f 100644
--- a/src/H5VLnative_group.c
+++ b/src/H5VLnative_group.c
@@ -90,7 +90,7 @@ H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const
/* Set up group creation info */
gcrt_info.gcpl_id = gcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+ memset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Create the new group & get its ID */
if (NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info)))
diff --git a/src/H5VLnative_introspect.c b/src/H5VLnative_introspect.c
index 0cc6ee4..e322395 100644
--- a/src/H5VLnative_introspect.c
+++ b/src/H5VLnative_introspect.c
@@ -75,7 +75,7 @@ H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t subc
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(flags);
+ assert(flags);
/* The native VOL connector supports all optional operations */
*flags = H5VL_OPT_QUERY_SUPPORTED;
diff --git a/src/H5VLnative_token.c b/src/H5VLnative_token.c
index b5bd7b8..78d0350 100644
--- a/src/H5VLnative_token.c
+++ b/src/H5VLnative_token.c
@@ -70,10 +70,10 @@ H5VL__native_token_cmp(void H5_ATTR_UNUSED *obj, const H5O_token_t *token1, cons
FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
- HDassert(token1);
- HDassert(token2);
+ assert(token1);
+ assert(token2);
- *cmp_value = HDmemcmp(token1, token2, sizeof(H5O_token_t));
+ *cmp_value = memcmp(token1, token2, sizeof(H5O_token_t));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL__native_token_cmp() */
@@ -98,8 +98,8 @@ H5VL__native_token_to_str(void *obj, H5I_type_t obj_type, const H5O_token_t *tok
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(obj);
- HDassert(token);
+ assert(obj);
+ assert(token);
if (H5VL_native_token_to_addr(obj, obj_type, *token, &addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't convert object token to address")
@@ -137,7 +137,7 @@ H5VL__native_str_to_token(void *obj, H5I_type_t obj_type, const char *token_str,
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(token_str);
+ assert(token_str);
HDsscanf(token_str, "%" PRIuHADDR, &addr);
diff --git a/src/H5VM.c b/src/H5VM.c
index f67917d..2ffb506 100644
--- a/src/H5VM.c
+++ b/src/H5VM.c
@@ -63,7 +63,7 @@ H5VM__stride_optimize1(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, c
/* This has to be true because if we optimize the dimensionality down to
* zero we still must make one reference.
*/
- HDassert(1 == H5VM_vector_reduce_product(0, NULL));
+ assert(1 == H5VM_vector_reduce_product(0, NULL));
/* Combine adjacent memory accesses */
while (*np && stride1[*np - 1] > 0 && (hsize_t)(stride1[*np - 1]) == *elmt_size) {
@@ -102,8 +102,8 @@ H5VM__stride_optimize2(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, c
/* This has to be true because if we optimize the dimensionality down to
* zero we still must make one reference.
*/
- HDassert(1 == H5VM_vector_reduce_product(0, NULL));
- HDassert(*elmt_size > 0);
+ assert(1 == H5VM_vector_reduce_product(0, NULL));
+ assert(*elmt_size > 0);
/* Combine adjacent memory accesses */
@@ -228,48 +228,48 @@ H5VM_hyper_stride(unsigned n, const hsize_t *size, const hsize_t *total_size, co
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(size);
- HDassert(total_size);
- HDassert(stride);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(size);
+ assert(total_size);
+ assert(stride);
/* init */
- HDassert(n > 0);
+ assert(n > 0);
stride[n - 1] = 1;
skip = offset ? offset[n - 1] : 0;
switch (n) {
case 2: /* 1-D dataset */
- HDassert(total_size[1] >= size[1]);
+ assert(total_size[1] >= size[1]);
stride[0] = total_size[1] - size[1]; /*overflow checked*/
acc = total_size[1];
skip += acc * (offset ? offset[0] : 0);
break;
case 3: /* 2-D dataset */
- HDassert(total_size[2] >= size[2]);
+ assert(total_size[2] >= size[2]);
stride[1] = total_size[2] - size[2]; /*overflow checked*/
acc = total_size[2];
skip += acc * (offset ? (hsize_t)offset[1] : 0);
- HDassert(total_size[1] >= size[1]);
+ assert(total_size[1] >= size[1]);
stride[0] = acc * (total_size[1] - size[1]); /*overflow checked*/
acc *= total_size[1];
skip += acc * (offset ? (hsize_t)offset[0] : 0);
break;
case 4: /* 3-D dataset */
- HDassert(total_size[3] >= size[3]);
+ assert(total_size[3] >= size[3]);
stride[2] = total_size[3] - size[3]; /*overflow checked*/
acc = total_size[3];
skip += acc * (offset ? (hsize_t)offset[2] : 0);
- HDassert(total_size[2] >= size[2]);
+ assert(total_size[2] >= size[2]);
stride[1] = acc * (total_size[2] - size[2]); /*overflow checked*/
acc *= total_size[2];
skip += acc * (offset ? (hsize_t)offset[1] : 0);
- HDassert(total_size[1] >= size[1]);
+ assert(total_size[1] >= size[1]);
stride[0] = acc * (total_size[1] - size[1]); /*overflow checked*/
acc *= total_size[1];
skip += acc * (offset ? (hsize_t)offset[0] : 0);
@@ -278,7 +278,7 @@ H5VM_hyper_stride(unsigned n, const hsize_t *size, const hsize_t *total_size, co
default:
/* others */
for (i = (int)(n - 2), acc = 1; i >= 0; --i) {
- HDassert(total_size[i + 1] >= size[i + 1]);
+ assert(total_size[i + 1] >= size[i + 1]);
stride[i] = acc * (total_size[i + 1] - size[i + 1]); /*overflow checked*/
acc *= total_size[i + 1];
skip += acc * (offset ? (hsize_t)offset[i] : 0);
@@ -377,14 +377,14 @@ H5VM_hyper_fill(unsigned n, const hsize_t *_size, const hsize_t *total_size, con
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(n > 0 && n <= H5VM_HYPER_NDIMS);
- HDassert(_size);
- HDassert(total_size);
- HDassert(dst);
+ assert(n > 0 && n <= H5VM_HYPER_NDIMS);
+ assert(_size);
+ assert(total_size);
+ assert(dst);
#ifndef NDEBUG
for (u = 0; u < n; u++) {
- HDassert(_size[u] > 0);
- HDassert(total_size[u] > 0);
+ assert(_size[u] > 0);
+ assert(total_size[u] > 0);
}
#endif
@@ -449,17 +449,17 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(n > 0 && n <= H5VM_HYPER_NDIMS);
- HDassert(_size);
- HDassert(dst_size);
- HDassert(src_size);
- HDassert(dst);
- HDassert(src);
+ assert(n > 0 && n <= H5VM_HYPER_NDIMS);
+ assert(_size);
+ assert(dst_size);
+ assert(src_size);
+ assert(dst);
+ assert(src);
#ifndef NDEBUG
for (u = 0; u < n; u++) {
- HDassert(_size[u] > 0);
- HDassert(dst_size[u] > 0);
- HDassert(src_size[u] > 0);
+ assert(_size[u] > 0);
+ assert(dst_size[u] > 0);
+ assert(src_size[u] > 0);
}
#endif
@@ -478,7 +478,7 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
int ii; /*counter */
/* init */
- HDassert(n > 0);
+ assert(n > 0);
dst_stride[n - 1] = 1;
src_stride[n - 1] = 1;
dst_start = dst_offset ? dst_offset[n - 1] : 0;
@@ -487,8 +487,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
/* Unroll loop for common cases */
switch (n) {
case 2:
- HDassert(dst_size[1] >= size[1]);
- HDassert(src_size[1] >= size[1]);
+ assert(dst_size[1] >= size[1]);
+ assert(src_size[1] >= size[1]);
dst_stride[0] = dst_size[1] - size[1]; /*overflow checked*/
src_stride[0] = src_size[1] - size[1]; /*overflow checked*/
dst_acc = dst_size[1];
@@ -498,8 +498,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
break;
case 3:
- HDassert(dst_size[2] >= size[2]);
- HDassert(src_size[2] >= size[2]);
+ assert(dst_size[2] >= size[2]);
+ assert(src_size[2] >= size[2]);
dst_stride[1] = dst_size[2] - size[2]; /*overflow checked*/
src_stride[1] = src_size[2] - size[2]; /*overflow checked*/
dst_acc = dst_size[2];
@@ -507,8 +507,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
dst_start += dst_acc * (dst_offset ? dst_offset[1] : 0);
src_start += src_acc * (src_offset ? src_offset[1] : 0);
- HDassert(dst_size[1] >= size[1]);
- HDassert(src_size[1] >= size[1]);
+ assert(dst_size[1] >= size[1]);
+ assert(src_size[1] >= size[1]);
dst_stride[0] = dst_acc * (dst_size[1] - size[1]); /*overflow checked*/
src_stride[0] = src_acc * (src_size[1] - size[1]); /*overflow checked*/
dst_acc *= dst_size[1];
@@ -518,8 +518,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
break;
case 4:
- HDassert(dst_size[3] >= size[3]);
- HDassert(src_size[3] >= size[3]);
+ assert(dst_size[3] >= size[3]);
+ assert(src_size[3] >= size[3]);
dst_stride[2] = dst_size[3] - size[3]; /*overflow checked*/
src_stride[2] = src_size[3] - size[3]; /*overflow checked*/
dst_acc = dst_size[3];
@@ -527,8 +527,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
dst_start += dst_acc * (dst_offset ? dst_offset[2] : 0);
src_start += src_acc * (src_offset ? src_offset[2] : 0);
- HDassert(dst_size[2] >= size[2]);
- HDassert(src_size[2] >= size[2]);
+ assert(dst_size[2] >= size[2]);
+ assert(src_size[2] >= size[2]);
dst_stride[1] = dst_acc * (dst_size[2] - size[2]); /*overflow checked*/
src_stride[1] = src_acc * (src_size[2] - size[2]); /*overflow checked*/
dst_acc *= dst_size[2];
@@ -536,8 +536,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
dst_start += dst_acc * (dst_offset ? dst_offset[1] : 0);
src_start += src_acc * (src_offset ? src_offset[1] : 0);
- HDassert(dst_size[1] >= size[1]);
- HDassert(src_size[1] >= size[1]);
+ assert(dst_size[1] >= size[1]);
+ assert(src_size[1] >= size[1]);
dst_stride[0] = dst_acc * (dst_size[1] - size[1]); /*overflow checked*/
src_stride[0] = src_acc * (src_size[1] - size[1]); /*overflow checked*/
dst_acc *= dst_size[1];
@@ -549,8 +549,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
default:
/* others */
for (ii = (int)(n - 2), dst_acc = 1, src_acc = 1; ii >= 0; --ii) {
- HDassert(dst_size[ii + 1] >= size[ii + 1]);
- HDassert(src_size[ii + 1] >= size[ii + 1]);
+ assert(dst_size[ii + 1] >= size[ii + 1]);
+ assert(src_size[ii + 1] >= size[ii + 1]);
dst_stride[ii] = dst_acc * (dst_size[ii + 1] - size[ii + 1]); /*overflow checked*/
src_stride[ii] = src_acc * (src_size[ii + 1] - size[ii + 1]); /*overflow checked*/
dst_acc *= dst_size[ii + 1];
@@ -599,14 +599,14 @@ H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(elmt_size < SIZE_MAX);
+ assert(elmt_size < SIZE_MAX);
H5VM_vector_cpy(n, idx, size);
nelmts = H5VM_vector_reduce_product(n, size);
for (i = 0; i < nelmts; i++) {
/* Copy an element */
H5_CHECK_OVERFLOW(elmt_size, hsize_t, size_t);
- HDmemset(dst, (int)fill_value, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
+ memset(dst, (int)fill_value, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
/* Decrement indices and advance pointer */
for (j = (int)(n - 1), carry = TRUE; j >= 0 && carry; --j) {
@@ -615,7 +615,7 @@ H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
if (--idx[j])
carry = FALSE;
else {
- HDassert(size);
+ assert(size);
idx[j] = size[j];
} /* end else */
}
@@ -657,7 +657,7 @@ H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(elmt_size < SIZE_MAX);
+ assert(elmt_size < SIZE_MAX);
if (n) {
H5VM_vector_cpy(n, idx, size);
@@ -676,7 +676,7 @@ H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
if (--idx[j])
carry = FALSE;
else {
- HDassert(size);
+ assert(size);
idx[j] = size[j];
}
}
@@ -723,7 +723,7 @@ H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size, const hss
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(elmt_size < SIZE_MAX);
+ assert(elmt_size < SIZE_MAX);
if (n) {
H5VM_vector_cpy(n, idx, size);
@@ -742,7 +742,7 @@ H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size, const hss
if (--idx[j])
carry = FALSE;
else {
- HDassert(size);
+ assert(size);
idx[j] = size[j];
}
}
@@ -780,10 +780,10 @@ H5VM_array_fill(void *_dst, const void *src, size_t size, size_t count)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(dst);
- HDassert(src);
- HDassert(size < SIZE_MAX && size > 0);
- HDassert(count < SIZE_MAX && count > 0);
+ assert(dst);
+ assert(src);
+ assert(size < SIZE_MAX && size > 0);
+ assert(count < SIZE_MAX && count > 0);
H5MM_memcpy(dst, src, size); /* copy first item */
@@ -831,9 +831,9 @@ H5VM_array_down(unsigned n, const hsize_t *total_size, hsize_t *down)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(total_size);
- HDassert(down);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(total_size);
+ assert(down);
/* Build the sizes of each dimension in the array
* (From fastest to slowest)
@@ -871,9 +871,9 @@ H5VM_array_offset_pre(unsigned n, const hsize_t *acc, const hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(acc);
- HDassert(offset);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(acc);
+ assert(offset);
/* Compute offset in array */
for (u = 0, ret_value = 0; u < n; u++)
@@ -907,9 +907,9 @@ H5VM_array_offset(unsigned n, const hsize_t *total_size, const hsize_t *offset)
FUNC_ENTER_NOAPI_NOERR
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(total_size);
- HDassert(offset);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(total_size);
+ assert(offset);
/* Build the sizes of each dimension in the array */
H5VM_array_down(n, total_size, acc_arr);
@@ -946,8 +946,8 @@ H5VM_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *down, hsize_t *co
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(coords);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(coords);
/* Compute the coordinates from the offset */
for (u = 0; u < n; u++) {
@@ -985,9 +985,9 @@ H5VM_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(total_size);
- HDassert(coords);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(total_size);
+ assert(coords);
/* Build the sizes of each dimension in the array */
H5VM_array_down(n, total_size, idx);
@@ -1049,10 +1049,10 @@ H5VM_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, co
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(ndims <= H5VM_HYPER_NDIMS);
- HDassert(coord);
- HDassert(chunk);
- HDassert(down_nchunks);
+ assert(ndims <= H5VM_HYPER_NDIMS);
+ assert(coord);
+ assert(chunk);
+ assert(down_nchunks);
/* Defer to H5VM_chunk_index_scaled */
chunk_idx = H5VM_chunk_index_scaled(ndims, coord, chunk, down_nchunks, scaled_coord);
@@ -1080,10 +1080,10 @@ H5VM_chunk_scaled(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, h
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(ndims <= H5VM_HYPER_NDIMS);
- HDassert(coord);
- HDassert(chunk);
- HDassert(scaled);
+ assert(ndims <= H5VM_HYPER_NDIMS);
+ assert(coord);
+ assert(chunk);
+ assert(scaled);
/* Compute the scaled coordinates for actual coordinates */
/* (Note that the 'scaled' array is an 'OUT' parameter) */
@@ -1146,11 +1146,11 @@ H5VM_chunk_index_scaled(unsigned ndims, const hsize_t *coord, const uint32_t *ch
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(ndims <= H5VM_HYPER_NDIMS);
- HDassert(coord);
- HDassert(chunk);
- HDassert(down_nchunks);
- HDassert(scaled);
+ assert(ndims <= H5VM_HYPER_NDIMS);
+ assert(coord);
+ assert(chunk);
+ assert(down_nchunks);
+ assert(scaled);
/* Compute the scaled coordinates for actual coordinates */
/* (Note that the 'scaled' array is an 'OUT' parameter) */
@@ -1202,15 +1202,15 @@ H5VM_opvv(size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dst_curr_seq);
- HDassert(*dst_curr_seq < dst_max_nseq);
- HDassert(dst_len_arr);
- HDassert(dst_off_arr);
- HDassert(src_curr_seq);
- HDassert(*src_curr_seq < src_max_nseq);
- HDassert(src_len_arr);
- HDassert(src_off_arr);
- HDassert(op);
+ assert(dst_curr_seq);
+ assert(*dst_curr_seq < dst_max_nseq);
+ assert(dst_len_arr);
+ assert(dst_off_arr);
+ assert(src_curr_seq);
+ assert(*src_curr_seq < src_max_nseq);
+ assert(src_len_arr);
+ assert(src_off_arr);
+ assert(op);
/* Set initial offset & length pointers */
dst_len_ptr = dst_len_arr + *dst_curr_seq;
@@ -1408,16 +1408,16 @@ H5VM_memcpyvv(void *_dst, size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(_dst);
- HDassert(dst_curr_seq);
- HDassert(*dst_curr_seq < dst_max_nseq);
- HDassert(dst_len_arr);
- HDassert(dst_off_arr);
- HDassert(_src);
- HDassert(src_curr_seq);
- HDassert(*src_curr_seq < src_max_nseq);
- HDassert(src_len_arr);
- HDassert(src_off_arr);
+ assert(_dst);
+ assert(dst_curr_seq);
+ assert(*dst_curr_seq < dst_max_nseq);
+ assert(dst_len_arr);
+ assert(dst_off_arr);
+ assert(_src);
+ assert(src_curr_seq);
+ assert(*src_curr_seq < src_max_nseq);
+ assert(src_len_arr);
+ assert(src_off_arr);
/* Set initial offset & length pointers */
dst_len_ptr = dst_len_arr + *dst_curr_seq;
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index 49bb53d..4567a78 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -36,7 +36,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
/* Other functions */
#define H5VM_vector_cpy(N, DST, SRC) \
{ \
- HDassert(sizeof(*(DST)) == sizeof(*(SRC))); \
+ assert(sizeof(*(DST)) == sizeof(*(SRC))); \
if (SRC) \
H5MM_memcpy(DST, SRC, (N) * sizeof(*(DST))); \
else \
@@ -51,7 +51,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
#define H5VM_swizzle_coords(TYPE, COORDS, UNLIM_DIM) \
{ \
/* COORDS must be an array of type TYPE */ \
- HDassert(sizeof(COORDS[0]) == sizeof(TYPE)); \
+ assert(sizeof(COORDS[0]) == sizeof(TYPE)); \
\
/* Nothing to do when unlimited dimension is at position 0 */ \
if (0 != (UNLIM_DIM)) { \
@@ -69,7 +69,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
#define H5VM_unswizzle_coords(TYPE, COORDS, UNLIM_DIM) \
{ \
/* COORDS must be an array of type TYPE */ \
- HDassert(sizeof(COORDS[0]) == sizeof(TYPE)); \
+ assert(sizeof(COORDS[0]) == sizeof(TYPE)); \
\
/* Nothing to do when unlimited dimension is at position 0 */ \
if (0 != (UNLIM_DIM)) { \
@@ -402,7 +402,7 @@ static inline H5_ATTR_PURE unsigned
H5VM_log2_of2(uint32_t n)
{
#ifndef NDEBUG
- HDassert(POWER_OF_TWO(n));
+ assert(POWER_OF_TWO(n));
#endif /* NDEBUG */
return (MultiplyDeBruijnBitPosition[(n * (uint32_t)0x077CB531UL) >> 27]);
} /* H5VM_log2_of2() */
diff --git a/src/H5WB.c b/src/H5WB.c
index 2f89807..fe35236 100644
--- a/src/H5WB.c
+++ b/src/H5WB.c
@@ -102,8 +102,8 @@ H5WB_wrap(void *buf, size_t buf_size)
/*
* Check arguments.
*/
- HDassert(buf);
- HDassert(buf_size);
+ assert(buf);
+ assert(buf_size);
/* Create wrapped buffer info */
if (NULL == (wb = H5FL_MALLOC(H5WB_t)))
@@ -153,13 +153,13 @@ H5WB_actual(H5WB_t *wb, size_t need)
/*
* Check arguments.
*/
- HDassert(wb);
- HDassert(wb->wrapped_buf);
+ assert(wb);
+ assert(wb->wrapped_buf);
/* Check for previously allocated buffer */
if (wb->actual_buf && wb->actual_buf != wb->wrapped_buf) {
/* Sanity check */
- HDassert(wb->actual_size > wb->wrapped_size);
+ assert(wb->actual_size > wb->wrapped_size);
/* Check if we can re-use existing buffer */
if (need <= wb->alloc_size)
@@ -219,15 +219,15 @@ H5WB_actual_clear(H5WB_t *wb, size_t need)
/*
* Check arguments.
*/
- HDassert(wb);
- HDassert(wb->wrapped_buf);
+ assert(wb);
+ assert(wb->wrapped_buf);
/* Get a pointer to an actual buffer */
if (NULL == (ret_value = H5WB_actual(wb, need)))
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear the buffer */
- HDmemset(ret_value, 0, need);
+ memset(ret_value, 0, need);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -253,13 +253,13 @@ H5WB_unwrap(H5WB_t *wb)
/*
* Check arguments.
*/
- HDassert(wb);
- HDassert(wb->wrapped_buf);
+ assert(wb);
+ assert(wb->wrapped_buf);
/* Release any extra buffers allocated */
if (wb->actual_buf && wb->actual_buf != wb->wrapped_buf) {
/* Sanity check */
- HDassert(wb->actual_size > wb->wrapped_size);
+ assert(wb->actual_size > wb->wrapped_size);
wb->actual_buf = H5FL_BLK_FREE(extra_buf, wb->actual_buf);
} /* end if */
diff --git a/src/H5Z.c b/src/H5Z.c
index 8631b04..344ba80 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -154,12 +154,12 @@ H5Z_term_package(void)
if (0 == nprint++) {
/* Print column headers */
- HDfprintf(H5DEBUG(Z), "H5Z: filter statistics "
- "accumulated over life of library:\n");
- HDfprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "Filter", "Total",
- "Errors", "User", "System", "Elapsed", "Bandwidth");
- HDfprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "------", "-----",
- "------", "----", "------", "-------", "---------");
+ fprintf(H5DEBUG(Z), "H5Z: filter statistics "
+ "accumulated over life of library:\n");
+ fprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "Filter", "Total", "Errors",
+ "User", "System", "Elapsed", "Bandwidth");
+ fprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "------", "-----", "------",
+ "----", "------", "-------", "---------");
} /* end if */
/* Truncate the comment to fit in the field */
@@ -175,14 +175,14 @@ H5Z_term_package(void)
H5Z_stat_table_g[i].stats[dir].times.elapsed);
/* Print the statistics */
- HDfprintf(H5DEBUG(Z), " %s%-15s %10" PRIdHSIZE " %10" PRIdHSIZE " %8s %8s %8s %10s\n",
- (dir ? "<" : ">"), comment, H5Z_stat_table_g[i].stats[dir].total,
- H5Z_stat_table_g[i].stats[dir].errors, timestrs.user, timestrs.system,
- timestrs.elapsed, bandwidth);
+ fprintf(H5DEBUG(Z), " %s%-15s %10" PRIdHSIZE " %10" PRIdHSIZE " %8s %8s %8s %10s\n",
+ (dir ? "<" : ">"), comment, H5Z_stat_table_g[i].stats[dir].total,
+ H5Z_stat_table_g[i].stats[dir].errors, timestrs.user, timestrs.system,
+ timestrs.elapsed, bandwidth);
next:
- HDfree(timestrs.user);
- HDfree(timestrs.system);
- HDfree(timestrs.elapsed);
+ free(timestrs.user);
+ free(timestrs.system);
+ free(timestrs.elapsed);
} /* end for */
} /* end for */
} /* end if */
@@ -294,8 +294,8 @@ H5Z_register(const H5Z_class2_t *cls)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cls);
- HDassert(cls->id >= 0 && cls->id <= H5Z_FILTER_MAX);
+ assert(cls);
+ assert(cls->id >= 0 && cls->id <= H5Z_FILTER_MAX);
/* Is the filter already registered? */
for (i = 0; i < H5Z_table_used_g; i++)
@@ -325,7 +325,7 @@ H5Z_register(const H5Z_class2_t *cls)
i = H5Z_table_used_g++;
H5MM_memcpy(H5Z_table_g + i, cls, sizeof(H5Z_class2_t));
#ifdef H5Z_DEBUG
- HDmemset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t));
+ memset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t));
#endif /* H5Z_DEBUG */
} /* end if */
/* Filter already registered */
@@ -388,7 +388,7 @@ H5Z__unregister(H5Z_filter_t filter_id)
FUNC_ENTER_PACKAGE
- HDassert(filter_id >= 0 && filter_id <= H5Z_FILTER_MAX);
+ assert(filter_id >= 0 && filter_id <= H5Z_FILTER_MAX);
/* Is the filter already registered? */
for (filter_index = 0; filter_index < H5Z_table_used_g; filter_index++)
@@ -495,7 +495,7 @@ H5Z__check_unregister_group_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void
FUNC_ENTER_PACKAGE
- HDassert(obj_ptr);
+ assert(obj_ptr);
/* Get the group creation property */
if ((ocpl_id = H5G_get_create_plist((H5G_t *)obj_ptr)) < 0)
@@ -545,7 +545,7 @@ H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *
FUNC_ENTER_PACKAGE
- HDassert(obj_ptr);
+ assert(obj_ptr);
/* Get the dataset creation property */
if ((ocpl_id = H5D_get_create_plist((H5D_t *)obj_ptr)) < 0)
@@ -593,8 +593,8 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj_ptr);
- HDassert(key);
+ assert(obj_ptr);
+ assert(key);
/* Do a global flush if the file is opened for write */
if (H5F_ACC_RDWR & H5F_INTENT(f)) {
@@ -717,7 +717,7 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi
FUNC_ENTER_PACKAGE
- HDassert(pline->nused > 0);
+ assert(pline->nused > 0);
/* Iterate over filters */
for (u = 0; u < pline->nused; u++) {
@@ -765,7 +765,7 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi
break;
default:
- HDassert("invalid prelude type" && 0);
+ assert("invalid prelude type" && 0);
} /* end switch */
} /* end else */
} /* end for */
@@ -797,8 +797,8 @@ H5Z__prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_typ
FUNC_ENTER_PACKAGE
- HDassert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
- HDassert(H5I_DATATYPE == H5I_get_type(type_id));
+ assert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
/* Check if the property list is non-default */
if (dcpl_id != H5P_DATASET_CREATE_DEFAULT) {
@@ -937,7 +937,7 @@ H5Z_can_apply_direct(const H5O_pline_t *pline)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(pline->nused > 0);
+ assert(pline->nused > 0);
/* Make "can apply" callbacks for filters in pipeline */
if (H5Z__prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_CAN_APPLY) < 0)
@@ -969,7 +969,7 @@ H5Z_set_local_direct(const H5O_pline_t *pline)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(pline->nused > 0);
+ assert(pline->nused > 0);
/* Make "set local" callbacks for filters in pipeline */
if (H5Z__prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_SET_LOCAL) < 0)
@@ -1061,10 +1061,10 @@ H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t
FUNC_ENTER_NOAPI(FAIL)
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
- HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK)));
- HDassert(0 == cd_nelmts || cd_values);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK)));
+ assert(0 == cd_nelmts || cd_values);
/* Locate the filter in the pipeline */
for (idx = 0; idx < pline->nused; idx++)
@@ -1125,10 +1125,10 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t cd_ne
FUNC_ENTER_NOAPI(FAIL)
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
- HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK)));
- HDassert(0 == cd_nelmts || cd_values);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK)));
+ assert(0 == cd_nelmts || cd_values);
/*
* Check filter limit. We do it here for early warnings although we may
@@ -1304,12 +1304,12 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, unsigned *filter_mask /*i
FUNC_ENTER_NOAPI(FAIL)
- HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_INVMASK)));
- HDassert(filter_mask);
- HDassert(nbytes && *nbytes > 0);
- HDassert(buf_size && *buf_size > 0);
- HDassert(buf && *buf);
- HDassert(!pline || pline->nused < H5Z_MAX_NFILTERS);
+ assert(0 == (flags & ~((unsigned)H5Z_FLAG_INVMASK)));
+ assert(filter_mask);
+ assert(nbytes && *nbytes > 0);
+ assert(buf_size && *buf_size > 0);
+ assert(buf && *buf);
+ assert(!pline || pline->nused < H5Z_MAX_NFILTERS);
#ifdef H5Z_DEBUG
H5_timer_init(&timer);
@@ -1474,8 +1474,8 @@ H5Z_filter_info(const H5O_pline_t *pline, H5Z_filter_t filter)
FUNC_ENTER_NOAPI(NULL)
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
/* Locate the filter in the pipeline */
for (idx = 0; idx < pline->nused; idx++)
@@ -1512,8 +1512,8 @@ H5Z_filter_in_pline(const H5O_pline_t *pline, H5Z_filter_t filter)
FUNC_ENTER_NOAPI_NOERR
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
/* Locate the filter in the pipeline */
for (idx = 0; idx < pline->nused; idx++)
@@ -1546,7 +1546,7 @@ H5Z_all_filters_avail(const H5O_pline_t *pline)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(pline);
+ assert(pline);
/* Iterate through all the filters in pipeline */
for (i = 0; i < pline->nused; i++) {
@@ -1582,8 +1582,8 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
/* if the pipeline has no filters, just return */
if (pline->nused == 0)
@@ -1612,11 +1612,11 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
/* Free information for deleted filter */
if (pline->filter[idx].name && pline->filter[idx].name != pline->filter[idx]._name)
- HDassert((HDstrlen(pline->filter[idx].name) + 1) > H5Z_COMMON_NAME_LEN);
+ assert((HDstrlen(pline->filter[idx].name) + 1) > H5Z_COMMON_NAME_LEN);
if (pline->filter[idx].name != pline->filter[idx]._name)
pline->filter[idx].name = (char *)H5MM_xfree(pline->filter[idx].name);
if (pline->filter[idx].cd_values && pline->filter[idx].cd_values != pline->filter[idx]._cd_values)
- HDassert(pline->filter[idx].cd_nelmts > H5Z_COMMON_CD_VALUES);
+ assert(pline->filter[idx].cd_nelmts > H5Z_COMMON_CD_VALUES);
if (pline->filter[idx].cd_values != pline->filter[idx]._cd_values)
pline->filter[idx].cd_values = (unsigned *)H5MM_xfree(pline->filter[idx].cd_values);
@@ -1636,7 +1636,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
pline->nused--;
/* Reset information for previous last filter in pipeline */
- HDmemset(&pline->filter[pline->nused], 0, sizeof(H5Z_filter_info_t));
+ memset(&pline->filter[pline->nused], 0, sizeof(H5Z_filter_info_t));
} /* end else */
done:
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index b446073..feac56a 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -74,9 +74,9 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[]
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(*buf_size > 0);
- HDassert(buf);
- HDassert(*buf);
+ assert(*buf_size > 0);
+ assert(buf);
+ assert(*buf);
/* Check arguments */
if (cd_nelmts != 1 || cd_values[0] > 9)
@@ -92,7 +92,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[]
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for deflate uncompression")
/* Set the uncompression parameters */
- HDmemset(&z_strm, 0, sizeof(z_strm));
+ memset(&z_strm, 0, sizeof(z_strm));
z_strm.next_in = (Bytef *)*buf;
H5_CHECKED_ASSIGN(z_strm.avail_in, unsigned, nbytes, size_t);
z_strm.next_out = (Bytef *)outbuf;
diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c
index bdf3759..19f24c4 100644
--- a/src/H5Zfletcher32.c
+++ b/src/H5Zfletcher32.c
@@ -68,7 +68,7 @@ H5Z__filter_fletcher32(unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts,
FUNC_ENTER_PACKAGE
- HDassert(sizeof(uint32_t) >= 4);
+ assert(sizeof(uint32_t) >= 4);
if (flags & H5Z_FLAG_REVERSE) { /* Read */
/* Do checksum if it's enabled for read; otherwise skip it
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 2088ddf..c0efcc6 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -866,7 +866,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
/* Get total number of elements in the chunk */
if ((npoints = H5S_GET_EXTENT_NPOINTS(ds)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get number of points in the dataspace")
- HDassert(npoints);
+ assert(npoints);
/* Initialize index for cd_values array starting from the third entry */
cd_values_index = 2;
@@ -915,7 +915,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
} /* end switch */
/* Check if calculation of parameters matches with setting of parameters */
- HDassert(cd_values_actual_nparms == cd_values_index);
+ assert(cd_values_actual_nparms == cd_values_index);
/* Finally set the first two entries of cd_values[] */
H5_CHECK_OVERFLOW(cd_values_actual_nparms, size_t, unsigned);
@@ -986,7 +986,7 @@ H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
} /* end if */
/* output; compress */
else {
- HDassert(nbytes == d_nelmts * cd_values[4]);
+ assert(nbytes == d_nelmts * cd_values[4]);
size_out = nbytes;
@@ -1128,7 +1128,7 @@ H5Z__nbit_decompress_one_atomic(unsigned char *data, size_t data_offset, unsigne
}
else { /* big endian */
/* Sanity check */
- HDassert(p->order == H5Z_NBIT_ORDER_BE);
+ assert(p->order == H5Z_NBIT_ORDER_BE);
/* calculate begin_i and end_i */
begin_i = ((unsigned)datatype_len - p->precision - p->offset) / 8;
@@ -1203,7 +1203,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset, unsigned
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
done:
@@ -1268,7 +1268,7 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset, unsig
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
}
@@ -1291,7 +1291,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff
FUNC_ENTER_PACKAGE
/* may not have to initialize to zeros */
- HDmemset(data, 0, d_nelmts * (size_t)parms[4]);
+ memset(data, 0, d_nelmts * (size_t)parms[4]);
/* initialization before the loop */
j = 0;
@@ -1335,7 +1335,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
done:
@@ -1435,7 +1435,7 @@ H5Z__nbit_compress_one_atomic(unsigned char *data, size_t data_offset, unsigned
}
else { /* big endian */
/* Sanity check */
- HDassert(p->order == H5Z_NBIT_ORDER_BE);
+ assert(p->order == H5Z_NBIT_ORDER_BE);
/* calculate begin_i and end_i */
begin_i = ((unsigned)datatype_len - p->precision - p->offset) / 8;
@@ -1499,7 +1499,7 @@ H5Z__nbit_compress_one_array(unsigned char *data, size_t data_offset, unsigned c
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
}
@@ -1542,7 +1542,7 @@ H5Z__nbit_compress_one_compound(unsigned char *data, size_t data_offset, unsigne
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
}
}
@@ -1561,7 +1561,7 @@ H5Z__nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer
unsigned parms_index; /* index in array parms used by compression/decompression functions */
/* must initialize buffer to be zeros */
- HDmemset(buffer, 0, *buffer_size);
+ memset(buffer, 0, *buffer_size);
/* initialization before the loop */
buf_len = sizeof(unsigned char) * 8;
@@ -1598,7 +1598,7 @@ H5Z__nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
/* Update the size to the new value after compression. If there are any bits hanging over in
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 6613ec2..57f807d 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -164,7 +164,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
} while (_size_rem); \
} /* end if */ \
else { \
- HDassert(H5T_native_order_g == H5T_ORDER_BE); \
+ assert(H5T_native_order_g == H5T_ORDER_BE); \
\
/* Copy 4 bytes at a time to each cd value, but start at the end \
* (highest address) of fill_val */ \
@@ -183,7 +183,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
_fv_p -= _size_rem; \
} /* end while */ \
\
- HDassert(_fv_p == (char *)&(fill_val)); \
+ assert(_fv_p == (char *)&(fill_val)); \
if (_size_rem) { \
/* Amount left to copy is smaller than a cd_value, initialize \
* _cd_value as it will not be fully overwritten and copy to the end \
@@ -291,7 +291,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
} while (_size_rem); \
} /* end if */ \
else { \
- HDassert(H5T_native_order_g == H5T_ORDER_BE); \
+ assert(H5T_native_order_g == H5T_ORDER_BE); \
\
/* Copy 4 bytes at a time to each cd value, but start at the end \
* (highest address) of fill_val */ \
@@ -310,7 +310,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
_fv_p -= _size_rem; \
} /* end while */ \
\
- HDassert(_fv_p == (char *)&(fill_val)); \
+ assert(_fv_p == (char *)&(fill_val)); \
if (_size_rem) { \
/* Amount left to copy is smaller than a cd_value, initialize \
* _cd_value as it will not be fully overwritten and copy to the end \
@@ -586,7 +586,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
if (H5T_native_order_g == H5T_ORDER_LE) \
H5MM_memcpy(minval, &min, sizeof(type)); \
else { \
- HDassert(H5T_native_order_g == H5T_ORDER_BE); \
+ assert(H5T_native_order_g == H5T_ORDER_BE); \
H5MM_memcpy(((char *)minval) + (sizeof(long long) - sizeof(type)), &min, sizeof(type)); \
} /* end else */ \
else \
@@ -670,7 +670,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
if (H5T_native_order_g == H5T_ORDER_LE) \
H5MM_memcpy(&min, &minval, sizeof(type)); \
else { \
- HDassert(H5T_native_order_g == H5T_ORDER_BE); \
+ assert(H5T_native_order_g == H5T_ORDER_BE); \
H5MM_memcpy(&min, ((char *)&minval) + (sizeof(long long) - sizeof(type)), sizeof(type)); \
} /* end else */ \
else \
@@ -957,7 +957,7 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Initialize the parameters to a known state */
- HDmemset(cd_values, 0, sizeof(cd_values));
+ memset(cd_values, 0, sizeof(cd_values));
/* Get the filter's current parameters */
if (H5P_get_filter_by_id(dcpl_plist, H5Z_FILTER_SCALEOFFSET, &flags, &cd_nelmts, cd_values, (size_t)0,
@@ -1238,7 +1238,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
minval |= minval_mask;
}
- HDassert(minbits <= p.size * 8);
+ assert(minbits <= p.size * 8);
p.minbits = minbits;
/* calculate size of output buffer after decompression */
@@ -1296,7 +1296,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
}
/* output; compress */
else {
- HDassert(nbytes == d_nelmts * p.size);
+ assert(nbytes == d_nelmts * p.size);
/* before preprocess, convert to memory endianness order if needed */
if (need_convert)
@@ -1317,7 +1317,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "pre-compression failed")
}
- HDassert(minbits <= p.size * 8);
+ assert(minbits <= p.size * 8);
/* calculate buffer size after compression
* minbits and minval are stored in the front of the compressed buffer
@@ -1347,7 +1347,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
/* (Looks like an error in the original determination of how many
* bytes would be needed for parameters. - QAK, 2010/08/19)
*/
- HDmemset(outbuf + 13, 0, (size_t)8);
+ memset(outbuf + 13, 0, (size_t)8);
/* special case: minbits equal to full precision */
if (minbits == p.size * 8) {
@@ -1652,7 +1652,7 @@ H5Z__scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned dtype_len;
int k;
- HDassert(p.minbits > 0);
+ assert(p.minbits > 0);
dtype_len = p.size * 8;
@@ -1664,7 +1664,7 @@ H5Z__scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
p, dtype_len);
}
else { /* big endian */
- HDassert(p.mem_order == H5Z_SCALEOFFSET_ORDER_BE);
+ assert(p.mem_order == H5Z_SCALEOFFSET_ORDER_BE);
begin_i = (dtype_len - p.minbits) / 8;
@@ -1736,7 +1736,7 @@ H5Z__scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset, un
unsigned dtype_len;
int k;
- HDassert(p.minbits > 0);
+ assert(p.minbits > 0);
dtype_len = p.size * 8;
@@ -1748,7 +1748,7 @@ H5Z__scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset, un
dtype_len);
}
else { /* big endian */
- HDassert(p.mem_order == H5Z_SCALEOFFSET_ORDER_BE);
+ assert(p.mem_order == H5Z_SCALEOFFSET_ORDER_BE);
begin_i = (dtype_len - p.minbits) / 8;
for (k = (int)begin_i; k <= (int)(p.size - 1); k++)
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index 4537110..99b33cc 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -171,7 +171,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[]
duffs_index = (numofelements + 7) / 8;
switch (numofelements % 8) {
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
break;
case 0:
do {
@@ -242,7 +242,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[]
duffs_index = (numofelements + 7) / 8;
switch (numofelements % 8) {
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
break;
case 0:
do {
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index b03ca38..6ebb528 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -181,7 +181,7 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
/* Set "local" parameter for this dataset's "pixels-per-scanline" */
/* (Use the chunk's fastest changing dimension size) */
- HDassert(ndims > 0);
+ assert(ndims > 0);
scanline = dims[ndims - 1];
/* Adjust scanline if it is smaller than number of pixels per block or
@@ -271,13 +271,13 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
/* Sanity check to make certain that we haven't drifted out of date with
* the mask options from the szlib.h header */
- HDassert(H5_SZIP_ALLOW_K13_OPTION_MASK == SZ_ALLOW_K13_OPTION_MASK);
- HDassert(H5_SZIP_CHIP_OPTION_MASK == SZ_CHIP_OPTION_MASK);
- HDassert(H5_SZIP_EC_OPTION_MASK == SZ_EC_OPTION_MASK);
- HDassert(H5_SZIP_LSB_OPTION_MASK == SZ_LSB_OPTION_MASK);
- HDassert(H5_SZIP_MSB_OPTION_MASK == SZ_MSB_OPTION_MASK);
- HDassert(H5_SZIP_NN_OPTION_MASK == SZ_NN_OPTION_MASK);
- HDassert(H5_SZIP_RAW_OPTION_MASK == SZ_RAW_OPTION_MASK);
+ assert(H5_SZIP_ALLOW_K13_OPTION_MASK == SZ_ALLOW_K13_OPTION_MASK);
+ assert(H5_SZIP_CHIP_OPTION_MASK == SZ_CHIP_OPTION_MASK);
+ assert(H5_SZIP_EC_OPTION_MASK == SZ_EC_OPTION_MASK);
+ assert(H5_SZIP_LSB_OPTION_MASK == SZ_LSB_OPTION_MASK);
+ assert(H5_SZIP_MSB_OPTION_MASK == SZ_MSB_OPTION_MASK);
+ assert(H5_SZIP_NN_OPTION_MASK == SZ_NN_OPTION_MASK);
+ assert(H5_SZIP_RAW_OPTION_MASK == SZ_RAW_OPTION_MASK);
/* Check arguments */
if (cd_nelmts != 4)
@@ -307,7 +307,7 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
size_out = nalloc;
if (SZ_BufftoBuffDecompress(outbuf, &size_out, newbuf, nbytes - 4, &sz_param) != SZ_OK)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "szip_filter: decompression failed")
- HDassert(size_out == nalloc);
+ assert(size_out == nalloc);
/* Free the input buffer */
H5MM_xfree(*buf);
@@ -334,7 +334,7 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
size_out = nbytes;
if (SZ_OK != SZ_BufftoBuffCompress(dst, &size_out, *buf, nbytes, &sz_param))
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "overflow")
- HDassert(size_out <= nbytes);
+ assert(size_out <= nbytes);
/* Free the input buffer */
H5MM_xfree(*buf);
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 39f9e9d..1ca156d 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -345,7 +345,7 @@ H5Z__unget_token(H5Z_token *current)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(current);
+ assert(current);
current->tok_type = current->tok_last_type;
current->tok_begin = current->tok_last_begin;
@@ -380,7 +380,7 @@ H5Z__get_token(H5Z_token *current)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(current);
+ assert(current);
/* Save the last position for possible ungets */
current->tok_last_type = current->tok_type;
@@ -952,7 +952,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size
FUNC_ENTER_NOAPI(FAIL)
- HDassert(data_xform_prop);
+ assert(data_xform_prop);
tree = data_xform_prop->parse_root;
@@ -1070,10 +1070,10 @@ H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(tree);
+ assert(tree);
- HDmemset(&resl, 0, sizeof(H5Z_result));
- HDmemset(&resr, 0, sizeof(H5Z_result));
+ memset(&resl, 0, sizeof(H5Z_result));
+ memset(&resr, 0, sizeof(H5Z_result));
if (tree->type == H5Z_XFORM_INTEGER) {
res->type = H5Z_XFORM_INTEGER;
@@ -1163,7 +1163,7 @@ H5Z__xform_find_type(const H5T_t *type)
FUNC_ENTER_PACKAGE
- HDassert(type);
+ assert(type);
/* Check for SHORT type */
if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_SHORT)) && 0 == H5T_cmp(type, tmp, FALSE))
@@ -1234,7 +1234,7 @@ H5Z__xform_copy_tree(H5Z_node *tree, H5Z_datval_ptrs *dat_val_pointers, H5Z_datv
FUNC_ENTER_PACKAGE
- HDassert(tree);
+ assert(tree);
if (tree->type == H5Z_XFORM_INTEGER) {
if ((ret_value = (H5Z_node *)H5MM_malloc(sizeof(H5Z_node))) == NULL)
@@ -1303,7 +1303,7 @@ H5Z__op_is_numbs(H5Z_node *_tree)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(_tree);
+ assert(_tree);
if (((_tree->lchild->type == H5Z_XFORM_INTEGER) || (_tree->lchild->type == H5Z_XFORM_FLOAT)) &&
((_tree->rchild->type == H5Z_XFORM_INTEGER) || (_tree->rchild->type == H5Z_XFORM_FLOAT)))
@@ -1334,7 +1334,7 @@ H5Z__op_is_numbs2(H5Z_node *_tree)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(_tree);
+ assert(_tree);
if ((!_tree->lchild &&
((_tree->rchild->type == H5Z_XFORM_INTEGER) || (_tree->rchild->type == H5Z_XFORM_FLOAT))) ||
@@ -1457,7 +1457,7 @@ H5Z_xform_create(const char *expr)
FUNC_ENTER_NOAPI(NULL)
- HDassert(expr);
+ assert(expr);
/* Allocate space for the data transform information */
if (NULL == (data_xform_prop = (H5Z_data_xform_t *)H5MM_calloc(sizeof(H5Z_data_xform_t))))
@@ -1723,7 +1723,7 @@ H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop)
/* There should be no way that this can be NULL since the function
* that calls this one checks to make sure it isn't before
* passing them */
- HDassert(data_xform_prop);
+ assert(data_xform_prop);
FUNC_LEAVE_NOAPI(data_xform_prop->xform_exp)
} /* H5Z_xform_extract_xform_str() */
diff --git a/src/H5checksum.c b/src/H5checksum.c
index cb1f754..a8f304c 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -106,8 +106,8 @@ H5_checksum_fletcher32(const void *_data, size_t _len)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(_data);
- HDassert(_len > 0);
+ assert(_data);
+ assert(_len > 0);
/* Compute checksum for pairs of bytes */
/* (the magic "360" value is the largest number of sums that can be
@@ -231,8 +231,8 @@ H5_checksum_crc(const void *_data, size_t len)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(_data);
- HDassert(len > 0);
+ assert(_data);
+ assert(len > 0);
FUNC_LEAVE_NOAPI(H5__checksum_crc_update((uint32_t)0xffffffffL, (const uint8_t *)_data, len) ^
0xffffffffL)
@@ -384,8 +384,8 @@ H5_checksum_lookup3(const void *key, size_t length, uint32_t initval)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(key);
- HDassert(length > 0);
+ assert(key);
+ assert(length > 0);
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
@@ -462,7 +462,7 @@ H5_checksum_lookup3(const void *key, size_t length, uint32_t initval)
case 0:
goto done;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
}
H5_lookup3_final(a, b, c);
@@ -491,8 +491,8 @@ H5_checksum_metadata(const void *data, size_t len, uint32_t initval)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(data);
- HDassert(len > 0);
+ assert(data);
+ assert(len > 0);
/* Choose the appropriate checksum routine */
/* (use Bob Jenkin's "lookup3" algorithm for all buffer sizes) */
@@ -523,7 +523,7 @@ H5_hash_string(const char *str)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(str);
+ assert(str);
while ((c = *str++))
hash = ((hash << 5) + hash) + (uint32_t)c; /* hash * 33 + c */
diff --git a/src/H5dbg.c b/src/H5dbg.c
index 08ebbb0..ed517ad 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -78,33 +78,33 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, const uint8_t *mark
/*
* Check arguments.
*/
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(buf);
- HDassert(marker);
- HDassert(buf_size > 0);
+ assert(stream);
+ assert(indent >= 0);
+ assert(buf);
+ assert(marker);
+ assert(buf_size > 0);
/*
* Print the buffer in a VMS-style octal dump.
*/
- HDfprintf(stream, "%*sData follows (`__' indicates free region)...\n", indent, "");
+ fprintf(stream, "%*sData follows (`__' indicates free region)...\n", indent, "");
for (u = 0; u < buf_size; u += 16) {
uint8_t c;
- HDfprintf(stream, "%*s %8zu: ", indent, "", u + buf_offset);
+ fprintf(stream, "%*s %8zu: ", indent, "", u + buf_offset);
/* Print the hex values */
for (v = 0; v < 16; v++) {
if (u + v < buf_size) {
if (marker[u + v])
- HDfprintf(stream, "__ ");
+ fprintf(stream, "__ ");
else {
c = buf[buf_offset + u + v];
- HDfprintf(stream, "%02x ", c);
+ fprintf(stream, "%02x ", c);
} /* end else */
} /* end if */
else
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
if (7 == v)
HDfputc(' ', stream);
diff --git a/src/H5detect.c b/src/H5detect.c
index daf7708..6135c03 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -41,7 +41,7 @@ static const char *FileHeader = "\n\
*/
#undef NDEBUG
#include "H5private.h"
-/* Do NOT use HDfprintf in this file as it is not linked with the library,
+/* Do NOT use fprintf in this file as it is not linked with the library,
* which contains the H5system.c file in which the function is defined.
*/
#include "H5Tpublic.h"
@@ -132,12 +132,12 @@ precision(detected_t *d)
int _i, _j, _last = (-1); \
const char *_mesg; \
\
- HDmemset(&INFO, 0, sizeof(INFO)); \
+ memset(&INFO, 0, sizeof(INFO)); \
INFO.varname = #VAR; \
INFO.size = sizeof(TYPE); \
\
/* Initialize padding mask */ \
- HDmemset(_pad_mask, 0, sizeof(_pad_mask)); \
+ memset(_pad_mask, 0, sizeof(_pad_mask)); \
\
/* Padding bits. Set a variable to 4.0, then flip each bit and see if \
* the modified variable is equal ("==") to the original. Build a \
@@ -147,11 +147,11 @@ precision(detected_t *d)
* and interfere with detection of the various properties below unless we \
* know to ignore them. */ \
_v1 = (TYPE)4.0L; \
- HDmemcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
+ memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
for (_i = 0; _i < (int)sizeof(TYPE); _i++) \
for (_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char)(_byte_mask << 1)) { \
_buf1[_i] ^= _byte_mask; \
- HDmemcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
+ memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
H5_GCC_CLANG_DIAG_OFF("float-equal") \
if (_v1 != _v2) \
_pad_mask[_i] |= _byte_mask; \
@@ -164,8 +164,8 @@ precision(detected_t *d)
_v3 = _v1; \
_v1 += _v2; \
_v2 /= (TYPE)256.0L; \
- HDmemcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
- HDmemcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \
+ memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
+ memcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \
_j = byte_cmp(sizeof(TYPE), _buf3, _buf1, _pad_mask); \
if (_j >= 0) { \
INFO.perm[_i] = _j; \
@@ -366,9 +366,9 @@ H5T__init_native(void)\n\
dt->shared->u.atomic.prec = %d;\n\
dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO;\n\
dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO;\n",
- d[i].offset, /*offset */
- d[i].precision); /*precision */
- /*HDassert((d[i].perm[0]>0)==(byte_order>0));*/ /* Double-check that byte-order doesn't change */
+ d[i].offset, /*offset */
+ d[i].precision); /*precision */
+ /*assert((d[i].perm[0]>0)==(byte_order>0));*/ /* Double-check that byte-order doesn't change */
/* The part unique to floating point types */
fprintf(rawoutstream, "\
@@ -547,7 +547,7 @@ bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b, const unsigned char
unsigned char aa, bb;
for (i = 0; i < nbytes; i++) {
- HDassert(perm[i] < (int)nbytes);
+ assert(perm[i] < (int)nbytes);
if ((aa = (unsigned char)(a[perm[i]] & pad_mask[perm[i]])) !=
(bb = (unsigned char)(b[perm[i]] & pad_mask[perm[i]]))) {
unsigned int j;
@@ -613,7 +613,7 @@ fix_order(int n, int last, int *perm, const char **mesg)
* It could have some other endianness and fall into this
* case - JKM & QAK)
*/
- HDassert(0 == n % 2);
+ assert(0 == n % 2);
if (mesg)
*mesg = "VAX";
for (i = 0; i < n; i += 2) {
@@ -624,7 +624,7 @@ fix_order(int n, int last, int *perm, const char **mesg)
}
else {
fprintf(stderr, "Failed to detect byte order of %d-byte floating point.\n", n);
- HDexit(1);
+ exit(1);
}
}
@@ -914,7 +914,7 @@ main(int argc, char *argv[])
/* First check if filename is string "NULL" */
if (fname != NULL) {
/* binary output */
- if ((f = HDfopen(fname, "w")) != NULL)
+ if ((f = fopen(fname, "w")) != NULL)
rawoutstream = f;
}
if (!rawoutstream)
diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c
index 88a6d7d..c76d492 100644
--- a/src/H5make_libsettings.c
+++ b/src/H5make_libsettings.c
@@ -32,7 +32,7 @@ static const char *FileHeader = "\n\
#include "H5private.h"
-/* Do NOT use HDfprintf in this file as it is not linked with the library,
+/* Do NOT use fprintf in this file as it is not linked with the library,
* which contains the H5system.c file in which the function is defined.
*/
@@ -59,32 +59,32 @@ insert_libhdf5_settings(FILE *flibinfo)
int inchar;
int bol = 0; /* indicates the beginning of a new line */
- if (NULL == (fsettings = HDfopen(LIBSETTINGSFNAME, "r"))) {
+ if (NULL == (fsettings = fopen(LIBSETTINGSFNAME, "r"))) {
HDperror(LIBSETTINGSFNAME);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Turn off warnings for large arrays. If the library info string is
* a problem, people can build without the embedded library info.
*/
- HDfprintf(flibinfo, "#include \"H5private.h\"\n");
- HDfprintf(flibinfo, "H5_GCC_DIAG_OFF(\"larger-than=\")\n\n");
- HDfprintf(flibinfo, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n\n");
+ fprintf(flibinfo, "#include \"H5private.h\"\n");
+ fprintf(flibinfo, "H5_GCC_DIAG_OFF(\"larger-than=\")\n\n");
+ fprintf(flibinfo, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n\n");
/* Print variable definition and the string. Do not use const or some
* platforms (AIX?) will have issues.
*/
- HDfprintf(flibinfo, "char H5libhdf5_settings[]=\n");
+ fprintf(flibinfo, "char H5libhdf5_settings[]=\n");
bol++;
while (EOF != (inchar = HDgetc(fsettings))) {
if (bol) {
/* Start a new line */
- HDfprintf(flibinfo, "\t\"");
+ fprintf(flibinfo, "\t\"");
bol = 0;
}
if (inchar == '\n') {
/* end of a line */
- HDfprintf(flibinfo, "\\n\"\n");
+ fprintf(flibinfo, "\\n\"\n");
bol++;
}
else
@@ -95,26 +95,26 @@ insert_libhdf5_settings(FILE *flibinfo)
/* wrap up */
if (!bol)
/* EOF found without a new line */
- HDfprintf(flibinfo, "\\n\"\n");
- HDfprintf(flibinfo, ";\n\n");
+ fprintf(flibinfo, "\\n\"\n");
+ fprintf(flibinfo, ";\n\n");
}
else {
- HDfprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME);
+ exit(EXIT_FAILURE);
}
if (0 != HDfclose(fsettings)) {
HDperror(LIBSETTINGSFNAME);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Re-enable warnings for large arrays */
- HDfprintf(rawoutstream, "H5_GCC_DIAG_ON(\"larger-than=\")\n");
- HDfprintf(rawoutstream, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n");
+ fprintf(rawoutstream, "H5_GCC_DIAG_ON(\"larger-than=\")\n");
+ fprintf(rawoutstream, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n");
#else
/* Print variable definition and an empty string. Do not use const or some
* platforms (AIX?) will have issues.
*/
- HDfprintf(flibinfo, "char H5libhdf5_settings[]=\"\";\n");
+ fprintf(flibinfo, "char H5libhdf5_settings[]=\"\";\n");
#endif
} /* insert_libhdf5_settings() */
@@ -202,42 +202,42 @@ information about the library build configuration\n";
/*
* The file header: warning, copyright notice, build information.
*/
- HDfprintf(rawoutstream, "/* Generated automatically by H5make_libsettings -- do not edit */\n\n\n");
+ fprintf(rawoutstream, "/* Generated automatically by H5make_libsettings -- do not edit */\n\n\n");
HDfputs(FileHeader, rawoutstream); /*the copyright notice--see top of this file */
- HDfprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday,
- 1900 + tm->tm_year);
+ fprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday,
+ 1900 + tm->tm_year);
if (pwd || real_name[0] || host_name[0]) {
- HDfprintf(rawoutstream, " *\t\t\t");
+ fprintf(rawoutstream, " *\t\t\t");
if (real_name[0])
- HDfprintf(rawoutstream, "%s <", real_name);
+ fprintf(rawoutstream, "%s <", real_name);
#ifdef H5_HAVE_GETPWUID
if (pwd)
HDfputs(pwd->pw_name, rawoutstream);
#endif
if (host_name[0])
- HDfprintf(rawoutstream, "@%s", host_name);
+ fprintf(rawoutstream, "@%s", host_name);
if (real_name[0])
- HDfprintf(rawoutstream, ">");
+ fprintf(rawoutstream, ">");
HDfputc('\n', rawoutstream);
}
- HDfprintf(rawoutstream, " *\n * Purpose:\t\t");
+ fprintf(rawoutstream, " *\n * Purpose:\t\t");
for (s = purpose; *s; s++) {
HDfputc(*s, rawoutstream);
if ('\n' == *s && s[1])
- HDfprintf(rawoutstream, " *\t\t\t");
+ fprintf(rawoutstream, " *\t\t\t");
}
- HDfprintf(rawoutstream, " *\n");
- HDfprintf(rawoutstream, " *\tDO NOT MAKE MODIFICATIONS TO THIS FILE!\n");
- HDfprintf(rawoutstream, " *\tIt was generated by code in `H5make_libsettings.c'.\n");
+ fprintf(rawoutstream, " *\n");
+ fprintf(rawoutstream, " *\tDO NOT MAKE MODIFICATIONS TO THIS FILE!\n");
+ fprintf(rawoutstream, " *\tIt was generated by code in `H5make_libsettings.c'.\n");
- HDfprintf(rawoutstream, " *\n *");
+ fprintf(rawoutstream, " *\n *");
for (i = 0; i < 73; i++)
HDfputc('-', rawoutstream);
- HDfprintf(rawoutstream, "\n */\n\n");
+ fprintf(rawoutstream, "\n */\n\n");
}
/*-------------------------------------------------------------------------
@@ -276,7 +276,7 @@ main(int argc, char *argv[])
/* First check if filename is string "NULL" */
if (fname != NULL) {
/* binary output */
- if ((f = HDfopen(fname, "w")) != NULL)
+ if ((f = fopen(fname, "w")) != NULL)
rawoutstream = f;
}
if (!rawoutstream)
@@ -291,10 +291,10 @@ main(int argc, char *argv[])
if (rawoutstream && rawoutstream != stdout) {
if (HDfclose(rawoutstream))
- HDfprintf(stderr, "closing rawoutstream");
+ fprintf(stderr, "closing rawoutstream");
else
rawoutstream = NULL;
}
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
diff --git a/src/H5mpi.c b/src/H5mpi.c
index f847508..11b0b7b 100644
--- a/src/H5mpi.c
+++ b/src/H5mpi.c
@@ -395,9 +395,9 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
same = TRUE;
/* Memset the buffers to zero */
- HDmemset(key, 0, MPI_MAX_INFO_KEY);
- HDmemset(value1, 0, MPI_MAX_INFO_VAL);
- HDmemset(value2, 0, MPI_MAX_INFO_VAL);
+ memset(key, 0, MPI_MAX_INFO_KEY);
+ memset(value1, 0, MPI_MAX_INFO_VAL);
+ memset(value2, 0, MPI_MAX_INFO_VAL);
/* Get the nth key */
if (MPI_SUCCESS != (mpi_code = MPI_Info_get_nthkey(info1, i, key)))
@@ -410,7 +410,7 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
HMPI_GOTO_ERROR(FAIL, "MPI_Info_get failed", mpi_code)
/* Compare values and flags */
- if (!flag1 || !flag2 || HDmemcmp(value1, value2, MPI_MAX_INFO_VAL)) {
+ if (!flag1 || !flag2 || memcmp(value1, value2, MPI_MAX_INFO_VAL)) {
same = FALSE;
break;
}
@@ -639,9 +639,9 @@ H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type, co
FUNC_ENTER_NOAPI(FAIL)
- HDassert(send_buf || send_count == 0);
+ assert(send_buf || send_count == 0);
if (allgather || (mpi_rank == root))
- HDassert(out_buf && out_buf_num_entries);
+ assert(out_buf && out_buf_num_entries);
/* Retrieve the extent of the MPI Datatype being used */
#if H5_CHECK_MPI_VERSION(3, 0)
@@ -725,9 +725,9 @@ H5_mpio_gatherv_alloc_simple(void *send_buf, int send_count, MPI_Datatype send_t
FUNC_ENTER_NOAPI(FAIL)
- HDassert(send_buf || send_count == 0);
+ assert(send_buf || send_count == 0);
if (allgather || (mpi_rank == root))
- HDassert(out_buf && out_buf_num_entries);
+ assert(out_buf && out_buf_num_entries);
/*
* Allocate array to store the receive counts of each rank, as well as
@@ -809,7 +809,7 @@ H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file_sync_required);
+ assert(file_sync_required);
*file_sync_required = FALSE;
diff --git a/src/H5system.c b/src/H5system.c
index 8991f6a..36b3ab5 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -75,18 +75,18 @@ HDvasprintf(char **bufp, const char *fmt, va_list _ap)
char *buf; /* buffer to receive formatted string */
size_t bufsz; /* size of buffer to allocate */
- for (bufsz = 32; (buf = HDmalloc(bufsz)) != NULL;) {
+ for (bufsz = 32; (buf = malloc(bufsz)) != NULL;) {
int ret;
va_list ap;
- HDva_copy(ap, _ap);
+ va_copy(ap, _ap);
ret = HDvsnprintf(buf, bufsz, fmt, ap);
va_end(ap);
if (ret >= 0 && (size_t)ret < bufsz) {
*bufp = buf;
return ret;
}
- HDfree(buf);
+ free(buf);
if (ret < 0)
return ret;
bufsz = (size_t)ret + 1;
@@ -227,7 +227,7 @@ H5_make_time(struct tm *tm)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(tm);
+ assert(tm);
/* Initialize timezone information */
if (!H5_ntzset) {
@@ -398,7 +398,7 @@ H5_get_win32_times(H5_timevals_t *tvs /*in,out*/)
static hbool_t is_initialized = FALSE;
BOOL err;
- HDassert(tvs);
+ assert(tvs);
if (!is_initialized) {
/* NOTE: This is just a pseudo handle and does not need to be closed. */
@@ -569,9 +569,9 @@ Wopen_utf8(const char *path, int oflag, ...)
if (oflag & O_CREAT) {
va_list vl;
- HDva_start(vl, oflag);
- pmode = HDva_arg(vl, int);
- HDva_end(vl);
+ va_start(vl, oflag);
+ pmode = va_arg(vl, int);
+ va_end(vl);
}
/* Open the file */
@@ -650,8 +650,8 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(name);
- HDassert(extpath);
+ assert(name);
+ assert(extpath);
/* Clear external path pointer to begin with */
*extpath = NULL;
@@ -705,10 +705,10 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
size_t cwdlen;
size_t path_len;
- HDassert(cwdpath);
+ assert(cwdpath);
cwdlen = HDstrlen(cwdpath);
- HDassert(cwdlen);
- HDassert(new_name);
+ assert(cwdlen);
+ assert(new_name);
path_len = cwdlen + HDstrlen(new_name) + 2;
if (NULL == (full_path = (char *)H5MM_malloc(path_len)))
HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed")
@@ -725,7 +725,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
char *ptr = NULL;
H5_GET_LAST_DELIMITER(full_path, ptr)
- HDassert(ptr);
+ assert(ptr);
*++ptr = '\0';
*extpath = full_path;
} /* end if */
@@ -762,7 +762,7 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(path2);
+ assert(path2);
if (path1)
path1_len = HDstrlen(path1);
@@ -1085,7 +1085,7 @@ H5_dirname(const char *path, char **dirname)
else {
/* Pathname of form "dir/filename" */
len = sep - path;
- HDassert(len >= 0);
+ assert(len >= 0);
out = H5MM_strndup(path, (size_t)len);
}
@@ -1187,7 +1187,7 @@ H5_basename(const char *path, char **basename)
c_ptr--;
len = sep - c_ptr;
- HDassert(len >= 0);
+ assert(len >= 0);
out = H5MM_strndup(c_ptr, (size_t)len);
}
@@ -1273,7 +1273,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
}
else if (l_opts[i].has_arg == require_arg) {
if (H5_opterr)
- HDfprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg);
+ fprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg);
optchar = '?';
}
@@ -1282,7 +1282,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
else {
if (H5_optarg) {
if (H5_opterr)
- HDfprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg);
+ fprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg);
optchar = '?';
}
@@ -1294,7 +1294,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
if (l_opts[i].name == NULL) {
/* exhausted all of the l_opts we have and still didn't match */
if (H5_opterr)
- HDfprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
+ fprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
optchar = '?';
}
@@ -1302,7 +1302,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
H5_optind++;
sp = 1;
- HDfree(arg);
+ free(arg);
}
else {
char *cp; /* pointer into current token */
@@ -1312,7 +1312,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
if (optchar == ':' || (cp = HDstrchr(opts, optchar)) == 0) {
if (H5_opterr)
- HDfprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], optchar);
+ fprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], optchar);
/* if no chars left in this token, move to next token */
if (argv[H5_optind][++sp] == '\0') {
@@ -1330,7 +1330,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
}
else if (++H5_optind >= argc) {
if (H5_opterr)
- HDfprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], optchar);
+ fprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], optchar);
optchar = '?';
}
@@ -1389,8 +1389,8 @@ char *
H5_strcasestr(const char *haystack, const char *needle)
{
/* Check arguments. */
- HDassert(haystack);
- HDassert(needle);
+ assert(haystack);
+ assert(needle);
/* begin once from each character of haystack, until needle is found */
do {
diff --git a/src/H5timer.c b/src/H5timer.c
index 7065814..c264097 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -275,7 +275,7 @@ static herr_t
H5__timer_get_timevals(H5_timevals_t *times /*in,out*/)
{
/* Sanity check */
- HDassert(times);
+ assert(times);
/* Windows call handles both system/user and elapsed times */
#ifdef H5_HAVE_WIN32_API
@@ -375,10 +375,10 @@ herr_t
H5_timer_init(H5_timer_t *timer /*in,out*/)
{
/* Sanity check */
- HDassert(timer);
+ assert(timer);
/* Initialize everything */
- HDmemset(timer, 0, sizeof(H5_timer_t));
+ memset(timer, 0, sizeof(H5_timer_t));
return 0;
} /* end H5_timer_init() */
@@ -400,7 +400,7 @@ herr_t
H5_timer_start(H5_timer_t *timer /*in,out*/)
{
/* Sanity check */
- HDassert(timer);
+ assert(timer);
/* Start the timer
* This sets the "initial" times to the system-defined start times.
@@ -430,7 +430,7 @@ herr_t
H5_timer_stop(H5_timer_t *timer /*in,out*/)
{
/* Sanity check */
- HDassert(timer);
+ assert(timer);
/* Stop the timer */
if (H5__timer_get_timevals(&(timer->final_interval)) < 0)
@@ -481,7 +481,7 @@ herr_t
H5_timer_get_times(H5_timer_t timer, H5_timevals_t *times /*in,out*/)
{
/* Sanity check */
- HDassert(times);
+ assert(times);
if (timer.is_running) {
H5_timevals_t now;
@@ -536,7 +536,7 @@ herr_t
H5_timer_get_total_times(H5_timer_t timer, H5_timevals_t *times /*in,out*/)
{
/* Sanity check */
- HDassert(times);
+ assert(times);
if (timer.is_running) {
H5_timevals_t now;
@@ -617,7 +617,7 @@ H5_timer_get_time_string(double seconds)
} /* end if */
/* Allocate */
- if (NULL == (s = (char *)HDcalloc(H5TIMER_TIME_STRING_LEN, sizeof(char))))
+ if (NULL == (s = (char *)calloc(H5TIMER_TIME_STRING_LEN, sizeof(char))))
return NULL;
/* Do we need a format string? Some people might like a certain
diff --git a/src/H5trace.c b/src/H5trace.c
index 71b66a8..4f91b6b 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -259,13 +259,13 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
if ('a' == type[1]) {
asize_idx = (int)HDstrtol(type + 2, &rest, 10);
- HDassert(0 <= asize_idx && asize_idx < (int)NELMTS(asize));
- HDassert(']' == *rest);
+ assert(0 <= asize_idx && asize_idx < (int)NELMTS(asize));
+ assert(']' == *rest);
type = rest + 1;
}
else {
rest = (char *)HDstrchr(type, ']');
- HDassert(rest);
+ assert(rest);
type = rest + 1;
asize_idx = -1;
}
@@ -278,7 +278,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
* don't print the argument or the following `=' (this is used for
* return values).
*/
- argname = HDva_arg(ap, char *);
+ argname = va_arg(ap, char *);
if (argname)
H5RS_asprintf_cat(rs, "%s%s=", argno ? ", " : "", argname);
else
@@ -286,7 +286,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
/* A pointer/array */
if (ptr) {
- vp = HDva_arg(ap, void *);
+ vp = va_arg(ap, void *);
if (vp) {
switch (type[0]) {
case 'h': /* hsize_t */
@@ -441,7 +441,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[0]) {
case 'a': /* haddr_t */
{
- haddr_t addr = HDva_arg(ap, haddr_t);
+ haddr_t addr = va_arg(ap, haddr_t);
if (H5F_addr_defined(addr))
H5RS_asprintf_cat(rs, "%" PRIuHADDR, addr);
@@ -454,7 +454,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'i': /* H5A_info_t */
{
- H5A_info_t ainfo = HDva_arg(ap, H5A_info_t);
+ H5A_info_t ainfo = va_arg(ap, H5A_info_t);
H5RS_acat(rs, "{");
H5_trace_args_bool(rs, ainfo.corder_valid);
@@ -467,7 +467,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'o': /* H5A_operator1_t */
{
- H5A_operator1_t aop1 = (H5A_operator1_t)HDva_arg(ap, H5A_operator1_t);
+ H5A_operator1_t aop1 = (H5A_operator1_t)va_arg(ap, H5A_operator1_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)aop1);
} /* end block */
@@ -476,7 +476,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'O': /* H5A_operator2_t */
{
- H5A_operator2_t aop2 = (H5A_operator2_t)HDva_arg(ap, H5A_operator2_t);
+ H5A_operator2_t aop2 = (H5A_operator2_t)va_arg(ap, H5A_operator2_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)aop2);
} /* end block */
@@ -490,8 +490,8 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'b': /* hbool_t */
{
- /* Can't pass hbool_t to HDva_arg() */
- hbool_t bool_var = (hbool_t)HDva_arg(ap, int);
+ /* Can't pass hbool_t to va_arg() */
+ hbool_t bool_var = (hbool_t)va_arg(ap, int);
H5_trace_args_bool(rs, bool_var);
} /* end block */
@@ -501,7 +501,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'c': /* H5AC_cache_config_t */
{
- H5AC_cache_config_t cc = HDva_arg(ap, H5AC_cache_config_t);
+ H5AC_cache_config_t cc = va_arg(ap, H5AC_cache_config_t);
H5RS_asprintf_cat(rs, "{%d, ", cc.version);
H5_trace_args_bool(rs, cc.rpt_fcn_enabled);
@@ -586,7 +586,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5AC_cache_image_config_t */
{
- H5AC_cache_image_config_t cic = HDva_arg(ap, H5AC_cache_image_config_t);
+ H5AC_cache_image_config_t cic = va_arg(ap, H5AC_cache_image_config_t);
H5RS_asprintf_cat(rs, "{%d, ", cic.version);
H5_trace_args_bool(rs, cic.generate_image);
@@ -605,7 +605,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* double */
{
- double dbl = HDva_arg(ap, double);
+ double dbl = va_arg(ap, double);
H5RS_asprintf_cat(rs, "%g", dbl);
} /* end block */
@@ -615,7 +615,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'a': /* H5D_alloc_time_t */
{
- H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)HDva_arg(ap, int);
+ H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)va_arg(ap, int);
switch (alloc_time) {
case H5D_ALLOC_TIME_ERROR:
@@ -647,7 +647,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'A': /* H5D_append_cb_t */
{
- H5D_append_cb_t dapp = (H5D_append_cb_t)HDva_arg(ap, H5D_append_cb_t);
+ H5D_append_cb_t dapp = (H5D_append_cb_t)va_arg(ap, H5D_append_cb_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)dapp);
} /* end block */
@@ -655,7 +655,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'c': /* H5FD_mpio_collective_opt_t */
{
- H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)HDva_arg(ap, int);
+ H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)va_arg(ap, int);
switch (opt) {
case H5FD_MPIO_COLLECTIVE_IO:
@@ -676,7 +676,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5D_selection_io_mode_t */
{
H5D_selection_io_mode_t selection_io_mode =
- (H5D_selection_io_mode_t)HDva_arg(ap, int);
+ (H5D_selection_io_mode_t)va_arg(ap, int);
switch (selection_io_mode) {
case H5D_SELECTION_IO_MODE_DEFAULT:
@@ -700,7 +700,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5D_fill_time_t */
{
- H5D_fill_time_t fill_time = (H5D_fill_time_t)HDva_arg(ap, int);
+ H5D_fill_time_t fill_time = (H5D_fill_time_t)va_arg(ap, int);
switch (fill_time) {
case H5D_FILL_TIME_ERROR:
@@ -728,7 +728,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'F': /* H5D_fill_value_t */
{
- H5D_fill_value_t fill_value = (H5D_fill_value_t)HDva_arg(ap, int);
+ H5D_fill_value_t fill_value = (H5D_fill_value_t)va_arg(ap, int);
switch (fill_value) {
case H5D_FILL_VALUE_ERROR:
@@ -756,7 +756,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'g': /* H5D_gather_func_t */
{
- H5D_gather_func_t gop = (H5D_gather_func_t)HDva_arg(ap, H5D_gather_func_t);
+ H5D_gather_func_t gop = (H5D_gather_func_t)va_arg(ap, H5D_gather_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)gop);
} /* end block */
@@ -764,7 +764,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'h': /* H5FD_mpio_chunk_opt_t */
{
- H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)HDva_arg(ap, int);
+ H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)va_arg(ap, int);
switch (opt) {
case H5FD_MPIO_CHUNK_DEFAULT:
@@ -789,7 +789,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* H5D_mpio_actual_io_mode_t */
{
H5D_mpio_actual_io_mode_t actual_io_mode =
- (H5D_mpio_actual_io_mode_t)HDva_arg(ap, int);
+ (H5D_mpio_actual_io_mode_t)va_arg(ap, int);
switch (actual_io_mode) {
case H5D_MPIO_NO_COLLECTIVE:
@@ -821,7 +821,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5FD_file_image_callbacks_t */
{
- H5FD_file_image_callbacks_t ficb = HDva_arg(ap, H5FD_file_image_callbacks_t);
+ H5FD_file_image_callbacks_t ficb = va_arg(ap, H5FD_file_image_callbacks_t);
H5RS_asprintf_cat(rs, "{%p, ", (void *)(uintptr_t)ficb.image_malloc);
H5RS_asprintf_cat(rs, "%p, ", (void *)(uintptr_t)ficb.image_memcpy);
@@ -835,7 +835,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'k': /* H5D_chunk_index_t */
{
- H5D_chunk_index_t idx = (H5D_chunk_index_t)HDva_arg(ap, int);
+ H5D_chunk_index_t idx = (H5D_chunk_index_t)va_arg(ap, int);
switch (idx) {
case H5D_CHUNK_IDX_BTREE:
@@ -875,7 +875,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'l': /* H5D_layout_t */
{
- H5D_layout_t layout = (H5D_layout_t)HDva_arg(ap, int);
+ H5D_layout_t layout = (H5D_layout_t)va_arg(ap, int);
switch (layout) {
case H5D_LAYOUT_ERROR:
@@ -912,7 +912,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'n': /* H5D_mpio_no_collective_cause_t */
{
H5D_mpio_no_collective_cause_t nocol_cause_mode =
- (H5D_mpio_no_collective_cause_t)HDva_arg(ap, int);
+ (H5D_mpio_no_collective_cause_t)va_arg(ap, int);
hbool_t flag_already_displayed = FALSE;
/* Check for all bit-flags which might be set */
@@ -960,7 +960,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5D_mpio_actual_chunk_opt_mode_t */
{
H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode =
- (H5D_mpio_actual_chunk_opt_mode_t)HDva_arg(ap, int);
+ (H5D_mpio_actual_chunk_opt_mode_t)va_arg(ap, int);
switch (chunk_opt_mode) {
case H5D_MPIO_NO_CHUNK_OPTIMIZATION:
@@ -984,7 +984,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'O': /* H5D_operator_t */
{
- H5D_operator_t dop = (H5D_operator_t)HDva_arg(ap, H5D_operator_t);
+ H5D_operator_t dop = (H5D_operator_t)va_arg(ap, H5D_operator_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)dop);
} /* end block */
@@ -992,7 +992,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5D_space_status_t */
{
- H5D_space_status_t space_status = (H5D_space_status_t)HDva_arg(ap, int);
+ H5D_space_status_t space_status = (H5D_space_status_t)va_arg(ap, int);
switch (space_status) {
case H5D_SPACE_STATUS_NOT_ALLOCATED:
@@ -1020,7 +1020,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'S': /* H5D_scatter_func_t */
{
- H5D_scatter_func_t sop = (H5D_scatter_func_t)HDva_arg(ap, H5D_scatter_func_t);
+ H5D_scatter_func_t sop = (H5D_scatter_func_t)va_arg(ap, H5D_scatter_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)sop);
} /* end block */
@@ -1028,7 +1028,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5FD_mpio_xfer_t */
{
- H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)HDva_arg(ap, int);
+ H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)va_arg(ap, int);
switch (transfer) {
case H5FD_MPIO_INDEPENDENT:
@@ -1048,7 +1048,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'v': /* H5D_vds_view_t */
{
- H5D_vds_view_t view = (H5D_vds_view_t)HDva_arg(ap, int);
+ H5D_vds_view_t view = (H5D_vds_view_t)va_arg(ap, int);
switch (view) {
case H5D_VDS_ERROR:
@@ -1072,8 +1072,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'V': /* H5FD_class_value_t */
{
- H5FD_class_value_t class_val =
- (H5FD_class_value_t)HDva_arg(ap, H5FD_class_value_t);
+ H5FD_class_value_t class_val = (H5FD_class_value_t)va_arg(ap, H5FD_class_value_t);
switch (class_val) {
case H5_VFD_INVALID:
@@ -1145,7 +1144,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* herr_t */
{
- herr_t status = HDva_arg(ap, herr_t);
+ herr_t status = va_arg(ap, herr_t);
if (status >= 0)
H5RS_acat(rs, "SUCCEED");
@@ -1159,7 +1158,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'a': /* H5E_auto1_t */
{
- H5E_auto1_t eauto1 = (H5E_auto1_t)HDva_arg(ap, H5E_auto1_t);
+ H5E_auto1_t eauto1 = (H5E_auto1_t)va_arg(ap, H5E_auto1_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)eauto1);
} /* end block */
@@ -1168,7 +1167,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'A': /* H5E_auto2_t */
{
- H5E_auto2_t eauto2 = (H5E_auto2_t)HDva_arg(ap, H5E_auto2_t);
+ H5E_auto2_t eauto2 = (H5E_auto2_t)va_arg(ap, H5E_auto2_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)eauto2);
} /* end block */
@@ -1177,7 +1176,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5ES_event_complete_func_t */
{
H5ES_event_complete_func_t cfunc =
- (H5ES_event_complete_func_t)HDva_arg(ap, H5ES_event_complete_func_t);
+ (H5ES_event_complete_func_t)va_arg(ap, H5ES_event_complete_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)cfunc);
} /* end block */
@@ -1185,7 +1184,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* H5E_direction_t */
{
- H5E_direction_t direction = (H5E_direction_t)HDva_arg(ap, int);
+ H5E_direction_t direction = (H5E_direction_t)va_arg(ap, int);
switch (direction) {
case H5E_WALK_UPWARD:
@@ -1205,7 +1204,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* H5E_error_t */
{
- H5E_error2_t *error = HDva_arg(ap, H5E_error2_t *);
+ H5E_error2_t *error = va_arg(ap, H5E_error2_t *);
H5RS_asprintf_cat(rs, "%p", (void *)error);
} /* end block */
@@ -1214,7 +1213,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5ES_event_insert_func_t */
{
H5ES_event_insert_func_t ifunc =
- (H5ES_event_insert_func_t)HDva_arg(ap, H5ES_event_insert_func_t);
+ (H5ES_event_insert_func_t)va_arg(ap, H5ES_event_insert_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ifunc);
} /* end block */
@@ -1222,7 +1221,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5ES_status_t */
{
- H5ES_status_t status = (H5ES_status_t)HDva_arg(ap, int);
+ H5ES_status_t status = (H5ES_status_t)va_arg(ap, int);
switch (status) {
case H5ES_STATUS_IN_PROGRESS:
@@ -1250,7 +1249,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5E_type_t */
{
- H5E_type_t etype = (H5E_type_t)HDva_arg(ap, int);
+ H5E_type_t etype = (H5E_type_t)va_arg(ap, int);
switch (etype) {
case H5E_MAJOR:
@@ -1278,7 +1277,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'C': /* H5FD_class_t */
{
- H5FD_class_t cls = HDva_arg(ap, H5FD_class_t);
+ H5FD_class_t cls = va_arg(ap, H5FD_class_t);
H5RS_asprintf_cat(rs, "{'%s', %" PRIuHADDR ", ", cls.name, cls.maxaddr);
H5_trace_args_close_degree(rs, cls.fc_degree);
@@ -1288,7 +1287,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* H5F_close_degree_t */
{
- H5F_close_degree_t degree = (H5F_close_degree_t)HDva_arg(ap, int);
+ H5F_close_degree_t degree = (H5F_close_degree_t)va_arg(ap, int);
H5_trace_args_close_degree(rs, degree);
} /* end block */
@@ -1296,7 +1295,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5F_fspace_strategy_t */
{
- H5F_fspace_strategy_t fs_strategy = (H5F_fspace_strategy_t)HDva_arg(ap, int);
+ H5F_fspace_strategy_t fs_strategy = (H5F_fspace_strategy_t)va_arg(ap, int);
switch (fs_strategy) {
case H5F_FSPACE_STRATEGY_FSM_AGGR:
@@ -1325,7 +1324,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'F': /* H5F_flush_cb_t */
{
- H5F_flush_cb_t fflsh = (H5F_flush_cb_t)HDva_arg(ap, H5F_flush_cb_t);
+ H5F_flush_cb_t fflsh = (H5F_flush_cb_t)va_arg(ap, H5F_flush_cb_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)fflsh);
} /* end block */
@@ -1333,7 +1332,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5F_info2_t */
{
- H5F_info2_t fi2 = HDva_arg(ap, H5F_info2_t);
+ H5F_info2_t fi2 = va_arg(ap, H5F_info2_t);
H5RS_asprintf_cat(rs, "{{%u, %" PRIuHSIZE ", %" PRIuHSIZE "}, ",
fi2.super.version, fi2.super.super_size,
@@ -1348,7 +1347,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'm': /* H5F_mem_t */
{
- H5F_mem_t mem_type = (H5F_mem_t)HDva_arg(ap, int);
+ H5F_mem_t mem_type = (H5F_mem_t)va_arg(ap, int);
switch (mem_type) {
case H5FD_MEM_NOLIST:
@@ -1393,7 +1392,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5F_scope_t */
{
- H5F_scope_t scope = (H5F_scope_t)HDva_arg(ap, int);
+ H5F_scope_t scope = (H5F_scope_t)va_arg(ap, int);
switch (scope) {
case H5F_SCOPE_LOCAL:
@@ -1413,7 +1412,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5F_file_space_type_t */
{
- H5F_file_space_type_t fspace_type = (H5F_file_space_type_t)HDva_arg(ap, int);
+ H5F_file_space_type_t fspace_type = (H5F_file_space_type_t)va_arg(ap, int);
switch (fspace_type) {
case H5F_FILE_SPACE_DEFAULT:
@@ -1446,7 +1445,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'v': /* H5F_libver_t */
{
- H5F_libver_t libver_vers = (H5F_libver_t)HDva_arg(ap, int);
+ H5F_libver_t libver_vers = (H5F_libver_t)va_arg(ap, int);
switch (libver_vers) {
case H5F_LIBVER_EARLIEST:
@@ -1490,7 +1489,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'i': /* H5G_iterate_t */
{
- H5G_iterate_t git = (H5G_iterate_t)HDva_arg(ap, H5G_iterate_t);
+ H5G_iterate_t git = (H5G_iterate_t)va_arg(ap, H5G_iterate_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)git);
} /* end block */
@@ -1498,7 +1497,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5G_obj_t */
{
- H5G_obj_t obj_type = (H5G_obj_t)HDva_arg(ap, int);
+ H5G_obj_t obj_type = (H5G_obj_t)va_arg(ap, int);
switch (obj_type) {
case H5G_UNKNOWN:
@@ -1540,7 +1539,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5G_stat_t */
{
- H5G_stat_t *statbuf = HDva_arg(ap, H5G_stat_t *);
+ H5G_stat_t *statbuf = va_arg(ap, H5G_stat_t *);
H5RS_asprintf_cat(rs, "%p", (void *)statbuf);
} /* end block */
@@ -1555,7 +1554,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'h': /* hsize_t */
{
- hsize_t hsize = HDva_arg(ap, hsize_t);
+ hsize_t hsize = va_arg(ap, hsize_t);
if (H5S_UNLIMITED == hsize)
H5RS_acat(rs, "H5S_UNLIMITED");
@@ -1570,7 +1569,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'c': /* H5_atclose_func_t */
{
- H5_atclose_func_t cfunc = (H5_atclose_func_t)HDva_arg(ap, H5_atclose_func_t);
+ H5_atclose_func_t cfunc = (H5_atclose_func_t)va_arg(ap, H5_atclose_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)cfunc);
} /* end block */
@@ -1578,7 +1577,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* hssize_t */
{
- hssize_t hssize = HDva_arg(ap, hssize_t);
+ hssize_t hssize = va_arg(ap, hssize_t);
H5RS_asprintf_cat(rs, "%" PRIdHSIZE, hssize);
asize[argno] = (hssize_t)hssize;
@@ -1593,7 +1592,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* hid_t (and H5E_major_t / H5E_minor_t) */
{
- hid_t obj = HDva_arg(ap, hid_t);
+ hid_t obj = va_arg(ap, hid_t);
if (H5P_DEFAULT == obj)
H5RS_acat(rs, "H5P_DEFAULT");
@@ -1787,7 +1786,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'D': /* H5I_future_discard_func_t */
{
H5I_future_discard_func_t ifdisc =
- (H5I_future_discard_func_t)HDva_arg(ap, H5I_future_discard_func_t);
+ (H5I_future_discard_func_t)va_arg(ap, H5I_future_discard_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ifdisc);
} /* end block */
@@ -1795,7 +1794,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5I_free_t */
{
- H5I_free_t ifree = (H5I_free_t)HDva_arg(ap, H5I_free_t);
+ H5I_free_t ifree = (H5I_free_t)va_arg(ap, H5I_free_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ifree);
} /* end block */
@@ -1803,7 +1802,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* H5_index_t */
{
- H5_index_t idx_type = (H5_index_t)HDva_arg(ap, int);
+ H5_index_t idx_type = (H5_index_t)va_arg(ap, int);
switch (idx_type) {
case H5_INDEX_UNKNOWN:
@@ -1831,7 +1830,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5I_iterate_func_t */
{
- H5I_iterate_func_t iiter = (H5I_iterate_func_t)HDva_arg(ap, H5I_iterate_func_t);
+ H5I_iterate_func_t iiter = (H5I_iterate_func_t)va_arg(ap, H5I_iterate_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)iiter);
} /* end block */
@@ -1839,7 +1838,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5_iter_order_t */
{
- H5_iter_order_t order = (H5_iter_order_t)HDva_arg(ap, int);
+ H5_iter_order_t order = (H5_iter_order_t)va_arg(ap, int);
switch (order) {
case H5_ITER_UNKNOWN:
@@ -1872,7 +1871,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'R': /* H5I_future_realize_func_t */
{
H5I_future_realize_func_t ifreal =
- (H5I_future_realize_func_t)HDva_arg(ap, H5I_future_realize_func_t);
+ (H5I_future_realize_func_t)va_arg(ap, H5I_future_realize_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ifreal);
} /* end block */
@@ -1880,7 +1879,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* int / int32_t */
{
- int is = HDva_arg(ap, int);
+ int is = va_arg(ap, int);
H5RS_asprintf_cat(rs, "%d", is);
asize[argno] = is;
@@ -1889,7 +1888,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'S': /* H5I_search_func_t */
{
- H5I_search_func_t isearch = (H5I_search_func_t)HDva_arg(ap, H5I_search_func_t);
+ H5I_search_func_t isearch = (H5I_search_func_t)va_arg(ap, H5I_search_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)isearch);
} /* end block */
@@ -1897,7 +1896,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5I_type_t */
{
- H5I_type_t id_type = (H5I_type_t)HDva_arg(ap, int);
+ H5I_type_t id_type = (H5I_type_t)va_arg(ap, int);
switch (id_type) {
case H5I_UNINIT:
@@ -1985,7 +1984,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'u': /* unsigned / uint32_t */
{
- unsigned iu = HDva_arg(ap, unsigned);
+ unsigned iu = va_arg(ap, unsigned);
H5RS_asprintf_cat(rs, "%u", iu);
asize[argno] = iu;
@@ -2000,7 +1999,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'k': /* H5O_token_t */
{
- H5O_token_t token = HDva_arg(ap, H5O_token_t);
+ H5O_token_t token = va_arg(ap, H5O_token_t);
int j;
for (j = 0; j < H5O_MAX_TOKEN_SIZE; j++)
@@ -2013,7 +2012,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'i': /* H5L_iterate1_t */
{
- H5L_iterate1_t liter = (H5L_iterate1_t)HDva_arg(ap, H5L_iterate1_t);
+ H5L_iterate1_t liter = (H5L_iterate1_t)va_arg(ap, H5L_iterate1_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)liter);
} /* end block */
@@ -2022,7 +2021,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5L_iterate2_t */
{
- H5L_iterate2_t liter = (H5L_iterate2_t)HDva_arg(ap, H5L_iterate2_t);
+ H5L_iterate2_t liter = (H5L_iterate2_t)va_arg(ap, H5L_iterate2_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)liter);
} /* end block */
@@ -2030,7 +2029,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'l': /* H5L_type_t (or H5G_link_t) */
{
- H5L_type_t link_type = (H5L_type_t)HDva_arg(ap, int);
+ H5L_type_t link_type = (H5L_type_t)va_arg(ap, int);
switch (link_type) {
case H5L_TYPE_ERROR:
@@ -2062,8 +2061,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5L_elink_traverse_t */
{
- H5L_elink_traverse_t elt =
- (H5L_elink_traverse_t)HDva_arg(ap, H5L_elink_traverse_t);
+ H5L_elink_traverse_t elt = (H5L_elink_traverse_t)va_arg(ap, H5L_elink_traverse_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)elt);
} /* end block */
@@ -2079,7 +2077,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'a': /* H5MM_allocate_t */
{
- H5MM_allocate_t afunc = (H5MM_allocate_t)HDva_arg(ap, H5MM_allocate_t);
+ H5MM_allocate_t afunc = (H5MM_allocate_t)va_arg(ap, H5MM_allocate_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)afunc);
} /* end block */
@@ -2088,7 +2086,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifdef H5_HAVE_PARALLEL
case 'c': /* MPI_Comm */
{
- MPI_Comm comm = HDva_arg(ap, MPI_Comm);
+ MPI_Comm comm = va_arg(ap, MPI_Comm);
H5RS_asprintf_cat(rs, "%ld", (long)comm);
} /* end block */
@@ -2097,7 +2095,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5MM_free_t */
{
- H5MM_free_t ffunc = (H5MM_free_t)HDva_arg(ap, H5MM_free_t);
+ H5MM_free_t ffunc = (H5MM_free_t)va_arg(ap, H5MM_free_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ffunc);
} /* end block */
@@ -2106,7 +2104,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifdef H5_HAVE_PARALLEL
case 'i': /* MPI_Info */
{
- MPI_Info info = HDva_arg(ap, MPI_Info);
+ MPI_Info info = va_arg(ap, MPI_Info);
H5RS_asprintf_cat(rs, "%ld", (long)info);
} /* end block */
@@ -2116,7 +2114,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifdef H5_HAVE_MAP_API
case 'I': /* H5M_iterate_t */
{
- H5M_iterate_t miter = (H5M_iterate_t)HDva_arg(ap, H5M_iterate_t);
+ H5M_iterate_t miter = (H5M_iterate_t)va_arg(ap, H5M_iterate_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)miter);
} /* end block */
@@ -2125,7 +2123,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5FD_mem_t */
{
- H5FD_mem_t mt = (H5FD_mem_t)HDva_arg(ap, int);
+ H5FD_mem_t mt = (H5FD_mem_t)va_arg(ap, int);
switch (mt) {
case H5FD_MEM_NOLIST:
@@ -2178,7 +2176,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* off_t */
{
- off_t offset = HDva_arg(ap, off_t);
+ off_t offset = va_arg(ap, off_t);
H5RS_asprintf_cat(rs, "%ld", (long)offset);
} /* end block */
@@ -2189,7 +2187,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'i': /* H5O_iterate1_t */
{
- H5O_iterate1_t oiter = (H5O_iterate1_t)HDva_arg(ap, H5O_iterate1_t);
+ H5O_iterate1_t oiter = (H5O_iterate1_t)va_arg(ap, H5O_iterate1_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)oiter);
} /* end block */
@@ -2198,7 +2196,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5O_iterate2_t */
{
- H5O_iterate2_t oiter2 = (H5O_iterate2_t)HDva_arg(ap, H5O_iterate2_t);
+ H5O_iterate2_t oiter2 = (H5O_iterate2_t)va_arg(ap, H5O_iterate2_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)oiter2);
} /* end block */
@@ -2207,7 +2205,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5O_mcdt_search_cb_t */
{
H5O_mcdt_search_cb_t osrch =
- (H5O_mcdt_search_cb_t)HDva_arg(ap, H5O_mcdt_search_cb_t);
+ (H5O_mcdt_search_cb_t)va_arg(ap, H5O_mcdt_search_cb_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)osrch);
} /* end block */
@@ -2215,7 +2213,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5O_type_t */
{
- H5O_type_t objtype = (H5O_type_t)HDva_arg(ap, int);
+ H5O_type_t objtype = (H5O_type_t)va_arg(ap, int);
switch (objtype) {
case H5O_TYPE_UNKNOWN:
@@ -2257,7 +2255,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'p': /* H5P_class_t */
{
- hid_t pclass_id = HDva_arg(ap, hid_t);
+ hid_t pclass_id = va_arg(ap, hid_t);
char *class_name = NULL;
H5P_genclass_t *pclass;
@@ -2278,7 +2276,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'c': /* H5P_cls_create_func_t */
{
H5P_cls_create_func_t pcls_crt =
- (H5P_cls_create_func_t)HDva_arg(ap, H5P_cls_create_func_t);
+ (H5P_cls_create_func_t)va_arg(ap, H5P_cls_create_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)pcls_crt);
} /* end block */
@@ -2287,7 +2285,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5P_prp_create_func_t */
{
H5P_prp_create_func_t prp_crt =
- (H5P_prp_create_func_t)HDva_arg(ap, H5P_prp_create_func_t);
+ (H5P_prp_create_func_t)va_arg(ap, H5P_prp_create_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_crt);
} /* end block */
@@ -2296,7 +2294,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'D': /* H5P_prp_delete_func_t */
{
H5P_prp_delete_func_t prp_del =
- (H5P_prp_delete_func_t)HDva_arg(ap, H5P_prp_delete_func_t);
+ (H5P_prp_delete_func_t)va_arg(ap, H5P_prp_delete_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_del);
} /* end block */
@@ -2304,7 +2302,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'G': /* H5P_prp_get_func_t */
{
- H5P_prp_get_func_t prp_get = (H5P_prp_get_func_t)HDva_arg(ap, H5P_prp_get_func_t);
+ H5P_prp_get_func_t prp_get = (H5P_prp_get_func_t)va_arg(ap, H5P_prp_get_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_get);
} /* end block */
@@ -2312,7 +2310,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* H5P_iterate_t */
{
- H5P_iterate_t piter = (H5P_iterate_t)HDva_arg(ap, H5P_iterate_t);
+ H5P_iterate_t piter = (H5P_iterate_t)va_arg(ap, H5P_iterate_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)piter);
} /* end block */
@@ -2321,7 +2319,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'l': /* H5P_cls_close_func_t */
{
H5P_cls_close_func_t pcls_cls =
- (H5P_cls_close_func_t)HDva_arg(ap, H5P_cls_close_func_t);
+ (H5P_cls_close_func_t)va_arg(ap, H5P_cls_close_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)pcls_cls);
} /* end block */
@@ -2330,7 +2328,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'L': /* H5P_prp_close_func_t */
{
H5P_prp_close_func_t prp_cls =
- (H5P_prp_close_func_t)HDva_arg(ap, H5P_prp_close_func_t);
+ (H5P_prp_close_func_t)va_arg(ap, H5P_prp_close_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_cls);
} /* end block */
@@ -2339,7 +2337,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'M': /* H5P_prp_compare_func_t */
{
H5P_prp_compare_func_t prp_cmp =
- (H5P_prp_compare_func_t)HDva_arg(ap, H5P_prp_compare_func_t);
+ (H5P_prp_compare_func_t)va_arg(ap, H5P_prp_compare_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_cmp);
} /* end block */
@@ -2348,7 +2346,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5P_cls_copy_func_t */
{
H5P_cls_copy_func_t pcls_cpy =
- (H5P_cls_copy_func_t)HDva_arg(ap, H5P_cls_copy_func_t);
+ (H5P_cls_copy_func_t)va_arg(ap, H5P_cls_copy_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)pcls_cpy);
} /* end block */
@@ -2357,7 +2355,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'O': /* H5P_prp_copy_func_t */
{
H5P_prp_copy_func_t prp_cpy =
- (H5P_prp_copy_func_t)HDva_arg(ap, H5P_prp_copy_func_t);
+ (H5P_prp_copy_func_t)va_arg(ap, H5P_prp_copy_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_cpy);
} /* end block */
@@ -2365,7 +2363,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'S': /* H5P_prp_set_func_t */
{
- H5P_prp_set_func_t prp_set = (H5P_prp_set_func_t)HDva_arg(ap, H5P_prp_set_func_t);
+ H5P_prp_set_func_t prp_set = (H5P_prp_set_func_t)va_arg(ap, H5P_prp_set_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_set);
} /* end block */
@@ -2389,7 +2387,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* hobj_ref_t */
{
- hobj_ref_t ref = HDva_arg(ap, hobj_ref_t);
+ hobj_ref_t ref = va_arg(ap, hobj_ref_t);
H5RS_asprintf_cat(rs, "Reference Object=%" PRIuHADDR, ref);
} /* end block */
@@ -2405,7 +2403,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5R_type_t */
{
- H5R_type_t reftype = (H5R_type_t)HDva_arg(ap, int);
+ H5R_type_t reftype = (H5R_type_t)va_arg(ap, int);
switch (reftype) {
case H5R_BADTYPE:
@@ -2453,7 +2451,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'c': /* H5S_class_t */
{
- H5S_class_t cls = (H5S_class_t)HDva_arg(ap, int);
+ H5S_class_t cls = (H5S_class_t)va_arg(ap, int);
switch (cls) {
case H5S_NO_CLASS:
@@ -2481,7 +2479,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5S_seloper_t */
{
- H5S_seloper_t so = (H5S_seloper_t)HDva_arg(ap, int);
+ H5S_seloper_t so = (H5S_seloper_t)va_arg(ap, int);
switch (so) {
case H5S_SELECT_NOOP:
@@ -2533,7 +2531,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5S_sel_type */
{
- H5S_sel_type st = (H5S_sel_type)HDva_arg(ap, int);
+ H5S_sel_type st = (H5S_sel_type)va_arg(ap, int);
switch (st) {
case H5S_SEL_ERROR:
@@ -2575,7 +2573,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* htri_t */
{
- htri_t tri_var = HDva_arg(ap, htri_t);
+ htri_t tri_var = va_arg(ap, htri_t);
if (tri_var > 0)
H5RS_acat(rs, "TRUE");
@@ -2590,7 +2588,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'c': /* H5T_cset_t */
{
- H5T_cset_t cset = (H5T_cset_t)HDva_arg(ap, int);
+ H5T_cset_t cset = (H5T_cset_t)va_arg(ap, int);
H5_trace_args_cset(rs, cset);
} /* end block */
@@ -2598,7 +2596,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5T_conv_t */
{
- H5T_conv_t tconv = (H5T_conv_t)HDva_arg(ap, H5T_conv_t);
+ H5T_conv_t tconv = (H5T_conv_t)va_arg(ap, H5T_conv_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)tconv);
} /* end block */
@@ -2606,7 +2604,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* H5T_direction_t */
{
- H5T_direction_t direct = (H5T_direction_t)HDva_arg(ap, int);
+ H5T_direction_t direct = (H5T_direction_t)va_arg(ap, int);
switch (direct) {
case H5T_DIR_DEFAULT:
@@ -2630,7 +2628,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* H5T_pers_t */
{
- H5T_pers_t pers = (H5T_pers_t)HDva_arg(ap, int);
+ H5T_pers_t pers = (H5T_pers_t)va_arg(ap, int);
switch (pers) {
case H5T_PERS_DONTCARE:
@@ -2655,7 +2653,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'E': /* H5T_conv_except_func_t */
{
H5T_conv_except_func_t conv_ex =
- (H5T_conv_except_func_t)HDva_arg(ap, H5T_conv_except_func_t);
+ (H5T_conv_except_func_t)va_arg(ap, H5T_conv_except_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)conv_ex);
} /* end block */
@@ -2663,7 +2661,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'n': /* H5T_norm_t */
{
- H5T_norm_t norm = (H5T_norm_t)HDva_arg(ap, int);
+ H5T_norm_t norm = (H5T_norm_t)va_arg(ap, int);
switch (norm) {
case H5T_NORM_ERROR:
@@ -2691,7 +2689,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5T_order_t */
{
- H5T_order_t order = (H5T_order_t)HDva_arg(ap, int);
+ H5T_order_t order = (H5T_order_t)va_arg(ap, int);
switch (order) {
case H5T_ORDER_ERROR:
@@ -2727,7 +2725,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'p': /* H5T_pad_t */
{
- H5T_pad_t pad = (H5T_pad_t)HDva_arg(ap, int);
+ H5T_pad_t pad = (H5T_pad_t)va_arg(ap, int);
switch (pad) {
case H5T_PAD_ERROR:
@@ -2759,7 +2757,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5T_sign_t */
{
- H5T_sign_t sign = (H5T_sign_t)HDva_arg(ap, int);
+ H5T_sign_t sign = (H5T_sign_t)va_arg(ap, int);
switch (sign) {
case H5T_SGN_ERROR:
@@ -2787,7 +2785,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5T_class_t */
{
- H5T_class_t type_class = (H5T_class_t)HDva_arg(ap, int);
+ H5T_class_t type_class = (H5T_class_t)va_arg(ap, int);
switch (type_class) {
case H5T_NO_CLASS:
@@ -2851,7 +2849,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'z': /* H5T_str_t */
{
- H5T_str_t str = (H5T_str_t)HDva_arg(ap, int);
+ H5T_str_t str = (H5T_str_t)va_arg(ap, int);
switch (str) {
case H5T_STR_ERROR:
@@ -2903,7 +2901,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'l': /* unsigned long */
{
- unsigned long iul = HDva_arg(ap, unsigned long);
+ unsigned long iul = va_arg(ap, unsigned long);
H5RS_asprintf_cat(rs, "%lu", iul);
asize[argno] = (hssize_t)iul;
@@ -2912,7 +2910,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'L': /* unsigned long long / uint64_t */
{
- unsigned long long iull = HDva_arg(ap, unsigned long long);
+ unsigned long long iull = va_arg(ap, unsigned long long);
H5RS_asprintf_cat(rs, "%llu", iull);
asize[argno] = (hssize_t)iull;
@@ -2929,7 +2927,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'a': /* H5VL_attr_get_t */
{
- H5VL_attr_get_t get = (H5VL_attr_get_t)HDva_arg(ap, int);
+ H5VL_attr_get_t get = (H5VL_attr_get_t)va_arg(ap, int);
switch (get) {
case H5VL_ATTR_GET_SPACE:
@@ -2965,7 +2963,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'A': /* H5VL_blob_optional_t */
{
- H5VL_blob_optional_t optional = (H5VL_blob_optional_t)HDva_arg(ap, int);
+ H5VL_blob_optional_t optional = (H5VL_blob_optional_t)va_arg(ap, int);
H5RS_asprintf_cat(rs, "%ld", (long)optional);
} /* end block */
@@ -2973,7 +2971,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'b': /* H5VL_attr_specific_t */
{
- H5VL_attr_specific_t specific = (H5VL_attr_specific_t)HDva_arg(ap, int);
+ H5VL_attr_specific_t specific = (H5VL_attr_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_ATTR_DELETE:
@@ -3005,7 +3003,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'B': /* H5VL_blob_specific_t */
{
- H5VL_blob_specific_t specific = (H5VL_blob_specific_t)HDva_arg(ap, int);
+ H5VL_blob_specific_t specific = (H5VL_blob_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_BLOB_DELETE:
@@ -3029,7 +3027,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'c': /* H5VL_dataset_get_t */
{
- H5VL_dataset_get_t get = (H5VL_dataset_get_t)HDva_arg(ap, int);
+ H5VL_dataset_get_t get = (H5VL_dataset_get_t)va_arg(ap, int);
switch (get) {
case H5VL_DATASET_GET_SPACE:
@@ -3065,8 +3063,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5VL_class_value_t */
{
- H5VL_class_value_t class_val =
- (H5VL_class_value_t)HDva_arg(ap, H5VL_class_value_t);
+ H5VL_class_value_t class_val = (H5VL_class_value_t)va_arg(ap, H5VL_class_value_t);
if (H5_VOL_NATIVE == class_val)
H5RS_acat(rs, "H5_VOL_NATIVE");
@@ -3077,7 +3074,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* H5VL_dataset_specific_t */
{
- H5VL_dataset_specific_t specific = (H5VL_dataset_specific_t)HDva_arg(ap, int);
+ H5VL_dataset_specific_t specific = (H5VL_dataset_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_DATASET_SET_EXTENT:
@@ -3101,7 +3098,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* H5VL_datatype_get_t */
{
- H5VL_datatype_get_t get = (H5VL_datatype_get_t)HDva_arg(ap, int);
+ H5VL_datatype_get_t get = (H5VL_datatype_get_t)va_arg(ap, int);
switch (get) {
case H5VL_DATATYPE_GET_BINARY_SIZE:
@@ -3125,7 +3122,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5VL_datatype_specific_t */
{
- H5VL_datatype_specific_t specific = (H5VL_datatype_specific_t)HDva_arg(ap, int);
+ H5VL_datatype_specific_t specific = (H5VL_datatype_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_DATATYPE_FLUSH:
@@ -3145,7 +3142,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'g': /* H5VL_file_get_t */
{
- H5VL_file_get_t get = (H5VL_file_get_t)HDva_arg(ap, int);
+ H5VL_file_get_t get = (H5VL_file_get_t)va_arg(ap, int);
switch (get) {
case H5VL_FILE_GET_CONT_INFO:
@@ -3189,7 +3186,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'h': /* H5VL_file_specific_t */
{
- H5VL_file_specific_t specific = (H5VL_file_specific_t)HDva_arg(ap, int);
+ H5VL_file_specific_t specific = (H5VL_file_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_FILE_FLUSH:
@@ -3221,7 +3218,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* H5VL_group_get_t */
{
- H5VL_group_get_t get = (H5VL_group_get_t)HDva_arg(ap, int);
+ H5VL_group_get_t get = (H5VL_group_get_t)va_arg(ap, int);
switch (get) {
case H5VL_GROUP_GET_GCPL:
@@ -3241,7 +3238,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'j': /* H5VL_group_specific_t */
{
- H5VL_group_specific_t specific = (H5VL_group_specific_t)HDva_arg(ap, int);
+ H5VL_group_specific_t specific = (H5VL_group_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_GROUP_MOUNT:
@@ -3269,7 +3266,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'k': /* H5VL_link_create_t */
{
- H5VL_link_create_t create = (H5VL_link_create_t)HDva_arg(ap, int);
+ H5VL_link_create_t create = (H5VL_link_create_t)va_arg(ap, int);
switch (create) {
case H5VL_LINK_CREATE_HARD:
@@ -3293,7 +3290,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'l': /* H5VL_link_get_t */
{
- H5VL_link_get_t get = (H5VL_link_get_t)HDva_arg(ap, int);
+ H5VL_link_get_t get = (H5VL_link_get_t)va_arg(ap, int);
switch (get) {
case H5VL_LINK_GET_INFO:
@@ -3317,7 +3314,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'L': /* H5VL_get_conn_lvl_t */
{
- H5VL_get_conn_lvl_t get = (H5VL_get_conn_lvl_t)HDva_arg(ap, int);
+ H5VL_get_conn_lvl_t get = (H5VL_get_conn_lvl_t)va_arg(ap, int);
switch (get) {
case H5VL_GET_CONN_LVL_CURR:
@@ -3337,7 +3334,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'm': /* H5VL_link_specific_t */
{
- H5VL_link_specific_t specific = (H5VL_link_specific_t)HDva_arg(ap, int);
+ H5VL_link_specific_t specific = (H5VL_link_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_LINK_DELETE:
@@ -3361,7 +3358,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'n': /* H5VL_object_get_t */
{
- H5VL_object_get_t get = (H5VL_object_get_t)HDva_arg(ap, int);
+ H5VL_object_get_t get = (H5VL_object_get_t)va_arg(ap, int);
switch (get) {
case H5VL_OBJECT_GET_FILE:
@@ -3390,7 +3387,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'N': /* H5VL_request_notify_t */
{
H5VL_request_notify_t vlrnot =
- (H5VL_request_notify_t)HDva_arg(ap, H5VL_request_notify_t);
+ (H5VL_request_notify_t)va_arg(ap, H5VL_request_notify_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)vlrnot);
} /* end block */
@@ -3398,7 +3395,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5VL_object_specific_t */
{
- H5VL_object_specific_t specific = (H5VL_object_specific_t)HDva_arg(ap, int);
+ H5VL_object_specific_t specific = (H5VL_object_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_OBJECT_CHANGE_REF_COUNT:
@@ -3434,7 +3431,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'r': /* H5VL_request_specific_t */
{
- H5VL_request_specific_t specific = (H5VL_request_specific_t)HDva_arg(ap, int);
+ H5VL_request_specific_t specific = (H5VL_request_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_REQUEST_GET_ERR_STACK:
@@ -3454,7 +3451,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5VL_attr_optional_t */
{
- H5VL_attr_optional_t optional = (H5VL_attr_optional_t)HDva_arg(ap, int);
+ H5VL_attr_optional_t optional = (H5VL_attr_optional_t)va_arg(ap, int);
switch (optional) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -3472,7 +3469,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'S': /* H5VL_subclass_t */
{
- H5VL_subclass_t subclass = (H5VL_subclass_t)HDva_arg(ap, int);
+ H5VL_subclass_t subclass = (H5VL_subclass_t)va_arg(ap, int);
switch (subclass) {
case H5VL_SUBCLS_NONE:
@@ -3536,7 +3533,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5VL_dataset_optional_t */
{
- H5VL_dataset_optional_t optional = (H5VL_dataset_optional_t)HDva_arg(ap, int);
+ H5VL_dataset_optional_t optional = (H5VL_dataset_optional_t)va_arg(ap, int);
switch (optional) {
case H5VL_NATIVE_DATASET_FORMAT_CONVERT:
@@ -3588,7 +3585,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'u': /* H5VL_datatype_optional_t */
{
- H5VL_datatype_optional_t optional = (H5VL_datatype_optional_t)HDva_arg(ap, int);
+ H5VL_datatype_optional_t optional = (H5VL_datatype_optional_t)va_arg(ap, int);
H5RS_asprintf_cat(rs, "%ld", (long)optional);
} /* end block */
@@ -3596,7 +3593,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'v': /* H5VL_file_optional_t */
{
- H5VL_file_optional_t optional = (H5VL_file_optional_t)HDva_arg(ap, int);
+ H5VL_file_optional_t optional = (H5VL_file_optional_t)va_arg(ap, int);
switch (optional) {
case H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE:
@@ -3726,7 +3723,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'w': /* H5VL_group_optional_t */
{
- H5VL_group_optional_t optional = (H5VL_group_optional_t)HDva_arg(ap, int);
+ H5VL_group_optional_t optional = (H5VL_group_optional_t)va_arg(ap, int);
switch (optional) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -3748,7 +3745,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'x': /* H5VL_link_optional_t */
{
- H5VL_link_optional_t optional = (H5VL_link_optional_t)HDva_arg(ap, int);
+ H5VL_link_optional_t optional = (H5VL_link_optional_t)va_arg(ap, int);
H5RS_asprintf_cat(rs, "%ld", (long)optional);
} /* end block */
@@ -3756,7 +3753,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'y': /* H5VL_object_optional_t */
{
- H5VL_object_optional_t optional = (H5VL_object_optional_t)HDva_arg(ap, int);
+ H5VL_object_optional_t optional = (H5VL_object_optional_t)va_arg(ap, int);
switch (optional) {
case H5VL_NATIVE_OBJECT_GET_COMMENT:
@@ -3792,7 +3789,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'z': /* H5VL_request_optional_t */
{
- H5VL_request_optional_t optional = (H5VL_request_optional_t)HDva_arg(ap, int);
+ H5VL_request_optional_t optional = (H5VL_request_optional_t)va_arg(ap, int);
H5RS_asprintf_cat(rs, "%ld", (long)optional);
} /* end block */
@@ -3805,7 +3802,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
break;
case 'x': { /* void / va_list */
- vp = HDva_arg(ap, void *);
+ vp = va_arg(ap, void *);
if (vp)
H5RS_asprintf_cat(rs, "%p", vp);
@@ -3815,7 +3812,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
break;
case 'z': {
- size_t size = HDva_arg(ap, size_t);
+ size_t size = va_arg(ap, size_t);
H5RS_asprintf_cat(rs, "%zu", size);
asize[argno] = (hssize_t)size;
@@ -3826,7 +3823,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'a': /* H5Z_SO_scale_type_t */
{
- H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)HDva_arg(ap, int);
+ H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)va_arg(ap, int);
switch (scale_type) {
case H5Z_SO_FLOAT_DSCALE:
@@ -3850,7 +3847,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'c': /* H5Z_class2_t */
{
- H5Z_class2_t *filter = HDva_arg(ap, H5Z_class2_t *);
+ H5Z_class2_t *filter = va_arg(ap, H5Z_class2_t *);
H5RS_asprintf_cat(rs, "%p", (void *)filter);
} /* end block */
@@ -3858,7 +3855,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* H5Z_EDC_t */
{
- H5Z_EDC_t edc = (H5Z_EDC_t)HDva_arg(ap, int);
+ H5Z_EDC_t edc = (H5Z_EDC_t)va_arg(ap, int);
if (H5Z_DISABLE_EDC == edc)
H5RS_acat(rs, "H5Z_DISABLE_EDC");
@@ -3871,7 +3868,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5Z_filter_t */
{
- H5Z_filter_t id = HDva_arg(ap, H5Z_filter_t);
+ H5Z_filter_t id = va_arg(ap, H5Z_filter_t);
if (H5Z_FILTER_NONE == id)
H5RS_acat(rs, "H5Z_FILTER_NONE");
@@ -3894,14 +3891,14 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'F': /* H5Z_filter_func_t */
{
- H5Z_filter_func_t ffunc = (H5Z_filter_func_t)HDva_arg(ap, H5Z_filter_func_t);
+ H5Z_filter_func_t ffunc = (H5Z_filter_func_t)va_arg(ap, H5Z_filter_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ffunc);
} /* end block */
break;
case 's': {
- ssize_t ssize = HDva_arg(ap, ssize_t);
+ ssize_t ssize = va_arg(ap, ssize_t);
H5RS_asprintf_cat(rs, "%zd", ssize);
asize[argno] = (hssize_t)ssize;
@@ -4034,7 +4031,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
* since the one for the function call, then we're continuing
* the same line. */
if (returning) {
- HDassert(current_depth > 0);
+ assert(current_depth > 0);
--current_depth;
if (current_depth < last_call_depth) {
/* We are at the beginning of a line */
@@ -4068,9 +4065,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
}
/* Format arguments into the refcounted string */
- HDva_start(ap, type);
+ va_start(ap, type);
H5_trace_args(rs, type, ap);
- HDva_end(ap);
+ va_end(ap);
/* Display event time for return */
if (returning && H5_debug_g.ttimes) {
@@ -4088,7 +4085,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
H5RS_acat(rs, ")");
}
HDfputs(H5RS_get_str(rs), out);
- HDfflush(out);
+ fflush(out);
H5RS_decr(rs);
if (H5_debug_g.ttimes)
diff --git a/test/API/H5_api_async_test.c b/test/API/H5_api_async_test.c
index 3d676c0..4afea50 100644
--- a/test/API/H5_api_async_test.c
+++ b/test/API/H5_api_async_test.c
@@ -73,8 +73,7 @@ test_one_dataset_io(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, dataset, or flush aren't supported with this connector\n");
+ printf(" API functions for basic file, dataset, or flush aren't supported with this connector\n");
return 0;
}
@@ -135,7 +134,7 @@ test_one_dataset_io(void)
for (j = 0; j < 10; j++)
if (wbuf[i][j] != rbuf[i][j]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(single_dset_eswait);
} /* end if */
@@ -177,7 +176,7 @@ test_one_dataset_io(void)
for (j = 0; j < 10; j++)
if (wbuf[i][j] != rbuf[i][j]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(single_dset_dclose);
} /* end if */
@@ -222,7 +221,7 @@ test_one_dataset_io(void)
for (j = 0; j < 10; j++)
if (wbuf[i][j] != rbuf[i][j]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(single_dset_dflush);
} /* end if */
@@ -276,7 +275,7 @@ test_one_dataset_io(void)
for (j = 0; j < 10; j++)
if (wbuf[i][j] != rbuf[i][j]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(single_dset_fclose);
} /* end if */
@@ -341,8 +340,7 @@ test_multi_dataset_io(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, dataset, or flush aren't supported with this connector\n");
+ printf(" API functions for basic file, dataset, or flush aren't supported with this connector\n");
return 0;
}
@@ -432,7 +430,7 @@ test_multi_dataset_io(void)
for (k = 0; k < 10; k++)
if (wbuf[i][j][k] != rbuf[i][j][k]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_dset_open);
} /* end if */
@@ -526,7 +524,7 @@ test_multi_dataset_io(void)
for (k = 0; k < 10; k++)
if (wbuf[i][j][k] != rbuf[i][j][k]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_dset_close);
} /* end if */
@@ -596,8 +594,7 @@ test_multi_file_dataset_io(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, dataset, or flush aren't supported with this connector\n");
+ printf(" API functions for basic file, dataset, or flush aren't supported with this connector\n");
return 0;
}
@@ -673,7 +670,7 @@ test_multi_file_dataset_io(void)
for (k = 0; k < 10; k++)
if (wbuf[i][j][k] != rbuf[i][j][k]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_dset_open);
} /* end if */
@@ -744,7 +741,7 @@ test_multi_file_dataset_io(void)
for (k = 0; k < 10; k++)
if (wbuf[i][j][k] != rbuf[i][j][k]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_dset_dclose);
} /* end if */
@@ -838,7 +835,7 @@ test_multi_file_dataset_io(void)
for (k = 0; k < 10; k++)
if (wbuf[i][j][k] != rbuf[i][j][k]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_dset_fclose);
} /* end if */
@@ -907,8 +904,7 @@ test_multi_file_grp_dset_io(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -1028,7 +1024,7 @@ test_multi_file_grp_dset_io(void)
for (k = 0; k < 10; k++)
if (wbuf[i][j][k] != rbuf[i][j][k]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_grp_dset_no_kick);
} /* end if */
@@ -1149,7 +1145,7 @@ test_multi_file_grp_dset_io(void)
for (k = 0; k < 10; k++)
if (wbuf[i][j][k] != rbuf[i][j][k]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_grp_dset_kick);
} /* end if */
@@ -1224,8 +1220,8 @@ test_set_extent(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, dataset, dataset more, or flush aren't supported with "
- "this connector\n");
+ printf(" API functions for basic file, dataset, dataset more, or flush aren't supported with "
+ "this connector\n");
return 0;
}
@@ -1428,8 +1424,8 @@ test_attribute_exists(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
+ "supported with this connector\n");
return 0;
}
@@ -1549,8 +1545,8 @@ test_attribute_io(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
+ "supported with this connector\n");
return 0;
}
@@ -1691,7 +1687,7 @@ test_attribute_io_tconv(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, attribute, or flush aren't supported with this connector\n");
return 0;
}
@@ -1837,7 +1833,7 @@ test_attribute_io_compound(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, attribute, or flush aren't supported with this connector\n");
return 0;
}
@@ -2143,8 +2139,8 @@ test_group(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or group more aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, or group more aren't supported "
+ "with this connector\n");
return 0;
}
@@ -2314,8 +2310,8 @@ test_link(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" API functions for basic file, link, hard link, soft link, flush, or creation order "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, link, hard link, soft link, flush, or creation order "
+ "aren't supported with this connector\n");
return 0;
}
@@ -2505,8 +2501,8 @@ test_ocopy_orefresh(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, object more, flush, or refresh aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, object more, flush, or refresh aren't "
+ "supported with this connector\n");
return 0;
}
@@ -2615,7 +2611,7 @@ test_file_reopen(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file or file more aren't supported with this connector\n");
+ printf(" API functions for basic file or file more aren't supported with this connector\n");
return 0;
}
@@ -2691,16 +2687,16 @@ H5_api_async_test(void)
size_t i;
int nerrors;
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Async Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Async Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ASYNC)) {
SKIPPED();
- HDprintf(" Async APIs aren't supported with this connector\n");
+ printf(" Async APIs aren't supported with this connector\n");
return 0;
}
@@ -2708,9 +2704,9 @@ H5_api_async_test(void)
nerrors += (*async_tests[i])() ? 1 : 0;
}
- HDprintf("\n");
+ printf("\n");
- HDprintf("Cleaning up testing files\n");
+ printf("Cleaning up testing files\n");
cleanup_files();
return nerrors;
@@ -2721,13 +2717,13 @@ H5_api_async_test(void)
int
H5_api_async_test(void)
{
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Async Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Async Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
- HDprintf("SKIPPED due to no async support in HDF5 library\n");
+ printf("SKIPPED due to no async support in HDF5 library\n");
return 0;
}
diff --git a/test/API/H5_api_attribute_test.c b/test/API/H5_api_attribute_test.c
index f1409a4..144b0a4 100644
--- a/test/API/H5_api_attribute_test.c
+++ b/test/API/H5_api_attribute_test.c
@@ -126,7 +126,7 @@ test_create_attribute_on_root(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or attribute aren't supported with this connector\n");
+ printf(" API functions for basic file or attribute aren't supported with this connector\n");
return 0;
}
@@ -134,7 +134,7 @@ test_create_attribute_on_root(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -157,22 +157,22 @@ test_create_attribute_on_root(void)
if ((attr_id = H5Acreate2(file_id, ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME, attr_dtype1, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' using H5Acreate\n",
- ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME);
+ printf(" couldn't create attribute '%s' using H5Acreate\n",
+ ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME);
PART_ERROR(H5Acreate2);
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(file_id, ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME);
PART_ERROR(H5Acreate2);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME);
PART_ERROR(H5Acreate2);
}
@@ -187,21 +187,21 @@ test_create_attribute_on_root(void)
if ((attr_id2 = H5Acreate_by_name(file_id, "/", ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME2, attr_dtype2,
space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute on root group using H5Acreate_by_name\n");
+ printf(" couldn't create attribute on root group using H5Acreate_by_name\n");
PART_ERROR(H5Acreate_by_name);
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(file_id, ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME2);
PART_ERROR(H5Acreate_by_name);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME2);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME2);
PART_ERROR(H5Acreate_by_name);
}
@@ -269,8 +269,8 @@ test_create_attribute_on_dataset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or attribute aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, dataset, or attribute aren't supported with this "
+ "connector\n");
return 0;
}
@@ -278,20 +278,20 @@ test_create_attribute_on_dataset(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_CREATE_ON_DATASET_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_CREATE_ON_DATASET_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_CREATE_ON_DATASET_GROUP_NAME);
goto error;
}
@@ -312,7 +312,7 @@ test_create_attribute_on_dataset(void)
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_CREATE_ON_DATASET_DSET_NAME, dset_dtype, dset_space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset\n");
+ printf(" couldn't create dataset\n");
goto error;
}
@@ -327,21 +327,21 @@ test_create_attribute_on_dataset(void)
if ((attr_id = H5Acreate2(dset_id, ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME, attr_dtype1,
attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
PART_ERROR(H5Acreate_on_dataset);
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(dset_id, ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME);
PART_ERROR(H5Acreate_on_dataset);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME);
PART_ERROR(H5Acreate_on_dataset);
}
@@ -357,21 +357,21 @@ test_create_attribute_on_dataset(void)
ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME2, attr_dtype2,
attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute on dataset by name\n");
+ printf(" couldn't create attribute on dataset by name\n");
PART_ERROR(H5Acreate_by_name_on_dataset);
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(dset_id, ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME2);
PART_ERROR(H5Acreate_by_name_on_dataset);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME2);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME2);
PART_ERROR(H5Acreate_by_name_on_dataset);
}
@@ -453,8 +453,8 @@ test_create_attribute_on_datatype(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, stored datatype, or attribute aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, stored datatype, or attribute aren't supported "
+ "with this connector\n");
return 0;
}
@@ -462,33 +462,33 @@ test_create_attribute_on_datatype(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_CREATE_ON_DATATYPE_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_CREATE_ON_DATATYPE_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_CREATE_ON_DATATYPE_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if (H5Tcommit2(group_id, ATTRIBUTE_CREATE_ON_DATATYPE_DTYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype\n");
+ printf(" couldn't commit datatype\n");
goto error;
}
@@ -511,19 +511,19 @@ test_create_attribute_on_datatype(void)
if ((attr_id = H5Acreate2(type_id, ATTRIBUTE_CREATE_ON_DATATYPE_ATTR_NAME, attr_dtype1, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute on datatype using H5Acreate\n");
+ printf(" couldn't create attribute on datatype using H5Acreate\n");
PART_ERROR(H5Acreate_on_datatype);
}
if ((attr_exists = H5Aexists(type_id, ATTRIBUTE_CREATE_ON_DATATYPE_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
PART_ERROR(H5Acreate_on_datatype);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
PART_ERROR(H5Acreate_on_datatype);
}
@@ -539,20 +539,20 @@ test_create_attribute_on_datatype(void)
ATTRIBUTE_CREATE_ON_DATATYPE_ATTR_NAME2, attr_dtype2, space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute on datatype using H5Acreate_by_name\n");
+ printf(" couldn't create attribute on datatype using H5Acreate_by_name\n");
PART_ERROR(H5Acreate_by_name_on_datatype);
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(type_id, ATTRIBUTE_CREATE_ON_DATATYPE_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
PART_ERROR(H5Acreate_by_name_on_datatype);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
PART_ERROR(H5Acreate_by_name_on_datatype);
}
@@ -625,27 +625,27 @@ test_create_attribute_with_null_space(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_CREATE_NULL_DATASPACE_TEST_SUBGROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup\n");
+ printf(" couldn't create container subgroup\n");
goto error;
}
@@ -658,20 +658,20 @@ test_create_attribute_with_null_space(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_NULL_DATASPACE_TEST_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_CREATE_NULL_DATASPACE_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -680,7 +680,7 @@ test_create_attribute_with_null_space(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_CREATE_NULL_DATASPACE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute\n");
+ printf(" couldn't open attribute\n");
goto error;
}
@@ -736,27 +736,27 @@ test_create_attribute_with_scalar_space(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_CREATE_SCALAR_DATASPACE_TEST_SUBGROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup\n");
+ printf(" couldn't create container subgroup\n");
goto error;
}
@@ -769,20 +769,20 @@ test_create_attribute_with_scalar_space(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_SCALAR_DATASPACE_TEST_ATTR_NAME, attr_dtype,
space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_CREATE_SCALAR_DATASPACE_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -791,7 +791,7 @@ test_create_attribute_with_scalar_space(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_CREATE_SCALAR_DATASPACE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute\n");
+ printf(" couldn't open attribute\n");
goto error;
}
@@ -849,28 +849,27 @@ test_create_attribute_with_space_in_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_GROUP_NAME);
goto error;
}
@@ -884,20 +883,20 @@ test_create_attribute_with_space_in_name(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -953,7 +952,7 @@ test_create_attribute_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -962,20 +961,20 @@ test_create_attribute_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_CREATE_INVALID_PARAMS_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group\n");
+ printf(" couldn't create container group\n");
goto error;
}
@@ -1002,7 +1001,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate with an invalid loc_id!\n");
+ printf(" created attribute using H5Acreate with an invalid loc_id!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_invalid_loc_id);
}
@@ -1023,7 +1022,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate with a NULL name!\n");
+ printf(" created attribute using H5Acreate with a NULL name!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_invalid_attr_name);
}
@@ -1036,7 +1035,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate with an invalid name of ''!\n");
+ printf(" created attribute using H5Acreate with an invalid name of ''!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_invalid_attr_name);
}
@@ -1058,7 +1057,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate with an invalid datatype!\n");
+ printf(" created attribute using H5Acreate with an invalid datatype!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_invalid_datatype);
}
@@ -1080,7 +1079,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate with an invalid dataspace!\n");
+ printf(" created attribute using H5Acreate with an invalid dataspace!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_invalid_dataspace);
}
@@ -1102,7 +1101,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate with an invalid ACPL!\n");
+ printf(" created attribute using H5Acreate with an invalid ACPL!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_invalid_acpl);
}
@@ -1124,7 +1123,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate with an invalid AAPL!\n");
+ printf(" created attribute using H5Acreate with an invalid AAPL!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_invalid_aapl);
}
@@ -1147,7 +1146,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate_by_name with an invalid loc_id!\n");
+ printf(" created attribute using H5Acreate_by_name with an invalid loc_id!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_loc_id);
}
@@ -1169,7 +1168,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate_by_name with a NULL object name!\n");
+ printf(" created attribute using H5Acreate_by_name with a NULL object name!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_obj_name);
}
@@ -1183,8 +1182,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(
- " created attribute using H5Acreate_by_name with an invalid object name of ''!\n");
+ printf(" created attribute using H5Acreate_by_name with an invalid object name of ''!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_obj_name);
}
@@ -1206,7 +1204,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate_by_name with a NULL attribute name!\n");
+ printf(" created attribute using H5Acreate_by_name with a NULL attribute name!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_attr_name);
}
@@ -1220,7 +1218,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" created attribute using H5Acreate_by_name with an invalid attribute name of ''!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_attr_name);
@@ -1244,7 +1242,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate_by_name with an invalid datatype!\n");
+ printf(" created attribute using H5Acreate_by_name with an invalid datatype!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_datatype);
}
@@ -1267,7 +1265,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate_by_name with an invalid dataspace!\n");
+ printf(" created attribute using H5Acreate_by_name with an invalid dataspace!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_dataspace);
}
@@ -1290,7 +1288,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate_by_name with an invalid ACPL!\n");
+ printf(" created attribute using H5Acreate_by_name with an invalid ACPL!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_acpl);
}
@@ -1313,7 +1311,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate_by_name with an invalid AAPL!\n");
+ printf(" created attribute using H5Acreate_by_name with an invalid AAPL!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_aapl);
}
@@ -1336,7 +1334,7 @@ test_create_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" created attribute using H5Acreate_by_name with an invalid LAPL!\n");
+ printf(" created attribute using H5Acreate_by_name with an invalid LAPL!\n");
H5Aclose(attr_id);
PART_ERROR(H5Acreate_by_name_invalid_lapl);
}
@@ -1398,8 +1396,8 @@ test_open_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or attribute aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, or attribute aren't supported "
+ "with this connector\n");
return 0;
}
@@ -1407,26 +1405,26 @@ test_open_attribute(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for attribute creation order tracking\n");
+ printf(" couldn't create GCPL for attribute creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set attribute creation order tracking\n");
+ printf(" couldn't set attribute creation order tracking\n");
goto error;
}
}
@@ -1434,7 +1432,7 @@ test_open_attribute(void)
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_OPEN_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_OPEN_TEST_GROUP_NAME);
goto error;
}
@@ -1448,7 +1446,7 @@ test_open_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_TEST_ATTR_NAME, attr_type, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
goto error;
}
@@ -1458,7 +1456,7 @@ test_open_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_TEST_ATTR_NAME2, attr_type, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
goto error;
}
@@ -1468,7 +1466,7 @@ test_open_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_TEST_ATTR_NAME3, attr_type, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
goto error;
}
@@ -1485,13 +1483,13 @@ test_open_attribute(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_OPEN_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' using H5Aopen\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
+ printf(" couldn't open attribute '%s' using H5Aopen\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
PART_ERROR(H5Aopen);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
PART_ERROR(H5Aopen);
}
@@ -1506,14 +1504,14 @@ test_open_attribute(void)
if ((attr_id = H5Aopen_by_name(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME,
ATTRIBUTE_OPEN_TEST_ATTR_NAME, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' using H5Aopen_by_name\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME);
+ printf(" couldn't open attribute '%s' using H5Aopen_by_name\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME);
PART_ERROR(H5Aopen_by_name);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
PART_ERROR(H5Aopen_by_name);
}
@@ -1527,52 +1525,52 @@ test_open_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking is not supported with this VOL connector\n");
+ printf(" creation order tracking is not supported with this VOL connector\n");
PART_EMPTY(H5Aopen_by_idx_crt_order_increasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, 0, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
- "order in increasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME, 0);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
+ "order in increasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME, 0);
PART_ERROR(H5Aopen_by_idx_crt_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
PART_ERROR(H5Aopen_by_idx_crt_order_increasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, 1, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
- "order in increasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME2, 1);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
+ "order in increasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME2, 1);
PART_ERROR(H5Aopen_by_idx_crt_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
PART_ERROR(H5Aopen_by_idx_crt_order_increasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, 2, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
- "order in increasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME3, 2);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
+ "order in increasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME3, 2);
PART_ERROR(H5Aopen_by_idx_crt_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
PART_ERROR(H5Aopen_by_idx_crt_order_increasing);
}
@@ -1586,52 +1584,52 @@ test_open_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking is not supported with this VOL connector\n");
+ printf(" creation order tracking is not supported with this VOL connector\n");
PART_EMPTY(H5Aopen_by_idx_crt_order_decreasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, 2, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
- "order in decreasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME, 2);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
+ "order in decreasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME, 2);
PART_ERROR(H5Aopen_by_idx_crt_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
PART_ERROR(H5Aopen_by_idx_crt_order_decreasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, 1, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
- "order in decreasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME2, 1);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
+ "order in decreasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME2, 1);
PART_ERROR(H5Aopen_by_idx_crt_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
PART_ERROR(H5Aopen_by_idx_crt_order_decreasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, 0, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
- "order in decreasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME3, 0);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by creation "
+ "order in decreasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME3, 0);
PART_ERROR(H5Aopen_by_idx_crt_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
PART_ERROR(H5Aopen_by_idx_crt_order_decreasing);
}
@@ -1646,45 +1644,45 @@ test_open_attribute(void)
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 0, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by alphabetical "
- "order in increasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME, 0);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by alphabetical "
+ "order in increasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME, 0);
PART_ERROR(H5Aopen_by_idx_name_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
PART_ERROR(H5Aopen_by_idx_name_order_increasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 1, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by alphabetical "
- "order in increasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME2, 1);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by alphabetical "
+ "order in increasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME2, 1);
PART_ERROR(H5Aopen_by_idx_name_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
PART_ERROR(H5Aopen_by_idx_name_order_increasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 2, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by alphabetical "
- "order in increasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME3, 2);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by alphabetical "
+ "order in increasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME3, 2);
PART_ERROR(H5Aopen_by_idx_name_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
PART_ERROR(H5Aopen_by_idx_name_order_increasing);
}
@@ -1699,45 +1697,45 @@ test_open_attribute(void)
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, 2, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by "
- "alphabetical order in decreasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME, 2);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by "
+ "alphabetical order in decreasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME, 2);
PART_ERROR(H5Aopen_by_idx_name_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME);
PART_ERROR(H5Aopen_by_idx_name_order_decreasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, 1, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by "
- "alphabetical order in decreasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME2, 1);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by "
+ "alphabetical order in decreasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME2, 1);
PART_ERROR(H5Aopen_by_idx_name_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2);
PART_ERROR(H5Aopen_by_idx_name_order_decreasing);
}
if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, 0, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by "
- "alphabetical order in decreasing order\n",
- ATTRIBUTE_OPEN_TEST_ATTR_NAME3, 0);
+ printf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by "
+ "alphabetical order in decreasing order\n",
+ ATTRIBUTE_OPEN_TEST_ATTR_NAME3, 0);
PART_ERROR(H5Aopen_by_idx_name_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3);
PART_ERROR(H5Aopen_by_idx_name_order_decreasing);
}
@@ -1801,7 +1799,7 @@ test_open_attribute_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -1810,20 +1808,20 @@ test_open_attribute_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -1837,7 +1835,7 @@ test_open_attribute_invalid_params(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME, attr_type, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
goto error;
}
@@ -1860,8 +1858,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen with an invalid loc_id!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen with an invalid loc_id!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_invalid_loc_id);
}
@@ -1882,8 +1880,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen with a NULL attribute name!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen with a NULL attribute name!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_invalid_attr_name);
}
@@ -1896,8 +1894,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen with an invalid attribute name of ''!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen with an invalid attribute name of ''!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_invalid_attr_name);
}
@@ -1918,8 +1916,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen with an invalid AAPL!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen with an invalid AAPL!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_invalid_aapl);
}
@@ -1942,8 +1940,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_name with an invalid loc_id!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_name with an invalid loc_id!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_name_invalid_loc_id);
}
@@ -1965,8 +1963,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_name with a NULL object name!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_name with a NULL object name!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_name_invalid_obj_name);
}
@@ -1980,9 +1978,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(
- " opened attribute '%s' using H5Aopen_by_name with an invalid object name of ''!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_name with an invalid object name of ''!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_name_invalid_obj_name);
}
@@ -2004,8 +2001,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_name with a NULL attribute name!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_name with a NULL attribute name!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_name_invalid_attr_name);
}
@@ -2019,7 +2016,7 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" opened attribute '%s' using H5Aopen_by_name with an invalid attribute name of ''!\n",
ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
@@ -2044,8 +2041,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_name with an invalid AAPL!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_name with an invalid AAPL!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_name_invalid_aapl);
}
@@ -2068,8 +2065,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_name with an invalid LAPL!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_name with an invalid LAPL!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_name_invalid_lapl);
}
@@ -2091,8 +2088,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_idx with an invalid loc_id!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_idx with an invalid loc_id!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_idx_invalid_loc_id);
}
@@ -2114,8 +2111,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_idx with a NULL object name!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_idx with a NULL object name!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_idx_invalid_obj_name);
}
@@ -2129,9 +2126,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(
- " opened attribute '%s' using H5Aopen_by_idx with an invalid object name of ''!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_idx with an invalid object name of ''!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_idx_invalid_obj_name);
}
@@ -2153,9 +2149,9 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_idx with invalid index type "
- "H5_INDEX_UNKNOWN!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_idx with invalid index type "
+ "H5_INDEX_UNKNOWN!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_idx_invalid_index_type);
}
@@ -2169,9 +2165,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(
- " opened attribute '%s' using H5Aopen_by_idx with invalid index type H5_INDEX_N!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_idx with invalid index type H5_INDEX_N!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_idx_invalid_index_type);
}
@@ -2193,9 +2188,9 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_idx with invalid iteration order "
- "H5_ITER_UNKNOWN!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_idx with invalid iteration order "
+ "H5_ITER_UNKNOWN!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_idx_invalid_iter_order);
}
@@ -2209,9 +2204,9 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_idx with invalid iteration order "
- "H5_ITER_N!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_idx with invalid iteration order "
+ "H5_ITER_N!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_idx_invalid_iter_order);
}
@@ -2233,8 +2228,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_idx with an invalid AAPL!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_idx with an invalid AAPL!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_idx_invalid_aapl);
}
@@ -2256,8 +2251,8 @@ test_open_attribute_invalid_params(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" opened attribute '%s' using H5Aopen_by_idx with an invalid LAPL!\n",
- ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
+ printf(" opened attribute '%s' using H5Aopen_by_idx with an invalid LAPL!\n",
+ ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME);
H5Aclose(attr_id);
PART_ERROR(H5Aopen_by_idx_invalid_lapl);
}
@@ -2323,27 +2318,27 @@ test_write_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, attribute, or file flush aren't supported with "
- "this connector\n");
+ printf(" API functions for basic file, group, attribute, or file flush aren't supported with "
+ "this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_WRITE_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_WRITE_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_WRITE_TEST_GROUP_NAME);
goto error;
}
@@ -2353,20 +2348,20 @@ test_write_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_WRITE_TEST_ATTR_NAME, ATTRIBUTE_WRITE_TEST_ATTR_DTYPE,
space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_WRITE_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -2374,7 +2369,7 @@ test_write_attribute(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_WRITE_TEST_ATTR_DTYPE_SIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / ATTRIBUTE_WRITE_TEST_ATTR_DTYPE_SIZE; i++)
@@ -2382,19 +2377,19 @@ test_write_attribute(void)
if (H5Awrite(attr_id, ATTRIBUTE_WRITE_TEST_ATTR_DTYPE, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to attribute\n");
+ printf(" couldn't write to attribute\n");
goto error;
}
/* Make sure that the attribute can be flushed to the file */
if (H5Fflush(file_id, H5F_SCOPE_GLOBAL) < 0) {
H5_FAILED();
- HDprintf(" couldn't flush the attribute\n");
+ printf(" couldn't flush the attribute\n");
goto error;
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -2417,7 +2412,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -2453,7 +2448,7 @@ test_write_attribute_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -2462,21 +2457,20 @@ test_write_attribute_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -2488,20 +2482,20 @@ test_write_attribute_invalid_params(void)
ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_DTYPE, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -2509,7 +2503,7 @@ test_write_attribute_invalid_params(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE; i++)
@@ -2531,7 +2525,7 @@ test_write_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" wrote to attribute using an invalid attr_id!\n");
+ printf(" wrote to attribute using an invalid attr_id!\n");
PART_ERROR(H5Awrite_invalid_attr_id);
}
@@ -2551,7 +2545,7 @@ test_write_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" wrote to attribute using an invalid datatype!\n");
+ printf(" wrote to attribute using an invalid datatype!\n");
PART_ERROR(H5Awrite_invalid_datatype);
}
@@ -2571,7 +2565,7 @@ test_write_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" wrote to attribute using an invalid data buffer!\n");
+ printf(" wrote to attribute using an invalid data buffer!\n");
PART_ERROR(H5Awrite_invalid_data_buf);
}
@@ -2584,7 +2578,7 @@ test_write_attribute_invalid_params(void)
TESTING_2("test cleanup");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -2607,7 +2601,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -2644,27 +2638,27 @@ test_read_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_READ_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_READ_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_READ_TEST_GROUP_NAME);
goto error;
}
@@ -2674,20 +2668,20 @@ test_read_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_TEST_ATTR_NAME, ATTRIBUTE_READ_TEST_ATTR_DTYPE,
space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_READ_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -2695,9 +2689,9 @@ test_read_attribute(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_READ_TEST_ATTR_DTYPE_SIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
- if (NULL == (read_buf = HDcalloc(1, data_size)))
+ if (NULL == (read_buf = calloc(1, data_size)))
TEST_ERROR;
for (i = 0; i < data_size / ATTRIBUTE_READ_TEST_ATTR_DTYPE_SIZE; i++)
@@ -2705,12 +2699,12 @@ test_read_attribute(void)
if (H5Awrite(attr_id, ATTRIBUTE_READ_TEST_ATTR_DTYPE, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to attribute\n");
+ printf(" couldn't write to attribute\n");
goto error;
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -2719,26 +2713,26 @@ test_read_attribute(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_READ_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute\n");
+ printf(" couldn't open attribute\n");
goto error;
}
if (H5Aread(attr_id, ATTRIBUTE_READ_TEST_ATTR_DTYPE, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from attribute\n");
+ printf(" couldn't read from attribute\n");
goto error;
}
for (i = 0; i < data_size / ATTRIBUTE_READ_TEST_ATTR_DTYPE_SIZE; i++) {
if (((int *)read_buf)[i] != (int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -2761,9 +2755,9 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -2800,7 +2794,7 @@ test_read_attribute_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -2809,20 +2803,20 @@ test_read_attribute_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_READ_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_READ_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_READ_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -2834,20 +2828,20 @@ test_read_attribute_invalid_params(void)
ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_DTYPE, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -2855,9 +2849,9 @@ test_read_attribute_invalid_params(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
- if (NULL == (read_buf = HDcalloc(1, data_size)))
+ if (NULL == (read_buf = calloc(1, data_size)))
TEST_ERROR;
for (i = 0; i < data_size / ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE; i++)
@@ -2865,12 +2859,12 @@ test_read_attribute_invalid_params(void)
if (H5Awrite(attr_id, ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_DTYPE, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to attribute\n");
+ printf(" couldn't write to attribute\n");
goto error;
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -2879,7 +2873,7 @@ test_read_attribute_invalid_params(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute\n");
+ printf(" couldn't open attribute\n");
goto error;
}
@@ -2899,7 +2893,7 @@ test_read_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" read attribute with an invalid attr_id!\n");
+ printf(" read attribute with an invalid attr_id!\n");
PART_ERROR(H5Aread_invalid_attr_id);
}
@@ -2919,7 +2913,7 @@ test_read_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" read attribute with an invalid datatype!\n");
+ printf(" read attribute with an invalid datatype!\n");
PART_ERROR(H5Aread_invalid_datatype);
}
@@ -2939,7 +2933,7 @@ test_read_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" read attribute with an invalid read buffer!\n");
+ printf(" read attribute with an invalid read buffer!\n");
PART_ERROR(H5Aread_invalid_read_buf);
}
@@ -2952,7 +2946,7 @@ test_read_attribute_invalid_params(void)
TESTING_2("test cleanup");
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -2975,9 +2969,9 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -3011,27 +3005,27 @@ test_read_empty_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_READ_EMPTY_ATTR_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_READ_EMPTY_ATTR_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_READ_EMPTY_ATTR_GROUP_NAME);
goto error;
}
@@ -3041,20 +3035,20 @@ test_read_empty_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_EMPTY_ATTR_NAME, ATTRIBUTE_READ_EMPTY_DTYPE, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_READ_EMPTY_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -3063,7 +3057,7 @@ test_read_empty_attribute(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_READ_EMPTY_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute\n");
+ printf(" couldn't open attribute\n");
goto error;
}
@@ -3071,17 +3065,17 @@ test_read_empty_attribute(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_READ_EMPTY_DTYPE_SIZE;
- if (NULL == (read_buf = HDcalloc(1, data_size)))
+ if (NULL == (read_buf = calloc(1, data_size)))
TEST_ERROR;
if (H5Aread(attr_id, ATTRIBUTE_READ_EMPTY_DTYPE, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from attribute\n");
+ printf(" couldn't read from attribute\n");
goto error;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -3104,7 +3098,7 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -3130,13 +3124,13 @@ test_close_attribute_invalid_id(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or attribute aren't supported with this connector\n");
+ printf(" API functions for basic file or attribute aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -3148,7 +3142,7 @@ test_close_attribute_invalid_id(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aclose succeeded with an invalid attribute ID!\n");
+ printf(" H5Aclose succeeded with an invalid attribute ID!\n");
goto error;
}
@@ -3195,8 +3189,8 @@ test_get_attribute_space_and_type(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, attribute, or attribute aren't supported with "
- "this connector\n");
+ printf(" API functions for basic file, group, attribute, or attribute aren't supported with "
+ "this connector\n");
return 0;
}
@@ -3204,20 +3198,20 @@ test_get_attribute_space_and_type(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_GET_SPACE_TYPE_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_GET_SPACE_TYPE_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_GET_SPACE_TYPE_TEST_GROUP_NAME);
goto error;
}
@@ -3231,20 +3225,20 @@ test_get_attribute_space_and_type(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME, attr_dtype, attr_space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -3259,7 +3253,7 @@ test_get_attribute_space_and_type(void)
if ((tmp_type_id = H5Aget_type(attr_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve attribute's datatype\n");
+ printf(" couldn't retrieve attribute's datatype\n");
PART_ERROR(H5Aget_type);
}
@@ -3268,13 +3262,13 @@ test_get_attribute_space_and_type(void)
if (types_equal < 0) {
H5_FAILED();
- HDprintf(" datatype was invalid\n");
+ printf(" datatype was invalid\n");
PART_ERROR(H5Aget_type);
}
if (!types_equal) {
H5_FAILED();
- HDprintf(" attribute's datatype did not match\n");
+ printf(" attribute's datatype did not match\n");
PART_ERROR(H5Aget_type);
}
}
@@ -3289,7 +3283,7 @@ test_get_attribute_space_and_type(void)
if ((tmp_space_id = H5Aget_space(attr_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve attribute's dataspace\n");
+ printf(" couldn't retrieve attribute's dataspace\n");
PART_ERROR(H5Aget_space);
}
@@ -3298,14 +3292,14 @@ test_get_attribute_space_and_type(void)
if (H5Sget_simple_extent_dims(tmp_space_id, space_dims, NULL) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve dimensions of dataspace\n");
+ printf(" couldn't retrieve dimensions of dataspace\n");
PART_ERROR(H5Aget_space);
}
for (i = 0; i < ATTRIBUTE_GET_SPACE_TYPE_TEST_SPACE_RANK; i++)
if (space_dims[i] != attr_dims[i]) {
H5_FAILED();
- HDprintf(" attribute's dataspace dims didn't match\n");
+ printf(" attribute's dataspace dims didn't match\n");
PART_ERROR(H5Aget_space);
}
}
@@ -3348,13 +3342,13 @@ test_get_attribute_space_and_type(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s'\n", ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME);
+ printf(" couldn't open attribute '%s'\n", ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME);
PART_ERROR(H5Aget_type_reopened);
}
if ((tmp_type_id = H5Aget_type(attr_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve attribute's datatype\n");
+ printf(" couldn't retrieve attribute's datatype\n");
PART_ERROR(H5Aget_type_reopened);
}
@@ -3363,13 +3357,13 @@ test_get_attribute_space_and_type(void)
if (types_equal < 0) {
H5_FAILED();
- HDprintf(" datatype was invalid\n");
+ printf(" datatype was invalid\n");
PART_ERROR(H5Aget_type_reopened);
}
if (!types_equal) {
H5_FAILED();
- HDprintf(" attribute's datatype did not match\n");
+ printf(" attribute's datatype did not match\n");
PART_ERROR(H5Aget_type_reopened);
}
}
@@ -3393,13 +3387,13 @@ test_get_attribute_space_and_type(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s'\n", ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME);
+ printf(" couldn't open attribute '%s'\n", ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME);
PART_ERROR(H5Aget_space_reopened);
}
if ((tmp_space_id = H5Aget_space(attr_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve attribute's dataspace\n");
+ printf(" couldn't retrieve attribute's dataspace\n");
PART_ERROR(H5Aget_space_reopened);
}
@@ -3408,14 +3402,14 @@ test_get_attribute_space_and_type(void)
if (H5Sget_simple_extent_dims(tmp_space_id, space_dims, NULL) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve dimensions of dataspace\n");
+ printf(" couldn't retrieve dimensions of dataspace\n");
PART_ERROR(H5Aget_space_reopened);
}
for (i = 0; i < ATTRIBUTE_GET_SPACE_TYPE_TEST_SPACE_RANK; i++) {
if (space_dims[i] != attr_dims[i]) {
H5_FAILED();
- HDprintf(" dataspace dims didn't match!\n");
+ printf(" dataspace dims didn't match!\n");
PART_ERROR(H5Aget_space_reopened);
}
}
@@ -3498,7 +3492,7 @@ test_get_attribute_space_and_type_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -3507,21 +3501,21 @@ test_get_attribute_space_and_type_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n",
+ ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -3535,20 +3529,20 @@ test_get_attribute_space_and_type_invalid_params(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -3569,7 +3563,7 @@ test_get_attribute_space_and_type_invalid_params(void)
if (tmp_type_id >= 0) {
H5_FAILED();
- HDprintf(" retrieved copy of attribute's datatype using an invalid attr_id!\n");
+ printf(" retrieved copy of attribute's datatype using an invalid attr_id!\n");
PART_ERROR(H5Aget_type_invalid_attr_id);
}
@@ -3589,7 +3583,7 @@ test_get_attribute_space_and_type_invalid_params(void)
if (tmp_space_id >= 0) {
H5_FAILED();
- HDprintf(" retrieved copy of attribute's dataspace using an invalid attr_id!\n");
+ printf(" retrieved copy of attribute's dataspace using an invalid attr_id!\n");
PART_ERROR(H5Aget_space_invalid_attr_id);
}
@@ -3658,8 +3652,8 @@ test_attribute_property_lists(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, attribute, or getting property list aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, attribute, or getting property list aren't "
+ "supported with this connector\n");
return 0;
}
@@ -3667,20 +3661,20 @@ test_attribute_property_lists(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_PROPERTY_LIST_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group\n");
+ printf(" couldn't create container sub-group\n");
goto error;
}
@@ -3694,27 +3688,27 @@ test_attribute_property_lists(void)
if ((acpl_id1 = H5Pcreate(H5P_ATTRIBUTE_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create ACPL\n");
+ printf(" couldn't create ACPL\n");
goto error;
}
if (H5Pset_char_encoding(acpl_id1, encoding) < 0) {
H5_FAILED();
- HDprintf(" couldn't set ACPL property value\n");
+ printf(" couldn't set ACPL property value\n");
goto error;
}
if ((attr_id1 = H5Acreate2(group_id, ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME1, attr_dtype1, space_id,
acpl_id1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
if ((attr_id2 = H5Acreate2(group_id, ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME2, attr_dtype2, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
@@ -3724,25 +3718,25 @@ test_attribute_property_lists(void)
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -3758,13 +3752,13 @@ test_attribute_property_lists(void)
* does not */
if ((acpl_id1 = H5Aget_create_plist(attr_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Aget_create_plist);
}
if ((acpl_id2 = H5Aget_create_plist(attr_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Aget_create_plist);
}
@@ -3773,13 +3767,13 @@ test_attribute_property_lists(void)
if (H5Pget_char_encoding(acpl_id1, &encoding) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve ACPL property value\n");
+ printf(" couldn't retrieve ACPL property value\n");
PART_ERROR(H5Aget_create_plist);
}
if (H5T_CSET_UTF8 != encoding) {
H5_FAILED();
- HDprintf(" ACPL property value was incorrect\n");
+ printf(" ACPL property value was incorrect\n");
PART_ERROR(H5Aget_create_plist);
}
@@ -3787,13 +3781,13 @@ test_attribute_property_lists(void)
if (H5Pget_char_encoding(acpl_id2, &encoding) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve ACPL property value\n");
+ printf(" couldn't retrieve ACPL property value\n");
PART_ERROR(H5Aget_create_plist);
}
if (H5T_CSET_UTF8 == encoding) {
H5_FAILED();
- HDprintf(" ACPL property value was set!\n");
+ printf(" ACPL property value was set!\n");
PART_ERROR(H5Aget_create_plist);
}
@@ -3844,26 +3838,26 @@ test_attribute_property_lists(void)
if ((attr_id1 = H5Aopen(group_id, ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME1, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s'\n", ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME1);
+ printf(" couldn't open attribute '%s'\n", ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME1);
PART_ERROR(H5Aget_create_plist_reopened);
}
if ((attr_id2 = H5Aopen(group_id, ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s'\n", ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME2);
+ printf(" couldn't open attribute '%s'\n", ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME2);
PART_ERROR(H5Aget_create_plist_reopened);
}
if ((acpl_id1 = H5Aget_create_plist(attr_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Aget_create_plist_reopened);
}
if ((acpl_id2 = H5Aget_create_plist(attr_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Aget_create_plist_reopened);
}
@@ -3945,8 +3939,8 @@ test_get_attribute_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or attribute aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, or attribute aren't supported "
+ "with this connector\n");
return 0;
}
@@ -3954,26 +3948,26 @@ test_get_attribute_name(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for attribute creation order tracking\n");
+ printf(" couldn't create GCPL for attribute creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set attribute creation order tracking\n");
+ printf(" couldn't set attribute creation order tracking\n");
goto error;
}
}
@@ -3981,7 +3975,7 @@ test_get_attribute_name(void)
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_GET_NAME_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_GET_NAME_TEST_GROUP_NAME);
goto error;
}
@@ -3995,7 +3989,7 @@ test_get_attribute_name(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
goto error;
}
@@ -4005,7 +3999,7 @@ test_get_attribute_name(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
goto error;
}
@@ -4015,7 +4009,7 @@ test_get_attribute_name(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
goto error;
}
@@ -4025,47 +4019,45 @@ test_get_attribute_name(void)
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
goto error;
}
/* Allocate the name buffer */
name_buf_size = strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 2;
- if (NULL == (name_buf = (char *)HDmalloc((size_t)name_buf_size))) {
+ if (NULL == (name_buf = (char *)malloc((size_t)name_buf_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for storing attribute's name\n");
+ printf(" couldn't allocate buffer for storing attribute's name\n");
goto error;
}
@@ -4079,28 +4071,28 @@ test_get_attribute_name(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" couldn't open attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
PART_ERROR(H5Aget_name);
}
*name_buf = '\0';
if (H5Aget_name(attr_id, (size_t)name_buf_size, name_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve attribute name\n");
+ printf(" couldn't retrieve attribute name\n");
PART_ERROR(H5Aget_name);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
PART_ERROR(H5Aget_name);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
PART_ERROR(H5Aget_name);
}
@@ -4121,7 +4113,7 @@ test_get_attribute_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aget_name_by_idx_crt_order_increasing);
}
@@ -4129,17 +4121,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, 0, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
- "creation order in increasing order\n",
- 0);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
+ "creation order in increasing order\n",
+ 0);
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
@@ -4147,17 +4139,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, 1, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
- "creation order in increasing order\n",
- 1);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
+ "creation order in increasing order\n",
+ 1);
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
@@ -4165,17 +4157,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, 2, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
- "creation order in increasing order\n",
- 2);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
+ "creation order in increasing order\n",
+ 2);
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
@@ -4189,7 +4181,7 @@ test_get_attribute_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aget_name_by_idx_crt_order_decreasing);
}
@@ -4197,17 +4189,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, 2, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
- "creation order in decreasing order\n",
- 2);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
+ "creation order in decreasing order\n",
+ 2);
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
@@ -4215,17 +4207,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, 1, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
- "creation order in decreasing order\n",
- 1);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
+ "creation order in decreasing order\n",
+ 1);
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
@@ -4233,17 +4225,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, 0, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
- "creation order in decreasing order\n",
- 0);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
+ "creation order in decreasing order\n",
+ 0);
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
@@ -4259,17 +4251,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 0, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
- "alphabetical order in increasing order\n",
- 0);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
+ "alphabetical order in increasing order\n",
+ 0);
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
@@ -4277,17 +4269,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 1, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
- "alphabetical order in increasing order\n",
- 1);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
+ "alphabetical order in increasing order\n",
+ 1);
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
@@ -4295,17 +4287,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 2, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
- "alphabetical order in increasing order\n",
- 2);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index by "
+ "alphabetical order in increasing order\n",
+ 2);
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
@@ -4321,17 +4313,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, 2, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index "
- "by alphabetical order in decreasing order\n",
- 2);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index "
+ "by alphabetical order in decreasing order\n",
+ 2);
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
@@ -4339,17 +4331,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, 1, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index "
- "by alphabetical order in decreasing order\n",
- 1);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index "
+ "by alphabetical order in decreasing order\n",
+ 1);
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
@@ -4357,17 +4349,17 @@ test_get_attribute_name(void)
if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, 0, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index "
- "by alphabetical order in decreasing order\n",
- 0);
+ printf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index "
+ "by alphabetical order in decreasing order\n",
+ 0);
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
- ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
+ printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
+ ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
@@ -4380,7 +4372,7 @@ test_get_attribute_name(void)
TESTING_2("test cleanup");
if (name_buf) {
- HDfree(name_buf);
+ free(name_buf);
name_buf = NULL;
}
@@ -4405,7 +4397,7 @@ error:
H5E_BEGIN_TRY
{
if (name_buf)
- HDfree(name_buf);
+ free(name_buf);
H5Sclose(space_id);
H5Tclose(attr_dtype);
H5Aclose(attr_id);
@@ -4443,7 +4435,7 @@ test_get_attribute_name_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -4452,21 +4444,21 @@ test_get_attribute_name_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n",
+ ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -4480,20 +4472,20 @@ test_get_attribute_name_invalid_params(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_ATTRIBUTE_NAME, attr_dtype,
space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_ATTRIBUTE_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -4503,11 +4495,11 @@ test_get_attribute_name_invalid_params(void)
if ((name_buf_size = H5Aget_name(attr_id, 0, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve name buf size\n");
+ printf(" couldn't retrieve name buf size\n");
goto error;
}
- if (NULL == (name_buf = (char *)HDmalloc((size_t)name_buf_size + 1)))
+ if (NULL == (name_buf = (char *)malloc((size_t)name_buf_size + 1)))
TEST_ERROR;
PASSED();
@@ -4526,7 +4518,7 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name with an invalid attr_id!\n");
+ printf(" retrieved attribute name using H5Aget_name with an invalid attr_id!\n");
PART_ERROR(H5Aget_name_invalid_attr_id);
}
@@ -4547,7 +4539,7 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name with an invalid name buffer!\n");
+ printf(" retrieved attribute name using H5Aget_name with an invalid name buffer!\n");
PART_ERROR(H5Aget_name_invalid_name_buf);
}
@@ -4569,7 +4561,7 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name_by_idx with an invalid loc_id!\n");
+ printf(" retrieved attribute name using H5Aget_name_by_idx with an invalid loc_id!\n");
PART_ERROR(H5Aget_name_by_idx_invalid_loc_id);
}
@@ -4590,7 +4582,7 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name_by_idx with a NULL object name!\n");
+ printf(" retrieved attribute name using H5Aget_name_by_idx with a NULL object name!\n");
PART_ERROR(H5Aget_name_by_idx_invalid_obj_name);
}
@@ -4603,8 +4595,8 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name_by_idx with an invalid object name "
- "of ''!\n");
+ printf(" retrieved attribute name using H5Aget_name_by_idx with an invalid object name "
+ "of ''!\n");
PART_ERROR(H5Aget_name_by_idx_invalid_obj_name);
}
@@ -4626,8 +4618,8 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name_by_idx with invalid index type "
- "H5_INDEX_UNKNOWN!\n");
+ printf(" retrieved attribute name using H5Aget_name_by_idx with invalid index type "
+ "H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Aget_name_by_idx_invalid_index_type);
}
@@ -4641,8 +4633,8 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name_by_idx with invalid index type "
- "H5_INDEX_N!\n");
+ printf(" retrieved attribute name using H5Aget_name_by_idx with invalid index type "
+ "H5_INDEX_N!\n");
PART_ERROR(H5Aget_name_by_idx_invalid_index_type);
}
@@ -4664,8 +4656,8 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name_by_idx with invalid iteration order "
- "H5_ITER_UNKNOWN!\n");
+ printf(" retrieved attribute name using H5Aget_name_by_idx with invalid iteration order "
+ "H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Aget_name_by_idx_invalid_iter_order);
}
@@ -4679,8 +4671,8 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name_by_idx with invalid iteration order "
- "H5_ITER_N!\n");
+ printf(" retrieved attribute name using H5Aget_name_by_idx with invalid iteration order "
+ "H5_ITER_N!\n");
PART_ERROR(H5Aget_name_by_idx_invalid_iter_order);
}
@@ -4703,7 +4695,7 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" retrieved attribute name using H5Aget_name_by_idx with an invalid name buffer!\n");
PART_ERROR(H5Aget_name_by_idx_invalid_name_buf);
}
@@ -4726,7 +4718,7 @@ test_get_attribute_name_invalid_params(void)
if (name_buf_size >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute name using H5Aget_name_by_idx with an invalid LAPL!\n");
+ printf(" retrieved attribute name using H5Aget_name_by_idx with an invalid LAPL!\n");
PART_ERROR(H5Aget_name_by_idx_invalid_lapl);
}
@@ -4739,7 +4731,7 @@ test_get_attribute_name_invalid_params(void)
TESTING_2("test cleanup");
if (name_buf) {
- HDfree(name_buf);
+ free(name_buf);
name_buf = NULL;
}
@@ -4764,7 +4756,7 @@ error:
H5E_BEGIN_TRY
{
if (name_buf)
- HDfree(name_buf);
+ free(name_buf);
H5Sclose(space_id);
H5Tclose(attr_dtype);
H5Aclose(attr_id);
@@ -4812,8 +4804,8 @@ test_get_attribute_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or attribute aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, or attribute aren't supported "
+ "with this connector\n");
return 0;
}
@@ -4821,26 +4813,26 @@ test_get_attribute_info(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for attribute creation order tracking\n");
+ printf(" couldn't create GCPL for attribute creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set attribute creation order tracking\n");
+ printf(" couldn't set attribute creation order tracking\n");
goto error;
}
}
@@ -4848,7 +4840,7 @@ test_get_attribute_info(void)
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_GET_INFO_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_GET_INFO_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_GET_INFO_TEST_GROUP_NAME);
goto error;
}
@@ -4862,7 +4854,7 @@ test_get_attribute_info(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
goto error;
}
@@ -4872,7 +4864,7 @@ test_get_attribute_info(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2, attr_dtype, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2);
goto error;
}
@@ -4882,7 +4874,7 @@ test_get_attribute_info(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3, attr_dtype, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3);
goto error;
}
@@ -4892,37 +4884,37 @@ test_get_attribute_info(void)
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2);
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3);
goto error;
}
@@ -4936,21 +4928,21 @@ test_get_attribute_info(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
+ printf(" couldn't open attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
PART_ERROR(H5Aget_info);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info(attr_id, &attr_info) < 0) {
H5_FAILED();
- HDprintf(" couldn't get attribute info\n");
+ printf(" couldn't get attribute info\n");
PART_ERROR(H5Aget_info);
}
if (attr_info.corder_valid && (attr_info.corder != 0)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)0);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)0);
PART_ERROR(H5Aget_info);
}
@@ -4958,13 +4950,13 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
+ printf(" couldn't close attribute '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
PART_ERROR(H5Aget_info);
}
@@ -4983,18 +4975,18 @@ test_get_attribute_info(void)
{
TESTING_2("H5Aget_info_by_name");
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_name(group_id, ".", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME, &attr_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get attribute info by name '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
+ printf(" couldn't get attribute info by name '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME);
PART_ERROR(H5Aget_info_by_name);
}
if (attr_info.corder_valid && (attr_info.corder != 0)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)0);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)0);
PART_ERROR(H5Aget_info_by_name);
}
@@ -5002,23 +4994,22 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_name);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_name(group_id, ".", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2, &attr_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get attribute info by name '%s'\n",
- ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2);
+ printf(" couldn't get attribute info by name '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2);
PART_ERROR(H5Aget_info_by_name);
}
if (attr_info.corder_valid && (attr_info.corder != 1)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)1);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)1);
PART_ERROR(H5Aget_info_by_name);
}
@@ -5026,23 +5017,22 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_name);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_name(group_id, ".", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3, &attr_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get attribute info by name '%s'\n",
- ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3);
+ printf(" couldn't get attribute info by name '%s'\n", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3);
PART_ERROR(H5Aget_info_by_name);
}
if (attr_info.corder_valid && (attr_info.corder != 2)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)2);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)2);
PART_ERROR(H5Aget_info_by_name);
}
@@ -5050,7 +5040,7 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_name);
}
@@ -5064,24 +5054,24 @@ test_get_attribute_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aget_info_by_idx_crt_order_increasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &attr_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "creation order in increasing order\n",
- 0);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "creation order in increasing order\n",
+ 0);
PART_ERROR(H5Aget_info_by_idx_crt_order_increasing);
}
if (attr_info.corder_valid && (attr_info.corder != 0)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)0);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)0);
PART_ERROR(H5Aget_info_by_idx_crt_order_increasing);
}
@@ -5089,24 +5079,24 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_crt_order_increasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &attr_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "creation order in increasing order\n",
- 1);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "creation order in increasing order\n",
+ 1);
PART_ERROR(H5Aget_info_by_idx_crt_order_increasing);
}
if (attr_info.corder_valid && (attr_info.corder != 1)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)1);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)1);
PART_ERROR(H5Aget_info_by_idx_crt_order_increasing);
}
@@ -5114,24 +5104,24 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_crt_order_increasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &attr_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "creation order in increasing order\n",
- 2);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "creation order in increasing order\n",
+ 2);
PART_ERROR(H5Aget_info_by_idx_crt_order_increasing);
}
if (attr_info.corder_valid && (attr_info.corder != 2)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)2);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)2);
PART_ERROR(H5Aget_info_by_idx_crt_order_increasing);
}
@@ -5139,7 +5129,7 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_crt_order_increasing);
}
@@ -5153,24 +5143,24 @@ test_get_attribute_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aget_info_by_idx_crt_order_decreasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &attr_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "creation order in decreasing order\n",
- 2);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "creation order in decreasing order\n",
+ 2);
PART_ERROR(H5Aget_info_by_idx_crt_order_decreasing);
}
if (attr_info.corder_valid && (attr_info.corder != 0)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)0);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)0);
PART_ERROR(H5Aget_info_by_idx_crt_order_decreasing);
}
@@ -5178,24 +5168,24 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_crt_order_decreasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &attr_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "creation order in decreasing order\n",
- 1);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "creation order in decreasing order\n",
+ 1);
PART_ERROR(H5Aget_info_by_idx_crt_order_decreasing);
}
if (attr_info.corder_valid && (attr_info.corder != 1)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)1);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)1);
PART_ERROR(H5Aget_info_by_idx_crt_order_decreasing);
}
@@ -5203,24 +5193,24 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_crt_order_decreasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &attr_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "creation order in decreasing order\n",
- 0);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "creation order in decreasing order\n",
+ 0);
PART_ERROR(H5Aget_info_by_idx_crt_order_decreasing);
}
if (attr_info.corder_valid && (attr_info.corder != 2)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)2);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)2);
PART_ERROR(H5Aget_info_by_idx_crt_order_decreasing);
}
@@ -5228,7 +5218,7 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_crt_order_decreasing);
}
@@ -5240,20 +5230,20 @@ test_get_attribute_info(void)
{
TESTING_2("H5Aget_info_by_idx by alphabetical order in increasing order");
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &attr_info, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "alphabetical order in increasing order\n",
- 0);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "alphabetical order in increasing order\n",
+ 0);
PART_ERROR(H5Aget_info_by_idx_name_order_increasing);
}
if (attr_info.corder_valid && (attr_info.corder != 0)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)0);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)0);
PART_ERROR(H5Aget_info_by_idx_name_order_increasing);
}
@@ -5261,24 +5251,24 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_name_order_increasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &attr_info, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "alphabetical order in increasing order\n",
- 1);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "alphabetical order in increasing order\n",
+ 1);
PART_ERROR(H5Aget_info_by_idx_name_order_increasing);
}
if (attr_info.corder_valid && (attr_info.corder != 1)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)1);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)1);
PART_ERROR(H5Aget_info_by_idx_name_order_increasing);
}
@@ -5286,24 +5276,24 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_name_order_increasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &attr_info, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "alphabetical order in increasing order\n",
- 2);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "alphabetical order in increasing order\n",
+ 2);
PART_ERROR(H5Aget_info_by_idx_name_order_increasing);
}
if (attr_info.corder_valid && (attr_info.corder != 2)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)2);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)2);
PART_ERROR(H5Aget_info_by_idx_name_order_increasing);
}
@@ -5311,7 +5301,7 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_name_order_increasing);
}
@@ -5323,20 +5313,20 @@ test_get_attribute_info(void)
{
TESTING_2("H5Aget_info_by_idx by alphabetical order in decreasing order");
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &attr_info, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "alphabetical order in decreasing order\n",
- 2);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "alphabetical order in decreasing order\n",
+ 2);
PART_ERROR(H5Aget_info_by_idx_name_order_decreasing);
}
if (attr_info.corder_valid && (attr_info.corder != 0)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)0);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)0);
PART_ERROR(H5Aget_info_by_idx_name_order_decreasing);
}
@@ -5344,24 +5334,24 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_name_order_decreasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &attr_info, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "alphabetical order in decreasing order\n",
- 1);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "alphabetical order in decreasing order\n",
+ 1);
PART_ERROR(H5Aget_info_by_idx_name_order_decreasing);
}
if (attr_info.corder_valid && (attr_info.corder != 1)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)1);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)1);
PART_ERROR(H5Aget_info_by_idx_name_order_decreasing);
}
@@ -5369,24 +5359,24 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_name_order_decreasing);
}
- HDmemset(&attr_info, 0, sizeof(attr_info));
+ memset(&attr_info, 0, sizeof(attr_info));
if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &attr_info, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
- "alphabetical order in decreasing order\n",
- 0);
+ printf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by "
+ "alphabetical order in decreasing order\n",
+ 0);
PART_ERROR(H5Aget_info_by_idx_name_order_decreasing);
}
if (attr_info.corder_valid && (attr_info.corder != 2)) {
H5_FAILED();
- HDprintf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)attr_info.corder, (long long)2);
+ printf(" attribute's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)attr_info.corder, (long long)2);
PART_ERROR(H5Aget_info_by_idx_name_order_decreasing);
}
@@ -5394,7 +5384,7 @@ test_get_attribute_info(void)
if (attr_info.cset != H5T_CSET_ASCII && attr_info.cset != H5T_CSET_UTF8 &&
attr_info.cset != H5T_CSET_ERROR) {
H5_FAILED();
- HDprintf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
+ printf(" attribute info's 'cset' field wasn't set to a meaningful value\n");
PART_ERROR(H5Aget_info_by_idx_name_order_decreasing);
}
@@ -5462,7 +5452,7 @@ test_get_attribute_info_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -5471,21 +5461,21 @@ test_get_attribute_info_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n",
+ ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -5499,20 +5489,20 @@ test_get_attribute_info_invalid_params(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -5532,7 +5522,7 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info with an invalid attr_id!\n");
+ printf(" retrieved attribute info using H5Aget_info with an invalid attr_id!\n");
PART_ERROR(H5Aget_info_invalid_attr_id);
}
@@ -5552,7 +5542,7 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info with an invalid attr_id!\n");
+ printf(" retrieved attribute info using H5Aget_info with an invalid attr_id!\n");
PART_ERROR(H5Aget_info_invalid_attr_info_pointer);
}
@@ -5574,7 +5564,7 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_name with an invalid loc_id!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_name with an invalid loc_id!\n");
PART_ERROR(H5Aget_info_by_name_invalid_loc_id);
}
@@ -5596,7 +5586,7 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_name with a NULL object name!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_name with a NULL object name!\n");
PART_ERROR(H5Aget_info_by_name_invalid_obj_name);
}
@@ -5609,8 +5599,8 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_name with an invalid object name "
- "of ''!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_name with an invalid object name "
+ "of ''!\n");
PART_ERROR(H5Aget_info_by_name_invalid_obj_name);
}
@@ -5630,7 +5620,7 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" retrieved attribute info using H5Aget_info_by_name with a NULL attribute name!\n");
PART_ERROR(H5Aget_info_by_name_invalid_attr_name);
}
@@ -5643,8 +5633,8 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_name with an invalid attribute "
- "name of ''!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_name with an invalid attribute "
+ "name of ''!\n");
PART_ERROR(H5Aget_info_by_name_invalid_attr_name);
}
@@ -5665,8 +5655,8 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_name with an invalid attribute "
- "info pointer!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_name with an invalid attribute "
+ "info pointer!\n");
PART_ERROR(H5Aget_info_by_name_invalid_attr_info_pointer);
}
@@ -5687,7 +5677,7 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_name with an invalid LAPL!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_name with an invalid LAPL!\n");
PART_ERROR(H5Aget_info_by_name_invalid_lapl);
}
@@ -5708,7 +5698,7 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_idx with an invalid loc_id!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_idx with an invalid loc_id!\n");
PART_ERROR(H5Aget_info_by_idx_invalid_loc_id);
}
@@ -5729,7 +5719,7 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_idx with a NULL object name!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_idx with a NULL object name!\n");
PART_ERROR(H5Aget_info_by_idx_invalid_obj_name);
}
@@ -5742,8 +5732,8 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_idx with an invalid object name "
- "of ''!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_idx with an invalid object name "
+ "of ''!\n");
PART_ERROR(H5Aget_info_by_idx_invalid_obj_name);
}
@@ -5764,8 +5754,8 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_idx with invalid index type "
- "H5_INDEX_UNKNOWN!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_idx with invalid index type "
+ "H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Aget_info_by_idx_invalid_index_type);
}
@@ -5778,8 +5768,8 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_idx with invalid index type "
- "H5_INDEX_N!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_idx with invalid index type "
+ "H5_INDEX_N!\n");
PART_ERROR(H5Aget_info_by_idx_invalid_index_type);
}
@@ -5800,8 +5790,8 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_idx with invalid iteration order "
- "H5_ITER_UNKNOWN!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_idx with invalid iteration order "
+ "H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Aget_info_by_idx_invalid_iter_order);
}
@@ -5814,8 +5804,8 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_idx with invalid iteration order "
- "H5_ITER_N!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_idx with invalid iteration order "
+ "H5_ITER_N!\n");
PART_ERROR(H5Aget_info_by_idx_invalid_iter_order);
}
@@ -5835,8 +5825,8 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_idx with an invalid attribute "
- "info pointer!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_idx with an invalid attribute "
+ "info pointer!\n");
PART_ERROR(H5Aget_info_by_idx_invalid_attr_info_pointer);
}
@@ -5857,7 +5847,7 @@ test_get_attribute_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved attribute info using H5Aget_info_by_idx with an invalid LAPL!\n");
+ printf(" retrieved attribute info using H5Aget_info_by_idx with an invalid LAPL!\n");
PART_ERROR(H5Aget_info_by_idx_invalid_lapl);
}
@@ -5922,7 +5912,7 @@ test_rename_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -5931,20 +5921,20 @@ test_rename_attribute(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_RENAME_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_RENAME_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_RENAME_TEST_GROUP_NAME);
goto error;
}
@@ -5957,39 +5947,39 @@ test_rename_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME, attr_dtype, attr_space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
if ((attr_id2 = H5Acreate2(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME2, attr_dtype, attr_space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -6003,33 +5993,33 @@ test_rename_attribute(void)
if (H5Arename(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME, ATTRIBUTE_RENAME_TEST_NEW_NAME) < 0) {
H5_FAILED();
- HDprintf(" couldn't rename attribute '%s' to '%s' using H5Arename\n",
- ATTRIBUTE_RENAME_TEST_ATTR_NAME, ATTRIBUTE_RENAME_TEST_NEW_NAME);
+ printf(" couldn't rename attribute '%s' to '%s' using H5Arename\n",
+ ATTRIBUTE_RENAME_TEST_ATTR_NAME, ATTRIBUTE_RENAME_TEST_NEW_NAME);
PART_ERROR(H5Arename);
}
/* Verify the attribute has been renamed */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
PART_ERROR(H5Arename);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not get renamed!\n");
+ printf(" attribute did not get renamed!\n");
PART_ERROR(H5Arename);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_RENAME_TEST_NEW_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
PART_ERROR(H5Arename);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not get renamed!\n");
+ printf(" attribute did not get renamed!\n");
PART_ERROR(H5Arename);
}
@@ -6045,33 +6035,33 @@ test_rename_attribute(void)
ATTRIBUTE_RENAME_TEST_ATTR_NAME2, ATTRIBUTE_RENAME_TEST_NEW_NAME2,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't rename attribute '%s' to '%s' using H5Arename_by_name\n",
- ATTRIBUTE_RENAME_TEST_ATTR_NAME2, ATTRIBUTE_RENAME_TEST_NEW_NAME2);
+ printf(" couldn't rename attribute '%s' to '%s' using H5Arename_by_name\n",
+ ATTRIBUTE_RENAME_TEST_ATTR_NAME2, ATTRIBUTE_RENAME_TEST_NEW_NAME2);
PART_ERROR(H5Arename_by_name);
}
/* Verify the attribute has been renamed */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
PART_ERROR(H5Arename_by_name);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not get renamed!\n");
+ printf(" attribute did not get renamed!\n");
PART_ERROR(H5Arename_by_name);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_RENAME_TEST_NEW_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
PART_ERROR(H5Arename_by_name);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not get renamed!\n");
+ printf(" attribute did not get renamed!\n");
PART_ERROR(H5Arename_by_name);
}
@@ -6140,7 +6130,7 @@ test_rename_attribute_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -6149,21 +6139,20 @@ test_rename_attribute_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -6177,39 +6166,39 @@ test_rename_attribute_invalid_params(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
if ((attr_id2 = H5Acreate2(group_id, ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_ATTR_NAME2, attr_dtype,
attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -6230,7 +6219,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename with an invalid loc_id!\n");
+ printf(" renamed attribute using H5Arename with an invalid loc_id!\n");
PART_ERROR(H5Arename_invalid_loc_id);
}
@@ -6250,7 +6239,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename with a NULL old attribute name!\n");
+ printf(" renamed attribute using H5Arename with a NULL old attribute name!\n");
PART_ERROR(H5Arename_invalid_old_attr_name);
}
@@ -6262,7 +6251,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename with an invalid old attribute name of ''!\n");
+ printf(" renamed attribute using H5Arename with an invalid old attribute name of ''!\n");
PART_ERROR(H5Arename_invalid_old_attr_name);
}
@@ -6282,7 +6271,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename with a NULL new attribute name!\n");
+ printf(" renamed attribute using H5Arename with a NULL new attribute name!\n");
PART_ERROR(H5Arename_invalid_new_attr_name);
}
@@ -6294,7 +6283,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename with an invalid new attribute name of ''!\n");
+ printf(" renamed attribute using H5Arename with an invalid new attribute name of ''!\n");
PART_ERROR(H5Arename_invalid_new_attr_name);
}
@@ -6316,7 +6305,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename_by_name with an invalid loc_id!\n");
+ printf(" renamed attribute using H5Arename_by_name with an invalid loc_id!\n");
PART_ERROR(H5Arename_by_name_invalid_loc_id);
}
@@ -6337,7 +6326,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename_by_name with a NULL object name!\n");
+ printf(" renamed attribute using H5Arename_by_name with a NULL object name!\n");
PART_ERROR(H5Arename_by_name_invalid_obj_name);
}
@@ -6350,8 +6339,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
- " renamed attribute using H5Arename_by_name with an invalid object name of ''!\n");
+ printf(" renamed attribute using H5Arename_by_name with an invalid object name of ''!\n");
PART_ERROR(H5Arename_by_name_invalid_obj_name);
}
@@ -6372,7 +6360,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename_by_name with a NULL old attribute name!\n");
+ printf(" renamed attribute using H5Arename_by_name with a NULL old attribute name!\n");
PART_ERROR(H5Arename_by_name_invalid_old_attr_name);
}
@@ -6385,8 +6373,8 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename_by_name with an invalid old attribute name "
- "of ''!\n");
+ printf(" renamed attribute using H5Arename_by_name with an invalid old attribute name "
+ "of ''!\n");
PART_ERROR(H5Arename_by_name_invalid_old_attr_name);
}
@@ -6407,7 +6395,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename_by_name with a NULL new attribute name!\n");
+ printf(" renamed attribute using H5Arename_by_name with a NULL new attribute name!\n");
PART_ERROR(H5Arename_by_name_invalid_new_attr_name);
}
@@ -6420,8 +6408,8 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename_by_name with an invalid new attribute name "
- "of ''!\n");
+ printf(" renamed attribute using H5Arename_by_name with an invalid new attribute name "
+ "of ''!\n");
PART_ERROR(H5Arename_by_name_invalid_new_attr_name);
}
@@ -6442,7 +6430,7 @@ test_rename_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" renamed attribute using H5Arename_by_name with an invalid LAPL!\n");
+ printf(" renamed attribute using H5Arename_by_name with an invalid LAPL!\n");
PART_ERROR(H5Arename_by_name_invalid_lapl);
}
@@ -6515,8 +6503,8 @@ test_attribute_iterate_group(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, attribute, or iterate aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, attribute, or iterate aren't "
+ "supported with this connector\n");
return 0;
}
@@ -6524,26 +6512,26 @@ test_attribute_iterate_group(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for attribute creation order tracking\n");
+ printf(" couldn't create GCPL for attribute creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set attribute creation order tracking\n");
+ printf(" couldn't set attribute creation order tracking\n");
goto error;
}
}
@@ -6551,7 +6539,7 @@ test_attribute_iterate_group(void)
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_ITERATE_TEST_GRP_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", ATTRIBUTE_ITERATE_TEST_GRP_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", ATTRIBUTE_ITERATE_TEST_GRP_SUBGROUP_NAME);
goto error;
}
@@ -6571,26 +6559,26 @@ test_attribute_iterate_group(void)
if ((attr_id = H5Acreate2(group_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", attr_name);
+ printf(" couldn't create attribute '%s'\n", attr_name);
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, attr_name)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n", attr_name);
+ printf(" couldn't determine if attribute '%s' exists\n", attr_name);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", attr_name);
+ printf(" attribute '%s' did not exist\n", attr_name);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", attr_name);
+ printf(" failed to close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -6617,15 +6605,15 @@ test_attribute_iterate_group(void)
if (H5Aiterate2(group_id, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_iter_callback1, &link_counter) <
0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type name in increasing order failed\n");
+ printf(" H5Aiterate2 by index type name in increasing order failed\n");
PART_ERROR(H5Aiterate2_name_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 0) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_name_increasing);
}
@@ -6642,15 +6630,15 @@ test_attribute_iterate_group(void)
if (H5Aiterate2(group_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, attr_iter_callback1, &link_counter) <
0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type name in decreasing order failed\n");
+ printf(" H5Aiterate2 by index type name in decreasing order failed\n");
PART_ERROR(H5Aiterate2_name_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_name_decreasing);
}
@@ -6664,7 +6652,7 @@ test_attribute_iterate_group(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate2_creation_increasing);
}
@@ -6674,15 +6662,15 @@ test_attribute_iterate_group(void)
if (H5Aiterate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, attr_iter_callback1,
&link_counter) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type creation order in increasing order failed\n");
+ printf(" H5Aiterate2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Aiterate2_creation_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_creation_increasing);
}
@@ -6696,7 +6684,7 @@ test_attribute_iterate_group(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate2_creation_decreasing);
}
@@ -6706,15 +6694,15 @@ test_attribute_iterate_group(void)
if (H5Aiterate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, attr_iter_callback1,
&link_counter) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type creation order in decreasing order failed\n");
+ printf(" H5Aiterate2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Aiterate2_creation_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_creation_decreasing);
}
@@ -6733,15 +6721,15 @@ test_attribute_iterate_group(void)
file_id, "/" ATTRIBUTE_TEST_GROUP_NAME "/" ATTRIBUTE_ITERATE_TEST_GRP_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, NULL, attr_iter_callback1, &link_counter, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type name in increasing order failed\n");
+ printf(" H5Aiterate_by_name by index type name in increasing order failed\n");
PART_ERROR(H5Aiterate_by_name_name_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_name_increasing);
}
@@ -6760,15 +6748,15 @@ test_attribute_iterate_group(void)
file_id, "/" ATTRIBUTE_TEST_GROUP_NAME "/" ATTRIBUTE_ITERATE_TEST_GRP_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, NULL, attr_iter_callback1, &link_counter, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type name in decreasing order failed\n");
+ printf(" H5Aiterate_by_name by index type name in decreasing order failed\n");
PART_ERROR(H5Aiterate_by_name_name_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_name_decreasing);
}
@@ -6782,7 +6770,7 @@ test_attribute_iterate_group(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate_by_name_creation_increasing);
}
@@ -6794,15 +6782,15 @@ test_attribute_iterate_group(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, attr_iter_callback1, &link_counter,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type creation order in increasing order failed\n");
+ printf(" H5Aiterate_by_name by index type creation order in increasing order failed\n");
PART_ERROR(H5Aiterate_by_name_creation_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_creation_increasing);
}
@@ -6816,7 +6804,7 @@ test_attribute_iterate_group(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate_by_name_creation_decreasing);
}
@@ -6828,15 +6816,15 @@ test_attribute_iterate_group(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, attr_iter_callback1, &link_counter,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type creation order in decreasing order failed\n");
+ printf(" H5Aiterate_by_name by index type creation order in decreasing order failed\n");
PART_ERROR(H5Aiterate_by_name_creation_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_creation_decreasing);
}
@@ -6911,8 +6899,8 @@ test_attribute_iterate_dataset(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, attribute, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, attribute, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -6920,33 +6908,33 @@ test_attribute_iterate_dataset(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_ITERATE_TEST_DSET_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", ATTRIBUTE_ITERATE_TEST_DSET_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", ATTRIBUTE_ITERATE_TEST_DSET_SUBGROUP_NAME);
goto error;
}
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DCPL for attribute creation order tracking\n");
+ printf(" couldn't create DCPL for attribute creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set attribute creation order tracking\n");
+ printf(" couldn't set attribute creation order tracking\n");
goto error;
}
}
@@ -6966,7 +6954,7 @@ test_attribute_iterate_dataset(void)
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_DSET_NAME, dset_dtype, dset_space_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", ATTRIBUTE_ITERATE_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", ATTRIBUTE_ITERATE_TEST_DSET_NAME);
goto error;
}
@@ -6980,26 +6968,26 @@ test_attribute_iterate_dataset(void)
if ((attr_id = H5Acreate2(dset_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", attr_name);
+ printf(" couldn't create attribute '%s'\n", attr_name);
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(dset_id, attr_name)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n", attr_name);
+ printf(" couldn't determine if attribute '%s' exists\n", attr_name);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", attr_name);
+ printf(" attribute '%s' did not exist\n", attr_name);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", attr_name);
+ printf(" failed to close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -7026,15 +7014,15 @@ test_attribute_iterate_dataset(void)
if (H5Aiterate2(dset_id, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_iter_callback1, &link_counter) <
0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type name in increasing order failed\n");
+ printf(" H5Aiterate2 by index type name in increasing order failed\n");
PART_ERROR(H5Aiterate2_name_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 0) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_name_increasing);
}
@@ -7051,15 +7039,15 @@ test_attribute_iterate_dataset(void)
if (H5Aiterate2(dset_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, attr_iter_callback1, &link_counter) <
0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type name in decreasing order failed\n");
+ printf(" H5Aiterate2 by index type name in decreasing order failed\n");
PART_ERROR(H5Aiterate2_name_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_name_decreasing);
}
@@ -7073,7 +7061,7 @@ test_attribute_iterate_dataset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate2_creation_increasing);
}
@@ -7083,15 +7071,15 @@ test_attribute_iterate_dataset(void)
if (H5Aiterate2(dset_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, attr_iter_callback1,
&link_counter) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type creation order in increasing order failed\n");
+ printf(" H5Aiterate2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Aiterate2_creation_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_creation_increasing);
}
@@ -7105,7 +7093,7 @@ test_attribute_iterate_dataset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate2_creation_decreasing);
}
@@ -7115,15 +7103,15 @@ test_attribute_iterate_dataset(void)
if (H5Aiterate2(dset_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, attr_iter_callback1,
&link_counter) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type creation order in decreasing order failed\n");
+ printf(" H5Aiterate2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Aiterate2_creation_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_creation_decreasing);
}
@@ -7144,15 +7132,15 @@ test_attribute_iterate_dataset(void)
H5_INDEX_NAME, H5_ITER_INC, NULL, attr_iter_callback1, &link_counter,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type name in increasing order failed\n");
+ printf(" H5Aiterate_by_name by index type name in increasing order failed\n");
PART_ERROR(H5Aiterate_by_name_name_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_name_increasing);
}
@@ -7173,15 +7161,15 @@ test_attribute_iterate_dataset(void)
H5_INDEX_NAME, H5_ITER_DEC, NULL, attr_iter_callback1, &link_counter,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type name in decreasing order failed\n");
+ printf(" H5Aiterate_by_name by index type name in decreasing order failed\n");
PART_ERROR(H5Aiterate_by_name_name_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_name_decreasing);
}
@@ -7195,7 +7183,7 @@ test_attribute_iterate_dataset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate_by_name_creation_increasing);
}
@@ -7208,15 +7196,15 @@ test_attribute_iterate_dataset(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, attr_iter_callback1, &link_counter,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type creation order in increasing order failed\n");
+ printf(" H5Aiterate_by_name by index type creation order in increasing order failed\n");
PART_ERROR(H5Aiterate_by_name_creation_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_creation_increasing);
}
@@ -7230,7 +7218,7 @@ test_attribute_iterate_dataset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate_by_name_creation_decreasing);
}
@@ -7243,15 +7231,15 @@ test_attribute_iterate_dataset(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, attr_iter_callback1, &link_counter,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type creation order in decreasing order failed\n");
+ printf(" H5Aiterate_by_name by index type creation order in decreasing order failed\n");
PART_ERROR(H5Aiterate_by_name_creation_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_creation_decreasing);
}
@@ -7333,8 +7321,8 @@ test_attribute_iterate_datatype(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, stored datatype, attribute, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, stored datatype, attribute, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -7342,33 +7330,33 @@ test_attribute_iterate_datatype(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_ITERATE_TEST_DTYPE_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", ATTRIBUTE_ITERATE_TEST_DTYPE_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", ATTRIBUTE_ITERATE_TEST_DTYPE_SUBGROUP_NAME);
goto error;
}
if ((tcpl_id = H5Pcreate(H5P_DATATYPE_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create TCPL for attribute creation order tracking\n");
+ printf(" couldn't create TCPL for attribute creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_attr_creation_order(tcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set attribute creation order tracking\n");
+ printf(" couldn't set attribute creation order tracking\n");
goto error;
}
}
@@ -7385,7 +7373,7 @@ test_attribute_iterate_datatype(void)
if (H5Tcommit2(group_id, ATTRIBUTE_ITERATE_TEST_DTYPE_NAME, type_id, H5P_DEFAULT, tcpl_id, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", ATTRIBUTE_ITERATE_TEST_DTYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", ATTRIBUTE_ITERATE_TEST_DTYPE_NAME);
goto error;
}
@@ -7399,26 +7387,26 @@ test_attribute_iterate_datatype(void)
if ((attr_id = H5Acreate2(type_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", attr_name);
+ printf(" couldn't create attribute '%s'\n", attr_name);
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(type_id, attr_name)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n", attr_name);
+ printf(" couldn't determine if attribute '%s' exists\n", attr_name);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", attr_name);
+ printf(" attribute '%s' did not exist\n", attr_name);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", attr_name);
+ printf(" failed to close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -7445,15 +7433,15 @@ test_attribute_iterate_datatype(void)
if (H5Aiterate2(type_id, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_iter_callback1, &link_counter) <
0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type name in increasing order failed\n");
+ printf(" H5Aiterate2 by index type name in increasing order failed\n");
PART_ERROR(H5Aiterate2_name_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 0) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_name_increasing);
}
@@ -7470,15 +7458,15 @@ test_attribute_iterate_datatype(void)
if (H5Aiterate2(type_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, attr_iter_callback1, &link_counter) <
0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type name in decreasing order failed\n");
+ printf(" H5Aiterate2 by index type name in decreasing order failed\n");
PART_ERROR(H5Aiterate2_name_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_name_decreasing);
}
@@ -7492,7 +7480,7 @@ test_attribute_iterate_datatype(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate2_creation_increasing);
}
@@ -7502,15 +7490,15 @@ test_attribute_iterate_datatype(void)
if (H5Aiterate2(type_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, attr_iter_callback1,
&link_counter) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type creation order in increasing order failed\n");
+ printf(" H5Aiterate2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Aiterate2_creation_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_creation_increasing);
}
@@ -7524,7 +7512,7 @@ test_attribute_iterate_datatype(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate2_creation_decreasing);
}
@@ -7534,15 +7522,15 @@ test_attribute_iterate_datatype(void)
if (H5Aiterate2(type_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, attr_iter_callback1,
&link_counter) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 by index type creation order in decreasing order failed\n");
+ printf(" H5Aiterate2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Aiterate2_creation_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
- "have been called!\n");
+ printf(" H5Aiterate sentinel value is unchanged; supplied callback function must not "
+ "have been called!\n");
PART_ERROR(H5Aiterate2_creation_decreasing);
}
@@ -7563,15 +7551,15 @@ test_attribute_iterate_datatype(void)
"/" ATTRIBUTE_ITERATE_TEST_DTYPE_NAME,
H5_INDEX_NAME, H5_ITER_INC, NULL, attr_iter_callback1, &link_counter, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type name in increasing order failed\n");
+ printf(" H5Aiterate_by_name by index type name in increasing order failed\n");
PART_ERROR(H5Aiterate_by_name_name_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_name_increasing);
}
@@ -7592,15 +7580,15 @@ test_attribute_iterate_datatype(void)
"/" ATTRIBUTE_ITERATE_TEST_DTYPE_NAME,
H5_INDEX_NAME, H5_ITER_DEC, NULL, attr_iter_callback1, &link_counter, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type name in decreasing order failed\n");
+ printf(" H5Aiterate_by_name by index type name in decreasing order failed\n");
PART_ERROR(H5Aiterate_by_name_name_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_name_decreasing);
}
@@ -7614,7 +7602,7 @@ test_attribute_iterate_datatype(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate_by_name_creation_increasing);
}
@@ -7628,15 +7616,15 @@ test_attribute_iterate_datatype(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, attr_iter_callback1, &link_counter,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type creation order in increasing order failed\n");
+ printf(" H5Aiterate_by_name by index type creation order in increasing order failed\n");
PART_ERROR(H5Aiterate_by_name_creation_increasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_creation_increasing);
}
@@ -7650,7 +7638,7 @@ test_attribute_iterate_datatype(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Aiterate_by_name_creation_decreasing);
}
@@ -7664,15 +7652,15 @@ test_attribute_iterate_datatype(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, attr_iter_callback1, &link_counter,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name by index type creation order in decreasing order failed\n");
+ printf(" H5Aiterate_by_name by index type creation order in decreasing order failed\n");
PART_ERROR(H5Aiterate_by_name_creation_decreasing);
}
/* Make sure that the attribute iteration callback was actually called */
if (link_counter == 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
- "must not have been called!\n");
+ printf(" H5Aiterate_by_name sentinel value is unchanged; supplied callback function "
+ "must not have been called!\n");
PART_ERROR(H5Aiterate_by_name_creation_decreasing);
}
@@ -7760,8 +7748,8 @@ test_attribute_iterate_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, attribute, or iterate aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, attribute, or iterate aren't supported with this "
+ "connector\n");
return 0;
}
@@ -7769,20 +7757,20 @@ test_attribute_iterate_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_SUBGROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup\n");
+ printf(" couldn't create container subgroup\n");
goto error;
}
@@ -7796,77 +7784,77 @@ test_attribute_iterate_invalid_params(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
if ((attr_id2 = H5Acreate2(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME2, attr_dtype,
attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
if ((attr_id3 = H5Acreate2(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME3, attr_dtype,
attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
if ((attr_id4 = H5Acreate2(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME4, attr_dtype,
attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME4)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -7887,7 +7875,7 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate with an invalid loc_id!\n");
+ printf(" iterated over attributes using H5Aiterate with an invalid loc_id!\n");
PART_ERROR(H5Aiterate_invalid_loc_id);
}
@@ -7908,8 +7896,8 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate with invalid index type "
- "H5_INDEX_UNKNOWN!\n");
+ printf(" iterated over attributes using H5Aiterate with invalid index type "
+ "H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Aiterate_invalid_index_type);
}
@@ -7921,8 +7909,7 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
- " iterated over attributes using H5Aiterate with invalid index type H5_INDEX_N!\n");
+ printf(" iterated over attributes using H5Aiterate with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Aiterate_invalid_index_type);
}
@@ -7943,8 +7930,8 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate with invalid index ordering "
- "H5_ITER_UNKNOWN!\n");
+ printf(" iterated over attributes using H5Aiterate with invalid index ordering "
+ "H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Aiterate_invalid_index_order);
}
@@ -7956,7 +7943,7 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" iterated over attributes using H5Aiterate with invalid index ordering H5_ITER_N!\n");
PART_ERROR(H5Aiterate_invalid_index_order);
}
@@ -7978,7 +7965,7 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate_by_name with an invalid loc_id!\n");
+ printf(" iterated over attributes using H5Aiterate_by_name with an invalid loc_id!\n");
PART_ERROR(H5Aiterate_by_name_invalid_loc_id);
}
@@ -7999,7 +7986,7 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate_by_name with a NULL object name!\n");
+ printf(" iterated over attributes using H5Aiterate_by_name with a NULL object name!\n");
PART_ERROR(H5Aiterate_by_name_invalid_obj_name);
}
@@ -8012,8 +7999,8 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate_by_name with an invalid object name "
- "of ''!\n");
+ printf(" iterated over attributes using H5Aiterate_by_name with an invalid object name "
+ "of ''!\n");
PART_ERROR(H5Aiterate_by_name_invalid_obj_name);
}
@@ -8034,8 +8021,8 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate_by_name with invalid index type "
- "H5_INDEX_UNKNOWN!\n");
+ printf(" iterated over attributes using H5Aiterate_by_name with invalid index type "
+ "H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Aiterate_by_name_invalid_index_type);
}
@@ -8048,8 +8035,8 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate_by_name with invalid index type "
- "H5_INDEX_N!\n");
+ printf(" iterated over attributes using H5Aiterate_by_name with invalid index type "
+ "H5_INDEX_N!\n");
PART_ERROR(H5Aiterate_by_name_invalid_index_type);
}
@@ -8070,8 +8057,8 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate_by_name with invalid index ordering "
- "H5_ITER_UNKNOWN!\n");
+ printf(" iterated over attributes using H5Aiterate_by_name with invalid index ordering "
+ "H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Aiterate_by_name_invalid_index_order);
}
@@ -8084,8 +8071,8 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate_by_name with invalid index ordering "
- "H5_ITER_N!\n");
+ printf(" iterated over attributes using H5Aiterate_by_name with invalid index ordering "
+ "H5_ITER_N!\n");
PART_ERROR(H5Aiterate_by_name_invalid_index_order);
}
@@ -8106,7 +8093,7 @@ test_attribute_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" iterated over attributes using H5Aiterate_by_name with an invalid LAPL!\n");
+ printf(" iterated over attributes using H5Aiterate_by_name with an invalid LAPL!\n");
PART_ERROR(H5Aiterate_by_name_invalid_lapl);
}
@@ -8180,8 +8167,8 @@ test_attribute_iterate_0_attributes(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, attribute, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, attribute, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -8189,20 +8176,20 @@ test_attribute_iterate_0_attributes(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_SUBGROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup\n");
+ printf(" couldn't create container subgroup\n");
goto error;
}
@@ -8216,7 +8203,7 @@ test_attribute_iterate_0_attributes(void)
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, dset_dtype,
dset_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset\n");
+ printf(" couldn't create dataset\n");
goto error;
}
@@ -8230,7 +8217,7 @@ test_attribute_iterate_0_attributes(void)
if (H5Aiterate2(dset_id, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, attr_iter_callback2, NULL) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 on object with 0 attributes failed\n");
+ printf(" H5Aiterate2 on object with 0 attributes failed\n");
PART_ERROR(H5Aiterate_0_attributes_native);
}
@@ -8244,7 +8231,7 @@ test_attribute_iterate_0_attributes(void)
if (H5Aiterate2(dset_id, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_iter_callback2, NULL) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 on object with 0 attributes failed\n");
+ printf(" H5Aiterate2 on object with 0 attributes failed\n");
PART_ERROR(H5Aiterate_0_attributes_inc);
}
@@ -8258,7 +8245,7 @@ test_attribute_iterate_0_attributes(void)
if (H5Aiterate2(dset_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, attr_iter_callback2, NULL) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate2 on object with 0 attributes failed\n");
+ printf(" H5Aiterate2 on object with 0 attributes failed\n");
PART_ERROR(H5Aiterate_0_attributes_dec);
}
@@ -8273,7 +8260,7 @@ test_attribute_iterate_0_attributes(void)
if (H5Aiterate_by_name(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, H5_INDEX_NAME,
H5_ITER_NATIVE, NULL, attr_iter_callback2, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name on object with 0 attributes failed\n");
+ printf(" H5Aiterate_by_name on object with 0 attributes failed\n");
PART_ERROR(H5Aiterate_by_name_0_attributes_native);
}
@@ -8288,7 +8275,7 @@ test_attribute_iterate_0_attributes(void)
if (H5Aiterate_by_name(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, H5_INDEX_NAME,
H5_ITER_INC, NULL, attr_iter_callback2, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name on object with 0 attributes failed\n");
+ printf(" H5Aiterate_by_name on object with 0 attributes failed\n");
PART_ERROR(H5Aiterate_by_name_0_attributes_inc);
}
@@ -8302,7 +8289,7 @@ test_attribute_iterate_0_attributes(void)
if (H5Aiterate_by_name(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, H5_INDEX_NAME,
H5_ITER_DEC, NULL, attr_iter_callback2, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Aiterate_by_name on object with 0 attributes failed\n");
+ printf(" H5Aiterate_by_name on object with 0 attributes failed\n");
PART_ERROR(H5Aiterate_by_name_0_attributes_dec);
}
@@ -8368,8 +8355,8 @@ test_delete_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or attribute aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, or attribute aren't supported "
+ "with this connector\n");
return 0;
}
@@ -8377,26 +8364,26 @@ test_delete_attribute(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for attribute creation order tracking\n");
+ printf(" couldn't create GCPL for attribute creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set attribute creation order tracking\n");
+ printf(" couldn't set attribute creation order tracking\n");
goto error;
}
}
@@ -8404,7 +8391,7 @@ test_delete_attribute(void)
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_DELETION_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_DELETION_TEST_GROUP_NAME);
goto error;
}
@@ -8426,49 +8413,49 @@ test_delete_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete);
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete);
}
/* Delete the attribute */
if (H5Adelete(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" failed to delete attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete);
}
/* Verify the attribute has been deleted */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete);
}
@@ -8491,22 +8478,22 @@ test_delete_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_name);
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_name);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_name);
}
@@ -8514,27 +8501,27 @@ test_delete_attribute(void)
if (H5Adelete_by_name(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME,
ATTRIBUTE_DELETION_TEST_ATTR_NAME, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" failed to delete attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_name);
}
/* Verify the attribute has been deleted */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_name);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_name);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_name);
}
@@ -8555,7 +8542,7 @@ test_delete_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Adelete_by_idx_crt_order_increasing);
}
@@ -8563,82 +8550,82 @@ test_delete_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
@@ -8646,50 +8633,50 @@ test_delete_attribute(void)
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
- "increasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
+ "increasing order\n");
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
/* Ensure that the attribute is gone and others remain */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
@@ -8697,95 +8684,95 @@ test_delete_attribute(void)
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
- "increasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
+ "increasing order\n");
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
- "increasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
+ "increasing order\n");
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_increasing);
}
@@ -8806,7 +8793,7 @@ test_delete_attribute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Adelete_by_idx_crt_order_decreasing);
}
@@ -8814,82 +8801,82 @@ test_delete_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
@@ -8897,50 +8884,50 @@ test_delete_attribute(void)
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, 2, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
- "decreasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
+ "decreasing order\n");
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
/* Ensure that the attribute is gone and others remain */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
@@ -8948,95 +8935,95 @@ test_delete_attribute(void)
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
- "decreasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
+ "decreasing order\n");
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
- "decreasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by creation order in "
+ "decreasing order\n");
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_crt_order_decreasing);
}
@@ -9059,82 +9046,82 @@ test_delete_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
@@ -9142,50 +9129,50 @@ test_delete_attribute(void)
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
- "increasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
+ "increasing order\n");
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
/* Ensure that the attribute is gone and others remain */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
@@ -9193,95 +9180,95 @@ test_delete_attribute(void)
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
- "increasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
+ "increasing order\n");
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
- "increasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
+ "increasing order\n");
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_increasing);
}
@@ -9304,82 +9291,82 @@ test_delete_attribute(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" failed to close attribute '%s'\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
/* Verify the attributes have been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' didn't exist before deletion\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' didn't exist before deletion\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
@@ -9387,50 +9374,50 @@ test_delete_attribute(void)
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, 2, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
- "decreasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
+ "decreasing order\n");
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
/* Ensure that the attribute is gone and others remain */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
@@ -9438,95 +9425,95 @@ test_delete_attribute(void)
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
- "decreasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
+ "decreasing order\n");
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' doesn't exist after deletion of a different attribute!\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (H5Adelete_by_idx(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
- "decreasing order\n");
+ printf(" failed to delete attribute using H5Adelete_by_idx by alphabetical order in "
+ "decreasing order\n");
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME2);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
if (attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
+ printf(" attribute '%s' exists after deletion!\n", ATTRIBUTE_DELETION_TEST_ATTR_NAME3);
PART_ERROR(H5Adelete_by_idx_name_order_decreasing);
}
@@ -9601,7 +9588,7 @@ test_delete_attribute_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -9610,21 +9597,21 @@ test_delete_attribute_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n",
+ ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -9638,20 +9625,20 @@ test_delete_attribute_invalid_params(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute didn't exists\n");
+ printf(" attribute didn't exists\n");
goto error;
}
@@ -9671,7 +9658,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete with an invalid loc_id!\n");
+ printf(" deleted an attribute using H5Adelete with an invalid loc_id!\n");
PART_ERROR(H5Adelete_invalid_loc_id);
}
@@ -9691,7 +9678,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete with a NULL attribute name!\n");
+ printf(" deleted an attribute using H5Adelete with a NULL attribute name!\n");
PART_ERROR(H5Adelete_invalid_attr_name);
}
@@ -9703,7 +9690,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete with an invalid attribute name of ''!\n");
+ printf(" deleted an attribute using H5Adelete with an invalid attribute name of ''!\n");
PART_ERROR(H5Adelete_invalid_attr_name);
}
@@ -9724,7 +9711,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_name with an invalid loc_id!\n");
+ printf(" deleted an attribute using H5Adelete_by_name with an invalid loc_id!\n");
PART_ERROR(H5Adelete_by_name_invalid_loc_id);
}
@@ -9745,7 +9732,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_name with a NULL object name!\n");
+ printf(" deleted an attribute using H5Adelete_by_name with a NULL object name!\n");
PART_ERROR(H5Adelete_by_name_invalid_obj_name);
}
@@ -9758,7 +9745,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" deleted an attribute using H5Adelete_by_name with an invalid object name of ''!\n");
PART_ERROR(H5Adelete_by_name_invalid_obj_name);
}
@@ -9779,7 +9766,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_name with a NULL attribute name!\n");
+ printf(" deleted an attribute using H5Adelete_by_name with a NULL attribute name!\n");
PART_ERROR(H5Adelete_by_name_invalid_attr_name);
}
@@ -9791,8 +9778,8 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_name with an invalid attribute name of "
- "''!\n");
+ printf(" deleted an attribute using H5Adelete_by_name with an invalid attribute name of "
+ "''!\n");
PART_ERROR(H5Adelete_by_name_invalid_attr_name);
}
@@ -9813,7 +9800,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_name with an invalid LAPL!\n");
+ printf(" deleted an attribute using H5Adelete_by_name with an invalid LAPL!\n");
PART_ERROR(H5Adelete_by_name_invalid_lapl);
}
@@ -9833,7 +9820,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_idx with an invalid loc_id!\n");
+ printf(" deleted an attribute using H5Adelete_by_idx with an invalid loc_id!\n");
PART_ERROR(H5Adelete_by_idx_invalid_loc_id);
}
@@ -9853,7 +9840,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_idx with a NULL object name!\n");
+ printf(" deleted an attribute using H5Adelete_by_idx with a NULL object name!\n");
PART_ERROR(H5Adelete_by_idx_invalid_obj_name);
}
@@ -9865,7 +9852,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" deleted an attribute using H5Adelete_by_idx with an invalid object name of ''!\n");
PART_ERROR(H5Adelete_by_idx_invalid_obj_name);
}
@@ -9886,8 +9873,8 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_idx with invalid index type "
- "H5_INDEX_UNKNOWN!\n");
+ printf(" deleted an attribute using H5Adelete_by_idx with invalid index type "
+ "H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Adelete_by_idx_invalid_index_type);
}
@@ -9899,7 +9886,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" deleted an attribute using H5Adelete_by_idx with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Adelete_by_idx_invalid_index_type);
}
@@ -9920,8 +9907,8 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_idx with invalid index ordering "
- "H5_ITER_UNKNOWN!\n");
+ printf(" deleted an attribute using H5Adelete_by_idx with invalid index ordering "
+ "H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Adelete_by_idx_invalid_index_order);
}
@@ -9933,8 +9920,8 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_idx with invalid index ordering "
- "H5_ITER_N!\n");
+ printf(" deleted an attribute using H5Adelete_by_idx with invalid index ordering "
+ "H5_ITER_N!\n");
PART_ERROR(H5Adelete_by_idx_invalid_index_order);
}
@@ -9954,7 +9941,7 @@ test_delete_attribute_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" deleted an attribute using H5Adelete_by_idx with an invalid LAPL!\n");
+ printf(" deleted an attribute using H5Adelete_by_idx with an invalid LAPL!\n");
PART_ERROR(H5Adelete_by_idx_invalid_lapl);
}
@@ -10018,7 +10005,7 @@ test_attribute_exists(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -10027,20 +10014,20 @@ test_attribute_exists(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_EXISTS_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", ATTRIBUTE_EXISTS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_EXISTS_TEST_GROUP_NAME);
goto error;
}
@@ -10053,7 +10040,7 @@ test_attribute_exists(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
@@ -10067,13 +10054,13 @@ test_attribute_exists(void)
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_EXISTS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
PART_ERROR(H5Aexists);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist\n", ATTRIBUTE_EXISTS_TEST_ATTR_NAME);
+ printf(" attribute '%s' did not exist\n", ATTRIBUTE_EXISTS_TEST_ATTR_NAME);
PART_ERROR(H5Aexists);
}
@@ -10088,13 +10075,13 @@ test_attribute_exists(void)
if ((attr_exists = H5Aexists_by_name(container_group, ATTRIBUTE_EXISTS_TEST_GROUP_NAME,
ATTRIBUTE_EXISTS_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists by name\n");
+ printf(" couldn't determine if attribute exists by name\n");
PART_ERROR(H5Aexists_by_name);
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute '%s' did not exist by name\n", ATTRIBUTE_EXISTS_TEST_ATTR_NAME);
+ printf(" attribute '%s' did not exist by name\n", ATTRIBUTE_EXISTS_TEST_ATTR_NAME);
PART_ERROR(H5Aexists_by_name);
}
@@ -10160,7 +10147,7 @@ test_attribute_exists_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
@@ -10169,21 +10156,20 @@ test_attribute_exists_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -10197,20 +10183,20 @@ test_attribute_exists_invalid_params(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute didn't exists\n");
+ printf(" attribute didn't exists\n");
goto error;
}
@@ -10230,7 +10216,7 @@ test_attribute_exists_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aexists with an invalid loc_id succeeded!\n");
+ printf(" H5Aexists with an invalid loc_id succeeded!\n");
PART_ERROR(H5Aexists_invalid_loc_id);
}
@@ -10250,7 +10236,7 @@ test_attribute_exists_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aexists with a NULL attribute name succeeded!\n");
+ printf(" H5Aexists with a NULL attribute name succeeded!\n");
PART_ERROR(H5Aexists_invalid_attr_name);
}
@@ -10262,7 +10248,7 @@ test_attribute_exists_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aexists with an invalid attribute name of '' succeeded!\n");
+ printf(" H5Aexists with an invalid attribute name of '' succeeded!\n");
PART_ERROR(H5Aexists_invalid_attr_name);
}
@@ -10283,7 +10269,7 @@ test_attribute_exists_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aexists_by_name with an invalid loc_id succeeded!\n");
+ printf(" H5Aexists_by_name with an invalid loc_id succeeded!\n");
PART_ERROR(H5Aexists_by_name_invalid_loc_id);
}
@@ -10304,7 +10290,7 @@ test_attribute_exists_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aexists_by_name with a NULL object name succeeded!\n");
+ printf(" H5Aexists_by_name with a NULL object name succeeded!\n");
PART_ERROR(H5Aexists_by_name_invalid_obj_name);
}
@@ -10317,7 +10303,7 @@ test_attribute_exists_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aexists_by_name with an invalid object name of '' succeeded!\n");
+ printf(" H5Aexists_by_name with an invalid object name of '' succeeded!\n");
PART_ERROR(H5Aexists_by_name_invalid_obj_name);
}
@@ -10338,7 +10324,7 @@ test_attribute_exists_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aexists_by_name with a NULL attribute name succeeded!\n");
+ printf(" H5Aexists_by_name with a NULL attribute name succeeded!\n");
PART_ERROR(H5Aexists_by_name_invalid_attr_name);
}
@@ -10351,7 +10337,7 @@ test_attribute_exists_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aexists_by_name with an invalid attribute name of '' succeeded!\n");
+ printf(" H5Aexists_by_name with an invalid attribute name of '' succeeded!\n");
PART_ERROR(H5Aexists_by_name_invalid_attr_name);
}
@@ -10372,7 +10358,7 @@ test_attribute_exists_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Aexists_by_name with an invalid link access property list succeeded!\n");
+ printf(" H5Aexists_by_name with an invalid link access property list succeeded!\n");
PART_ERROR(H5Aexists_by_name_invalid_lapl);
}
@@ -10439,27 +10425,27 @@ test_attribute_many(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_MANY_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the group '%s'\n", ATTRIBUTE_MANY_GROUP_NAME);
+ printf(" couldn't create the group '%s'\n", ATTRIBUTE_MANY_GROUP_NAME);
goto error;
}
@@ -10475,20 +10461,20 @@ test_attribute_many(void)
if ((attr_id = H5Acreate2(group_id, attrname, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, attrname)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -10547,27 +10533,27 @@ test_attribute_duplicate_id(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or attribute aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_DUPLICATE_ID_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the group '%s'\n", ATTRIBUTE_DUPLICATE_ID_GRP_NAME);
+ printf(" couldn't create the group '%s'\n", ATTRIBUTE_DUPLICATE_ID_GRP_NAME);
goto error;
}
@@ -10580,27 +10566,27 @@ test_attribute_duplicate_id(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DUPLICATE_ID_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_DUPLICATE_ID_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
/* Open the attribute just created and get a second ID */
if ((attr_id2 = H5Aopen(group_id, ATTRIBUTE_DUPLICATE_ID_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" attribute can't be opened for a second time\n");
+ printf(" attribute can't be opened for a second time\n");
goto error;
}
@@ -10663,8 +10649,8 @@ test_get_number_attributes(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, attribute, or object aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, attribute, or object aren't supported with this "
+ "connector\n");
return 0;
}
@@ -10672,20 +10658,20 @@ test_get_number_attributes(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_GET_NUM_ATTRS_TEST_GRP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the group '%s'\n", ATTRIBUTE_GET_NUM_ATTRS_TEST_GRP_NAME);
+ printf(" couldn't create the group '%s'\n", ATTRIBUTE_GET_NUM_ATTRS_TEST_GRP_NAME);
goto error;
}
@@ -10698,20 +10684,20 @@ test_get_number_attributes(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NUM_ATTRS_TEST_ATTR_NAME, attr_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_NUM_ATTRS_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -10726,13 +10712,13 @@ test_get_number_attributes(void)
/* Now get the number of attributes from the group */
if (H5Oget_info3(group_id, &obj_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve group info using H5Oget_info3\n");
+ printf(" couldn't retrieve group info using H5Oget_info3\n");
PART_ERROR(H5Oget_info);
}
if (obj_info.num_attrs != 1) {
H5_FAILED();
- HDprintf(" invalid number of attributes received\n");
+ printf(" invalid number of attributes received\n");
PART_ERROR(H5Oget_info);
}
@@ -10747,13 +10733,13 @@ test_get_number_attributes(void)
if (H5Oget_info_by_name3(container_group, ATTRIBUTE_GET_NUM_ATTRS_TEST_GRP_NAME, &obj_info,
H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve group info using H5Oget_info_by_name3\n");
+ printf(" couldn't retrieve group info using H5Oget_info_by_name3\n");
PART_ERROR(H5Oget_info_by_name);
}
if (obj_info.num_attrs != 1) {
H5_FAILED();
- HDprintf(" invalid number of attributes received\n");
+ printf(" invalid number of attributes received\n");
PART_ERROR(H5Oget_info_by_name);
}
@@ -10768,13 +10754,13 @@ test_get_number_attributes(void)
if (H5Oget_info_by_idx3(container_group, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &obj_info,
H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve group info using H5Oget_info_by_idx3\n");
+ printf(" couldn't retrieve group info using H5Oget_info_by_idx3\n");
PART_ERROR(H5Oget_info_by_idx);
}
if (obj_info.num_attrs != 1) {
H5_FAILED();
- HDprintf(" invalid number of attributes received\n");
+ printf(" invalid number of attributes received\n");
PART_ERROR(H5Oget_info_by_idx);
}
@@ -10845,27 +10831,27 @@ test_attr_shared_dtype(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, attribute, stored datatype, or object aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, attribute, stored datatype, or object aren't "
+ "supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_SHARED_DTYPE_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the group '%s'\n", ATTRIBUTE_SHARED_DTYPE_GROUP_NAME);
+ printf(" couldn't create the group '%s'\n", ATTRIBUTE_SHARED_DTYPE_GROUP_NAME);
goto error;
}
@@ -10879,73 +10865,73 @@ test_attr_shared_dtype(void)
if (H5Tcommit2(group_id, ATTRIBUTE_SHARED_DTYPE_NAME, attr_dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype\n");
+ printf(" couldn't commit datatype\n");
goto error;
}
if (H5Oget_info_by_name3(group_id, ATTRIBUTE_SHARED_DTYPE_NAME, &obj_info, H5O_INFO_ALL, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't retrieve root group info using H5Oget_info_by_name3\n");
+ printf(" couldn't retrieve root group info using H5Oget_info_by_name3\n");
goto error;
}
if (obj_info.rc != 1) {
H5_FAILED();
- HDprintf(" reference count of the named datatype is wrong: %u\n", obj_info.rc);
+ printf(" reference count of the named datatype is wrong: %u\n", obj_info.rc);
goto error;
}
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_SHARED_DTYPE_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute\n");
+ printf(" couldn't create attribute\n");
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_SHARED_DTYPE_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute exists\n");
+ printf(" couldn't determine if attribute exists\n");
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
if (H5Oget_info_by_name3(group_id, ATTRIBUTE_SHARED_DTYPE_NAME, &obj_info, H5O_INFO_ALL, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't retrieve root group info using H5Oget_info_by_name3\n");
+ printf(" couldn't retrieve root group info using H5Oget_info_by_name3\n");
goto error;
}
if (obj_info.rc != 2) {
H5_FAILED();
- HDprintf(" reference count of the named datatype is wrong: %u\n", obj_info.rc);
+ printf(" reference count of the named datatype is wrong: %u\n", obj_info.rc);
goto error;
}
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_SHARED_DTYPE_DSET_NAME, attr_dtype, space_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset\n");
+ printf(" couldn't create dataset\n");
goto error;
}
if (H5Oget_info_by_name3(group_id, ATTRIBUTE_SHARED_DTYPE_NAME, &obj_info, H5O_INFO_ALL, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't retrieve root group info using H5Oget_info_by_name3\n");
+ printf(" couldn't retrieve root group info using H5Oget_info_by_name3\n");
goto error;
}
if (obj_info.rc != 3) {
H5_FAILED();
- HDprintf(" reference count of the named datatype is wrong: %u\n", obj_info.rc);
+ printf(" reference count of the named datatype is wrong: %u\n", obj_info.rc);
goto error;
}
@@ -11016,7 +11002,7 @@ attr_iter_callback1(hid_t location_id, const char *attr_name, const H5A_info_t *
}
if (HDstrncmp(attr_name, expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE)) {
- HDprintf(" attribute name '%s' didn't match expected name '%s'\n", attr_name, expected_attr_name);
+ printf(" attribute name '%s' didn't match expected name '%s'\n", attr_name, expected_attr_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -11043,8 +11029,8 @@ attr_iter_callback1(hid_t location_id, const char *attr_name, const H5A_info_t *
if (ainfo->corder != expected_crt_order) {
H5_FAILED();
- HDprintf(" attribute's creation order value of %lld didn't match expected value of %lld\n",
- (long long)ainfo->corder, (long long)expected_crt_order);
+ printf(" attribute's creation order value of %lld didn't match expected value of %lld\n",
+ (long long)ainfo->corder, (long long)expected_crt_order);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -11073,17 +11059,17 @@ H5_api_attribute_test(void)
size_t i;
int nerrors;
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Attribute Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Attribute Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(attribute_tests); i++) {
nerrors += (*attribute_tests[i])() ? 1 : 0;
}
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/test/API/H5_api_dataset_test.c b/test/API/H5_api_dataset_test.c
index e31ed43..d99516f 100644
--- a/test/API/H5_api_dataset_test.c
+++ b/test/API/H5_api_dataset_test.c
@@ -169,13 +169,13 @@ test_create_dataset_under_root(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -189,7 +189,7 @@ test_create_dataset_under_root(void)
if ((dset_id = H5Dcreate2(file_id, DATASET_CREATE_UNDER_ROOT_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_CREATE_UNDER_ROOT_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_CREATE_UNDER_ROOT_DSET_NAME);
goto error;
}
@@ -238,27 +238,26 @@ test_create_dataset_under_existing_group(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_CREATE_UNDER_EXISTING_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", DATASET_CREATE_UNDER_EXISTING_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", DATASET_CREATE_UNDER_EXISTING_GROUP_NAME);
goto error;
}
@@ -272,7 +271,7 @@ test_create_dataset_under_existing_group(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_UNDER_EXISTING_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_CREATE_UNDER_EXISTING_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_CREATE_UNDER_EXISTING_DSET_NAME);
goto error;
}
@@ -327,8 +326,7 @@ test_create_dataset_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -336,20 +334,20 @@ test_create_dataset_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_CREATE_INVALID_PARAMS_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", DATASET_CREATE_INVALID_PARAMS_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", DATASET_CREATE_INVALID_PARAMS_GROUP_NAME);
goto error;
}
@@ -377,7 +375,7 @@ test_create_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created dataset using H5Dcreate with an invalid loc_id!\n");
+ printf(" created dataset using H5Dcreate with an invalid loc_id!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_invalid_loc_id);
}
@@ -399,7 +397,7 @@ test_create_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created dataset using H5Dcreate with a NULL dataset name!\n");
+ printf(" created dataset using H5Dcreate with a NULL dataset name!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_invalid_dataset_name);
}
@@ -413,7 +411,7 @@ test_create_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created dataset using H5Dcreate with an invalid dataset name of ''!\n");
+ printf(" created dataset using H5Dcreate with an invalid dataset name of ''!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_invalid_dataset_name);
}
@@ -435,7 +433,7 @@ test_create_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created dataset using H5Dcreate with an invalid datatype!\n");
+ printf(" created dataset using H5Dcreate with an invalid datatype!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_invalid_datatype);
}
@@ -457,7 +455,7 @@ test_create_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created dataset using H5Dcreate with an invalid dataspace!\n");
+ printf(" created dataset using H5Dcreate with an invalid dataspace!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_invalid_dataspace);
}
@@ -479,7 +477,7 @@ test_create_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created dataset using H5Dcreate with an invalid LCPL!\n");
+ printf(" created dataset using H5Dcreate with an invalid LCPL!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_invalid_lcpl);
}
@@ -501,7 +499,7 @@ test_create_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created dataset using H5Dcreate with an invalid DCPL!\n");
+ printf(" created dataset using H5Dcreate with an invalid DCPL!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_invalid_dcpl);
}
@@ -523,7 +521,7 @@ test_create_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created dataset using H5Dcreate with an invalid DAPL!\n");
+ printf(" created dataset using H5Dcreate with an invalid DAPL!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_invalid_dapl);
}
@@ -584,27 +582,26 @@ test_create_anonymous_dataset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_CREATE_ANONYMOUS_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", DATASET_CREATE_ANONYMOUS_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", DATASET_CREATE_ANONYMOUS_GROUP_NAME);
goto error;
}
@@ -616,7 +613,7 @@ test_create_anonymous_dataset(void)
if ((dset_id = H5Dcreate_anon(group_id, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create anonymous dataset\n");
+ printf(" couldn't create anonymous dataset\n");
goto error;
}
@@ -672,8 +669,7 @@ test_create_anonymous_dataset_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -681,21 +677,21 @@ test_create_anonymous_dataset_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_CREATE_ANONYMOUS_INVALID_PARAMS_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- DATASET_CREATE_ANONYMOUS_INVALID_PARAMS_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n",
+ DATASET_CREATE_ANONYMOUS_INVALID_PARAMS_GROUP_NAME);
goto error;
}
@@ -722,7 +718,7 @@ test_create_anonymous_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created anonymous dataset using an invalid loc_id!\n");
+ printf(" created anonymous dataset using an invalid loc_id!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_anon_invalid_loc_id);
}
@@ -743,7 +739,7 @@ test_create_anonymous_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created anonymous dataset using an invalid dataset datatype!\n");
+ printf(" created anonymous dataset using an invalid dataset datatype!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_anon_invalid_datatype);
}
@@ -764,7 +760,7 @@ test_create_anonymous_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created anonymous dataset using an invalid dataset dataspace!\n");
+ printf(" created anonymous dataset using an invalid dataset dataspace!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_anon_invalid_dataspace);
}
@@ -785,7 +781,7 @@ test_create_anonymous_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created anonymous dataset using an invalid DCPL!\n");
+ printf(" created anonymous dataset using an invalid DCPL!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_anon_invalid_dcpl);
}
@@ -806,7 +802,7 @@ test_create_anonymous_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" created anonymous dataset using an invalid DAPL!\n");
+ printf(" created anonymous dataset using an invalid DAPL!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dcreate_anon_invalid_dapl);
}
@@ -868,28 +864,27 @@ test_create_dataset_null_space(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_CREATE_NULL_DATASPACE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- DATASET_CREATE_NULL_DATASPACE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ DATASET_CREATE_NULL_DATASPACE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -902,7 +897,7 @@ test_create_dataset_null_space(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME);
goto error;
}
@@ -911,7 +906,7 @@ test_create_dataset_null_space(void)
if ((dset_id = H5Dopen2(group_id, DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME);
goto error;
}
@@ -966,28 +961,27 @@ test_create_dataset_scalar_space(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_CREATE_SCALAR_DATASPACE_TEST_SUBGROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- DATASET_CREATE_SCALAR_DATASPACE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ DATASET_CREATE_SCALAR_DATASPACE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -1000,7 +994,7 @@ test_create_dataset_scalar_space(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME);
goto error;
}
@@ -1009,7 +1003,7 @@ test_create_dataset_scalar_space(void)
if ((dset_id = H5Dopen2(group_id, DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME);
goto error;
}
@@ -1066,27 +1060,26 @@ test_create_zero_dim_dset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ZERO_DIM_DSET_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", ZERO_DIM_DSET_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", ZERO_DIM_DSET_TEST_GROUP_NAME);
goto error;
}
@@ -1096,27 +1089,27 @@ test_create_zero_dim_dset(void)
if ((dset_id = H5Dcreate2(group_id, ZERO_DIM_DSET_TEST_DSET_NAME, H5T_NATIVE_INT, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create 0-sized dataset\n");
+ printf(" failed to create 0-sized dataset\n");
goto error;
}
if (H5Sselect_none(fspace_id) < 0) {
H5_FAILED();
- HDprintf(" failed to set none selection in dataset's file dataspace\n");
+ printf(" failed to set none selection in dataset's file dataspace\n");
goto error;
}
/* Attempt to write 0 elements to dataset */
if (H5Dwrite(dset_id, H5T_NATIVE_INT, fspace_id, fspace_id, H5P_DEFAULT, data) < 0) {
H5_FAILED();
- HDprintf(" failed to write 0 elements to 0-sized dataset\n");
+ printf(" failed to write 0 elements to 0-sized dataset\n");
goto error;
}
/* Attempt to read 0 elements from dataset */
if (H5Dread(dset_id, H5T_NATIVE_INT, fspace_id, fspace_id, H5P_DEFAULT, data) < 0) {
H5_FAILED();
- HDprintf(" failed to read 0 elements from 0-sized dataset\n");
+ printf(" failed to read 0 elements from 0-sized dataset\n");
goto error;
}
@@ -1168,27 +1161,26 @@ test_create_dataset_random_shapes(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SHAPE_TEST_SUBGROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group\n");
+ printf(" couldn't create container sub-group\n");
goto error;
}
@@ -1201,7 +1193,7 @@ test_create_dataset_random_shapes(void)
if ((space_id = generate_random_dataspace(ndims, NULL, NULL, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataspace\n");
+ printf(" couldn't create dataspace\n");
goto error;
}
@@ -1210,7 +1202,7 @@ test_create_dataset_random_shapes(void)
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset\n");
+ printf(" couldn't create dataset\n");
goto error;
}
@@ -1273,28 +1265,26 @@ test_create_dataset_predefined_types(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_PREDEFINED_TYPE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create sub-container group '%s'\n",
- DATASET_PREDEFINED_TYPE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create sub-container group '%s'\n", DATASET_PREDEFINED_TYPE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -1310,7 +1300,7 @@ test_create_dataset_predefined_types(void)
if ((dset_id = H5Dcreate2(group_id, name, predefined_type_test_table[i], fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", name);
+ printf(" couldn't create dataset '%s'\n", name);
goto error;
}
@@ -1321,7 +1311,7 @@ test_create_dataset_predefined_types(void)
if ((dset_id = H5Dopen2(group_id, name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", name);
+ printf(" failed to open dataset '%s'\n", name);
goto error;
}
@@ -1373,8 +1363,7 @@ test_create_dataset_string_types(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -1382,32 +1371,32 @@ test_create_dataset_string_types(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_STRING_TYPE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_STRING_TYPE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_STRING_TYPE_TEST_SUBGROUP_NAME);
goto error;
}
if ((type_id_fixed = H5Tcreate(H5T_STRING, DATASET_STRING_TYPE_TEST_STRING_LENGTH)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create fixed-length string type\n");
+ printf(" couldn't create fixed-length string type\n");
goto error;
}
if ((type_id_variable = H5Tcreate(H5T_STRING, H5T_VARIABLE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create variable-length string type\n");
+ printf(" couldn't create variable-length string type\n");
goto error;
}
@@ -1425,8 +1414,8 @@ test_create_dataset_string_types(void)
if ((dset_id_fixed = H5Dcreate2(group_id, DATASET_STRING_TYPE_TEST_DSET_NAME1, type_id_fixed,
fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create fixed-length string dataset '%s'\n",
- DATASET_STRING_TYPE_TEST_DSET_NAME1);
+ printf(" couldn't create fixed-length string dataset '%s'\n",
+ DATASET_STRING_TYPE_TEST_DSET_NAME1);
PART_ERROR(H5Dcreate_fixed_string_type);
}
@@ -1441,7 +1430,7 @@ test_create_dataset_string_types(void)
if ((dset_id_fixed = H5Dopen2(group_id, DATASET_STRING_TYPE_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", DATASET_STRING_TYPE_TEST_DSET_NAME1);
+ printf(" failed to open dataset '%s'\n", DATASET_STRING_TYPE_TEST_DSET_NAME1);
PART_ERROR(H5Dcreate_fixed_string_type);
}
@@ -1457,8 +1446,8 @@ test_create_dataset_string_types(void)
H5Dcreate2(group_id, DATASET_STRING_TYPE_TEST_DSET_NAME2, type_id_variable, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create variable-length string dataset '%s'\n",
- DATASET_STRING_TYPE_TEST_DSET_NAME2);
+ printf(" couldn't create variable-length string dataset '%s'\n",
+ DATASET_STRING_TYPE_TEST_DSET_NAME2);
PART_ERROR(H5Dcreate_variable_string_type);
}
@@ -1474,7 +1463,7 @@ test_create_dataset_string_types(void)
if ((dset_id_variable = H5Dopen2(group_id, DATASET_STRING_TYPE_TEST_DSET_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", DATASET_STRING_TYPE_TEST_DSET_NAME2);
+ printf(" failed to open dataset '%s'\n", DATASET_STRING_TYPE_TEST_DSET_NAME2);
PART_ERROR(H5Dcreate_variable_string_type);
}
@@ -1546,8 +1535,7 @@ test_create_dataset_compound_types(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -1561,20 +1549,20 @@ test_create_dataset_compound_types(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_COMPOUND_TYPE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_COMPOUND_TYPE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_COMPOUND_TYPE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -1601,7 +1589,7 @@ test_create_dataset_compound_types(void)
if ((compound_type = H5Tcreate(H5T_COMPOUND, 1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create compound datatype\n");
+ printf(" couldn't create compound datatype\n");
goto error;
}
@@ -1614,13 +1602,13 @@ test_create_dataset_compound_types(void)
if ((type_pool[j] = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create compound datatype member %zu\n", j);
+ printf(" couldn't create compound datatype member %zu\n", j);
goto error;
}
if (!(member_size = H5Tget_size(type_pool[j]))) {
H5_FAILED();
- HDprintf(" couldn't get compound member %zu size\n", j);
+ printf(" couldn't get compound member %zu size\n", j);
goto error;
}
@@ -1643,7 +1631,7 @@ test_create_dataset_compound_types(void)
if ((dset_id = H5Dcreate2(group_id, dset_name, compound_type, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", dset_name);
+ printf(" couldn't create dataset '%s'\n", dset_name);
goto error;
}
@@ -1652,7 +1640,7 @@ test_create_dataset_compound_types(void)
if ((dset_id = H5Dopen2(group_id, dset_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", dset_name);
+ printf(" failed to open dataset '%s'\n", dset_name);
goto error;
}
@@ -1717,33 +1705,32 @@ test_create_dataset_enum_types(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_ENUM_TYPE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_ENUM_TYPE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_ENUM_TYPE_TEST_SUBGROUP_NAME);
goto error;
}
if ((enum_native = H5Tcreate(H5T_ENUM, sizeof(int))) < 0) {
H5_FAILED();
- HDprintf(" couldn't create native enum type\n");
+ printf(" couldn't create native enum type\n");
goto error;
}
@@ -1753,7 +1740,7 @@ test_create_dataset_enum_types(void)
if ((enum_non_native = H5Tenum_create(H5T_STD_U32LE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create non-native enum type\n");
+ printf(" couldn't create non-native enum type\n");
goto error;
}
@@ -1772,14 +1759,14 @@ test_create_dataset_enum_types(void)
if ((dset_id_native = H5Dcreate2(group_id, DATASET_ENUM_TYPE_TEST_DSET_NAME1, enum_native, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create native enum dataset '%s'\n", DATASET_ENUM_TYPE_TEST_DSET_NAME1);
+ printf(" couldn't create native enum dataset '%s'\n", DATASET_ENUM_TYPE_TEST_DSET_NAME1);
goto error;
}
if ((dset_id_non_native = H5Dcreate2(group_id, DATASET_ENUM_TYPE_TEST_DSET_NAME2, enum_non_native,
fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create non-native enum dataset '%s'\n", DATASET_ENUM_TYPE_TEST_DSET_NAME2);
+ printf(" couldn't create non-native enum dataset '%s'\n", DATASET_ENUM_TYPE_TEST_DSET_NAME2);
goto error;
}
@@ -1790,13 +1777,13 @@ test_create_dataset_enum_types(void)
if ((dset_id_native = H5Dopen2(group_id, DATASET_ENUM_TYPE_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", DATASET_ENUM_TYPE_TEST_DSET_NAME1);
+ printf(" failed to open dataset '%s'\n", DATASET_ENUM_TYPE_TEST_DSET_NAME1);
goto error;
}
if ((dset_id_non_native = H5Dopen2(group_id, DATASET_ENUM_TYPE_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", DATASET_ENUM_TYPE_TEST_DSET_NAME2);
+ printf(" failed to open dataset '%s'\n", DATASET_ENUM_TYPE_TEST_DSET_NAME2);
goto error;
}
@@ -1865,27 +1852,26 @@ test_create_dataset_array_types(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_ARRAY_TYPE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_ARRAY_TYPE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_ARRAY_TYPE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -1899,7 +1885,7 @@ test_create_dataset_array_types(void)
if ((array_type_id1 = H5Tarray_create2(array_base_type_id1, DATASET_ARRAY_TYPE_TEST_RANK1, array_dims1)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create first array type\n");
+ printf(" couldn't create first array type\n");
goto error;
}
@@ -1912,7 +1898,7 @@ test_create_dataset_array_types(void)
if ((array_type_id2 = H5Tarray_create2(array_base_type_id2, DATASET_ARRAY_TYPE_TEST_RANK2, array_dims2)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create second array type\n");
+ printf(" couldn't create second array type\n");
goto error;
}
@@ -1926,13 +1912,13 @@ test_create_dataset_array_types(void)
if ((nested_type_id = H5Tarray_create2(array_base_type_id3, DATASET_ARRAY_TYPE_TEST_RANK3, array_dims3)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create nested array base type\n");
+ printf(" couldn't create nested array base type\n");
goto error;
}
if ((array_type_id3 = H5Tarray_create2(nested_type_id, DATASET_ARRAY_TYPE_TEST_RANK3, array_dims3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create nested array type\n");
+ printf(" couldn't create nested array type\n");
goto error;
}
@@ -1942,21 +1928,21 @@ test_create_dataset_array_types(void)
if ((dset_id1 = H5Dcreate2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME1, array_type_id1, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create array type dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME1);
+ printf(" couldn't create array type dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME1);
goto error;
}
if ((dset_id2 = H5Dcreate2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME2, array_type_id2, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create array type dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME2);
+ printf(" couldn't create array type dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME2);
goto error;
}
if ((dset_id3 = H5Dcreate2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME3, array_type_id3, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create nested array type dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME3);
+ printf(" couldn't create nested array type dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME3);
goto error;
}
@@ -1969,19 +1955,19 @@ test_create_dataset_array_types(void)
if ((dset_id1 = H5Dopen2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME1);
+ printf(" failed to open dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME1);
goto error;
}
if ((dset_id2 = H5Dopen2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME2);
+ printf(" failed to open dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME2);
goto error;
}
if ((dset_id3 = H5Dopen2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME3);
+ printf(" failed to open dataset '%s'\n", DATASET_ARRAY_TYPE_TEST_DSET_NAME3);
goto error;
}
@@ -2063,8 +2049,8 @@ test_create_dataset_creation_properties(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or dataset "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset "
+ "aren't supported with this connector\n");
return 0;
}
@@ -2072,20 +2058,20 @@ test_create_dataset_creation_properties(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_CREATION_PROPERTIES_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", DATASET_CREATION_PROPERTIES_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", DATASET_CREATION_PROPERTIES_TEST_GROUP_NAME);
goto error;
}
@@ -2119,7 +2105,7 @@ test_create_dataset_creation_properties(void)
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DCPL\n");
+ printf(" couldn't create DCPL\n");
PART_ERROR(DCPL_alloc_time_test);
}
@@ -2128,7 +2114,7 @@ test_create_dataset_creation_properties(void)
if (H5Pset_alloc_time(dcpl_id, alloc_times[i]) < 0) {
H5_FAILED();
- HDprintf(" couldn't set alloc time property value\n");
+ printf(" couldn't set alloc time property value\n");
PART_ERROR(DCPL_alloc_time_test);
}
@@ -2137,7 +2123,7 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", name);
+ printf(" couldn't create dataset '%s'\n", name);
PART_ERROR(DCPL_alloc_time_test);
}
@@ -2152,7 +2138,7 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dopen2(group_id, name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", name);
+ printf(" couldn't open dataset '%s'\n", name);
PART_ERROR(DCPL_alloc_time_test);
}
@@ -2189,13 +2175,13 @@ test_create_dataset_creation_properties(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking is not supported by this VOL connector\n");
+ printf(" creation order tracking is not supported by this VOL connector\n");
PART_EMPTY(DCPL_attr_crt_order_test);
}
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DCPL\n");
+ printf(" couldn't create DCPL\n");
PART_ERROR(DCPL_attr_crt_order_test);
}
@@ -2204,7 +2190,7 @@ test_create_dataset_creation_properties(void)
if (H5Pset_attr_creation_order(dcpl_id, creation_orders[i]) < 0) {
H5_FAILED();
- HDprintf(" couldn't set attribute creation order property\n");
+ printf(" couldn't set attribute creation order property\n");
PART_ERROR(DCPL_attr_crt_order_test);
}
@@ -2213,7 +2199,7 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", name);
+ printf(" couldn't create dataset '%s'\n", name);
PART_ERROR(DCPL_attr_crt_order_test);
}
@@ -2228,7 +2214,7 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dopen2(group_id, name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", name);
+ printf(" couldn't open dataset '%s'\n", name);
PART_ERROR(DCPL_attr_crt_order_test);
}
@@ -2262,22 +2248,22 @@ test_create_dataset_creation_properties(void)
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DCPL\n");
+ printf(" couldn't create DCPL\n");
PART_ERROR(DCPL_attr_phase_change_test);
}
if (H5Pset_attr_phase_change(dcpl_id, DATASET_CREATION_PROPERTIES_TEST_MAX_COMPACT,
DATASET_CREATION_PROPERTIES_TEST_MIN_DENSE) < 0) {
H5_FAILED();
- HDprintf(" couldn't set attribute phase change property\n");
+ printf(" couldn't set attribute phase change property\n");
PART_ERROR(DCPL_attr_phase_change_test);
}
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATION_PROPERTIES_TEST_PHASE_CHANGE_DSET_NAME,
dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_CREATION_PROPERTIES_TEST_PHASE_CHANGE_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_CREATION_PROPERTIES_TEST_PHASE_CHANGE_DSET_NAME);
PART_ERROR(DCPL_attr_phase_change_test);
}
@@ -2293,8 +2279,8 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dopen2(group_id, DATASET_CREATION_PROPERTIES_TEST_PHASE_CHANGE_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_CREATION_PROPERTIES_TEST_PHASE_CHANGE_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_CREATION_PROPERTIES_TEST_PHASE_CHANGE_DSET_NAME);
PART_ERROR(DCPL_attr_phase_change_test);
}
@@ -2328,7 +2314,7 @@ test_create_dataset_creation_properties(void)
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DCPL\n");
+ printf(" couldn't create DCPL\n");
PART_ERROR(DCPL_fill_time_property_test);
}
@@ -2337,7 +2323,7 @@ test_create_dataset_creation_properties(void)
if (H5Pset_fill_time(dcpl_id, fill_times[i]) < 0) {
H5_FAILED();
- HDprintf(" couldn't set dataset fill time property\n");
+ printf(" couldn't set dataset fill time property\n");
PART_ERROR(DCPL_fill_time_property_test);
}
@@ -2346,7 +2332,7 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", name);
+ printf(" couldn't create dataset '%s'\n", name);
PART_ERROR(DCPL_fill_time_property_test);
}
@@ -2361,7 +2347,7 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dopen2(group_id, name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", name);
+ printf(" couldn't open dataset '%s'\n", name);
PART_ERROR(DCPL_fill_time_property_test);
}
@@ -2397,46 +2383,46 @@ test_create_dataset_creation_properties(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILTERS)) {
SKIPPED();
- HDprintf(" dataset filters are not supported by this VOL connector\n");
+ printf(" dataset filters are not supported by this VOL connector\n");
PART_EMPTY(DCPL_filters_test);
}
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DCPL\n");
+ printf(" couldn't create DCPL\n");
PART_ERROR(DCPL_filters_test);
}
if (H5Pset_chunk(dcpl_id, DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" couldn't set chunking on DCPL\n");
+ printf(" couldn't set chunking on DCPL\n");
PART_ERROR(DCPL_filters_test);
}
/* Set all of the available filters on the DCPL */
if (H5Pset_deflate(dcpl_id, 7) < 0) {
H5_FAILED();
- HDprintf(" couldn't set deflate filter on DCPL\n");
+ printf(" couldn't set deflate filter on DCPL\n");
PART_ERROR(DCPL_filters_test);
}
if (H5Pset_shuffle(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't set shuffle filter on DCPL\n");
+ printf(" couldn't set shuffle filter on DCPL\n");
PART_ERROR(DCPL_filters_test);
}
if (H5Pset_fletcher32(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't set fletcher32 filter on DCPL\n");
+ printf(" couldn't set fletcher32 filter on DCPL\n");
PART_ERROR(DCPL_filters_test);
}
if (H5Pset_nbit(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't set nbit filter on DCPL\n");
+ printf(" couldn't set nbit filter on DCPL\n");
PART_ERROR(DCPL_filters_test);
}
if (H5Pset_scaleoffset(dcpl_id, H5Z_SO_FLOAT_ESCALE, 2) < 0) {
H5_FAILED();
- HDprintf(" couldn't set scaleoffset filter on DCPL\n");
+ printf(" couldn't set scaleoffset filter on DCPL\n");
PART_ERROR(DCPL_filters_test);
}
@@ -2446,8 +2432,8 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATION_PROPERTIES_TEST_FILTERS_DSET_NAME,
H5T_NATIVE_INT, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_CREATION_PROPERTIES_TEST_FILTERS_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_CREATION_PROPERTIES_TEST_FILTERS_DSET_NAME);
PART_ERROR(DCPL_filters_test);
}
@@ -2463,8 +2449,8 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dopen2(group_id, DATASET_CREATION_PROPERTIES_TEST_FILTERS_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_CREATION_PROPERTIES_TEST_FILTERS_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_CREATION_PROPERTIES_TEST_FILTERS_DSET_NAME);
PART_ERROR(DCPL_filters_test);
}
@@ -2499,7 +2485,7 @@ test_create_dataset_creation_properties(void)
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DCPL\n");
+ printf(" couldn't create DCPL\n");
PART_ERROR(DCPL_storage_layout_test);
}
@@ -2508,7 +2494,7 @@ test_create_dataset_creation_properties(void)
if (H5Pset_layout(dcpl_id, layouts[i]) < 0) {
H5_FAILED();
- HDprintf(" couldn't set storage layout property\n");
+ printf(" couldn't set storage layout property\n");
PART_ERROR(DCPL_storage_layout_test);
}
@@ -2522,7 +2508,7 @@ test_create_dataset_creation_properties(void)
if (H5Pset_chunk(dcpl_id, DATASET_CREATION_PROPERTIES_TEST_CHUNK_DIM_RANK,
local_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" couldn't set chunk dimensionality\n");
+ printf(" couldn't set chunk dimensionality\n");
PART_ERROR(DCPL_storage_layout_test);
}
}
@@ -2534,7 +2520,7 @@ test_create_dataset_creation_properties(void)
(H5D_COMPACT == layouts[i]) ? compact_fspace_id : fspace_id, H5P_DEFAULT,
dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", name);
+ printf(" couldn't create dataset '%s'\n", name);
PART_ERROR(DCPL_storage_layout_test);
}
@@ -2549,7 +2535,7 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dopen2(group_id, name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", name);
+ printf(" couldn't open dataset '%s'\n", name);
PART_ERROR(DCPL_storage_layout_test);
}
@@ -2583,27 +2569,27 @@ test_create_dataset_creation_properties(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_TRACK_TIMES)) {
SKIPPED();
- HDprintf(" object time tracking is not supported by this VOL connector\n");
+ printf(" object time tracking is not supported by this VOL connector\n");
PART_EMPTY(DCPL_track_obj_times_test);
}
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DCPL\n");
+ printf(" couldn't create DCPL\n");
PART_ERROR(DCPL_track_obj_times_test);
}
if (H5Pset_obj_track_times(dcpl_id, true) < 0) {
H5_FAILED();
- HDprintf(" couldn't set object time tracking property\n");
+ printf(" couldn't set object time tracking property\n");
PART_ERROR(DCPL_track_obj_times_test);
}
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_YES_DSET_NAME,
dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_YES_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_YES_DSET_NAME);
PART_ERROR(DCPL_track_obj_times_test);
}
@@ -2619,8 +2605,8 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dopen2(group_id, DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_YES_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_YES_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_YES_DSET_NAME);
PART_ERROR(DCPL_track_obj_times_test);
}
@@ -2635,15 +2621,15 @@ test_create_dataset_creation_properties(void)
if (H5Pset_obj_track_times(dcpl_id, false) < 0) {
H5_FAILED();
- HDprintf(" couldn't set object time tracking property\n");
+ printf(" couldn't set object time tracking property\n");
PART_ERROR(DCPL_track_obj_times_test);
}
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_NO_DSET_NAME,
dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_NO_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_NO_DSET_NAME);
PART_ERROR(DCPL_track_obj_times_test);
}
@@ -2659,8 +2645,8 @@ test_create_dataset_creation_properties(void)
if ((dset_id = H5Dopen2(group_id, DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_NO_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_NO_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_CREATION_PROPERTIES_TEST_TRACK_TIMES_NO_DSET_NAME);
PART_ERROR(DCPL_track_obj_times_test);
}
@@ -2746,58 +2732,57 @@ test_create_many_dataset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_MANY_CREATE_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", DATASET_MANY_CREATE_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", DATASET_MANY_CREATE_GROUP_NAME);
goto error;
}
if ((dataspace_id = H5Screate(H5S_SCALAR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create scalar data space\n");
+ printf(" couldn't create scalar data space\n");
goto error;
}
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < DATASET_NUMB; i++) {
- HDprintf("\r %u/%u", i + 1, DATASET_NUMB);
+ printf("\r %u/%u", i + 1, DATASET_NUMB);
sprintf(dset_name, "dset_%02u", i);
data = i % 256;
if ((dset_id = H5Dcreate2(group_id, dset_name, H5T_NATIVE_UCHAR, dataspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", dset_name);
+ printf(" couldn't create dataset '%s'\n", dset_name);
goto error;
}
if (H5Dwrite(dset_id, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, &data) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", dset_name);
+ printf(" couldn't write to dataset '%s'\n", dset_name);
goto error;
}
if (H5Dclose(dset_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close dataset '%s'\n", dset_name);
+ printf(" couldn't close dataset '%s'\n", dset_name);
goto error;
}
}
@@ -2862,8 +2847,7 @@ test_open_dataset_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -2871,20 +2855,20 @@ test_open_dataset_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_OPEN_INVALID_PARAMS_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", DATASET_OPEN_INVALID_PARAMS_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", DATASET_OPEN_INVALID_PARAMS_GROUP_NAME);
goto error;
}
@@ -2898,7 +2882,7 @@ test_open_dataset_invalid_params(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_OPEN_INVALID_PARAMS_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_OPEN_INVALID_PARAMS_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_OPEN_INVALID_PARAMS_DSET_NAME);
goto error;
}
@@ -2921,7 +2905,7 @@ test_open_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" opened dataset using H5Dopen2 with an invalid loc_id!\n");
+ printf(" opened dataset using H5Dopen2 with an invalid loc_id!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dopen_invalid_loc_id);
}
@@ -2942,7 +2926,7 @@ test_open_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" opened dataset using H5Dopen2 with a NULL dataset name!\n");
+ printf(" opened dataset using H5Dopen2 with a NULL dataset name!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dopen_invalid_dataset_name);
}
@@ -2955,7 +2939,7 @@ test_open_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" opened dataset using H5Dopen2 with an invalid dataset name of ''!\n");
+ printf(" opened dataset using H5Dopen2 with an invalid dataset name of ''!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dopen_invalid_dataset_name);
}
@@ -2976,7 +2960,7 @@ test_open_dataset_invalid_params(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" opened dataset using H5Dopen2 with an invalid DAPL!\n");
+ printf(" opened dataset using H5Dopen2 with an invalid DAPL!\n");
H5Dclose(dset_id);
PART_ERROR(H5Dopen_invalid_dapl);
}
@@ -3034,13 +3018,13 @@ test_close_dataset_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -3052,7 +3036,7 @@ test_close_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Dclose succeeded with an invalid dataset ID!\n");
+ printf(" H5Dclose succeeded with an invalid dataset ID!\n");
goto error;
}
@@ -3098,8 +3082,7 @@ test_get_dataset_space_and_type(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -3107,20 +3090,20 @@ test_get_dataset_space_and_type(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_GET_SPACE_TYPE_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", DATASET_GET_SPACE_TYPE_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", DATASET_GET_SPACE_TYPE_TEST_GROUP_NAME);
goto error;
}
@@ -3134,7 +3117,7 @@ test_get_dataset_space_and_type(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_GET_SPACE_TYPE_TEST_DSET_NAME, dset_dtype, dset_space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_GET_SPACE_TYPE_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_GET_SPACE_TYPE_TEST_DSET_NAME);
goto error;
}
@@ -3149,7 +3132,7 @@ test_get_dataset_space_and_type(void)
if ((tmp_type_id = H5Dget_type(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve dataset's datatype\n");
+ printf(" couldn't retrieve dataset's datatype\n");
PART_ERROR(H5Dget_type);
}
@@ -3158,13 +3141,13 @@ test_get_dataset_space_and_type(void)
if (types_equal < 0) {
H5_FAILED();
- HDprintf(" datatype was invalid\n");
+ printf(" datatype was invalid\n");
PART_ERROR(H5Dget_type);
}
if (!types_equal) {
H5_FAILED();
- HDprintf(" dataset's datatype did not match\n");
+ printf(" dataset's datatype did not match\n");
PART_ERROR(H5Dget_type);
}
}
@@ -3179,7 +3162,7 @@ test_get_dataset_space_and_type(void)
if ((tmp_space_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve dataset's dataspace\n");
+ printf(" couldn't retrieve dataset's dataspace\n");
PART_ERROR(H5Dget_space);
}
@@ -3188,14 +3171,14 @@ test_get_dataset_space_and_type(void)
if (H5Sget_simple_extent_dims(tmp_space_id, space_dims, NULL) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve dataspace dimensions\n");
+ printf(" couldn't retrieve dataspace dimensions\n");
PART_ERROR(H5Dget_space);
}
for (i = 0; i < DATASET_GET_SPACE_TYPE_TEST_SPACE_RANK; i++)
if (space_dims[i] != dset_dims[i]) {
H5_FAILED();
- HDprintf(" dataset's dataspace dims didn't match\n");
+ printf(" dataset's dataspace dims didn't match\n");
PART_ERROR(H5Dget_space);
}
}
@@ -3238,13 +3221,13 @@ test_get_dataset_space_and_type(void)
if ((dset_id = H5Dopen2(group_id, DATASET_GET_SPACE_TYPE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_GET_SPACE_TYPE_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_GET_SPACE_TYPE_TEST_DSET_NAME);
PART_ERROR(H5Dget_type_reopened);
}
if ((tmp_type_id = H5Dget_type(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve dataset's datatype\n");
+ printf(" couldn't retrieve dataset's datatype\n");
PART_ERROR(H5Dget_type_reopened);
}
@@ -3253,13 +3236,13 @@ test_get_dataset_space_and_type(void)
if (types_equal < 0) {
H5_FAILED();
- HDprintf(" datatype was invalid\n");
+ printf(" datatype was invalid\n");
PART_ERROR(H5Dget_type_reopened);
}
if (!types_equal) {
H5_FAILED();
- HDprintf(" dataset's datatype did not match\n");
+ printf(" dataset's datatype did not match\n");
PART_ERROR(H5Dget_type_reopened);
}
}
@@ -3283,13 +3266,13 @@ test_get_dataset_space_and_type(void)
if ((dset_id = H5Dopen2(group_id, DATASET_GET_SPACE_TYPE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_GET_SPACE_TYPE_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_GET_SPACE_TYPE_TEST_DSET_NAME);
PART_ERROR(H5Dget_space_reopened);
}
if ((tmp_space_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve dataset's dataspace\n");
+ printf(" couldn't retrieve dataset's dataspace\n");
PART_ERROR(H5Dget_space_reopened);
}
@@ -3298,14 +3281,14 @@ test_get_dataset_space_and_type(void)
if (H5Sget_simple_extent_dims(tmp_space_id, space_dims, NULL) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve dataspace dimensions\n");
+ printf(" couldn't retrieve dataspace dimensions\n");
PART_ERROR(H5Dget_space_reopened);
}
for (i = 0; i < DATASET_GET_SPACE_TYPE_TEST_SPACE_RANK; i++) {
if (space_dims[i] != dset_dims[i]) {
H5_FAILED();
- HDprintf(" dataset's dataspace dims didn't match!\n");
+ printf(" dataset's dataspace dims didn't match!\n");
PART_ERROR(H5Dget_space_reopened);
}
}
@@ -3387,8 +3370,7 @@ test_get_dataset_space_and_type_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -3396,21 +3378,21 @@ test_get_dataset_space_and_type_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", ATTRIBUTE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n",
+ DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -3424,7 +3406,7 @@ test_get_dataset_space_and_type_invalid_params(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype,
dset_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_DSET_NAME);
goto error;
}
@@ -3444,7 +3426,7 @@ test_get_dataset_space_and_type_invalid_params(void)
if (tmp_type_id >= 0) {
H5_FAILED();
- HDprintf(" retrieved copy of dataset's datatype using an invalid dataset ID!\n");
+ printf(" retrieved copy of dataset's datatype using an invalid dataset ID!\n");
PART_ERROR(H5Dget_type_invalid_dset_id);
}
@@ -3464,7 +3446,7 @@ test_get_dataset_space_and_type_invalid_params(void)
if (tmp_space_id >= 0) {
H5_FAILED();
- HDprintf(" retrieved copy of dataset's dataspace using an invalid dataset ID!\n");
+ printf(" retrieved copy of dataset's dataspace using an invalid dataset ID!\n");
PART_ERROR(H5Dget_space_invalid_dset_id);
}
@@ -3571,8 +3553,8 @@ test_dataset_property_lists(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
@@ -3580,27 +3562,27 @@ test_dataset_property_lists(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
/** for DAOS VOL, this test is problematic since auto chunking can be selected, so skip for now */
if (H5VLget_connector_name(file_id, vol_name, 5) < 0) {
H5_FAILED();
- HDprintf(" couldn't get VOL connector name\n");
+ printf(" couldn't get VOL connector name\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_PROPERTY_LIST_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_PROPERTY_LIST_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_PROPERTY_LIST_TEST_SUBGROUP_NAME);
goto error;
}
@@ -3621,27 +3603,27 @@ test_dataset_property_lists(void)
if ((dcpl_id1 = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DCPL\n");
+ printf(" couldn't create DCPL\n");
goto error;
}
if (H5Pset_chunk(dcpl_id1, DATASET_PROPERTY_LIST_TEST_SPACE_RANK, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" couldn't set DCPL property\n");
+ printf(" couldn't set DCPL property\n");
goto error;
}
if ((dset_id1 = H5Dcreate2(group_id, DATASET_PROPERTY_LIST_TEST_DSET_NAME1, dset_dtype1, space_id,
H5P_DEFAULT, dcpl_id1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_PROPERTY_LIST_TEST_DSET_NAME1);
+ printf(" couldn't create dataset '%s'\n", DATASET_PROPERTY_LIST_TEST_DSET_NAME1);
goto error;
}
if ((dset_id2 = H5Dcreate2(group_id, DATASET_PROPERTY_LIST_TEST_DSET_NAME2, dset_dtype2, space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_PROPERTY_LIST_TEST_DSET_NAME2);
+ printf(" couldn't create dataset '%s'\n", DATASET_PROPERTY_LIST_TEST_DSET_NAME2);
goto error;
}
@@ -3660,13 +3642,13 @@ test_dataset_property_lists(void)
* does not */
if ((dcpl_id1 = H5Dget_create_plist(dset_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Dget_create_plist);
}
if ((dcpl_id2 = H5Dget_create_plist(dset_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Dget_create_plist);
}
@@ -3674,18 +3656,18 @@ test_dataset_property_lists(void)
{
hsize_t tmp_chunk_dims[DATASET_PROPERTY_LIST_TEST_SPACE_RANK];
- HDmemset(tmp_chunk_dims, 0, sizeof(tmp_chunk_dims));
+ memset(tmp_chunk_dims, 0, sizeof(tmp_chunk_dims));
if (H5Pget_chunk(dcpl_id1, DATASET_PROPERTY_LIST_TEST_SPACE_RANK, tmp_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" couldn't get DCPL property value\n");
+ printf(" couldn't get DCPL property value\n");
PART_ERROR(H5Dget_create_plist);
}
for (i = 0; i < DATASET_PROPERTY_LIST_TEST_SPACE_RANK; i++)
if (tmp_chunk_dims[i] != chunk_dims[i]) {
H5_FAILED();
- HDprintf(" DCPL property values were incorrect\n");
+ printf(" DCPL property values were incorrect\n");
PART_ERROR(H5Dget_create_plist);
}
@@ -3698,8 +3680,8 @@ test_dataset_property_lists(void)
/* DAOS VOL can auto chunk, so don't fail */
if (err_ret >= 0 && strcmp(vol_name, "daos") != 0) {
H5_FAILED();
- HDprintf(" property list 2 shouldn't have had chunk dimensionality set (not a chunked "
- "layout)\n");
+ printf(" property list 2 shouldn't have had chunk dimensionality set (not a chunked "
+ "layout)\n");
PART_ERROR(H5Dget_create_plist);
}
}
@@ -3714,27 +3696,27 @@ test_dataset_property_lists(void)
if ((dapl_id1 = H5Pcreate(H5P_DATASET_ACCESS)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create DAPL\n");
+ printf(" couldn't create DAPL\n");
PART_ERROR(H5Dget_access_plist);
}
if (H5Pset_efile_prefix(dapl_id1, path_prefix) < 0) {
H5_FAILED();
- HDprintf(" couldn't set DAPL property\n");
+ printf(" couldn't set DAPL property\n");
PART_ERROR(H5Dget_access_plist);
}
if ((dset_id3 = H5Dcreate2(group_id, DATASET_PROPERTY_LIST_TEST_DSET_NAME3, dset_dtype3, space_id,
H5P_DEFAULT, H5P_DEFAULT, dapl_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset\n");
+ printf(" couldn't create dataset\n");
PART_ERROR(H5Dget_access_plist);
}
if ((dset_id4 = H5Dcreate2(group_id, DATASET_PROPERTY_LIST_TEST_DSET_NAME4, dset_dtype4, space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset\n");
+ printf(" couldn't create dataset\n");
PART_ERROR(H5Dget_access_plist);
}
@@ -3751,13 +3733,13 @@ test_dataset_property_lists(void)
* does not */
if ((dapl_id1 = H5Dget_access_plist(dset_id3)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Dget_access_plist);
}
if ((dapl_id2 = H5Dget_access_plist(dset_id4)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Dget_access_plist);
}
@@ -3767,39 +3749,39 @@ test_dataset_property_lists(void)
if ((buf_size = H5Pget_efile_prefix(dapl_id1, NULL, 0)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve size for property value buffer\n");
+ printf(" couldn't retrieve size for property value buffer\n");
PART_ERROR(H5Dget_access_plist);
}
- if (NULL == (tmp_prefix = (char *)HDcalloc(1, (size_t)buf_size + 1))) {
+ if (NULL == (tmp_prefix = (char *)calloc(1, (size_t)buf_size + 1))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for property value\n");
+ printf(" couldn't allocate buffer for property value\n");
PART_ERROR(H5Dget_access_plist);
}
if (H5Pget_efile_prefix(dapl_id1, tmp_prefix, (size_t)buf_size + 1) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve property list value\n");
+ printf(" couldn't retrieve property list value\n");
PART_ERROR(H5Dget_access_plist);
}
if (HDstrncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
H5_FAILED();
- HDprintf(" DAPL values were incorrect!\n");
+ printf(" DAPL values were incorrect!\n");
PART_ERROR(H5Dget_access_plist);
}
- HDmemset(tmp_prefix, 0, (size_t)buf_size + 1);
+ memset(tmp_prefix, 0, (size_t)buf_size + 1);
if (H5Pget_efile_prefix(dapl_id2, tmp_prefix, (size_t)buf_size) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve property list value\n");
+ printf(" couldn't retrieve property list value\n");
PART_ERROR(H5Dget_access_plist);
}
if (!HDstrncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
H5_FAILED();
- HDprintf(" DAPL property value was set!\n");
+ printf(" DAPL property value was set!\n");
PART_ERROR(H5Dget_access_plist);
}
}
@@ -3850,25 +3832,25 @@ test_dataset_property_lists(void)
if ((dset_id1 = H5Dopen2(group_id, DATASET_PROPERTY_LIST_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_PROPERTY_LIST_TEST_DSET_NAME1);
+ printf(" couldn't open dataset '%s'\n", DATASET_PROPERTY_LIST_TEST_DSET_NAME1);
PART_ERROR(H5Dget_create_plist_reopened);
}
if ((dset_id2 = H5Dopen2(group_id, DATASET_PROPERTY_LIST_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_PROPERTY_LIST_TEST_DSET_NAME2);
+ printf(" couldn't open dataset '%s'\n", DATASET_PROPERTY_LIST_TEST_DSET_NAME2);
PART_ERROR(H5Dget_create_plist_reopened);
}
if ((dcpl_id1 = H5Dget_create_plist(dset_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Dget_create_plist_reopened);
}
if ((dcpl_id2 = H5Dget_create_plist(dset_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Dget_create_plist_reopened);
}
@@ -3876,18 +3858,18 @@ test_dataset_property_lists(void)
{
hsize_t tmp_chunk_dims[DATASET_PROPERTY_LIST_TEST_SPACE_RANK];
- HDmemset(tmp_chunk_dims, 0, sizeof(tmp_chunk_dims));
+ memset(tmp_chunk_dims, 0, sizeof(tmp_chunk_dims));
if (H5Pget_chunk(dcpl_id1, DATASET_PROPERTY_LIST_TEST_SPACE_RANK, tmp_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" couldn't get DCPL property value\n");
+ printf(" couldn't get DCPL property value\n");
PART_ERROR(H5Dget_create_plist_reopened);
}
for (i = 0; i < DATASET_PROPERTY_LIST_TEST_SPACE_RANK; i++)
if (tmp_chunk_dims[i] != chunk_dims[i]) {
H5_FAILED();
- HDprintf(" DCPL property values were incorrect\n");
+ printf(" DCPL property values were incorrect\n");
PART_ERROR(H5Dget_create_plist_reopened);
}
@@ -3900,8 +3882,8 @@ test_dataset_property_lists(void)
/* DAOS VOL can auto chunk, so don't fail */
if (err_ret >= 0 && strcmp(vol_name, "daos") != 0) {
H5_FAILED();
- HDprintf(" property list 2 shouldn't have had chunk dimensionality set (not a chunked "
- "layout)\n");
+ printf(" property list 2 shouldn't have had chunk dimensionality set (not a chunked "
+ "layout)\n");
PART_ERROR(H5Dget_create_plist_reopened);
}
}
@@ -3915,7 +3897,7 @@ test_dataset_property_lists(void)
TESTING_2("test cleanup");
if (tmp_prefix) {
- HDfree(tmp_prefix);
+ free(tmp_prefix);
tmp_prefix = NULL;
}
@@ -3960,7 +3942,7 @@ error:
H5E_BEGIN_TRY
{
if (tmp_prefix)
- HDfree(tmp_prefix);
+ free(tmp_prefix);
H5Pclose(dcpl_id1);
H5Pclose(dcpl_id2);
H5Pclose(dapl_id1);
@@ -4088,27 +4070,26 @@ test_read_dataset_small_all(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SMALL_READ_TEST_ALL_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_SMALL_READ_TEST_ALL_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_SMALL_READ_TEST_ALL_GROUP_NAME);
goto error;
}
@@ -4119,7 +4100,7 @@ test_read_dataset_small_all(void)
DATASET_SMALL_READ_TEST_ALL_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SMALL_READ_TEST_ALL_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SMALL_READ_TEST_ALL_DSET_NAME);
goto error;
}
@@ -4127,18 +4108,18 @@ test_read_dataset_small_all(void)
data_size *= dims[i];
data_size *= DATASET_SMALL_READ_TEST_ALL_DSET_DTYPESIZE;
- if (NULL == (read_buf = HDmalloc(data_size)))
+ if (NULL == (read_buf = malloc(data_size)))
TEST_ERROR;
if (H5Dread(dset_id, DATASET_SMALL_READ_TEST_ALL_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) <
0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_SMALL_READ_TEST_ALL_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_SMALL_READ_TEST_ALL_DSET_NAME);
goto error;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -4161,7 +4142,7 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(fspace_id);
H5Dclose(dset_id);
H5Gclose(group_id);
@@ -4198,28 +4179,27 @@ test_read_dataset_small_hyperslab(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SMALL_READ_TEST_HYPERSLAB_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_SMALL_READ_TEST_HYPERSLAB_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_SMALL_READ_TEST_HYPERSLAB_GROUP_NAME);
goto error;
}
@@ -4232,7 +4212,7 @@ test_read_dataset_small_hyperslab(void)
DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_NAME);
goto error;
}
@@ -4252,18 +4232,18 @@ test_read_dataset_small_hyperslab(void)
data_size *= dims[i];
data_size *= DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_DTYPESIZE;
- if (NULL == (read_buf = HDmalloc(data_size)))
+ if (NULL == (read_buf = malloc(data_size)))
TEST_ERROR;
if (H5Dread(dset_id, DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_NAME);
goto error;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -4288,7 +4268,7 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -4326,28 +4306,27 @@ test_read_dataset_small_point_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SMALL_READ_TEST_POINT_SELECTION_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_SMALL_READ_TEST_POINT_SELECTION_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_SMALL_READ_TEST_POINT_SELECTION_GROUP_NAME);
goto error;
}
@@ -4361,14 +4340,14 @@ test_read_dataset_small_point_selection(void)
DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_NAME);
goto error;
}
data_size = DATASET_SMALL_READ_TEST_POINT_SELECTION_NUM_POINTS *
DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < DATASET_SMALL_READ_TEST_POINT_SELECTION_NUM_POINTS; i++) {
@@ -4381,19 +4360,19 @@ test_read_dataset_small_point_selection(void)
if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_SMALL_READ_TEST_POINT_SELECTION_NUM_POINTS,
points) < 0) {
H5_FAILED();
- HDprintf(" couldn't select points\n");
+ printf(" couldn't select points\n");
goto error;
}
if (H5Dread(dset_id, DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_NAME);
goto error;
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -4418,7 +4397,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -4481,8 +4460,7 @@ test_dataset_io_point_selections(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -4951,8 +4929,7 @@ test_read_dataset_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -4960,21 +4937,20 @@ test_read_dataset_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_READ_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_READ_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_READ_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -4985,7 +4961,7 @@ test_read_dataset_invalid_params(void)
DATASET_READ_INVALID_PARAMS_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_READ_INVALID_PARAMS_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_READ_INVALID_PARAMS_TEST_DSET_NAME);
goto error;
}
@@ -4993,7 +4969,7 @@ test_read_dataset_invalid_params(void)
data_size *= dims[i];
data_size *= DATASET_READ_INVALID_PARAMS_TEST_DSET_DTYPESIZE;
- if (NULL == (read_buf = HDmalloc(data_size)))
+ if (NULL == (read_buf = malloc(data_size)))
TEST_ERROR;
PASSED();
@@ -5013,7 +4989,7 @@ test_read_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" read from dataset using H5Dread with an invalid dataset ID!\n");
+ printf(" read from dataset using H5Dread with an invalid dataset ID!\n");
PART_ERROR(H5Dread_invalid_dset_id);
}
@@ -5033,7 +5009,7 @@ test_read_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" read from dataset using H5Dread with an invalid memory datatype!\n");
+ printf(" read from dataset using H5Dread with an invalid memory datatype!\n");
PART_ERROR(H5Dread_invalid_datatype);
}
@@ -5054,7 +5030,7 @@ test_read_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" read from dataset using H5Dread with an invalid memory dataspace!\n");
+ printf(" read from dataset using H5Dread with an invalid memory dataspace!\n");
PART_ERROR(H5Dread_invalid_mem_dataspace);
}
@@ -5075,7 +5051,7 @@ test_read_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" read from dataset using H5Dread with an invalid file dataspace!\n");
+ printf(" read from dataset using H5Dread with an invalid file dataspace!\n");
PART_ERROR(H5Dread_invalid_file_dataspace);
}
@@ -5096,7 +5072,7 @@ test_read_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" read from dataset using H5Dread with an invalid DXPL!\n");
+ printf(" read from dataset using H5Dread with an invalid DXPL!\n");
PART_ERROR(H5Dread_invalid_dxpl);
}
@@ -5117,7 +5093,7 @@ test_read_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" read from dataset using H5Dread with an invalid data buffer!\n");
+ printf(" read from dataset using H5Dread with an invalid data buffer!\n");
PART_ERROR(H5Dread_invalid_data_buf);
}
@@ -5130,7 +5106,7 @@ test_read_dataset_invalid_params(void)
TESTING_2("test cleanup");
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -5153,7 +5129,7 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(fspace_id);
H5Dclose(dset_id);
H5Gclose(group_id);
@@ -5187,27 +5163,26 @@ test_write_dataset_small_all(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SMALL_WRITE_TEST_ALL_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_SMALL_WRITE_TEST_ALL_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_SMALL_WRITE_TEST_ALL_GROUP_NAME);
goto error;
}
@@ -5218,7 +5193,7 @@ test_write_dataset_small_all(void)
DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SMALL_WRITE_TEST_ALL_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SMALL_WRITE_TEST_ALL_DSET_NAME);
goto error;
}
@@ -5230,23 +5205,23 @@ test_write_dataset_small_all(void)
if ((dset_id = H5Dopen2(group_id, DATASET_SMALL_WRITE_TEST_ALL_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_SMALL_WRITE_TEST_ALL_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_SMALL_WRITE_TEST_ALL_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
- if (NULL == (data = HDmalloc((hsize_t)space_npoints * DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPESIZE)))
+ if (NULL == (data = malloc((hsize_t)space_npoints * DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPESIZE)))
TEST_ERROR;
for (i = 0; i < (hsize_t)space_npoints; i++)
@@ -5254,12 +5229,12 @@ test_write_dataset_small_all(void)
if (H5Dwrite(dset_id, DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_SMALL_WRITE_TEST_ALL_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_SMALL_WRITE_TEST_ALL_DSET_NAME);
goto error;
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5282,7 +5257,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(fspace_id);
H5Dclose(dset_id);
H5Gclose(group_id);
@@ -5319,28 +5294,27 @@ test_write_dataset_small_hyperslab(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SMALL_WRITE_TEST_HYPERSLAB_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_SMALL_WRITE_TEST_HYPERSLAB_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_SMALL_WRITE_TEST_HYPERSLAB_GROUP_NAME);
goto error;
}
@@ -5354,7 +5328,7 @@ test_write_dataset_small_hyperslab(void)
DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_NAME);
goto error;
}
@@ -5362,7 +5336,7 @@ test_write_dataset_small_hyperslab(void)
data_size *= dims[i];
data_size *= DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPESIZE; i++)
@@ -5383,12 +5357,12 @@ test_write_dataset_small_hyperslab(void)
if (H5Dwrite(dset_id, DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT,
data) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_NAME);
goto error;
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5413,7 +5387,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -5451,28 +5425,27 @@ test_write_dataset_small_point_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SMALL_WRITE_TEST_POINT_SELECTION_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_SMALL_WRITE_TEST_POINT_SELECTION_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_SMALL_WRITE_TEST_POINT_SELECTION_GROUP_NAME);
goto error;
}
@@ -5486,14 +5459,14 @@ test_write_dataset_small_point_selection(void)
DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_NAME);
goto error;
}
data_size = DATASET_SMALL_WRITE_TEST_POINT_SELECTION_NUM_POINTS *
DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPESIZE; i++)
@@ -5509,19 +5482,19 @@ test_write_dataset_small_point_selection(void)
if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_SMALL_WRITE_TEST_POINT_SELECTION_NUM_POINTS,
points) < 0) {
H5_FAILED();
- HDprintf(" couldn't select points\n");
+ printf(" couldn't select points\n");
goto error;
}
if (H5Dwrite(dset_id, DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_NAME);
goto error;
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5546,7 +5519,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -5590,8 +5563,8 @@ test_write_dataset_data_verification(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic or more dataset aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, basic or more dataset aren't supported with this "
+ "connector\n");
return 0;
}
@@ -5599,20 +5572,20 @@ test_write_dataset_data_verification(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_DATA_VERIFY_WRITE_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_GROUP_NAME);
goto error;
}
@@ -5623,7 +5596,7 @@ test_write_dataset_data_verification(void)
DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
goto error;
}
@@ -5631,7 +5604,7 @@ test_write_dataset_data_verification(void)
data_size *= dims[i];
data_size *= DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE; i++)
@@ -5648,12 +5621,12 @@ test_write_dataset_data_verification(void)
if (H5Dwrite(dset_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
data) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_all_read);
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5676,45 +5649,45 @@ test_write_dataset_data_verification(void)
if ((dset_id = H5Dopen2(group_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_all_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_all_read);
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
PART_ERROR(H5Dwrite_all_read);
}
if (NULL ==
- (data = HDmalloc((hsize_t)space_npoints * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
+ (data = malloc((hsize_t)space_npoints * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_all_read);
}
if (H5Dread(dset_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
data) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_all_read);
}
for (i = 0; i < (hsize_t)space_npoints; i++)
if (((int *)data)[i] != (int)i) {
H5_FAILED();
- HDprintf(" H5S_ALL selection data verification failed\n");
+ printf(" H5S_ALL selection data verification failed\n");
PART_ERROR(H5Dwrite_all_read);
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5728,9 +5701,9 @@ test_write_dataset_data_verification(void)
data_size = dims[1] * 2 * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -5741,16 +5714,16 @@ test_write_dataset_data_verification(void)
data_size *= dims[i];
data_size *= DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size))) {
+ if (NULL == (data = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset data verification\n");
+ printf(" couldn't allocate buffer for dataset data verification\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (H5Dread(dset_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
data) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -5771,7 +5744,7 @@ test_write_dataset_data_verification(void)
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -5780,7 +5753,7 @@ test_write_dataset_data_verification(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
}
@@ -5788,7 +5761,7 @@ test_write_dataset_data_verification(void)
if (H5Dwrite(dset_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -5819,54 +5792,54 @@ test_write_dataset_data_verification(void)
if ((dset_id = H5Dopen2(group_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
- if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
+ if (NULL ==
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (H5Dread(dset_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (memcmp(data, read_buf, data_size)) {
H5_FAILED();
- HDprintf(" hyperslab selection data verification failed\n");
+ printf(" hyperslab selection data verification failed\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -5881,9 +5854,9 @@ test_write_dataset_data_verification(void)
data_size =
DATASET_DATA_VERIFY_WRITE_TEST_NUM_POINTS * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -5894,16 +5867,16 @@ test_write_dataset_data_verification(void)
data_size *= dims[i];
data_size *= DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size))) {
+ if (NULL == (data = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset data verification\n");
+ printf(" couldn't allocate buffer for dataset data verification\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if (H5Dread(dset_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
data) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -5931,7 +5904,7 @@ test_write_dataset_data_verification(void)
if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_DATA_VERIFY_WRITE_TEST_NUM_POINTS,
points) < 0) {
H5_FAILED();
- HDprintf(" couldn't select elements in dataspace\n");
+ printf(" couldn't select elements in dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -5940,7 +5913,7 @@ test_write_dataset_data_verification(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
}
@@ -5948,7 +5921,7 @@ test_write_dataset_data_verification(void)
if (H5Dwrite(dset_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -5979,39 +5952,39 @@ test_write_dataset_data_verification(void)
if ((dset_id = H5Dopen2(group_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
- if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
+ if (NULL ==
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if (H5Dread(dset_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
if (memcmp(data, read_buf, data_size)) {
H5_FAILED();
- HDprintf(" point selection data verification failed\n");
+ printf(" point selection data verification failed\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -6024,17 +5997,17 @@ test_write_dataset_data_verification(void)
TESTING_2("test cleanup");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -6057,11 +6030,11 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -6097,8 +6070,7 @@ test_write_dataset_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -6106,21 +6078,21 @@ test_write_dataset_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_WRITE_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_WRITE_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -6131,17 +6103,17 @@ test_write_dataset_invalid_params(void)
DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_INVALID_PARAMS_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_INVALID_PARAMS_TEST_DSET_NAME);
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
- if (NULL == (data = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_INVALID_PARAMS_TEST_DSET_DTYPESIZE)))
+ if (NULL == (data = malloc((hsize_t)space_npoints * DATASET_WRITE_INVALID_PARAMS_TEST_DSET_DTYPESIZE)))
TEST_ERROR;
for (i = 0; i < (hsize_t)space_npoints; i++)
@@ -6164,7 +6136,7 @@ test_write_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" wrote to dataset using H5Dwrite with an invalid dataset ID!\n");
+ printf(" wrote to dataset using H5Dwrite with an invalid dataset ID!\n");
PART_ERROR(H5Dwrite_invalid_dset_id);
}
@@ -6184,7 +6156,7 @@ test_write_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" wrote to dataset using H5Dwrite with an invalid memory datatype!\n");
+ printf(" wrote to dataset using H5Dwrite with an invalid memory datatype!\n");
PART_ERROR(H5Dwrite_invalid_datatype);
}
@@ -6205,7 +6177,7 @@ test_write_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" wrote to dataset using H5Dwrite with an invalid memory dataspace!\n");
+ printf(" wrote to dataset using H5Dwrite with an invalid memory dataspace!\n");
PART_ERROR(H5Dwrite_invalid_mem_dataspace);
}
@@ -6226,7 +6198,7 @@ test_write_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" wrote to dataset using H5Dwrite with an invalid file dataspace!\n");
+ printf(" wrote to dataset using H5Dwrite with an invalid file dataspace!\n");
PART_ERROR(H5Dwrite_invalid_file_dataspace);
}
@@ -6247,7 +6219,7 @@ test_write_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" wrote to dataset using H5Dwrite with an invalid DXPL!\n");
+ printf(" wrote to dataset using H5Dwrite with an invalid DXPL!\n");
PART_ERROR(H5Dwrite_invalid_dxpl);
}
@@ -6268,7 +6240,7 @@ test_write_dataset_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" wrote to dataset using H5Dwrite with an invalid data buffer!\n");
+ printf(" wrote to dataset using H5Dwrite with an invalid data buffer!\n");
PART_ERROR(H5Dwrite_invalid_data_buf);
}
@@ -6281,7 +6253,7 @@ test_write_dataset_invalid_params(void)
TESTING_2("test cleanup");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -6304,7 +6276,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(fspace_id);
H5Dclose(dset_id);
H5Gclose(group_id);
@@ -6350,8 +6322,8 @@ test_dataset_builtin_type_conversion(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic or more dataset aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, basic or more dataset aren't supported with this "
+ "connector\n");
return 0;
}
@@ -6359,7 +6331,7 @@ test_dataset_builtin_type_conversion(void)
if ((native_order = H5Tget_order(DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get native byte order\n");
+ printf(" couldn't get native byte order\n");
goto error;
}
if (native_order == H5T_ORDER_LE)
@@ -6369,20 +6341,20 @@ test_dataset_builtin_type_conversion(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_DATA_BUILTIN_CONVERSION_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_DATA_VERIFY_WRITE_TEST_GROUP_NAME);
goto error;
}
@@ -6392,7 +6364,7 @@ test_dataset_builtin_type_conversion(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME, file_type_id,
fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
goto error;
}
@@ -6400,7 +6372,7 @@ test_dataset_builtin_type_conversion(void)
data_size *= dims[i];
data_size *= DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE; i++)
@@ -6417,13 +6389,13 @@ test_dataset_builtin_type_conversion(void)
if (H5Dwrite(dset_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_all_read);
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -6447,46 +6419,46 @@ test_dataset_builtin_type_conversion(void)
if ((dset_id = H5Dopen2(group_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_all_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_all_read);
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
PART_ERROR(H5Dwrite_all_read);
}
- if (NULL == (data = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
+ if (NULL == (data = malloc((hsize_t)space_npoints *
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_all_read);
}
if (H5Dread(dset_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_all_read);
}
for (i = 0; i < (hsize_t)space_npoints; i++)
if (((int *)data)[i] != (int)i) {
H5_FAILED();
- HDprintf(" H5S_ALL selection data verification failed\n");
+ printf(" H5S_ALL selection data verification failed\n");
PART_ERROR(H5Dwrite_all_read);
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -6500,9 +6472,9 @@ test_dataset_builtin_type_conversion(void)
data_size = dims[1] * 2 * DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -6513,17 +6485,17 @@ test_dataset_builtin_type_conversion(void)
data_size *= dims[i];
data_size *= DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size))) {
+ if (NULL == (data = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset data verification\n");
+ printf(" couldn't allocate buffer for dataset data verification\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (H5Dread(dset_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -6544,7 +6516,7 @@ test_dataset_builtin_type_conversion(void)
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -6553,7 +6525,7 @@ test_dataset_builtin_type_conversion(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
}
@@ -6561,8 +6533,8 @@ test_dataset_builtin_type_conversion(void)
if (H5Dwrite(dset_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -6594,55 +6566,55 @@ test_dataset_builtin_type_conversion(void)
if ((dset_id = H5Dopen2(group_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
- if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
+ if (NULL == (read_buf = malloc((hsize_t)space_npoints *
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (H5Dread(dset_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (memcmp(data, read_buf, data_size)) {
H5_FAILED();
- HDprintf(" hyperslab selection data verification failed\n");
+ printf(" hyperslab selection data verification failed\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -6657,9 +6629,9 @@ test_dataset_builtin_type_conversion(void)
data_size = DATASET_DATA_BUILTIN_CONVERSION_TEST_NUM_POINTS *
DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -6670,17 +6642,17 @@ test_dataset_builtin_type_conversion(void)
data_size *= dims[i];
data_size *= DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size))) {
+ if (NULL == (data = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset data verification\n");
+ printf(" couldn't allocate buffer for dataset data verification\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if (H5Dread(dset_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, data) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -6708,7 +6680,7 @@ test_dataset_builtin_type_conversion(void)
if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_DATA_BUILTIN_CONVERSION_TEST_NUM_POINTS,
points) < 0) {
H5_FAILED();
- HDprintf(" couldn't select elements in dataspace\n");
+ printf(" couldn't select elements in dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -6717,7 +6689,7 @@ test_dataset_builtin_type_conversion(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
}
@@ -6725,8 +6697,8 @@ test_dataset_builtin_type_conversion(void)
if (H5Dwrite(dset_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -6758,40 +6730,40 @@ test_dataset_builtin_type_conversion(void)
if ((dset_id = H5Dopen2(group_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
- if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
+ if (NULL == (read_buf = malloc((hsize_t)space_npoints *
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if (H5Dread(dset_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
if (memcmp(data, read_buf, data_size)) {
H5_FAILED();
- HDprintf(" point selection data verification failed\n");
+ printf(" point selection data verification failed\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -6804,17 +6776,17 @@ test_dataset_builtin_type_conversion(void)
TESTING_2("test cleanup");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -6837,11 +6809,11 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -6887,8 +6859,7 @@ test_dataset_compound_partial_io(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -6896,21 +6867,21 @@ test_dataset_compound_partial_io(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_DATA_COMPOUND_PARTIAL_IO_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_DATA_COMPOUND_PARTIAL_IO_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_DATA_COMPOUND_PARTIAL_IO_TEST_GROUP_NAME);
goto error;
}
@@ -6937,7 +6908,7 @@ test_dataset_compound_partial_io(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_DATA_COMPOUND_PARTIAL_IO_TEST_DSET_NAME, full_type_id,
space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_DATA_COMPOUND_PARTIAL_IO_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_DATA_COMPOUND_PARTIAL_IO_TEST_DSET_NAME);
goto error;
}
@@ -7144,28 +7115,28 @@ test_dataset_set_extent_chunked_unlimited(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic or more dataset aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, basic or more dataset aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_GROUP_NAME);
goto error;
}
@@ -7186,14 +7157,14 @@ test_dataset_set_extent_chunked_unlimited(void)
if (H5Pset_chunk(dcpl_id, DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_SPACE_RANK, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" unable to set dataset chunk dimensionality\n");
+ printf(" unable to set dataset chunk dimensionality\n");
goto error;
}
if ((dset_id = H5Dcreate2(group_id, DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_DSET_NAME, dset_dtype,
fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_DSET_NAME);
goto error;
}
@@ -7209,7 +7180,7 @@ test_dataset_set_extent_chunked_unlimited(void)
if (H5Dset_extent(dset_id, new_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set dataset extent\n");
+ printf(" failed to set dataset extent\n");
goto error;
}
@@ -7221,13 +7192,13 @@ test_dataset_set_extent_chunked_unlimited(void)
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve dataset's dataspace\n");
+ printf(" failed to retrieve dataset's dataspace\n");
goto error;
}
if (H5Sget_simple_extent_dims(fspace_id, new_dims, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve dataset dimensionality\n");
+ printf(" failed to retrieve dataset dimensionality\n");
goto error;
}
@@ -7237,7 +7208,7 @@ test_dataset_set_extent_chunked_unlimited(void)
for (j = 0; j < DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_SPACE_RANK; j++) {
if (dims[j] == new_dims[j]) {
H5_FAILED();
- HDprintf(" dataset dimension %llu wasn't changed!\n", (unsigned long long)j);
+ printf(" dataset dimension %llu wasn't changed!\n", (unsigned long long)j);
goto error;
}
}
@@ -7246,7 +7217,7 @@ test_dataset_set_extent_chunked_unlimited(void)
* Remember the current dimensionality of the dataset before
* changing them again.
*/
- HDmemcpy(dims, new_dims, sizeof(new_dims));
+ memcpy(dims, new_dims, sizeof(new_dims));
}
/*
@@ -7265,7 +7236,7 @@ test_dataset_set_extent_chunked_unlimited(void)
if (H5Dset_extent(dset_id, new_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set dataset extent\n");
+ printf(" failed to set dataset extent\n");
goto error;
}
@@ -7280,20 +7251,19 @@ test_dataset_set_extent_chunked_unlimited(void)
if ((dset_id = H5Dopen2(group_id, DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_DSET_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n",
- DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_DSET_NAME);
+ printf(" failed to open dataset '%s'\n", DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve dataset's dataspace\n");
+ printf(" failed to retrieve dataset's dataspace\n");
goto error;
}
if (H5Sget_simple_extent_dims(fspace_id, new_dims, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve dataset dimensionality\n");
+ printf(" failed to retrieve dataset dimensionality\n");
goto error;
}
@@ -7303,7 +7273,7 @@ test_dataset_set_extent_chunked_unlimited(void)
for (j = 0; j < DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_SPACE_RANK; j++) {
if (dims[j] == new_dims[j]) {
H5_FAILED();
- HDprintf(" dataset dimension %llu wasn't changed!\n", (unsigned long long)j);
+ printf(" dataset dimension %llu wasn't changed!\n", (unsigned long long)j);
goto error;
}
}
@@ -7312,7 +7282,7 @@ test_dataset_set_extent_chunked_unlimited(void)
* Remember the current dimensionality of the dataset before
* changing them again.
*/
- HDmemcpy(dims, new_dims, sizeof(new_dims));
+ memcpy(dims, new_dims, sizeof(new_dims));
}
if (H5Pclose(dcpl_id) < 0)
@@ -7377,28 +7347,28 @@ test_dataset_set_extent_chunked_fixed(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic or more dataset aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, basic or more dataset aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_GROUP_NAME);
goto error;
}
@@ -7423,7 +7393,7 @@ test_dataset_set_extent_chunked_fixed(void)
if (H5Pset_chunk(dcpl_id, DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" unable to set dataset chunk dimensionality\n");
+ printf(" unable to set dataset chunk dimensionality\n");
goto error;
}
@@ -7435,14 +7405,14 @@ test_dataset_set_extent_chunked_fixed(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME, dset_dtype,
fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME);
goto error;
}
if ((dset_id2 = H5Dcreate2(group_id, DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME2, dset_dtype,
fspace_id2, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME2);
+ printf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME2);
goto error;
}
@@ -7471,7 +7441,7 @@ test_dataset_set_extent_chunked_fixed(void)
if (H5Dset_extent(dset_id, new_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set dataset extent\n");
+ printf(" failed to set dataset extent\n");
goto error;
}
@@ -7483,13 +7453,13 @@ test_dataset_set_extent_chunked_fixed(void)
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve dataset's dataspace\n");
+ printf(" failed to retrieve dataset's dataspace\n");
goto error;
}
if (H5Sget_simple_extent_dims(fspace_id, new_dims, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve dataset dimensionality\n");
+ printf(" failed to retrieve dataset dimensionality\n");
goto error;
}
@@ -7499,7 +7469,7 @@ test_dataset_set_extent_chunked_fixed(void)
for (j = 0; j < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK; j++) {
if (dims[j] == new_dims[j]) {
H5_FAILED();
- HDprintf(" dataset dimension %llu wasn't changed!\n", (unsigned long long)j);
+ printf(" dataset dimension %llu wasn't changed!\n", (unsigned long long)j);
goto error;
}
}
@@ -7508,7 +7478,7 @@ test_dataset_set_extent_chunked_fixed(void)
* Remember the current dimensionality of the dataset before
* changing them again.
*/
- HDmemcpy(dims, new_dims, sizeof(new_dims));
+ memcpy(dims, new_dims, sizeof(new_dims));
}
/*
@@ -7540,7 +7510,7 @@ test_dataset_set_extent_chunked_fixed(void)
if (H5Dset_extent(dset_id2, new_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set dataset extent2\n");
+ printf(" failed to set dataset extent2\n");
goto error;
}
@@ -7555,19 +7525,19 @@ test_dataset_set_extent_chunked_fixed(void)
if ((dset_id2 = H5Dopen2(group_id, DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME2);
+ printf(" failed to open dataset '%s'\n", DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME2);
goto error;
}
if ((fspace_id2 = H5Dget_space(dset_id2)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve dataset's dataspace\n");
+ printf(" failed to retrieve dataset's dataspace\n");
goto error;
}
if (H5Sget_simple_extent_dims(fspace_id2, new_dims, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve dataset dimensionality\n");
+ printf(" failed to retrieve dataset dimensionality\n");
goto error;
}
@@ -7577,7 +7547,7 @@ test_dataset_set_extent_chunked_fixed(void)
for (j = 0; j < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK; j++) {
if (dims2[j] == new_dims[j]) {
H5_FAILED();
- HDprintf(" dataset dimension %llu wasn't changed!\n", (unsigned long long)j);
+ printf(" dataset dimension %llu wasn't changed!\n", (unsigned long long)j);
goto error;
}
}
@@ -7586,7 +7556,7 @@ test_dataset_set_extent_chunked_fixed(void)
* Remember the current dimensionality of the dataset before
* changing them again.
*/
- HDmemcpy(dims2, new_dims, sizeof(new_dims));
+ memcpy(dims2, new_dims, sizeof(new_dims));
}
if (H5Pclose(dcpl_id) < 0)
@@ -7666,8 +7636,8 @@ test_dataset_set_extent_data(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic or more dataset aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, basic or more dataset aren't supported with this "
+ "connector\n");
return 0;
}
@@ -7675,20 +7645,20 @@ test_dataset_set_extent_data(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SET_EXTENT_DATA_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_SET_EXTENT_DATA_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_SET_EXTENT_DATA_TEST_GROUP_NAME);
goto error;
}
@@ -7700,14 +7670,14 @@ test_dataset_set_extent_data(void)
if (H5Pset_chunk(dcpl_id, DATASET_SET_EXTENT_DATA_TEST_SPACE_RANK, dims_chunk) < 0) {
H5_FAILED();
- HDprintf(" unable to set dataset chunk dimensionality\n");
+ printf(" unable to set dataset chunk dimensionality\n");
goto error;
}
if ((dset_id = H5Dcreate2(group_id, DATASET_SET_EXTENT_DATA_TEST_DSET_NAME, H5T_NATIVE_INT, fspace_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_DATA_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_DATA_TEST_DSET_NAME);
goto error;
}
@@ -7766,15 +7736,15 @@ test_dataset_set_extent_data(void)
if (i >= (int)dims_origin[0] || j >= (int)dims_origin[1]) {
if (buf_expand[i][j] != 0) {
H5_FAILED();
- HDprintf(" buf_expand[%d][%d] = %d. It should be 0\n", i, j, buf_expand[i][j]);
+ printf(" buf_expand[%d][%d] = %d. It should be 0\n", i, j, buf_expand[i][j]);
PART_ERROR(H5Dset_extent_data_expand);
}
}
else {
if (buf_expand[i][j] != buf_origin[i][j]) {
H5_FAILED();
- HDprintf(" buf_expand[%d][%d] = %d. It should be %d\n", i, j, buf_expand[i][j],
- buf_origin[i][j]);
+ printf(" buf_expand[%d][%d] = %d. It should be %d\n", i, j, buf_expand[i][j],
+ buf_origin[i][j]);
PART_ERROR(H5Dset_extent_data_expand);
}
}
@@ -7807,8 +7777,8 @@ test_dataset_set_extent_data(void)
for (j = 0; j < (int)dims_shrink[1]; j++) {
if (buf_shrink[i][j] != buf_origin[i][j]) {
H5_FAILED();
- HDprintf(" buf_shrink[%d][%d] = %d. It should be %d\n", i, j, buf_shrink[i][j],
- buf_origin[i][j]);
+ printf(" buf_shrink[%d][%d] = %d. It should be %d\n", i, j, buf_shrink[i][j],
+ buf_origin[i][j]);
PART_ERROR(H5Dset_extent_data_shrink);
}
}
@@ -7844,16 +7814,15 @@ test_dataset_set_extent_data(void)
if (i >= (int)dims_shrink[0] || j >= (int)dims_shrink[1]) {
if (buf_expand2[i][j] != 0) {
H5_FAILED();
- HDprintf(" buf_expand2[%d][%d] = %d. It should be 0\n", i, j,
- buf_expand2[i][j]);
+ printf(" buf_expand2[%d][%d] = %d. It should be 0\n", i, j, buf_expand2[i][j]);
PART_ERROR(H5Dset_extent_data_expand_to_origin);
}
}
else {
if (buf_expand2[i][j] != buf_origin[i][j]) {
H5_FAILED();
- HDprintf(" buf_expand2[%d][%d] = %d. It should be %d.\n", i, j,
- buf_expand2[i][j], buf_origin[i][j]);
+ printf(" buf_expand2[%d][%d] = %d. It should be %d.\n", i, j,
+ buf_expand2[i][j], buf_origin[i][j]);
PART_ERROR(H5Dset_extent_data_expand_to_origin);
}
}
@@ -7889,8 +7858,8 @@ test_dataset_set_extent_data(void)
for (i = 0; i < DATASET_SET_EXTENT_DATA_TEST_SPACE_RANK; i++)
if (dims_out[i] != 0) {
H5_FAILED();
- HDprintf(" dims_out[%d] = %llu. It should be 0.\n", i,
- (long long unsigned int)dims_out[i]);
+ printf(" dims_out[%d] = %llu. It should be 0.\n", i,
+ (long long unsigned int)dims_out[i]);
PART_ERROR(H5Dset_extent_data_shrink_to_zero);
}
@@ -7923,7 +7892,7 @@ test_dataset_set_extent_data(void)
for (j = 0; j < (int)dims_origin[1]; j++) {
if (buf_expand2[i][j] != 0) {
H5_FAILED();
- HDprintf(" buf_expand2[%d][%d] = %d. It should be 0.\n", i, j, buf_expand2[i][j]);
+ printf(" buf_expand2[%d][%d] = %d. It should be 0.\n", i, j, buf_expand2[i][j]);
PART_ERROR(H5Dset_extent_data_expand_to_origin_again);
}
}
@@ -8001,27 +7970,27 @@ test_dataset_set_extent_double_handles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic or more dataset aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, basic or more dataset aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_SET_EXTENT_DATA_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_SET_EXTENT_DATA_TEST_GROUP_NAME);
goto error;
}
@@ -8034,7 +8003,7 @@ test_dataset_set_extent_double_handles(void)
if (H5Pset_chunk(dcpl_id, DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_SPACE_RANK, dims_chunk) < 0) {
H5_FAILED();
- HDprintf(" unable to set dataset chunk dimensionality\n");
+ printf(" unable to set dataset chunk dimensionality\n");
goto error;
}
@@ -8042,14 +8011,14 @@ test_dataset_set_extent_double_handles(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_DSET_NAME, H5T_NATIVE_INT,
fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_DSET_NAME);
goto error;
}
/* Open the same dataset again */
if ((dset_id2 = H5Dopen2(group_id, DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_DSET_NAME);
goto error;
}
@@ -8071,8 +8040,8 @@ test_dataset_set_extent_double_handles(void)
for (i = 0; i < DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_SPACE_RANK; i++)
if (dims_out[i] != dims_expand[i]) {
H5_FAILED();
- HDprintf(" dims_out[%d] = %" PRIuHSIZE ". It should be %" PRIuHSIZE ".\n", i, dims_out[i],
- dims_expand[i]);
+ printf(" dims_out[%d] = %" PRIuHSIZE ". It should be %" PRIuHSIZE ".\n", i, dims_out[i],
+ dims_expand[i]);
goto error;
}
@@ -8141,8 +8110,8 @@ test_dataset_set_extent_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic or more dataset aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, basic or more dataset aren't supported with this "
+ "connector\n");
return 0;
}
@@ -8150,14 +8119,14 @@ test_dataset_set_extent_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
/** for DAOS VOL, this test is problematic since auto chunking can be selected, so skip for now */
if (H5VLget_connector_name(file_id, vol_name, 5) < 0) {
H5_FAILED();
- HDprintf(" couldn't get VOL connector name\n");
+ printf(" couldn't get VOL connector name\n");
goto error;
}
if (strcmp(vol_name, "daos") == 0) {
@@ -8169,15 +8138,15 @@ test_dataset_set_extent_invalid_params(void)
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SET_EXTENT_INVALID_PARAMS_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_SET_EXTENT_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_SET_EXTENT_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -8213,8 +8182,8 @@ test_dataset_set_extent_invalid_params(void)
H5Dcreate2(group_id, DATASET_SET_EXTENT_INVALID_LAYOUT_TEST_COMPACT_DSET_NAME, H5T_NATIVE_INT,
compact_fspace_id, H5P_DEFAULT, compact_dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_SET_EXTENT_INVALID_LAYOUT_TEST_COMPACT_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_SET_EXTENT_INVALID_LAYOUT_TEST_COMPACT_DSET_NAME);
goto error;
}
@@ -8229,8 +8198,8 @@ test_dataset_set_extent_invalid_params(void)
H5Dcreate2(group_id, DATASET_SET_EXTENT_INVALID_LAYOUT_TEST_CONTIGUOUS_DSET_NAME, dset_dtype,
fspace_id, H5P_DEFAULT, contiguous_dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_SET_EXTENT_INVALID_LAYOUT_TEST_CONTIGUOUS_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_SET_EXTENT_INVALID_LAYOUT_TEST_CONTIGUOUS_DSET_NAME);
goto error;
}
@@ -8240,14 +8209,14 @@ test_dataset_set_extent_invalid_params(void)
if (H5Pset_chunk(chunked_dcpl_id, DATASET_SET_EXTENT_INVALID_PARAMS_TEST_SPACE_RANK, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" unable to set dataset chunk dimensionality\n");
+ printf(" unable to set dataset chunk dimensionality\n");
goto error;
}
if ((chunked_dset_id = H5Dcreate2(group_id, DATASET_SET_EXTENT_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype,
fspace_id, H5P_DEFAULT, chunked_dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_INVALID_PARAMS_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SET_EXTENT_INVALID_PARAMS_TEST_DSET_NAME);
goto error;
}
@@ -8267,7 +8236,7 @@ test_dataset_set_extent_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" setting dataset extent succeeded with an invalid layout (compact)\n");
+ printf(" setting dataset extent succeeded with an invalid layout (compact)\n");
PART_ERROR(H5Dset_extent_invalid_layout_compact);
}
@@ -8287,7 +8256,7 @@ test_dataset_set_extent_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" setting dataset extent succeeded with an invalid layout (contiguous)\n");
+ printf(" setting dataset extent succeeded with an invalid layout (contiguous)\n");
PART_ERROR(H5Dset_extent_invalid_layout_contiguous);
}
@@ -8307,7 +8276,7 @@ test_dataset_set_extent_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" setting dataset extent succeeded with an invalid dataset ID\n");
+ printf(" setting dataset extent succeeded with an invalid dataset ID\n");
PART_ERROR(H5Dset_extent_invalid_dset_id);
}
@@ -8327,7 +8296,7 @@ test_dataset_set_extent_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" setting dataset extent succeeded with a NULL dimension pointer\n");
+ printf(" setting dataset extent succeeded with a NULL dimension pointer\n");
PART_ERROR(H5Dset_extent_null_dim_pointer);
}
@@ -8465,27 +8434,27 @@ test_create_single_chunk_dataset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SINGLE_CHUNK_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_SINGLE_CHUNK_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_SINGLE_CHUNK_TEST_GROUP_NAME);
goto error;
}
@@ -8499,14 +8468,14 @@ test_create_single_chunk_dataset(void)
if (H5Pset_chunk(dcpl_id, DATASET_SINGLE_CHUNK_TEST_SPACE_RANK, dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
goto error;
}
if ((dset_id = H5Dcreate2(group_id, DATASET_SINGLE_CHUNK_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SINGLE_CHUNK_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SINGLE_CHUNK_TEST_DSET_NAME);
goto error;
}
@@ -8515,28 +8484,28 @@ test_create_single_chunk_dataset(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
memset(retrieved_chunk_dims, 0, sizeof(retrieved_chunk_dims));
if (H5Pget_chunk(dcpl_id, DATASET_SINGLE_CHUNK_TEST_SPACE_RANK, retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_SINGLE_CHUNK_TEST_SPACE_RANK; i++) {
if (dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -8547,40 +8516,40 @@ test_create_single_chunk_dataset(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if (H5Dclose(dset_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close dataset\n");
+ printf(" failed to close dataset\n");
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_SINGLE_CHUNK_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to re-open dataset\n");
+ printf(" failed to re-open dataset\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
memset(retrieved_chunk_dims, 0, sizeof(retrieved_chunk_dims));
if (H5Pget_chunk(dcpl_id, DATASET_SINGLE_CHUNK_TEST_SPACE_RANK, retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_SINGLE_CHUNK_TEST_SPACE_RANK; i++) {
if (dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -8646,28 +8615,27 @@ test_write_single_chunk_dataset(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_SINGLE_CHUNK_WRITE_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_SINGLE_CHUNK_WRITE_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_SINGLE_CHUNK_WRITE_TEST_GROUP_NAME);
goto error;
}
@@ -8680,7 +8648,7 @@ test_write_single_chunk_dataset(void)
if (H5Pset_chunk(dcpl_id, DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_SPACE_RANK, dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
goto error;
}
@@ -8688,7 +8656,7 @@ test_write_single_chunk_dataset(void)
DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_NAME);
goto error;
}
@@ -8697,28 +8665,28 @@ test_write_single_chunk_dataset(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
memset(retrieved_chunk_dims, 0, sizeof(retrieved_chunk_dims));
if (H5Pget_chunk(dcpl_id, DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_SPACE_RANK, retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_SPACE_RANK; i++) {
if (dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -8727,7 +8695,7 @@ test_write_single_chunk_dataset(void)
data_size *= dims[i];
data_size *= DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE; i++)
@@ -8736,12 +8704,12 @@ test_write_single_chunk_dataset(void)
if (H5Dwrite(dset_id, DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_NAME);
goto error;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -8764,45 +8732,45 @@ test_write_single_chunk_dataset(void)
if ((dset_id = H5Dopen2(group_id, DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id, DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_NAME);
goto error;
}
for (i = 0; i < (hsize_t)space_npoints; i++)
if (((int *)read_buf)[i] != (int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -8827,9 +8795,9 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Pclose(dcpl_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -8865,27 +8833,27 @@ test_create_multi_chunk_dataset(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_MULTI_CHUNK_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_MULTI_CHUNK_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_MULTI_CHUNK_TEST_GROUP_NAME);
goto error;
}
@@ -8899,14 +8867,14 @@ test_create_multi_chunk_dataset(void)
if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_TEST_SPACE_RANK, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
goto error;
}
if ((dset_id = H5Dcreate2(group_id, DATASET_MULTI_CHUNK_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_MULTI_CHUNK_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_MULTI_CHUNK_TEST_DSET_NAME);
goto error;
}
@@ -8915,28 +8883,28 @@ test_create_multi_chunk_dataset(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
memset(retrieved_chunk_dims, 0, sizeof(retrieved_chunk_dims));
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_TEST_SPACE_RANK, retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_MULTI_CHUNK_TEST_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -8947,40 +8915,40 @@ test_create_multi_chunk_dataset(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if (H5Dclose(dset_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close dataset\n");
+ printf(" failed to close dataset\n");
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to re-open dataset\n");
+ printf(" failed to re-open dataset\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
memset(retrieved_chunk_dims, 0, sizeof(retrieved_chunk_dims));
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_TEST_SPACE_RANK, retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_MULTI_CHUNK_TEST_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -9051,28 +9019,28 @@ test_write_multi_chunk_dataset_same_shape_read(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
goto error;
}
@@ -9086,7 +9054,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) <
0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
goto error;
}
@@ -9094,8 +9062,8 @@ test_write_multi_chunk_dataset_same_shape_read(void)
DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, fspace_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -9104,13 +9072,13 @@ test_write_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
@@ -9118,15 +9086,15 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK,
retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -9139,7 +9107,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
data_size *= dims[i];
data_size *= DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
/*
@@ -9202,13 +9170,13 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -9232,14 +9200,13 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if ((dset_id =
H5Dopen2(group_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
@@ -9251,7 +9218,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if ((mspace_id = H5Screate_simple(2, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create memory dataspace\n");
+ printf(" failed to create memory dataspace\n");
goto error;
}
}
@@ -9263,11 +9230,11 @@ test_write_multi_chunk_dataset_same_shape_read(void)
/*
* Read every chunk in the dataset, checking the data for each one.
*/
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < data_size / chunk_size; i++) {
size_t j, k;
- HDprintf("\r Reading chunk %zu", i);
+ printf("\r Reading chunk %zu", i);
for (j = 0; j < DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; j++) {
if (dims[j] == chunk_dims[j])
@@ -9284,7 +9251,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to set hyperslab selection\n");
+ printf(" failed to set hyperslab selection\n");
goto error;
}
@@ -9295,8 +9262,8 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if (H5Dread(dset_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -9304,7 +9271,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
for (k = 0; k < chunk_dims[1]; k++) {
if (read_buf[j][k] != (int)((j * chunk_dims[0]) + k + i)) {
H5_FAILED();
- HDprintf(" data verification failed for chunk %lld\n", (long long)i);
+ printf(" data verification failed for chunk %lld\n", (long long)i);
goto error;
}
}
@@ -9334,7 +9301,7 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -9378,28 +9345,28 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
goto error;
}
@@ -9413,7 +9380,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) <
0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
goto error;
}
@@ -9421,8 +9388,8 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, fspace_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -9431,13 +9398,13 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
@@ -9445,15 +9412,15 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -9466,7 +9433,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
data_size *= dims[i];
data_size *= DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
/*
@@ -9529,13 +9496,13 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -9559,23 +9526,22 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if ((dset_id =
H5Dopen2(group_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
/*
* Allocate single chunk-sized read buffer.
*/
- if (NULL == (read_buf = HDmalloc(chunk_size))) {
+ if (NULL == (read_buf = malloc(chunk_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
@@ -9587,7 +9553,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create memory dataspace\n");
+ printf(" failed to create memory dataspace\n");
goto error;
}
}
@@ -9599,11 +9565,11 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
/*
* Read every chunk in the dataset, checking the data for each one.
*/
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < data_size / chunk_size; i++) {
size_t j;
- HDprintf("\r Reading chunk %zu", i);
+ printf("\r Reading chunk %zu", i);
for (j = 0; j < DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; j++) {
if (dims[j] == chunk_dims[j])
@@ -9620,7 +9586,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to set hyperslab selection\n");
+ printf(" failed to set hyperslab selection\n");
goto error;
}
@@ -9628,8 +9594,8 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (H5Dread(dset_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -9637,13 +9603,13 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
j++)
if (((int *)read_buf)[j] != (int)(j + i)) {
H5_FAILED();
- HDprintf(" data verification failed for chunk %lld\n", (long long)i);
+ printf(" data verification failed for chunk %lld\n", (long long)i);
goto error;
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -9670,9 +9636,9 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -9717,28 +9683,28 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
goto error;
}
@@ -9752,7 +9718,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK,
chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
goto error;
}
@@ -9760,8 +9726,8 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, fspace_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -9770,13 +9736,13 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
@@ -9784,15 +9750,15 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK,
retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -9805,7 +9771,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
data_size *= dims[i];
data_size *= DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
/*
@@ -9816,7 +9782,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if ((mspace_id = H5Screate_simple(2, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create memory dataspace\n");
+ printf(" failed to create memory dataspace\n");
goto error;
}
}
@@ -9825,7 +9791,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
count[i] = chunk_dims[i];
}
- HDprintf("\n");
+ printf("\n");
for (niter = 0; niter < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_NITERS; niter++) {
memset(write_buf, 0, data_size);
@@ -9892,8 +9858,8 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -9917,14 +9883,14 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
@@ -9934,7 +9900,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
for (i = 0; i < data_size / chunk_size; i++) {
size_t j, k;
- HDprintf("\r Reading chunk %zu", i);
+ printf("\r Reading chunk %zu", i);
for (j = 0; j < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; j++) {
if (dims[j] == chunk_dims[j])
@@ -9951,7 +9917,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to set hyperslab selection\n");
+ printf(" failed to set hyperslab selection\n");
goto error;
}
@@ -9962,8 +9928,8 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (H5Dread(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, mspace_id,
fspace_id, H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -9971,7 +9937,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
for (k = 0; k < chunk_dims[1]; k++) {
if (read_buf[j][k] != (int)((j * chunk_dims[0]) + k + i + niter)) {
H5_FAILED();
- HDprintf(" data verification failed for chunk %lld\n", (long long)i);
+ printf(" data verification failed for chunk %lld\n", (long long)i);
goto error;
}
}
@@ -9980,7 +9946,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -10007,7 +9973,7 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -10052,28 +10018,28 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
goto error;
}
@@ -10087,7 +10053,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
goto error;
}
@@ -10095,8 +10061,8 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, fspace_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -10105,13 +10071,13 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
@@ -10119,15 +10085,15 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -10140,15 +10106,15 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
data_size *= dims[i];
data_size *= DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
/*
* Allocate single chunk-sized read buffer.
*/
- if (NULL == (read_buf = HDmalloc(chunk_size))) {
+ if (NULL == (read_buf = malloc(chunk_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
@@ -10160,7 +10126,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create memory dataspace\n");
+ printf(" failed to create memory dataspace\n");
goto error;
}
}
@@ -10169,7 +10135,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
count[i] = chunk_dims[i];
}
- HDprintf("\n");
+ printf("\n");
for (niter = 0; niter < DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_NITERS; niter++) {
memset(write_buf, 0, data_size);
@@ -10236,8 +10202,8 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -10261,14 +10227,14 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
@@ -10278,7 +10244,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
for (i = 0; i < data_size / chunk_size; i++) {
size_t j;
- HDprintf("\r Reading chunk %zu", i);
+ printf("\r Reading chunk %zu", i);
for (j = 0; j < DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; j++) {
if (dims[j] == chunk_dims[j])
@@ -10295,7 +10261,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to set hyperslab selection\n");
+ printf(" failed to set hyperslab selection\n");
goto error;
}
@@ -10303,8 +10269,8 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (H5Dread(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, mspace_id,
fspace_id, H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -10313,19 +10279,19 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
j++)
if (((int *)read_buf)[j] != (int)(j + i + niter)) {
H5_FAILED();
- HDprintf(" data verification failed for chunk %lld\n", (long long)i);
+ printf(" data verification failed for chunk %lld\n", (long long)i);
goto error;
}
}
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -10352,9 +10318,9 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -10397,28 +10363,28 @@ test_read_partial_chunk_all_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_GROUP_NAME);
goto error;
}
@@ -10431,7 +10397,7 @@ test_read_partial_chunk_all_selection(void)
if (H5Pset_chunk(dcpl_id, DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_SPACE_RANK, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
goto error;
}
@@ -10439,7 +10405,7 @@ test_read_partial_chunk_all_selection(void)
DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_NAME);
goto error;
}
@@ -10448,13 +10414,13 @@ test_read_partial_chunk_all_selection(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
@@ -10462,15 +10428,15 @@ test_read_partial_chunk_all_selection(void)
if (H5Pget_chunk(dcpl_id, DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_SPACE_RANK, retrieved_chunk_dims) <
0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -10486,7 +10452,7 @@ test_read_partial_chunk_all_selection(void)
if (H5Dwrite(dset_id, DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
write_buf) < 0) {
H5_FAILED();
- HDprintf(" failed to write to dataset\n");
+ printf(" failed to write to dataset\n");
goto error;
}
@@ -10497,14 +10463,14 @@ test_read_partial_chunk_all_selection(void)
TEST_ERROR;
if ((dset_id = H5Dopen2(group_id, DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to re-open dataset\n");
+ printf(" failed to re-open dataset\n");
goto error;
}
if (H5Dread(dset_id, DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" failed to read from dataset\n");
+ printf(" failed to read from dataset\n");
goto error;
}
@@ -10512,7 +10478,7 @@ test_read_partial_chunk_all_selection(void)
for (j = 0; j < FIXED_DIMSIZE; j++)
if (read_buf[i][j] != (int)((i * FIXED_DIMSIZE) + j)) {
H5_FAILED();
- HDprintf(
+ printf(
" data verification failed for read buffer element %lld: expected %lld but was %lld\n",
(long long)((i * FIXED_DIMSIZE) + j), (long long)((i * FIXED_DIMSIZE) + j),
(long long)read_buf[i][j]);
@@ -10584,28 +10550,28 @@ test_read_partial_chunk_hyperslab_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or get property list aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, dataset, or get property list aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_GROUP_NAME);
goto error;
}
@@ -10618,7 +10584,7 @@ test_read_partial_chunk_hyperslab_selection(void)
if (H5Pset_chunk(dcpl_id, DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
goto error;
}
@@ -10626,7 +10592,7 @@ test_read_partial_chunk_hyperslab_selection(void)
DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_NAME);
goto error;
}
@@ -10635,13 +10601,13 @@ test_read_partial_chunk_hyperslab_selection(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
goto error;
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
goto error;
}
@@ -10649,15 +10615,15 @@ test_read_partial_chunk_hyperslab_selection(void)
if (H5Pget_chunk(dcpl_id, DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK,
retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
goto error;
}
for (i = 0; i < DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
goto error;
}
}
@@ -10681,7 +10647,7 @@ test_read_partial_chunk_hyperslab_selection(void)
if ((mspace_id = H5Screate_simple(DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK, mdims,
NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create memory dataspace\n");
+ printf(" failed to create memory dataspace\n");
goto error;
}
}
@@ -10734,30 +10700,30 @@ test_read_partial_chunk_hyperslab_selection(void)
if (H5Sselect_hyperslab(mspace_id, H5S_SELECT_SET, m_start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to select hyperslab in memory dataspace\n");
+ printf(" failed to select hyperslab in memory dataspace\n");
goto error;
}
}
else {
if (H5Sselect_all(mspace_id) < 0) {
H5_FAILED();
- HDprintf(" failed to select entire memory dataspace\n");
+ printf(" failed to select entire memory dataspace\n");
goto error;
}
}
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to select hyperslab\n");
+ printf(" failed to select hyperslab\n");
goto error;
}
- HDprintf("\r Writing chunk %zu", i);
+ printf("\r Writing chunk %zu", i);
if (H5Dwrite(dset_id, DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" failed to write to dataset\n");
+ printf(" failed to write to dataset\n");
goto error;
}
@@ -10771,28 +10737,28 @@ test_read_partial_chunk_hyperslab_selection(void)
if ((dset_id = H5Dopen2(group_id, DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" failed to re-open dataset\n");
+ printf(" failed to re-open dataset\n");
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve dataspace from dataset\n");
+ printf(" failed to retrieve dataspace from dataset\n");
goto error;
}
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to select hyperslab\n");
+ printf(" failed to select hyperslab\n");
goto error;
}
- HDprintf("\r Reading chunk %zu", i);
+ printf("\r Reading chunk %zu", i);
if (H5Dread(dset_id, DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" failed to read from dataset\n");
+ printf(" failed to read from dataset\n");
goto error;
}
@@ -10800,10 +10766,10 @@ test_read_partial_chunk_hyperslab_selection(void)
for (k = 0; k < FIXED_CHUNK_DIMSIZE; k++)
if (read_buf[j][k] != (int)((j * FIXED_CHUNK_DIMSIZE) + k)) {
H5_FAILED();
- HDprintf(" data verification failed for read buffer element %lld: expected %lld but "
- "was %lld\n",
- (long long)((j * FIXED_CHUNK_DIMSIZE) + k),
- (long long)((j * FIXED_CHUNK_DIMSIZE) + k), (long long)read_buf[j][k]);
+ printf(" data verification failed for read buffer element %lld: expected %lld but "
+ "was %lld\n",
+ (long long)((j * FIXED_CHUNK_DIMSIZE) + k),
+ (long long)((j * FIXED_CHUNK_DIMSIZE) + k), (long long)read_buf[j][k]);
goto error;
}
}
@@ -10889,14 +10855,14 @@ test_get_vlen_buf_size(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or dataset aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this "
+ "connector\n");
return 0;
}
/* Allocate and initialize VL data to write */
for (i = 0; i < DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(unsigned int));
+ wdata[i].p = malloc((i + 1) * sizeof(unsigned int));
wdata[i].len = i + 1;
for (j = 0; j < (i + 1); j++)
((unsigned int *)wdata[i].p)[j] = i * 10 + j;
@@ -10905,20 +10871,20 @@ test_get_vlen_buf_size(void)
/* Open the file */
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_GET_VLEN_BUF_SIZE_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_GET_VLEN_BUF_SIZE_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_GET_VLEN_BUF_SIZE_GROUP_NAME);
goto error;
}
@@ -10948,11 +10914,11 @@ test_get_vlen_buf_size(void)
((DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM * (DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM + 1)) / 2) *
sizeof(unsigned int)) {
H5_FAILED();
- HDprintf(
- " H5Dvlen_get_buf_size returned wrong size (%lu), compared to the correct size (%lu)\n", size,
- ((DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM * (DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM + 1)) /
- 2) *
- sizeof(unsigned int));
+ printf(" H5Dvlen_get_buf_size returned wrong size (%lu), compared to the correct size (%lu)\n",
+ size,
+ ((DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM * (DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM + 1)) /
+ 2) *
+ sizeof(unsigned int));
goto error;
}
@@ -11005,17 +10971,17 @@ H5_api_dataset_test(void)
size_t i;
int nerrors;
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Dataset Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Dataset Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(dataset_tests); i++) {
nerrors += (*dataset_tests[i])() ? 1 : 0;
}
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/test/API/H5_api_datatype_test.c b/test/API/H5_api_datatype_test.c
index 8bcd19a..7a67210 100644
--- a/test/API/H5_api_datatype_test.c
+++ b/test/API/H5_api_datatype_test.c
@@ -90,40 +90,40 @@ test_create_committed_datatype(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_CREATE_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATATYPE_CREATE_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATATYPE_CREATE_TEST_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype to commit\n");
+ printf(" couldn't create datatype to commit\n");
goto error;
}
if (H5Tcommit2(group_id, DATATYPE_CREATE_TEST_TYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", DATATYPE_CREATE_TEST_TYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", DATATYPE_CREATE_TEST_TYPE_NAME);
goto error;
}
@@ -171,8 +171,8 @@ test_create_committed_datatype_invalid_params(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
@@ -180,27 +180,27 @@ test_create_committed_datatype_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_CREATE_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATATYPE_CREATE_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATATYPE_CREATE_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype to commit\n");
+ printf(" couldn't create datatype to commit\n");
goto error;
}
@@ -221,7 +221,7 @@ test_create_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit2 succeeded with an invalid loc_id!\n");
+ printf(" H5Tcommit2 succeeded with an invalid loc_id!\n");
PART_ERROR(H5Tcommit2_invalid_loc_id);
}
@@ -241,7 +241,7 @@ test_create_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit2 succeeded with an invalid datatype name!\n");
+ printf(" H5Tcommit2 succeeded with an invalid datatype name!\n");
PART_ERROR(H5Tcommit2_invalid_type_name);
}
@@ -253,7 +253,7 @@ test_create_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit2 succeeded with an invalid datatype name!\n");
+ printf(" H5Tcommit2 succeeded with an invalid datatype name!\n");
PART_ERROR(H5Tcommit2_invalid_type_name);
}
@@ -274,7 +274,7 @@ test_create_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit2 succeeded with an invalid datatype ID!\n");
+ printf(" H5Tcommit2 succeeded with an invalid datatype ID!\n");
PART_ERROR(H5Tcommit2_invalid_type_id);
}
@@ -295,7 +295,7 @@ test_create_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit2 succeeded with an invalid LCPL!\n");
+ printf(" H5Tcommit2 succeeded with an invalid LCPL!\n");
PART_ERROR(H5Tcommit2_invalid_lcpl);
}
@@ -316,7 +316,7 @@ test_create_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit2 succeeded with an invalid TCPL!\n");
+ printf(" H5Tcommit2 succeeded with an invalid TCPL!\n");
PART_ERROR(H5Tcommit2_invalid_tcpl);
}
@@ -337,7 +337,7 @@ test_create_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit2 succeeded with an invalid TAPL!\n");
+ printf(" H5Tcommit2 succeeded with an invalid TAPL!\n");
PART_ERROR(H5Tcommit2_invalid_tapl);
}
@@ -392,39 +392,39 @@ test_create_anonymous_committed_datatype(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_CREATE_ANONYMOUS_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATATYPE_CREATE_ANONYMOUS_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATATYPE_CREATE_ANONYMOUS_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if (H5Tcommit_anon(group_id, type_id, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit anonymous datatype\n");
+ printf(" couldn't commit anonymous datatype\n");
goto error;
}
@@ -472,8 +472,8 @@ test_create_anonymous_committed_datatype_invalid_params(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
@@ -481,27 +481,27 @@ test_create_anonymous_committed_datatype_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_CREATE_ANONYMOUS_INVALID_PARAMS_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATATYPE_CREATE_ANONYMOUS_INVALID_PARAMS_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATATYPE_CREATE_ANONYMOUS_INVALID_PARAMS_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
@@ -521,7 +521,7 @@ test_create_anonymous_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit_anon succeeded with an invalid loc_id!\n");
+ printf(" H5Tcommit_anon succeeded with an invalid loc_id!\n");
PART_ERROR(H5Tcommit_anon_invalid_loc_id);
}
@@ -541,7 +541,7 @@ test_create_anonymous_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit_anon succeeded with an invalid datatype ID!\n");
+ printf(" H5Tcommit_anon succeeded with an invalid datatype ID!\n");
PART_ERROR(H5Tcommit_anon_invalid_type_id);
}
@@ -561,7 +561,7 @@ test_create_anonymous_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit_anon succeeded with an invalid TCPL!\n");
+ printf(" H5Tcommit_anon succeeded with an invalid TCPL!\n");
PART_ERROR(H5Tcommit_anon_invalid_tcpl);
}
@@ -581,7 +581,7 @@ test_create_anonymous_committed_datatype_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tcommit_anon succeeded with an invalid TAPL!\n");
+ printf(" H5Tcommit_anon succeeded with an invalid TAPL!\n");
PART_ERROR(H5Tcommit_anon_invalid_tapl);
}
@@ -638,8 +638,8 @@ test_create_committed_datatype_empty_types(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
@@ -647,21 +647,20 @@ test_create_committed_datatype_empty_types(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_CREATE_EMPTY_TYPES_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATATYPE_CREATE_EMPTY_TYPES_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATATYPE_CREATE_EMPTY_TYPES_TEST_GROUP_NAME);
goto error;
}
@@ -675,7 +674,7 @@ test_create_committed_datatype_empty_types(void)
if ((type_id = H5Tcreate(H5T_COMPOUND, (size_t)32)) < 0) {
H5_FAILED();
- HDprintf(" failed to create compound type\n");
+ printf(" failed to create compound type\n");
PART_ERROR(H5Tcommit_empty_compound_type);
}
@@ -688,14 +687,14 @@ test_create_committed_datatype_empty_types(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" committed empty compound datatype!\n");
+ printf(" committed empty compound datatype!\n");
PART_ERROR(H5Tcommit_empty_compound_type);
}
/* Add a field to the compound datatype */
if (H5Tinsert(type_id, "a", (size_t)0, H5T_NATIVE_INT) < 0) {
H5_FAILED();
- HDprintf(" failed to insert field into compound datatype\n");
+ printf(" failed to insert field into compound datatype\n");
PART_ERROR(H5Tcommit_empty_compound_type);
}
@@ -703,7 +702,7 @@ test_create_committed_datatype_empty_types(void)
if (H5Tcommit2(group_id, DATATYPE_CREATE_EMPTY_TYPES_TEST_CMPD_TYPE_NAME, type_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit non-empty compound datatype\n");
+ printf(" failed to commit non-empty compound datatype\n");
PART_ERROR(H5Tcommit_empty_compound_type);
}
@@ -728,7 +727,7 @@ test_create_committed_datatype_empty_types(void)
if ((type_id = H5Tenum_create(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create enum type\n");
+ printf(" failed to create enum type\n");
PART_ERROR(H5Tcommit_empty_enum_type);
}
@@ -741,14 +740,14 @@ test_create_committed_datatype_empty_types(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" committed empty enum datatype!\n");
+ printf(" committed empty enum datatype!\n");
PART_ERROR(H5Tcommit_empty_enum_type);
}
/* Add a field to the enum datatype */
if (H5Tenum_insert(type_id, "a", &enum_val) < 0) {
H5_FAILED();
- HDprintf(" failed to insert field into enum datatype\n");
+ printf(" failed to insert field into enum datatype\n");
PART_ERROR(H5Tcommit_empty_enum_type);
}
@@ -756,7 +755,7 @@ test_create_committed_datatype_empty_types(void)
if (H5Tcommit2(group_id, DATATYPE_CREATE_EMPTY_TYPES_TEST_ENUM_TYPE_NAME, type_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit non-empty enum datatype\n");
+ printf(" failed to commit non-empty enum datatype\n");
PART_ERROR(H5Tcommit_empty_enum_type);
}
@@ -814,52 +813,52 @@ test_recommit_committed_type(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, RECOMMIT_COMMITTED_TYPE_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", RECOMMIT_COMMITTED_TYPE_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", RECOMMIT_COMMITTED_TYPE_TEST_GROUP_NAME);
goto error;
}
/* Copy a predefined datatype and commit the copy */
if ((type_id = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" failed to copy predefined integer datatype\n");
+ printf(" failed to copy predefined integer datatype\n");
goto error;
}
if (H5Tcommit2(group_id, "native_int", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit datatype\n");
+ printf(" failed to commit datatype\n");
goto error;
}
if ((is_committed = H5Tcommitted(type_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to determine if datatype is committed\n");
+ printf(" failed to determine if datatype is committed\n");
goto error;
}
if (!is_committed) {
H5_FAILED();
- HDprintf(" H5Tcommitted() returned false!\n");
+ printf(" H5Tcommitted() returned false!\n");
goto error;
}
@@ -872,7 +871,7 @@ test_recommit_committed_type(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" re-committed an already committed datatype!\n");
+ printf(" re-committed an already committed datatype!\n");
goto error;
}
@@ -919,40 +918,40 @@ test_open_committed_datatype(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_OPEN_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATATYPE_OPEN_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATATYPE_OPEN_TEST_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype to commit\n");
+ printf(" couldn't create datatype to commit\n");
goto error;
}
if (H5Tcommit2(group_id, DATATYPE_OPEN_TEST_TYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", DATATYPE_OPEN_TEST_TYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", DATATYPE_OPEN_TEST_TYPE_NAME);
goto error;
}
@@ -961,7 +960,7 @@ test_open_committed_datatype(void)
if ((type_id = H5Topen2(group_id, DATATYPE_OPEN_TEST_TYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open committed datatype '%s'\n", DATATYPE_OPEN_TEST_TYPE_NAME);
+ printf(" couldn't open committed datatype '%s'\n", DATATYPE_OPEN_TEST_TYPE_NAME);
goto error;
}
@@ -1008,8 +1007,8 @@ test_open_committed_datatype_invalid_params(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
@@ -1017,34 +1016,34 @@ test_open_committed_datatype_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_OPEN_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATATYPE_OPEN_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATATYPE_OPEN_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype to commit\n");
+ printf(" couldn't create datatype to commit\n");
goto error;
}
if (H5Tcommit2(group_id, DATATYPE_OPEN_INVALID_PARAMS_TEST_TYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", DATATYPE_OPEN_INVALID_PARAMS_TEST_TYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", DATATYPE_OPEN_INVALID_PARAMS_TEST_TYPE_NAME);
goto error;
}
@@ -1067,7 +1066,7 @@ test_open_committed_datatype_invalid_params(void)
if (type_id >= 0) {
H5_FAILED();
- HDprintf(" opened committed datatype with an invalid location ID!\n");
+ printf(" opened committed datatype with an invalid location ID!\n");
H5Tclose(type_id);
PART_ERROR(H5Topen2_invalid_loc_id);
}
@@ -1088,7 +1087,7 @@ test_open_committed_datatype_invalid_params(void)
if (type_id >= 0) {
H5_FAILED();
- HDprintf(" opened committed datatype with an invalid datatype name!\n");
+ printf(" opened committed datatype with an invalid datatype name!\n");
H5Tclose(type_id);
PART_ERROR(H5Topen2_invalid_type_name);
}
@@ -1101,7 +1100,7 @@ test_open_committed_datatype_invalid_params(void)
if (type_id >= 0) {
H5_FAILED();
- HDprintf(" opened committed datatype with an invalid datatype name!\n");
+ printf(" opened committed datatype with an invalid datatype name!\n");
H5Tclose(type_id);
PART_ERROR(H5Topen2_invalid_type_name);
}
@@ -1122,7 +1121,7 @@ test_open_committed_datatype_invalid_params(void)
if (type_id >= 0) {
H5_FAILED();
- HDprintf(" opened committed datatype with an invalid TAPL!\n");
+ printf(" opened committed datatype with an invalid TAPL!\n");
H5Tclose(type_id);
PART_ERROR(H5Topen2_invalid_tapl);
}
@@ -1182,8 +1181,8 @@ test_reopen_committed_datatype_indirect(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or stored datatype aren't supported with "
- "this connector\n");
+ printf(" API functions for basic file, group, dataset, or stored datatype aren't supported with "
+ "this connector\n");
return 0;
}
@@ -1191,20 +1190,20 @@ test_reopen_committed_datatype_indirect(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_REOPEN_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATATYPE_REOPEN_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATATYPE_REOPEN_TEST_GROUP_NAME);
goto error;
}
@@ -1221,51 +1220,51 @@ test_reopen_committed_datatype_indirect(void)
if ((strtype = H5Tcopy(H5T_C_S1)) < 0) {
H5_FAILED();
- HDprintf(" failed to copy C-string datatype\n");
+ printf(" failed to copy C-string datatype\n");
PART_ERROR(reopen_compound_type);
}
if (H5Tset_size(strtype, H5T_VARIABLE) < 0) {
H5_FAILED();
- HDprintf(" failed to set string datatype's size to variable\n");
+ printf(" failed to set string datatype's size to variable\n");
PART_ERROR(reopen_compound_type);
}
if ((type_id = H5Tcreate(H5T_COMPOUND, sizeof(char *))) < 0) {
H5_FAILED();
- HDprintf(" failed to create compound datatype\n");
+ printf(" failed to create compound datatype\n");
PART_ERROR(reopen_compound_type);
}
if (H5Tinsert(type_id, "vlstr", (size_t)0, strtype) < 0) {
H5_FAILED();
- HDprintf(" failed to insert field into compound datatype\n");
+ printf(" failed to insert field into compound datatype\n");
PART_ERROR(reopen_compound_type);
}
if (H5Tclose(strtype) < 0) {
H5_FAILED();
- HDprintf(" failed to close string datatype\n");
+ printf(" failed to close string datatype\n");
PART_ERROR(reopen_compound_type);
}
/* Get size of compound type */
if ((dt_size = H5Tget_size(type_id)) == 0) {
H5_FAILED();
- HDprintf(" failed to retrieve size of compound datatype\n");
+ printf(" failed to retrieve size of compound datatype\n");
PART_ERROR(reopen_compound_type);
}
/* Commit compound type and verify the size doesn't change */
if (H5Tcommit2(group_id, "cmpd_type", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit compound datatype\n");
+ printf(" failed to commit compound datatype\n");
PART_ERROR(reopen_compound_type);
}
if (dt_size != H5Tget_size(type_id)) {
H5_FAILED();
- HDprintf(" committing datatype caused its size to change!\n");
+ printf(" committing datatype caused its size to change!\n");
PART_ERROR(reopen_compound_type);
}
@@ -1273,20 +1272,20 @@ test_reopen_committed_datatype_indirect(void)
if ((dset_id = H5Dcreate2(group_id, "cmpd_dset", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create dataset using committed datatype\n");
+ printf(" failed to create dataset using committed datatype\n");
PART_ERROR(reopen_compound_type);
}
/* Indirectly reopen type and verify that the size doesn't change */
if ((reopened_type_id = H5Dget_type(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to re-open committed datatype using H5Dget_type\n");
+ printf(" failed to re-open committed datatype using H5Dget_type\n");
PART_ERROR(reopen_compound_type);
}
if (dt_size != H5Tget_size(reopened_type_id)) {
H5_FAILED();
- HDprintf(" size of re-opened datatype didn't match size of original datatype\n");
+ printf(" size of re-opened datatype didn't match size of original datatype\n");
PART_ERROR(reopen_compound_type);
}
@@ -1315,41 +1314,41 @@ test_reopen_committed_datatype_indirect(void)
if ((type_id = H5Tenum_create(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create enum datatype\n");
+ printf(" failed to create enum datatype\n");
PART_ERROR(reopen_enum_type);
}
enum_value = 0;
if (H5Tenum_insert(type_id, "val1", &enum_value) < 0) {
H5_FAILED();
- HDprintf(" failed to insert value into enum datatype\n");
+ printf(" failed to insert value into enum datatype\n");
PART_ERROR(reopen_enum_type);
}
enum_value = 1;
if (H5Tenum_insert(type_id, "val2", &enum_value) < 0) {
H5_FAILED();
- HDprintf(" failed to insert value into enum datatype\n");
+ printf(" failed to insert value into enum datatype\n");
PART_ERROR(reopen_enum_type);
}
/* Get size of enum type */
if ((dt_size = H5Tget_size(type_id)) == 0) {
H5_FAILED();
- HDprintf(" failed to retrieve size of enum datatype\n");
+ printf(" failed to retrieve size of enum datatype\n");
PART_ERROR(reopen_enum_type);
}
/* Commit enum type and verify the size doesn't change */
if (H5Tcommit2(group_id, "enum_type", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit enum datatype\n");
+ printf(" failed to commit enum datatype\n");
PART_ERROR(reopen_enum_type);
}
if (dt_size != H5Tget_size(type_id)) {
H5_FAILED();
- HDprintf(" committing datatype caused its size to change!\n");
+ printf(" committing datatype caused its size to change!\n");
PART_ERROR(reopen_enum_type);
}
@@ -1357,20 +1356,20 @@ test_reopen_committed_datatype_indirect(void)
if ((dset_id = H5Dcreate2(group_id, "enum_dset", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create dataset using committed datatype\n");
+ printf(" failed to create dataset using committed datatype\n");
PART_ERROR(reopen_enum_type);
}
/* Indirectly reopen type and verify that the size doesn't change */
if ((reopened_type_id = H5Dget_type(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to re-open committed datatype using H5Dget_type\n");
+ printf(" failed to re-open committed datatype using H5Dget_type\n");
PART_ERROR(reopen_enum_type);
}
if (dt_size != H5Tget_size(reopened_type_id)) {
H5_FAILED();
- HDprintf(" size of re-opened datatype didn't match size of original datatype\n");
+ printf(" size of re-opened datatype didn't match size of original datatype\n");
PART_ERROR(reopen_enum_type);
}
@@ -1395,27 +1394,27 @@ test_reopen_committed_datatype_indirect(void)
if ((type_id = H5Tvlen_create(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create variable-length datatype\n");
+ printf(" failed to create variable-length datatype\n");
PART_ERROR(reopen_vlen_type);
}
/* Get size of variable-length type */
if ((dt_size = H5Tget_size(type_id)) == 0) {
H5_FAILED();
- HDprintf(" failed to retrieve size of variable-length datatype\n");
+ printf(" failed to retrieve size of variable-length datatype\n");
PART_ERROR(reopen_vlen_type);
}
/* Commit variable-length type and verify the size doesn't change */
if (H5Tcommit2(group_id, "vlen_type", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit variable-length datatype\n");
+ printf(" failed to commit variable-length datatype\n");
PART_ERROR(reopen_vlen_type);
}
if (dt_size != H5Tget_size(type_id)) {
H5_FAILED();
- HDprintf(" committing datatype caused its size to change!\n");
+ printf(" committing datatype caused its size to change!\n");
PART_ERROR(reopen_vlen_type);
}
@@ -1423,20 +1422,20 @@ test_reopen_committed_datatype_indirect(void)
if ((dset_id = H5Dcreate2(group_id, "vlen_dset", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create dataset using committed datatype\n");
+ printf(" failed to create dataset using committed datatype\n");
PART_ERROR(reopen_vlen_type);
}
/* Indirectly reopen type and verify that the size doesn't change */
if ((reopened_type_id = H5Dget_type(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to re-open committed datatype using H5Dget_type\n");
+ printf(" failed to re-open committed datatype using H5Dget_type\n");
PART_ERROR(reopen_vlen_type);
}
if (dt_size != H5Tget_size(reopened_type_id)) {
H5_FAILED();
- HDprintf(" size of re-opened datatype didn't match size of original datatype\n");
+ printf(" size of re-opened datatype didn't match size of original datatype\n");
PART_ERROR(reopen_vlen_type);
}
@@ -1463,33 +1462,33 @@ test_reopen_committed_datatype_indirect(void)
if ((type_id = H5Tcreate(H5T_OPAQUE, (size_t)13)) < 0) {
H5_FAILED();
- HDprintf(" failed to create opaque datatype\n");
+ printf(" failed to create opaque datatype\n");
PART_ERROR(reopen_opaque_type);
}
if (H5Tset_tag(type_id, tag) < 0) {
H5_FAILED();
- HDprintf(" failed to set tag on opaque datatype\n");
+ printf(" failed to set tag on opaque datatype\n");
PART_ERROR(reopen_opaque_type);
}
/* Get size of opaque type */
if ((dt_size = H5Tget_size(type_id)) == 0) {
H5_FAILED();
- HDprintf(" failed to retrieve size of opaque datatype\n");
+ printf(" failed to retrieve size of opaque datatype\n");
PART_ERROR(reopen_opaque_type);
}
/* Commit opaque type and verify the size doesn't change */
if (H5Tcommit2(group_id, "opaque_type", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit opaque datatype\n");
+ printf(" failed to commit opaque datatype\n");
PART_ERROR(reopen_opaque_type);
}
if (dt_size != H5Tget_size(type_id)) {
H5_FAILED();
- HDprintf(" committing datatype caused its size to change!\n");
+ printf(" committing datatype caused its size to change!\n");
PART_ERROR(reopen_opaque_type);
}
@@ -1497,20 +1496,20 @@ test_reopen_committed_datatype_indirect(void)
if ((dset_id = H5Dcreate2(group_id, "opaque_dset", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create dataset using committed datatype\n");
+ printf(" failed to create dataset using committed datatype\n");
PART_ERROR(reopen_opaque_type);
}
/* Indirectly reopen type and verify that the size doesn't change */
if ((reopened_type_id = H5Dget_type(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to re-open committed datatype using H5Dget_type\n");
+ printf(" failed to re-open committed datatype using H5Dget_type\n");
PART_ERROR(reopen_opaque_type);
}
if (dt_size != H5Tget_size(reopened_type_id)) {
H5_FAILED();
- HDprintf(" size of re-opened datatype didn't match size of original datatype\n");
+ printf(" size of re-opened datatype didn't match size of original datatype\n");
PART_ERROR(reopen_opaque_type);
}
@@ -1537,27 +1536,27 @@ test_reopen_committed_datatype_indirect(void)
if ((type_id = H5Tarray_create2(H5T_NATIVE_INT, 1, array_dims)) < 0) {
H5_FAILED();
- HDprintf(" failed to create array datatype\n");
+ printf(" failed to create array datatype\n");
PART_ERROR(reopen_array_type);
}
/* Get size of array type */
if ((dt_size = H5Tget_size(type_id)) == 0) {
H5_FAILED();
- HDprintf(" failed to retrieve size of array datatype\n");
+ printf(" failed to retrieve size of array datatype\n");
PART_ERROR(reopen_array_type);
}
/* Commit array type and verify the size doesn't change */
if (H5Tcommit2(group_id, "array_type", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit array datatype\n");
+ printf(" failed to commit array datatype\n");
PART_ERROR(reopen_array_type);
}
if (dt_size != H5Tget_size(type_id)) {
H5_FAILED();
- HDprintf(" committing datatype caused its size to change!\n");
+ printf(" committing datatype caused its size to change!\n");
PART_ERROR(reopen_array_type);
}
@@ -1565,20 +1564,20 @@ test_reopen_committed_datatype_indirect(void)
if ((dset_id = H5Dcreate2(group_id, "array_dset", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create dataset using committed datatype\n");
+ printf(" failed to create dataset using committed datatype\n");
PART_ERROR(reopen_array_type);
}
/* Indirectly reopen type and verify that the size doesn't change */
if ((reopened_type_id = H5Dget_type(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to re-open committed datatype using H5Dget_type\n");
+ printf(" failed to re-open committed datatype using H5Dget_type\n");
PART_ERROR(reopen_array_type);
}
if (dt_size != H5Tget_size(reopened_type_id)) {
H5_FAILED();
- HDprintf(" size of re-opened datatype didn't match size of original datatype\n");
+ printf(" size of re-opened datatype didn't match size of original datatype\n");
PART_ERROR(reopen_array_type);
}
@@ -1647,14 +1646,13 @@ test_close_committed_datatype_invalid_id(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(
- " API functions for basic file or stored datatype aren't supported with this connector\n");
+ printf(" API functions for basic file or stored datatype aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -1666,7 +1664,7 @@ test_close_committed_datatype_invalid_id(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Tclose succeeded with an invalid committed datatype ID!\n");
+ printf(" H5Tclose succeeded with an invalid committed datatype ID!\n");
goto error;
}
@@ -1706,8 +1704,8 @@ test_datatype_property_lists(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, stored datatype, or getting property list aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, stored datatype, or getting property list aren't "
+ "supported with this connector\n");
return 0;
}
@@ -1715,38 +1713,38 @@ test_datatype_property_lists(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_PROPERTY_LIST_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATATYPE_PROPERTY_LIST_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATATYPE_PROPERTY_LIST_TEST_SUBGROUP_NAME);
goto error;
}
if ((type_id1 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if ((type_id2 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if ((tcpl_id1 = H5Pcreate(H5P_DATATYPE_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create TCPL\n");
+ printf(" couldn't create TCPL\n");
goto error;
}
@@ -1755,14 +1753,14 @@ test_datatype_property_lists(void)
if (H5Tcommit2(group_id, DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME1, type_id1, H5P_DEFAULT, tcpl_id1,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME1);
+ printf(" couldn't commit datatype '%s'\n", DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME1);
goto error;
}
if (H5Tcommit2(group_id, DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME2, type_id2, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME2);
+ printf(" couldn't commit datatype '%s'\n", DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME2);
goto error;
}
@@ -1780,13 +1778,13 @@ test_datatype_property_lists(void)
/* Try to receive copies for the two property lists */
if ((tcpl_id1 = H5Tget_create_plist(type_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Tget_create_plist);
}
if ((tcpl_id2 = H5Tget_create_plist(type_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Tget_create_plist);
}
@@ -1837,26 +1835,26 @@ test_datatype_property_lists(void)
if ((type_id1 = H5Topen2(group_id, DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME1, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open datatype '%s'\n", DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME1);
+ printf(" couldn't open datatype '%s'\n", DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME1);
PART_ERROR(H5Tget_create_plist_reopened);
}
if ((type_id2 = H5Topen2(group_id, DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open datatype '%s'\n", DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME2);
+ printf(" couldn't open datatype '%s'\n", DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME2);
PART_ERROR(H5Tget_create_plist_reopened);
}
if ((tcpl_id1 = H5Tget_create_plist(type_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Tget_create_plist_reopened);
}
if ((tcpl_id2 = H5Tget_create_plist(type_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Tget_create_plist_reopened);
}
@@ -1923,40 +1921,40 @@ test_create_dataset_with_committed_type(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or stored datatype aren't supported with "
- "this connector\n");
+ printf(" API functions for basic file, group, dataset, or stored datatype aren't supported with "
+ "this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_CREATE_WITH_DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if (H5Tcommit2(group_id, DATASET_CREATE_WITH_DATATYPE_TEST_TYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_TYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_TYPE_NAME);
goto error;
}
@@ -1971,26 +1969,26 @@ test_create_dataset_with_committed_type(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_CREATE_WITH_DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((type_id = H5Topen2(group_id, DATASET_CREATE_WITH_DATATYPE_TEST_TYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open committed datatype '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_TYPE_NAME);
+ printf(" couldn't open committed datatype '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_TYPE_NAME);
goto error;
}
@@ -2000,8 +1998,8 @@ test_create_dataset_with_committed_type(void)
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME, type_id, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s' using committed datatype\n",
- DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s' using committed datatype\n",
+ DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME);
goto error;
}
@@ -2010,7 +2008,7 @@ test_create_dataset_with_committed_type(void)
if ((dset_id = H5Dopen2(group_id, DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME);
+ printf(" failed to open dataset '%s'\n", DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME);
goto error;
}
@@ -2067,41 +2065,40 @@ test_create_attribute_with_committed_type(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, attribute, or stored datatype aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, attribute, or stored datatype aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n",
- ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if (H5Tcommit2(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_DTYPE_NAME, type_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_DTYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_DTYPE_NAME);
goto error;
}
@@ -2110,8 +2107,7 @@ test_create_attribute_with_committed_type(void)
if ((type_id = H5Topen2(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_DTYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open committed datatype '%s'\n",
- ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_DTYPE_NAME);
+ printf(" couldn't open committed datatype '%s'\n", ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_DTYPE_NAME);
goto error;
}
@@ -2122,21 +2118,21 @@ test_create_attribute_with_committed_type(void)
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME, type_id, space_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s'\n", ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME);
+ printf(" couldn't create attribute '%s'\n", ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME);
goto error;
}
/* Verify the attribute has been created */
if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if attribute '%s' exists\n",
- ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME);
+ printf(" couldn't determine if attribute '%s' exists\n",
+ ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME);
goto error;
}
if (!attr_exists) {
H5_FAILED();
- HDprintf(" attribute did not exist\n");
+ printf(" attribute did not exist\n");
goto error;
}
@@ -2145,7 +2141,7 @@ test_create_attribute_with_committed_type(void)
if ((attr_id = H5Aopen(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open attribute '%s'\n", ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME);
+ printf(" couldn't open attribute '%s'\n", ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME);
goto error;
}
@@ -2200,70 +2196,70 @@ test_delete_committed_type(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, attribute, or stored datatype aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, attribute, or stored datatype aren't supported "
+ "with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s\n", H5_api_test_filename);
+ printf(" couldn't open file '%s\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_DELETE_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group '%s'\n", DATATYPE_DELETE_TEST_GROUP_NAME);
+ printf(" couldn't create container group '%s'\n", DATATYPE_DELETE_TEST_GROUP_NAME);
goto error;
}
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if (H5Tcommit2(group_id, DATATYPE_DELETE_TEST_DTYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", DATATYPE_DELETE_TEST_DTYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", DATATYPE_DELETE_TEST_DTYPE_NAME);
goto error;
}
if ((type_exists = H5Lexists(group_id, DATATYPE_DELETE_TEST_DTYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if datatype '%s' exists\n", DATATYPE_DELETE_TEST_DTYPE_NAME);
+ printf(" couldn't determine if datatype '%s' exists\n", DATATYPE_DELETE_TEST_DTYPE_NAME);
goto error;
}
if (!type_exists) {
H5_FAILED();
- HDprintf(" datatype didn't exist\n");
+ printf(" datatype didn't exist\n");
goto error;
}
if (H5Ldelete(group_id, DATATYPE_DELETE_TEST_DTYPE_NAME, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete datatype '%s'\n", DATATYPE_DELETE_TEST_DTYPE_NAME);
+ printf(" couldn't delete datatype '%s'\n", DATATYPE_DELETE_TEST_DTYPE_NAME);
goto error;
}
if ((type_exists = H5Lexists(group_id, DATATYPE_DELETE_TEST_DTYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if datatype '%s' exists\n", DATATYPE_DELETE_TEST_DTYPE_NAME);
+ printf(" couldn't determine if datatype '%s' exists\n", DATATYPE_DELETE_TEST_DTYPE_NAME);
goto error;
}
if (type_exists) {
H5_FAILED();
- HDprintf(" datatype exists\n");
+ printf(" datatype exists\n");
goto error;
}
@@ -2312,55 +2308,55 @@ test_resurrect_datatype(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, hard link, or stored datatype aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, link, hard link, or stored datatype aren't "
+ "supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATATYPE_RESURRECT_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATATYPE_RESURRECT_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATATYPE_RESURRECT_TEST_GROUP_NAME);
goto error;
}
/* Create a named datatype in the file */
if ((type_id = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" failed to copy predefined integer type\n");
+ printf(" failed to copy predefined integer type\n");
goto error;
}
if (H5Tcommit2(group_id, DATATYPE_RESURRECT_TEST_DTYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit datatype\n");
+ printf(" failed to commit datatype\n");
goto error;
}
/* Unlink the datatype while it's open (will mark it for deletion when closed) */
if (H5Ldelete(group_id, DATATYPE_RESURRECT_TEST_DTYPE_NAME, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete datatype\n");
+ printf(" failed to delete datatype\n");
goto error;
}
/* Check that datatype name is NULL */
if (H5Iget_name(type_id, NULL, (size_t)0) != 0) {
H5_FAILED();
- HDprintf(" deleted datatype name was not NULL!\n");
+ printf(" deleted datatype name was not NULL!\n");
goto error;
}
@@ -2368,7 +2364,7 @@ test_resurrect_datatype(void)
if (H5Lcreate_hard(type_id, ".", group_id, DATATYPE_RESURRECT_TEST_DTYPE_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create new link for deleted datatype\n");
+ printf(" failed to create new link for deleted datatype\n");
goto error;
}
@@ -2385,26 +2381,26 @@ test_resurrect_datatype(void)
/* Re-open the file */
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATATYPE_RESURRECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n", DATATYPE_RESURRECT_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n", DATATYPE_RESURRECT_TEST_GROUP_NAME);
goto error;
}
/* Attempt to open the datatype under the new name */
if ((type_id = H5Topen2(group_id, DATATYPE_RESURRECT_TEST_DTYPE_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open resurrected datatype\n");
+ printf(" failed to open resurrected datatype\n");
goto error;
}
@@ -2494,27 +2490,27 @@ test_cant_commit_predefined(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, PREDEFINED_TYPE_COMMIT_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", PREDEFINED_TYPE_COMMIT_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", PREDEFINED_TYPE_COMMIT_TEST_GROUP_NAME);
goto error;
}
@@ -2527,7 +2523,7 @@ test_cant_commit_predefined(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" committed a predefined datatype directly (without copying it)!\n");
+ printf(" committed a predefined datatype directly (without copying it)!\n");
goto error;
}
@@ -2574,52 +2570,52 @@ test_cant_modify_committed_type(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or stored datatype aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or stored datatype aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATATYPE_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, MODIFY_COMMITTED_TYPE_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", MODIFY_COMMITTED_TYPE_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", MODIFY_COMMITTED_TYPE_TEST_GROUP_NAME);
goto error;
}
/* Copy a predefined datatype and commit the copy */
if ((type_id = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" failed to copy predefined integer datatype\n");
+ printf(" failed to copy predefined integer datatype\n");
goto error;
}
if (H5Tcommit2(group_id, "native_int", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to commit datatype\n");
+ printf(" failed to commit datatype\n");
goto error;
}
if ((is_committed = H5Tcommitted(type_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to determine if datatype is committed\n");
+ printf(" failed to determine if datatype is committed\n");
goto error;
}
if (!is_committed) {
H5_FAILED();
- HDprintf(" H5Tcommitted() returned false!\n");
+ printf(" H5Tcommitted() returned false!\n");
goto error;
}
@@ -2632,7 +2628,7 @@ test_cant_modify_committed_type(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" modified committed datatype!\n");
+ printf(" modified committed datatype!\n");
goto error;
}
@@ -2668,17 +2664,17 @@ H5_api_datatype_test(void)
size_t i;
int nerrors;
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Datatype Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Datatype Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(datatype_tests); i++) {
nerrors += (*datatype_tests[i])() ? 1 : 0;
}
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/test/API/H5_api_file_test.c b/test/API/H5_api_file_test.c
index a8169e2..d3d686c 100644
--- a/test/API/H5_api_file_test.c
+++ b/test/API/H5_api_file_test.c
@@ -67,26 +67,26 @@ test_create_file(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
if (prefix_filename(test_path_prefix, FILE_CREATE_TEST_FILENAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if ((file_id = H5Fcreate(prefixed_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", prefixed_filename);
+ printf(" couldn't create file '%s'\n", prefixed_filename);
goto error;
}
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -100,7 +100,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -120,13 +120,13 @@ test_create_file_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
if (prefix_filename(test_path_prefix, FILE_CREATE_INVALID_PARAMS_FILE_NAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
@@ -144,7 +144,7 @@ test_create_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was created with a NULL name!\n");
+ printf(" file was created with a NULL name!\n");
H5Fclose(file_id);
PART_ERROR(H5Fcreate_invalid_name);
}
@@ -157,7 +157,7 @@ test_create_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was created with an invalid name of ''!\n");
+ printf(" file was created with an invalid name of ''!\n");
H5Fclose(file_id);
PART_ERROR(H5Fcreate_invalid_name);
}
@@ -178,7 +178,7 @@ test_create_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was created with invalid flag H5F_ACC_RDWR!\n");
+ printf(" file was created with invalid flag H5F_ACC_RDWR!\n");
H5Fclose(file_id);
PART_ERROR(H5Fcreate_invalid_flags);
}
@@ -191,7 +191,7 @@ test_create_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was created with invalid flag H5F_ACC_CREAT!\n");
+ printf(" file was created with invalid flag H5F_ACC_CREAT!\n");
H5Fclose(file_id);
PART_ERROR(H5Fcreate_invalid_flags);
}
@@ -204,7 +204,7 @@ test_create_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was created with invalid flag H5F_ACC_SWMR_READ!\n");
+ printf(" file was created with invalid flag H5F_ACC_SWMR_READ!\n");
H5Fclose(file_id);
PART_ERROR(H5Fcreate_invalid_flags);
}
@@ -225,7 +225,7 @@ test_create_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was created with invalid FCPL!\n");
+ printf(" file was created with invalid FCPL!\n");
H5Fclose(file_id);
PART_ERROR(H5Fcreate_invalid_fcpl);
}
@@ -236,7 +236,7 @@ test_create_file_invalid_params(void)
}
END_MULTIPART;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
return 0;
@@ -251,7 +251,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -272,19 +272,19 @@ test_create_file_excl(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
if (prefix_filename(test_path_prefix, FILE_CREATE_EXCL_FILE_NAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if ((file_id = H5Fcreate(prefixed_filename, H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first file\n");
+ printf(" couldn't create first file\n");
goto error;
}
@@ -303,21 +303,21 @@ test_create_file_excl(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" created already existing file using H5F_ACC_EXCL flag!\n");
+ printf(" created already existing file using H5F_ACC_EXCL flag!\n");
goto error;
}
/* Test creating with H5F_ACC_TRUNC. This will truncate the existing file on disk. */
if ((file_id = H5Fcreate(prefixed_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't truncate the existing file\n");
+ printf(" couldn't truncate the existing file\n");
goto error;
}
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -332,7 +332,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -350,7 +350,7 @@ test_open_file(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
@@ -362,7 +362,7 @@ test_open_file(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" unable to open file '%s' in read-only mode\n", H5_api_test_filename);
+ printf(" unable to open file '%s' in read-only mode\n", H5_api_test_filename);
PART_ERROR(H5Fopen_rdonly);
}
@@ -385,7 +385,7 @@ test_open_file(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" unable to open file '%s' in read-write mode\n", H5_api_test_filename);
+ printf(" unable to open file '%s' in read-write mode\n", H5_api_test_filename);
PART_ERROR(H5Fopen_rdwrite);
}
@@ -434,7 +434,7 @@ test_open_file_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
@@ -452,7 +452,7 @@ test_open_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was opened with a NULL name!\n");
+ printf(" file was opened with a NULL name!\n");
H5Fclose(file_id);
PART_ERROR(H5Fopen_invalid_name);
}
@@ -465,7 +465,7 @@ test_open_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was opened with an invalid name of ''!\n");
+ printf(" file was opened with an invalid name of ''!\n");
H5Fclose(file_id);
PART_ERROR(H5Fopen_invalid_name);
}
@@ -486,7 +486,7 @@ test_open_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was opened with invalid flag H5F_ACC_TRUNC!\n");
+ printf(" file was opened with invalid flag H5F_ACC_TRUNC!\n");
H5Fclose(file_id);
PART_ERROR(H5Fopen_invalid_flags);
}
@@ -499,7 +499,7 @@ test_open_file_invalid_params(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" file was opened with invalid flag H5F_ACC_EXCL!\n");
+ printf(" file was opened with invalid flag H5F_ACC_EXCL!\n");
H5Fclose(file_id);
PART_ERROR(H5Fopen_invalid_flags);
}
@@ -536,13 +536,13 @@ test_open_nonexistent_file(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
if (prefix_filename(test_path_prefix, NONEXISTENT_FILENAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
@@ -556,11 +556,11 @@ test_open_nonexistent_file(void)
if (file_id >= 0) {
H5_FAILED();
- HDprintf(" non-existent file was opened!\n");
+ printf(" non-existent file was opened!\n");
goto error;
}
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -574,7 +574,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -602,8 +602,8 @@ test_file_permission(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, attribute, or stored datatype aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, attribute, or stored datatype aren't "
+ "supported with this connector\n");
return 0;
}
@@ -611,26 +611,26 @@ test_file_permission(void)
if (prefix_filename(test_path_prefix, FILE_PERMISSION_TEST_FILENAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if ((file_id = H5Fcreate(prefixed_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", prefixed_filename);
+ printf(" couldn't create file '%s'\n", prefixed_filename);
goto error;
}
if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create data space\n");
+ printf(" couldn't create data space\n");
goto error;
}
if ((dset_id = H5Dcreate2(file_id, FILE_PERMISSION_TEST_DSET_NAME, H5T_STD_U32LE, dspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create data set: %s\n", FILE_PERMISSION_TEST_DSET_NAME);
+ printf(" couldn't create data set: %s\n", FILE_PERMISSION_TEST_DSET_NAME);
goto error;
}
@@ -642,7 +642,7 @@ test_file_permission(void)
/* Open the file (with read-only permission) */
if ((file_id = H5Fopen(prefixed_filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
@@ -664,7 +664,7 @@ test_file_permission(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" a group was created in a read-only file!\n");
+ printf(" a group was created in a read-only file!\n");
PART_ERROR(H5Gcreate_rdonly_file);
}
@@ -676,7 +676,7 @@ test_file_permission(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" a group was created in a read-only file!\n");
+ printf(" a group was created in a read-only file!\n");
PART_ERROR(H5Gcreate_rdonly_file);
}
@@ -698,7 +698,7 @@ test_file_permission(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" a dataset was created in a read-only file!\n");
+ printf(" a dataset was created in a read-only file!\n");
PART_ERROR(H5Dcreate_rdonly_file);
}
@@ -710,7 +710,7 @@ test_file_permission(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" a dataset was created in a read-only file!\n");
+ printf(" a dataset was created in a read-only file!\n");
PART_ERROR(H5Dcreate_rdonly_file);
}
@@ -732,7 +732,7 @@ test_file_permission(void)
if (attr_id >= 0) {
H5_FAILED();
- HDprintf(" an attribute was created in a read-only file!\n");
+ printf(" an attribute was created in a read-only file!\n");
PART_ERROR(H5Acreate_rdonly_file);
}
@@ -746,7 +746,7 @@ test_file_permission(void)
if ((dtype_id = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't copy a native datatype\n");
+ printf(" couldn't copy a native datatype\n");
PART_ERROR(H5Tcommit_rdonly_file);
}
@@ -760,7 +760,7 @@ test_file_permission(void)
if (h5_ret >= 0) {
H5_FAILED();
- HDprintf(" a named datatype was committed in a read-only file!\n");
+ printf(" a named datatype was committed in a read-only file!\n");
PART_ERROR(H5Tcommit_rdonly_file);
}
@@ -772,7 +772,7 @@ test_file_permission(void)
if (h5_ret >= 0) {
H5_FAILED();
- HDprintf(" a named datatype was committed in a read-only file!\n");
+ printf(" a named datatype was committed in a read-only file!\n");
PART_ERROR(H5Tcommit_rdonly_file);
}
@@ -791,7 +791,7 @@ test_file_permission(void)
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -810,7 +810,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -829,19 +829,19 @@ test_reopen_file(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((file_id2 = H5Freopen(file_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file\n");
+ printf(" couldn't re-open file\n");
goto error;
}
@@ -878,7 +878,7 @@ test_close_file_invalid_id(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
@@ -890,7 +890,7 @@ test_close_file_invalid_id(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" closed an invalid file ID!\n");
+ printf(" closed an invalid file ID!\n");
goto error;
}
@@ -921,8 +921,8 @@ test_flush_file(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(" API functions for basic file, dataset, or file flush aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, dataset, or file flush aren't supported with this "
+ "connector\n");
return 0;
}
@@ -930,20 +930,20 @@ test_flush_file(void)
if (prefix_filename(test_path_prefix, FILE_FLUSH_TEST_FILENAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if ((file_id = H5Fcreate(prefixed_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", prefixed_filename);
+ printf(" couldn't create file '%s'\n", prefixed_filename);
goto error;
}
/* Create multiple small datasets in file */
if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create data space\n");
+ printf(" couldn't create data space\n");
goto error;
}
@@ -953,7 +953,7 @@ test_flush_file(void)
if ((dset_id = H5Dcreate2(file_id, dset_name, H5T_STD_U32LE, dspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create data set: %s\n", dset_name);
+ printf(" couldn't create data set: %s\n", dset_name);
goto error;
}
@@ -971,7 +971,7 @@ test_flush_file(void)
if (H5Fflush(file_id, H5F_SCOPE_LOCAL) < 0) {
H5_FAILED();
- HDprintf(" unable to flush file with scope H5F_SCOPE_LOCAL\n");
+ printf(" unable to flush file with scope H5F_SCOPE_LOCAL\n");
PART_ERROR(H5Fflush_local);
}
@@ -985,7 +985,7 @@ test_flush_file(void)
if (H5Fflush(file_id, H5F_SCOPE_GLOBAL) < 0) {
H5_FAILED();
- HDprintf(" unable to flush file with scope H5F_SCOPE_GLOBAL\n");
+ printf(" unable to flush file with scope H5F_SCOPE_GLOBAL\n");
PART_ERROR(H5Fflush_global);
}
@@ -1002,7 +1002,7 @@ test_flush_file(void)
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -1018,7 +1018,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -1038,13 +1038,13 @@ test_file_is_accessible(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
if (prefix_filename(test_path_prefix, fake_filename, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
@@ -1056,14 +1056,14 @@ test_file_is_accessible(void)
if ((is_accessible = H5Fis_accessible(H5_api_test_filename, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if file '%s' is accessible with default FAPL\n",
- H5_api_test_filename);
+ printf(" couldn't determine if file '%s' is accessible with default FAPL\n",
+ H5_api_test_filename);
PART_ERROR(H5Fis_accessible_valid_file);
}
if (!is_accessible) {
H5_FAILED();
- HDprintf(" file '%s' is not accessible with default FAPL\n", H5_api_test_filename);
+ printf(" file '%s' is not accessible with default FAPL\n", H5_api_test_filename);
PART_ERROR(H5Fis_accessible_valid_file);
}
@@ -1085,8 +1085,8 @@ test_file_is_accessible(void)
if (is_accessible > 0) {
H5_FAILED();
- HDprintf(" non-existent file '%s' was accessible with default FAPL: is_accessible=%d!\n",
- prefixed_filename, is_accessible);
+ printf(" non-existent file '%s' was accessible with default FAPL: is_accessible=%d!\n",
+ prefixed_filename, is_accessible);
PART_ERROR(H5Fis_accessible_invalid_file);
}
@@ -1096,13 +1096,13 @@ test_file_is_accessible(void)
}
END_MULTIPART;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
return 0;
error:
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -1133,8 +1133,8 @@ test_file_property_lists(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic or more file or get property list aren't supported with this "
- "connector\n");
+ printf(" API functions for basic or more file or get property list aren't supported with this "
+ "connector\n");
return 0;
}
@@ -1142,36 +1142,36 @@ test_file_property_lists(void)
if (prefix_filename(test_path_prefix, FILE_PROPERTY_LIST_TEST_FNAME1, &prefixed_filename1) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if (prefix_filename(test_path_prefix, FILE_PROPERTY_LIST_TEST_FNAME2, &prefixed_filename2) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if ((fcpl_id1 = H5Pcreate(H5P_FILE_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create FCPL\n");
+ printf(" couldn't create FCPL\n");
goto error;
}
if (H5Pset_userblock(fcpl_id1, FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL) < 0) {
H5_FAILED();
- HDprintf(" failed to set test property on FCPL\n");
+ printf(" failed to set test property on FCPL\n");
goto error;
}
if ((file_id1 = H5Fcreate(prefixed_filename1, H5F_ACC_TRUNC, fcpl_id1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file\n");
+ printf(" couldn't create file\n");
goto error;
}
if ((file_id2 = H5Fcreate(prefixed_filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file\n");
+ printf(" couldn't create file\n");
goto error;
}
@@ -1190,42 +1190,42 @@ test_file_property_lists(void)
* does not */
if ((fcpl_id1 = H5Fget_create_plist(file_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get FCPL\n");
+ printf(" couldn't get FCPL\n");
PART_ERROR(H5Fget_create_plist);
}
if ((fcpl_id2 = H5Fget_create_plist(file_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get FCPL\n");
+ printf(" couldn't get FCPL\n");
PART_ERROR(H5Fget_create_plist);
}
/* Ensure that property list 1 has the property set and property list 2 does not */
if (H5Pget_userblock(fcpl_id1, &prop_val) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve test property from FCPL\n");
+ printf(" failed to retrieve test property from FCPL\n");
PART_ERROR(H5Fget_create_plist);
}
if (prop_val != FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL) {
H5_FAILED();
- HDprintf(" retrieved test property value '%llu' did not match expected value '%llu'\n",
- (long long unsigned)prop_val,
- (long long unsigned)FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL);
+ printf(" retrieved test property value '%llu' did not match expected value '%llu'\n",
+ (long long unsigned)prop_val,
+ (long long unsigned)FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL);
PART_ERROR(H5Fget_create_plist);
}
if (H5Pget_userblock(fcpl_id2, &prop_val) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve test property from FCPL\n");
+ printf(" failed to retrieve test property from FCPL\n");
PART_ERROR(H5Fget_create_plist);
}
if (prop_val == FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL) {
- HDprintf(" retrieved test property value '%llu' matched control value '%llu' when it "
- "shouldn't have\n",
- (long long unsigned)prop_val,
- (long long unsigned)FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL);
+ printf(" retrieved test property value '%llu' matched control value '%llu' when it "
+ "shouldn't have\n",
+ (long long unsigned)prop_val,
+ (long long unsigned)FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL);
PART_ERROR(H5Fget_create_plist);
}
@@ -1244,13 +1244,13 @@ test_file_property_lists(void)
*/
if ((fapl_id1 = H5Fget_access_plist(file_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get FAPL\n");
+ printf(" couldn't get FAPL\n");
PART_ERROR(H5Fget_access_plist);
}
if ((fapl_id2 = H5Fget_access_plist(file_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get FAPL\n");
+ printf(" couldn't get FAPL\n");
PART_ERROR(H5Fget_access_plist);
}
@@ -1318,54 +1318,54 @@ test_file_property_lists(void)
if ((file_id1 = H5Fopen(prefixed_filename1, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
PART_ERROR(H5Fget_create_plist_reopened);
}
if ((file_id2 = H5Fopen(prefixed_filename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
PART_ERROR(H5Fget_create_plist_reopened);
}
if ((fcpl_id1 = H5Fget_create_plist(file_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get FCPL\n");
+ printf(" couldn't get FCPL\n");
PART_ERROR(H5Fget_create_plist_reopened);
}
if ((fcpl_id2 = H5Fget_create_plist(file_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get FCPL\n");
+ printf(" couldn't get FCPL\n");
PART_ERROR(H5Fget_create_plist_reopened);
}
/* Check the values of the test property */
if (H5Pget_userblock(fcpl_id1, &prop_val) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve test property from FCPL\n");
+ printf(" failed to retrieve test property from FCPL\n");
PART_ERROR(H5Fget_create_plist_reopened);
}
if (prop_val != FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL) {
H5_FAILED();
- HDprintf(" retrieved test property value '%llu' did not match expected value '%llu'\n",
- (long long unsigned)prop_val,
- (long long unsigned)FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL);
+ printf(" retrieved test property value '%llu' did not match expected value '%llu'\n",
+ (long long unsigned)prop_val,
+ (long long unsigned)FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL);
PART_ERROR(H5Fget_create_plist_reopened);
}
if (H5Pget_userblock(fcpl_id2, &prop_val) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve test property from FCPL\n");
+ printf(" failed to retrieve test property from FCPL\n");
PART_ERROR(H5Fget_create_plist_reopened);
}
if (prop_val == FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL) {
- HDprintf(" retrieved test property value '%llu' matched control value '%llu' when it "
- "shouldn't have\n",
- (long long unsigned)prop_val,
- (long long unsigned)FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL);
+ printf(" retrieved test property value '%llu' matched control value '%llu' when it "
+ "shouldn't have\n",
+ (long long unsigned)prop_val,
+ (long long unsigned)FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL);
PART_ERROR(H5Fget_create_plist_reopened);
}
@@ -1386,9 +1386,9 @@ test_file_property_lists(void)
if (H5Fclose(file_id2) < 0)
TEST_ERROR;
- HDfree(prefixed_filename1);
+ free(prefixed_filename1);
prefixed_filename1 = NULL;
- HDfree(prefixed_filename2);
+ free(prefixed_filename2);
prefixed_filename2 = NULL;
PASSED();
@@ -1407,8 +1407,8 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename1);
- HDfree(prefixed_filename2);
+ free(prefixed_filename1);
+ free(prefixed_filename2);
return 1;
}
@@ -1428,7 +1428,7 @@ test_get_file_intent(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic or more file aren't supported with this connector\n");
+ printf(" API functions for basic or more file aren't supported with this connector\n");
return 0;
}
@@ -1436,14 +1436,14 @@ test_get_file_intent(void)
if (prefix_filename(test_path_prefix, FILE_INTENT_TEST_FILENAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
/* Test that file intent retrieval works correctly for file create */
if ((file_id = H5Fcreate(prefixed_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", prefixed_filename);
+ printf(" couldn't create file '%s'\n", prefixed_filename);
goto error;
}
@@ -1457,13 +1457,13 @@ test_get_file_intent(void)
if (H5Fget_intent(file_id, &file_intent) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve file intent\n");
+ printf(" failed to retrieve file intent\n");
PART_ERROR(H5Fget_intent_file_creation);
}
if (H5F_ACC_RDWR != file_intent) {
H5_FAILED();
- HDprintf(" received incorrect file intent for file creation\n");
+ printf(" received incorrect file intent for file creation\n");
PART_ERROR(H5Fget_intent_file_creation);
}
@@ -1487,19 +1487,19 @@ test_get_file_intent(void)
/* Test that file intent retrieval works correctly for file open */
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
PART_ERROR(H5Fget_intent_rdonly_file_open);
}
if (H5Fget_intent(file_id, &file_intent) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve file intent\n");
+ printf(" failed to retrieve file intent\n");
PART_ERROR(H5Fget_intent_rdonly_file_open);
}
if (H5F_ACC_RDONLY != file_intent) {
H5_FAILED();
- HDprintf(" received incorrect file intent for read-only file open\n");
+ printf(" received incorrect file intent for read-only file open\n");
PART_ERROR(H5Fget_intent_rdonly_file_open);
}
@@ -1522,19 +1522,19 @@ test_get_file_intent(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
PART_ERROR(H5Fget_intent_rdwrite_file_open);
}
if (H5Fget_intent(file_id, &file_intent) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve file intent\n");
+ printf(" failed to retrieve file intent\n");
PART_ERROR(H5Fget_intent_rdwrite_file_open);
}
if (H5F_ACC_RDWR != file_intent) {
H5_FAILED();
- HDprintf(" received incorrect file intent\n");
+ printf(" received incorrect file intent\n");
PART_ERROR(H5Fget_intent_rdwrite_file_open);
}
@@ -1553,7 +1553,7 @@ test_get_file_intent(void)
}
END_MULTIPART;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
return 0;
@@ -1565,7 +1565,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -1597,7 +1597,7 @@ test_get_file_obj_count(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic or more file, basic dataset, group, stored datatypes, or attribute "
"aren't supported with this connector\n");
return 0;
@@ -1607,53 +1607,53 @@ test_get_file_obj_count(void)
if (prefix_filename(test_path_prefix, GET_OBJ_COUNT_TEST_FILENAME1, &prefixed_filename1) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if (prefix_filename(test_path_prefix, GET_OBJ_COUNT_TEST_FILENAME2, &prefixed_filename2) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if ((file_id = H5Fcreate(prefixed_filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", prefixed_filename1);
+ printf(" couldn't create file '%s'\n", prefixed_filename1);
goto error;
}
if ((group_id = H5Gcreate2(file_id, GET_OBJ_COUNT_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", GET_OBJ_COUNT_TEST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", GET_OBJ_COUNT_TEST_GRP_NAME);
goto error;
}
/* Create a second file while keeping the first file open */
if ((file_id2 = H5Fcreate(prefixed_filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", prefixed_filename2);
+ printf(" couldn't create file '%s'\n", prefixed_filename2);
goto error;
}
/* Create a named datatype */
if ((named_dtype_id = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't copy a native datatype\n");
+ printf(" couldn't copy a native datatype\n");
goto error;
}
if (H5Tcommit2(file_id2, GET_OBJ_COUNT_TEST_NAMED_DTYPE, named_dtype_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit a named datatype\n");
+ printf(" couldn't commit a named datatype\n");
goto error;
}
/* Create a dataspace for the attribute and dataset */
if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create data space for attribute\n");
+ printf(" couldn't create data space for attribute\n");
goto error;
}
@@ -1661,7 +1661,7 @@ test_get_file_obj_count(void)
if ((attr_id = H5Acreate2(file_id2, GET_OBJ_COUNT_TEST_ATTR_NAME, H5T_NATIVE_INT, dspace_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the attribute '%s'\n", GET_OBJ_COUNT_TEST_ATTR_NAME);
+ printf(" couldn't create the attribute '%s'\n", GET_OBJ_COUNT_TEST_ATTR_NAME);
goto error;
}
@@ -1669,7 +1669,7 @@ test_get_file_obj_count(void)
if ((dset_id = H5Dcreate2(file_id2, GET_OBJ_COUNT_TEST_DSET_NAME, H5T_NATIVE_INT, dspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the dataset '%s'\n", GET_OBJ_COUNT_TEST_DSET_NAME);
+ printf(" couldn't create the dataset '%s'\n", GET_OBJ_COUNT_TEST_DSET_NAME);
goto error;
}
@@ -1684,13 +1684,13 @@ test_get_file_obj_count(void)
/* Get the number of files currently opened */
if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_FILE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the number of open files\n");
+ printf(" couldn't get the number of open files\n");
PART_ERROR(H5Fget_obj_count_files);
}
if (obj_count != 2) {
H5_FAILED();
- HDprintf(" number of open files (%ld) did not match expected number (2)\n", obj_count);
+ printf(" number of open files (%ld) did not match expected number (2)\n", obj_count);
PART_ERROR(H5Fget_obj_count_files);
}
@@ -1705,13 +1705,13 @@ test_get_file_obj_count(void)
/* Get the number of groups */
if ((obj_count = H5Fget_obj_count(file_id, H5F_OBJ_GROUP)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve number of open groups\n");
+ printf(" couldn't retrieve number of open groups\n");
PART_ERROR(H5Fget_obj_count_grps_single_file);
}
if (obj_count != 1) {
H5_FAILED();
- HDprintf(" number of open groups (%ld) did not match expected number (1)\n", obj_count);
+ printf(" number of open groups (%ld) did not match expected number (1)\n", obj_count);
PART_ERROR(H5Fget_obj_count_grps_single_file);
}
@@ -1726,13 +1726,13 @@ test_get_file_obj_count(void)
/* Get the number of groups in two opened files */
if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_GROUP)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the number of open groups\n");
+ printf(" couldn't get the number of open groups\n");
PART_ERROR(H5Fget_obj_count_grps);
}
if (obj_count != 1) {
H5_FAILED();
- HDprintf(" number of open groups (%ld) did not match expected number (1)\n", obj_count);
+ printf(" number of open groups (%ld) did not match expected number (1)\n", obj_count);
PART_ERROR(H5Fget_obj_count_grps);
}
@@ -1747,14 +1747,14 @@ test_get_file_obj_count(void)
/* Get the number of named datatype in two opened files */
if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_DATATYPE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the number of open named datatypes\n");
+ printf(" couldn't get the number of open named datatypes\n");
PART_ERROR(H5Fget_obj_count_types);
}
if (obj_count != 1) {
H5_FAILED();
- HDprintf(" number of open named datatypes (%ld) did not match expected number (1)\n",
- obj_count);
+ printf(" number of open named datatypes (%ld) did not match expected number (1)\n",
+ obj_count);
PART_ERROR(H5Fget_obj_count_types);
}
@@ -1769,14 +1769,13 @@ test_get_file_obj_count(void)
/* Get the number of attribute in two opened files */
if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_ATTR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the number of open attributes\n");
+ printf(" couldn't get the number of open attributes\n");
PART_ERROR(H5Fget_obj_count_attrs);
}
if (obj_count != 1) {
H5_FAILED();
- HDprintf(" number of open attributes (%ld) did not match expected number (1)\n",
- obj_count);
+ printf(" number of open attributes (%ld) did not match expected number (1)\n", obj_count);
PART_ERROR(H5Fget_obj_count_attrs);
}
@@ -1791,13 +1790,13 @@ test_get_file_obj_count(void)
/* Get the number of dataset in two opened files */
if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_DATASET)) < 0 || obj_count != 1) {
H5_FAILED();
- HDprintf(" couldn't get the number of open datasets\n");
+ printf(" couldn't get the number of open datasets\n");
PART_ERROR(H5Fget_obj_count_dsets);
}
if (obj_count != 1) {
H5_FAILED();
- HDprintf(" number of open datasets (%ld) did not match expected number (1)\n", obj_count);
+ printf(" number of open datasets (%ld) did not match expected number (1)\n", obj_count);
PART_ERROR(H5Fget_obj_count_dsets);
}
@@ -1812,14 +1811,14 @@ test_get_file_obj_count(void)
/* Get the number of all open objects */
if ((obj_count = H5Fget_obj_count(file_id, H5F_OBJ_ALL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve number of open objects\n");
+ printf(" couldn't retrieve number of open objects\n");
PART_ERROR(H5Fget_obj_count_all_single_file);
}
/* One for the file and another for the group */
if (obj_count != 2) {
H5_FAILED();
- HDprintf(" number of open objects (%ld) did not match expected number (2)\n", obj_count);
+ printf(" number of open objects (%ld) did not match expected number (2)\n", obj_count);
PART_ERROR(H5Fget_obj_count_all_single_file);
}
@@ -1834,13 +1833,13 @@ test_get_file_obj_count(void)
/* Get the number of all open objects */
if ((obj_count = H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve number of open objects\n");
+ printf(" couldn't retrieve number of open objects\n");
PART_ERROR(H5Fget_obj_count_all);
}
if (obj_count != 6) {
H5_FAILED();
- HDprintf(" number of open objects (%ld) did not match expected number (6)\n", obj_count);
+ printf(" number of open objects (%ld) did not match expected number (6)\n", obj_count);
PART_ERROR(H5Fget_obj_count_all);
}
@@ -1854,14 +1853,14 @@ test_get_file_obj_count(void)
if (H5Fget_obj_ids(file_id, H5F_OBJ_GROUP, (size_t)obj_count, &object_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't get opened group IDs\n");
+ printf(" couldn't get opened group IDs\n");
PART_ERROR(H5Fget_obj_ids_singular_grp);
}
if (object_id != group_id) {
H5_FAILED();
- HDprintf(" opened object ID (%ld) did not match only currently open group ID (%ld)\n",
- object_id, group_id);
+ printf(" opened object ID (%ld) did not match only currently open group ID (%ld)\n",
+ object_id, group_id);
PART_ERROR(H5Fget_obj_ids_singular_grp);
}
@@ -1888,9 +1887,9 @@ test_get_file_obj_count(void)
if (H5Fclose(file_id2) < 0)
TEST_ERROR;
- HDfree(prefixed_filename1);
+ free(prefixed_filename1);
prefixed_filename1 = NULL;
- HDfree(prefixed_filename2);
+ free(prefixed_filename2);
prefixed_filename2 = NULL;
PASSED();
@@ -1910,8 +1909,8 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename1);
- HDfree(prefixed_filename2);
+ free(prefixed_filename1);
+ free(prefixed_filename2);
return 1;
}
@@ -1937,40 +1936,40 @@ test_file_open_overlap(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic or more file, dataset, or group aren't supported with this "
- "connector\n");
+ printf(" API functions for basic or more file, dataset, or group aren't supported with this "
+ "connector\n");
return 0;
}
if (prefix_filename(test_path_prefix, OVERLAPPING_FILENAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if ((file_id = H5Fcreate(prefixed_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", prefixed_filename);
+ printf(" couldn't create file '%s'\n", prefixed_filename);
goto error;
}
if ((file_id2 = H5Fopen(prefixed_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", prefixed_filename);
+ printf(" couldn't open file '%s'\n", prefixed_filename);
goto error;
}
if ((group_id = H5Gcreate2(file_id, OVERLAPPING_OPEN_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OVERLAPPING_OPEN_TEST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", OVERLAPPING_OPEN_TEST_GRP_NAME);
goto error;
}
/* Create a dataspace for the dataset */
if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create data space for dataset\n");
+ printf(" couldn't create data space for dataset\n");
goto error;
}
@@ -1978,20 +1977,20 @@ test_file_open_overlap(void)
if ((dset_id = H5Dcreate2(group_id, OVERLAPPING_OPEN_TEST_DSET_NAME, H5T_NATIVE_INT, dspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the dataset '%s'\n", OVERLAPPING_OPEN_TEST_DSET_NAME);
+ printf(" couldn't create the dataset '%s'\n", OVERLAPPING_OPEN_TEST_DSET_NAME);
goto error;
}
/* Get the number of objects opened in the first file: 3 == file + dataset + group */
if ((obj_count = H5Fget_obj_count(file_id, H5F_OBJ_LOCAL | H5F_OBJ_ALL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve the number of objects opened in the file\n");
+ printf(" couldn't retrieve the number of objects opened in the file\n");
goto error;
}
if (obj_count != 3) {
H5_FAILED();
- HDprintf(" number of objects opened in file (%ld) did not match expected number (3)\n", obj_count);
+ printf(" number of objects opened in file (%ld) did not match expected number (3)\n", obj_count);
goto error;
}
@@ -2006,21 +2005,21 @@ test_file_open_overlap(void)
if ((dset_id = H5Dcreate2(file_id2, OVERLAPPING_OPEN_TEST_DSET_NAME, H5T_NATIVE_INT, dspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the dataset '%s'\n", OVERLAPPING_OPEN_TEST_DSET_NAME);
+ printf(" couldn't create the dataset '%s'\n", OVERLAPPING_OPEN_TEST_DSET_NAME);
goto error;
}
/* Get the number of objects opened in the first file: 2 == file + dataset */
if ((obj_count = H5Fget_obj_count(file_id2, H5F_OBJ_ALL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve the number of objects opened in the file\n");
+ printf(" couldn't retrieve the number of objects opened in the file\n");
goto error;
}
if (obj_count != 2) {
H5_FAILED();
- HDprintf(" number of objects opened in the file (%ld) did not match expected number (2)\n",
- obj_count);
+ printf(" number of objects opened in the file (%ld) did not match expected number (2)\n",
+ obj_count);
goto error;
}
@@ -2031,7 +2030,7 @@ test_file_open_overlap(void)
if (H5Fclose(file_id2) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -2049,7 +2048,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -2072,46 +2071,46 @@ test_file_mounts(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_MOUNT) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, file mount, or basic group aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, file mount, or basic group aren't supported with this "
+ "connector\n");
return 0;
}
if (prefix_filename(test_path_prefix, FILE_MOUNT_TEST_FILENAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if ((file_id = H5Fcreate(prefixed_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", prefixed_filename);
+ printf(" couldn't create file '%s'\n", prefixed_filename);
goto error;
}
if ((group_id = H5Gcreate2(file_id, FILE_MOUNT_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", FILE_MOUNT_TEST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", FILE_MOUNT_TEST_GRP_NAME);
goto error;
}
if ((child_fid = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
/* Mount one file (child_fid) to the group of another file (file_id) */
if (H5Fmount(file_id, FILE_MOUNT_TEST_GRP_NAME, child_fid, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't mount file\n");
+ printf(" couldn't mount file\n");
goto error;
}
if (H5Funmount(file_id, FILE_MOUNT_TEST_GRP_NAME) < 0) {
H5_FAILED();
- HDprintf(" couldn't mount file\n");
+ printf(" couldn't mount file\n");
goto error;
}
@@ -2122,7 +2121,7 @@ test_file_mounts(void)
if (H5Fclose(child_fid) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -2138,7 +2137,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -2167,7 +2166,7 @@ test_get_file_name(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic or more file, basic dataset, group, stored datatypes, or attribute "
"aren't supported with this connector\n");
return 0;
@@ -2177,13 +2176,13 @@ test_get_file_name(void)
if (prefix_filename(test_path_prefix, GET_FILE_NAME_TEST_FNAME, &prefixed_filename) < 0) {
H5_FAILED();
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
goto error;
}
if ((file_id = H5Fcreate(prefixed_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", prefixed_filename);
+ printf(" couldn't create file '%s'\n", prefixed_filename);
goto error;
}
@@ -2192,7 +2191,7 @@ test_get_file_name(void)
TEST_ERROR;
/* Allocate buffer for file name */
- if (NULL == (file_name_buf = (char *)HDmalloc((size_t)file_name_buf_len + 1)))
+ if (NULL == (file_name_buf = (char *)malloc((size_t)file_name_buf_len + 1)))
TEST_ERROR;
PASSED();
@@ -2208,14 +2207,14 @@ test_get_file_name(void)
/* Retrieve the actual file name */
if (H5Fget_name(file_id, file_name_buf, (size_t)file_name_buf_len + 1) < 0) {
H5_FAILED();
- HDprintf(" couldn't get file name %s\n", prefixed_filename);
+ printf(" couldn't get file name %s\n", prefixed_filename);
PART_ERROR(H5Fget_name_file_id);
}
if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
- HDprintf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
- prefixed_filename);
+ printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
+ prefixed_filename);
PART_ERROR(H5Fget_name_file_id);
}
@@ -2233,20 +2232,20 @@ test_get_file_name(void)
if ((group_id = H5Gcreate2(file_id, GET_FILE_NAME_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create group '%s'\n", GET_FILE_NAME_TEST_GRP_NAME);
+ printf(" failed to create group '%s'\n", GET_FILE_NAME_TEST_GRP_NAME);
PART_ERROR(H5Fget_name_grp_id);
}
if (H5Fget_name(group_id, file_name_buf, (size_t)file_name_buf_len + 1) < 0) {
H5_FAILED();
- HDprintf(" couldn't get file name %s\n", prefixed_filename);
+ printf(" couldn't get file name %s\n", prefixed_filename);
PART_ERROR(H5Fget_name_grp_id);
}
if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
- HDprintf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
- prefixed_filename);
+ printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
+ prefixed_filename);
PART_ERROR(H5Fget_name_grp_id);
}
@@ -2269,7 +2268,7 @@ test_get_file_name(void)
if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataspace\n");
+ printf(" couldn't create dataspace\n");
PART_ERROR(H5Fget_name_dset_id);
}
@@ -2277,21 +2276,21 @@ test_get_file_name(void)
if ((dset_id = H5Dcreate2(file_id, GET_FILE_NAME_TEST_DSET_NAME, H5T_NATIVE_INT, dspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the dataset '%s'\n", GET_FILE_NAME_TEST_DSET_NAME);
+ printf(" couldn't create the dataset '%s'\n", GET_FILE_NAME_TEST_DSET_NAME);
PART_ERROR(H5Fget_name_dset_id);
}
/* Get and verify file name from the dataset */
if (H5Fget_name(dset_id, file_name_buf, (size_t)file_name_buf_len + 1) < 0) {
H5_FAILED();
- HDprintf(" couldn't get file name %s\n", prefixed_filename);
+ printf(" couldn't get file name %s\n", prefixed_filename);
PART_ERROR(H5Fget_name_dset_id);
}
if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
- HDprintf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
- prefixed_filename);
+ printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
+ prefixed_filename);
PART_ERROR(H5Fget_name_dset_id);
}
@@ -2322,7 +2321,7 @@ test_get_file_name(void)
if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataspace\n");
+ printf(" couldn't create dataspace\n");
PART_ERROR(H5Fget_name_attr_id);
}
@@ -2330,21 +2329,21 @@ test_get_file_name(void)
if ((attr_id = H5Acreate2(file_id, GET_FILE_NAME_TEST_ATTR_NAME, H5T_NATIVE_INT, dspace_id,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create the attribute '%s'\n", GET_FILE_NAME_TEST_ATTR_NAME);
+ printf(" couldn't create the attribute '%s'\n", GET_FILE_NAME_TEST_ATTR_NAME);
PART_ERROR(H5Fget_name_attr_id);
}
/* Get and verify file name from the attribute */
if (H5Fget_name(attr_id, file_name_buf, (size_t)file_name_buf_len + 1) < 0) {
H5_FAILED();
- HDprintf(" couldn't get file name %s\n", prefixed_filename);
+ printf(" couldn't get file name %s\n", prefixed_filename);
PART_ERROR(H5Fget_name_attr_id);
}
if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
- HDprintf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
- prefixed_filename);
+ printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
+ prefixed_filename);
PART_ERROR(H5Fget_name_attr_id);
}
@@ -2376,28 +2375,28 @@ test_get_file_name(void)
/* Create a named datatype */
if ((named_dtype_id = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't copy a native datatype\n");
+ printf(" couldn't copy a native datatype\n");
PART_ERROR(H5Fget_name_dtype_id);
}
if (H5Tcommit2(file_id, GET_FILE_NAME_TEST_NAMED_DTYPE, named_dtype_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit a named datatype\n");
+ printf(" couldn't commit a named datatype\n");
PART_ERROR(H5Fget_name_dtype_id);
}
/* Get and verify file name from the committed datatype */
if (H5Fget_name(named_dtype_id, file_name_buf, (size_t)file_name_buf_len + 1) < 0) {
H5_FAILED();
- HDprintf(" couldn't get file name %s\n", prefixed_filename);
+ printf(" couldn't get file name %s\n", prefixed_filename);
PART_ERROR(H5Fget_name_dtype_id);
}
if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
- HDprintf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
- prefixed_filename);
+ printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
+ prefixed_filename);
PART_ERROR(H5Fget_name_dtype_id);
}
@@ -2422,7 +2421,7 @@ test_get_file_name(void)
if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataspace\n");
+ printf(" couldn't create dataspace\n");
PART_ERROR(H5Fget_name_dspace_id);
}
@@ -2436,7 +2435,7 @@ test_get_file_name(void)
if (name_len >= 0) {
H5_FAILED();
- HDprintf(" retrieved file name using H5Fget_name on a dataspace ID!\n");
+ printf(" retrieved file name using H5Fget_name on a dataspace ID!\n");
PART_ERROR(H5Fget_name_dspace_id);
}
@@ -2458,14 +2457,14 @@ test_get_file_name(void)
TESTING_2("test cleanup");
if (file_name_buf) {
- HDfree(file_name_buf);
+ free(file_name_buf);
file_name_buf = NULL;
}
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -2476,7 +2475,7 @@ error:
H5E_BEGIN_TRY
{
if (file_name_buf)
- HDfree(file_name_buf);
+ free(file_name_buf);
H5Tclose(named_dtype_id);
H5Sclose(dspace_id);
H5Dclose(dset_id);
@@ -2486,7 +2485,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -2521,19 +2520,19 @@ H5_api_file_test(void)
size_t i;
int nerrors;
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API File Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API File Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(file_tests); i++) {
nerrors += (*file_tests[i])() ? 1 : 0;
}
- HDprintf("\n");
+ printf("\n");
- HDprintf("Cleaning up testing files\n");
+ printf("Cleaning up testing files\n");
cleanup_files();
return nerrors;
diff --git a/test/API/H5_api_group_test.c b/test/API/H5_api_group_test.c
index 016d988..20ced5b 100644
--- a/test/API/H5_api_group_test.c
+++ b/test/API/H5_api_group_test.c
@@ -70,13 +70,13 @@ test_create_group_under_root(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -84,7 +84,7 @@ test_create_group_under_root(void)
if ((parent_gid =
H5Gcreate2(file_id, GROUP_CREATE_UNDER_ROOT_GNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", GROUP_CREATE_UNDER_ROOT_GNAME);
+ printf(" couldn't create group '%s'\n", GROUP_CREATE_UNDER_ROOT_GNAME);
goto error;
}
@@ -124,20 +124,20 @@ test_create_group_under_existing_group(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
/* Open the already-existing group (/group_tests) in the file as the parent */
if ((parent_group_id = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group\n");
+ printf(" couldn't open group\n");
goto error;
}
@@ -146,7 +146,7 @@ test_create_group_under_existing_group(void)
if ((child_group_id = H5Gcreate2(parent_group_id, GROUP_CREATE_UNDER_GROUP_REL_GNAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group using relative path: %s\n", GROUP_CREATE_UNDER_GROUP_REL_GNAME);
+ printf(" couldn't create group using relative path: %s\n", GROUP_CREATE_UNDER_GROUP_REL_GNAME);
goto error;
}
@@ -155,7 +155,7 @@ test_create_group_under_existing_group(void)
if ((grandchild_group_id = H5Gcreate2(parent_group_id, GROUP_CREATE_UNDER_GROUP_ABS_GNAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group using absolute path: %s\n", GROUP_CREATE_UNDER_GROUP_ABS_GNAME);
+ printf(" couldn't create group using absolute path: %s\n", GROUP_CREATE_UNDER_GROUP_ABS_GNAME);
goto error;
}
@@ -202,38 +202,38 @@ test_create_many_groups(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((parent_group_id = H5Gcreate2(container_group, MANY_GROUP_CREATIONS_GNAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MANY_GROUP_CREATIONS_GNAME);
+ printf(" couldn't create group '%s'\n", MANY_GROUP_CREATIONS_GNAME);
goto error;
}
/* Create multiple groups under the parent group */
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < GROUP_NUMB_MANY; i++) {
- HDprintf("\r %u/%u", i + 1, GROUP_NUMB_MANY);
+ printf("\r %u/%u", i + 1, GROUP_NUMB_MANY);
sprintf(group_name, "group %02u", i);
if ((child_group_id =
H5Gcreate2(parent_group_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", group_name);
+ printf(" couldn't create group '%s'\n", group_name);
goto error;
}
@@ -280,19 +280,19 @@ test_create_deep_groups(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
@@ -300,11 +300,11 @@ test_create_deep_groups(void)
if ((group_id = H5Gcreate2(container_group, DEEP_GROUP_CREATIONS_GNAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", DEEP_GROUP_CREATIONS_GNAME);
+ printf(" couldn't create group '%s'\n", DEEP_GROUP_CREATIONS_GNAME);
goto error;
}
- HDprintf("\n");
+ printf("\n");
if (create_group_recursive(group_id, 1) < 0)
TEST_ERROR;
@@ -340,7 +340,7 @@ create_group_recursive(hid_t parent_gid, unsigned counter)
hid_t child_gid = H5I_INVALID_HID;
char gname[NAME_BUF_SIZE];
- HDprintf("\r %u/%u", counter, GROUP_DEPTH);
+ printf("\r %u/%u", counter, GROUP_DEPTH);
if (counter == 1)
sprintf(gname, "2nd_child_group");
else if (counter == 2)
@@ -349,7 +349,7 @@ create_group_recursive(hid_t parent_gid, unsigned counter)
sprintf(gname, "%dth_child_group", counter + 1);
if ((child_gid = H5Gcreate2(parent_gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", gname);
+ printf(" couldn't create group '%s'\n", gname);
goto error;
}
@@ -389,19 +389,19 @@ test_create_intermediate_group(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
@@ -536,7 +536,7 @@ test_create_group_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
@@ -544,7 +544,7 @@ test_create_group_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -565,7 +565,7 @@ test_create_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" created group with invalid loc_id!\n");
+ printf(" created group with invalid loc_id!\n");
H5Gclose(group_id);
PART_ERROR(H5Gcreate_invalid_loc_id);
}
@@ -586,7 +586,7 @@ test_create_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" created group with a NULL name!\n");
+ printf(" created group with a NULL name!\n");
H5Gclose(group_id);
PART_ERROR(H5Gcreate_invalid_grp_name);
}
@@ -599,7 +599,7 @@ test_create_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" created group with an invalid group name of ''!\n");
+ printf(" created group with an invalid group name of ''!\n");
H5Gclose(group_id);
PART_ERROR(H5Gcreate_invalid_grp_name);
}
@@ -621,7 +621,7 @@ test_create_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" created group with invalid LCPL!\n");
+ printf(" created group with invalid LCPL!\n");
H5Gclose(group_id);
PART_ERROR(H5Gcreate_invalid_lcpl);
}
@@ -643,7 +643,7 @@ test_create_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" created group with invalid GCPL!\n");
+ printf(" created group with invalid GCPL!\n");
H5Gclose(group_id);
PART_ERROR(H5Gcreate_invalid_gcpl);
}
@@ -665,7 +665,7 @@ test_create_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" created group with invalid GAPL!\n");
+ printf(" created group with invalid GAPL!\n");
H5Gclose(group_id);
PART_ERROR(H5Gcreate_invalid_gapl);
}
@@ -711,25 +711,25 @@ test_create_anonymous_group(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group\n");
+ printf(" couldn't open group\n");
goto error;
}
if ((new_group_id = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create anonymous group\n");
+ printf(" couldn't create anonymous group\n");
goto error;
}
@@ -771,7 +771,7 @@ test_create_anonymous_group_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
@@ -779,13 +779,13 @@ test_create_anonymous_group_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group\n");
+ printf(" couldn't open group\n");
goto error;
}
@@ -805,7 +805,7 @@ test_create_anonymous_group_invalid_params(void)
if (new_group_id >= 0) {
H5_FAILED();
- HDprintf(" created anonymous group with invalid loc_id!\n");
+ printf(" created anonymous group with invalid loc_id!\n");
H5Gclose(new_group_id);
PART_ERROR(H5Gcreate_anon_invalid_loc_id);
}
@@ -826,7 +826,7 @@ test_create_anonymous_group_invalid_params(void)
if (new_group_id >= 0) {
H5_FAILED();
- HDprintf(" created anonymous group with invalid GCPL!\n");
+ printf(" created anonymous group with invalid GCPL!\n");
H5Gclose(new_group_id);
PART_ERROR(H5Gcreate_anon_invalid_gcpl);
}
@@ -847,7 +847,7 @@ test_create_anonymous_group_invalid_params(void)
if (new_group_id >= 0) {
H5_FAILED();
- HDprintf(" created anonymous group with invalid GAPL!\n");
+ printf(" created anonymous group with invalid GAPL!\n");
H5Gclose(new_group_id);
PART_ERROR(H5Gcreate_anon_invalid_gapl);
}
@@ -896,13 +896,13 @@ test_open_nonexistent_group(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
@@ -914,7 +914,7 @@ test_open_nonexistent_group(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" opened non-existent group!\n");
+ printf(" opened non-existent group!\n");
goto error;
}
@@ -951,7 +951,7 @@ test_open_group_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
@@ -959,7 +959,7 @@ test_open_group_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -979,7 +979,7 @@ test_open_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" opened group using an invalid loc_id!\n");
+ printf(" opened group using an invalid loc_id!\n");
H5Gclose(group_id);
PART_ERROR(H5Gopen_invalid_loc_id);
}
@@ -1000,7 +1000,7 @@ test_open_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" opened group using a NULL name!\n");
+ printf(" opened group using a NULL name!\n");
H5Gclose(group_id);
PART_ERROR(H5Gopen_invalid_grp_name);
}
@@ -1013,7 +1013,7 @@ test_open_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" opened group using an invalid name of ''!\n");
+ printf(" opened group using an invalid name of ''!\n");
H5Gclose(group_id);
PART_ERROR(H5Gopen_invalid_grp_name);
}
@@ -1034,7 +1034,7 @@ test_open_group_invalid_params(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" opened group using an invalid GAPL!\n");
+ printf(" opened group using an invalid GAPL!\n");
H5Gclose(group_id);
PART_ERROR(H5Gopen_invalid_gapl);
}
@@ -1079,7 +1079,7 @@ test_close_group_invalid_id(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic group aren't supported with this connector\n");
+ printf(" API functions for basic group aren't supported with this connector\n");
return 0;
}
@@ -1091,7 +1091,7 @@ test_close_group_invalid_id(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" close a group with an invalid ID!\n");
+ printf(" close a group with an invalid ID!\n");
goto error;
}
@@ -1123,8 +1123,8 @@ test_group_property_lists(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, property list, or creation order aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, property list, or creation order aren't supported "
+ "with this connector\n");
return 0;
}
@@ -1132,25 +1132,25 @@ test_group_property_lists(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((gcpl_id1 = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL\n");
+ printf(" couldn't create GCPL\n");
goto error;
}
if (H5Pset_link_creation_order(gcpl_id1, dummy_prop_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't set property on GCPL\n");
+ printf(" couldn't set property on GCPL\n");
goto error;
}
@@ -1158,7 +1158,7 @@ test_group_property_lists(void)
if ((group_id1 = H5Gcreate2(container_group, GROUP_PROPERTY_LIST_TEST_GROUP_NAME1, H5P_DEFAULT, gcpl_id1,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group\n");
+ printf(" couldn't create group\n");
goto error;
}
@@ -1166,7 +1166,7 @@ test_group_property_lists(void)
if ((group_id2 = H5Gcreate2(container_group, GROUP_PROPERTY_LIST_TEST_GROUP_NAME2, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group\n");
+ printf(" couldn't create group\n");
goto error;
}
@@ -1185,13 +1185,13 @@ test_group_property_lists(void)
* does not */
if ((gcpl_id1 = H5Gget_create_plist(group_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get GCPL\n");
+ printf(" couldn't get GCPL\n");
PART_ERROR(H5Gget_create_plist);
}
if ((gcpl_id2 = H5Gget_create_plist(group_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get GCPL\n");
+ printf(" couldn't get GCPL\n");
PART_ERROR(H5Gget_create_plist);
}
@@ -1200,15 +1200,15 @@ test_group_property_lists(void)
if (H5Pget_link_creation_order(gcpl_id1, &dummy_prop_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve GCPL property value\n");
+ printf(" couldn't retrieve GCPL property value\n");
PART_ERROR(H5Gget_create_plist);
}
if (dummy_prop_val != GROUP_PROPERTY_LIST_TEST_DUMMY_VAL) {
H5_FAILED();
- HDprintf(" retrieved GCPL property value '%llu' did not match expected value '%llu'\n",
- (unsigned long long)dummy_prop_val,
- (unsigned long long)GROUP_PROPERTY_LIST_TEST_DUMMY_VAL);
+ printf(" retrieved GCPL property value '%llu' did not match expected value '%llu'\n",
+ (unsigned long long)dummy_prop_val,
+ (unsigned long long)GROUP_PROPERTY_LIST_TEST_DUMMY_VAL);
PART_ERROR(H5Gget_create_plist);
}
@@ -1216,16 +1216,16 @@ test_group_property_lists(void)
if (H5Pget_link_creation_order(gcpl_id2, &dummy_prop_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve GCPL property value\n");
+ printf(" couldn't retrieve GCPL property value\n");
PART_ERROR(H5Gget_create_plist);
}
if (dummy_prop_val == GROUP_PROPERTY_LIST_TEST_DUMMY_VAL) {
H5_FAILED();
- HDprintf(" retrieved GCPL property value '%llu' matched control value '%llu' when it "
- "shouldn't have\n",
- (unsigned long long)dummy_prop_val,
- (unsigned long long)GROUP_PROPERTY_LIST_TEST_DUMMY_VAL);
+ printf(" retrieved GCPL property value '%llu' matched control value '%llu' when it "
+ "shouldn't have\n",
+ (unsigned long long)dummy_prop_val,
+ (unsigned long long)GROUP_PROPERTY_LIST_TEST_DUMMY_VAL);
PART_ERROR(H5Gget_create_plist);
}
@@ -1278,26 +1278,26 @@ test_group_property_lists(void)
if ((group_id1 = H5Gopen2(container_group, GROUP_PROPERTY_LIST_TEST_GROUP_NAME1, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open group\n");
+ printf(" couldn't open group\n");
PART_ERROR(H5Gget_create_plist_reopened);
}
if ((group_id2 = H5Gopen2(container_group, GROUP_PROPERTY_LIST_TEST_GROUP_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open group\n");
+ printf(" couldn't open group\n");
PART_ERROR(H5Gget_create_plist_reopened);
}
if ((gcpl_id1 = H5Gget_create_plist(group_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Gget_create_plist_reopened);
}
if ((gcpl_id2 = H5Gget_create_plist(group_id2)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get property list\n");
+ printf(" couldn't get property list\n");
PART_ERROR(H5Gget_create_plist_reopened);
}
@@ -1306,15 +1306,15 @@ test_group_property_lists(void)
if (H5Pget_link_creation_order(gcpl_id1, &dummy_prop_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve GCPL property value\n");
+ printf(" couldn't retrieve GCPL property value\n");
PART_ERROR(H5Gget_create_plist_reopened);
}
if (dummy_prop_val != GROUP_PROPERTY_LIST_TEST_DUMMY_VAL) {
H5_FAILED();
- HDprintf(" retrieved GCPL property value '%llu' did not match expected value '%llu'\n",
- (unsigned long long)dummy_prop_val,
- (unsigned long long)GROUP_PROPERTY_LIST_TEST_DUMMY_VAL);
+ printf(" retrieved GCPL property value '%llu' did not match expected value '%llu'\n",
+ (unsigned long long)dummy_prop_val,
+ (unsigned long long)GROUP_PROPERTY_LIST_TEST_DUMMY_VAL);
PART_ERROR(H5Gget_create_plist_reopened);
}
@@ -1322,16 +1322,16 @@ test_group_property_lists(void)
if (H5Pget_link_creation_order(gcpl_id2, &dummy_prop_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve GCPL property value\n");
+ printf(" couldn't retrieve GCPL property value\n");
PART_ERROR(H5Gget_create_plist_reopened);
}
if (dummy_prop_val == GROUP_PROPERTY_LIST_TEST_DUMMY_VAL) {
H5_FAILED();
- HDprintf(" retrieved GCPL property value '%llu' matched control value '%llu' when it "
- "shouldn't have\n",
- (unsigned long long)dummy_prop_val,
- (unsigned long long)GROUP_PROPERTY_LIST_TEST_DUMMY_VAL);
+ printf(" retrieved GCPL property value '%llu' matched control value '%llu' when it "
+ "shouldn't have\n",
+ (unsigned long long)dummy_prop_val,
+ (unsigned long long)GROUP_PROPERTY_LIST_TEST_DUMMY_VAL);
PART_ERROR(H5Gget_create_plist_reopened);
}
@@ -1395,7 +1395,7 @@ test_get_group_info(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file or group aren't supported with this connector\n");
+ printf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
@@ -1403,26 +1403,26 @@ test_get_group_info(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -1430,7 +1430,7 @@ test_get_group_info(void)
if ((parent_group_id = H5Gcreate2(container_group, GROUP_GET_INFO_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", GROUP_GET_INFO_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", GROUP_GET_INFO_TEST_GROUP_NAME);
goto error;
}
@@ -1442,7 +1442,7 @@ test_get_group_info(void)
if ((group_id = H5Gcreate2(parent_group_id, group_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", group_name);
+ printf(" couldn't create group '%s'\n", group_name);
goto error;
}
@@ -1463,14 +1463,14 @@ test_get_group_info(void)
/* Retrieve information about the parent group */
if (H5Gget_info(parent_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" couldn't get group info\n");
+ printf(" couldn't get group info\n");
PART_ERROR(H5Gget_info);
}
if (group_info.nlinks != GROUP_GET_INFO_TEST_GROUP_NUMB) {
H5_FAILED();
- HDprintf(" group's number of links '%lu' doesn't match expected value '%u'\n",
- group_info.nlinks, (unsigned int)GROUP_GET_INFO_TEST_GROUP_NUMB);
+ printf(" group's number of links '%lu' doesn't match expected value '%u'\n",
+ group_info.nlinks, (unsigned int)GROUP_GET_INFO_TEST_GROUP_NUMB);
PART_ERROR(H5Gget_info);
}
@@ -1480,8 +1480,8 @@ test_get_group_info(void)
*/
if (group_info.max_corder != GROUP_GET_INFO_TEST_GROUP_NUMB) {
H5_FAILED();
- HDprintf(" group's max creation order '%lld' doesn't match expected value '%lld'\n",
- (long long)group_info.max_corder, (long long)GROUP_GET_INFO_TEST_GROUP_NUMB);
+ printf(" group's max creation order '%lld' doesn't match expected value '%lld'\n",
+ (long long)group_info.max_corder, (long long)GROUP_GET_INFO_TEST_GROUP_NUMB);
PART_ERROR(H5Gget_info);
}
@@ -1491,14 +1491,14 @@ test_get_group_info(void)
group_info.storage_type != H5G_STORAGE_TYPE_DENSE &&
group_info.storage_type != H5G_STORAGE_TYPE_UNKNOWN) {
H5_FAILED();
- HDprintf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
+ printf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
PART_ERROR(H5Gget_info);
}
/* Assume that mounted should be FALSE in this case */
if (group_info.mounted != FALSE) {
H5_FAILED();
- HDprintf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
PART_ERROR(H5Gget_info);
}
@@ -1516,14 +1516,14 @@ test_get_group_info(void)
if (H5Gget_info_by_name(container_group, GROUP_GET_INFO_TEST_GROUP_NAME, &group_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get group info by name\n");
+ printf(" couldn't get group info by name\n");
PART_ERROR(H5Gget_info_by_name);
}
if (group_info.nlinks != GROUP_GET_INFO_TEST_GROUP_NUMB) {
H5_FAILED();
- HDprintf(" group's number of links '%lu' doesn't match expected value '%u'\n",
- group_info.nlinks, (unsigned int)GROUP_GET_INFO_TEST_GROUP_NUMB);
+ printf(" group's number of links '%lu' doesn't match expected value '%u'\n",
+ group_info.nlinks, (unsigned int)GROUP_GET_INFO_TEST_GROUP_NUMB);
PART_ERROR(H5Gget_info_by_name);
}
@@ -1533,8 +1533,8 @@ test_get_group_info(void)
*/
if (group_info.max_corder != GROUP_GET_INFO_TEST_GROUP_NUMB) {
H5_FAILED();
- HDprintf(" group's max creation order '%lld' doesn't match expected value '%lld'\n",
- (long long)group_info.max_corder, (long long)GROUP_GET_INFO_TEST_GROUP_NUMB);
+ printf(" group's max creation order '%lld' doesn't match expected value '%lld'\n",
+ (long long)group_info.max_corder, (long long)GROUP_GET_INFO_TEST_GROUP_NUMB);
PART_ERROR(H5Gget_info_by_name);
}
@@ -1544,14 +1544,14 @@ test_get_group_info(void)
group_info.storage_type != H5G_STORAGE_TYPE_DENSE &&
group_info.storage_type != H5G_STORAGE_TYPE_UNKNOWN) {
H5_FAILED();
- HDprintf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
+ printf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
PART_ERROR(H5Gget_info_by_name);
}
/* Assume that mounted should be FALSE in this case */
if (group_info.mounted != FALSE) {
H5_FAILED();
- HDprintf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
PART_ERROR(H5Gget_info_by_name);
}
@@ -1565,7 +1565,7 @@ test_get_group_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Gget_info_by_idx_crt_order_increasing);
}
@@ -1576,21 +1576,21 @@ test_get_group_info(void)
if (H5Gget_info_by_idx(container_group, GROUP_GET_INFO_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, (hsize_t)i, &group_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get group info for group at index %u\n", i);
+ printf(" couldn't get group info for group at index %u\n", i);
PART_ERROR(H5Gget_info_by_idx_crt_order_increasing);
}
if (group_info.nlinks != 0) {
H5_FAILED();
- HDprintf(" group's number of links '%lu' doesn't match expected value '%d'\n",
- group_info.nlinks, 0);
+ printf(" group's number of links '%lu' doesn't match expected value '%d'\n",
+ group_info.nlinks, 0);
PART_ERROR(H5Gget_info_by_idx_crt_order_increasing);
}
if (group_info.max_corder != 0) {
H5_FAILED();
- HDprintf(" group's max creation order '%lld' doesn't match expected value '%d'\n",
- (long long)group_info.max_corder, 0);
+ printf(" group's max creation order '%lld' doesn't match expected value '%d'\n",
+ (long long)group_info.max_corder, 0);
PART_ERROR(H5Gget_info_by_idx_crt_order_increasing);
}
@@ -1600,14 +1600,14 @@ test_get_group_info(void)
group_info.storage_type != H5G_STORAGE_TYPE_DENSE &&
group_info.storage_type != H5G_STORAGE_TYPE_UNKNOWN) {
H5_FAILED();
- HDprintf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
+ printf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
PART_ERROR(H5Gget_info_by_idx_crt_order_increasing);
}
/* Assume that mounted should be FALSE in this case */
if (group_info.mounted != FALSE) {
H5_FAILED();
- HDprintf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
PART_ERROR(H5Gget_info_by_idx_crt_order_increasing);
}
}
@@ -1622,7 +1622,7 @@ test_get_group_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Gget_info_by_idx_crt_order_decreasing);
}
@@ -1633,21 +1633,21 @@ test_get_group_info(void)
if (H5Gget_info_by_idx(container_group, GROUP_GET_INFO_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, (hsize_t)i, &group_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get group info for group at index %u\n", i);
+ printf(" couldn't get group info for group at index %u\n", i);
PART_ERROR(H5Gget_info_by_idx_crt_order_decreasing);
}
if (group_info.nlinks != 0) {
H5_FAILED();
- HDprintf(" group's number of links '%lu' doesn't match expected value '%d'\n",
- group_info.nlinks, 0);
+ printf(" group's number of links '%lu' doesn't match expected value '%d'\n",
+ group_info.nlinks, 0);
PART_ERROR(H5Gget_info_by_idx_crt_order_decreasing);
}
if (group_info.max_corder != 0) {
H5_FAILED();
- HDprintf(" group's max creation order '%lld' doesn't match expected value '%d'\n",
- (long long)group_info.max_corder, 0);
+ printf(" group's max creation order '%lld' doesn't match expected value '%d'\n",
+ (long long)group_info.max_corder, 0);
PART_ERROR(H5Gget_info_by_idx_crt_order_decreasing);
}
@@ -1657,14 +1657,14 @@ test_get_group_info(void)
group_info.storage_type != H5G_STORAGE_TYPE_DENSE &&
group_info.storage_type != H5G_STORAGE_TYPE_UNKNOWN) {
H5_FAILED();
- HDprintf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
+ printf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
PART_ERROR(H5Gget_info_by_idx_crt_order_decreasing);
}
/* Assume that mounted should be FALSE in this case */
if (group_info.mounted != FALSE) {
H5_FAILED();
- HDprintf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
PART_ERROR(H5Gget_info_by_idx_crt_order_decreasing);
}
}
@@ -1684,21 +1684,21 @@ test_get_group_info(void)
if (H5Gget_info_by_idx(container_group, GROUP_GET_INFO_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, (hsize_t)i, &group_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get group info for group at index %u\n", i);
+ printf(" couldn't get group info for group at index %u\n", i);
PART_ERROR(H5Gget_info_by_idx_name_order_increasing);
}
if (group_info.nlinks != 0) {
H5_FAILED();
- HDprintf(" group's number of links '%lu' doesn't match expected value '%d'\n",
- group_info.nlinks, 0);
+ printf(" group's number of links '%lu' doesn't match expected value '%d'\n",
+ group_info.nlinks, 0);
PART_ERROR(H5Gget_info_by_idx_name_order_increasing);
}
if (group_info.max_corder != 0) {
H5_FAILED();
- HDprintf(" group's max creation order '%lld' doesn't match expected value '%d'\n",
- (long long)group_info.max_corder, 0);
+ printf(" group's max creation order '%lld' doesn't match expected value '%d'\n",
+ (long long)group_info.max_corder, 0);
PART_ERROR(H5Gget_info_by_idx_name_order_increasing);
}
@@ -1708,14 +1708,14 @@ test_get_group_info(void)
group_info.storage_type != H5G_STORAGE_TYPE_DENSE &&
group_info.storage_type != H5G_STORAGE_TYPE_UNKNOWN) {
H5_FAILED();
- HDprintf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
+ printf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
PART_ERROR(H5Gget_info_by_idx_name_order_increasing);
}
/* Assume that mounted should be FALSE in this case */
if (group_info.mounted != FALSE) {
H5_FAILED();
- HDprintf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
PART_ERROR(H5Gget_info_by_idx_name_order_increasing);
}
}
@@ -1735,22 +1735,21 @@ test_get_group_info(void)
if (H5Gget_info_by_idx(container_group, GROUP_GET_INFO_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, (hsize_t)i, &group_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get group info for group at index %u\n", i);
+ printf(" couldn't get group info for group at index %u\n", i);
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
if (group_info.nlinks != 0) {
H5_FAILED();
- HDprintf(" group's number of links '%" PRIuHSIZE
- "' doesn't match expected value '%d'\n",
- group_info.nlinks, 0);
+ printf(" group's number of links '%" PRIuHSIZE "' doesn't match expected value '%d'\n",
+ group_info.nlinks, 0);
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
if (group_info.max_corder != 0) {
H5_FAILED();
- HDprintf(" group's max creation order '%lld' doesn't match expected value '%d'\n",
- (long long)group_info.max_corder, 0);
+ printf(" group's max creation order '%lld' doesn't match expected value '%d'\n",
+ (long long)group_info.max_corder, 0);
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
@@ -1760,14 +1759,14 @@ test_get_group_info(void)
group_info.storage_type != H5G_STORAGE_TYPE_DENSE &&
group_info.storage_type != H5G_STORAGE_TYPE_UNKNOWN) {
H5_FAILED();
- HDprintf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
+ printf(" group info's 'storage_type' field wasn't set to a meaningful value\n");
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
/* Assume that mounted should be FALSE in this case */
if (group_info.mounted != FALSE) {
H5_FAILED();
- HDprintf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
}
@@ -1823,8 +1822,8 @@ test_get_group_info_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, or more group aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, or more group aren't supported with this "
+ "connector\n");
return 0;
}
@@ -1832,7 +1831,7 @@ test_get_group_info_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -1852,7 +1851,7 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info with an invalid loc_id!\n");
+ printf(" retrieved info of group using H5Gget_info with an invalid loc_id!\n");
PART_ERROR(H5Gget_info_invalid_loc_id);
}
@@ -1872,7 +1871,7 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info with invalid group info pointer!\n");
+ printf(" retrieved info of group using H5Gget_info with invalid group info pointer!\n");
PART_ERROR(H5Gget_info_invalid_grp_info_pointer);
}
@@ -1892,7 +1891,7 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_name with an invalid loc_id!\n");
+ printf(" retrieved info of group using H5Gget_info_by_name with an invalid loc_id!\n");
PART_ERROR(H5Gget_info_by_name_invalid_loc_id);
}
@@ -1912,7 +1911,7 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_name with a NULL name!\n");
+ printf(" retrieved info of group using H5Gget_info_by_name with a NULL name!\n");
PART_ERROR(H5Gget_info_by_name_invalid_grp_name);
}
@@ -1924,8 +1923,7 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
- " retrieved info of group using H5Gget_info_by_name with an invalid name of ''!\n");
+ printf(" retrieved info of group using H5Gget_info_by_name with an invalid name of ''!\n");
PART_ERROR(H5Gget_info_by_name_invalid_grp_name);
}
@@ -1945,8 +1943,8 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_name with an invalid group info "
- "pointer!\n");
+ printf(" retrieved info of group using H5Gget_info_by_name with an invalid group info "
+ "pointer!\n");
PART_ERROR(H5Gget_info_by_name_invalid_grp_info_pointer);
}
@@ -1966,7 +1964,7 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_name with an invalid LAPL!\n");
+ printf(" retrieved info of group using H5Gget_info_by_name with an invalid LAPL!\n");
PART_ERROR(H5Gget_info_by_name_invalid_lapl);
}
@@ -1987,7 +1985,7 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_idx with an invalid loc_id!\n");
+ printf(" retrieved info of group using H5Gget_info_by_idx with an invalid loc_id!\n");
PART_ERROR(H5Gget_info_by_idx_invalid_loc_id);
}
@@ -2008,7 +2006,7 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_idx with a NULL group name!\n");
+ printf(" retrieved info of group using H5Gget_info_by_idx with a NULL group name!\n");
PART_ERROR(H5Gget_info_by_idx_invalid_grp_name);
}
@@ -2021,8 +2019,8 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_idx with an invalid group name of "
- "''!\n");
+ printf(" retrieved info of group using H5Gget_info_by_idx with an invalid group name of "
+ "''!\n");
PART_ERROR(H5Gget_info_by_idx_invalid_grp_name);
}
@@ -2043,8 +2041,8 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_idx with invalid index type "
- "H5_INDEX_UNKNOWN!\n");
+ printf(" retrieved info of group using H5Gget_info_by_idx with invalid index type "
+ "H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Gget_info_by_idx_invalid_index_type);
}
@@ -2057,8 +2055,8 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_idx with invalid index type "
- "H5_INDEX_N!\n");
+ printf(" retrieved info of group using H5Gget_info_by_idx with invalid index type "
+ "H5_INDEX_N!\n");
PART_ERROR(H5Gget_info_by_idx_invalid_index_type);
}
@@ -2079,8 +2077,8 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_idx with invalid iteration order "
- "H5_ITER_UNKNOWN!\n");
+ printf(" retrieved info of group using H5Gget_info_by_idx with invalid iteration order "
+ "H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Gget_info_by_idx_invalid_iter_order);
}
@@ -2093,8 +2091,8 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_idx with invalid iteration order "
- "H5_ITER_N!\n");
+ printf(" retrieved info of group using H5Gget_info_by_idx with invalid iteration order "
+ "H5_ITER_N!\n");
PART_ERROR(H5Gget_info_by_idx_invalid_iter_order);
}
@@ -2114,8 +2112,8 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_idx with an invalid group info "
- "pointer!\n");
+ printf(" retrieved info of group using H5Gget_info_by_idx with an invalid group info "
+ "pointer!\n");
PART_ERROR(H5Gget_info_by_idx_invalid_grp_info_pointer);
}
@@ -2136,7 +2134,7 @@ test_get_group_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" retrieved info of group using H5Gget_info_by_idx with an invalid LAPL!\n");
+ printf(" retrieved info of group using H5Gget_info_by_idx with an invalid LAPL!\n");
PART_ERROR(H5Gget_info_by_idx_invalid_lapl);
}
@@ -2181,34 +2179,34 @@ test_flush_group(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or flush refresh aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or flush refresh aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, GROUP_FLUSH_GNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", GROUP_FLUSH_GNAME);
+ printf(" couldn't create group '%s'\n", GROUP_FLUSH_GNAME);
goto error;
}
/* Flush the group */
if (H5Gflush(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't flush the group '%s'\n", GROUP_FLUSH_GNAME);
+ printf(" couldn't flush the group '%s'\n", GROUP_FLUSH_GNAME);
goto error;
}
@@ -2249,7 +2247,7 @@ test_flush_group_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(" API functions for group flush aren't supported with this connector\n");
+ printf(" API functions for group flush aren't supported with this connector\n");
return 0;
}
@@ -2261,7 +2259,7 @@ test_flush_group_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" flushed group with invalid ID!\n");
+ printf(" flushed group with invalid ID!\n");
goto error;
}
@@ -2289,34 +2287,34 @@ test_refresh_group(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or flush refresh aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or flush refresh aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, GROUP_REFRESH_GNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", GROUP_REFRESH_GNAME);
+ printf(" couldn't create group '%s'\n", GROUP_REFRESH_GNAME);
goto error;
}
/* Refresh the group */
if (H5Grefresh(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't refresh the group '%s'\n", GROUP_REFRESH_GNAME);
+ printf(" couldn't refresh the group '%s'\n", GROUP_REFRESH_GNAME);
goto error;
}
@@ -2357,7 +2355,7 @@ test_refresh_group_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(" API functions for group refresh aren't supported with this connector\n");
+ printf(" API functions for group refresh aren't supported with this connector\n");
return 0;
}
@@ -2369,7 +2367,7 @@ test_refresh_group_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" refreshed group with invalid ID!\n");
+ printf(" refreshed group with invalid ID!\n");
goto error;
}
@@ -2387,17 +2385,17 @@ H5_api_group_test(void)
size_t i;
int nerrors;
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Group Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Group Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(group_tests); i++) {
nerrors += (*group_tests[i])() ? 1 : 0;
}
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/test/API/H5_api_link_test.c b/test/API/H5_api_link_test.c
index 65a3277..3abd602 100644
--- a/test/API/H5_api_link_test.c
+++ b/test/API/H5_api_link_test.c
@@ -185,46 +185,46 @@ test_create_hard_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or hard link aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, HARD_LINK_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", HARD_LINK_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", HARD_LINK_TEST_GROUP_NAME);
goto error;
}
if (H5Lcreate_hard(file_id, "/", group_id, HARD_LINK_TEST_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", HARD_LINK_TEST_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", HARD_LINK_TEST_LINK_NAME);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, HARD_LINK_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", HARD_LINK_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", HARD_LINK_TEST_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
@@ -272,33 +272,33 @@ test_create_hard_link_long_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or hard link aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, HARD_LINK_TEST_GROUP_LONG_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", HARD_LINK_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", HARD_LINK_TEST_GROUP_NAME);
goto error;
}
if (H5VLget_connector_name(file_id, vol_name, 5) < 0) {
H5_FAILED();
- HDprintf(" couldn't get VOL connector name\n");
+ printf(" couldn't get VOL connector name\n");
goto error;
}
@@ -307,7 +307,7 @@ test_create_hard_link_long_name(void)
name_len = 99;
/* Construct very long file name */
- if ((objname = (char *)HDmalloc((size_t)(name_len + 1))) == NULL)
+ if ((objname = (char *)malloc((size_t)(name_len + 1))) == NULL)
TEST_ERROR;
for (u = 0; u < name_len; u++)
@@ -316,20 +316,20 @@ test_create_hard_link_long_name(void)
if (H5Lcreate_hard(file_id, "/", group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link with a long name\n");
+ printf(" couldn't create hard link with a long name\n");
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, objname, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if the link with a long name exists\n");
+ printf(" couldn't determine if the link with a long name exists\n");
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
@@ -342,7 +342,7 @@ test_create_hard_link_long_name(void)
/* Release memory */
if (objname)
- HDfree(objname);
+ free(objname);
PASSED();
@@ -358,7 +358,7 @@ error:
H5E_END_TRY;
if (objname)
- HDfree(objname);
+ free(objname);
return 1;
}
@@ -382,34 +382,34 @@ test_create_hard_link_many(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or hard link aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, HARD_LINK_TEST_GROUP_MANY_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", HARD_LINK_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", HARD_LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id2 = H5Gcreate2(group_id, HARD_LINK_TEST_GROUP_MANY_FINAL_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", HARD_LINK_TEST_GROUP_MANY_FINAL_NAME);
+ printf(" couldn't create container sub-group '%s'\n", HARD_LINK_TEST_GROUP_MANY_FINAL_NAME);
goto error;
}
@@ -460,13 +460,13 @@ test_create_hard_link_many(void)
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, "hard21", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link 'hard21' exists\n");
+ printf(" couldn't determine if link 'hard21' exists\n");
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 'hard21' did not exist\n");
+ printf(" link 'hard21' did not exist\n");
goto error;
}
@@ -482,39 +482,39 @@ test_create_hard_link_many(void)
/* Reopen the file and group and verify the hard link */
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, HARD_LINK_TEST_GROUP_MANY_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n", HARD_LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n", HARD_LINK_TEST_GROUP_NAME);
goto error;
}
/* Open the object through last hard link */
if ((group_id2 = H5Gopen2(group_id, "hard21", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open the group '%s' with the last hard link 'hard21'\n",
- HARD_LINK_TEST_GROUP_MANY_FINAL_NAME);
+ printf(" couldn't open the group '%s' with the last hard link 'hard21'\n",
+ HARD_LINK_TEST_GROUP_MANY_FINAL_NAME);
goto error;
}
/* Check name */
if (H5Iget_name(group_id2, objname, (size_t)HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the name of the object '%s'\n", HARD_LINK_TEST_GROUP_MANY_FINAL_NAME);
+ printf(" couldn't get the name of the object '%s'\n", HARD_LINK_TEST_GROUP_MANY_FINAL_NAME);
goto error;
}
if (HDstrcmp(objname, "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME "/hard21")) {
H5_FAILED();
- HDprintf(" wrong name of the object '%s'\n", objname);
+ printf(" wrong name of the object '%s'\n", objname);
goto error;
}
@@ -561,8 +561,8 @@ test_create_hard_link_same_loc(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or hard link aren't supported with this "
+ "connector\n");
return 0;
}
@@ -570,20 +570,20 @@ test_create_hard_link_same_loc(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, H5L_SAME_LOC_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", H5L_SAME_LOC_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", H5L_SAME_LOC_TEST_GROUP_NAME);
goto error;
}
@@ -599,20 +599,20 @@ test_create_hard_link_same_loc(void)
if (H5Lcreate_hard(H5L_SAME_LOC, ".", group_id, H5L_SAME_LOC_TEST_LINK_NAME1, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first link '%s'\n", H5L_SAME_LOC_TEST_LINK_NAME1);
+ printf(" couldn't create first link '%s'\n", H5L_SAME_LOC_TEST_LINK_NAME1);
PART_ERROR(H5L_SAME_LOC_first_param);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, H5L_SAME_LOC_TEST_LINK_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5L_SAME_LOC_first_param);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
PART_ERROR(H5L_SAME_LOC_first_param);
}
@@ -627,20 +627,20 @@ test_create_hard_link_same_loc(void)
if (H5Lcreate_hard(group_id, ".", H5L_SAME_LOC, H5L_SAME_LOC_TEST_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create second link '%s'\n", H5L_SAME_LOC_TEST_LINK_NAME2);
+ printf(" couldn't create second link '%s'\n", H5L_SAME_LOC_TEST_LINK_NAME2);
PART_ERROR(H5L_SAME_LOC_third_param);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, H5L_SAME_LOC_TEST_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", H5L_SAME_LOC_TEST_LINK_NAME2);
+ printf(" couldn't determine if link '%s' exists\n", H5L_SAME_LOC_TEST_LINK_NAME2);
PART_ERROR(H5L_SAME_LOC_third_param);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
PART_ERROR(H5L_SAME_LOC_third_param);
}
@@ -695,8 +695,8 @@ test_create_hard_link_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or hard link aren't supported with this "
+ "connector\n");
return 0;
}
@@ -704,20 +704,20 @@ test_create_hard_link_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, HARD_LINK_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", HARD_LINK_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", HARD_LINK_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -738,7 +738,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link with an invalid cur_loc_id!\n");
+ printf(" created hard link with an invalid cur_loc_id!\n");
PART_ERROR(H5Lcreate_hard_invalid_cur_loc_id);
}
@@ -759,7 +759,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link with a NULL cur_name!\n");
+ printf(" created hard link with a NULL cur_name!\n");
PART_ERROR(H5Lcreate_hard_invalid_cur_name);
}
@@ -772,7 +772,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link with an invalid cur_name of ''!\n");
+ printf(" created hard link with an invalid cur_name of ''!\n");
PART_ERROR(H5Lcreate_hard_invalid_cur_name);
}
@@ -793,7 +793,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link with an invalid new_loc_id!\n");
+ printf(" created hard link with an invalid new_loc_id!\n");
PART_ERROR(H5Lcreate_hard_invalid_new_loc_id);
}
@@ -813,7 +813,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link with a NULL new_name!\n");
+ printf(" created hard link with a NULL new_name!\n");
PART_ERROR(H5Lcreate_hard_invalid_new_name);
}
@@ -825,7 +825,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link with an invalid new_name of ''!\n");
+ printf(" created hard link with an invalid new_name of ''!\n");
PART_ERROR(H5Lcreate_hard_invalid_new_name);
}
@@ -846,7 +846,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link with an invalid LCPL!\n");
+ printf(" created hard link with an invalid LCPL!\n");
PART_ERROR(H5Lcreate_hard_invalid_lcpl);
}
@@ -867,7 +867,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link with an invalid LAPL!\n");
+ printf(" created hard link with an invalid LAPL!\n");
PART_ERROR(H5Lcreate_hard_invalid_lapl);
}
@@ -888,7 +888,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link with the invalid same location!\n");
+ printf(" created hard link with the invalid same location!\n");
PART_ERROR(H5Lcreate_hard_invalid_same_loc);
}
@@ -905,7 +905,7 @@ test_create_hard_link_invalid_params(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lcreate_hard_across_files);
}
@@ -918,7 +918,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link across files!\n");
+ printf(" created hard link across files!\n");
PART_ERROR(H5Lcreate_hard_across_files);
}
@@ -931,7 +931,7 @@ test_create_hard_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created hard link across files!\n");
+ printf(" created hard link across files!\n");
PART_ERROR(H5Lcreate_hard_across_files);
}
@@ -947,14 +947,14 @@ test_create_hard_link_invalid_params(void)
if ((link_exists = H5Lexists(group_id, HARD_LINK_INVALID_PARAMS_TEST_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n",
- HARD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n",
+ HARD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_hard_invalid_existence);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" link existed!\n");
+ printf(" link existed!\n");
PART_ERROR(H5Lcreate_hard_invalid_existence);
}
@@ -1010,36 +1010,36 @@ test_create_soft_link_existing_relative(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or soft link aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, SOFT_LINK_EXISTING_RELATIVE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- SOFT_LINK_EXISTING_RELATIVE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ SOFT_LINK_EXISTING_RELATIVE_TEST_SUBGROUP_NAME);
goto error;
}
if ((object_id = H5Gcreate2(group_id, SOFT_LINK_EXISTING_RELATIVE_TEST_OBJECT_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create object '%s' for soft link's target\n",
- SOFT_LINK_EXISTING_RELATIVE_TEST_OBJECT_NAME);
+ printf(" failed to create object '%s' for soft link's target\n",
+ SOFT_LINK_EXISTING_RELATIVE_TEST_OBJECT_NAME);
goto error;
}
@@ -1049,27 +1049,27 @@ test_create_soft_link_existing_relative(void)
if (H5Lcreate_soft(SOFT_LINK_EXISTING_RELATIVE_TEST_OBJECT_NAME, group_id,
SOFT_LINK_EXISTING_RELATIVE_TEST_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", SOFT_LINK_EXISTING_RELATIVE_TEST_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", SOFT_LINK_EXISTING_RELATIVE_TEST_LINK_NAME);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, SOFT_LINK_EXISTING_RELATIVE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", SOFT_LINK_EXISTING_RELATIVE_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", SOFT_LINK_EXISTING_RELATIVE_TEST_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
if ((object_id = H5Gopen2(group_id, SOFT_LINK_EXISTING_RELATIVE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open object '%s' through the soft link\n",
- SOFT_LINK_EXISTING_RELATIVE_TEST_OBJECT_NAME);
+ printf(" couldn't open object '%s' through the soft link\n",
+ SOFT_LINK_EXISTING_RELATIVE_TEST_OBJECT_NAME);
goto error;
}
@@ -1116,55 +1116,55 @@ test_create_soft_link_existing_absolute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or soft link aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, SOFT_LINK_EXISTING_ABSOLUTE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- SOFT_LINK_EXISTING_ABSOLUTE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ SOFT_LINK_EXISTING_ABSOLUTE_TEST_SUBGROUP_NAME);
goto error;
}
if (H5Lcreate_soft("/", group_id, SOFT_LINK_EXISTING_ABSOLUTE_TEST_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", SOFT_LINK_EXISTING_ABSOLUTE_TEST_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", SOFT_LINK_EXISTING_ABSOLUTE_TEST_LINK_NAME);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, SOFT_LINK_EXISTING_ABSOLUTE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", SOFT_LINK_EXISTING_ABSOLUTE_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", SOFT_LINK_EXISTING_ABSOLUTE_TEST_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
if ((root_id = H5Gopen2(group_id, SOFT_LINK_EXISTING_ABSOLUTE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open object pointed to by soft link '%s'\n",
- SOFT_LINK_EXISTING_ABSOLUTE_TEST_LINK_NAME);
+ printf(" couldn't open object pointed to by soft link '%s'\n",
+ SOFT_LINK_EXISTING_ABSOLUTE_TEST_LINK_NAME);
goto error;
}
@@ -1213,48 +1213,48 @@ test_create_soft_link_dangling_relative(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or soft link aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, SOFT_LINK_DANGLING_RELATIVE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- SOFT_LINK_DANGLING_RELATIVE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ SOFT_LINK_DANGLING_RELATIVE_TEST_SUBGROUP_NAME);
goto error;
}
if (H5Lcreate_soft(SOFT_LINK_DANGLING_RELATIVE_TEST_OBJECT_NAME, group_id,
SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
@@ -1266,7 +1266,7 @@ test_create_soft_link_dangling_relative(void)
if (object_id >= 0) {
H5_FAILED();
- HDprintf(" opened target of dangling link '%s'!\n", SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME);
+ printf(" opened target of dangling link '%s'!\n", SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME);
H5Gclose(object_id);
goto error;
}
@@ -1274,8 +1274,8 @@ test_create_soft_link_dangling_relative(void)
if ((object_id = H5Gcreate2(group_id, SOFT_LINK_DANGLING_RELATIVE_TEST_OBJECT_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create object '%s' for soft link's target\n",
- SOFT_LINK_DANGLING_RELATIVE_TEST_OBJECT_NAME);
+ printf(" failed to create object '%s' for soft link's target\n",
+ SOFT_LINK_DANGLING_RELATIVE_TEST_OBJECT_NAME);
goto error;
}
@@ -1284,8 +1284,8 @@ test_create_soft_link_dangling_relative(void)
if ((object_id = H5Gopen2(group_id, SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open object pointed to by soft link '%s'\n",
- SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME);
+ printf(" failed to open object pointed to by soft link '%s'\n",
+ SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME);
goto error;
}
@@ -1334,28 +1334,28 @@ test_create_soft_link_dangling_absolute(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or soft link aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, SOFT_LINK_DANGLING_ABSOLUTE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- SOFT_LINK_DANGLING_ABSOLUTE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ SOFT_LINK_DANGLING_ABSOLUTE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -1363,20 +1363,20 @@ test_create_soft_link_dangling_absolute(void)
"/" SOFT_LINK_DANGLING_ABSOLUTE_TEST_OBJECT_NAME,
group_id, SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
@@ -1388,7 +1388,7 @@ test_create_soft_link_dangling_absolute(void)
if (object_id >= 0) {
H5_FAILED();
- HDprintf(" opened target of dangling link '%s'!\n", SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME);
+ printf(" opened target of dangling link '%s'!\n", SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME);
H5Gclose(object_id);
goto error;
}
@@ -1396,8 +1396,8 @@ test_create_soft_link_dangling_absolute(void)
if ((object_id = H5Gcreate2(group_id, SOFT_LINK_DANGLING_ABSOLUTE_TEST_OBJECT_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create object '%s' for soft link's target\n",
- SOFT_LINK_DANGLING_ABSOLUTE_TEST_OBJECT_NAME);
+ printf(" failed to create object '%s' for soft link's target\n",
+ SOFT_LINK_DANGLING_ABSOLUTE_TEST_OBJECT_NAME);
goto error;
}
@@ -1406,8 +1406,8 @@ test_create_soft_link_dangling_absolute(void)
if ((object_id = H5Gopen2(group_id, SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open object pointed to by soft link '%s'\n",
- SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME);
+ printf(" failed to open object pointed to by soft link '%s'\n",
+ SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME);
goto error;
}
@@ -1458,33 +1458,33 @@ test_create_soft_link_long_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or soft link aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, SOFT_LINK_TEST_GROUP_LONG_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", SOFT_LINK_TEST_GROUP_LONG_NAME);
+ printf(" couldn't create container sub-group '%s'\n", SOFT_LINK_TEST_GROUP_LONG_NAME);
goto error;
}
if (H5VLget_connector_name(file_id, vol_name, 5) < 0) {
H5_FAILED();
- HDprintf(" couldn't get VOL connector name\n");
+ printf(" couldn't get VOL connector name\n");
goto error;
}
@@ -1493,7 +1493,7 @@ test_create_soft_link_long_name(void)
name_len = 99;
/* Construct very long file name */
- if ((objname = (char *)HDmalloc((size_t)(name_len + 1))) == NULL)
+ if ((objname = (char *)malloc((size_t)(name_len + 1))) == NULL)
TEST_ERROR;
for (u = 0; u < name_len; u++)
@@ -1502,20 +1502,20 @@ test_create_soft_link_long_name(void)
if (H5Lcreate_soft(SOFT_LINK_TEST_LONG_OBJECT_NAME, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link with a long name\n");
+ printf(" couldn't create soft link with a long name\n");
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, objname, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if the link with a long name exists\n");
+ printf(" couldn't determine if the link with a long name exists\n");
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
@@ -1528,7 +1528,7 @@ test_create_soft_link_long_name(void)
/* Release memory */
if (objname)
- HDfree(objname);
+ free(objname);
PASSED();
@@ -1544,7 +1544,7 @@ error:
H5E_END_TRY;
if (objname)
- HDfree(objname);
+ free(objname);
return 1;
}
@@ -1569,27 +1569,27 @@ test_create_soft_link_many(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or soft link aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, SOFT_LINK_TEST_GROUP_MANY_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
+ printf(" couldn't create container sub-group '%s'\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
goto error;
}
@@ -1631,13 +1631,13 @@ test_create_soft_link_many(void)
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, "soft16", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link 'soft16' exists\n");
+ printf(" couldn't determine if link 'soft16' exists\n");
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 'soft16' did not exist\n");
+ printf(" link 'soft16' did not exist\n");
goto error;
}
@@ -1651,19 +1651,19 @@ test_create_soft_link_many(void)
/* Reopen the file and group and verify the hard link */
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, SOFT_LINK_TEST_GROUP_MANY_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
+ printf(" couldn't open container sub-group '%s'\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
goto error;
}
@@ -1679,7 +1679,7 @@ test_create_soft_link_many(void)
if (object_id >= 0) {
H5_FAILED();
- HDprintf(" opened target of dangling soft link '%s'!\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
+ printf(" opened target of dangling soft link '%s'!\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
H5Gclose(object_id);
goto error;
}
@@ -1687,7 +1687,7 @@ test_create_soft_link_many(void)
if ((object_id = H5Gcreate2(group_id, SOFT_LINK_TEST_GROUP_MANY_FINAL_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create object '%s' for soft link's target\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
+ printf(" failed to create object '%s' for soft link's target\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
goto error;
}
@@ -1700,19 +1700,19 @@ test_create_soft_link_many(void)
*/
if ((object_id = H5Gopen2(group_id, "soft16", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open object pointed to by soft link '%s'\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
+ printf(" failed to open object pointed to by soft link '%s'\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
goto error;
}
/* Check name */
if (H5Iget_name(object_id, objname, (size_t)SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the name of the object 'soft16'\n");
+ printf(" couldn't get the name of the object 'soft16'\n");
goto error;
}
if (HDstrcmp(objname, "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/soft16")) {
H5_FAILED();
- HDprintf(" wrong name of the object '%s'\n", objname);
+ printf(" wrong name of the object '%s'\n", objname);
goto error;
}
@@ -1760,7 +1760,7 @@ test_create_soft_link_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or soft link aren't supported with this connector\n");
return 0;
}
@@ -1769,20 +1769,20 @@ test_create_soft_link_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, SOFT_LINK_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", SOFT_LINK_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", SOFT_LINK_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -1803,8 +1803,8 @@ test_create_soft_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created soft link '%s' with an invalid link target!\n",
- SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created soft link '%s' with an invalid link target!\n",
+ SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_soft_invalid_link_target);
}
@@ -1817,8 +1817,8 @@ test_create_soft_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created soft link '%s' with an invalid link target!\n",
- SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created soft link '%s' with an invalid link target!\n",
+ SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_soft_invalid_link_target);
}
@@ -1839,8 +1839,8 @@ test_create_soft_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created soft link '%s' with an invalid link_loc_id!\n",
- SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created soft link '%s' with an invalid link_loc_id!\n",
+ SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_soft_invalid_link_loc_id);
}
@@ -1860,8 +1860,8 @@ test_create_soft_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created soft link '%s' with a NULL link name!\n",
- SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created soft link '%s' with a NULL link name!\n",
+ SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_soft_invalid_link_name);
}
@@ -1873,8 +1873,8 @@ test_create_soft_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created soft link '%s' with an invalid link name of ''!\n",
- SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created soft link '%s' with an invalid link name of ''!\n",
+ SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_soft_invalid_link_name);
}
@@ -1895,8 +1895,8 @@ test_create_soft_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created soft link '%s' with an invalid LCPL!\n",
- SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created soft link '%s' with an invalid LCPL!\n",
+ SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_soft_invalid_lcpl);
}
@@ -1917,8 +1917,8 @@ test_create_soft_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created soft link '%s' with an invalid LAPL!\n",
- SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created soft link '%s' with an invalid LAPL!\n",
+ SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_soft_invalid_lapl);
}
@@ -1934,14 +1934,14 @@ test_create_soft_link_invalid_params(void)
if ((link_exists = H5Lexists(group_id, SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n",
- SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n",
+ SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_soft_invalid_existence);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" link '%s' existed!\n", SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" link '%s' existed!\n", SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_soft_invalid_existence);
}
@@ -1995,8 +1995,8 @@ test_create_external_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or external link aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, link, or external link aren't supported "
+ "with this connector\n");
return 0;
}
@@ -2004,7 +2004,7 @@ test_create_external_link(void)
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
@@ -2013,47 +2013,47 @@ test_create_external_link(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, EXTERNAL_LINK_TEST_SUBGROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", EXTERNAL_LINK_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", EXTERNAL_LINK_TEST_SUBGROUP_NAME);
goto error;
}
if (H5Lcreate_external(ext_link_filename, "/", group_id, EXTERNAL_LINK_TEST_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", EXTERNAL_LINK_TEST_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", EXTERNAL_LINK_TEST_LINK_NAME);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, EXTERNAL_LINK_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", EXTERNAL_LINK_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", EXTERNAL_LINK_TEST_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
if ((root_id = H5Gopen2(group_id, EXTERNAL_LINK_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open root group of other file using external link '%s'\n",
- EXTERNAL_LINK_TEST_LINK_NAME);
+ printf(" couldn't open root group of other file using external link '%s'\n",
+ EXTERNAL_LINK_TEST_LINK_NAME);
goto error;
}
@@ -2103,8 +2103,8 @@ test_create_external_link_dangling(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or external link aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, link, or external link aren't supported "
+ "with this connector\n");
return 0;
}
@@ -2112,46 +2112,46 @@ test_create_external_link_dangling(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, EXTERNAL_LINK_TEST_DANGLING_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", EXTERNAL_LINK_TEST_DANGLING_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", EXTERNAL_LINK_TEST_DANGLING_SUBGROUP_NAME);
goto error;
}
if (H5Lcreate_external(ext_link_filename, "/" EXTERNAL_LINK_TEST_DANGLING_OBJECT_NAME, group_id,
EXTERNAL_LINK_TEST_DANGLING_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dangling external link '%s'\n", EXTERNAL_LINK_TEST_DANGLING_LINK_NAME);
+ printf(" couldn't create dangling external link '%s'\n", EXTERNAL_LINK_TEST_DANGLING_LINK_NAME);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, EXTERNAL_LINK_TEST_DANGLING_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", EXTERNAL_LINK_TEST_DANGLING_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", EXTERNAL_LINK_TEST_DANGLING_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
@@ -2163,8 +2163,8 @@ test_create_external_link_dangling(void)
if (object_id >= 0) {
H5_FAILED();
- HDprintf(" opened non-existent object in other file using dangling external link '%s'!\n",
- EXTERNAL_LINK_TEST_DANGLING_LINK_NAME);
+ printf(" opened non-existent object in other file using dangling external link '%s'!\n",
+ EXTERNAL_LINK_TEST_DANGLING_LINK_NAME);
H5Gclose(object_id);
goto error;
}
@@ -2172,8 +2172,8 @@ test_create_external_link_dangling(void)
if ((object_id = H5Gcreate2(ext_file_id, EXTERNAL_LINK_TEST_DANGLING_OBJECT_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create object '%s' for external link's target\n",
- EXTERNAL_LINK_TEST_DANGLING_OBJECT_NAME);
+ printf(" failed to create object '%s' for external link's target\n",
+ EXTERNAL_LINK_TEST_DANGLING_OBJECT_NAME);
goto error;
}
@@ -2182,8 +2182,8 @@ test_create_external_link_dangling(void)
if ((object_id = H5Gopen2(group_id, EXTERNAL_LINK_TEST_DANGLING_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open object pointed to by external link '%s'\n",
- EXTERNAL_LINK_TEST_DANGLING_LINK_NAME);
+ printf(" failed to open object pointed to by external link '%s'\n",
+ EXTERNAL_LINK_TEST_DANGLING_LINK_NAME);
goto error;
}
@@ -2238,8 +2238,8 @@ test_create_external_link_multi(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or external link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or external link aren't supported with this "
+ "connector\n");
return 0;
}
@@ -2254,52 +2254,51 @@ test_create_external_link_multi(void)
if ((file_id = H5Fcreate(ext_link_filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n",
- ext_link_filename1);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename1);
PART_ERROR(H5Lcreate_external_first_file);
}
/* Create object down a path */
if ((group_id = H5Gcreate2(file_id, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a group\n");
+ printf(" couldn't create a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
if ((group_id = H5Gcreate2(file_id, "A/B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a group\n");
+ printf(" couldn't create a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
if ((group_id = H5Gcreate2(file_id, "A/B/C", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a group\n");
+ printf(" couldn't create a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
/* Close file */
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
@@ -2316,27 +2315,26 @@ test_create_external_link_multi(void)
if ((file_id = H5Fcreate(ext_link_filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n",
- ext_link_filename2);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename2);
PART_ERROR(H5Lcreate_external_second_file);
}
/* Create object down a path */
if ((group_id = H5Gcreate2(file_id, "D", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a group\n");
+ printf(" couldn't create a group\n");
PART_ERROR(H5Lcreate_external_second_file);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_second_file);
}
if ((group_id = H5Gcreate2(file_id, "D/E", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a group\n");
+ printf(" couldn't create a group\n");
PART_ERROR(H5Lcreate_external_second_file);
}
@@ -2344,20 +2342,20 @@ test_create_external_link_multi(void)
if (H5Lcreate_external(ext_link_filename1, "/A/B/C", group_id, "F", H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create external link 'F'\n");
+ printf(" couldn't create external link 'F'\n");
PART_ERROR(H5Lcreate_external_second_file);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_second_file);
}
/* Close file */
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a file\n");
+ printf(" couldn't close a file\n");
PART_ERROR(H5Lcreate_external_second_file);
}
@@ -2374,27 +2372,26 @@ test_create_external_link_multi(void)
if ((file_id = H5Fcreate(ext_link_filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n",
- ext_link_filename3);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename3);
PART_ERROR(H5Lcreate_external_third_file);
}
/* Create object down a path */
if ((group_id = H5Gcreate2(file_id, "G", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a group\n");
+ printf(" couldn't create a group\n");
PART_ERROR(H5Lcreate_external_third_file);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_third_file);
}
if ((group_id = H5Gcreate2(file_id, "G/H", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a group\n");
+ printf(" couldn't create a group\n");
PART_ERROR(H5Lcreate_external_third_file);
}
@@ -2402,20 +2399,20 @@ test_create_external_link_multi(void)
if (H5Lcreate_external(ext_link_filename2, "/D/E/F", group_id, "I", H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create external link 'I'\n");
+ printf(" couldn't create external link 'I'\n");
PART_ERROR(H5Lcreate_external_third_file);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_third_file);
}
/* Close file */
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a file\n");
+ printf(" couldn't close a file\n");
PART_ERROR(H5Lcreate_external_third_file);
}
@@ -2429,84 +2426,84 @@ test_create_external_link_multi(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
PART_ERROR(H5Lcreate_external_final_file);
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
PART_ERROR(H5Lcreate_external_final_file);
}
if ((group_id = H5Gcreate2(container_group, EXTERNAL_LINK_TEST_MULTI_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", EXTERNAL_LINK_TEST_MULTI_NAME);
+ printf(" couldn't create container subgroup '%s'\n", EXTERNAL_LINK_TEST_MULTI_NAME);
PART_ERROR(H5Lcreate_external_final_file);
}
if (H5Lcreate_external(ext_link_filename3, "/G/H/I", group_id, "ext_link", H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link 'ext_link'\n");
+ printf(" couldn't create external link 'ext_link'\n");
PART_ERROR(H5Lcreate_external_final_file);
}
if ((group_id2 = H5Gopen2(group_id, "ext_link", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open the group that is the external link\n");
+ printf(" couldn't open the group that is the external link\n");
PART_ERROR(H5Lcreate_external_final_file);
}
/* Check name */
if (H5Iget_name(group_id2, objname, (size_t)EXTERNAL_LINK_TEST_MULTI_NAME_BUF_SIZE) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the name of the object '%s'\n",
- HARD_LINK_TEST_GROUP_MANY_FINAL_NAME);
+ printf(" couldn't get the name of the object '%s'\n",
+ HARD_LINK_TEST_GROUP_MANY_FINAL_NAME);
PART_ERROR(H5Lcreate_external_final_file);
}
if (HDstrcmp(objname, "/A/B/C")) {
H5_FAILED();
- HDprintf(" wrong name of the object '%s'\n", objname);
+ printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_final_file);
}
/* Create an object in the external file */
if ((group_id3 = H5Gcreate2(group_id2, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a group 'new_group' in the external file\n");
+ printf(" couldn't create a group 'new_group' in the external file\n");
PART_ERROR(H5Lcreate_external_final_file);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_final_file);
}
if (H5Gclose(group_id2) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_final_file);
}
if (H5Gclose(group_id3) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_final_file);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_final_file);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a file\n");
+ printf(" couldn't close a file\n");
PART_ERROR(H5Lcreate_external_final_file);
}
@@ -2520,38 +2517,38 @@ test_create_external_link_multi(void)
if ((file_id = H5Fopen(ext_link_filename1, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", ext_link_filename1);
+ printf(" couldn't open file '%s'\n", ext_link_filename1);
PART_ERROR(H5Lcreate_external_object_created);
}
if ((group_id = H5Gopen2(file_id, "/A/B/C/new_group", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open a group 'new_group' in the external file\n");
+ printf(" couldn't open a group 'new_group' in the external file\n");
PART_ERROR(H5Lcreate_external_object_created);
}
/* Check name */
if (H5Iget_name(group_id, objname, (size_t)EXTERNAL_LINK_TEST_MULTI_NAME_BUF_SIZE) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the name of the object '/A/B/C/new_group'\n");
+ printf(" couldn't get the name of the object '/A/B/C/new_group'\n");
PART_ERROR(H5Lcreate_external_object_created);
}
if (HDstrcmp(objname, "/A/B/C/new_group")) {
H5_FAILED();
- HDprintf(" wrong name of the object '%s'\n", objname);
+ printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_object_created);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close the group\n");
+ printf(" couldn't close the group\n");
PART_ERROR(H5Lcreate_external_object_created);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close the file\n");
+ printf(" couldn't close the file\n");
PART_ERROR(H5Lcreate_external_object_created);
}
@@ -2605,8 +2602,8 @@ test_create_external_link_ping_pong(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or external link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or external link aren't supported with this "
+ "connector\n");
return 0;
}
@@ -2622,8 +2619,7 @@ test_create_external_link_ping_pong(void)
/* Create the first file */
if ((file_id = H5Fcreate(ext_link_filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n",
- ext_link_filename1);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename1);
PART_ERROR(H5Lcreate_external_first_file);
}
@@ -2631,41 +2627,41 @@ test_create_external_link_ping_pong(void)
if (H5Lcreate_external(ext_link_filename2, "/link2", file_id, "link1", H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create external link\n");
+ printf(" couldn't create external link\n");
PART_ERROR(H5Lcreate_external_first_file);
}
if (H5Lcreate_external(ext_link_filename2, "/link4", file_id, "link3", H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create external link\n");
+ printf(" couldn't create external link\n");
PART_ERROR(H5Lcreate_external_first_file);
}
if (H5Lcreate_external(ext_link_filename2, "/link6", file_id, "link5", H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create external link\n");
+ printf(" couldn't create external link\n");
PART_ERROR(H5Lcreate_external_first_file);
}
/* Create final object */
if ((group_id = H5Gcreate2(file_id, "final", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a group\n");
+ printf(" couldn't create a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
/* Close file */
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_first_file);
}
@@ -2680,7 +2676,7 @@ test_create_external_link_ping_pong(void)
/* Create the second file */
if ((file_id = H5Fcreate(ext_link_filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link\n", ext_link_filename2);
+ printf(" couldn't create file '%s' for external link\n", ext_link_filename2);
PART_ERROR(H5Lcreate_external_second_file);
}
@@ -2688,28 +2684,28 @@ test_create_external_link_ping_pong(void)
if (H5Lcreate_external(ext_link_filename1, "/link3", file_id, "link2", H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create external link\n");
+ printf(" couldn't create external link\n");
PART_ERROR(H5Lcreate_external_second_file);
}
if (H5Lcreate_external(ext_link_filename1, "/link5", file_id, "link4", H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create external link\n");
+ printf(" couldn't create external link\n");
PART_ERROR(H5Lcreate_external_second_file);
}
if (H5Lcreate_external(ext_link_filename1, "/final", file_id, "link6", H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create external link\n");
+ printf(" couldn't create external link\n");
PART_ERROR(H5Lcreate_external_second_file);
}
/* Close file */
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close the file\n");
+ printf(" couldn't close the file\n");
PART_ERROR(H5Lcreate_external_second_file);
}
@@ -2723,53 +2719,53 @@ test_create_external_link_ping_pong(void)
if ((file_id = H5Fopen(ext_link_filename1, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", ext_link_filename1);
+ printf(" couldn't open file '%s'\n", ext_link_filename1);
PART_ERROR(H5Lcreate_external_verify);
}
/* Open object through external link */
if ((group_id = H5Gopen2(file_id, "link1", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open the group that is the external link 'link1'\n");
+ printf(" couldn't open the group that is the external link 'link1'\n");
PART_ERROR(H5Lcreate_external_verify);
}
/* Check the name of the object being pointed to */
if (H5Iget_name(group_id, objname, (size_t)EXTERNAL_LINK_TEST_PING_PONG_NAME_BUF_SIZE) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the name of the object\n");
+ printf(" couldn't get the name of the object\n");
PART_ERROR(H5Lcreate_external_verify);
}
if (HDstrcmp(objname, "/final")) {
H5_FAILED();
- HDprintf(" wrong name of the object '%s'\n", objname);
+ printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_verify);
}
/* Create an object in the external file */
if ((group_id2 = H5Gcreate2(group_id, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a new group 'new_group'\n");
+ printf(" couldn't create a new group 'new_group'\n");
PART_ERROR(H5Lcreate_external_verify);
}
if (H5Gclose(group_id2) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_verify);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_verify);
}
/* Close file */
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close the file\n");
+ printf(" couldn't close the file\n");
PART_ERROR(H5Lcreate_external_verify);
}
@@ -2783,40 +2779,40 @@ test_create_external_link_ping_pong(void)
if ((file_id = H5Fopen(ext_link_filename1, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", ext_link_filename1);
+ printf(" couldn't open file '%s'\n", ext_link_filename1);
PART_ERROR(H5Lcreate_external_verify_again);
}
/* Open object through external link */
if ((group_id = H5Gopen2(file_id, "/final/new_group", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open the group that is the external link\n");
+ printf(" couldn't open the group that is the external link\n");
PART_ERROR(H5Lcreate_external_verify_again);
}
/* Check the name of the object being pointed to */
if (H5Iget_name(group_id, objname, (size_t)EXTERNAL_LINK_TEST_PING_PONG_NAME_BUF_SIZE) < 0) {
H5_FAILED();
- HDprintf(" couldn't get the name of the object\n");
+ printf(" couldn't get the name of the object\n");
PART_ERROR(H5Lcreate_external_verify_again);
}
if (HDstrcmp(objname, "/final/new_group")) {
H5_FAILED();
- HDprintf(" wrong name of the object '%s'\n", objname);
+ printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_verify_again);
}
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close a group\n");
+ printf(" couldn't close a group\n");
PART_ERROR(H5Lcreate_external_verify_again);
}
/* Close file */
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close the file\n");
+ printf(" couldn't close the file\n");
PART_ERROR(H5Lcreate_external_verify_again);
}
@@ -2859,8 +2855,8 @@ test_create_external_link_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or external link aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, link, or external link aren't supported "
+ "with this connector\n");
return 0;
}
@@ -2871,7 +2867,7 @@ test_create_external_link_invalid_params(void)
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
@@ -2880,21 +2876,20 @@ test_create_external_link_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, EXTERNAL_LINK_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", EXTERNAL_LINK_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -2915,8 +2910,8 @@ test_create_external_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created external link '%s' using a NULL file name!\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created external link '%s' using a NULL file name!\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_file_name);
}
@@ -2929,8 +2924,8 @@ test_create_external_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created external link '%s' using an invalid file name of ''!\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created external link '%s' using an invalid file name of ''!\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_file_name);
}
@@ -2952,8 +2947,8 @@ test_create_external_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created external link '%s' using a NULL external object name!\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created external link '%s' using a NULL external object name!\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_ext_obj_name);
}
@@ -2967,8 +2962,8 @@ test_create_external_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created external link '%s' using an invalid external object name of ''!\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created external link '%s' using an invalid external object name of ''!\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_ext_obj_name);
}
@@ -2990,8 +2985,8 @@ test_create_external_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created external link '%s' using an invalid link_loc_id!\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created external link '%s' using an invalid link_loc_id!\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_link_loc_id);
}
@@ -3012,8 +3007,8 @@ test_create_external_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created external link '%s' using a NULL link_loc_id!\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created external link '%s' using a NULL link_loc_id!\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_link_name);
}
@@ -3025,8 +3020,8 @@ test_create_external_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created external link '%s' using an invalid link name of ''!\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created external link '%s' using an invalid link name of ''!\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_link_name);
}
@@ -3048,8 +3043,8 @@ test_create_external_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created external link '%s' using an invalid LCPL!\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created external link '%s' using an invalid LCPL!\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_lcpl);
}
@@ -3071,8 +3066,8 @@ test_create_external_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created external link '%s' using an invalid LAPL!\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created external link '%s' using an invalid LAPL!\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_lapl);
}
@@ -3088,14 +3083,14 @@ test_create_external_link_invalid_params(void)
if ((link_exists =
H5Lexists(group_id, EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_existence);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" link '%s' existed!\n", EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" link '%s' existed!\n", EXTERNAL_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_external_invalid_existence);
}
@@ -3148,7 +3143,7 @@ test_create_user_defined_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, link, or user-defined link aren't supported with this "
"connector\n");
return 0;
@@ -3156,20 +3151,20 @@ test_create_user_defined_link(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, UD_LINK_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", UD_LINK_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", UD_LINK_TEST_GROUP_NAME);
goto error;
}
@@ -3179,20 +3174,20 @@ test_create_user_defined_link(void)
if (H5Lcreate_ud(group_id, UD_LINK_TEST_LINK_NAME, H5L_TYPE_EXTERNAL, udata, (size_t)udata_size,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create user-defined link '%s'\n", UD_LINK_TEST_LINK_NAME);
+ printf(" couldn't create user-defined link '%s'\n", UD_LINK_TEST_LINK_NAME);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, UD_LINK_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", UD_LINK_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", UD_LINK_TEST_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' didn't exist!\n", UD_LINK_TEST_LINK_NAME);
+ printf(" link '%s' didn't exist!\n", UD_LINK_TEST_LINK_NAME);
goto error;
}
@@ -3239,8 +3234,8 @@ test_create_user_defined_link_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or user-defined link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, or user-defined link aren't supported with this "
+ "connector\n");
return 0;
}
@@ -3248,20 +3243,20 @@ test_create_user_defined_link_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, UD_LINK_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", UD_LINK_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", UD_LINK_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -3286,8 +3281,8 @@ test_create_user_defined_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created user-defined link '%s' with an invalid link location ID!\n",
- UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created user-defined link '%s' with an invalid link location ID!\n",
+ UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_ud_invalid_link_loc_id);
}
@@ -3308,8 +3303,8 @@ test_create_user_defined_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created user-defined link '%s' with a NULL link name!\n",
- UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created user-defined link '%s' with a NULL link name!\n",
+ UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_ud_invalid_link_name);
}
@@ -3322,8 +3317,8 @@ test_create_user_defined_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created user-defined link '%s' with an invalid link name of ''!\n",
- UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created user-defined link '%s' with an invalid link name of ''!\n",
+ UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_ud_invalid_link_name);
}
@@ -3344,8 +3339,8 @@ test_create_user_defined_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created user-defined link '%s' with an invalid link type!\n",
- UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created user-defined link '%s' with an invalid link type!\n",
+ UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_ud_invalid_link_type);
}
@@ -3366,8 +3361,8 @@ test_create_user_defined_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created user-defined link '%s' with an invalid udata pointer!\n",
- UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created user-defined link '%s' with an invalid udata pointer!\n",
+ UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_ud_invalid_udata_pointer);
}
@@ -3388,8 +3383,8 @@ test_create_user_defined_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created user-defined link '%s' with an invalid LCPL!\n",
- UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created user-defined link '%s' with an invalid LCPL!\n",
+ UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_ud_invalid_lcpl);
}
@@ -3410,8 +3405,8 @@ test_create_user_defined_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" created user-defined link '%s' with an invalid LAPL!\n",
- UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" created user-defined link '%s' with an invalid LAPL!\n",
+ UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_ud_invalid_lapl);
}
@@ -3426,14 +3421,13 @@ test_create_user_defined_link_invalid_params(void)
/* Verify the link hasn't been created */
if ((link_exists = H5Lexists(group_id, UD_LINK_INVALID_PARAMS_TEST_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n",
- UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_ud_invalid_existence);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" link '%s' existed!\n", UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
+ printf(" link '%s' existed!\n", UD_LINK_INVALID_PARAMS_TEST_LINK_NAME);
PART_ERROR(H5Lcreate_ud_invalid_existence);
}
@@ -3491,8 +3485,8 @@ test_delete_link(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, hard link, soft link, or external link "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, hard link, soft link, or external link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -3500,26 +3494,26 @@ test_delete_link(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
}
@@ -3527,7 +3521,7 @@ test_delete_link(void)
if ((group_id = H5Gcreate2(container_group, LINK_DELETE_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -3542,53 +3536,53 @@ test_delete_link(void)
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP1_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP1_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP1_NAME);
PART_ERROR(H5Ldelete_hard);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't create first hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_hard);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if first hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if first hard link '%s' exists\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_hard);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" first hard link did not exist\n");
+ printf(" first hard link did not exist\n");
PART_ERROR(H5Ldelete_hard);
}
if (H5Ldelete(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't delete hard link '%s' using H5Ldelete\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_hard);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if first hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if first hard link '%s' exists\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_hard);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" first hard link exists!\n");
+ printf(" first hard link exists!\n");
PART_ERROR(H5Ldelete_hard);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP1_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP1_NAME);
PART_ERROR(H5Ldelete_hard);
}
@@ -3610,66 +3604,66 @@ test_delete_link(void)
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_NESTED_SUBGROUP_NAME1, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_NESTED_SUBGROUP_NAME1);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_NESTED_SUBGROUP_NAME1);
PART_ERROR(H5Ldelete_hard_indirect);
}
if ((nested_grp_id = H5Gcreate2(subgroup_id, LINK_DELETE_TEST_NESTED_GRP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_NESTED_GRP_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_NESTED_GRP_NAME);
PART_ERROR(H5Ldelete_hard_indirect);
}
if (H5Lcreate_hard(nested_grp_id, ".", nested_grp_id, LINK_DELETE_TEST_HARD_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't create first hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_hard_indirect);
}
if ((link_exists = H5Lexists(nested_grp_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if first hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if first hard link '%s' exists\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_hard_indirect);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" first hard link did not exist\n");
+ printf(" first hard link did not exist\n");
PART_ERROR(H5Ldelete_hard_indirect);
}
if (H5Ldelete(subgroup_id, LINK_DELETE_TEST_NESTED_HARD_LINK_NAME, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete\n",
- LINK_DELETE_TEST_NESTED_HARD_LINK_NAME);
+ printf(" couldn't delete hard link '%s' using H5Ldelete\n",
+ LINK_DELETE_TEST_NESTED_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_hard_indirect);
}
if ((link_exists = H5Lexists(nested_grp_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if first hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if first hard link '%s' exists\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_hard_indirect);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" first hard link exists!\n");
+ printf(" first hard link exists!\n");
PART_ERROR(H5Ldelete_hard_indirect);
}
if (H5Gclose(nested_grp_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_NESTED_GRP_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_NESTED_GRP_NAME);
PART_ERROR(H5Ldelete_hard_indirect);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP1_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP1_NAME);
PART_ERROR(H5Ldelete_hard_indirect);
}
@@ -3693,7 +3687,7 @@ test_delete_link(void)
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP2_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP2_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP2_NAME);
PART_ERROR(H5Ldelete_soft);
}
@@ -3701,46 +3695,46 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP2_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create first soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_soft);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if first soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if first soft link '%s' exists\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_soft);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" first soft link did not exist\n");
+ printf(" first soft link did not exist\n");
PART_ERROR(H5Ldelete_soft);
}
if (H5Ldelete(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't delete soft link '%s' using H5Ldelete\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_soft);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if first soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if first soft link '%s' exists\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_soft);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" first soft link exists!\n");
+ printf(" first soft link exists!\n");
PART_ERROR(H5Ldelete_soft);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP2_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP2_NAME);
PART_ERROR(H5Ldelete_soft);
}
@@ -3764,69 +3758,68 @@ test_delete_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Ldelete_external);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Ldelete_external);
}
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP3_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP3_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP3_NAME);
PART_ERROR(H5Ldelete_external);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first external link '%s'\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't create first external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_external);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if first external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if first external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_external);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" first external link did not exist\n");
+ printf(" first external link did not exist\n");
PART_ERROR(H5Ldelete_external);
}
if (H5Ldelete(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't delete external link '%s' using H5Ldelete\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_external);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if first external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if first external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_external);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" first external link exists!\n");
+ printf(" first external link exists!\n");
PART_ERROR(H5Ldelete_external);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP3_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP3_NAME);
PART_ERROR(H5Ldelete_external);
}
@@ -3867,14 +3860,14 @@ test_delete_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP5_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP5_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP5_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
@@ -3882,217 +3875,204 @@ test_delete_link(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before deletion\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
- "increasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
/* Ensure that the link is gone and others remain */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
- "increasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
- "increasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP5_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP5_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_increasing);
}
@@ -4113,14 +4093,14 @@ test_delete_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP6_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP6_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP6_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
@@ -4128,217 +4108,204 @@ test_delete_link(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before deletion\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
- "decreasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
/* Ensure that the link is gone and others remain */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
- "decreasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
- "decreasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by creation order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP6_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP6_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_crt_order_decreasing);
}
@@ -4360,7 +4327,7 @@ test_delete_link(void)
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP7_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP7_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP7_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
@@ -4368,217 +4335,204 @@ test_delete_link(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before deletion\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "increasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
/* Ensure that the link is gone and others remain */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "increasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "increasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP7_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP7_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_increasing);
}
@@ -4600,7 +4554,7 @@ test_delete_link(void)
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP8_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP8_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP8_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
@@ -4608,217 +4562,204 @@ test_delete_link(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before deletion\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "decreasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
/* Ensure that the link is gone and others remain */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "decreasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "decreasing order\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't delete hard link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' exists after deletion!\n", LINK_DELETE_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP8_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP8_NAME);
PART_ERROR(H5Ldelete_by_idx_hard_name_order_decreasing);
}
@@ -4839,14 +4780,14 @@ test_delete_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP9_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP9_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP9_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
@@ -4855,7 +4796,7 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP9_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
@@ -4863,7 +4804,7 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP9_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
@@ -4871,203 +4812,190 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP9_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before deletion\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
- "increasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
/* Ensure that the link is gone and others remain */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
- "increasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
- "increasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP9_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP9_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_increasing);
}
@@ -5088,14 +5016,14 @@ test_delete_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP10_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP10_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP10_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
@@ -5104,7 +5032,7 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP10_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
@@ -5112,7 +5040,7 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP10_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
@@ -5120,203 +5048,190 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP10_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before deletion\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
- "decreasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
/* Ensure that the link is gone and others remain */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
- "decreasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
- "decreasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by creation order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP10_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP10_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_crt_order_decreasing);
}
@@ -5338,7 +5253,7 @@ test_delete_link(void)
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP11_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP11_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP11_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
@@ -5347,7 +5262,7 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP11_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
@@ -5355,7 +5270,7 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP11_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
@@ -5363,203 +5278,190 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP11_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before deletion\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "increasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
/* Ensure that the link is gone and others remain */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "increasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "increasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP11_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP11_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_increasing);
}
@@ -5581,7 +5483,7 @@ test_delete_link(void)
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP12_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP12_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP12_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
@@ -5590,7 +5492,7 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP12_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
@@ -5598,7 +5500,7 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP12_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
@@ -5606,203 +5508,190 @@ test_delete_link(void)
"/" LINK_DELETE_TEST_SUBGROUP12_NAME,
subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before deletion\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "decreasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
/* Ensure that the link is gone and others remain */
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "decreasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
- "decreasing order\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't delete soft link '%s' using H5Ldelete_by_idx by alphabetical order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' exists after deletion!\n", LINK_DELETE_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP12_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP12_NAME);
PART_ERROR(H5Ldelete_by_idx_soft_name_order_decreasing);
}
@@ -5823,7 +5712,7 @@ test_delete_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ldelete_by_idx_external_crt_order_increasing);
}
@@ -5833,20 +5722,20 @@ test_delete_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP13_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP13_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP13_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
@@ -5854,21 +5743,21 @@ test_delete_link(void)
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
@@ -5876,54 +5765,54 @@ test_delete_link(void)
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
- "increasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
@@ -5931,158 +5820,158 @@ test_delete_link(void)
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
- "increasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
- "increasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
+ "increasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP13_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP13_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_increasing);
}
@@ -6105,7 +5994,7 @@ test_delete_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ldelete_by_idx_external_crt_order_decreasing);
}
@@ -6115,20 +6004,20 @@ test_delete_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP14_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP14_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP14_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
@@ -6136,21 +6025,21 @@ test_delete_link(void)
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
@@ -6158,54 +6047,54 @@ test_delete_link(void)
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
- "decreasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
@@ -6213,158 +6102,158 @@ test_delete_link(void)
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
- "decreasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
- "decreasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by creation order in "
+ "decreasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP14_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP14_NAME);
PART_ERROR(H5Ldelete_by_idx_external_crt_order_decreasing);
}
@@ -6391,20 +6280,20 @@ test_delete_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP15_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP15_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP15_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
@@ -6412,21 +6301,21 @@ test_delete_link(void)
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
@@ -6434,54 +6323,54 @@ test_delete_link(void)
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
- "order in increasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
+ "order in increasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
@@ -6489,158 +6378,158 @@ test_delete_link(void)
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
- "order in increasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
+ "order in increasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
- "order in increasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
+ "order in increasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP15_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP15_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_increasing);
}
@@ -6667,20 +6556,20 @@ test_delete_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP16_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP16_NAME);
+ printf(" couldn't create subgroup '%s'\n", LINK_DELETE_TEST_SUBGROUP16_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
@@ -6688,21 +6577,21 @@ test_delete_link(void)
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
@@ -6710,54 +6599,54 @@ test_delete_link(void)
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist before deletion\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
/* Delete a link */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
- "order in decreasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
+ "order in decreasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
@@ -6765,158 +6654,158 @@ test_delete_link(void)
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
/* Repeat until all links have been deleted */
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
- "order in decreasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
+ "order in decreasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist after deletion of a different link!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist after deletion of a different link!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (H5Ldelete_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
- "order in decreasing order\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't delete external link '%s' using H5Ldelete_by_idx by alphabetical "
+ "order in decreasing order\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, LINK_DELETE_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' exists after deletion!\n",
- LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' exists after deletion!\n",
+ LINK_DELETE_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP16_NAME);
+ printf(" failed to close group '%s'\n", LINK_DELETE_TEST_SUBGROUP16_NAME);
PART_ERROR(H5Ldelete_by_idx_external_name_order_decreasing);
}
@@ -7060,8 +6949,8 @@ test_delete_link_reset_grp_max_crt_order(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or creation order "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, or creation order "
+ "aren't supported with this connector\n");
return 0;
}
@@ -7069,33 +6958,33 @@ test_delete_link_reset_grp_max_crt_order(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP_NAME,
H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP_NAME);
goto error;
}
@@ -7110,8 +6999,8 @@ test_delete_link_reset_grp_max_crt_order(void)
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP1_NAME,
H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n",
- LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP1_NAME);
+ printf(" couldn't create subgroup '%s'\n",
+ LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP1_NAME);
PART_ERROR(H5Ldelete_links_bottom_up);
}
@@ -7121,7 +7010,7 @@ test_delete_link_reset_grp_max_crt_order(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", link_name);
+ printf(" couldn't create hard link '%s'\n", link_name);
PART_ERROR(H5Ldelete_links_bottom_up);
}
}
@@ -7132,15 +7021,15 @@ test_delete_link_reset_grp_max_crt_order(void)
if (H5Gget_info(subgroup_id, &grp_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group's info\n");
+ printf(" failed to retrieve group's info\n");
PART_ERROR(H5Ldelete_links_bottom_up);
}
if (grp_info.max_corder != LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" group's maximum creation order value got adjusted to %lld during link "
- "deletion; value should have remained at %d\n",
- (long long)grp_info.max_corder, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
+ printf(" group's maximum creation order value got adjusted to %lld during link "
+ "deletion; value should have remained at %d\n",
+ (long long)grp_info.max_corder, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
PART_ERROR(H5Ldelete_links_bottom_up);
}
@@ -7148,7 +7037,7 @@ test_delete_link_reset_grp_max_crt_order(void)
if (H5Ldelete(subgroup_id, link_name, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete link '%s'\n", link_name);
+ printf(" failed to delete link '%s'\n", link_name);
PART_ERROR(H5Ldelete_links_bottom_up);
}
}
@@ -7159,15 +7048,15 @@ test_delete_link_reset_grp_max_crt_order(void)
if (H5Gget_info(subgroup_id, &grp_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group's info\n");
+ printf(" failed to retrieve group's info\n");
PART_ERROR(H5Ldelete_links_bottom_up);
}
if (grp_info.max_corder != 0) {
H5_FAILED();
- HDprintf(" group's maximum creation order value didn't reset to 0 after deleting all "
- "links from group; value is still %lld\n",
- (long long)grp_info.max_corder);
+ printf(" group's maximum creation order value didn't reset to 0 after deleting all "
+ "links from group; value is still %lld\n",
+ (long long)grp_info.max_corder);
PART_ERROR(H5Ldelete_links_bottom_up);
}
@@ -7189,8 +7078,8 @@ test_delete_link_reset_grp_max_crt_order(void)
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP2_NAME,
H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n",
- LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP2_NAME);
+ printf(" couldn't create subgroup '%s'\n",
+ LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP2_NAME);
PART_ERROR(H5Ldelete_links_top_down);
}
@@ -7200,7 +7089,7 @@ test_delete_link_reset_grp_max_crt_order(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", link_name);
+ printf(" couldn't create hard link '%s'\n", link_name);
PART_ERROR(H5Ldelete_links_top_down);
}
}
@@ -7211,15 +7100,15 @@ test_delete_link_reset_grp_max_crt_order(void)
if (H5Gget_info(subgroup_id, &grp_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group's info\n");
+ printf(" failed to retrieve group's info\n");
PART_ERROR(H5Ldelete_links_top_down);
}
if (grp_info.max_corder != LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" group's maximum creation order value got adjusted to %lld during link "
- "deletion; value should have remained at %d\n",
- (long long)grp_info.max_corder, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
+ printf(" group's maximum creation order value got adjusted to %lld during link "
+ "deletion; value should have remained at %d\n",
+ (long long)grp_info.max_corder, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
PART_ERROR(H5Ldelete_links_top_down);
}
@@ -7228,7 +7117,7 @@ test_delete_link_reset_grp_max_crt_order(void)
if (H5Ldelete(subgroup_id, link_name, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to delete link '%s'\n", link_name);
+ printf(" failed to delete link '%s'\n", link_name);
PART_ERROR(H5Ldelete_links_top_down);
}
}
@@ -7239,15 +7128,15 @@ test_delete_link_reset_grp_max_crt_order(void)
if (H5Gget_info(subgroup_id, &grp_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group's info\n");
+ printf(" failed to retrieve group's info\n");
PART_ERROR(H5Ldelete_links_top_down);
}
if (grp_info.max_corder != 0) {
H5_FAILED();
- HDprintf(" group's maximum creation order value didn't reset to 0 after deleting all "
- "links from group; value is still %lld\n",
- (long long)grp_info.max_corder);
+ printf(" group's maximum creation order value didn't reset to 0 after deleting all "
+ "links from group; value is still %lld\n",
+ (long long)grp_info.max_corder);
PART_ERROR(H5Ldelete_links_top_down);
}
@@ -7308,8 +7197,8 @@ test_delete_link_invalid_params(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_BY_IDX) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, flag by index, or hard link aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, link, flag by index, or hard link aren't "
+ "supported with this connector\n");
return 0;
}
@@ -7317,27 +7206,27 @@ test_delete_link_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, LINK_DELETE_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", LINK_DELETE_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_DELETE_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
if (H5Lcreate_hard(group_id, ".", group_id, LINK_DELETE_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_DELETE_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", LINK_DELETE_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
@@ -7345,14 +7234,14 @@ test_delete_link_invalid_params(void)
if ((link_exists = H5Lexists(group_id, LINK_DELETE_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if first hard link '%s' exists\n",
- LINK_DELETE_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if first hard link '%s' exists\n",
+ LINK_DELETE_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" first hard link did not exist\n");
+ printf(" first hard link did not exist\n");
goto error;
}
@@ -7373,7 +7262,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete succeeded with an invalid location ID!\n");
+ printf(" H5Ldelete succeeded with an invalid location ID!\n");
PART_ERROR(H5Ldelete_invalid_loc_id);
}
@@ -7393,7 +7282,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete succeeded with a NULL link name!\n");
+ printf(" H5Ldelete succeeded with a NULL link name!\n");
PART_ERROR(H5Ldelete_invalid_link_name);
}
@@ -7405,7 +7294,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete succeeded with an invalid link name of ''!\n");
+ printf(" H5Ldelete succeeded with an invalid link name of ''!\n");
PART_ERROR(H5Ldelete_invalid_link_name);
}
@@ -7426,7 +7315,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete succeeded with an invalid LAPL!\n");
+ printf(" H5Ldelete succeeded with an invalid LAPL!\n");
PART_ERROR(H5Ldelete_invalid_lapl);
}
@@ -7446,7 +7335,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete_by_idx succeeded with an invalid location ID!\n");
+ printf(" H5Ldelete_by_idx succeeded with an invalid location ID!\n");
PART_ERROR(H5Ldelete_by_idx_invalid_loc_id);
}
@@ -7466,7 +7355,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete_by_idx succeeded with a NULL group name!\n");
+ printf(" H5Ldelete_by_idx succeeded with a NULL group name!\n");
PART_ERROR(H5Ldelete_by_idx_invalid_grp_name);
}
@@ -7478,7 +7367,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete_by_idx succeeded with an invalid group name of ''!\n");
+ printf(" H5Ldelete_by_idx succeeded with an invalid group name of ''!\n");
PART_ERROR(H5Ldelete_by_idx_invalid_grp_name);
}
@@ -7498,7 +7387,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete_by_idx succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Ldelete_by_idx succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Ldelete_by_idx_invalid_index_type);
}
@@ -7510,7 +7399,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete_by_idx succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Ldelete_by_idx succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Ldelete_by_idx_invalid_index_type);
}
@@ -7530,7 +7419,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete_by_idx succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
+ printf(" H5Ldelete_by_idx succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Ldelete_by_idx_invalid_index_order);
}
@@ -7542,7 +7431,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete_by_idx succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Ldelete_by_idx succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Ldelete_by_idx_invalid_index_order);
}
@@ -7562,7 +7451,7 @@ test_delete_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ldelete_by_idx succeeded with an invalid LAPL!\n");
+ printf(" H5Ldelete_by_idx succeeded with an invalid LAPL!\n");
PART_ERROR(H5Ldelete_by_idx_invalid_lapl);
}
@@ -7578,14 +7467,14 @@ test_delete_link_invalid_params(void)
if ((link_exists =
H5Lexists(group_id, LINK_DELETE_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- LINK_DELETE_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ LINK_DELETE_INVALID_PARAMS_TEST_HARD_LINK_NAME);
PART_ERROR(H5Ldelete_by_idx_link_existence);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link didn't exist!\n");
+ printf(" hard link didn't exist!\n");
PART_ERROR(H5Ldelete_by_idx_link_existence);
}
@@ -7640,9 +7529,8 @@ test_copy_link(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, link, hard link, soft link, or external link aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, link, hard link, soft link, or external link aren't "
+ "supported with this connector\n");
return 0;
}
@@ -7650,34 +7538,34 @@ test_copy_link(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s\n", H5_api_test_filename);
+ printf(" couldn't open file '%s\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't opewn container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't opewn container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, COPY_LINK_TEST_SUBGROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", COPY_LINK_TEST_SUBGROUP_NAME);
+ printf(" couldn't create group '%s'\n", COPY_LINK_TEST_SUBGROUP_NAME);
goto error;
}
if ((src_grp_id = H5Gcreate2(group_id, COPY_LINK_TEST_SRC_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", COPY_LINK_TEST_SRC_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", COPY_LINK_TEST_SRC_GROUP_NAME);
goto error;
}
if ((dst_grp_id = H5Gcreate2(group_id, COPY_LINK_TEST_DST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", COPY_LINK_TEST_DST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", COPY_LINK_TEST_DST_GROUP_NAME);
goto error;
}
@@ -7693,33 +7581,33 @@ test_copy_link(void)
if (H5Lcreate_hard(group_id, ".", src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lcopy_hard_no_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lcopy_hard_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lcopy_hard_no_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lcopy_hard_no_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link existed in target group before copy!\n");
+ printf(" hard link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_hard_no_check);
}
@@ -7727,34 +7615,34 @@ test_copy_link(void)
if (H5Lcopy(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME, dst_grp_id,
COPY_LINK_TEST_HARD_LINK_COPY_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME);
+ printf(" failed to copy hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lcopy_hard_no_check);
}
/* Verify the link has been copied and still exists in the source group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_HARD_LINK_COPY_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link copy '%s' exists\n",
- COPY_LINK_TEST_HARD_LINK_COPY_NAME);
+ printf(" couldn't determine if hard link copy '%s' exists\n",
+ COPY_LINK_TEST_HARD_LINK_COPY_NAME);
PART_ERROR(H5Lcopy_hard_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link copy did not exist\n");
+ printf(" hard link copy did not exist\n");
PART_ERROR(H5Lcopy_hard_no_check);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original hard link '%s' exists\n",
- COPY_LINK_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if original hard link '%s' exists\n",
+ COPY_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lcopy_hard_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original hard link did not exist\n");
+ printf(" original hard link did not exist\n");
PART_ERROR(H5Lcopy_hard_no_check);
}
@@ -7773,40 +7661,40 @@ test_copy_link(void)
if (H5Lcreate_hard(group_id, ".", src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lcopy_hard_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lcopy_hard_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lcopy_hard_check);
}
/* Retrieve the link's info */
if (H5Lget_info2(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME2, &orig_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lcopy_hard_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lcopy_hard_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link existed in target group before copy!\n");
+ printf(" hard link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_hard_check);
}
@@ -7814,83 +7702,83 @@ test_copy_link(void)
if (H5Lcopy(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME2, dst_grp_id,
COPY_LINK_TEST_HARD_LINK_COPY_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME2);
+ printf(" failed to copy hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lcopy_hard_check);
}
/* Verify the link has been copied and still exists in the source group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_HARD_LINK_COPY_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link copy '%s' exists\n",
- COPY_LINK_TEST_HARD_LINK_COPY_NAME2);
+ printf(" couldn't determine if hard link copy '%s' exists\n",
+ COPY_LINK_TEST_HARD_LINK_COPY_NAME2);
PART_ERROR(H5Lcopy_hard_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link copy did not exist\n");
+ printf(" hard link copy did not exist\n");
PART_ERROR(H5Lcopy_hard_check);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original hard link '%s' exists\n",
- COPY_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if original hard link '%s' exists\n",
+ COPY_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lcopy_hard_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original hard link did not exist\n");
+ printf(" original hard link did not exist\n");
PART_ERROR(H5Lcopy_hard_check);
}
/* Retrieve the new link's info */
if (H5Lget_info2(dst_grp_id, COPY_LINK_TEST_HARD_LINK_COPY_NAME2, &new_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_HARD_LINK_COPY_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_HARD_LINK_COPY_NAME2);
PART_ERROR(H5Lcopy_hard_check);
}
if (new_info.type != orig_info.type) {
H5_FAILED();
- HDprintf(" copied link's link type doesn't match original link's type\n");
+ printf(" copied link's link type doesn't match original link's type\n");
PART_ERROR(H5Lcopy_hard_check);
}
if (H5Otoken_cmp(dst_grp_id, &new_info.u.token, &orig_info.u.token, &cmp_value) < 0) {
H5_FAILED();
- HDprintf(" failed to compare link target tokens\n");
+ printf(" failed to compare link target tokens\n");
PART_ERROR(H5Lcopy_hard_check);
}
if (cmp_value != 0) {
H5_FAILED();
- HDprintf(" copied hard link's object token doesn't match original link's object token\n");
+ printf(" copied hard link's object token doesn't match original link's object token\n");
PART_ERROR(H5Lcopy_hard_check);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (new_info.corder_valid != orig_info.corder_valid) {
H5_FAILED();
- HDprintf(" copied link's 'corder_valid' field doesn't match original link's "
- "'corder_valid' field\n");
+ printf(" copied link's 'corder_valid' field doesn't match original link's "
+ "'corder_valid' field\n");
PART_ERROR(H5Lcopy_hard_check);
}
if (new_info.corder_valid && orig_info.corder_valid &&
(new_info.corder != orig_info.corder)) {
H5_FAILED();
- HDprintf(" copied link's creation order value %" PRId64
- " doesn't match original link's creation order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
+ printf(" copied link's creation order value %" PRId64
+ " doesn't match original link's creation order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
PART_ERROR(H5Lcopy_hard_check);
}
}
if (new_info.cset != orig_info.cset) {
H5_FAILED();
- HDprintf(" copied link's character set doesn't match original link's character set\n");
+ printf(" copied link's character set doesn't match original link's character set\n");
PART_ERROR(H5Lcopy_hard_check);
}
@@ -7906,20 +7794,20 @@ test_copy_link(void)
if (H5Lcreate_hard(group_id, ".", src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", COPY_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lcopy_hard_same_loc);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", COPY_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lcopy_hard_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lcopy_hard_same_loc);
}
@@ -7927,28 +7815,28 @@ test_copy_link(void)
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lcopy_hard_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link existed in target group before copy!\n");
+ printf(" hard link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_hard_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME2);
PART_ERROR(H5Lcopy_hard_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link existed in target group before copy!\n");
+ printf(" hard link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_hard_same_loc);
}
@@ -7956,9 +7844,8 @@ test_copy_link(void)
if (H5Lcopy(H5L_SAME_LOC, COPY_LINK_TEST_HARD_LINK_NAME3, src_grp_id,
COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(
- " failed to copy hard link '%s' using H5L_SAME_LOC as first parameter to H5Lcopy\n",
- COPY_LINK_TEST_HARD_LINK_NAME3);
+ printf(" failed to copy hard link '%s' using H5L_SAME_LOC as first parameter to H5Lcopy\n",
+ COPY_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lcopy_hard_same_loc);
}
@@ -7966,9 +7853,8 @@ test_copy_link(void)
if (H5Lcopy(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME3, H5L_SAME_LOC,
COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(
- " failed to copy hard link '%s' using H5L_SAME_LOC as third parameter to H5Lcopy\n",
- COPY_LINK_TEST_HARD_LINK_NAME3);
+ printf(" failed to copy hard link '%s' using H5L_SAME_LOC as third parameter to H5Lcopy\n",
+ COPY_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lcopy_hard_same_loc);
}
@@ -7976,41 +7862,41 @@ test_copy_link(void)
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link copy '%s' exists\n",
- COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if hard link copy '%s' exists\n",
+ COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lcopy_hard_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link copy did not exist\n");
+ printf(" hard link copy did not exist\n");
PART_ERROR(H5Lcopy_hard_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link copy '%s' exists\n",
- COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME2);
+ printf(" couldn't determine if hard link copy '%s' exists\n",
+ COPY_LINK_TEST_HARD_LINK_SAME_LOC_NAME2);
PART_ERROR(H5Lcopy_hard_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link copy did not exist\n");
+ printf(" hard link copy did not exist\n");
PART_ERROR(H5Lcopy_hard_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original hard link '%s' exists\n",
- COPY_LINK_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if original hard link '%s' exists\n",
+ COPY_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lcopy_hard_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original hard link did not exist\n");
+ printf(" original hard link did not exist\n");
PART_ERROR(H5Lcopy_hard_same_loc);
}
@@ -8026,33 +7912,33 @@ test_copy_link(void)
if (H5Lcreate_soft(COPY_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id,
COPY_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lcopy_soft_no_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lcopy_soft_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lcopy_soft_no_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lcopy_soft_no_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link existed in target group before copy!\n");
+ printf(" soft link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_soft_no_check);
}
@@ -8060,34 +7946,34 @@ test_copy_link(void)
if (H5Lcopy(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME, dst_grp_id,
COPY_LINK_TEST_SOFT_LINK_COPY_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME);
+ printf(" failed to copy soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lcopy_soft_no_check);
}
/* Verify the link has been copied and still exists in the source group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_SOFT_LINK_COPY_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' copy exists\n",
- COPY_LINK_TEST_SOFT_LINK_COPY_NAME);
+ printf(" couldn't determine if soft link '%s' copy exists\n",
+ COPY_LINK_TEST_SOFT_LINK_COPY_NAME);
PART_ERROR(H5Lcopy_soft_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link copy did not exist\n");
+ printf(" soft link copy did not exist\n");
PART_ERROR(H5Lcopy_soft_no_check);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original soft link '%s' exists\n",
- COPY_LINK_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if original soft link '%s' exists\n",
+ COPY_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lcopy_soft_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original soft link did not exist\n");
+ printf(" original soft link did not exist\n");
PART_ERROR(H5Lcopy_soft_no_check);
}
@@ -8107,27 +7993,27 @@ test_copy_link(void)
if (H5Lcreate_soft(COPY_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id,
COPY_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lcopy_soft_check);
}
/* Retrieve the link's info */
if (H5Lget_info2(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME2, &orig_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
@@ -8135,20 +8021,20 @@ test_copy_link(void)
if (H5Lget_val(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME2, orig_link_val,
COPY_LINK_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve value for soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't retrieve value for soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link existed in target group before copy!\n");
+ printf(" soft link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_soft_check);
}
@@ -8156,79 +8042,79 @@ test_copy_link(void)
if (H5Lcopy(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME2, dst_grp_id,
COPY_LINK_TEST_SOFT_LINK_COPY_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" failed to copy soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
/* Verify the link has been copied and still exists in the source group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_SOFT_LINK_COPY_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' copy exists\n",
- COPY_LINK_TEST_SOFT_LINK_COPY_NAME2);
+ printf(" couldn't determine if soft link '%s' copy exists\n",
+ COPY_LINK_TEST_SOFT_LINK_COPY_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link copy did not exist\n");
+ printf(" soft link copy did not exist\n");
PART_ERROR(H5Lcopy_soft_check);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original soft link '%s' exists\n",
- COPY_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if original soft link '%s' exists\n",
+ COPY_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original soft link did not exist\n");
+ printf(" original soft link did not exist\n");
PART_ERROR(H5Lcopy_soft_check);
}
/* Retrieve the new link's info */
if (H5Lget_info2(dst_grp_id, COPY_LINK_TEST_SOFT_LINK_COPY_NAME2, &new_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_SOFT_LINK_COPY_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_SOFT_LINK_COPY_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
if (new_info.type != orig_info.type) {
H5_FAILED();
- HDprintf(" copied link's link type doesn't match original link's type\n");
+ printf(" copied link's link type doesn't match original link's type\n");
PART_ERROR(H5Lcopy_soft_check);
}
if (new_info.u.val_size != orig_info.u.val_size) {
H5_FAILED();
- HDprintf(" copied soft link's value size of %llu doesn't match original link's value size "
- "of %llu\n",
- (unsigned long long)new_info.u.val_size, (unsigned long long)orig_info.u.val_size);
+ printf(" copied soft link's value size of %llu doesn't match original link's value size "
+ "of %llu\n",
+ (unsigned long long)new_info.u.val_size, (unsigned long long)orig_info.u.val_size);
PART_ERROR(H5Lcopy_soft_check);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (new_info.corder_valid != orig_info.corder_valid) {
H5_FAILED();
- HDprintf(" copied link's 'corder_valid' field doesn't match original link's "
- "'corder_valid' field\n");
+ printf(" copied link's 'corder_valid' field doesn't match original link's "
+ "'corder_valid' field\n");
PART_ERROR(H5Lcopy_soft_check);
}
if (new_info.corder_valid && orig_info.corder_valid &&
(new_info.corder != orig_info.corder)) {
H5_FAILED();
- HDprintf(" copied link's creation order value %" PRId64
- " doesn't match original link's creation order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
+ printf(" copied link's creation order value %" PRId64
+ " doesn't match original link's creation order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
PART_ERROR(H5Lcopy_soft_check);
}
}
if (new_info.cset != orig_info.cset) {
H5_FAILED();
- HDprintf(" copied link's character set doesn't match original link's character set\n");
+ printf(" copied link's character set doesn't match original link's character set\n");
PART_ERROR(H5Lcopy_soft_check);
}
@@ -8236,15 +8122,15 @@ test_copy_link(void)
if (H5Lget_val(dst_grp_id, COPY_LINK_TEST_SOFT_LINK_COPY_NAME2, new_link_val,
COPY_LINK_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve value for soft link '%s'\n",
- COPY_LINK_TEST_SOFT_LINK_COPY_NAME2);
+ printf(" couldn't retrieve value for soft link '%s'\n",
+ COPY_LINK_TEST_SOFT_LINK_COPY_NAME2);
PART_ERROR(H5Lcopy_soft_check);
}
if (HDstrncmp(orig_link_val, new_link_val, COPY_LINK_TEST_LINK_VAL_BUF_SIZE)) {
H5_FAILED();
- HDprintf(" copied soft link's value '%s' doesn't match original link's value '%s'\n",
- new_link_val, orig_link_val);
+ printf(" copied soft link's value '%s' doesn't match original link's value '%s'\n",
+ new_link_val, orig_link_val);
PART_ERROR(H5Lcopy_soft_check);
}
@@ -8260,20 +8146,20 @@ test_copy_link(void)
if (H5Lcreate_soft(COPY_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id,
COPY_LINK_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", COPY_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lcopy_soft_same_loc);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", COPY_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lcopy_soft_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lcopy_soft_same_loc);
}
@@ -8281,28 +8167,28 @@ test_copy_link(void)
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lcopy_soft_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link existed in target group before copy!\n");
+ printf(" soft link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_soft_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME2);
PART_ERROR(H5Lcopy_soft_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link existed in target group before copy!\n");
+ printf(" soft link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_soft_same_loc);
}
@@ -8310,9 +8196,8 @@ test_copy_link(void)
if (H5Lcopy(H5L_SAME_LOC, COPY_LINK_TEST_SOFT_LINK_NAME3, src_grp_id,
COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(
- " failed to copy soft link '%s' using H5L_SAME_LOC as first parameter to H5Lcopy\n",
- COPY_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" failed to copy soft link '%s' using H5L_SAME_LOC as first parameter to H5Lcopy\n",
+ COPY_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lcopy_soft_same_loc);
}
@@ -8320,9 +8205,8 @@ test_copy_link(void)
if (H5Lcopy(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME3, H5L_SAME_LOC,
COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(
- " failed to copy soft link '%s' using H5L_SAME_LOC as third parameter to H5Lcopy\n",
- COPY_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" failed to copy soft link '%s' using H5L_SAME_LOC as third parameter to H5Lcopy\n",
+ COPY_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lcopy_soft_same_loc);
}
@@ -8330,41 +8214,41 @@ test_copy_link(void)
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' copy exists\n",
- COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if soft link '%s' copy exists\n",
+ COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lcopy_soft_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link copy did not exist\n");
+ printf(" soft link copy did not exist\n");
PART_ERROR(H5Lcopy_soft_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' copy exists\n",
- COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME2);
+ printf(" couldn't determine if soft link '%s' copy exists\n",
+ COPY_LINK_TEST_SOFT_LINK_SAME_LOC_NAME2);
PART_ERROR(H5Lcopy_soft_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link copy did not exist\n");
+ printf(" soft link copy did not exist\n");
PART_ERROR(H5Lcopy_soft_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original soft link '%s' exists\n",
- COPY_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if original soft link '%s' exists\n",
+ COPY_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lcopy_soft_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original soft link did not exist\n");
+ printf(" original soft link did not exist\n");
PART_ERROR(H5Lcopy_soft_same_loc);
}
@@ -8381,13 +8265,13 @@ test_copy_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lcopy_external_no_check);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lcopy_external_no_check);
}
@@ -8395,35 +8279,35 @@ test_copy_link(void)
if (H5Lcreate_external(ext_link_filename, "/", src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lcopy_external_no_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lcopy_external_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lcopy_external_no_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lcopy_external_no_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link existed in target group before copy!\n");
+ printf(" external link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_external_no_check);
}
@@ -8431,7 +8315,7 @@ test_copy_link(void)
if (H5Lcopy(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME, dst_grp_id,
COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME);
+ printf(" failed to copy external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lcopy_external_no_check);
}
@@ -8439,27 +8323,27 @@ test_copy_link(void)
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link copy '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME);
+ printf(" couldn't determine if external link copy '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME);
PART_ERROR(H5Lcopy_external_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link copy did not exist\n");
+ printf(" external link copy did not exist\n");
PART_ERROR(H5Lcopy_external_no_check);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if original external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lcopy_external_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original external link did not exist\n");
+ printf(" original external link did not exist\n");
PART_ERROR(H5Lcopy_external_no_check);
}
@@ -8490,13 +8374,13 @@ test_copy_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lcopy_external_check);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lcopy_external_check);
}
@@ -8504,28 +8388,28 @@ test_copy_link(void)
if (H5Lcreate_external(ext_link_filename, "/", src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME2,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lcopy_external_check);
}
/* Retrieve the link's info */
if (H5Lget_info2(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME2, &orig_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
@@ -8533,29 +8417,29 @@ test_copy_link(void)
if (H5Lget_val(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME2, orig_link_val,
COPY_LINK_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve value for external link '%s'\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't retrieve value for external link '%s'\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
if (H5Lunpack_elink_val(orig_link_val, orig_info.u.val_size, &unpack_flags, &orig_filename,
&orig_objname) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack original external link's value buffer\n");
+ printf(" couldn't unpack original external link's value buffer\n");
PART_ERROR(H5Lcopy_external_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link existed in target group before copy!\n");
+ printf(" external link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_external_check);
}
@@ -8563,7 +8447,7 @@ test_copy_link(void)
if (H5Lcopy(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME2, dst_grp_id,
COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
+ printf(" failed to copy external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
@@ -8571,27 +8455,27 @@ test_copy_link(void)
if ((link_exists = H5Lexists(dst_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link copy '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2);
+ printf(" couldn't determine if external link copy '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link copy did not exist\n");
+ printf(" external link copy did not exist\n");
PART_ERROR(H5Lcopy_external_check);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if original external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original external link did not exist\n");
+ printf(" original external link did not exist\n");
PART_ERROR(H5Lcopy_external_check);
}
@@ -8599,47 +8483,46 @@ test_copy_link(void)
if (H5Lget_info2(dst_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2, &new_info, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n",
- COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
if (new_info.type != orig_info.type) {
H5_FAILED();
- HDprintf(" copied link's link type doesn't match original link's type\n");
+ printf(" copied link's link type doesn't match original link's type\n");
PART_ERROR(H5Lcopy_external_check);
}
if (new_info.u.val_size != orig_info.u.val_size) {
H5_FAILED();
- HDprintf(" copied external link's value size of %llu doesn't match original link's value "
- "size of %llu\n",
- (unsigned long long)new_info.u.val_size, (unsigned long long)orig_info.u.val_size);
+ printf(" copied external link's value size of %llu doesn't match original link's value "
+ "size of %llu\n",
+ (unsigned long long)new_info.u.val_size, (unsigned long long)orig_info.u.val_size);
PART_ERROR(H5Lcopy_external_check);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (new_info.corder_valid != orig_info.corder_valid) {
H5_FAILED();
- HDprintf(" copied link's 'corder_valid' field doesn't match original link's "
- "'corder_valid' field\n");
+ printf(" copied link's 'corder_valid' field doesn't match original link's "
+ "'corder_valid' field\n");
PART_ERROR(H5Lcopy_external_check);
}
if (new_info.corder_valid && orig_info.corder_valid &&
(new_info.corder != orig_info.corder)) {
H5_FAILED();
- HDprintf(" copied link's creation order value %" PRId64
- " doesn't match original link's creation "
- "order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
+ printf(" copied link's creation order value %" PRId64
+ " doesn't match original link's creation "
+ "order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
PART_ERROR(H5Lcopy_external_check);
}
}
if (new_info.cset != orig_info.cset) {
H5_FAILED();
- HDprintf(" copied link's character set doesn't match original link's character set\n");
+ printf(" copied link's character set doesn't match original link's character set\n");
PART_ERROR(H5Lcopy_external_check);
}
@@ -8647,31 +8530,31 @@ test_copy_link(void)
if (H5Lget_val(dst_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2, new_link_val,
COPY_LINK_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve value for external link '%s'\n",
- COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2);
+ printf(" couldn't retrieve value for external link '%s'\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_COPY_NAME2);
PART_ERROR(H5Lcopy_external_check);
}
if (H5Lunpack_elink_val(new_link_val, new_info.u.val_size, &unpack_flags, &new_filename,
&new_objname) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack copied external link's value buffer\n");
+ printf(" couldn't unpack copied external link's value buffer\n");
PART_ERROR(H5Lcopy_external_check);
}
if (HDstrncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
H5_FAILED();
- HDprintf(" copied external link's filename '%s' doesn't match original external link's "
- "filename '%s'\n",
- new_filename, orig_filename);
+ printf(" copied external link's filename '%s' doesn't match original external link's "
+ "filename '%s'\n",
+ new_filename, orig_filename);
PART_ERROR(H5Lcopy_external_check);
}
if (HDstrncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
H5_FAILED();
- HDprintf(" copied external link's object name '%s' doesn't match original external link's "
- "object name '%s'\n",
- new_objname, orig_objname);
+ printf(" copied external link's object name '%s' doesn't match original external link's "
+ "object name '%s'\n",
+ new_objname, orig_objname);
PART_ERROR(H5Lcopy_external_check);
}
@@ -8695,13 +8578,13 @@ test_copy_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lcopy_external_same_loc);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lcopy_external_same_loc);
}
@@ -8709,21 +8592,21 @@ test_copy_link(void)
if (H5Lcreate_external(ext_link_filename, "/", src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lcopy_external_same_loc);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lcopy_external_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lcopy_external_same_loc);
}
@@ -8731,28 +8614,28 @@ test_copy_link(void)
if ((link_exists =
H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lcopy_external_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link existed in target group before copy!\n");
+ printf(" external link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_external_same_loc);
}
if ((link_exists =
H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME2);
PART_ERROR(H5Lcopy_external_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link existed in target group before copy!\n");
+ printf(" external link existed in target group before copy!\n");
PART_ERROR(H5Lcopy_external_same_loc);
}
@@ -8760,9 +8643,9 @@ test_copy_link(void)
if (H5Lcopy(H5L_SAME_LOC, COPY_LINK_TEST_EXTERNAL_LINK_NAME3, src_grp_id,
COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy external link '%s' using H5L_SAME_LOC as first parameter to "
- "H5Lcopy\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
+ printf(" failed to copy external link '%s' using H5L_SAME_LOC as first parameter to "
+ "H5Lcopy\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lcopy_external_same_loc);
}
@@ -8770,9 +8653,9 @@ test_copy_link(void)
if (H5Lcopy(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME3, H5L_SAME_LOC,
COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy external link '%s' using H5L_SAME_LOC as third parameter to "
- "H5Lcopy\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
+ printf(" failed to copy external link '%s' using H5L_SAME_LOC as third parameter to "
+ "H5Lcopy\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lcopy_external_same_loc);
}
@@ -8780,41 +8663,41 @@ test_copy_link(void)
if ((link_exists =
H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link copy '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if external link copy '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lcopy_external_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link copy did not exist\n");
+ printf(" external link copy did not exist\n");
PART_ERROR(H5Lcopy_external_same_loc);
}
if ((link_exists =
H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link copy '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME2);
+ printf(" couldn't determine if external link copy '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_SAME_LOC_NAME2);
PART_ERROR(H5Lcopy_external_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link copy did not exist\n");
+ printf(" external link copy did not exist\n");
PART_ERROR(H5Lcopy_external_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original external link '%s' exists\n",
- COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if original external link '%s' exists\n",
+ COPY_LINK_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lcopy_external_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original external link did not exist\n");
+ printf(" original external link did not exist\n");
PART_ERROR(H5Lcopy_external_same_loc);
}
@@ -8958,8 +8841,8 @@ test_copy_link_invalid_params(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or hard links aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or hard links aren't supported with this "
+ "connector\n");
return 0;
}
@@ -8967,41 +8850,41 @@ test_copy_link_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s\n", H5_api_test_filename);
+ printf(" couldn't open file '%s\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, COPY_LINK_INVALID_PARAMS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", COPY_LINK_INVALID_PARAMS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create group '%s'\n", COPY_LINK_INVALID_PARAMS_TEST_SUBGROUP_NAME);
goto error;
}
if ((src_grp_id = H5Gcreate2(group_id, COPY_LINK_INVALID_PARAMS_TEST_SRC_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", COPY_LINK_INVALID_PARAMS_TEST_SRC_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", COPY_LINK_INVALID_PARAMS_TEST_SRC_GROUP_NAME);
goto error;
}
if ((dst_grp_id = H5Gcreate2(group_id, COPY_LINK_INVALID_PARAMS_TEST_DST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", COPY_LINK_INVALID_PARAMS_TEST_DST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", COPY_LINK_INVALID_PARAMS_TEST_DST_GROUP_NAME);
goto error;
}
if (H5Lcreate_hard(group_id, ".", src_grp_id, COPY_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", COPY_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", COPY_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
@@ -9009,14 +8892,14 @@ test_copy_link_invalid_params(void)
if ((link_exists = H5Lexists(src_grp_id, COPY_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- COPY_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ COPY_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
goto error;
}
@@ -9038,7 +8921,7 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded with an invalid source location ID\n");
+ printf(" H5Lcopy succeeded with an invalid source location ID\n");
PART_ERROR(H5Lcopy_invalid_src_loc_id);
}
@@ -9060,7 +8943,7 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded with a NULL source name\n");
+ printf(" H5Lcopy succeeded with a NULL source name\n");
PART_ERROR(H5Lcopy_invalid_src_name);
}
@@ -9074,7 +8957,7 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded with an invalid source name of ''\n");
+ printf(" H5Lcopy succeeded with an invalid source name of ''\n");
PART_ERROR(H5Lcopy_invalid_src_name);
}
@@ -9096,7 +8979,7 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded with an invalid destination location ID\n");
+ printf(" H5Lcopy succeeded with an invalid destination location ID\n");
PART_ERROR(H5Lcopy_invalid_dst_loc_id);
}
@@ -9117,7 +9000,7 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded with a NULL destination name\n");
+ printf(" H5Lcopy succeeded with a NULL destination name\n");
PART_ERROR(H5Lcopy_invalid_dst_name);
}
@@ -9130,7 +9013,7 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded with an invalid destination name of ''\n");
+ printf(" H5Lcopy succeeded with an invalid destination name of ''\n");
PART_ERROR(H5Lcopy_invalid_dst_name);
}
@@ -9152,7 +9035,7 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded with an invalid LCPL\n");
+ printf(" H5Lcopy succeeded with an invalid LCPL\n");
PART_ERROR(H5Lcopy_invalid_lcpl);
}
@@ -9174,7 +9057,7 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded with an invalid LAPL\n");
+ printf(" H5Lcopy succeeded with an invalid LAPL\n");
PART_ERROR(H5Lcopy_invalid_lapl);
}
@@ -9196,7 +9079,7 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded with an invalid same location\n");
+ printf(" H5Lcopy succeeded with an invalid same location\n");
PART_ERROR(H5Lcopy_invalid_same_location);
}
@@ -9213,7 +9096,7 @@ test_copy_link_invalid_params(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lcopy_invalid_across_files);
}
@@ -9227,13 +9110,13 @@ test_copy_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lcopy succeeded in copying a hard link across files!\n");
+ printf(" H5Lcopy succeeded in copying a hard link across files!\n");
PART_ERROR(H5Lcopy_invalid_across_files);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lcopy_invalid_across_files);
}
@@ -9296,9 +9179,8 @@ test_move_link(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, link, hard link, soft link, or external link aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, link, hard link, soft link, or external link aren't "
+ "supported with this connector\n");
return 0;
}
@@ -9308,34 +9190,34 @@ test_move_link(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, MOVE_LINK_TEST_SUBGROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_TEST_SUBGROUP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_TEST_SUBGROUP_NAME);
goto error;
}
if ((src_grp_id = H5Gcreate2(group_id, MOVE_LINK_TEST_SRC_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_TEST_SRC_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_TEST_SRC_GROUP_NAME);
goto error;
}
if ((dst_grp_id = H5Gcreate2(group_id, MOVE_LINK_TEST_DST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_TEST_DST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_TEST_DST_GROUP_NAME);
goto error;
}
@@ -9351,33 +9233,33 @@ test_move_link(void)
if (H5Lcreate_hard(group_id, ".", src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_hard_no_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_hard_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lmove_hard_no_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_hard_no_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link existed in target group before move!\n");
+ printf(" hard link existed in target group before move!\n");
PART_ERROR(H5Lmove_hard_no_check);
}
@@ -9385,34 +9267,34 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME, dst_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME);
+ printf(" failed to move link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_hard_no_check);
}
/* Verify the link has been moved */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_hard_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lmove_hard_no_check);
}
/* Verify the old link is gone */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if old hard link '%s' exists\n",
- MOVE_LINK_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if old hard link '%s' exists\n",
+ MOVE_LINK_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_hard_no_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" old hard link exists\n");
+ printf(" old hard link exists\n");
PART_ERROR(H5Lmove_hard_no_check);
}
@@ -9431,40 +9313,40 @@ test_move_link(void)
if (H5Lcreate_hard(group_id, ".", src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lmove_hard_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lmove_hard_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lmove_hard_check);
}
/* Retrieve the link's info */
if (H5Lget_info2(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME2, &orig_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lmove_hard_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lmove_hard_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link existed in target group before move!\n");
+ printf(" hard link existed in target group before move!\n");
PART_ERROR(H5Lmove_hard_check);
}
@@ -9472,66 +9354,66 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME2, dst_grp_id,
MOVE_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
+ printf(" failed to move link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lmove_hard_check);
}
/* Verify the link has been moved */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lmove_hard_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lmove_hard_check);
}
/* Verify the old link is gone */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if old hard link '%s' exists\n",
- MOVE_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if old hard link '%s' exists\n",
+ MOVE_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lmove_hard_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" old hard link exists\n");
+ printf(" old hard link exists\n");
PART_ERROR(H5Lmove_hard_check);
}
/* Retrieve the moved link's info */
if (H5Lget_info2(dst_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME2, &new_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lmove_hard_check);
}
if (new_info.type != orig_info.type) {
H5_FAILED();
- HDprintf(" moved link's link type doesn't match original link's type\n");
+ printf(" moved link's link type doesn't match original link's type\n");
PART_ERROR(H5Lmove_hard_check);
}
if (H5Otoken_cmp(dst_grp_id, &new_info.u.token, &orig_info.u.token, &cmp_value) < 0) {
H5_FAILED();
- HDprintf(" failed to compare link target tokens\n");
+ printf(" failed to compare link target tokens\n");
PART_ERROR(H5Lmove_hard_check);
}
if (cmp_value != 0) {
H5_FAILED();
- HDprintf(" moved hard link's object token doesn't match original link's object token\n");
+ printf(" moved hard link's object token doesn't match original link's object token\n");
PART_ERROR(H5Lmove_hard_check);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (new_info.corder_valid != orig_info.corder_valid) {
H5_FAILED();
- HDprintf(
+ printf(
" moved link's 'corder_valid' field doesn't match original link's 'corder_valid' "
"field\n");
PART_ERROR(H5Lmove_hard_check);
@@ -9540,16 +9422,16 @@ test_move_link(void)
if (new_info.corder_valid && orig_info.corder_valid &&
(new_info.corder != orig_info.corder)) {
H5_FAILED();
- HDprintf(" moved link's creation order value %" PRId64
- " doesn't match original link's creation order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
+ printf(" moved link's creation order value %" PRId64
+ " doesn't match original link's creation order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
PART_ERROR(H5Lmove_hard_check);
}
}
if (new_info.cset != orig_info.cset) {
H5_FAILED();
- HDprintf(" moved link's character set doesn't match original link's character set\n");
+ printf(" moved link's character set doesn't match original link's character set\n");
PART_ERROR(H5Lmove_hard_check);
}
@@ -9565,20 +9447,20 @@ test_move_link(void)
if (H5Lcreate_hard(group_id, ".", src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lmove_hard_same_loc);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lmove_hard_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lmove_hard_same_loc);
}
@@ -9586,14 +9468,14 @@ test_move_link(void)
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_hard_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link existed in target group before move!\n");
+ printf(" hard link existed in target group before move!\n");
PART_ERROR(H5Lmove_hard_same_loc);
}
@@ -9601,35 +9483,35 @@ test_move_link(void)
if (H5Lmove(H5L_SAME_LOC, MOVE_LINK_TEST_HARD_LINK_NAME3, src_grp_id,
MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s' using H5L_SAME_LOC as first parameter to H5Lmove\n",
- MOVE_LINK_TEST_HARD_LINK_NAME3);
+ printf(" failed to move link '%s' using H5L_SAME_LOC as first parameter to H5Lmove\n",
+ MOVE_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lmove_hard_same_loc);
}
/* Ensure the link has been renamed */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lmove_hard_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" original hard link existed in target group after move!\n");
+ printf(" original hard link existed in target group after move!\n");
PART_ERROR(H5Lmove_hard_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_hard_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist after move!\n");
+ printf(" hard link did not exist after move!\n");
PART_ERROR(H5Lmove_hard_same_loc);
}
@@ -9637,35 +9519,35 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME, H5L_SAME_LOC,
MOVE_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s' using H5L_SAME_LOC as third parameter to H5Lmove\n",
- MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
+ printf(" failed to move link '%s' using H5L_SAME_LOC as third parameter to H5Lmove\n",
+ MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_hard_same_loc);
}
/* Verify the link has been renamed back */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lmove_hard_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original hard link did not exist after moving the link back!\n");
+ printf(" original hard link did not exist after moving the link back!\n");
PART_ERROR(H5Lmove_hard_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if old hard link '%s' exists\n",
- MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if old hard link '%s' exists\n",
+ MOVE_LINK_TEST_HARD_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_hard_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" renamed hard link exists after moving the link back!\n");
+ printf(" renamed hard link exists after moving the link back!\n");
PART_ERROR(H5Lmove_hard_same_loc);
}
@@ -9681,34 +9563,34 @@ test_move_link(void)
if (H5Lcreate_hard(group_id, ".", src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME4, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME4);
+ printf(" couldn't create hard link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME4);
PART_ERROR(H5Lmove_hard_rename);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME4, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME4);
+ printf(" couldn't determine if hard link '%s' exists\n", MOVE_LINK_TEST_HARD_LINK_NAME4);
PART_ERROR(H5Lmove_hard_rename);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lmove_hard_rename);
}
/* Verify the renamed link doesn't currently exist in the source group */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NEW_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if renamed hard link '%s' exists\n",
- MOVE_LINK_TEST_HARD_LINK_NEW_NAME);
+ printf(" couldn't determine if renamed hard link '%s' exists\n",
+ MOVE_LINK_TEST_HARD_LINK_NEW_NAME);
PART_ERROR(H5Lmove_hard_rename);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" renamed hard link existed in source group before move!\n");
+ printf(" renamed hard link existed in source group before move!\n");
PART_ERROR(H5Lmove_hard_rename);
}
@@ -9716,35 +9598,35 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME4, src_grp_id,
MOVE_LINK_TEST_HARD_LINK_NEW_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to rename link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME4);
+ printf(" failed to rename link '%s'\n", MOVE_LINK_TEST_HARD_LINK_NAME4);
PART_ERROR(H5Lmove_hard_rename);
}
/* Verify the link has been renamed */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NEW_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if renamed hard link '%s' exists\n",
- MOVE_LINK_TEST_HARD_LINK_NEW_NAME);
+ printf(" couldn't determine if renamed hard link '%s' exists\n",
+ MOVE_LINK_TEST_HARD_LINK_NEW_NAME);
PART_ERROR(H5Lmove_hard_rename);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" renamed hard link did not exist\n");
+ printf(" renamed hard link did not exist\n");
PART_ERROR(H5Lmove_hard_rename);
}
/* Verify the old link is gone */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME4, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if old hard link '%s' exists\n",
- MOVE_LINK_TEST_HARD_LINK_NAME4);
+ printf(" couldn't determine if old hard link '%s' exists\n",
+ MOVE_LINK_TEST_HARD_LINK_NAME4);
PART_ERROR(H5Lmove_hard_rename);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" old hard link exists\n");
+ printf(" old hard link exists\n");
PART_ERROR(H5Lmove_hard_rename);
}
@@ -9760,33 +9642,33 @@ test_move_link(void)
if (H5Lcreate_soft(MOVE_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id,
MOVE_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lmove_soft_no_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lmove_soft_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lmove_soft_no_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lmove_soft_no_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link existed in target group before move!\n");
+ printf(" soft link existed in target group before move!\n");
PART_ERROR(H5Lmove_soft_no_check);
}
@@ -9794,34 +9676,34 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME, dst_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
+ printf(" failed to move link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lmove_soft_no_check);
}
/* Verify the link has been moved */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lmove_soft_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lmove_soft_no_check);
}
/* Verify the old link is gone */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if old soft link '%s' exists\n",
- MOVE_LINK_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if old soft link '%s' exists\n",
+ MOVE_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lmove_soft_no_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" old soft link exists\n");
+ printf(" old soft link exists\n");
PART_ERROR(H5Lmove_soft_no_check);
}
@@ -9841,27 +9723,27 @@ test_move_link(void)
if (H5Lcreate_soft(MOVE_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id,
MOVE_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lmove_soft_check);
}
/* Retrieve the link's info */
if (H5Lget_info2(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME2, &orig_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
@@ -9869,20 +9751,20 @@ test_move_link(void)
if (H5Lget_val(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME2, orig_link_val,
MOVE_LINK_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve value for soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't retrieve value for soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link existed in target group before move!\n");
+ printf(" soft link existed in target group before move!\n");
PART_ERROR(H5Lmove_soft_check);
}
@@ -9890,62 +9772,62 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME2, dst_grp_id,
MOVE_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" failed to move link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
/* Verify the link has been moved */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lmove_soft_check);
}
/* Verify the old link is gone */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if old soft link '%s' exists\n",
- MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if old soft link '%s' exists\n",
+ MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" old soft link exists\n");
+ printf(" old soft link exists\n");
PART_ERROR(H5Lmove_soft_check);
}
/* Retrieve the moved link's info */
if (H5Lget_info2(dst_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME2, &new_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
if (new_info.type != orig_info.type) {
H5_FAILED();
- HDprintf(" moved link's link type doesn't match original link's type\n");
+ printf(" moved link's link type doesn't match original link's type\n");
PART_ERROR(H5Lmove_soft_check);
}
if (new_info.u.val_size != orig_info.u.val_size) {
H5_FAILED();
- HDprintf(" moved soft link's value size of %llu doesn't match original link's value size "
- "of %llu\n",
- (unsigned long long)new_info.u.val_size, (unsigned long long)orig_info.u.val_size);
+ printf(" moved soft link's value size of %llu doesn't match original link's value size "
+ "of %llu\n",
+ (unsigned long long)new_info.u.val_size, (unsigned long long)orig_info.u.val_size);
PART_ERROR(H5Lmove_soft_check);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (new_info.corder_valid != orig_info.corder_valid) {
H5_FAILED();
- HDprintf(
+ printf(
" moved link's 'corder_valid' field doesn't match original link's 'corder_valid' "
"field\n");
PART_ERROR(H5Lmove_soft_check);
@@ -9954,16 +9836,16 @@ test_move_link(void)
if (new_info.corder_valid && orig_info.corder_valid &&
(new_info.corder != orig_info.corder)) {
H5_FAILED();
- HDprintf(" moved link's creation order value %" PRId64
- " doesn't match original link's creation order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
+ printf(" moved link's creation order value %" PRId64
+ " doesn't match original link's creation order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
PART_ERROR(H5Lmove_soft_check);
}
}
if (new_info.cset != orig_info.cset) {
H5_FAILED();
- HDprintf(" moved link's character set doesn't match original link's character set\n");
+ printf(" moved link's character set doesn't match original link's character set\n");
PART_ERROR(H5Lmove_soft_check);
}
@@ -9971,14 +9853,14 @@ test_move_link(void)
if (H5Lget_val(dst_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME2, new_link_val,
MOVE_LINK_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve value for soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't retrieve value for soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lmove_soft_check);
}
if (HDstrncmp(orig_link_val, new_link_val, MOVE_LINK_TEST_LINK_VAL_BUF_SIZE)) {
H5_FAILED();
- HDprintf(" moved soft link's value '%s' doesn't match original link's value '%s'\n",
- new_link_val, orig_link_val);
+ printf(" moved soft link's value '%s' doesn't match original link's value '%s'\n",
+ new_link_val, orig_link_val);
PART_ERROR(H5Lmove_soft_check);
}
@@ -9994,20 +9876,20 @@ test_move_link(void)
if (H5Lcreate_soft(MOVE_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id,
MOVE_LINK_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lmove_soft_same_loc);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lmove_soft_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lmove_soft_same_loc);
}
@@ -10015,14 +9897,14 @@ test_move_link(void)
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_soft_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" soft link existed in target group before move!\n");
+ printf(" soft link existed in target group before move!\n");
PART_ERROR(H5Lmove_soft_same_loc);
}
@@ -10030,35 +9912,35 @@ test_move_link(void)
if (H5Lmove(H5L_SAME_LOC, MOVE_LINK_TEST_SOFT_LINK_NAME3, src_grp_id,
MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s' using H5L_SAME_LOC as first parameter to H5Lmove\n",
- MOVE_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" failed to move link '%s' using H5L_SAME_LOC as first parameter to H5Lmove\n",
+ MOVE_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lmove_soft_same_loc);
}
/* Ensure the link has been renamed */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lmove_soft_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" original soft link existed in target group after move!\n");
+ printf(" original soft link existed in target group after move!\n");
PART_ERROR(H5Lmove_soft_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_soft_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist after move!\n");
+ printf(" soft link did not exist after move!\n");
PART_ERROR(H5Lmove_soft_same_loc);
}
@@ -10066,35 +9948,35 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME, H5L_SAME_LOC,
MOVE_LINK_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s' using H5L_SAME_LOC as third parameter to H5Lmove\n",
- MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
+ printf(" failed to move link '%s' using H5L_SAME_LOC as third parameter to H5Lmove\n",
+ MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_soft_same_loc);
}
/* Verify the link has been renamed back */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lmove_soft_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original hard link did not exist after moving the link back!\n");
+ printf(" original hard link did not exist after moving the link back!\n");
PART_ERROR(H5Lmove_soft_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if old soft link '%s' exists\n",
- MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if old soft link '%s' exists\n",
+ MOVE_LINK_TEST_SOFT_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_soft_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" renamed soft link exists after moving the link back!\n");
+ printf(" renamed soft link exists after moving the link back!\n");
PART_ERROR(H5Lmove_soft_same_loc);
}
@@ -10110,34 +9992,34 @@ test_move_link(void)
if (H5Lcreate_soft(MOVE_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id,
MOVE_LINK_TEST_SOFT_LINK_NAME4, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME4);
+ printf(" couldn't create soft link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME4);
PART_ERROR(H5Lmove_soft_rename);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME4, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME4);
+ printf(" couldn't determine if soft link '%s' exists\n", MOVE_LINK_TEST_SOFT_LINK_NAME4);
PART_ERROR(H5Lmove_soft_rename);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lmove_soft_rename);
}
/* Verify the renamed link doesn't currently exist in the source group */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NEW_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if renamed soft link '%s' exists\n",
- MOVE_LINK_TEST_SOFT_LINK_NEW_NAME);
+ printf(" couldn't determine if renamed soft link '%s' exists\n",
+ MOVE_LINK_TEST_SOFT_LINK_NEW_NAME);
PART_ERROR(H5Lmove_soft_rename);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" renamed soft link existed in source group before move!\n");
+ printf(" renamed soft link existed in source group before move!\n");
PART_ERROR(H5Lmove_soft_rename);
}
@@ -10145,35 +10027,35 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME4, src_grp_id,
MOVE_LINK_TEST_SOFT_LINK_NEW_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to rename link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME4);
+ printf(" failed to rename link '%s'\n", MOVE_LINK_TEST_SOFT_LINK_NAME4);
PART_ERROR(H5Lmove_soft_rename);
}
/* Verify the link has been renamed */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NEW_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if renamed soft link '%s' exists\n",
- MOVE_LINK_TEST_SOFT_LINK_NEW_NAME);
+ printf(" couldn't determine if renamed soft link '%s' exists\n",
+ MOVE_LINK_TEST_SOFT_LINK_NEW_NAME);
PART_ERROR(H5Lmove_soft_rename);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" renamed soft link did not exist\n");
+ printf(" renamed soft link did not exist\n");
PART_ERROR(H5Lmove_soft_rename);
}
/* Verify the old link is gone */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_SOFT_LINK_NAME4, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if old soft link '%s' exists\n",
- MOVE_LINK_TEST_SOFT_LINK_NAME4);
+ printf(" couldn't determine if old soft link '%s' exists\n",
+ MOVE_LINK_TEST_SOFT_LINK_NAME4);
PART_ERROR(H5Lmove_soft_rename);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" old soft link exists\n");
+ printf(" old soft link exists\n");
PART_ERROR(H5Lmove_soft_rename);
}
@@ -10190,13 +10072,13 @@ test_move_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lmove_external_no_check);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lmove_external_no_check);
}
@@ -10204,35 +10086,35 @@ test_move_link(void)
if (H5Lcreate_external(ext_link_filename, "/", src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME);
PART_ERROR(H5Lmove_external_no_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME);
PART_ERROR(H5Lmove_external_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lmove_external_no_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME);
PART_ERROR(H5Lmove_external_no_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link existed in target group before move!\n");
+ printf(" external link existed in target group before move!\n");
PART_ERROR(H5Lmove_external_no_check);
}
@@ -10240,35 +10122,35 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME, dst_grp_id,
MOVE_LINK_TEST_EXTERN_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME);
+ printf(" failed to move link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME);
PART_ERROR(H5Lmove_external_no_check);
}
/* Verify the link has been moved */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME);
PART_ERROR(H5Lmove_external_no_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lmove_external_no_check);
}
/* Verify the old link is gone */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if old external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME);
+ printf(" couldn't determine if old external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME);
PART_ERROR(H5Lmove_external_no_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" old external link exists\n");
+ printf(" old external link exists\n");
PART_ERROR(H5Lmove_external_no_check);
}
@@ -10299,13 +10181,13 @@ test_move_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lmove_external_check);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lmove_external_check);
}
@@ -10313,28 +10195,28 @@ test_move_link(void)
if (H5Lcreate_external(ext_link_filename, "/", src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lmove_external_check);
}
/* Retrieve the link's info */
if (H5Lget_info2(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2, &orig_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
@@ -10342,29 +10224,29 @@ test_move_link(void)
if (H5Lget_val(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2, orig_link_val,
MOVE_LINK_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve value for external link '%s'\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" couldn't retrieve value for external link '%s'\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
if (H5Lunpack_elink_val(orig_link_val, orig_info.u.val_size, &unpack_flags, &orig_filename,
&orig_objname) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack original external link's value buffer\n");
+ printf(" couldn't unpack original external link's value buffer\n");
PART_ERROR(H5Lmove_external_check);
}
/* Verify the link doesn't currently exist in the target group */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link existed in target group before move!\n");
+ printf(" external link existed in target group before move!\n");
PART_ERROR(H5Lmove_external_check);
}
@@ -10372,63 +10254,63 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2, dst_grp_id,
MOVE_LINK_TEST_EXTERN_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" failed to move link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
/* Verify the link has been moved */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lmove_external_check);
}
/* Verify the old link is gone */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if old external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" couldn't determine if old external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" old external link exists\n");
+ printf(" old external link exists\n");
PART_ERROR(H5Lmove_external_check);
}
/* Retrieve the moved link's info */
if (H5Lget_info2(dst_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2, &new_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" couldn't retrieve info for link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
if (new_info.type != orig_info.type) {
H5_FAILED();
- HDprintf(" moved link's link type doesn't match original link's type\n");
+ printf(" moved link's link type doesn't match original link's type\n");
PART_ERROR(H5Lmove_external_check);
}
if (new_info.u.val_size != orig_info.u.val_size) {
H5_FAILED();
- HDprintf(" moved external link's value size of %llu doesn't match original link's value "
- "size of %llu\n",
- (unsigned long long)new_info.u.val_size, (unsigned long long)orig_info.u.val_size);
+ printf(" moved external link's value size of %llu doesn't match original link's value "
+ "size of %llu\n",
+ (unsigned long long)new_info.u.val_size, (unsigned long long)orig_info.u.val_size);
PART_ERROR(H5Lmove_external_check);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (new_info.corder_valid != orig_info.corder_valid) {
H5_FAILED();
- HDprintf(
+ printf(
" moved link's 'corder_valid' field doesn't match original link's 'corder_valid' "
"field\n");
PART_ERROR(H5Lmove_external_check);
@@ -10437,17 +10319,17 @@ test_move_link(void)
if (new_info.corder_valid && orig_info.corder_valid &&
(new_info.corder != orig_info.corder)) {
H5_FAILED();
- HDprintf(" moved link's creation order value %" PRId64
- " doesn't match original link's creation "
- "order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
+ printf(" moved link's creation order value %" PRId64
+ " doesn't match original link's creation "
+ "order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
PART_ERROR(H5Lmove_external_check);
}
}
if (new_info.cset != orig_info.cset) {
H5_FAILED();
- HDprintf(" moved link's character set doesn't match original link's character set\n");
+ printf(" moved link's character set doesn't match original link's character set\n");
PART_ERROR(H5Lmove_external_check);
}
@@ -10455,31 +10337,31 @@ test_move_link(void)
if (H5Lget_val(dst_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME2, new_link_val,
MOVE_LINK_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't retrieve value for external link '%s'\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME2);
+ printf(" couldn't retrieve value for external link '%s'\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME2);
PART_ERROR(H5Lmove_external_check);
}
if (H5Lunpack_elink_val(new_link_val, new_info.u.val_size, &unpack_flags, &new_filename,
&new_objname) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack moved external link's value buffer\n");
+ printf(" couldn't unpack moved external link's value buffer\n");
PART_ERROR(H5Lmove_external_check);
}
if (HDstrncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
H5_FAILED();
- HDprintf(" moved external link's filename '%s' doesn't match original external link's "
- "filename '%s'\n",
- new_filename, orig_filename);
+ printf(" moved external link's filename '%s' doesn't match original external link's "
+ "filename '%s'\n",
+ new_filename, orig_filename);
PART_ERROR(H5Lmove_external_check);
}
if (HDstrncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
H5_FAILED();
- HDprintf(" moved external link's object name '%s' doesn't match original external link's "
- "object name '%s'\n",
- new_objname, orig_objname);
+ printf(" moved external link's object name '%s' doesn't match original external link's "
+ "object name '%s'\n",
+ new_objname, orig_objname);
PART_ERROR(H5Lmove_external_check);
}
@@ -10503,13 +10385,13 @@ test_move_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lmove_external_same_loc);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lmove_external_same_loc);
}
@@ -10517,21 +10399,21 @@ test_move_link(void)
if (H5Lcreate_external(ext_link_filename, "/", src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME3);
PART_ERROR(H5Lmove_external_same_loc);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME3);
PART_ERROR(H5Lmove_external_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lmove_external_same_loc);
}
@@ -10539,14 +10421,14 @@ test_move_link(void)
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_external_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" external link existed in target group before move!\n");
+ printf(" external link existed in target group before move!\n");
PART_ERROR(H5Lmove_external_same_loc);
}
@@ -10554,35 +10436,35 @@ test_move_link(void)
if (H5Lmove(H5L_SAME_LOC, MOVE_LINK_TEST_EXTERN_LINK_NAME3, src_grp_id,
MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME3);
+ printf(" failed to move link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME3);
PART_ERROR(H5Lmove_external_same_loc);
}
/* Ensure the link has been renamed */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME3);
PART_ERROR(H5Lmove_external_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" original external link existed in target group after move!\n");
+ printf(" original external link existed in target group after move!\n");
PART_ERROR(H5Lmove_external_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_external_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist after move!\n");
+ printf(" external link did not exist after move!\n");
PART_ERROR(H5Lmove_external_same_loc);
}
@@ -10590,35 +10472,35 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME, H5L_SAME_LOC,
MOVE_LINK_TEST_EXTERN_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME);
+ printf(" failed to move link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_external_same_loc);
}
/* Verify the link has been renamed back */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME3);
PART_ERROR(H5Lmove_external_same_loc);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original external link did not exist after moving the link back!\n");
+ printf(" original external link did not exist after moving the link back!\n");
PART_ERROR(H5Lmove_external_same_loc);
}
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if old external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME);
+ printf(" couldn't determine if old external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_SAME_LOC_NAME);
PART_ERROR(H5Lmove_external_same_loc);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" renamed external link exists after moving the link back!\n");
+ printf(" renamed external link exists after moving the link back!\n");
PART_ERROR(H5Lmove_external_same_loc);
}
@@ -10642,13 +10524,13 @@ test_move_link(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lmove_external_rename);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lmove_external_rename);
}
@@ -10656,35 +10538,35 @@ test_move_link(void)
if (H5Lcreate_external(ext_link_filename, "/", src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME4,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME4);
+ printf(" couldn't create external link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME4);
PART_ERROR(H5Lmove_external_rename);
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME4, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME4);
+ printf(" couldn't determine if external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME4);
PART_ERROR(H5Lmove_external_rename);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lmove_external_rename);
}
/* Verify the renamed link doesn't currently exist in the source group */
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NEW_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if renamed external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NEW_NAME);
+ printf(" couldn't determine if renamed external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NEW_NAME);
PART_ERROR(H5Lmove_external_rename);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" renamed external link existed in source group before move!\n");
+ printf(" renamed external link existed in source group before move!\n");
PART_ERROR(H5Lmove_external_rename);
}
@@ -10692,35 +10574,35 @@ test_move_link(void)
if (H5Lmove(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME4, src_grp_id,
MOVE_LINK_TEST_EXTERN_LINK_NEW_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to rename link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME4);
+ printf(" failed to rename link '%s'\n", MOVE_LINK_TEST_EXTERN_LINK_NAME4);
PART_ERROR(H5Lmove_external_rename);
}
/* Verify the link has been renamed */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NEW_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if renamed external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NEW_NAME);
+ printf(" couldn't determine if renamed external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NEW_NAME);
PART_ERROR(H5Lmove_external_rename);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" renamed external link did not exist\n");
+ printf(" renamed external link did not exist\n");
PART_ERROR(H5Lmove_external_rename);
}
/* Verify the old link is gone */
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_TEST_EXTERN_LINK_NAME4, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if old external link '%s' exists\n",
- MOVE_LINK_TEST_EXTERN_LINK_NAME4);
+ printf(" couldn't determine if old external link '%s' exists\n",
+ MOVE_LINK_TEST_EXTERN_LINK_NAME4);
PART_ERROR(H5Lmove_external_rename);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" old external link exists\n");
+ printf(" old external link exists\n");
PART_ERROR(H5Lmove_external_rename);
}
@@ -10840,53 +10722,53 @@ test_move_links_into_group_with_links(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, hard link, or creation order aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, link, hard link, or creation order aren't "
+ "supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_SUBGROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
if ((src_grp_id = H5Gcreate2(group_id, MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_SRC_GRP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_SRC_GRP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_SRC_GRP_NAME);
goto error;
}
if ((dst_grp_id = H5Gcreate2(group_id, MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_DST_GRP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_DST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_DST_GRP_NAME);
goto error;
}
@@ -10896,7 +10778,7 @@ test_move_links_into_group_with_links(void)
if (H5Lcreate_hard(src_grp_id, ".", src_grp_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create link '%s' in source group\n", link_name);
+ printf(" couldn't create link '%s' in source group\n", link_name);
goto error;
}
@@ -10904,21 +10786,21 @@ test_move_links_into_group_with_links(void)
memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info2(src_grp_id, link_name, &link_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve info for link '%s'\n", link_name);
+ printf(" failed to retrieve info for link '%s'\n", link_name);
goto error;
}
if (!link_info.corder_valid) {
H5_FAILED();
- HDprintf(" creation order value for newly-created link '%s' was marked as not valid!\n",
- link_name);
+ printf(" creation order value for newly-created link '%s' was marked as not valid!\n",
+ link_name);
goto error;
}
if (link_info.corder != (int64_t)i) {
H5_FAILED();
- HDprintf(" creation order value %lld for link '%s' did not match expected value %lld\n",
- (long long)link_info.corder, link_name, (long long)i);
+ printf(" creation order value %lld for link '%s' did not match expected value %lld\n",
+ (long long)link_info.corder, link_name, (long long)i);
goto error;
}
}
@@ -10929,7 +10811,7 @@ test_move_links_into_group_with_links(void)
if (H5Lcreate_hard(dst_grp_id, ".", dst_grp_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create link '%s' in destination group\n", link_name);
+ printf(" couldn't create link '%s' in destination group\n", link_name);
goto error;
}
}
@@ -10940,7 +10822,7 @@ test_move_links_into_group_with_links(void)
if (H5Lmove(src_grp_id, link_name, dst_grp_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s' from source group to destination group\n", link_name);
+ printf(" failed to move link '%s' from source group to destination group\n", link_name);
goto error;
}
@@ -10948,22 +10830,22 @@ test_move_links_into_group_with_links(void)
memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info2(dst_grp_id, link_name, &link_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve info for link '%s'\n", link_name);
+ printf(" failed to retrieve info for link '%s'\n", link_name);
goto error;
}
if (!link_info.corder_valid) {
H5_FAILED();
- HDprintf(" creation order value for moved link '%s' was marked as not valid!\n", link_name);
+ printf(" creation order value for moved link '%s' was marked as not valid!\n", link_name);
goto error;
}
if (link_info.corder != (int64_t)(i + MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_NUM_LINKS)) {
H5_FAILED();
- HDprintf(" creation order value for moved link '%s' was not adjusted after move! It should "
- "have been %lld but was %lld\n",
- link_name, (long long)(i + MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_NUM_LINKS),
- (long long)link_info.corder);
+ printf(" creation order value for moved link '%s' was not adjusted after move! It should "
+ "have been %lld but was %lld\n",
+ link_name, (long long)(i + MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_NUM_LINKS),
+ (long long)link_info.corder);
goto error;
}
}
@@ -11043,54 +10925,54 @@ test_move_link_reset_grp_max_crt_order(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, hard link, or creation order aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, link, hard link, or creation order aren't "
+ "supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_SUBGROUP_NAME);
goto error;
}
if ((src_grp_id = H5Gcreate2(group_id, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_SRC_GRP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_SRC_GRP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_SRC_GRP_NAME);
goto error;
}
if ((dst_grp_id = H5Gcreate2(group_id, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_DST_GRP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_DST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_DST_GRP_NAME);
goto error;
}
@@ -11100,7 +10982,7 @@ test_move_link_reset_grp_max_crt_order(void)
if (H5Lcreate_hard(src_grp_id, ".", src_grp_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s' in source group\n", link_name);
+ printf(" couldn't create hard link '%s' in source group\n", link_name);
goto error;
}
}
@@ -11114,15 +10996,15 @@ test_move_link_reset_grp_max_crt_order(void)
if (H5Gget_info(src_grp_id, &grp_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve source group's info\n");
+ printf(" failed to retrieve source group's info\n");
goto error;
}
if (grp_info.max_corder != MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" source group's maximum creation order value got adjusted to %lld during link "
- "moving; value should have remained at %d\n",
- (long long)grp_info.max_corder, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
+ printf(" source group's maximum creation order value got adjusted to %lld during link "
+ "moving; value should have remained at %d\n",
+ (long long)grp_info.max_corder, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
goto error;
}
@@ -11130,7 +11012,7 @@ test_move_link_reset_grp_max_crt_order(void)
if (H5Lmove(src_grp_id, link_name, dst_grp_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to move link '%s' to destination group\n", link_name);
+ printf(" failed to move link '%s' to destination group\n", link_name);
goto error;
}
}
@@ -11143,15 +11025,15 @@ test_move_link_reset_grp_max_crt_order(void)
if (H5Gget_info(src_grp_id, &grp_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve source group's info\n");
+ printf(" failed to retrieve source group's info\n");
goto error;
}
if (grp_info.max_corder != 0) {
H5_FAILED();
- HDprintf(" source group's maximum creation order value didn't reset to 0 after moving all links "
- "out of it; value is still %lld\n",
- (long long)grp_info.max_corder);
+ printf(" source group's maximum creation order value didn't reset to 0 after moving all links "
+ "out of it; value is still %lld\n",
+ (long long)grp_info.max_corder);
goto error;
}
@@ -11160,15 +11042,15 @@ test_move_link_reset_grp_max_crt_order(void)
if (H5Gget_info(dst_grp_id, &grp_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve destination group's info\n");
+ printf(" failed to retrieve destination group's info\n");
goto error;
}
if (grp_info.max_corder != MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" destination group's maximum creation order value of %lld didn't match expected value "
- "of %d after moving all links into it\n",
- (long long)grp_info.max_corder, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
+ printf(" destination group's maximum creation order value of %lld didn't match expected value "
+ "of %d after moving all links into it\n",
+ (long long)grp_info.max_corder, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
goto error;
}
@@ -11225,8 +11107,8 @@ test_move_link_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, link, or hard link aren't supported with this "
+ "connector\n");
return 0;
}
@@ -11234,41 +11116,41 @@ test_move_link_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, MOVE_LINK_INVALID_PARAMS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_INVALID_PARAMS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_INVALID_PARAMS_TEST_SUBGROUP_NAME);
goto error;
}
if ((src_grp_id = H5Gcreate2(group_id, MOVE_LINK_INVALID_PARAMS_TEST_SRC_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_INVALID_PARAMS_TEST_SRC_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_INVALID_PARAMS_TEST_SRC_GROUP_NAME);
goto error;
}
if ((dst_grp_id = H5Gcreate2(group_id, MOVE_LINK_INVALID_PARAMS_TEST_DST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", MOVE_LINK_INVALID_PARAMS_TEST_DST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", MOVE_LINK_INVALID_PARAMS_TEST_DST_GROUP_NAME);
goto error;
}
if (H5Lcreate_hard(group_id, ".", src_grp_id, MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
@@ -11276,14 +11158,14 @@ test_move_link_invalid_params(void)
if ((link_exists = H5Lexists(src_grp_id, MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
goto error;
}
@@ -11291,14 +11173,14 @@ test_move_link_invalid_params(void)
if ((link_exists = H5Lexists(dst_grp_id, MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link existed in target group before move!\n");
+ printf(" hard link existed in target group before move!\n");
goto error;
}
@@ -11319,7 +11201,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded with an invalid source location ID!\n");
+ printf(" H5Lmove succeeded with an invalid source location ID!\n");
PART_ERROR(H5Lmove_invalid_src_loc_id);
}
@@ -11340,7 +11222,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded with a NULL source name!\n");
+ printf(" H5Lmove succeeded with a NULL source name!\n");
PART_ERROR(H5Lmove_invalid_src_name);
}
@@ -11353,7 +11235,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded with an invalid source name of ''!\n");
+ printf(" H5Lmove succeeded with an invalid source name of ''!\n");
PART_ERROR(H5Lmove_invalid_src_name);
}
@@ -11374,7 +11256,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded with an invalid destination location ID!\n");
+ printf(" H5Lmove succeeded with an invalid destination location ID!\n");
PART_ERROR(H5Lmove_invalid_dst_loc_id);
}
@@ -11395,7 +11277,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded with a NULL destination name!\n");
+ printf(" H5Lmove succeeded with a NULL destination name!\n");
PART_ERROR(H5Lmove_invalid_dst_name);
}
@@ -11408,7 +11290,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded with an invalid destination name of ''!\n");
+ printf(" H5Lmove succeeded with an invalid destination name of ''!\n");
PART_ERROR(H5Lmove_invalid_dst_name);
}
@@ -11429,7 +11311,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded with an invalid LCPL!\n");
+ printf(" H5Lmove succeeded with an invalid LCPL!\n");
PART_ERROR(H5Lmove_invalid_lcpl);
}
@@ -11450,7 +11332,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded with an invalid LAPL!\n");
+ printf(" H5Lmove succeeded with an invalid LAPL!\n");
PART_ERROR(H5Lmove_invalid_lapl);
}
@@ -11466,28 +11348,28 @@ test_move_link_invalid_params(void)
if ((link_exists =
H5Lexists(src_grp_id, MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_existence);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link didn't exist in source group after invalid move!\n");
+ printf(" hard link didn't exist in source group after invalid move!\n");
PART_ERROR(H5Lmove_existence);
}
if ((link_exists =
H5Lexists(dst_grp_id, MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_existence);
}
if (link_exists) {
H5_FAILED();
- HDprintf(" hard link existed in target group after invalid move!\n");
+ printf(" hard link existed in target group after invalid move!\n");
PART_ERROR(H5Lmove_existence);
}
@@ -11510,7 +11392,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded with an invalid same location!\n");
+ printf(" H5Lmove succeeded with an invalid same location!\n");
PART_ERROR(H5Lmove_same_location);
}
@@ -11527,7 +11409,7 @@ test_move_link_invalid_params(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lmove_across_files);
}
@@ -11541,7 +11423,7 @@ test_move_link_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lmove succeeded in moving a hard link across files!\n");
+ printf(" H5Lmove succeeded in moving a hard link across files!\n");
PART_ERROR(H5Lmove_across_files);
}
@@ -11549,21 +11431,21 @@ test_move_link_invalid_params(void)
if ((link_exists =
H5Lexists(src_grp_id, MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if original link '%s' exists after invalid link move\n",
- MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if original link '%s' exists after invalid link move\n",
+ MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_across_files);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" original link '%s' didn't exist after failed move!\n",
- MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" original link '%s' didn't exist after failed move!\n",
+ MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lmove_across_files);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close a file!\n");
+ printf(" failed to close a file!\n");
PART_ERROR(H5Lmove_across_files);
}
@@ -11632,8 +11514,8 @@ test_get_link_val(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, external link, or creation "
- "order aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, soft link, external link, or creation "
+ "order aren't supported with this connector\n");
return 0;
}
@@ -11641,26 +11523,26 @@ test_get_link_val(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
}
@@ -11668,7 +11550,7 @@ test_get_link_val(void)
if ((group_id = H5Gcreate2(container_group, GET_LINK_VAL_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP_NAME);
goto error;
}
@@ -11682,64 +11564,64 @@ test_get_link_val(void)
TESTING_2("H5Lget_val on soft link");
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP1_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP1_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP1_NAME);
PART_ERROR(H5Lget_val_soft);
}
if (H5Lcreate_soft(link_target, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_soft);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_soft);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_soft);
}
if (H5Lget_info2(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, &link_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info\n");
+ printf(" failed to retrieve soft link's info\n");
PART_ERROR(H5Lget_val_soft);
}
link_val_size = strlen(link_target) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu did not match expected size of %zu\n", link_info.u.val_size,
- link_val_size);
+ printf(" link value size %zu did not match expected size of %zu\n", link_info.u.val_size,
+ link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (H5Lget_val(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value\n");
+ printf(" couldn't get soft link value\n");
PART_ERROR(H5Lget_val_soft);
}
if (HDstrncmp(link_val_buf, link_target, link_val_size)) {
H5_FAILED();
- HDprintf(" soft link value did not match\n");
+ printf(" soft link value did not match\n");
PART_ERROR(H5Lget_val_soft);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP1_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP1_NAME);
PART_ERROR(H5Lget_val_soft);
}
@@ -11760,95 +11642,95 @@ test_get_link_val(void)
TESTING_2("H5Lget_val on external link");
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_val_external);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_val_external);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP2_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP2_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP2_NAME);
PART_ERROR(H5Lget_val_external);
}
if (H5Lcreate_external(ext_link_filename, ext_obj_name, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_external);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_external);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" external link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_external);
}
if (H5Lget_info2(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME, &link_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info\n");
+ printf(" failed to retrieve external link's info\n");
PART_ERROR(H5Lget_val_external);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu did not match expected size of %zu\n", link_info.u.val_size,
- link_val_size);
+ printf(" link value size %zu did not match expected size of %zu\n", link_info.u.val_size,
+ link_val_size);
PART_ERROR(H5Lget_val_external);
}
if (H5Lget_val(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value\n");
+ printf(" couldn't get external link value\n");
PART_ERROR(H5Lget_val_external);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_external);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_external);
}
if (HDstrncmp(ext_link_val, ext_obj_name, strlen(ext_obj_name) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name);
PART_ERROR(H5Lget_val_external);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP2_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP2_NAME);
PART_ERROR(H5Lget_val_external);
}
@@ -11896,14 +11778,14 @@ test_get_link_val(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP4_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP4_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP4_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
@@ -11911,158 +11793,158 @@ test_get_link_val(void)
if (H5Lcreate_soft(link_target_a, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (H5Lcreate_soft(link_target_b, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (H5Lcreate_soft(link_target_c, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
/* Verify the links exist */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
/* Retrieve the info and value of each link in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 0);
+ printf(" failed to retrieve soft link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
link_val_size = strlen(link_target_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 0, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 0);
+ printf(" couldn't get soft link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 0, link_target_a);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 0, link_target_a);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 1);
+ printf(" failed to retrieve soft link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
link_val_size = strlen(link_target_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 1, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 1);
+ printf(" couldn't get soft link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 1, link_target_b);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 1, link_target_b);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 2);
+ printf(" failed to retrieve soft link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
link_val_size = strlen(link_target_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 2, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 2);
+ printf(" couldn't get soft link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 2, link_target_c);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 2, link_target_c);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP4_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP4_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
@@ -12090,14 +11972,14 @@ test_get_link_val(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP5_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP5_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP5_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
@@ -12105,158 +11987,158 @@ test_get_link_val(void)
if (H5Lcreate_soft(link_target_a, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if (H5Lcreate_soft(link_target_b, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if (H5Lcreate_soft(link_target_c, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
/* Verify the links exist */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
/* Retrieve the info and value of each link in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 2);
+ printf(" failed to retrieve soft link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
link_val_size = strlen(link_target_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 2, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 2);
+ printf(" couldn't get soft link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 2, link_target_a);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 2, link_target_a);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 1);
+ printf(" failed to retrieve soft link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
link_val_size = strlen(link_target_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 1, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 1);
+ printf(" couldn't get soft link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 1, link_target_b);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 1, link_target_b);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 0);
+ printf(" failed to retrieve soft link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
link_val_size = strlen(link_target_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 0, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 0);
+ printf(" couldn't get soft link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 0, link_target_c);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 0, link_target_c);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP5_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP5_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
@@ -12285,7 +12167,7 @@ test_get_link_val(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP6_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP6_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP6_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
@@ -12293,158 +12175,158 @@ test_get_link_val(void)
if (H5Lcreate_soft(link_target_a, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if (H5Lcreate_soft(link_target_b, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if (H5Lcreate_soft(link_target_c, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
/* Verify the links exist */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
/* Retrieve the info and value of each link in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 0);
+ printf(" failed to retrieve soft link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
link_val_size = strlen(link_target_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 0, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 0);
+ printf(" couldn't get soft link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 0, link_target_a);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 0, link_target_a);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 1);
+ printf(" failed to retrieve soft link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
link_val_size = strlen(link_target_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 1, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 1);
+ printf(" couldn't get soft link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 1, link_target_b);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 1, link_target_b);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 2);
+ printf(" failed to retrieve soft link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
link_val_size = strlen(link_target_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 2, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 2);
+ printf(" couldn't get soft link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 2, link_target_c);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 2, link_target_c);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP6_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP6_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
@@ -12473,7 +12355,7 @@ test_get_link_val(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP7_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP7_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP7_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
@@ -12481,158 +12363,158 @@ test_get_link_val(void)
if (H5Lcreate_soft(link_target_a, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (H5Lcreate_soft(link_target_b, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (H5Lcreate_soft(link_target_c, subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
/* Verify the links exist */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
/* Retrieve the info and value of each link in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 2);
+ printf(" failed to retrieve soft link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
link_val_size = strlen(link_target_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 2, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 2);
+ printf(" couldn't get soft link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 2, link_target_a);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 2, link_target_a);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 1);
+ printf(" failed to retrieve soft link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
link_val_size = strlen(link_target_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 1, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 1);
+ printf(" couldn't get soft link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 1, link_target_b);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 1, link_target_b);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %d\n", 0);
+ printf(" failed to retrieve soft link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
link_val_size = strlen(link_target_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 0, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %d\n", 0);
+ printf(" couldn't get soft link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
- link_val_buf, 0, link_target_c);
+ printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
+ link_val_buf, 0, link_target_c);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP7_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP7_NAME);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
@@ -12657,7 +12539,7 @@ test_get_link_val(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_val_by_idx_external_crt_order_increasing);
}
@@ -12666,20 +12548,20 @@ test_get_link_val(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP8_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP8_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP8_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
@@ -12687,200 +12569,200 @@ test_get_link_val(void)
if (H5Lcreate_external(ext_link_filename, ext_obj_name_a, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, ext_obj_name_b, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, ext_obj_name_c, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
/* Verify the links exist */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
/* Retrieve the info and value of each link in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 0);
+ printf(" failed to retrieve external link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 0, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 0);
+ printf(" couldn't get external link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_a);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_a);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 1);
+ printf(" failed to retrieve external link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 1, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 1);
+ printf(" couldn't get external link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_b);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_b);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 2);
+ printf(" failed to retrieve external link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 2, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 2);
+ printf(" couldn't get external link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_c);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_c);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP8_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP8_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
@@ -12907,7 +12789,7 @@ test_get_link_val(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_val_by_idx_external_crt_order_decreasing);
}
@@ -12916,20 +12798,20 @@ test_get_link_val(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP9_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP9_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP9_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
@@ -12937,200 +12819,200 @@ test_get_link_val(void)
if (H5Lcreate_external(ext_link_filename, ext_obj_name_a, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, ext_obj_name_b, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, ext_obj_name_c, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
/* Verify the links exist */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
/* Retrieve the info and value of each link in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 2);
+ printf(" failed to retrieve external link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d not match expected size of %zu\n",
- link_info.u.val_size, 2, link_val_size);
+ printf(" link value size %zu for link at index %d not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 2);
+ printf(" couldn't get external link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_a);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_a);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 1);
+ printf(" failed to retrieve external link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 1, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 1);
+ printf(" couldn't get external link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_b);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_b);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 0);
+ printf(" failed to retrieve external link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 0, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 0);
+ printf(" couldn't get external link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_c);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_c);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP9_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP9_NAME);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
@@ -13160,20 +13042,20 @@ test_get_link_val(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP10_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP10_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP10_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
@@ -13181,200 +13063,200 @@ test_get_link_val(void)
if (H5Lcreate_external(ext_link_filename, ext_obj_name_a, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, ext_obj_name_b, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, ext_obj_name_c, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
/* Verify the links exist */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
/* Retrieve the info and value of each link in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 0);
+ printf(" failed to retrieve external link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 0, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 0);
+ printf(" couldn't get external link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_a);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_a);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 1);
+ printf(" failed to retrieve external link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 1, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 1);
+ printf(" couldn't get external link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_b);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_b);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 2);
+ printf(" failed to retrieve external link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 2, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 2);
+ printf(" couldn't get external link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_c);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_c);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP10_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP10_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
@@ -13404,20 +13286,20 @@ test_get_link_val(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP11_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP11_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_VAL_TEST_SUBGROUP11_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
@@ -13425,200 +13307,200 @@ test_get_link_val(void)
if (H5Lcreate_external(ext_link_filename, ext_obj_name_a, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, ext_obj_name_b, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, ext_obj_name_c, subgroup_id,
GET_LINK_VAL_TEST_EXT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
/* Verify the links exist */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_VAL_TEST_EXT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" couldn't determine if link '%s' exists\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
+ printf(" link '%s' did not exist\n", GET_LINK_VAL_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
/* Retrieve the info and value of each link in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 2);
+ printf(" failed to retrieve external link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 2, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 2);
+ printf(" couldn't get external link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_a);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_a);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 1);
+ printf(" failed to retrieve external link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 1, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 1);
+ printf(" couldn't get external link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_b);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_b);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %d\n", 0);
+ printf(" failed to retrieve external link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
- link_info.u.val_size, 0, link_val_size);
+ printf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- HDmemset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
+ memset(link_val_buf, 0, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE);
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %d\n", 0);
+ printf(" couldn't get external link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (H5Lunpack_elink_val(link_val_buf, link_info.u.val_size, &ext_link_flags, &ext_link_filepath,
&ext_link_val) < 0) {
H5_FAILED();
- HDprintf(" couldn't unpack external link value buffer\n");
+ printf(" couldn't unpack external link value buffer\n");
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
- HDprintf(" external link target file '%s' did not match expected '%s'\n",
- ext_link_filepath, ext_link_filename);
+ printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
+ ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
- HDprintf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
- ext_obj_name_c);
+ printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
+ ext_obj_name_c);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP11_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_VAL_TEST_SUBGROUP11_NAME);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
@@ -13754,8 +13636,8 @@ test_get_link_val_invalid_params(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, external link, or creation "
- "order aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, soft link, external link, or creation "
+ "order aren't supported with this connector\n");
return 0;
}
@@ -13763,34 +13645,33 @@ test_get_link_val_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, GET_LINK_VAL_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_VAL_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", GET_LINK_VAL_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_INVALID_PARAMS_TEST_GROUP_NAME, group_id,
GET_LINK_VAL_INVALID_PARAMS_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_VAL_INVALID_PARAMS_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_VAL_INVALID_PARAMS_TEST_SOFT_LINK_NAME);
goto error;
}
@@ -13798,21 +13679,21 @@ test_get_link_val_invalid_params(void)
if ((link_exists = H5Lexists(group_id, GET_LINK_VAL_INVALID_PARAMS_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n",
- GET_LINK_VAL_INVALID_PARAMS_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n",
+ GET_LINK_VAL_INVALID_PARAMS_TEST_SOFT_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
link_val_buf_size = 100;
- if (NULL == (link_val_buf = (char *)HDmalloc(link_val_buf_size))) {
+ if (NULL == (link_val_buf = (char *)malloc(link_val_buf_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for storing link value\n");
+ printf(" couldn't allocate buffer for storing link value\n");
goto error;
}
@@ -13824,7 +13705,7 @@ test_get_link_val_invalid_params(void)
{
TESTING_2("H5Lget_val with an invalid location ID");
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
H5E_BEGIN_TRY
{
@@ -13835,7 +13716,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val succeeded with an invalid location ID\n");
+ printf(" H5Lget_val succeeded with an invalid location ID\n");
PART_ERROR(H5Lget_val_invalid_loc_id);
}
@@ -13855,7 +13736,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val succeeded with a NULL link name\n");
+ printf(" H5Lget_val succeeded with a NULL link name\n");
PART_ERROR(H5Lget_val_invalid_link_name);
}
@@ -13867,7 +13748,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val succeeded with an invalid link name of ''\n");
+ printf(" H5Lget_val succeeded with an invalid link name of ''\n");
PART_ERROR(H5Lget_val_invalid_link_name);
}
@@ -13888,7 +13769,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val succeeded with an invalid LAPL\n");
+ printf(" H5Lget_val succeeded with an invalid LAPL\n");
PART_ERROR(H5Lget_val_invalid_lapl);
}
@@ -13900,7 +13781,7 @@ test_get_link_val_invalid_params(void)
{
TESTING_2("H5Lget_val_by_idx with an invalid location ID");
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
H5E_BEGIN_TRY
{
@@ -13911,7 +13792,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val_by_idx succeeded with an invalid location ID!\n");
+ printf(" H5Lget_val_by_idx succeeded with an invalid location ID!\n");
PART_ERROR(H5Lget_val_by_idx_invalid_loc_id);
}
@@ -13932,7 +13813,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val_by_idx succeeded with a NULL group name!\n");
+ printf(" H5Lget_val_by_idx succeeded with a NULL group name!\n");
PART_ERROR(H5Lget_val_by_idx_invalid_grp_name);
}
@@ -13945,7 +13826,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val_by_idx succeeded with an invalid group name of ''!\n");
+ printf(" H5Lget_val_by_idx succeeded with an invalid group name of ''!\n");
PART_ERROR(H5Lget_val_by_idx_invalid_grp_name);
}
@@ -13966,7 +13847,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val_by_idx succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Lget_val_by_idx succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Lget_val_by_idx_invalid_index_type);
}
@@ -13979,7 +13860,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val_by_idx succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Lget_val_by_idx succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Lget_val_by_idx_invalid_index_type);
}
@@ -14000,8 +13881,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
- " H5Lget_val_by_idx succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
+ printf(" H5Lget_val_by_idx succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Lget_val_by_idx_invalid_iter_order);
}
@@ -14014,7 +13894,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val_by_idx succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Lget_val_by_idx succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Lget_val_by_idx_invalid_iter_order);
}
@@ -14035,7 +13915,7 @@ test_get_link_val_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_val_by_idx succeeded with an invalid LAPL!\n");
+ printf(" H5Lget_val_by_idx succeeded with an invalid LAPL!\n");
PART_ERROR(H5Lget_val_by_idx_invalid_lapl);
}
@@ -14048,7 +13928,7 @@ test_get_link_val_invalid_params(void)
TESTING_2("test cleanup");
if (link_val_buf) {
- HDfree(link_val_buf);
+ free(link_val_buf);
link_val_buf = NULL;
}
@@ -14069,7 +13949,7 @@ error:
H5E_BEGIN_TRY
{
if (link_val_buf)
- HDfree(link_val_buf);
+ free(link_val_buf);
H5Pclose(gcpl_id);
H5Gclose(group_id);
H5Gclose(container_group);
@@ -14105,8 +13985,8 @@ test_get_link_info(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, hard link, or external link "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, soft link, hard link, or external link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -14114,26 +13994,26 @@ test_get_link_info(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
}
@@ -14141,7 +14021,7 @@ test_get_link_info(void)
if ((group_id = H5Gcreate2(container_group, GET_LINK_INFO_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", GET_LINK_INFO_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", GET_LINK_INFO_TEST_GROUP_NAME);
goto error;
}
@@ -14153,59 +14033,59 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info2 on hard link");
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP1_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP1_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP1_NAME);
PART_ERROR(H5Lget_info_hard);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_hard);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_hard);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
PART_ERROR(H5Lget_info_hard);
}
if (H5Lget_info2(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, &link_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info\n");
+ printf(" couldn't get hard link info\n");
PART_ERROR(H5Lget_info_hard);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_hard);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_hard);
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP1_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP1_NAME);
PART_ERROR(H5Lget_info_hard);
}
@@ -14224,12 +14104,12 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info2 on soft link");
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP2_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP2_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP2_NAME);
PART_ERROR(H5Lget_info_soft);
}
@@ -14238,32 +14118,32 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_soft);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_soft);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link did not exist\n");
+ printf(" soft link did not exist\n");
PART_ERROR(H5Lget_info_soft);
}
if (H5Lget_info2(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, &link_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info\n");
+ printf(" couldn't get soft link info\n");
PART_ERROR(H5Lget_info_soft);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_soft);
}
@@ -14272,23 +14152,23 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_soft);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_soft);
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP2_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP2_NAME);
PART_ERROR(H5Lget_info_soft);
}
@@ -14307,82 +14187,82 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info2 on external link");
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_info_external);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_info_external);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP3_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP3_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP3_NAME);
PART_ERROR(H5Lget_info_external);
}
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_external);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_external);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link did not exist\n");
+ printf(" external link did not exist\n");
PART_ERROR(H5Lget_info_external);
}
if (H5Lget_info2(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, &link_info, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info\n");
+ printf(" couldn't get external link info\n");
PART_ERROR(H5Lget_info_external);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_external);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_external);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_external);
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP3_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP3_NAME);
PART_ERROR(H5Lget_info_external);
}
@@ -14423,14 +14303,14 @@ test_get_link_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP5_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP5_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP5_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
@@ -14438,134 +14318,134 @@ test_get_link_info(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 0);
+ printf(" couldn't get hard link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 1);
+ printf(" couldn't get hard link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 2);
+ printf(" couldn't get hard link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP5_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP5_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_increasing);
}
@@ -14586,14 +14466,14 @@ test_get_link_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP6_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP6_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP6_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
@@ -14601,134 +14481,134 @@ test_get_link_info(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 2);
+ printf(" couldn't get hard link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 1);
+ printf(" couldn't get hard link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 0);
+ printf(" couldn't get hard link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP6_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP6_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_crt_order_decreasing);
}
@@ -14750,7 +14630,7 @@ test_get_link_info(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP7_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP7_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP7_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
@@ -14758,140 +14638,140 @@ test_get_link_info(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 0);
+ printf(" couldn't get hard link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 1);
+ printf(" couldn't get hard link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 2);
+ printf(" couldn't get hard link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP7_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP7_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
@@ -14913,7 +14793,7 @@ test_get_link_info(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP8_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP8_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP8_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
@@ -14921,140 +14801,140 @@ test_get_link_info(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 2);
+ printf(" couldn't get hard link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 1);
+ printf(" couldn't get hard link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %d\n", 0);
+ printf(" couldn't get hard link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP8_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP8_NAME);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
@@ -15075,14 +14955,14 @@ test_get_link_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP9_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP9_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP9_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
@@ -15092,7 +14972,7 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
@@ -15101,7 +14981,7 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
@@ -15110,65 +14990,65 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 0);
+ printf(" couldn't get soft link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
@@ -15177,29 +15057,29 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 1);
+ printf(" couldn't get soft link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
@@ -15208,29 +15088,29 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 2);
+ printf(" couldn't get soft link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
@@ -15239,21 +15119,21 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP9_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP9_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_increasing);
}
@@ -15274,14 +15154,14 @@ test_get_link_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP10_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP10_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP10_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
@@ -15291,7 +15171,7 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
@@ -15300,7 +15180,7 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
@@ -15309,65 +15189,65 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 2);
+ printf(" couldn't get soft link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
@@ -15376,29 +15256,29 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 1);
+ printf(" couldn't get soft link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
@@ -15407,29 +15287,29 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 0);
+ printf(" couldn't get soft link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
@@ -15438,21 +15318,21 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP10_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP10_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_crt_order_decreasing);
}
@@ -15474,7 +15354,7 @@ test_get_link_info(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP11_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP11_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP11_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
@@ -15484,7 +15364,7 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
@@ -15493,7 +15373,7 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
@@ -15502,65 +15382,65 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 0);
+ printf(" couldn't get soft link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
@@ -15569,31 +15449,31 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 1);
+ printf(" couldn't get soft link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
@@ -15602,31 +15482,31 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 2);
+ printf(" couldn't get soft link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
@@ -15635,23 +15515,23 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%zu' did not match expected value '%zu'\n",
- link_info.u.val_size, link_val_size);
+ printf(" link's value size '%zu' did not match expected value '%zu'\n",
+ link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP11_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP11_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
@@ -15673,7 +15553,7 @@ test_get_link_info(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP12_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP12_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP12_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15683,7 +15563,7 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15692,7 +15572,7 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15701,65 +15581,65 @@ test_get_link_info(void)
subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 2);
+ printf(" couldn't get soft link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15768,31 +15648,31 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 1);
+ printf(" couldn't get soft link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15801,31 +15681,31 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %d\n", 0);
+ printf(" couldn't get soft link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if (link_info.type != H5L_TYPE_SOFT) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15834,23 +15714,23 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP12_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP12_NAME);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15871,7 +15751,7 @@ test_get_link_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_info_by_idx_external_crt_order_increasing);
}
@@ -15880,20 +15760,20 @@ test_get_link_info(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP13_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP13_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP13_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
@@ -15901,158 +15781,158 @@ test_get_link_info(void)
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 0);
+ printf(" couldn't get external link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 1);
+ printf(" couldn't get external link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 2);
+ printf(" couldn't get external link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP13_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP13_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
@@ -16075,7 +15955,7 @@ test_get_link_info(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_info_by_idx_external_crt_order_decreasing);
}
@@ -16084,20 +15964,20 @@ test_get_link_info(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP14_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP14_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP14_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
@@ -16105,158 +15985,158 @@ test_get_link_info(void)
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 2);
+ printf(" couldn't get external link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 1);
+ printf(" couldn't get external link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 0);
+ printf(" couldn't get external link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP14_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP14_NAME);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
@@ -16282,20 +16162,20 @@ test_get_link_info(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP15_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP15_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP15_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
@@ -16303,164 +16183,164 @@ test_get_link_info(void)
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 0);
+ printf(" couldn't get external link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 1);
+ printf(" couldn't get external link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 2);
+ printf(" couldn't get external link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP15_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP15_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
@@ -16486,20 +16366,20 @@ test_get_link_info(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP16_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP16_NAME);
+ printf(" couldn't create subgroup '%s'\n", GET_LINK_INFO_TEST_SUBGROUP16_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
@@ -16507,164 +16387,164 @@ test_get_link_info(void)
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME2);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before deletion\n",
- GET_LINK_INFO_TEST_EXT_LINK_NAME3);
+ printf(" external link '%s' did not exist before deletion\n",
+ GET_LINK_INFO_TEST_EXT_LINK_NAME3);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
/* Retrieve info of links in turn */
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 2);
+ printf(" couldn't get external link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 0)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 1);
+ printf(" couldn't get external link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 1)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
}
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %d\n", 0);
+ printf(" couldn't get external link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (link_info.type != H5L_TYPE_EXTERNAL) {
H5_FAILED();
- HDprintf(" incorrect link type returned\n");
+ printf(" incorrect link type returned\n");
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
- (long long)link_info.u.val_size, link_val_size);
+ printf(" link's value size '%lld' did not match expected value '%zu'\n",
+ (long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (link_info.corder_valid && (link_info.corder != 2)) {
H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
+ printf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP16_NAME);
+ printf(" failed to close group '%s'\n", GET_LINK_INFO_TEST_SUBGROUP16_NAME);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
@@ -16798,8 +16678,8 @@ test_get_link_info_invalid_params(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or hard link "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, or hard link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -16807,34 +16687,33 @@ test_get_link_info_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, GET_LINK_INFO_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_INFO_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", GET_LINK_INFO_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
if (H5Lcreate_hard(group_id, ".", group_id, GET_LINK_INFO_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", GET_LINK_INFO_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", GET_LINK_INFO_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
@@ -16842,14 +16721,14 @@ test_get_link_info_invalid_params(void)
if ((link_exists = H5Lexists(group_id, GET_LINK_INFO_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_INFO_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_INFO_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link did not exist\n");
+ printf(" hard link did not exist\n");
goto error;
}
@@ -16861,7 +16740,7 @@ test_get_link_info_invalid_params(void)
{
TESTING_2("H5Lget_info2 with an invalid location ID");
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
H5E_BEGIN_TRY
{
@@ -16872,7 +16751,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info2 succeeded with an invalid location ID!\n");
+ printf(" H5Lget_info2 succeeded with an invalid location ID!\n");
PART_ERROR(H5Lget_info_invalid_loc_id);
}
@@ -16892,7 +16771,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info2 succeeded with a NULL link name!\n");
+ printf(" H5Lget_info2 succeeded with a NULL link name!\n");
PART_ERROR(H5Lget_info_invalid_link_name);
}
@@ -16904,7 +16783,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info2 succeeded with an invalid link name of ''!\n");
+ printf(" H5Lget_info2 succeeded with an invalid link name of ''!\n");
PART_ERROR(H5Lget_info_invalid_link_name);
}
@@ -16925,7 +16804,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info2 succeeded with an invalid LAPL!\n");
+ printf(" H5Lget_info2 succeeded with an invalid LAPL!\n");
PART_ERROR(H5Lget_info_invalid_lapl);
}
@@ -16933,7 +16812,7 @@ test_get_link_info_invalid_params(void)
}
PART_END(H5Lget_info_invalid_lapl);
- HDmemset(&link_info, 0, sizeof(link_info));
+ memset(&link_info, 0, sizeof(link_info));
PART_BEGIN(H5Lget_info_by_idx_invalid_loc_id)
{
@@ -16948,7 +16827,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info_by_idx2 succeeded with an invalid location ID!\n");
+ printf(" H5Lget_info_by_idx2 succeeded with an invalid location ID!\n");
PART_ERROR(H5Lget_info_by_idx_invalid_loc_id);
}
@@ -16969,7 +16848,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info_by_idx2 succeeded with a NULL group name!\n");
+ printf(" H5Lget_info_by_idx2 succeeded with a NULL group name!\n");
PART_ERROR(H5Lget_info_by_idx_invalid_grp_name);
}
@@ -16982,7 +16861,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info_by_idx2 succeeded with an invalid group name of ''!\n");
+ printf(" H5Lget_info_by_idx2 succeeded with an invalid group name of ''!\n");
PART_ERROR(H5Lget_info_by_idx_invalid_grp_name);
}
@@ -17003,7 +16882,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info_by_idx2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Lget_info_by_idx2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Lget_info_by_idx_invalid_index_type);
}
@@ -17016,7 +16895,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info_by_idx2 succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Lget_info_by_idx2 succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Lget_info_by_idx_invalid_index_type);
}
@@ -17037,7 +16916,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" H5Lget_info_by_idx2 succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Lget_info_by_idx_invalid_iter_order);
}
@@ -17051,7 +16930,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info_by_idx2 succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Lget_info_by_idx2 succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Lget_info_by_idx_invalid_iter_order);
}
@@ -17072,7 +16951,7 @@ test_get_link_info_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_info_by_idx2 succeeded with an invalid LAPL!\n");
+ printf(" H5Lget_info_by_idx2 succeeded with an invalid LAPL!\n");
PART_ERROR(H5Lget_info_by_idx_invalid_lapl);
}
@@ -17134,8 +17013,8 @@ test_get_link_name(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, hard link, or external link "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, soft link, hard link, or external link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -17143,26 +17022,26 @@ test_get_link_name(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
}
@@ -17170,7 +17049,7 @@ test_get_link_name(void)
if ((group_id = H5Gcreate2(container_group, GET_LINK_NAME_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", GET_LINK_NAME_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", GET_LINK_NAME_TEST_GROUP_NAME);
goto error;
}
@@ -17184,7 +17063,7 @@ test_get_link_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_name_by_idx_hard_crt_order_increasing);
}
@@ -17192,8 +17071,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
@@ -17201,64 +17080,64 @@ test_get_link_name(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
@@ -17266,72 +17145,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
@@ -17352,7 +17231,7 @@ test_get_link_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
@@ -17360,8 +17239,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME2, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME2);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
@@ -17369,64 +17248,64 @@ test_get_link_name(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
@@ -17434,72 +17313,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
@@ -17522,8 +17401,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME3, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME3);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
@@ -17531,64 +17410,64 @@ test_get_link_name(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
@@ -17596,72 +17475,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
@@ -17684,8 +17563,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME4, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME4);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME4);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
@@ -17693,64 +17572,64 @@ test_get_link_name(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME3, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_HARD_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if hard link '%s' exists\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" couldn't determine if hard link '%s' exists\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" hard link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" hard link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
@@ -17758,72 +17637,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_HARD_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_HARD_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
@@ -17844,7 +17723,7 @@ test_get_link_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_name_by_idx_soft_crt_order_increasing);
}
@@ -17852,8 +17731,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
@@ -17861,64 +17740,64 @@ test_get_link_name(void)
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
@@ -17926,72 +17805,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
@@ -18012,7 +17891,7 @@ test_get_link_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
@@ -18020,8 +17899,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME2, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME2);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
@@ -18029,64 +17908,64 @@ test_get_link_name(void)
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
@@ -18094,72 +17973,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
@@ -18182,8 +18061,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME3, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME3);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
@@ -18191,64 +18070,64 @@ test_get_link_name(void)
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
@@ -18256,72 +18135,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
@@ -18344,8 +18223,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME4, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME4);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME4);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
@@ -18353,64 +18232,64 @@ test_get_link_name(void)
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" GET_LINK_NAME_TEST_GROUP_NAME, subgroup_id,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" failed to create soft link '%s'\n", GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_SOFT_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if soft link '%s' exists\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" couldn't determine if soft link '%s' exists\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" soft link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" soft link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
@@ -18418,72 +18297,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_SOFT_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
@@ -18504,7 +18383,7 @@ test_get_link_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_name_by_idx_external_crt_order_increasing);
}
@@ -18514,13 +18393,13 @@ test_get_link_name(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
@@ -18528,8 +18407,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
@@ -18537,21 +18416,21 @@ test_get_link_name(void)
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
@@ -18559,45 +18438,45 @@ test_get_link_name(void)
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
@@ -18605,72 +18484,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
@@ -18693,7 +18572,7 @@ test_get_link_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lget_name_by_idx_external_crt_order_decreasing);
}
@@ -18703,13 +18582,13 @@ test_get_link_name(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
@@ -18717,8 +18596,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME2, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME2);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
@@ -18726,21 +18605,21 @@ test_get_link_name(void)
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
@@ -18748,45 +18627,45 @@ test_get_link_name(void)
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
@@ -18794,72 +18673,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
@@ -18886,13 +18765,13 @@ test_get_link_name(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
@@ -18900,8 +18779,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME3, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME3);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
@@ -18909,21 +18788,21 @@ test_get_link_name(void)
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
@@ -18931,45 +18810,45 @@ test_get_link_name(void)
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
@@ -18977,72 +18856,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
@@ -19069,13 +18948,13 @@ test_get_link_name(void)
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (H5Fclose(ext_file_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close file '%s'\n", ext_link_filename);
+ printf(" couldn't close file '%s'\n", ext_link_filename);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
@@ -19083,8 +18962,8 @@ test_get_link_name(void)
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME4, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME4);
+ printf(" couldn't create container subgroup '%s'\n",
+ GET_LINK_NAME_TEST_EXTERNAL_SUBGROUP_NAME4);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
@@ -19092,21 +18971,21 @@ test_get_link_name(void)
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" failed to create external link '%s'\n", GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
@@ -19114,45 +18993,45 @@ test_get_link_name(void)
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if ((link_exists = H5Lexists(subgroup_id, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if external link '%s' exists\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" couldn't determine if external link '%s' exists\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" external link '%s' did not exist before name retrieval\n",
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" external link '%s' did not exist before name retrieval\n",
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
@@ -19160,72 +19039,72 @@ test_get_link_name(void)
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if ((link_name_buf_size = H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2,
NULL, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (H5Lget_name_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, link_name_buf,
(size_t)link_name_buf_size + 1, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name\n");
+ printf(" failed to retrieve link name\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
- HDprintf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
- GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
+ printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
+ GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group\n");
+ printf(" failed to close group\n");
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
@@ -19369,8 +19248,8 @@ test_get_link_name_invalid_params(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, hard link, or external link "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, soft link, hard link, or external link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -19378,28 +19257,27 @@ test_get_link_name_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, GET_LINK_NAME_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- GET_LINK_NAME_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", GET_LINK_NAME_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
if (H5Lcreate_hard(group_id, ".", group_id, GET_LINK_NAME_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create hard link '%s'\n", GET_LINK_NAME_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" failed to create hard link '%s'\n", GET_LINK_NAME_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
@@ -19407,25 +19285,25 @@ test_get_link_name_invalid_params(void)
if ((link_exists = H5Lexists(group_id, GET_LINK_NAME_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link did not exist\n");
+ printf(" link did not exist\n");
goto error;
}
if ((ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, NULL, link_name_buf_size,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve link name size\n");
+ printf(" failed to retrieve link name size\n");
goto error;
}
link_name_buf_size = (size_t)ret;
- if (NULL == (link_name_buf = (char *)HDmalloc(link_name_buf_size + 1)))
+ if (NULL == (link_name_buf = (char *)malloc(link_name_buf_size + 1)))
TEST_ERROR;
PASSED();
@@ -19445,7 +19323,7 @@ test_get_link_name_invalid_params(void)
if (ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_name_by_idx succeeded with an invalid location ID!\n");
+ printf(" H5Lget_name_by_idx succeeded with an invalid location ID!\n");
PART_ERROR(H5Lget_name_by_idx_invalid_loc_id);
}
@@ -19466,7 +19344,7 @@ test_get_link_name_invalid_params(void)
if (ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_name_by_idx succeeded with a NULL group name!\n");
+ printf(" H5Lget_name_by_idx succeeded with a NULL group name!\n");
PART_ERROR(H5Lget_name_by_idx_invalid_grp_name);
}
@@ -19479,7 +19357,7 @@ test_get_link_name_invalid_params(void)
if (ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_name_by_idx succeeded with an invalid group name of ''!\n");
+ printf(" H5Lget_name_by_idx succeeded with an invalid group name of ''!\n");
PART_ERROR(H5Lget_name_by_idx_invalid_grp_name);
}
@@ -19500,7 +19378,7 @@ test_get_link_name_invalid_params(void)
if (ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_name_by_idx succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Lget_name_by_idx succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Lget_name_by_idx_invalid_index_type);
}
@@ -19513,7 +19391,7 @@ test_get_link_name_invalid_params(void)
if (ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_name_by_idx succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Lget_name_by_idx succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Lget_name_by_idx_invalid_index_type);
}
@@ -19534,8 +19412,7 @@ test_get_link_name_invalid_params(void)
if (ret >= 0) {
H5_FAILED();
- HDprintf(
- " H5Lget_name_by_idx succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
+ printf(" H5Lget_name_by_idx succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Lget_name_by_idx_invalid_iter_order);
}
@@ -19548,7 +19425,7 @@ test_get_link_name_invalid_params(void)
if (ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_name_by_idx succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Lget_name_by_idx succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Lget_name_by_idx_invalid_iter_order);
}
@@ -19569,7 +19446,7 @@ test_get_link_name_invalid_params(void)
if (ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lget_name_by_idx succeeded with an invalid LAPL!\n");
+ printf(" H5Lget_name_by_idx succeeded with an invalid LAPL!\n");
PART_ERROR(H5Lget_name_by_idx_invalid_lapl);
}
@@ -19582,7 +19459,7 @@ test_get_link_name_invalid_params(void)
TESTING_2("test cleanup");
if (link_name_buf) {
- HDfree(link_name_buf);
+ free(link_name_buf);
link_name_buf = NULL;
}
@@ -19601,7 +19478,7 @@ error:
H5E_BEGIN_TRY
{
if (link_name_buf)
- HDfree(link_name_buf);
+ free(link_name_buf);
H5Gclose(group_id);
H5Gclose(container_group);
H5Fclose(file_id);
@@ -19637,8 +19514,8 @@ test_link_iterate_hard_links(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, link, or iterate aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, link, or iterate aren't "
+ "supported with this connector\n");
return 0;
}
@@ -19646,26 +19523,26 @@ test_link_iterate_hard_links(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
}
@@ -19673,7 +19550,7 @@ test_link_iterate_hard_links(void)
if ((group_id = H5Gcreate2(container_group, LINK_ITER_HARD_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", LINK_ITER_HARD_LINKS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_ITER_HARD_LINKS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -19694,26 +19571,26 @@ test_link_iterate_hard_links(void)
if ((dset_id = H5Dcreate2(group_id, dset_name, dset_dtype, dset_dspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", dset_name);
+ printf(" couldn't create hard link '%s'\n", dset_name);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, dset_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", dset_name);
+ printf(" couldn't determine if link '%s' exists\n", dset_name);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", dset_name);
+ printf(" link '%s' did not exist\n", dset_name);
goto error;
}
if (H5Dclose(dset_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close dataset '%s'\n", dset_name);
+ printf(" couldn't close dataset '%s'\n", dset_name);
goto error;
}
}
@@ -19738,13 +19615,13 @@ test_link_iterate_hard_links(void)
/* Test basic link iteration capability using both index types and both index orders */
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_hard_links_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in increasing order failed\n");
+ printf(" H5Literate2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_link_name_increasing);
}
if (i != LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_name_increasing);
}
@@ -19761,13 +19638,13 @@ test_link_iterate_hard_links(void)
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_hard_links_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in decreasing order failed\n");
+ printf(" H5Literate2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_link_name_decreasing);
}
if (i != 2 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_name_decreasing);
}
@@ -19781,7 +19658,7 @@ test_link_iterate_hard_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_increasing);
}
@@ -19791,13 +19668,13 @@ test_link_iterate_hard_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_hard_links_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_link_creation_increasing);
}
if (i != 3 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_creation_increasing);
}
@@ -19811,7 +19688,7 @@ test_link_iterate_hard_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_decreasing);
}
@@ -19821,13 +19698,13 @@ test_link_iterate_hard_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_hard_links_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_link_creation_decreasing);
}
if (i != 4 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_creation_decreasing);
}
@@ -19846,13 +19723,13 @@ test_link_iterate_hard_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_HARD_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_hard_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_by_name_link_name_increasing);
}
if (i != LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_link_name_increasing);
}
@@ -19871,13 +19748,13 @@ test_link_iterate_hard_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_HARD_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_hard_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_link_name_decreasing);
}
if (i != 2 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_link_name_decreasing);
}
@@ -19891,7 +19768,7 @@ test_link_iterate_hard_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_increasing);
}
@@ -19902,13 +19779,13 @@ test_link_iterate_hard_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_HARD_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_hard_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_by_name_creation_increasing);
}
if (i != 3 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_creation_increasing);
}
@@ -19922,7 +19799,7 @@ test_link_iterate_hard_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_decreasing);
}
@@ -19933,13 +19810,13 @@ test_link_iterate_hard_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_HARD_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_hard_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_creation_decreasing);
}
if (i != 4 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_creation_decreasing);
}
@@ -20007,8 +19884,8 @@ test_link_iterate_soft_links(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, soft link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -20016,26 +19893,26 @@ test_link_iterate_soft_links(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
}
@@ -20043,7 +19920,7 @@ test_link_iterate_soft_links(void)
if ((group_id = H5Gcreate2(container_group, LINK_ITER_SOFT_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", LINK_ITER_SOFT_LINKS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_ITER_SOFT_LINKS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -20060,20 +19937,20 @@ test_link_iterate_soft_links(void)
if (H5Lcreate_soft(link_target, group_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", link_name);
+ printf(" couldn't create soft link '%s'\n", link_name);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, link_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", link_name);
+ printf(" couldn't determine if link '%s' exists\n", link_name);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", link_name);
+ printf(" link '%s' did not exist\n", link_name);
goto error;
}
}
@@ -20098,13 +19975,13 @@ test_link_iterate_soft_links(void)
/* Test basic link iteration capability using both index types and both index orders */
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_soft_links_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in increasing order failed\n");
+ printf(" H5Literate2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_link_name_increasing);
}
if (i != LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_name_increasing);
}
@@ -20121,13 +19998,13 @@ test_link_iterate_soft_links(void)
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_soft_links_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in decreasing order failed\n");
+ printf(" H5Literate2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_link_name_decreasing);
}
if (i != 2 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_name_decreasing);
}
@@ -20141,7 +20018,7 @@ test_link_iterate_soft_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_increasing);
}
@@ -20151,13 +20028,13 @@ test_link_iterate_soft_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_soft_links_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_link_creation_increasing);
}
if (i != 3 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_creation_increasing);
}
@@ -20171,7 +20048,7 @@ test_link_iterate_soft_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_decreasing);
}
@@ -20181,13 +20058,13 @@ test_link_iterate_soft_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_soft_links_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_link_creation_decreasing);
}
if (i != 4 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_creation_decreasing);
}
@@ -20206,13 +20083,13 @@ test_link_iterate_soft_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_SOFT_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_soft_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_by_name_link_name_increasing);
}
if (i != LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_link_name_increasing);
}
@@ -20231,13 +20108,13 @@ test_link_iterate_soft_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_SOFT_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_soft_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_link_name_decreasing);
}
if (i != 2 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_link_name_decreasing);
}
@@ -20251,7 +20128,7 @@ test_link_iterate_soft_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_increasing);
}
@@ -20262,13 +20139,13 @@ test_link_iterate_soft_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_SOFT_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_soft_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_by_name_creation_increasing);
}
if (i != 3 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_creation_increasing);
}
@@ -20282,7 +20159,7 @@ test_link_iterate_soft_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_decreasing);
}
@@ -20293,13 +20170,13 @@ test_link_iterate_soft_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_SOFT_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_soft_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_creation_decreasing);
}
if (i != 4 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_creation_decreasing);
}
@@ -20361,8 +20238,8 @@ test_link_iterate_external_links(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, external link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -20372,7 +20249,7 @@ test_link_iterate_external_links(void)
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
@@ -20381,26 +20258,26 @@ test_link_iterate_external_links(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
}
@@ -20408,7 +20285,7 @@ test_link_iterate_external_links(void)
if ((group_id = H5Gcreate2(container_group, LINK_ITER_EXT_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", LINK_ITER_EXT_LINKS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_ITER_EXT_LINKS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -20421,20 +20298,20 @@ test_link_iterate_external_links(void)
if (H5Lcreate_external(ext_link_filename, "/", group_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", link_name);
+ printf(" couldn't create external link '%s'\n", link_name);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(group_id, link_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", link_name);
+ printf(" couldn't determine if link '%s' exists\n", link_name);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", link_name);
+ printf(" link '%s' did not exist\n", link_name);
goto error;
}
}
@@ -20460,13 +20337,13 @@ test_link_iterate_external_links(void)
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_external_links_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in increasing order failed\n");
+ printf(" H5Literate2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_link_name_increasing);
}
if (i != LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_name_increasing);
}
@@ -20484,13 +20361,13 @@ test_link_iterate_external_links(void)
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_external_links_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in decreasing order failed\n");
+ printf(" H5Literate2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_link_name_decreasing);
}
if (i != 2 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_name_decreasing);
}
@@ -20504,7 +20381,7 @@ test_link_iterate_external_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_increasing);
}
@@ -20514,13 +20391,13 @@ test_link_iterate_external_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_external_links_cb,
&i) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_link_creation_increasing);
}
if (i != 3 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_creation_increasing);
}
@@ -20534,7 +20411,7 @@ test_link_iterate_external_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_decreasing);
}
@@ -20544,13 +20421,13 @@ test_link_iterate_external_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_external_links_cb,
&i) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_link_creation_decreasing);
}
if (i != 4 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_creation_decreasing);
}
@@ -20569,13 +20446,13 @@ test_link_iterate_external_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_EXT_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_external_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_by_name_link_name_increasing);
}
if (i != LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_link_name_increasing);
}
@@ -20594,13 +20471,13 @@ test_link_iterate_external_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_EXT_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_external_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_link_name_decreasing);
}
if (i != 2 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_link_name_decreasing);
}
@@ -20614,7 +20491,7 @@ test_link_iterate_external_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_increasing);
}
@@ -20626,13 +20503,13 @@ test_link_iterate_external_links(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_external_links_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_by_name_creation_increasing);
}
if (i != 3 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_creation_increasing);
}
@@ -20646,7 +20523,7 @@ test_link_iterate_external_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_decreasing);
}
@@ -20658,13 +20535,13 @@ test_link_iterate_external_links(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_external_links_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_creation_decreasing);
}
if (i != 4 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_creation_decreasing);
}
@@ -20758,8 +20635,8 @@ test_link_iterate_mixed_links(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, external link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, soft link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -20769,7 +20646,7 @@ test_link_iterate_mixed_links(void)
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
@@ -20778,26 +20655,26 @@ test_link_iterate_mixed_links(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
}
@@ -20805,7 +20682,7 @@ test_link_iterate_mixed_links(void)
if ((group_id = H5Gcreate2(container_group, LINK_ITER_MIXED_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", LINK_ITER_MIXED_LINKS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_ITER_MIXED_LINKS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -20819,7 +20696,7 @@ test_link_iterate_mixed_links(void)
if ((dset_id = H5Dcreate2(group_id, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME, dset_dtype, dset_dspace,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME);
goto error;
}
@@ -20827,51 +20704,51 @@ test_link_iterate_mixed_links(void)
"/" LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
group_id, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME);
goto error;
}
if (H5Lcreate_external(ext_link_filename, "/", group_id, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME);
goto error;
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(group_id, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" first link did not exist\n");
+ printf(" first link did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(group_id, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" second link did not exist\n");
+ printf(" second link did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(group_id, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" third link did not exist\n");
+ printf(" third link did not exist\n");
goto error;
}
@@ -20895,13 +20772,13 @@ test_link_iterate_mixed_links(void)
/* Test basic link iteration capability using both index types and both index orders */
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_mixed_links_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in increasing order failed\n");
+ printf(" H5Literate2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_link_name_increasing);
}
if (i != LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_name_increasing);
}
@@ -20918,13 +20795,13 @@ test_link_iterate_mixed_links(void)
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_mixed_links_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in decreasing order failed\n");
+ printf(" H5Literate2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_link_name_decreasing);
}
if (i != 2 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_name_decreasing);
}
@@ -20938,7 +20815,7 @@ test_link_iterate_mixed_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_increasing);
}
@@ -20948,13 +20825,13 @@ test_link_iterate_mixed_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_mixed_links_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_link_creation_increasing);
}
if (i != 3 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_creation_increasing);
}
@@ -20968,7 +20845,7 @@ test_link_iterate_mixed_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_decreasing);
}
@@ -20978,13 +20855,13 @@ test_link_iterate_mixed_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_mixed_links_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_link_creation_decreasing);
}
if (i != 4 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_link_creation_decreasing);
}
@@ -21002,13 +20879,13 @@ test_link_iterate_mixed_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_MIXED_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_mixed_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_by_name_link_name_increasing);
}
if (i != LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_link_name_increasing);
}
@@ -21027,13 +20904,13 @@ test_link_iterate_mixed_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_MIXED_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_mixed_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_link_name_decreasing);
}
if (i != 2 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_link_name_decreasing);
}
@@ -21047,7 +20924,7 @@ test_link_iterate_mixed_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_increasing);
}
@@ -21058,13 +20935,13 @@ test_link_iterate_mixed_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_MIXED_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_mixed_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_by_name_creation_increasing);
}
if (i != 3 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_creation_increasing);
}
@@ -21078,7 +20955,7 @@ test_link_iterate_mixed_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_decreasing);
}
@@ -21089,13 +20966,13 @@ test_link_iterate_mixed_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_MIXED_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_mixed_links_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_creation_decreasing);
}
if (i != 4 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not iterated over!\n");
+ printf(" some links were not iterated over!\n");
PART_ERROR(H5Literate_by_name_creation_decreasing);
}
@@ -21109,7 +20986,7 @@ test_link_iterate_mixed_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_index_saving_increasing);
}
@@ -21120,20 +20997,20 @@ test_link_iterate_mixed_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, &saved_idx, link_iter_idx_saving_cb,
&halted) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 index-saving capability test failed\n");
+ printf(" H5Literate2 index-saving capability test failed\n");
PART_ERROR(H5Literate_index_saving_increasing);
}
if (saved_idx != 2) {
H5_FAILED();
- HDprintf(" saved index after iteration was wrong\n");
+ printf(" saved index after iteration was wrong\n");
PART_ERROR(H5Literate_index_saving_increasing);
}
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, &saved_idx, link_iter_idx_saving_cb,
&halted) < 0) {
H5_FAILED();
- HDprintf(" couldn't finish iterating when beginning from saved index\n");
+ printf(" couldn't finish iterating when beginning from saved index\n");
PART_ERROR(H5Literate_index_saving_increasing);
}
@@ -21147,7 +21024,7 @@ test_link_iterate_mixed_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_index_saving_decreasing);
}
@@ -21157,20 +21034,20 @@ test_link_iterate_mixed_links(void)
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, &saved_idx, link_iter_idx_saving_cb,
&halted) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 index-saving capability test failed\n");
+ printf(" H5Literate2 index-saving capability test failed\n");
PART_ERROR(H5Literate_index_saving_decreasing);
}
if (saved_idx != 2) {
H5_FAILED();
- HDprintf(" saved index after iteration was wrong\n");
+ printf(" saved index after iteration was wrong\n");
PART_ERROR(H5Literate_index_saving_decreasing);
}
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, &saved_idx, link_iter_idx_saving_cb,
&halted) < 0) {
H5_FAILED();
- HDprintf(" couldn't finish iterating when beginning from saved index\n");
+ printf(" couldn't finish iterating when beginning from saved index\n");
PART_ERROR(H5Literate_index_saving_decreasing);
}
@@ -21244,9 +21121,8 @@ test_link_iterate_invalid_params(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, dataset, link, soft link, external link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, link, soft link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -21256,7 +21132,7 @@ test_link_iterate_invalid_params(void)
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
@@ -21265,21 +21141,20 @@ test_link_iterate_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, LINK_ITER_INVALID_PARAMS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_ITER_INVALID_PARAMS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -21293,7 +21168,7 @@ test_link_iterate_invalid_params(void)
if ((dset_id = H5Dcreate2(group_id, LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME, dset_dtype, dset_dspace,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't create hard link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
@@ -21302,50 +21177,48 @@ test_link_iterate_invalid_params(void)
group_id, LINK_ITER_INVALID_PARAMS_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_SOFT_LINK_NAME);
goto error;
}
if (H5Lcreate_external(ext_link_filename, "/", group_id, LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME);
+ printf(" couldn't create external link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME);
goto error;
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(group_id, LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n",
- LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" first link did not exist\n");
+ printf(" first link did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(group_id, LINK_ITER_INVALID_PARAMS_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n",
- LINK_ITER_INVALID_PARAMS_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", LINK_ITER_INVALID_PARAMS_TEST_SOFT_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" second link did not exist\n");
+ printf(" second link did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(group_id, LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME);
+ printf(" couldn't determine if link '%s' exists\n", LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" third link did not exist\n");
+ printf(" third link did not exist\n");
goto error;
}
@@ -21368,7 +21241,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate2 succeeded with an invalid group ID!\n");
+ printf(" H5Literate2 succeeded with an invalid group ID!\n");
PART_ERROR(H5Literate_invalid_grp_id);
}
@@ -21389,7 +21262,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Literate2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Literate_invalid_index_type);
}
@@ -21402,7 +21275,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate2 succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Literate2 succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Literate_invalid_index_type);
}
@@ -21423,7 +21296,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate2 succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
+ printf(" H5Literate2 succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Literate_invalid_iter_order);
}
@@ -21436,7 +21309,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate2 succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Literate2 succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Literate_invalid_iter_order);
}
@@ -21458,7 +21331,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 succeeded with an invalid location ID!\n");
+ printf(" H5Literate_by_name2 succeeded with an invalid location ID!\n");
PART_ERROR(H5Literate_by_name_invalid_loc_id);
}
@@ -21479,7 +21352,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 succeeded with a NULL group name!\n");
+ printf(" H5Literate_by_name2 succeeded with a NULL group name!\n");
PART_ERROR(H5Literate_by_name_invalid_grp_name);
}
@@ -21492,7 +21365,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 succeeded with an invalid group name of ''!\n");
+ printf(" H5Literate_by_name2 succeeded with an invalid group name of ''!\n");
PART_ERROR(H5Literate_by_name_invalid_grp_name);
}
@@ -21514,7 +21387,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Literate_by_name2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Literate_by_name_invalid_index_type);
}
@@ -21528,7 +21401,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Literate_by_name2 succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Literate_by_name_invalid_index_type);
}
@@ -21550,7 +21423,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
+ printf(
" H5Literate_by_name2 succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Literate_by_name_invalid_iter_order);
}
@@ -21565,7 +21438,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Literate_by_name2 succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Literate_by_name_invalid_iter_order);
}
@@ -21587,7 +21460,7 @@ test_link_iterate_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 succeeded with an invalid LAPL!\n");
+ printf(" H5Literate_by_name2 succeeded with an invalid LAPL!\n");
PART_ERROR(H5Literate_by_name_invalid_lapl);
}
@@ -21648,8 +21521,8 @@ test_link_iterate_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or iterate aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, or iterate aren't supported "
+ "with this connector\n");
return 0;
}
@@ -21657,26 +21530,26 @@ test_link_iterate_0_links(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
+ printf(" couldn't create GCPL for link creation order tracking\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
+ printf(" couldn't set link creation order tracking\n");
goto error;
}
}
@@ -21684,7 +21557,7 @@ test_link_iterate_0_links(void)
if ((group_id = H5Gcreate2(container_group, LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -21699,7 +21572,7 @@ test_link_iterate_0_links(void)
/* Test basic link iteration capability using both index types and both index orders */
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_0_links_cb, NULL) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in increasing order failed\n");
+ printf(" H5Literate2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_0_links_name_increasing);
}
@@ -21713,7 +21586,7 @@ test_link_iterate_0_links(void)
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL) < 0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type name in decreasing order failed\n");
+ printf(" H5Literate2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_0_links_name_decreasing);
}
@@ -21727,14 +21600,14 @@ test_link_iterate_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_0_links_creation_increasing);
}
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_0_links_cb, NULL) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_0_links_creation_increasing);
}
@@ -21748,14 +21621,14 @@ test_link_iterate_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_0_links_creation_decreasing);
}
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL) <
0) {
H5_FAILED();
- HDprintf(" H5Literate2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_0_links_creation_decreasing);
}
@@ -21771,7 +21644,7 @@ test_link_iterate_0_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, NULL, link_iter_0_links_cb, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Literate_by_name_0_links_name_increasing);
}
@@ -21787,7 +21660,7 @@ test_link_iterate_0_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_0_links_name_decreasing);
}
@@ -21801,7 +21674,7 @@ test_link_iterate_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_0_links_creation_increasing);
}
@@ -21809,7 +21682,7 @@ test_link_iterate_0_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_0_links_cb, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Literate_by_name_0_links_creation_increasing);
}
@@ -21823,7 +21696,7 @@ test_link_iterate_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_0_links_creation_decreasing);
}
@@ -21831,7 +21704,7 @@ test_link_iterate_0_links(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Literate_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Literate_by_name_0_links_creation_decreasing);
}
@@ -21896,8 +21769,8 @@ test_link_visit_hard_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or link iterate aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, or link iterate aren't "
+ "supported with this connector\n");
return 0;
}
@@ -21905,26 +21778,26 @@ test_link_visit_hard_links_no_cycles(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -21932,8 +21805,8 @@ test_link_visit_hard_links_no_cycles(void)
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -21955,7 +21828,7 @@ test_link_visit_hard_links_no_cycles(void)
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", grp_name);
+ printf(" couldn't create subgroup '%s'\n", grp_name);
goto error;
}
@@ -21970,33 +21843,33 @@ test_link_visit_hard_links_no_cycles(void)
if ((dset_id = H5Dcreate2(subgroup_id, dset_name, dset_dtype, dset_dspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", dset_name);
+ printf(" couldn't create hard link '%s'\n", dset_name);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(subgroup_id, dset_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", dset_name);
+ printf(" couldn't determine if link '%s' exists\n", dset_name);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", dset_name);
+ printf(" link '%s' did not exist\n", dset_name);
goto error;
}
if (H5Dclose(dset_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close dataset '%s'\n", dset_name);
+ printf(" couldn't close dataset '%s'\n", dset_name);
goto error;
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close subgroup '%s'\n", grp_name);
+ printf(" couldn't close subgroup '%s'\n", grp_name);
goto error;
}
}
@@ -22020,13 +21893,13 @@ test_link_visit_hard_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_hard_links_no_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_increasing);
}
if (i != LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_increasing);
}
@@ -22043,13 +21916,13 @@ test_link_visit_hard_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_hard_links_no_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_decreasing);
}
@@ -22063,7 +21936,7 @@ test_link_visit_hard_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_no_cycles_link_creation_increasing);
}
@@ -22073,13 +21946,13 @@ test_link_visit_hard_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_hard_links_no_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_increasing);
}
@@ -22093,7 +21966,7 @@ test_link_visit_hard_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_no_cycles_link_creation_decreasing);
}
@@ -22103,13 +21976,13 @@ test_link_visit_hard_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_hard_links_no_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_decreasing);
}
@@ -22128,13 +22001,13 @@ test_link_visit_hard_links_no_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, link_visit_hard_links_no_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_increasing);
}
if (i != LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_increasing);
}
@@ -22153,13 +22026,13 @@ test_link_visit_hard_links_no_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, link_visit_hard_links_no_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_decreasing);
}
@@ -22173,7 +22046,7 @@ test_link_visit_hard_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
@@ -22185,13 +22058,13 @@ test_link_visit_hard_links_no_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_hard_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
@@ -22205,7 +22078,7 @@ test_link_visit_hard_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
@@ -22217,13 +22090,13 @@ test_link_visit_hard_links_no_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_hard_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
@@ -22294,8 +22167,8 @@ test_link_visit_soft_links_no_cycles(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, soft link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -22303,26 +22176,26 @@ test_link_visit_soft_links_no_cycles(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -22330,8 +22203,8 @@ test_link_visit_soft_links_no_cycles(void)
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -22346,7 +22219,7 @@ test_link_visit_soft_links_no_cycles(void)
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", grp_name);
+ printf(" couldn't create subgroup '%s'\n", grp_name);
goto error;
}
@@ -22364,27 +22237,27 @@ test_link_visit_soft_links_no_cycles(void)
if (H5Lcreate_soft(link_target, subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", link_name);
+ printf(" couldn't create soft link '%s'\n", link_name);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(subgroup_id, link_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", link_name);
+ printf(" couldn't determine if link '%s' exists\n", link_name);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", link_name);
+ printf(" link '%s' did not exist\n", link_name);
goto error;
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close subgroup '%s'\n", grp_name);
+ printf(" couldn't close subgroup '%s'\n", grp_name);
goto error;
}
}
@@ -22408,13 +22281,13 @@ test_link_visit_soft_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_soft_links_no_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_increasing);
}
if (i != LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_increasing);
}
@@ -22431,13 +22304,13 @@ test_link_visit_soft_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_soft_links_no_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_decreasing);
}
@@ -22451,7 +22324,7 @@ test_link_visit_soft_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_no_cycles_link_creation_increasing);
}
@@ -22461,13 +22334,13 @@ test_link_visit_soft_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_soft_links_no_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_increasing);
}
@@ -22481,7 +22354,7 @@ test_link_visit_soft_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_no_cycles_link_creation_decreasing);
}
@@ -22491,13 +22364,13 @@ test_link_visit_soft_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_soft_links_no_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_decreasing);
}
@@ -22515,13 +22388,13 @@ test_link_visit_soft_links_no_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, link_visit_soft_links_no_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_increasing);
}
if (i != LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_increasing);
}
@@ -22540,13 +22413,13 @@ test_link_visit_soft_links_no_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, link_visit_soft_links_no_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_decreasing);
}
@@ -22560,7 +22433,7 @@ test_link_visit_soft_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
@@ -22572,13 +22445,13 @@ test_link_visit_soft_links_no_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_soft_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
@@ -22592,7 +22465,7 @@ test_link_visit_soft_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
@@ -22604,13 +22477,13 @@ test_link_visit_soft_links_no_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_soft_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
@@ -22675,8 +22548,8 @@ test_link_visit_external_links_no_cycles(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, external link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -22686,7 +22559,7 @@ test_link_visit_external_links_no_cycles(void)
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
@@ -22695,26 +22568,26 @@ test_link_visit_external_links_no_cycles(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -22722,8 +22595,8 @@ test_link_visit_external_links_no_cycles(void)
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -22738,7 +22611,7 @@ test_link_visit_external_links_no_cycles(void)
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", grp_name);
+ printf(" couldn't create subgroup '%s'\n", grp_name);
goto error;
}
@@ -22753,27 +22626,27 @@ test_link_visit_external_links_no_cycles(void)
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", link_name);
+ printf(" couldn't create external link '%s'\n", link_name);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(subgroup_id, link_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", link_name);
+ printf(" couldn't determine if link '%s' exists\n", link_name);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", link_name);
+ printf(" link '%s' did not exist\n", link_name);
goto error;
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close subgroup '%s'\n", grp_name);
+ printf(" couldn't close subgroup '%s'\n", grp_name);
goto error;
}
}
@@ -22798,13 +22671,13 @@ test_link_visit_external_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_external_links_no_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_increasing);
}
if (i != LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_increasing);
}
@@ -22822,13 +22695,13 @@ test_link_visit_external_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_external_links_no_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_decreasing);
}
@@ -22842,7 +22715,7 @@ test_link_visit_external_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_no_cycles_link_creation_increasing);
}
@@ -22852,13 +22725,13 @@ test_link_visit_external_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_external_links_no_cycles_cb,
&i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_increasing);
}
@@ -22872,7 +22745,7 @@ test_link_visit_external_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_no_cycles_link_creation_decreasing);
}
@@ -22882,13 +22755,13 @@ test_link_visit_external_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_external_links_no_cycles_cb,
&i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_decreasing);
}
@@ -22908,13 +22781,13 @@ test_link_visit_external_links_no_cycles(void)
H5_INDEX_NAME, H5_ITER_INC, link_visit_external_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_increasing);
}
if (i != LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_increasing);
}
@@ -22934,13 +22807,13 @@ test_link_visit_external_links_no_cycles(void)
H5_INDEX_NAME, H5_ITER_DEC, link_visit_external_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_decreasing);
}
@@ -22954,7 +22827,7 @@ test_link_visit_external_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
@@ -22966,13 +22839,13 @@ test_link_visit_external_links_no_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_external_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
@@ -22986,7 +22859,7 @@ test_link_visit_external_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
@@ -22998,13 +22871,13 @@ test_link_visit_external_links_no_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_external_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
@@ -23102,7 +22975,7 @@ test_link_visit_mixed_links_no_cycles(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, link, hard link, soft link, external link, or iterate "
"aren't supported with this connector\n");
return 0;
@@ -23114,7 +22987,7 @@ test_link_visit_mixed_links_no_cycles(void)
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
@@ -23123,26 +22996,26 @@ test_link_visit_mixed_links_no_cycles(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -23150,24 +23023,24 @@ test_link_visit_mixed_links_no_cycles(void)
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME);
goto error;
}
if ((subgroup1 = H5Gcreate2(group_id, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first subgroup '%s'\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2);
+ printf(" couldn't create first subgroup '%s'\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2);
goto error;
}
if ((subgroup2 = H5Gcreate2(group_id, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create second subgroup '%s'\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3);
+ printf(" couldn't create second subgroup '%s'\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3);
goto error;
}
@@ -23181,7 +23054,7 @@ test_link_visit_mixed_links_no_cycles(void)
if ((dset_id = H5Dcreate2(subgroup1, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME, dset_dtype,
fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first dataset '%s'\n", LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME);
+ printf(" couldn't create first dataset '%s'\n", LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME);
}
if (H5Dclose(dset_id) < 0)
@@ -23190,7 +23063,7 @@ test_link_visit_mixed_links_no_cycles(void)
if ((dset_id = H5Dcreate2(subgroup2, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2, dset_dtype,
fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create second dataset '%s'\n", LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME);
+ printf(" couldn't create second dataset '%s'\n", LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME);
}
if (H5Dclose(dset_id) < 0)
@@ -23199,30 +23072,29 @@ test_link_visit_mixed_links_no_cycles(void)
if (H5Lcreate_hard(subgroup1, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME, subgroup1,
LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first hard link '%s'\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1);
+ printf(" couldn't create first hard link '%s'\n", LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1);
goto error;
}
if (H5Lcreate_soft(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME, subgroup1,
LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2);
goto error;
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup2, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3);
goto error;
}
if (H5Lcreate_hard(subgroup2, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2, subgroup2,
LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create second hard link '%s'\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4);
+ printf(" couldn't create second hard link '%s'\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4);
goto error;
}
@@ -23230,56 +23102,56 @@ test_link_visit_mixed_links_no_cycles(void)
if ((link_exists = H5Lexists(subgroup1, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if first link '%s' exists\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1);
+ printf(" couldn't determine if first link '%s' exists\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 1 did not exist\n");
+ printf(" link 1 did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(subgroup1, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if second link '%s' exists\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2);
+ printf(" couldn't determine if second link '%s' exists\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 2 did not exist\n");
+ printf(" link 2 did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if third link '%s' exists\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3);
+ printf(" couldn't determine if third link '%s' exists\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 3 did not exist\n");
+ printf(" link 3 did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if fourth link '%s' exists\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4);
+ printf(" couldn't determine if fourth link '%s' exists\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 4 did not exist\n");
+ printf(" link 4 did not exist\n");
goto error;
}
@@ -23303,13 +23175,13 @@ test_link_visit_mixed_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_mixed_links_no_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_increasing);
}
if (i != LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_increasing);
}
@@ -23327,13 +23199,13 @@ test_link_visit_mixed_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_mixed_links_no_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_name_decreasing);
}
@@ -23347,7 +23219,7 @@ test_link_visit_mixed_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_no_cycles_link_creation_increasing);
}
@@ -23357,13 +23229,13 @@ test_link_visit_mixed_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_mixed_links_no_cycles_cb,
&i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_increasing);
}
@@ -23377,7 +23249,7 @@ test_link_visit_mixed_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_no_cycles_link_creation_decreasing);
}
@@ -23387,13 +23259,13 @@ test_link_visit_mixed_links_no_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_mixed_links_no_cycles_cb,
&i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_no_cycles_link_creation_decreasing);
}
@@ -23411,13 +23283,13 @@ test_link_visit_mixed_links_no_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, link_visit_mixed_links_no_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_increasing);
}
if (i != LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_increasing);
}
@@ -23436,13 +23308,13 @@ test_link_visit_mixed_links_no_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, link_visit_mixed_links_no_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_name_decreasing);
}
@@ -23456,7 +23328,7 @@ test_link_visit_mixed_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
@@ -23468,13 +23340,13 @@ test_link_visit_mixed_links_no_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_mixed_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_increasing);
}
@@ -23488,7 +23360,7 @@ test_link_visit_mixed_links_no_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
@@ -23500,13 +23372,13 @@ test_link_visit_mixed_links_no_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_mixed_links_no_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
}
@@ -23581,8 +23453,8 @@ test_link_visit_hard_links_cycles(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, hard link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, hard link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -23590,26 +23462,26 @@ test_link_visit_hard_links_cycles(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -23617,8 +23489,8 @@ test_link_visit_hard_links_cycles(void)
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_HARD_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -23633,7 +23505,7 @@ test_link_visit_hard_links_cycles(void)
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", grp_name);
+ printf(" couldn't create subgroup '%s'\n", grp_name);
goto error;
}
@@ -23647,27 +23519,27 @@ test_link_visit_hard_links_cycles(void)
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create hard link '%s'\n", link_name);
+ printf(" couldn't create hard link '%s'\n", link_name);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(subgroup_id, link_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", link_name);
+ printf(" couldn't determine if link '%s' exists\n", link_name);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", link_name);
+ printf(" link '%s' did not exist\n", link_name);
goto error;
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close subgroup '%s'\n", grp_name);
+ printf(" couldn't close subgroup '%s'\n", grp_name);
goto error;
}
}
@@ -23691,13 +23563,13 @@ test_link_visit_hard_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_hard_links_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_name_increasing);
}
if (i != LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_name_increasing);
}
@@ -23714,13 +23586,13 @@ test_link_visit_hard_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_hard_links_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_name_decreasing);
}
@@ -23734,7 +23606,7 @@ test_link_visit_hard_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_cycles_link_creation_increasing);
}
@@ -23744,13 +23616,13 @@ test_link_visit_hard_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_hard_links_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_creation_increasing);
}
@@ -23764,7 +23636,7 @@ test_link_visit_hard_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_cycles_link_creation_decreasing);
}
@@ -23774,13 +23646,13 @@ test_link_visit_hard_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_hard_links_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_creation_decreasing);
}
@@ -23798,13 +23670,13 @@ test_link_visit_hard_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, link_visit_hard_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_increasing);
}
if (i != LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_increasing);
}
@@ -23823,13 +23695,13 @@ test_link_visit_hard_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, link_visit_hard_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_decreasing);
}
@@ -23843,7 +23715,7 @@ test_link_visit_hard_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_increasing);
}
@@ -23854,13 +23726,13 @@ test_link_visit_hard_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_hard_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_increasing);
}
@@ -23874,7 +23746,7 @@ test_link_visit_hard_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
@@ -23885,13 +23757,13 @@ test_link_visit_hard_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_hard_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
@@ -23954,8 +23826,8 @@ test_link_visit_soft_links_cycles(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, soft link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -23963,26 +23835,26 @@ test_link_visit_soft_links_cycles(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -23990,8 +23862,8 @@ test_link_visit_soft_links_cycles(void)
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -24006,7 +23878,7 @@ test_link_visit_soft_links_cycles(void)
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", grp_name);
+ printf(" couldn't create subgroup '%s'\n", grp_name);
goto error;
}
@@ -24025,27 +23897,27 @@ test_link_visit_soft_links_cycles(void)
if (H5Lcreate_soft(link_target, subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", link_name);
+ printf(" couldn't create soft link '%s'\n", link_name);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(subgroup_id, link_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", link_name);
+ printf(" couldn't determine if link '%s' exists\n", link_name);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", link_name);
+ printf(" link '%s' did not exist\n", link_name);
goto error;
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close subgroup '%s'\n", grp_name);
+ printf(" couldn't close subgroup '%s'\n", grp_name);
goto error;
}
}
@@ -24069,13 +23941,13 @@ test_link_visit_soft_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_soft_links_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_name_increasing);
}
if (i != LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_name_increasing);
}
@@ -24092,13 +23964,13 @@ test_link_visit_soft_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_soft_links_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_name_decreasing);
}
@@ -24112,7 +23984,7 @@ test_link_visit_soft_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_cycles_link_creation_increasing);
}
@@ -24122,13 +23994,13 @@ test_link_visit_soft_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_soft_links_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_creation_increasing);
}
@@ -24142,7 +24014,7 @@ test_link_visit_soft_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_cycles_link_creation_decreasing);
}
@@ -24152,13 +24024,13 @@ test_link_visit_soft_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_soft_links_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_creation_decreasing);
}
@@ -24177,13 +24049,13 @@ test_link_visit_soft_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, link_visit_soft_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_increasing);
}
if (i != LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_increasing);
}
@@ -24202,13 +24074,13 @@ test_link_visit_soft_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, link_visit_soft_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_decreasing);
}
@@ -24222,7 +24094,7 @@ test_link_visit_soft_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_increasing);
}
@@ -24233,13 +24105,13 @@ test_link_visit_soft_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_soft_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_increasing);
}
@@ -24253,7 +24125,7 @@ test_link_visit_soft_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
@@ -24264,13 +24136,13 @@ test_link_visit_soft_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_soft_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
@@ -24334,8 +24206,8 @@ test_link_visit_external_links_cycles(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, external link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -24343,26 +24215,26 @@ test_link_visit_external_links_cycles(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -24370,8 +24242,8 @@ test_link_visit_external_links_cycles(void)
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME);
goto error;
}
@@ -24386,7 +24258,7 @@ test_link_visit_external_links_cycles(void)
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup '%s'\n", grp_name);
+ printf(" couldn't create subgroup '%s'\n", grp_name);
goto error;
}
@@ -24406,27 +24278,27 @@ test_link_visit_external_links_cycles(void)
if (H5Lcreate_external(H5_api_test_filename, link_target_obj, subgroup_id, link_name, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", link_name);
+ printf(" couldn't create external link '%s'\n", link_name);
goto error;
}
/* Verify the link has been created */
if ((link_exists = H5Lexists(subgroup_id, link_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' exists\n", link_name);
+ printf(" couldn't determine if link '%s' exists\n", link_name);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link '%s' did not exist\n", link_name);
+ printf(" link '%s' did not exist\n", link_name);
goto error;
}
}
if (H5Gclose(subgroup_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close subgroup '%s'\n", grp_name);
+ printf(" couldn't close subgroup '%s'\n", grp_name);
goto error;
}
}
@@ -24451,13 +24323,13 @@ test_link_visit_external_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_external_links_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_name_increasing);
}
if (i != LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_name_increasing);
}
@@ -24475,13 +24347,13 @@ test_link_visit_external_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_external_links_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_name_decreasing);
}
@@ -24495,7 +24367,7 @@ test_link_visit_external_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_cycles_link_creation_increasing);
}
@@ -24505,13 +24377,13 @@ test_link_visit_external_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_external_links_cycles_cb,
&i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_creation_increasing);
}
@@ -24525,7 +24397,7 @@ test_link_visit_external_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_cycles_link_creation_decreasing);
}
@@ -24535,13 +24407,13 @@ test_link_visit_external_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_external_links_cycles_cb,
&i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_creation_decreasing);
}
@@ -24560,13 +24432,13 @@ test_link_visit_external_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, link_visit_external_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_increasing);
}
if (i != LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_increasing);
}
@@ -24585,13 +24457,13 @@ test_link_visit_external_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, link_visit_external_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_decreasing);
}
@@ -24605,7 +24477,7 @@ test_link_visit_external_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_increasing);
}
@@ -24617,13 +24489,13 @@ test_link_visit_external_links_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_external_links_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_increasing);
}
@@ -24637,7 +24509,7 @@ test_link_visit_external_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
@@ -24649,13 +24521,13 @@ test_link_visit_external_links_cycles(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_external_links_cycles_cb, &i,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
@@ -24744,9 +24616,8 @@ test_link_visit_mixed_links_cycles(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, link, hard link, soft link, external link, iterate, "
- "or user defined link aren't supported with this connector\n");
+ printf(" API functions for basic file, group, link, hard link, soft link, external link, iterate, "
+ "or user defined link aren't supported with this connector\n");
return 0;
}
@@ -24756,7 +24627,7 @@ test_link_visit_mixed_links_cycles(void)
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
@@ -24765,26 +24636,26 @@ test_link_visit_mixed_links_cycles(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -24792,31 +24663,30 @@ test_link_visit_mixed_links_cycles(void)
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME);
goto error;
}
if ((subgroup1 = H5Gcreate2(group_id, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first subgroup '%s'\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2);
+ printf(" couldn't create first subgroup '%s'\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2);
goto error;
}
if ((subgroup2 = H5Gcreate2(group_id, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create second subgroup '%s'\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3);
+ printf(" couldn't create second subgroup '%s'\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3);
goto error;
}
if (H5Lcreate_hard(group_id, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2, subgroup1,
LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first hard link '%s'\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1);
+ printf(" couldn't create first hard link '%s'\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1);
goto error;
}
@@ -24825,74 +24695,74 @@ test_link_visit_mixed_links_cycles(void)
subgroup1, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2);
goto error;
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup2, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3);
goto error;
}
if (H5Lcreate_hard(group_id, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3, subgroup2,
LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create second hard link '%s'\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4);
+ printf(" couldn't create second hard link '%s'\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4);
goto error;
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup1, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if first link '%s' exists\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1);
+ printf(" couldn't determine if first link '%s' exists\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" first link '%s' did not exist\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1);
+ printf(" first link '%s' did not exist\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1);
goto error;
}
if ((link_exists = H5Lexists(subgroup1, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if second link '%s' exists\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2);
+ printf(" couldn't determine if second link '%s' exists\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" second link '%s' did not exist\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2);
+ printf(" second link '%s' did not exist\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2);
goto error;
}
if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if third link '%s' exists\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3);
+ printf(" couldn't determine if third link '%s' exists\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" third link '%s' did not exist\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3);
+ printf(" third link '%s' did not exist\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3);
goto error;
}
if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if fourth link '%s' exists\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4);
+ printf(" couldn't determine if fourth link '%s' exists\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" fourth link '%s' did not exist\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4);
+ printf(" fourth link '%s' did not exist\n", LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4);
goto error;
}
@@ -24915,13 +24785,13 @@ test_link_visit_mixed_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_mixed_links_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_name_increasing);
}
if (i != LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_name_increasing);
}
@@ -24938,13 +24808,13 @@ test_link_visit_mixed_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_mixed_links_cycles_cb, &i) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_name_decreasing);
}
@@ -24958,7 +24828,7 @@ test_link_visit_mixed_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_cycles_link_creation_increasing);
}
@@ -24968,13 +24838,13 @@ test_link_visit_mixed_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_mixed_links_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_creation_increasing);
}
@@ -24988,7 +24858,7 @@ test_link_visit_mixed_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_cycles_link_creation_decreasing);
}
@@ -24998,13 +24868,13 @@ test_link_visit_mixed_links_cycles(void)
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_mixed_links_cycles_cb, &i) <
0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_cycles_link_creation_decreasing);
}
@@ -25022,13 +24892,13 @@ test_link_visit_mixed_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, link_visit_mixed_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_increasing);
}
if (i != LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_increasing);
}
@@ -25047,13 +24917,13 @@ test_link_visit_mixed_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, link_visit_mixed_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_decreasing);
}
if (i != 2 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_name_decreasing);
}
@@ -25067,7 +24937,7 @@ test_link_visit_mixed_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_increasing);
}
@@ -25078,13 +24948,13 @@ test_link_visit_mixed_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_mixed_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_increasing);
}
if (i != 3 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_increasing);
}
@@ -25098,7 +24968,7 @@ test_link_visit_mixed_links_cycles(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
@@ -25109,13 +24979,13 @@ test_link_visit_mixed_links_cycles(void)
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_mixed_links_cycles_cb, &i, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
if (i != 4 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS) {
H5_FAILED();
- HDprintf(" some links were not visited!\n");
+ printf(" some links were not visited!\n");
PART_ERROR(H5Lvisit_by_name_cycles_link_creation_decreasing);
}
@@ -25183,8 +25053,8 @@ test_link_visit_invalid_params(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, link, external link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -25194,7 +25064,7 @@ test_link_visit_invalid_params(void)
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
+ printf(" couldn't create file '%s' for external link to reference\n", ext_link_filename);
goto error;
}
@@ -25203,35 +25073,34 @@ test_link_visit_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- LINK_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME);
goto error;
}
if ((subgroup1 = H5Gcreate2(group_id, LINK_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME2, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first subgroup '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME2);
+ printf(" couldn't create first subgroup '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME2);
goto error;
}
if ((subgroup2 = H5Gcreate2(group_id, LINK_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME3, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create second subgroup '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME3);
+ printf(" couldn't create second subgroup '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME3);
goto error;
}
@@ -25245,7 +25114,7 @@ test_link_visit_invalid_params(void)
if ((dset_id = H5Dcreate2(subgroup1, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first dataset '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME);
+ printf(" couldn't create first dataset '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME);
}
if (H5Dclose(dset_id) < 0)
@@ -25254,7 +25123,7 @@ test_link_visit_invalid_params(void)
if ((dset_id = H5Dcreate2(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create second dataset '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME);
+ printf(" couldn't create second dataset '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME);
}
if (H5Dclose(dset_id) < 0)
@@ -25263,79 +25132,79 @@ test_link_visit_invalid_params(void)
if (H5Lcreate_hard(subgroup1, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, subgroup1,
LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME1, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create first hard link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME1);
+ printf(" couldn't create first hard link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME1);
goto error;
}
if (H5Lcreate_soft(LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, subgroup1,
LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME2);
goto error;
}
if (H5Lcreate_external(ext_link_filename, "/", subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create external link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3);
+ printf(" couldn't create external link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3);
goto error;
}
if (H5Lcreate_hard(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, subgroup2,
LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create second hard link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4);
+ printf(" couldn't create second hard link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4);
goto error;
}
/* Verify the links have been created */
if ((link_exists = H5Lexists(subgroup1, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if first link '%s' exists\n",
- LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME1);
+ printf(" couldn't determine if first link '%s' exists\n",
+ LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME1);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 1 did not exist\n");
+ printf(" link 1 did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(subgroup1, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if second link '%s' exists\n",
- LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME2);
+ printf(" couldn't determine if second link '%s' exists\n",
+ LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME2);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 2 did not exist\n");
+ printf(" link 2 did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if third link '%s' exists\n",
- LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3);
+ printf(" couldn't determine if third link '%s' exists\n",
+ LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 3 did not exist\n");
+ printf(" link 3 did not exist\n");
goto error;
}
if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if fourth link '%s' exists\n",
- LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4);
+ printf(" couldn't determine if fourth link '%s' exists\n",
+ LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4);
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" link 4 did not exist\n");
+ printf(" link 4 did not exist\n");
goto error;
}
@@ -25356,7 +25225,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 succeeded with an invalid group ID!\n");
+ printf(" H5Lvisit2 succeeded with an invalid group ID!\n");
PART_ERROR(H5Lvisit_invalid_grp_id);
}
@@ -25377,7 +25246,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Lvisit2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Lvisit_invalid_index_type);
}
@@ -25389,7 +25258,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Lvisit2 succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Lvisit_invalid_index_type);
}
@@ -25410,7 +25279,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
+ printf(" H5Lvisit2 succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Lvisit_invalid_iter_order);
}
@@ -25422,7 +25291,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Lvisit2 succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Lvisit_invalid_iter_order);
}
@@ -25445,7 +25314,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 succeeded with an invalid location ID!\n");
+ printf(" H5Lvisit_by_name2 succeeded with an invalid location ID!\n");
PART_ERROR(H5Lvisit_by_name_invalid_loc_id);
}
@@ -25466,7 +25335,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 succeeded with a NULL group name!\n");
+ printf(" H5Lvisit_by_name2 succeeded with a NULL group name!\n");
PART_ERROR(H5Lvisit_by_name_invalid_grp_name);
}
@@ -25479,7 +25348,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 succeeded with an invalid group name of ''!\n");
+ printf(" H5Lvisit_by_name2 succeeded with an invalid group name of ''!\n");
PART_ERROR(H5Lvisit_by_name_invalid_grp_name);
}
@@ -25501,7 +25370,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Lvisit_by_name2 succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Lvisit_by_name_invalid_index_type);
}
@@ -25515,7 +25384,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Lvisit_by_name2 succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Lvisit_by_name_invalid_index_type);
}
@@ -25537,8 +25406,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(
- " H5Lvisit_by_name2 succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
+ printf(" H5Lvisit_by_name2 succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Lvisit_by_name_invalid_iter_order);
}
@@ -25552,7 +25420,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Lvisit_by_name2 succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Lvisit_by_name_invalid_iter_order);
}
@@ -25574,7 +25442,7 @@ test_link_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 succeeded with an invalid LAPL!\n");
+ printf(" H5Lvisit_by_name2 succeeded with an invalid LAPL!\n");
PART_ERROR(H5Lvisit_by_name_invalid_lapl);
}
@@ -25640,8 +25508,8 @@ test_link_visit_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or link iterate aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, group, or link iterate aren't supported "
+ "with this connector\n");
return 0;
}
@@ -25649,26 +25517,26 @@ test_link_visit_0_links(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", LINK_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -25676,7 +25544,7 @@ test_link_visit_0_links(void)
if ((group_id = H5Gcreate2(container_group, LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -25690,7 +25558,7 @@ test_link_visit_0_links(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_0_links_cb, NULL) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_0_links_name_increasing);
}
@@ -25704,7 +25572,7 @@ test_link_visit_0_links(void)
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_0_links_cb, NULL) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_0_links_name_decreasing);
}
@@ -25718,13 +25586,13 @@ test_link_visit_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_0_links_creation_increasing);
}
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_0_links_cb, NULL) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_0_links_creation_increasing);
}
@@ -25738,13 +25606,13 @@ test_link_visit_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_0_links_creation_decreasing);
}
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_0_links_cb, NULL) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_0_links_creation_decreasing);
}
@@ -25759,7 +25627,7 @@ test_link_visit_0_links(void)
if (H5Lvisit_by_name2(file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_INC, link_visit_0_links_cb, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_0_links_name_increasing);
}
@@ -25774,7 +25642,7 @@ test_link_visit_0_links(void)
if (H5Lvisit_by_name2(file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, link_visit_0_links_cb, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type name in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_0_links_name_decreasing);
}
@@ -25788,7 +25656,7 @@ test_link_visit_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_0_links_creation_increasing);
}
@@ -25796,7 +25664,7 @@ test_link_visit_0_links(void)
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_0_links_cb, NULL,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in increasing order failed\n");
PART_ERROR(H5Lvisit_by_name_0_links_creation_increasing);
}
@@ -25810,7 +25678,7 @@ test_link_visit_0_links(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Lvisit_by_name_0_links_creation_decreasing);
}
@@ -25818,7 +25686,7 @@ test_link_visit_0_links(void)
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_0_links_cb, NULL,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
+ printf(" H5Lvisit_by_name2 by index type creation order in decreasing order failed\n");
PART_ERROR(H5Lvisit_by_name_0_links_creation_decreasing);
}
@@ -25875,7 +25743,7 @@ link_iter_hard_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
if (H5L_TYPE_HARD != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
goto done;
}
@@ -25905,7 +25773,7 @@ link_iter_hard_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
}
if (HDstrncmp(name, expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -25935,7 +25803,7 @@ link_iter_soft_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
if (H5L_TYPE_SOFT != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_SOFT!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_SOFT!\n", name);
goto done;
}
@@ -25965,7 +25833,7 @@ link_iter_soft_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
}
if (HDstrncmp(name, expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -25992,8 +25860,8 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for external links aren't supported with this "
- "connector\n");
+ printf(" API functions for external links aren't supported with this "
+ "connector\n");
return 1;
}
@@ -26002,7 +25870,7 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n", name);
goto done;
}
@@ -26032,7 +25900,7 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t
}
if (HDstrncmp(name, expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -26057,8 +25925,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for external or user-defined link aren't supported with this "
- "connector\n");
+ printf(" API functions for external or user-defined link aren't supported with this "
+ "connector\n");
return 1;
}
@@ -26069,7 +25937,7 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
(counter_val == 1 || counter_val == 4 || counter_val == 6 || counter_val == 11)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
}
goto done;
@@ -26079,7 +25947,7 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
(counter_val == 2 || counter_val == 3 || counter_val == 7 || counter_val == 10)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_SOFT!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_SOFT!\n", name);
}
goto done;
@@ -26089,13 +25957,13 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
(counter_val == 0 || counter_val == 5 || counter_val == 8 || counter_val == 9)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n", name);
}
goto done;
}
- HDprintf(" link name '%s' didn't match known names or came in an incorrect order\n", name);
+ printf(" link name '%s' didn't match known names or came in an incorrect order\n", name);
ret_val = -1;
@@ -26146,8 +26014,8 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for external or user-defined link aren't supported with this "
- "connector\n");
+ printf(" API functions for external or user-defined link aren't supported with this "
+ "connector\n");
return 1;
}
@@ -26163,7 +26031,7 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1)) {
if (H5L_TYPE_HARD != info->type) {
H5_FAILED();
- HDprintf(" link type did not match\n");
+ printf(" link type did not match\n");
goto error;
}
}
@@ -26171,7 +26039,7 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
if (H5L_TYPE_SOFT != info->type) {
H5_FAILED();
- HDprintf(" link type did not match\n");
+ printf(" link type did not match\n");
goto error;
}
}
@@ -26179,13 +26047,13 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1)) {
if (H5L_TYPE_EXTERNAL != info->type) {
H5_FAILED();
- HDprintf(" link type did not match\n");
+ printf(" link type did not match\n");
goto error;
}
}
else {
H5_FAILED();
- HDprintf(" link name didn't match known names\n");
+ printf(" link name didn't match known names\n");
goto error;
}
@@ -26217,7 +26085,7 @@ link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
if (H5L_TYPE_HARD != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
goto done;
}
@@ -26287,7 +26155,7 @@ link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
}
if (HDstrncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -26324,14 +26192,14 @@ link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
if (is_subgroup_link) {
if (H5L_TYPE_HARD != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
goto done;
}
}
else {
if (H5L_TYPE_SOFT != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_SOFT!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_SOFT!\n", name);
goto done;
}
}
@@ -26400,7 +26268,7 @@ link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
}
if (HDstrncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -26431,8 +26299,8 @@ link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for external links aren't supported with this "
- "connector\n");
+ printf(" API functions for external links aren't supported with this "
+ "connector\n");
return 1;
}
@@ -26445,14 +26313,14 @@ link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H
if (is_subgroup_link) {
if (H5L_TYPE_HARD != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
goto done;
}
}
else {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n", name);
goto done;
}
}
@@ -26521,7 +26389,7 @@ link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H
}
if (HDstrncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -26546,8 +26414,8 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for external or user-defined link aren't supported with this "
- "connector\n");
+ printf(" API functions for external or user-defined link aren't supported with this "
+ "connector\n");
return 1;
}
@@ -26563,9 +26431,9 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
(counter_val == 2 || counter_val == 14 || counter_val == 18 || counter_val == 30)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1);
}
goto done;
@@ -26579,9 +26447,9 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
(counter_val == 3 || counter_val == 13 || counter_val == 19 || counter_val == 29)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_SOFT!\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2);
+ printf(" link type for link '%s' was not H5L_TYPE_SOFT!\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2);
}
goto done;
@@ -26595,9 +26463,9 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
(counter_val == 6 || counter_val == 10 || counter_val == 22 || counter_val == 26)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3);
+ printf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3);
}
goto done;
@@ -26611,9 +26479,9 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
(counter_val == 7 || counter_val == 9 || counter_val == 23 || counter_val == 25)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4);
}
goto done;
@@ -26627,9 +26495,9 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
(counter_val == 1 || counter_val == 15 || counter_val == 17 || counter_val == 31)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME);
}
goto done;
@@ -26643,9 +26511,9 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
(counter_val == 5 || counter_val == 11 || counter_val == 21 || counter_val == 27)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2);
}
goto done;
@@ -26655,8 +26523,8 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
(counter_val == 0 || counter_val == 12 || counter_val == 16 || counter_val == 28)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2);
}
goto done;
@@ -26666,14 +26534,14 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
(counter_val == 4 || counter_val == 8 || counter_val == 20 || counter_val == 24)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3);
}
goto done;
}
- HDprintf(" link name '%s' didn't match known names or came in an incorrect order\n", name);
+ printf(" link name '%s' didn't match known names or came in an incorrect order\n", name);
ret_val = -1;
@@ -26705,7 +26573,7 @@ link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
if (H5L_TYPE_HARD != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
goto done;
}
@@ -26775,7 +26643,7 @@ link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
}
if (HDstrncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -26812,14 +26680,14 @@ link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
if (is_subgroup_link) {
if (H5L_TYPE_HARD != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
goto done;
}
}
else {
if (H5L_TYPE_SOFT != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_SOFT!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_SOFT!\n", name);
goto done;
}
}
@@ -26888,7 +26756,7 @@ link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
}
if (HDstrncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -26918,8 +26786,8 @@ link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for external links aren't supported with this "
- "connector\n");
+ printf(" API functions for external links aren't supported with this "
+ "connector\n");
return 1;
}
@@ -26932,14 +26800,14 @@ link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_
if (is_subgroup_link) {
if (H5L_TYPE_HARD != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n", name);
goto done;
}
}
else {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = H5_ITER_ERROR;
- HDprintf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n", name);
+ printf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n", name);
goto done;
}
}
@@ -27008,7 +26876,7 @@ link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_
}
if (HDstrncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
}
@@ -27033,8 +26901,8 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for external or user-defined link aren't supported with this "
- "connector\n");
+ printf(" API functions for external or user-defined link aren't supported with this "
+ "connector\n");
return 1;
}
@@ -27050,9 +26918,9 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
(counter_val == 1 || counter_val == 11 || counter_val == 13 || counter_val == 23)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1);
}
goto done;
@@ -27066,9 +26934,9 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
(counter_val == 2 || counter_val == 10 || counter_val == 14 || counter_val == 22)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_SOFT!\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2);
+ printf(" link type for link '%s' was not H5L_TYPE_SOFT!\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2);
}
goto done;
@@ -27082,9 +26950,9 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
(counter_val == 4 || counter_val == 8 || counter_val == 16 || counter_val == 20)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3);
+ printf(" link type for link '%s' was not H5L_TYPE_EXTERNAL!\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3);
}
goto done;
@@ -27098,9 +26966,9 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
(counter_val == 5 || counter_val == 7 || counter_val == 17 || counter_val == 19)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4);
}
goto done;
@@ -27110,8 +26978,8 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
(counter_val == 0 || counter_val == 9 || counter_val == 12 || counter_val == 21)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2);
}
goto done;
@@ -27121,14 +26989,14 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
(counter_val == 3 || counter_val == 6 || counter_val == 15 || counter_val == 18)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
- HDprintf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3);
+ printf(" link type for link '%s' was not H5L_TYPE_HARD!\n",
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3);
}
goto done;
}
- HDprintf(" link name '%s' didn't match known names or came in an incorrect order\n", name);
+ printf(" link name '%s' didn't match known names or came in an incorrect order\n", name);
ret_val = -1;
@@ -27184,19 +27052,19 @@ H5_api_link_test(void)
size_t i;
int nerrors;
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Link Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Link Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(link_tests); i++) {
nerrors += (*link_tests[i])() ? 1 : 0;
}
- HDprintf("\n");
+ printf("\n");
- HDprintf("Cleaning up testing files\n");
+ printf("Cleaning up testing files\n");
cleanup_files();
return nerrors;
diff --git a/test/API/H5_api_misc_test.c b/test/API/H5_api_misc_test.c
index 256550b..37b98ab 100644
--- a/test/API/H5_api_misc_test.c
+++ b/test/API/H5_api_misc_test.c
@@ -44,20 +44,19 @@ test_open_link_without_leading_slash(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, MISCELLANEOUS_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
@@ -71,7 +70,7 @@ test_open_link_without_leading_slash(void)
if ((dset_id = H5Dcreate2(container_group, OPEN_LINK_WITHOUT_SLASH_DSET_NAME, dset_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset\n");
+ printf(" couldn't create dataset\n");
goto error;
}
@@ -86,20 +85,20 @@ test_open_link_without_leading_slash(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((group_id = H5Gopen2(file_id, "/", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open root group\n");
+ printf(" couldn't open root group\n");
goto error;
}
if ((dset_id = H5Dopen2(group_id, MISCELLANEOUS_TEST_GROUP_NAME "/" OPEN_LINK_WITHOUT_SLASH_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset\n");
+ printf(" couldn't open dataset\n");
goto error;
}
@@ -149,8 +148,8 @@ test_object_creation_by_absolute_path(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, link, or stored datatype aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, link, or stored datatype aren't "
+ "supported with this connector\n");
return 0;
}
@@ -158,13 +157,13 @@ test_object_creation_by_absolute_path(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, MISCELLANEOUS_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
@@ -172,7 +171,7 @@ test_object_creation_by_absolute_path(void)
if ((group_id = H5Gcreate2(container_group, OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_CONTAINER_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group\n");
+ printf(" couldn't create container group\n");
goto error;
}
@@ -181,13 +180,13 @@ test_object_creation_by_absolute_path(void)
"/" OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_CONTAINER_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
goto error;
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" container group didn't exist at the correct location\n");
+ printf(" container group didn't exist at the correct location\n");
goto error;
}
@@ -206,7 +205,7 @@ test_object_creation_by_absolute_path(void)
"/" OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_SUBGROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create subgroup by absolute pathname\n");
+ printf(" couldn't create subgroup by absolute pathname\n");
PART_ERROR(H5Gcreate_using_absolute_path);
}
@@ -216,13 +215,13 @@ test_object_creation_by_absolute_path(void)
"/" OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_SUBGROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5Gcreate_using_absolute_path);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" subgroup didn't exist at the correct location\n");
+ printf(" subgroup didn't exist at the correct location\n");
PART_ERROR(H5Gcreate_using_absolute_path);
}
@@ -238,13 +237,13 @@ test_object_creation_by_absolute_path(void)
if ((fspace_id = generate_random_dataspace(OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_DSET_SPACE_RANK,
NULL, NULL, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" failed to generate dataspace\n");
+ printf(" failed to generate dataspace\n");
PART_ERROR(H5Dcreate_using_absolute_path);
}
if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" failed to generate datatype\n");
+ printf(" failed to generate datatype\n");
PART_ERROR(H5Dcreate_using_absolute_path);
}
@@ -255,7 +254,7 @@ test_object_creation_by_absolute_path(void)
"/" OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_DSET_NAME,
dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset\n");
+ printf(" couldn't create dataset\n");
PART_ERROR(H5Dcreate_using_absolute_path);
}
@@ -266,13 +265,13 @@ test_object_creation_by_absolute_path(void)
"/" OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5Dcreate_using_absolute_path);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" dataset didn't exist at the correct location\n");
+ printf(" dataset didn't exist at the correct location\n");
PART_ERROR(H5Dcreate_using_absolute_path);
}
@@ -287,7 +286,7 @@ test_object_creation_by_absolute_path(void)
/* Try to create a committed datatype in the same fashion as the preceding dataset */
if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
PART_ERROR(H5Tcommit_using_absolute_path);
}
@@ -298,7 +297,7 @@ test_object_creation_by_absolute_path(void)
"/" OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_DTYPE_NAME,
dtype_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype\n");
+ printf(" couldn't commit datatype\n");
PART_ERROR(H5Tcommit_using_absolute_path);
}
@@ -309,13 +308,13 @@ test_object_creation_by_absolute_path(void)
"/" OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_DTYPE_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5Tcommit_using_absolute_path);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" datatype didn't exist at the correct location\n");
+ printf(" datatype didn't exist at the correct location\n");
PART_ERROR(H5Tcommit_using_absolute_path);
}
@@ -384,8 +383,8 @@ test_absolute_vs_relative_path(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, dataset, or link aren't supported with this "
+ "connector\n");
return 0;
}
@@ -393,13 +392,13 @@ test_absolute_vs_relative_path(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, MISCELLANEOUS_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
@@ -407,7 +406,7 @@ test_absolute_vs_relative_path(void)
if ((group_id = H5Gcreate2(container_group, ABSOLUTE_VS_RELATIVE_PATH_TEST_CONTAINER_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container group\n");
+ printf(" couldn't create container group\n");
goto error;
}
@@ -443,7 +442,7 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET1_NAME,
dset_dtype1, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset by absolute path from root\n");
+ printf(" couldn't create dataset by absolute path from root\n");
PART_ERROR(H5Dcreate_absolute_from_root);
}
@@ -453,13 +452,13 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET1_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5Dcreate_absolute_from_root);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" didn't exist at the correct location\n");
+ printf(" didn't exist at the correct location\n");
PART_ERROR(H5Dcreate_absolute_from_root);
}
@@ -479,7 +478,7 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET4_NAME,
dset_dtype4, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset by absolute path from container group\n");
+ printf(" couldn't create dataset by absolute path from container group\n");
PART_ERROR(H5Dcreate_absolute_from_nonroot);
}
@@ -489,13 +488,13 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET4_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5Dcreate_absolute_from_nonroot);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" didn't exist at the correct location\n");
+ printf(" didn't exist at the correct location\n");
PART_ERROR(H5Dcreate_absolute_from_nonroot);
}
@@ -523,7 +522,7 @@ test_absolute_vs_relative_path(void)
if ((dset_id5 = H5Dcreate2(group_id, ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET5_NAME, dset_dtype5,
fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset by relative path from container group\n");
+ printf(" couldn't create dataset by relative path from container group\n");
PART_ERROR(H5Dcreate_relative_from_nonroot);
}
@@ -534,7 +533,7 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET2_NAME,
dset_dtype2, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset by relative path from container group\n");
+ printf(" couldn't create dataset by relative path from container group\n");
PART_ERROR(H5Dcreate_relative_from_nonroot);
}
@@ -544,13 +543,13 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET2_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5Dcreate_relative_from_nonroot);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" didn't exist at the correct location\n");
+ printf(" didn't exist at the correct location\n");
PART_ERROR(H5Dcreate_relative_from_nonroot);
}
@@ -560,13 +559,13 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET5_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5Dcreate_relative_from_nonroot);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" didn't exist at the correct location\n");
+ printf(" didn't exist at the correct location\n");
PART_ERROR(H5Dcreate_relative_from_nonroot);
}
@@ -585,7 +584,7 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET3_NAME,
dset_dtype3, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset by relative path from root with leading '.'\n");
+ printf(" couldn't create dataset by relative path from root with leading '.'\n");
PART_ERROR(H5Dcreate_relative_leading_dot_root);
}
@@ -595,13 +594,13 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET3_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5Dcreate_relative_leading_dot_root);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" didn't exist at the correct location\n");
+ printf(" didn't exist at the correct location\n");
PART_ERROR(H5Dcreate_relative_leading_dot_root);
}
@@ -617,7 +616,7 @@ test_absolute_vs_relative_path(void)
if ((dset_id6 = H5Dcreate2(group_id, "./" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET6_NAME, dset_dtype6,
fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(
+ printf(
" couldn't create dataset by relative path from container group with leading '.'\n");
PART_ERROR(H5Dcreate_relative_leading_dot_nonroot);
}
@@ -628,13 +627,13 @@ test_absolute_vs_relative_path(void)
"/" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET6_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link exists\n");
+ printf(" couldn't determine if link exists\n");
PART_ERROR(H5Dcreate_relative_leading_dot_nonroot);
}
if (!link_exists) {
H5_FAILED();
- HDprintf(" didn't exist at the correct location\n");
+ printf(" didn't exist at the correct location\n");
PART_ERROR(H5Dcreate_relative_leading_dot_nonroot);
}
@@ -729,8 +728,8 @@ test_dot_for_object_name(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or stored datatype aren't supported with "
- "this connector\n");
+ printf(" API functions for basic file, group, dataset, or stored datatype aren't supported with "
+ "this connector\n");
return 0;
}
@@ -738,26 +737,26 @@ test_dot_for_object_name(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, MISCELLANEOUS_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", MISCELLANEOUS_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", MISCELLANEOUS_TEST_GROUP_NAME);
goto error;
}
if ((subgroup_id = H5Gcreate2(container_group, DOT_AS_OBJECT_NAME_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", DOT_AS_OBJECT_NAME_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", DOT_AS_OBJECT_NAME_TEST_SUBGROUP_NAME);
goto error;
}
if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create data space\n");
+ printf(" couldn't create data space\n");
goto error;
}
@@ -778,7 +777,7 @@ test_dot_for_object_name(void)
if (group_id >= 0) {
H5_FAILED();
- HDprintf(" a group was created with '.' as the name!\n");
+ printf(" a group was created with '.' as the name!\n");
PART_ERROR(H5Gcreate_dot_as_name);
}
@@ -800,7 +799,7 @@ test_dot_for_object_name(void)
if (dset_id >= 0) {
H5_FAILED();
- HDprintf(" a dataset was created with '.' as the name!\n");
+ printf(" a dataset was created with '.' as the name!\n");
PART_ERROR(H5Dcreate_dot_as_name);
}
@@ -814,7 +813,7 @@ test_dot_for_object_name(void)
if ((dtype_id = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't copy a native datatype\n");
+ printf(" couldn't copy a native datatype\n");
PART_ERROR(H5Tcommit_dot_as_name);
}
@@ -827,13 +826,13 @@ test_dot_for_object_name(void)
if (ret >= 0) {
H5_FAILED();
- HDprintf(" a named datatype was committed with '.' as the name!\n");
+ printf(" a named datatype was committed with '.' as the name!\n");
PART_ERROR(H5Tcommit_dot_as_name);
}
if (H5Tclose(dtype_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close datatype\n");
+ printf(" failed to close datatype\n");
PART_ERROR(H5Tcommit_dot_as_name);
}
@@ -918,8 +917,7 @@ test_symbols_in_compound_field_name(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -928,20 +926,20 @@ test_symbols_in_compound_field_name(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file\n");
+ printf(" couldn't open file\n");
goto error;
}
if ((container_group = H5Gopen2(file_id, MISCELLANEOUS_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group\n");
+ printf(" couldn't open container group\n");
goto error;
}
if ((group_id = H5Gcreate2(container_group, COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_SUBGROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group\n");
+ printf(" couldn't create container sub-group\n");
goto error;
}
@@ -962,14 +960,14 @@ test_symbols_in_compound_field_name(void)
if ((compound_type = H5Tcreate(H5T_COMPOUND, total_type_size)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create compound datatype\n");
+ printf(" couldn't create compound datatype\n");
goto error;
}
for (i = 0, next_offset = 0; i < COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_NUM_SUBTYPES; i++) {
if (H5Tinsert(compound_type, member_names[i], next_offset, type_pool[i]) < 0) {
H5_FAILED();
- HDprintf(" couldn't insert compound member %zu\n", i);
+ printf(" couldn't insert compound member %zu\n", i);
goto error;
}
@@ -986,7 +984,7 @@ test_symbols_in_compound_field_name(void)
if ((dset_id = H5Dcreate2(group_id, COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_DSET_NAME, compound_type,
fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset\n");
+ printf(" couldn't create dataset\n");
goto error;
}
@@ -996,7 +994,7 @@ test_symbols_in_compound_field_name(void)
if ((dset_id = H5Dopen2(group_id, COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_DSET_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" failed to open dataset\n");
+ printf(" failed to open dataset\n");
goto error;
}
@@ -1044,17 +1042,17 @@ H5_api_misc_test(void)
size_t i;
int nerrors;
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Miscellaneous Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Miscellaneous Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(misc_tests); i++) {
nerrors += (*misc_tests[i])() ? 1 : 0;
}
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/test/API/H5_api_object_test.c b/test/API/H5_api_object_test.c
index 8055ad9..268e65c 100644
--- a/test/API/H5_api_object_test.c
+++ b/test/API/H5_api_object_test.c
@@ -126,27 +126,27 @@ test_open_object(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, dataset, or stored datatype aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, object, dataset, or stored datatype aren't "
+ "supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_OPEN_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", OBJECT_OPEN_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", OBJECT_OPEN_TEST_GROUP_NAME);
goto error;
}
@@ -167,7 +167,7 @@ test_open_object(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_OPEN_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_OPEN_TEST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_OPEN_TEST_GRP_NAME);
PART_ERROR(H5Oopen_group);
}
@@ -179,19 +179,19 @@ test_open_object(void)
if ((group_id2 = H5Oopen(group_id, OBJECT_OPEN_TEST_GRP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group '%s' with H5Oopen\n", OBJECT_OPEN_TEST_GRP_NAME);
+ printf(" couldn't open group '%s' with H5Oopen\n", OBJECT_OPEN_TEST_GRP_NAME);
PART_ERROR(H5Oopen_group);
}
if (H5Iget_type(group_id2) != H5I_GROUP) {
H5_FAILED();
- HDprintf(" ID is not a group\n");
+ printf(" ID is not a group\n");
PART_ERROR(H5Oopen_group);
}
if (H5Gclose(group_id2) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group opened with H5Oopen\n");
+ printf(" couldn't close group opened with H5Oopen\n");
PART_ERROR(H5Oopen_group);
}
@@ -206,7 +206,7 @@ test_open_object(void)
if ((dset_id = H5Dcreate2(group_id, OBJECT_OPEN_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", OBJECT_OPEN_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", OBJECT_OPEN_TEST_DSET_NAME);
PART_ERROR(H5Oopen_dset);
}
@@ -218,19 +218,19 @@ test_open_object(void)
if ((dset_id = H5Oopen(group_id, OBJECT_OPEN_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s' with H5Oopen\n", OBJECT_OPEN_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s' with H5Oopen\n", OBJECT_OPEN_TEST_DSET_NAME);
PART_ERROR(H5Oopen_dset);
}
if (H5Iget_type(dset_id) != H5I_DATASET) {
H5_FAILED();
- HDprintf(" ID is not a dataset\n");
+ printf(" ID is not a dataset\n");
PART_ERROR(H5Oopen_dset);
}
if (H5Dclose(dset_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close dataset opened with H5Oopen\n");
+ printf(" couldn't close dataset opened with H5Oopen\n");
PART_ERROR(H5Oopen_dset);
}
@@ -244,14 +244,14 @@ test_open_object(void)
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype '%s'\n", OBJECT_OPEN_TEST_TYPE_NAME);
+ printf(" couldn't create datatype '%s'\n", OBJECT_OPEN_TEST_TYPE_NAME);
PART_ERROR(H5Oopen_dtype);
}
if (H5Tcommit2(group_id, OBJECT_OPEN_TEST_TYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", OBJECT_OPEN_TEST_TYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", OBJECT_OPEN_TEST_TYPE_NAME);
PART_ERROR(H5Oopen_dtype);
}
@@ -263,19 +263,19 @@ test_open_object(void)
if ((type_id = H5Oopen(group_id, OBJECT_OPEN_TEST_TYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open datatype '%s' with H5Oopen\n", OBJECT_OPEN_TEST_TYPE_NAME);
+ printf(" couldn't open datatype '%s' with H5Oopen\n", OBJECT_OPEN_TEST_TYPE_NAME);
PART_ERROR(H5Oopen_dtype);
}
if (H5Iget_type(type_id) != H5I_DATATYPE) {
H5_FAILED();
- HDprintf(" ID is not a dataset\n");
+ printf(" ID is not a dataset\n");
PART_ERROR(H5Oopen_dtype);
}
if (H5Tclose(type_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close committed datatype opened with H5Oopen\n");
+ printf(" couldn't close committed datatype opened with H5Oopen\n");
PART_ERROR(H5Oopen_dtype);
}
@@ -315,7 +315,7 @@ test_open_object(void)
if ((group_id2 = H5Oopen_by_idx(container_group, OBJECT_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group '%s' with H5Oopen_by_idx\n", OBJECT_OPEN_TEST_GRP_NAME);
+ printf(" couldn't open group '%s' with H5Oopen_by_idx\n", OBJECT_OPEN_TEST_GRP_NAME);
PART_ERROR(H5Oopen_by_idx_group);
}
@@ -330,7 +330,7 @@ test_open_object(void)
if ((dset_id = H5Oopen_by_idx(container_group, OBJECT_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 0, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s' with H5Oopen_by_idx\n", OBJECT_OPEN_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s' with H5Oopen_by_idx\n", OBJECT_OPEN_TEST_DSET_NAME);
PART_ERROR(H5Oopen_by_idx_dset);
}
@@ -345,8 +345,8 @@ test_open_object(void)
if ((type_id = H5Oopen_by_idx(container_group, OBJECT_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, 2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open committed datatype '%s' with H5Oopen_by_idx\n",
- OBJECT_OPEN_TEST_TYPE_NAME);
+ printf(" couldn't open committed datatype '%s' with H5Oopen_by_idx\n",
+ OBJECT_OPEN_TEST_TYPE_NAME);
PART_ERROR(H5Oopen_by_idx_dtype);
}
@@ -434,8 +434,8 @@ test_open_object_invalid_params(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or object aren't supported with "
- "this connector\n");
+ printf(" API functions for basic file, group, or object aren't supported with "
+ "this connector\n");
return 0;
}
@@ -443,26 +443,26 @@ test_open_object_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -470,15 +470,14 @@ test_open_object_invalid_params(void)
if ((group_id = H5Gcreate2(container_group, OBJECT_OPEN_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- OBJECT_OPEN_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", OBJECT_OPEN_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
if ((group_id2 = H5Gcreate2(group_id, OBJECT_OPEN_INVALID_PARAMS_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_OPEN_INVALID_PARAMS_TEST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_OPEN_INVALID_PARAMS_TEST_GRP_NAME);
goto error;
}
@@ -501,7 +500,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen succeeded with an invalid location ID!\n");
+ printf(" H5Oopen succeeded with an invalid location ID!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_invalid_loc_id);
}
@@ -522,7 +521,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen succeeded with a NULL object name!\n");
+ printf(" H5Oopen succeeded with a NULL object name!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_invalid_obj_name);
}
@@ -535,7 +534,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen succeeded with an invalid object name of ''!\n");
+ printf(" H5Oopen succeeded with an invalid object name of ''!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_invalid_obj_name);
}
@@ -556,7 +555,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen succeeded with an invalid LAPL!\n");
+ printf(" H5Oopen succeeded with an invalid LAPL!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_invalid_lapl);
}
@@ -578,7 +577,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen_by_idx succeeded with an invalid location ID!\n");
+ printf(" H5Oopen_by_idx succeeded with an invalid location ID!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_idx_invalid_loc_id);
}
@@ -599,7 +598,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen_by_idx succeeded with a NULL group name!\n");
+ printf(" H5Oopen_by_idx succeeded with a NULL group name!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_idx_invalid_grp_name);
}
@@ -612,7 +611,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen_by_idx succeeded with an invalid group name of ''!\n");
+ printf(" H5Oopen_by_idx succeeded with an invalid group name of ''!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_idx_invalid_grp_name);
}
@@ -634,7 +633,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen_by_idx succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Oopen_by_idx succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_idx_invalid_index_type);
}
@@ -648,7 +647,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen_by_idx succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Oopen_by_idx succeeded with invalid index type H5_INDEX_N!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_idx_invalid_index_type);
}
@@ -670,8 +669,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(
- " H5Oopen_by_idx succeeded with an invalid iteration ordering H5_ITER_UNKNOWN!\n");
+ printf(" H5Oopen_by_idx succeeded with an invalid iteration ordering H5_ITER_UNKNOWN!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_idx_invalid_iter_order);
}
@@ -685,7 +683,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen_by_idx succeeded with an invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Oopen_by_idx succeeded with an invalid iteration ordering H5_ITER_N!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_idx_invalid_iter_order);
}
@@ -707,7 +705,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen_by_idx succeeded with an invalid LAPL!\n");
+ printf(" H5Oopen_by_idx succeeded with an invalid LAPL!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_idx_invalid_lapl);
}
@@ -728,7 +726,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen_by_token succeeded with an invalid location ID!\n");
+ printf(" H5Oopen_by_token succeeded with an invalid location ID!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_token_invalid_loc_id);
}
@@ -749,7 +747,7 @@ test_open_object_invalid_params(void)
if (group_id2 >= 0) {
H5_FAILED();
- HDprintf(" H5Oopen_by_token succeeded with an invalid token!\n");
+ printf(" H5Oopen_by_token succeeded with an invalid token!\n");
H5Gclose(group_id2);
PART_ERROR(H5Oopen_by_token_invalid_token);
}
@@ -812,8 +810,8 @@ test_object_exists(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, dataset, stored datatype or soft link "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, object, dataset, stored datatype or soft link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -821,20 +819,20 @@ test_object_exists(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_EXISTS_TEST_SUBGROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", OBJECT_EXISTS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", OBJECT_EXISTS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -859,25 +857,25 @@ test_object_exists(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_EXISTS_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_EXISTS_TEST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_EXISTS_TEST_GRP_NAME);
PART_ERROR(H5Oexists_by_name_group);
}
if ((object_exists = H5Oexists_by_name(group_id, OBJECT_EXISTS_TEST_GRP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if object '%s' exists\n", OBJECT_EXISTS_TEST_GRP_NAME);
+ printf(" couldn't determine if object '%s' exists\n", OBJECT_EXISTS_TEST_GRP_NAME);
PART_ERROR(H5Oexists_by_name_group);
}
if (!object_exists) {
H5_FAILED();
- HDprintf(" object '%s' didn't exist!\n", OBJECT_EXISTS_TEST_GRP_NAME);
+ printf(" object '%s' didn't exist!\n", OBJECT_EXISTS_TEST_GRP_NAME);
PART_ERROR(H5Oexists_by_name_group);
}
if (H5Gclose(group_id2) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group\n");
+ printf(" couldn't close group\n");
PART_ERROR(H5Oexists_by_name_group);
}
@@ -892,26 +890,26 @@ test_object_exists(void)
if ((dset_id = H5Dcreate2(group_id, OBJECT_EXISTS_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", OBJECT_EXISTS_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", OBJECT_EXISTS_TEST_DSET_NAME);
PART_ERROR(H5Oexists_by_name_dset);
}
if ((object_exists = H5Oexists_by_name(group_id, OBJECT_EXISTS_TEST_DSET_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if object '%s' exists\n", OBJECT_EXISTS_TEST_DSET_NAME);
+ printf(" couldn't determine if object '%s' exists\n", OBJECT_EXISTS_TEST_DSET_NAME);
PART_ERROR(H5Oexists_by_name_dset);
}
if (!object_exists) {
H5_FAILED();
- HDprintf(" object '%s' didn't exist!\n", OBJECT_EXISTS_TEST_DSET_NAME);
+ printf(" object '%s' didn't exist!\n", OBJECT_EXISTS_TEST_DSET_NAME);
PART_ERROR(H5Oexists_by_name_dset);
}
if (H5Dclose(dset_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close dataset\n");
+ printf(" couldn't close dataset\n");
PART_ERROR(H5Oexists_by_name_dset);
}
@@ -925,33 +923,33 @@ test_object_exists(void)
if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype '%s'\n", OBJECT_EXISTS_TEST_TYPE_NAME);
+ printf(" couldn't create datatype '%s'\n", OBJECT_EXISTS_TEST_TYPE_NAME);
PART_ERROR(H5Oexists_by_name_dtype);
}
if (H5Tcommit2(group_id, OBJECT_EXISTS_TEST_TYPE_NAME, dtype_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", OBJECT_EXISTS_TEST_TYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", OBJECT_EXISTS_TEST_TYPE_NAME);
PART_ERROR(H5Oexists_by_name_dtype);
}
if ((object_exists = H5Oexists_by_name(group_id, OBJECT_EXISTS_TEST_TYPE_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if object '%s' exists\n", OBJECT_EXISTS_TEST_TYPE_NAME);
+ printf(" couldn't determine if object '%s' exists\n", OBJECT_EXISTS_TEST_TYPE_NAME);
PART_ERROR(H5Oexists_by_name_dtype);
}
if (!object_exists) {
H5_FAILED();
- HDprintf(" object '%s' didn't exist!\n", OBJECT_EXISTS_TEST_TYPE_NAME);
+ printf(" object '%s' didn't exist!\n", OBJECT_EXISTS_TEST_TYPE_NAME);
PART_ERROR(H5Oexists_by_name_dtype);
}
if (H5Tclose(dtype_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close datatype\n");
+ printf(" couldn't close datatype\n");
PART_ERROR(H5Oexists_by_name_dtype);
}
@@ -966,20 +964,20 @@ test_object_exists(void)
if (H5Lcreate_soft("/" OBJECT_TEST_GROUP_NAME "/" OBJECT_EXISTS_TEST_SUBGROUP_NAME, group_id,
OBJECT_EXISTS_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", OBJECT_EXISTS_TEST_SOFT_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", OBJECT_EXISTS_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Oexists_by_name_soft_link);
}
if ((object_exists =
H5Oexists_by_name(group_id, OBJECT_EXISTS_TEST_SOFT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if object '%s' exists\n", OBJECT_EXISTS_TEST_SOFT_LINK_NAME);
+ printf(" couldn't determine if object '%s' exists\n", OBJECT_EXISTS_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Oexists_by_name_soft_link);
}
if (!object_exists) {
H5_FAILED();
- HDprintf(" object '%s' didn't exist!\n", OBJECT_EXISTS_TEST_SOFT_LINK_NAME);
+ printf(" object '%s' didn't exist!\n", OBJECT_EXISTS_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Oexists_by_name_soft_link);
}
@@ -995,22 +993,22 @@ test_object_exists(void)
"/" OBJECT_TEST_GROUP_NAME "/" OBJECT_EXISTS_TEST_SUBGROUP_NAME "/non_existent_object",
group_id, OBJECT_EXISTS_TEST_DANGLING_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", OBJECT_EXISTS_TEST_DANGLING_LINK_NAME);
+ printf(" couldn't create soft link '%s'\n", OBJECT_EXISTS_TEST_DANGLING_LINK_NAME);
PART_ERROR(H5Oexists_by_name_dangling_soft_link);
}
if ((object_exists =
H5Oexists_by_name(group_id, OBJECT_EXISTS_TEST_DANGLING_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if object '%s' exists\n",
- "/" OBJECT_TEST_GROUP_NAME "/" OBJECT_EXISTS_TEST_SUBGROUP_NAME
- "/non_existent_object");
+ printf(" couldn't determine if object '%s' exists\n",
+ "/" OBJECT_TEST_GROUP_NAME "/" OBJECT_EXISTS_TEST_SUBGROUP_NAME
+ "/non_existent_object");
PART_ERROR(H5Oexists_by_name_dangling_soft_link);
}
if (object_exists) {
H5_FAILED();
- HDprintf(" object pointed to by dangling soft link should not have existed!\n");
+ printf(" object pointed to by dangling soft link should not have existed!\n");
PART_ERROR(H5Oexists_by_name_dangling_soft_link);
}
@@ -1072,7 +1070,7 @@ test_object_exists_invalid_params(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or object aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or object aren't supported with this connector\n");
return 0;
}
@@ -1080,28 +1078,28 @@ test_object_exists_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_EXISTS_INVALID_PARAMS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- OBJECT_EXISTS_INVALID_PARAMS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ OBJECT_EXISTS_INVALID_PARAMS_TEST_SUBGROUP_NAME);
goto error;
}
if ((group_id2 = H5Gcreate2(group_id, OBJECT_EXISTS_INVALID_PARAMS_TEST_GRP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_EXISTS_INVALID_PARAMS_TEST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_EXISTS_INVALID_PARAMS_TEST_GRP_NAME);
goto error;
}
@@ -1125,7 +1123,7 @@ test_object_exists_invalid_params(void)
if (object_exists >= 0) {
H5_FAILED();
- HDprintf(" H5Oexists_by_name succeeded with an invalid location ID!\n");
+ printf(" H5Oexists_by_name succeeded with an invalid location ID!\n");
PART_ERROR(H5Oexists_by_name_invalid_loc_id);
}
@@ -1145,7 +1143,7 @@ test_object_exists_invalid_params(void)
if (object_exists >= 0) {
H5_FAILED();
- HDprintf(" H5Oexists_by_name succeeded with a NULL object name!\n");
+ printf(" H5Oexists_by_name succeeded with a NULL object name!\n");
PART_ERROR(H5Oexists_by_name_invalid_obj_name);
}
@@ -1157,7 +1155,7 @@ test_object_exists_invalid_params(void)
if (object_exists >= 0) {
H5_FAILED();
- HDprintf(" H5Oexists_by_name succeeded with an invalid object name of ''!\n");
+ printf(" H5Oexists_by_name succeeded with an invalid object name of ''!\n");
PART_ERROR(H5Oexists_by_name_invalid_obj_name);
}
@@ -1178,7 +1176,7 @@ test_object_exists_invalid_params(void)
if (object_exists >= 0) {
H5_FAILED();
- HDprintf(" H5Oexists_by_name succeeded with an invalid LAPL!\n");
+ printf(" H5Oexists_by_name succeeded with an invalid LAPL!\n");
PART_ERROR(H5Oexists_by_name_invalid_lapl);
}
@@ -1263,8 +1261,8 @@ test_link_object(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, dataset, or stored datatype aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, object, dataset, or stored datatype aren't "
+ "supported with this connector\n");
return 0;
}
@@ -1272,20 +1270,20 @@ test_link_object(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_LINK_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", OBJECT_LINK_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", OBJECT_LINK_TEST_GROUP_NAME);
goto error;
}
@@ -1305,13 +1303,13 @@ test_link_object(void)
if ((group_id2 = H5Gcreate_anon(group_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create an anonymous group\n");
+ printf(" couldn't create an anonymous group\n");
PART_ERROR(H5Olink_group);
}
if (H5Olink(group_id2, group_id, OBJECT_LINK_TEST_GROUP_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't link the anonymous group\n");
+ printf(" couldn't link the anonymous group\n");
PART_ERROR(H5Olink_group);
}
@@ -1325,13 +1323,13 @@ test_link_object(void)
if ((dset_id = H5Dcreate_anon(group_id, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create an anonymous dataset\n");
+ printf(" couldn't create an anonymous dataset\n");
PART_ERROR(H5Olink_dataset);
}
if (H5Olink(dset_id, group_id, OBJECT_LINK_TEST_DSET_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't link the anonymous dataset\n");
+ printf(" couldn't link the anonymous dataset\n");
PART_ERROR(H5Olink_dataset);
}
@@ -1345,13 +1343,13 @@ test_link_object(void)
if (H5Tcommit_anon(group_id, dset_dtype, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create an anonymous datatype\n");
+ printf(" couldn't create an anonymous datatype\n");
PART_ERROR(H5Olink_datatype);
}
if (H5Olink(dset_dtype, group_id, OBJECT_LINK_TEST_DTYPE_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't link the anonymous datatype\n");
+ printf(" couldn't link the anonymous datatype\n");
PART_ERROR(H5Olink_datatype);
}
@@ -1418,7 +1416,7 @@ test_link_object_invalid_params(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or object aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or object aren't supported with this connector\n");
return 0;
}
@@ -1426,26 +1424,26 @@ test_link_object_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_LINK_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", OBJECT_LINK_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", OBJECT_LINK_TEST_GROUP_NAME);
goto error;
}
if ((group_id2 = H5Gcreate_anon(group_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create an anonymous group\n");
+ printf(" couldn't create an anonymous group\n");
goto error;
}
@@ -1466,7 +1464,7 @@ test_link_object_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Olink succeeded with an invalid object ID!\n");
+ printf(" H5Olink succeeded with an invalid object ID!\n");
PART_ERROR(H5Olink_invalid_object_id);
}
@@ -1487,7 +1485,7 @@ test_link_object_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Olink succeeded with an invalid location ID!\n");
+ printf(" H5Olink succeeded with an invalid location ID!\n");
PART_ERROR(H5Olink_invalid_location);
}
@@ -1507,7 +1505,7 @@ test_link_object_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Olink succeeded with NULL as the object name!\n");
+ printf(" H5Olink succeeded with NULL as the object name!\n");
PART_ERROR(H5Olink_invalid_name);
}
@@ -1519,7 +1517,7 @@ test_link_object_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Olink succeeded with an invalid object name of ''!\n");
+ printf(" H5Olink succeeded with an invalid object name of ''!\n");
PART_ERROR(H5Olink_invalid_name);
}
@@ -1540,7 +1538,7 @@ test_link_object_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Olink succeeded with an invalid LCPL!\n");
+ printf(" H5Olink succeeded with an invalid LCPL!\n");
PART_ERROR(H5Olink_invalid_lcpl);
}
@@ -1561,7 +1559,7 @@ test_link_object_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Olink succeeded with an invalid LAPL!\n");
+ printf(" H5Olink succeeded with an invalid LAPL!\n");
PART_ERROR(H5Olink_invalid_lapl);
}
@@ -1621,8 +1619,8 @@ test_incr_decr_object_refcount(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, stored datatype, or object "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, stored datatype, or object "
+ "aren't supported with this connector\n");
return 0;
}
@@ -1630,20 +1628,20 @@ test_incr_decr_object_refcount(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_REF_COUNT_TEST_SUBGROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", OBJECT_REF_COUNT_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", OBJECT_REF_COUNT_TEST_SUBGROUP_NAME);
goto error;
}
@@ -1664,15 +1662,15 @@ test_incr_decr_object_refcount(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_REF_COUNT_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_REF_COUNT_TEST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_REF_COUNT_TEST_GRP_NAME);
PART_ERROR(H5Oincr_decr_refcount_group);
}
/* Increment the reference count */
if (H5Oincr_refcount(group_id2) < 0) {
H5_FAILED();
- HDprintf(" couldn't increment reference count for the group '%s' \n",
- OBJECT_REF_COUNT_TEST_GRP_NAME);
+ printf(" couldn't increment reference count for the group '%s' \n",
+ OBJECT_REF_COUNT_TEST_GRP_NAME);
PART_ERROR(H5Oincr_decr_refcount_group);
}
@@ -1680,23 +1678,23 @@ test_incr_decr_object_refcount(void)
if (H5Oget_info_by_name3(group_id, OBJECT_REF_COUNT_TEST_GRP_NAME, &oinfo, H5O_INFO_BASIC,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get reference count for the group '%s' \n",
- OBJECT_REF_COUNT_TEST_GRP_NAME);
+ printf(" couldn't get reference count for the group '%s' \n",
+ OBJECT_REF_COUNT_TEST_GRP_NAME);
PART_ERROR(H5Oincr_decr_refcount_group);
}
if (oinfo.rc != 2) {
H5_FAILED();
- HDprintf(" the reference count for the group '%s' isn't 2: %d\n",
- OBJECT_REF_COUNT_TEST_GRP_NAME, oinfo.rc);
+ printf(" the reference count for the group '%s' isn't 2: %d\n",
+ OBJECT_REF_COUNT_TEST_GRP_NAME, oinfo.rc);
PART_ERROR(H5Oincr_decr_refcount_group);
}
/* Decrement the reference count */
if (H5Odecr_refcount(group_id2) < 0) {
H5_FAILED();
- HDprintf(" couldn't decrement reference count for the group '%s' \n",
- OBJECT_REF_COUNT_TEST_GRP_NAME);
+ printf(" couldn't decrement reference count for the group '%s' \n",
+ OBJECT_REF_COUNT_TEST_GRP_NAME);
PART_ERROR(H5Oincr_decr_refcount_group);
}
@@ -1704,21 +1702,21 @@ test_incr_decr_object_refcount(void)
if (H5Oget_info_by_name3(group_id, OBJECT_REF_COUNT_TEST_GRP_NAME, &oinfo, H5O_INFO_BASIC,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get reference count for the group '%s' \n",
- OBJECT_REF_COUNT_TEST_GRP_NAME);
+ printf(" couldn't get reference count for the group '%s' \n",
+ OBJECT_REF_COUNT_TEST_GRP_NAME);
PART_ERROR(H5Oincr_decr_refcount_group);
}
if (oinfo.rc != 1) {
H5_FAILED();
- HDprintf(" the reference count for the group '%s' isn't 1: %d\n",
- OBJECT_REF_COUNT_TEST_GRP_NAME, oinfo.rc);
+ printf(" the reference count for the group '%s' isn't 1: %d\n",
+ OBJECT_REF_COUNT_TEST_GRP_NAME, oinfo.rc);
PART_ERROR(H5Oincr_decr_refcount_group);
}
if (H5Gclose(group_id2) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group\n");
+ printf(" couldn't close group\n");
PART_ERROR(H5Oincr_decr_refcount_group);
}
@@ -1733,15 +1731,15 @@ test_incr_decr_object_refcount(void)
if ((dset_id = H5Dcreate2(group_id, OBJECT_REF_COUNT_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", OBJECT_REF_COUNT_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", OBJECT_REF_COUNT_TEST_DSET_NAME);
PART_ERROR(H5Oincr_decr_refcount_dset);
}
/* Increment the reference count */
if (H5Oincr_refcount(dset_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't increment reference count for the dataset '%s' \n",
- OBJECT_REF_COUNT_TEST_DSET_NAME);
+ printf(" couldn't increment reference count for the dataset '%s' \n",
+ OBJECT_REF_COUNT_TEST_DSET_NAME);
PART_ERROR(H5Oincr_decr_refcount_dset);
}
@@ -1749,23 +1747,23 @@ test_incr_decr_object_refcount(void)
if (H5Oget_info_by_name3(group_id, OBJECT_REF_COUNT_TEST_DSET_NAME, &oinfo, H5O_INFO_BASIC,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get reference count for the dataset '%s' \n",
- OBJECT_REF_COUNT_TEST_DSET_NAME);
+ printf(" couldn't get reference count for the dataset '%s' \n",
+ OBJECT_REF_COUNT_TEST_DSET_NAME);
PART_ERROR(H5Oincr_decr_refcount_dset);
}
if (oinfo.rc != 2) {
H5_FAILED();
- HDprintf(" the reference count for the dataset '%s' isn't 2: %d\n",
- OBJECT_REF_COUNT_TEST_DSET_NAME, oinfo.rc);
+ printf(" the reference count for the dataset '%s' isn't 2: %d\n",
+ OBJECT_REF_COUNT_TEST_DSET_NAME, oinfo.rc);
PART_ERROR(H5Oincr_decr_refcount_dset);
}
/* Decrement the reference count */
if (H5Odecr_refcount(dset_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't decrement reference count for the dataset '%s' \n",
- OBJECT_REF_COUNT_TEST_DSET_NAME);
+ printf(" couldn't decrement reference count for the dataset '%s' \n",
+ OBJECT_REF_COUNT_TEST_DSET_NAME);
PART_ERROR(H5Oincr_decr_refcount_dset);
}
@@ -1773,21 +1771,21 @@ test_incr_decr_object_refcount(void)
if (H5Oget_info_by_name3(group_id, OBJECT_REF_COUNT_TEST_DSET_NAME, &oinfo, H5O_INFO_BASIC,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get reference count for the dataset '%s' \n",
- OBJECT_REF_COUNT_TEST_DSET_NAME);
+ printf(" couldn't get reference count for the dataset '%s' \n",
+ OBJECT_REF_COUNT_TEST_DSET_NAME);
PART_ERROR(H5Oincr_decr_refcount_dset);
}
if (oinfo.rc != 1) {
H5_FAILED();
- HDprintf(" the reference count for the dataset '%s' isn't 1: %d\n",
- OBJECT_REF_COUNT_TEST_DSET_NAME, oinfo.rc);
+ printf(" the reference count for the dataset '%s' isn't 1: %d\n",
+ OBJECT_REF_COUNT_TEST_DSET_NAME, oinfo.rc);
PART_ERROR(H5Oincr_decr_refcount_dset);
}
if (H5Dclose(dset_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close dataset\n");
+ printf(" couldn't close dataset\n");
PART_ERROR(H5Oincr_decr_refcount_dset);
}
@@ -1802,15 +1800,15 @@ test_incr_decr_object_refcount(void)
if (H5Tcommit2(group_id, OBJECT_REF_COUNT_TEST_TYPE_NAME, dset_dtype, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", OBJECT_REF_COUNT_TEST_TYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", OBJECT_REF_COUNT_TEST_TYPE_NAME);
PART_ERROR(H5Oincr_decr_refcount_dtype);
}
/* Increment the reference count */
if (H5Oincr_refcount(dset_dtype) < 0) {
H5_FAILED();
- HDprintf(" couldn't increment reference count for the datatype '%s' \n",
- OBJECT_REF_COUNT_TEST_TYPE_NAME);
+ printf(" couldn't increment reference count for the datatype '%s' \n",
+ OBJECT_REF_COUNT_TEST_TYPE_NAME);
PART_ERROR(H5Oincr_decr_refcount_dtype);
}
@@ -1818,23 +1816,23 @@ test_incr_decr_object_refcount(void)
if (H5Oget_info_by_name3(group_id, OBJECT_REF_COUNT_TEST_TYPE_NAME, &oinfo, H5O_INFO_BASIC,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get reference count for the datatype '%s' \n",
- OBJECT_REF_COUNT_TEST_TYPE_NAME);
+ printf(" couldn't get reference count for the datatype '%s' \n",
+ OBJECT_REF_COUNT_TEST_TYPE_NAME);
PART_ERROR(H5Oincr_decr_refcount_dtype);
}
if (oinfo.rc != 2) {
H5_FAILED();
- HDprintf(" the reference count for the datatype '%s' isn't 2: %d\n",
- OBJECT_REF_COUNT_TEST_TYPE_NAME, oinfo.rc);
+ printf(" the reference count for the datatype '%s' isn't 2: %d\n",
+ OBJECT_REF_COUNT_TEST_TYPE_NAME, oinfo.rc);
PART_ERROR(H5Oincr_decr_refcount_dtype);
}
/* Decrement the reference count */
if (H5Odecr_refcount(dset_dtype) < 0) {
H5_FAILED();
- HDprintf(" couldn't decrement reference count for the datatype '%s' \n",
- OBJECT_REF_COUNT_TEST_TYPE_NAME);
+ printf(" couldn't decrement reference count for the datatype '%s' \n",
+ OBJECT_REF_COUNT_TEST_TYPE_NAME);
PART_ERROR(H5Oincr_decr_refcount_dtype);
}
@@ -1842,21 +1840,21 @@ test_incr_decr_object_refcount(void)
if (H5Oget_info_by_name3(group_id, OBJECT_REF_COUNT_TEST_TYPE_NAME, &oinfo, H5O_INFO_BASIC,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get reference count for the datatype '%s' \n",
- OBJECT_REF_COUNT_TEST_TYPE_NAME);
+ printf(" couldn't get reference count for the datatype '%s' \n",
+ OBJECT_REF_COUNT_TEST_TYPE_NAME);
PART_ERROR(H5Oincr_decr_refcount_dtype);
}
if (oinfo.rc != 1) {
H5_FAILED();
- HDprintf(" the reference count for the datatype '%s' isn't 1: %d\n",
- OBJECT_REF_COUNT_TEST_TYPE_NAME, oinfo.rc);
+ printf(" the reference count for the datatype '%s' isn't 1: %d\n",
+ OBJECT_REF_COUNT_TEST_TYPE_NAME, oinfo.rc);
PART_ERROR(H5Oincr_decr_refcount_dtype);
}
if (H5Tclose(dset_dtype) < 0) {
H5_FAILED();
- HDprintf(" couldn't close datatype\n");
+ printf(" couldn't close datatype\n");
PART_ERROR(H5Oincr_decr_refcount_dtype);
}
@@ -1911,7 +1909,7 @@ test_incr_decr_object_refcount_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_MORE)) {
SKIPPED();
- HDprintf(" API functions for more object aren't supported with this connector\n");
+ printf(" API functions for more object aren't supported with this connector\n");
return 0;
}
@@ -1929,7 +1927,7 @@ test_incr_decr_object_refcount_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" incremented the reference count for an invalid object ID\n");
+ printf(" incremented the reference count for an invalid object ID\n");
PART_ERROR(H5Oincr_refcount_invalid_param);
}
@@ -1949,7 +1947,7 @@ test_incr_decr_object_refcount_invalid_params(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" decremented the reference count for an invalid object ID\n");
+ printf(" decremented the reference count for an invalid object ID\n");
PART_ERROR(H5Odecr_refcount_invalid_param);
}
@@ -1998,8 +1996,8 @@ test_object_copy_basic(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, link, dataset, attribute, iterate, or "
- "stored datatype aren't supported with this connector\n");
+ printf(" API functions for basic file, group, object, link, dataset, attribute, iterate, or "
+ "stored datatype aren't supported with this connector\n");
return 0;
}
@@ -2007,20 +2005,20 @@ test_object_copy_basic(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_COPY_BASIC_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", OBJECT_COPY_BASIC_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", OBJECT_COPY_BASIC_TEST_SUBGROUP_NAME);
goto error;
}
@@ -2036,7 +2034,7 @@ test_object_copy_basic(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_BASIC_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_COPY_BASIC_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_COPY_BASIC_TEST_GROUP_NAME);
goto error;
}
@@ -2047,8 +2045,8 @@ test_object_copy_basic(void)
if ((tmp_group_id = H5Gcreate2(group_id2, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s' under group '%s'\n", grp_name,
- OBJECT_COPY_BASIC_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s' under group '%s'\n", grp_name,
+ OBJECT_COPY_BASIC_TEST_GROUP_NAME);
goto error;
}
@@ -2057,15 +2055,15 @@ test_object_copy_basic(void)
if (H5Gclose(H5Gcreate2(tmp_group_id, OBJECT_COPY_BASIC_TEST_DEEP_NESTED_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create nested group '%s' under group '%s'\n",
- OBJECT_COPY_BASIC_TEST_DEEP_NESTED_GROUP_NAME, grp_name);
+ printf(" couldn't create nested group '%s' under group '%s'\n",
+ OBJECT_COPY_BASIC_TEST_DEEP_NESTED_GROUP_NAME, grp_name);
goto error;
}
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s'\n", grp_name);
+ printf(" couldn't close group '%s'\n", grp_name);
goto error;
}
}
@@ -2078,14 +2076,14 @@ test_object_copy_basic(void)
if ((tmp_attr_id = H5Acreate2(group_id2, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on group '%s'\n", attr_name,
- OBJECT_COPY_BASIC_TEST_GROUP_NAME);
+ printf(" couldn't create attribute '%s' on group '%s'\n", attr_name,
+ OBJECT_COPY_BASIC_TEST_GROUP_NAME);
goto error;
}
if (H5Aclose(tmp_attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -2094,7 +2092,7 @@ test_object_copy_basic(void)
if ((dset_id = H5Dcreate2(group_id, OBJECT_COPY_BASIC_TEST_DSET_NAME, dset_dtype, space_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", OBJECT_COPY_BASIC_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", OBJECT_COPY_BASIC_TEST_DSET_NAME);
goto error;
}
@@ -2106,14 +2104,14 @@ test_object_copy_basic(void)
if ((tmp_attr_id = H5Acreate2(dset_id, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on dataset '%s'\n", attr_name,
- OBJECT_COPY_BASIC_TEST_DSET_NAME);
+ printf(" couldn't create attribute '%s' on dataset '%s'\n", attr_name,
+ OBJECT_COPY_BASIC_TEST_DSET_NAME);
goto error;
}
if (H5Aclose(tmp_attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -2121,14 +2119,14 @@ test_object_copy_basic(void)
/* Create the test committed datatype object, along with the attributes attached to it. */
if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if (H5Tcommit2(group_id, OBJECT_COPY_BASIC_TEST_DTYPE_NAME, dtype_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", OBJECT_COPY_BASIC_TEST_DTYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", OBJECT_COPY_BASIC_TEST_DTYPE_NAME);
goto error;
}
@@ -2140,14 +2138,14 @@ test_object_copy_basic(void)
if ((tmp_attr_id = H5Acreate2(dtype_id, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on committed datatype '%s'\n", attr_name,
- OBJECT_COPY_BASIC_TEST_DTYPE_NAME);
+ printf(" couldn't create attribute '%s' on committed datatype '%s'\n", attr_name,
+ OBJECT_COPY_BASIC_TEST_DTYPE_NAME);
goto error;
}
if (H5Aclose(tmp_attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -2163,30 +2161,30 @@ test_object_copy_basic(void)
if (H5Ocopy(group_id, OBJECT_COPY_BASIC_TEST_GROUP_NAME, group_id,
OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy group '%s' to '%s'\n", OBJECT_COPY_BASIC_TEST_GROUP_NAME,
- OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME);
+ printf(" failed to copy group '%s' to '%s'\n", OBJECT_COPY_BASIC_TEST_GROUP_NAME,
+ OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group);
}
if ((object_link_exists =
H5Lexists(group_id, OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied group exists\n",
- OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME);
+ printf(" couldn't determine if link '%s' to copied group exists\n",
+ OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied group didn't exist!\n",
- OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME);
+ printf(" link '%s' to copied group didn't exist!\n",
+ OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group);
}
/* Ensure that the new group has all the members of the copied group, and all its attributes */
if ((tmp_group_id = H5Gopen2(group_id, OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open group copy '%s'\n", OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME);
+ printf(" failed to open group copy '%s'\n", OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group);
}
@@ -2200,14 +2198,14 @@ test_object_copy_basic(void)
if (H5Gget_info(tmp_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group info\n");
+ printf(" failed to retrieve group info\n");
PART_ERROR(H5Ocopy_group);
}
if (group_info.nlinks != OBJECT_COPY_BASIC_TEST_NUM_NESTED_OBJS) {
H5_FAILED();
- HDprintf(" copied group contained %d members instead of %d members after a deep copy!\n",
- (int)group_info.nlinks, OBJECT_COPY_BASIC_TEST_NUM_NESTED_OBJS);
+ printf(" copied group contained %d members instead of %d members after a deep copy!\n",
+ (int)group_info.nlinks, OBJECT_COPY_BASIC_TEST_NUM_NESTED_OBJS);
PART_ERROR(H5Ocopy_group);
}
@@ -2221,13 +2219,13 @@ test_object_copy_basic(void)
if (H5Oget_info3(tmp_group_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_group);
}
if (object_info.num_attrs == 0) {
H5_FAILED();
- HDprintf(" copied group didn't contain any attributes after copy operation!\n");
+ printf(" copied group didn't contain any attributes after copy operation!\n");
PART_ERROR(H5Ocopy_group);
}
@@ -2236,13 +2234,13 @@ test_object_copy_basic(void)
if (H5Aiterate2(tmp_group_id, H5_INDEX_NAME, H5_ITER_INC, NULL,
object_copy_attribute_iter_callback, &i) < 0) {
H5_FAILED();
- HDprintf(" failed to iterate over copied group's attributes\n");
+ printf(" failed to iterate over copied group's attributes\n");
PART_ERROR(H5Ocopy_group);
}
if (i != OBJECT_COPY_BASIC_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(
+ printf(
" number of attributes on copied group (%llu) didn't match expected number (%llu)!\n",
(unsigned long long)i, (unsigned long long)OBJECT_COPY_BASIC_TEST_NUM_ATTRS);
PART_ERROR(H5Ocopy_group);
@@ -2250,7 +2248,7 @@ test_object_copy_basic(void)
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group copy\n");
+ printf(" failed to close group copy\n");
PART_ERROR(H5Ocopy_group);
}
@@ -2267,8 +2265,7 @@ test_object_copy_basic(void)
if ((tmp_group_id = H5Gopen2(group_id, grp_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open group '%s'\n",
- OBJECT_COPY_BASIC_TEST_DEEP_NESTED_GROUP_NAME);
+ printf(" failed to open group '%s'\n", OBJECT_COPY_BASIC_TEST_DEEP_NESTED_GROUP_NAME);
PART_ERROR(H5Ocopy_group);
}
@@ -2282,21 +2279,20 @@ test_object_copy_basic(void)
if (H5Gget_info(tmp_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group info\n");
+ printf(" failed to retrieve group info\n");
PART_ERROR(H5Ocopy_group);
}
if (group_info.nlinks != 1) {
H5_FAILED();
- HDprintf(" copied group's immediate members didn't contain nested members after a "
- "deep copy!\n");
+ printf(" copied group's immediate members didn't contain nested members after a "
+ "deep copy!\n");
PART_ERROR(H5Ocopy_group);
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n",
- OBJECT_COPY_BASIC_TEST_DEEP_NESTED_GROUP_NAME);
+ printf(" failed to close group '%s'\n", OBJECT_COPY_BASIC_TEST_DEEP_NESTED_GROUP_NAME);
PART_ERROR(H5Ocopy_group);
}
}
@@ -2321,30 +2317,30 @@ test_object_copy_basic(void)
if (H5Ocopy(group_id, OBJECT_COPY_BASIC_TEST_DSET_NAME, group_id,
OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy dataset '%s' to '%s'\n", OBJECT_COPY_BASIC_TEST_DSET_NAME,
- OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME);
+ printf(" failed to copy dataset '%s' to '%s'\n", OBJECT_COPY_BASIC_TEST_DSET_NAME,
+ OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset);
}
if ((object_link_exists =
H5Lexists(group_id, OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied dataset exists\n",
- OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME);
+ printf(" couldn't determine if link '%s' to copied dataset exists\n",
+ OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied dataset didn't exist!\n",
- OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME);
+ printf(" link '%s' to copied dataset didn't exist!\n",
+ OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset);
}
/* Ensure that the new dataset has all of the attributes of the copied dataset */
if ((tmp_dset_id = H5Dopen2(group_id, OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset copy '%s'\n", OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME);
+ printf(" failed to open dataset copy '%s'\n", OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset);
}
@@ -2358,13 +2354,13 @@ test_object_copy_basic(void)
if (H5Oget_info3(tmp_dset_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_dset);
}
if (object_info.num_attrs == 0) {
H5_FAILED();
- HDprintf(" copied dataset didn't contain any attributes after copy operation!\n");
+ printf(" copied dataset didn't contain any attributes after copy operation!\n");
PART_ERROR(H5Ocopy_dset);
}
@@ -2373,21 +2369,21 @@ test_object_copy_basic(void)
if (H5Aiterate2(tmp_dset_id, H5_INDEX_NAME, H5_ITER_INC, NULL,
object_copy_attribute_iter_callback, &i) < 0) {
H5_FAILED();
- HDprintf(" failed to iterate over copied dataset's attributes\n");
+ printf(" failed to iterate over copied dataset's attributes\n");
PART_ERROR(H5Ocopy_dset);
}
if (i != OBJECT_COPY_BASIC_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" number of attributes on copied dataset (%llu) didn't match expected number "
- "(%llu)!\n",
- (unsigned long long)i, (unsigned long long)OBJECT_COPY_BASIC_TEST_NUM_ATTRS);
+ printf(" number of attributes on copied dataset (%llu) didn't match expected number "
+ "(%llu)!\n",
+ (unsigned long long)i, (unsigned long long)OBJECT_COPY_BASIC_TEST_NUM_ATTRS);
PART_ERROR(H5Ocopy_dset);
}
if (H5Dclose(tmp_dset_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close dataset copy\n");
+ printf(" failed to close dataset copy\n");
PART_ERROR(H5Ocopy_dset);
}
@@ -2411,30 +2407,30 @@ test_object_copy_basic(void)
if (H5Ocopy(group_id, OBJECT_COPY_BASIC_TEST_DTYPE_NAME, group_id,
OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy datatype '%s' to '%s'\n", OBJECT_COPY_BASIC_TEST_DTYPE_NAME,
- OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME);
+ printf(" failed to copy datatype '%s' to '%s'\n", OBJECT_COPY_BASIC_TEST_DTYPE_NAME,
+ OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype);
}
if ((object_link_exists =
H5Lexists(group_id, OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied datatype exists\n",
- OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME);
+ printf(" couldn't determine if link '%s' to copied datatype exists\n",
+ OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied datatype didn't exist!\n",
- OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME);
+ printf(" link '%s' to copied datatype didn't exist!\n",
+ OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype);
}
/* Ensure that the new committed datatype has all the attributes of the copied datatype */
if ((tmp_dtype_id = H5Topen2(group_id, OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open datatype copy '%s'\n", OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME);
+ printf(" failed to open datatype copy '%s'\n", OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype);
}
@@ -2448,14 +2444,13 @@ test_object_copy_basic(void)
if (H5Oget_info3(tmp_dtype_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_dtype);
}
if (object_info.num_attrs == 0) {
H5_FAILED();
- HDprintf(
- " copied committed datatype didn't contain any attributes after copy operation!\n");
+ printf(" copied committed datatype didn't contain any attributes after copy operation!\n");
PART_ERROR(H5Ocopy_dtype);
}
@@ -2464,21 +2459,21 @@ test_object_copy_basic(void)
if (H5Aiterate2(tmp_dtype_id, H5_INDEX_NAME, H5_ITER_INC, NULL,
object_copy_attribute_iter_callback, &i) < 0) {
H5_FAILED();
- HDprintf(" failed to iterate over copied datatype's attributes\n");
+ printf(" failed to iterate over copied datatype's attributes\n");
PART_ERROR(H5Ocopy_dtype);
}
if (i != OBJECT_COPY_BASIC_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" number of attributes on copied datatype (%llu) didn't match expected number "
- "(%llu)!\n",
- (unsigned long long)i, (unsigned long long)OBJECT_COPY_BASIC_TEST_NUM_ATTRS);
+ printf(" number of attributes on copied datatype (%llu) didn't match expected number "
+ "(%llu)!\n",
+ (unsigned long long)i, (unsigned long long)OBJECT_COPY_BASIC_TEST_NUM_ATTRS);
PART_ERROR(H5Ocopy_dtype);
}
if (H5Tclose(tmp_dtype_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close datatype copy\n");
+ printf(" failed to close datatype copy\n");
PART_ERROR(H5Ocopy_dtype);
}
@@ -2569,8 +2564,8 @@ test_object_copy_already_existing(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, dataset, or stored datatype aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, object, dataset, or stored datatype aren't "
+ "supported with this connector\n");
return 0;
}
@@ -2578,21 +2573,21 @@ test_object_copy_already_existing(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_COPY_ALREADY_EXISTING_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- OBJECT_COPY_ALREADY_EXISTING_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ OBJECT_COPY_ALREADY_EXISTING_TEST_SUBGROUP_NAME);
goto error;
}
@@ -2606,7 +2601,7 @@ test_object_copy_already_existing(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_ALREADY_EXISTING_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_COPY_ALREADY_EXISTING_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_COPY_ALREADY_EXISTING_TEST_GROUP_NAME);
goto error;
}
@@ -2614,21 +2609,21 @@ test_object_copy_already_existing(void)
if ((dset_id = H5Dcreate2(group_id, OBJECT_COPY_ALREADY_EXISTING_TEST_DSET_NAME, dset_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", OBJECT_COPY_ALREADY_EXISTING_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", OBJECT_COPY_ALREADY_EXISTING_TEST_DSET_NAME);
goto error;
}
/* Create the test committed datatype object */
if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if (H5Tcommit2(group_id, OBJECT_COPY_ALREADY_EXISTING_TEST_DTYPE_NAME, dtype_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", OBJECT_COPY_ALREADY_EXISTING_TEST_DTYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", OBJECT_COPY_ALREADY_EXISTING_TEST_DTYPE_NAME);
goto error;
}
@@ -2649,7 +2644,7 @@ test_object_copy_already_existing(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" group copy succeeded in location where group already exists!\n");
+ printf(" group copy succeeded in location where group already exists!\n");
PART_ERROR(H5Ocopy_already_existing_group);
}
@@ -2670,7 +2665,7 @@ test_object_copy_already_existing(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" dataset copy succeeded in location where dataset already exists!\n");
+ printf(" dataset copy succeeded in location where dataset already exists!\n");
PART_ERROR(H5Ocopy_already_existing_dset);
}
@@ -2691,8 +2686,8 @@ test_object_copy_already_existing(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" committed datatype copy succeeded in location where committed datatype already "
- "exists!\n");
+ printf(" committed datatype copy succeeded in location where committed datatype already "
+ "exists!\n");
PART_ERROR(H5Ocopy_already_existing_dtype);
}
@@ -2766,27 +2761,27 @@ test_object_copy_shallow_group_copy(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, or link aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, group, object, or link aren't supported with this "
+ "connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_COPY_SHALLOW_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", OBJECT_COPY_SHALLOW_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", OBJECT_COPY_SHALLOW_TEST_SUBGROUP_NAME);
goto error;
}
@@ -2794,7 +2789,7 @@ test_object_copy_shallow_group_copy(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_SHALLOW_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_COPY_SHALLOW_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_COPY_SHALLOW_TEST_GROUP_NAME);
goto error;
}
@@ -2805,8 +2800,8 @@ test_object_copy_shallow_group_copy(void)
if ((tmp_group_id = H5Gcreate2(group_id2, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s' under group '%s'\n", grp_name,
- OBJECT_COPY_SHALLOW_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s' under group '%s'\n", grp_name,
+ OBJECT_COPY_SHALLOW_TEST_GROUP_NAME);
goto error;
}
@@ -2815,50 +2810,50 @@ test_object_copy_shallow_group_copy(void)
if (H5Gclose(H5Gcreate2(tmp_group_id, OBJECT_COPY_SHALLOW_TEST_DEEP_NESTED_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create nested group '%s' under group '%s'\n",
- OBJECT_COPY_SHALLOW_TEST_DEEP_NESTED_GROUP_NAME, grp_name);
+ printf(" couldn't create nested group '%s' under group '%s'\n",
+ OBJECT_COPY_SHALLOW_TEST_DEEP_NESTED_GROUP_NAME, grp_name);
goto error;
}
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s'\n", grp_name);
+ printf(" couldn't close group '%s'\n", grp_name);
goto error;
}
}
if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create OCopyPL\n");
+ printf(" couldn't create OCopyPL\n");
goto error;
}
if (H5Pset_copy_object(ocpypl_id, H5O_COPY_SHALLOW_HIERARCHY_FLAG) < 0) {
H5_FAILED();
- HDprintf(" couldn't set object copying options\n");
+ printf(" couldn't set object copying options\n");
goto error;
}
if (H5Ocopy(group_id, OBJECT_COPY_SHALLOW_TEST_GROUP_NAME, group_id,
OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME, ocpypl_id, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy group '%s' to '%s'\n", OBJECT_COPY_SHALLOW_TEST_GROUP_NAME,
- OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME);
+ printf(" failed to copy group '%s' to '%s'\n", OBJECT_COPY_SHALLOW_TEST_GROUP_NAME,
+ OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME);
goto error;
}
if ((object_link_exists = H5Lexists(group_id, OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied group exists\n",
- OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME);
+ printf(" couldn't determine if link '%s' to copied group exists\n",
+ OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME);
goto error;
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied group didn't exist!\n", OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME);
+ printf(" link '%s' to copied group didn't exist!\n", OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME);
goto error;
}
@@ -2867,7 +2862,7 @@ test_object_copy_shallow_group_copy(void)
*/
if ((tmp_group_id = H5Gopen2(group_id, OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open group copy '%s'\n", OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME);
+ printf(" failed to open group copy '%s'\n", OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME);
goto error;
}
@@ -2881,14 +2876,14 @@ test_object_copy_shallow_group_copy(void)
if (H5Gget_info(tmp_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group info\n");
+ printf(" failed to retrieve group info\n");
goto error;
}
if (group_info.nlinks != OBJECT_COPY_SHALLOW_TEST_NUM_NESTED_OBJS) {
H5_FAILED();
- HDprintf(" copied group contained %d members instead of %d members after a shallow copy!\n",
- (int)group_info.nlinks, OBJECT_COPY_SHALLOW_TEST_NUM_NESTED_OBJS);
+ printf(" copied group contained %d members instead of %d members after a shallow copy!\n",
+ (int)group_info.nlinks, OBJECT_COPY_SHALLOW_TEST_NUM_NESTED_OBJS);
goto error;
}
@@ -2908,7 +2903,7 @@ test_object_copy_shallow_group_copy(void)
if ((tmp_group_id = H5Gopen2(group_id, grp_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open group '%s'\n", grp_name);
+ printf(" failed to open group '%s'\n", grp_name);
goto error;
}
@@ -2922,19 +2917,19 @@ test_object_copy_shallow_group_copy(void)
if (H5Gget_info(tmp_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group info\n");
+ printf(" failed to retrieve group info\n");
goto error;
}
if (group_info.nlinks != 0) {
H5_FAILED();
- HDprintf(" copied group's immediate members contained nested members after a shallow copy!\n");
+ printf(" copied group's immediate members contained nested members after a shallow copy!\n");
goto error;
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", grp_name);
+ printf(" failed to close group '%s'\n", grp_name);
goto error;
}
}
@@ -3003,8 +2998,8 @@ test_object_copy_no_attributes(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, link, dataset, attribute, or stored "
- "datatype aren't supported with this connector\n");
+ printf(" API functions for basic file, group, object, link, dataset, attribute, or stored "
+ "datatype aren't supported with this connector\n");
return 0;
}
@@ -3012,20 +3007,20 @@ test_object_copy_no_attributes(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_COPY_NO_ATTRS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -3042,7 +3037,7 @@ test_object_copy_no_attributes(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME);
goto error;
}
@@ -3054,14 +3049,14 @@ test_object_copy_no_attributes(void)
if ((attr_id = H5Acreate2(group_id2, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on group '%s'\n", attr_name,
- OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME);
+ printf(" couldn't create attribute '%s' on group '%s'\n", attr_name,
+ OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -3070,7 +3065,7 @@ test_object_copy_no_attributes(void)
if ((dset_id = H5Dcreate2(group_id, OBJECT_COPY_NO_ATTRS_TEST_DSET_NAME, dset_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_DSET_NAME);
goto error;
}
@@ -3082,14 +3077,14 @@ test_object_copy_no_attributes(void)
if ((attr_id = H5Acreate2(dset_id, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on dataset '%s'\n", attr_name,
- OBJECT_COPY_NO_ATTRS_TEST_DSET_NAME);
+ printf(" couldn't create attribute '%s' on dataset '%s'\n", attr_name,
+ OBJECT_COPY_NO_ATTRS_TEST_DSET_NAME);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -3097,14 +3092,14 @@ test_object_copy_no_attributes(void)
/* Create the test committed datatype object, along with the attributes attached to it. */
if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if (H5Tcommit2(group_id, OBJECT_COPY_NO_ATTRS_TEST_DTYPE_NAME, dtype_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_DTYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_DTYPE_NAME);
goto error;
}
@@ -3116,14 +3111,14 @@ test_object_copy_no_attributes(void)
if ((attr_id = H5Acreate2(dtype_id, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on committed datatype '%s'\n", attr_name,
- OBJECT_COPY_NO_ATTRS_TEST_DTYPE_NAME);
+ printf(" couldn't create attribute '%s' on committed datatype '%s'\n", attr_name,
+ OBJECT_COPY_NO_ATTRS_TEST_DTYPE_NAME);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -3138,36 +3133,36 @@ test_object_copy_no_attributes(void)
if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create OCopyPL\n");
+ printf(" couldn't create OCopyPL\n");
PART_ERROR(H5Ocopy_group_no_attributes);
}
if (H5Pset_copy_object(ocpypl_id, H5O_COPY_WITHOUT_ATTR_FLAG) < 0) {
H5_FAILED();
- HDprintf(" couldn't set object copying options\n");
+ printf(" couldn't set object copying options\n");
PART_ERROR(H5Ocopy_group_no_attributes);
}
if (H5Ocopy(group_id, OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME, group_id,
OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME, ocpypl_id, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy group '%s' to '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME,
- OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME);
+ printf(" failed to copy group '%s' to '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME,
+ OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group_no_attributes);
}
if ((object_link_exists =
H5Lexists(group_id, OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied group exists\n",
- OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME);
+ printf(" couldn't determine if link '%s' to copied group exists\n",
+ OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group_no_attributes);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied group didn't exist!\n",
- OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME);
+ printf(" link '%s' to copied group didn't exist!\n",
+ OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group_no_attributes);
}
@@ -3175,7 +3170,7 @@ test_object_copy_no_attributes(void)
if ((tmp_group_id = H5Gopen2(group_id, OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" failed to open group copy '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME);
+ printf(" failed to open group copy '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group_no_attributes);
}
@@ -3189,25 +3184,25 @@ test_object_copy_no_attributes(void)
if (H5Oget_info3(tmp_group_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_group_no_attributes);
}
if (object_info.num_attrs != 0) {
H5_FAILED();
- HDprintf(" copied group contained attributes after a non-attribute copy!\n");
+ printf(" copied group contained attributes after a non-attribute copy!\n");
PART_ERROR(H5Ocopy_group_no_attributes);
}
if (H5Pclose(ocpypl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close OCopyPL\n");
+ printf(" failed to close OCopyPL\n");
PART_ERROR(H5Ocopy_group_no_attributes);
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group copy\n");
+ printf(" failed to close group copy\n");
PART_ERROR(H5Ocopy_group_no_attributes);
}
@@ -3238,36 +3233,36 @@ test_object_copy_no_attributes(void)
if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create OCopyPL\n");
+ printf(" couldn't create OCopyPL\n");
PART_ERROR(H5Ocopy_dset_no_attributes);
}
if (H5Pset_copy_object(ocpypl_id, H5O_COPY_WITHOUT_ATTR_FLAG) < 0) {
H5_FAILED();
- HDprintf(" couldn't set object copying options\n");
+ printf(" couldn't set object copying options\n");
PART_ERROR(H5Ocopy_dset_no_attributes);
}
if (H5Ocopy(group_id, OBJECT_COPY_NO_ATTRS_TEST_DSET_NAME, group_id,
OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME, ocpypl_id, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy dataset '%s' to '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_DSET_NAME,
- OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME);
+ printf(" failed to copy dataset '%s' to '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_DSET_NAME,
+ OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset_no_attributes);
}
if ((object_link_exists =
H5Lexists(group_id, OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied dataset exists\n",
- OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME);
+ printf(" couldn't determine if link '%s' to copied dataset exists\n",
+ OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset_no_attributes);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied dataset didn't exist!\n",
- OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME);
+ printf(" link '%s' to copied dataset didn't exist!\n",
+ OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset_no_attributes);
}
@@ -3275,7 +3270,7 @@ test_object_copy_no_attributes(void)
if ((tmp_dset_id = H5Dopen2(group_id, OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" failed to open dataset copy '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME);
+ printf(" failed to open dataset copy '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset_no_attributes);
}
@@ -3289,25 +3284,25 @@ test_object_copy_no_attributes(void)
if (H5Oget_info3(tmp_dset_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_dset_no_attributes);
}
if (object_info.num_attrs != 0) {
H5_FAILED();
- HDprintf(" copied dataset contained attributes after a non-attribute copy!\n");
+ printf(" copied dataset contained attributes after a non-attribute copy!\n");
PART_ERROR(H5Ocopy_dset_no_attributes);
}
if (H5Pclose(ocpypl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close OCopyPL\n");
+ printf(" failed to close OCopyPL\n");
PART_ERROR(H5Ocopy_dset_no_attributes);
}
if (H5Dclose(tmp_dset_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close dataset copy\n");
+ printf(" failed to close dataset copy\n");
PART_ERROR(H5Ocopy_dset_no_attributes);
}
@@ -3338,36 +3333,36 @@ test_object_copy_no_attributes(void)
if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create OCopyPL\n");
+ printf(" couldn't create OCopyPL\n");
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
if (H5Pset_copy_object(ocpypl_id, H5O_COPY_WITHOUT_ATTR_FLAG) < 0) {
H5_FAILED();
- HDprintf(" couldn't set object copying options\n");
+ printf(" couldn't set object copying options\n");
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
if (H5Ocopy(group_id, OBJECT_COPY_NO_ATTRS_TEST_DTYPE_NAME, group_id,
OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME, ocpypl_id, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy datatype '%s' to '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_DTYPE_NAME,
- OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME);
+ printf(" failed to copy datatype '%s' to '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_DTYPE_NAME,
+ OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
if ((object_link_exists =
H5Lexists(group_id, OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied datatype exists\n",
- OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME);
+ printf(" couldn't determine if link '%s' to copied datatype exists\n",
+ OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied datatype didn't exist!\n",
- OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME);
+ printf(" link '%s' to copied datatype didn't exist!\n",
+ OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
@@ -3375,7 +3370,7 @@ test_object_copy_no_attributes(void)
if ((tmp_dtype_id = H5Topen2(group_id, OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" failed to open dataset copy '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME);
+ printf(" failed to open dataset copy '%s'\n", OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
@@ -3389,25 +3384,25 @@ test_object_copy_no_attributes(void)
if (H5Oget_info3(tmp_dtype_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
if (object_info.num_attrs != 0) {
H5_FAILED();
- HDprintf(" copied committed datatype contained attributes after a non-attribute copy!\n");
+ printf(" copied committed datatype contained attributes after a non-attribute copy!\n");
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
if (H5Pclose(ocpypl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close OCopyPL\n");
+ printf(" failed to close OCopyPL\n");
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
if (H5Tclose(tmp_dtype_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close datatype copy\n");
+ printf(" failed to close datatype copy\n");
PART_ERROR(H5Ocopy_dtype_no_attributes);
}
@@ -3511,8 +3506,8 @@ test_object_copy_by_soft_link(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, link, dataset, attribute, iterate, or "
- "soft link aren't supported with this connector\n");
+ printf(" API functions for basic file, group, object, link, dataset, attribute, iterate, or "
+ "soft link aren't supported with this connector\n");
return 0;
}
@@ -3520,20 +3515,20 @@ test_object_copy_by_soft_link(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_COPY_SOFT_LINK_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", OBJECT_COPY_SOFT_LINK_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", OBJECT_COPY_SOFT_LINK_TEST_SUBGROUP_NAME);
goto error;
}
@@ -3545,7 +3540,7 @@ test_object_copy_by_soft_link(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME);
goto error;
}
@@ -3556,8 +3551,8 @@ test_object_copy_by_soft_link(void)
if ((tmp_group_id = H5Gcreate2(group_id2, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s' under group '%s'\n", grp_name,
- OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s' under group '%s'\n", grp_name,
+ OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME);
goto error;
}
@@ -3566,15 +3561,15 @@ test_object_copy_by_soft_link(void)
if (H5Gclose(H5Gcreate2(tmp_group_id, OBJECT_COPY_SOFT_LINK_TEST_DEEP_NESTED_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create nested group '%s' under group '%s'\n",
- OBJECT_COPY_SOFT_LINK_TEST_DEEP_NESTED_GROUP_NAME, grp_name);
+ printf(" couldn't create nested group '%s' under group '%s'\n",
+ OBJECT_COPY_SOFT_LINK_TEST_DEEP_NESTED_GROUP_NAME, grp_name);
goto error;
}
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s'\n", grp_name);
+ printf(" couldn't close group '%s'\n", grp_name);
goto error;
}
}
@@ -3587,14 +3582,14 @@ test_object_copy_by_soft_link(void)
if ((attr_id = H5Acreate2(group_id2, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on group '%s'\n", attr_name,
- OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME);
+ printf(" couldn't create attribute '%s' on group '%s'\n", attr_name,
+ OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -3612,31 +3607,31 @@ test_object_copy_by_soft_link(void)
group_id, OBJECT_COPY_SOFT_LINK_TEST_SOFT_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s' to group for copying\n",
- OBJECT_COPY_SOFT_LINK_TEST_SOFT_LINK_NAME);
+ printf(" failed to create soft link '%s' to group for copying\n",
+ OBJECT_COPY_SOFT_LINK_TEST_SOFT_LINK_NAME);
PART_ERROR(H5Ocopy_through_soft_link);
}
if (H5Ocopy(group_id, OBJECT_COPY_SOFT_LINK_TEST_SOFT_LINK_NAME, group_id,
OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy group '%s' to '%s'\n", OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME,
- OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
+ printf(" failed to copy group '%s' to '%s'\n", OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME,
+ OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_through_soft_link);
}
if ((object_link_exists =
H5Lexists(group_id, OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied group exists\n",
- OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
+ printf(" couldn't determine if link '%s' to copied group exists\n",
+ OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_through_soft_link);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied group didn't exist!\n",
- OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
+ printf(" link '%s' to copied group didn't exist!\n",
+ OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_through_soft_link);
}
@@ -3645,14 +3640,14 @@ test_object_copy_by_soft_link(void)
if (H5Lget_info2(group_id, OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME, &link_info, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" failed to retrieve info for link '%s'\n",
- OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
+ printf(" failed to retrieve info for link '%s'\n",
+ OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_through_soft_link);
}
if (link_info.type != H5L_TYPE_HARD) {
H5_FAILED();
- HDprintf(
+ printf(
" after group copy through soft link, group's new link type wasn't H5L_TYPE_HARD!\n");
PART_ERROR(H5Ocopy_through_soft_link);
}
@@ -3664,7 +3659,7 @@ test_object_copy_by_soft_link(void)
if ((tmp_group_id = H5Gopen2(group_id, OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" failed to open group copy '%s'\n", OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
+ printf(" failed to open group copy '%s'\n", OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_through_soft_link);
}
@@ -3678,15 +3673,14 @@ test_object_copy_by_soft_link(void)
if (H5Gget_info(tmp_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group info\n");
+ printf(" failed to retrieve group info\n");
PART_ERROR(H5Ocopy_through_soft_link);
}
if (group_info.nlinks != OBJECT_COPY_SOFT_LINK_TEST_NUM_NESTED_OBJS) {
H5_FAILED();
- HDprintf(
- " copied group contained %d members instead of %d members after a shallow copy!\n",
- (int)group_info.nlinks, OBJECT_COPY_SOFT_LINK_TEST_NUM_NESTED_OBJS);
+ printf(" copied group contained %d members instead of %d members after a shallow copy!\n",
+ (int)group_info.nlinks, OBJECT_COPY_SOFT_LINK_TEST_NUM_NESTED_OBJS);
PART_ERROR(H5Ocopy_through_soft_link);
}
@@ -3700,13 +3694,13 @@ test_object_copy_by_soft_link(void)
if (H5Oget_info3(tmp_group_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_through_soft_link);
}
if (object_info.num_attrs == 0) {
H5_FAILED();
- HDprintf(" copied group didn't contain any attributes after copy operation!\n");
+ printf(" copied group didn't contain any attributes after copy operation!\n");
PART_ERROR(H5Ocopy_through_soft_link);
}
@@ -3715,13 +3709,13 @@ test_object_copy_by_soft_link(void)
if (H5Aiterate2(tmp_group_id, H5_INDEX_NAME, H5_ITER_INC, NULL,
object_copy_attribute_iter_callback, &i) < 0) {
H5_FAILED();
- HDprintf(" failed to iterate over copied group's attributes\n");
+ printf(" failed to iterate over copied group's attributes\n");
PART_ERROR(H5Ocopy_through_soft_link);
}
if (i != OBJECT_COPY_SOFT_LINK_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(
+ printf(
" number of attributes on copied group (%llu) didn't match expected number (%llu)!\n",
(unsigned long long)i, (unsigned long long)OBJECT_COPY_SOFT_LINK_TEST_NUM_ATTRS);
PART_ERROR(H5Ocopy_through_soft_link);
@@ -3729,7 +3723,7 @@ test_object_copy_by_soft_link(void)
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group copy\n");
+ printf(" failed to close group copy\n");
PART_ERROR(H5Ocopy_through_soft_link);
}
@@ -3757,8 +3751,8 @@ test_object_copy_by_soft_link(void)
group_id, OBJECT_COPY_SOFT_LINK_TEST_DANGLING_LINK_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create dangling soft link '%s'\n",
- OBJECT_COPY_SOFT_LINK_TEST_DANGLING_LINK_NAME);
+ printf(" failed to create dangling soft link '%s'\n",
+ OBJECT_COPY_SOFT_LINK_TEST_DANGLING_LINK_NAME);
PART_ERROR(H5Ocopy_through_dangling_soft_link);
}
@@ -3772,7 +3766,7 @@ test_object_copy_by_soft_link(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" copied non-existent object through use of a dangling soft link!\n");
+ printf(" copied non-existent object through use of a dangling soft link!\n");
PART_ERROR(H5Ocopy_through_dangling_soft_link);
}
@@ -3841,9 +3835,9 @@ test_object_copy_group_with_soft_links(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, link, iterate, or soft link aren't "
- "supported with "
- "this connector\n");
+ printf(" API functions for basic file, group, object, link, iterate, or soft link aren't "
+ "supported with "
+ "this connector\n");
return 0;
}
@@ -3851,21 +3845,21 @@ test_object_copy_group_with_soft_links(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_SUBGROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_SUBGROUP_NAME);
goto error;
}
@@ -3873,7 +3867,7 @@ test_object_copy_group_with_soft_links(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_GROUP_NAME);
goto error;
}
@@ -3893,20 +3887,20 @@ test_object_copy_group_with_soft_links(void)
if ((tmp_group_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s' under group '%s'\n", grp_name,
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create group '%s' under group '%s'\n", grp_name,
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_SUBGROUP_NAME);
goto error;
}
if (H5Lcreate_soft(lnk_target, group_id2, lnk_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to create soft link '%s'\n", lnk_name);
+ printf(" failed to create soft link '%s'\n", lnk_name);
goto error;
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s'\n", grp_name);
+ printf(" couldn't close group '%s'\n", grp_name);
goto error;
}
}
@@ -3923,9 +3917,9 @@ test_object_copy_group_with_soft_links(void)
OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy group '%s' to '%s'\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_GROUP_NAME,
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
+ printf(" failed to copy group '%s' to '%s'\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_GROUP_NAME,
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_dont_expand_soft_links);
}
@@ -3933,15 +3927,15 @@ test_object_copy_group_with_soft_links(void)
H5Lexists(group_id, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied group exists\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
+ printf(" couldn't determine if link '%s' to copied group exists\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_dont_expand_soft_links);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied group didn't exist!\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
+ printf(" link '%s' to copied group didn't exist!\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_dont_expand_soft_links);
}
@@ -3950,8 +3944,8 @@ test_object_copy_group_with_soft_links(void)
H5Gopen2(group_id, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open group copy '%s'\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
+ printf(" failed to open group copy '%s'\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_dont_expand_soft_links);
}
@@ -3965,14 +3959,14 @@ test_object_copy_group_with_soft_links(void)
if (H5Gget_info(tmp_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group info\n");
+ printf(" failed to retrieve group info\n");
PART_ERROR(H5Ocopy_dont_expand_soft_links);
}
if (group_info.nlinks != OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS) {
H5_FAILED();
- HDprintf(" copied group contained %d members instead of %d members after copy!\n",
- (int)group_info.nlinks, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS);
+ printf(" copied group contained %d members instead of %d members after copy!\n",
+ (int)group_info.nlinks, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS);
PART_ERROR(H5Ocopy_dont_expand_soft_links);
}
@@ -3984,22 +3978,22 @@ test_object_copy_group_with_soft_links(void)
if (H5Literate2(tmp_group_id, H5_INDEX_NAME, H5_ITER_INC, NULL,
object_copy_soft_link_non_expand_callback, &i) < 0) {
H5_FAILED();
- HDprintf(" failed to iterate over links in group '%s'\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
+ printf(" failed to iterate over links in group '%s'\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_dont_expand_soft_links);
}
if (i != OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS) {
H5_FAILED();
- HDprintf(" number of links in copied group (%llu) didn't match expected number (%llu)!\n",
- (unsigned long long)i,
- (unsigned long long)OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS);
+ printf(" number of links in copied group (%llu) didn't match expected number (%llu)!\n",
+ (unsigned long long)i,
+ (unsigned long long)OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS);
PART_ERROR(H5Ocopy_dont_expand_soft_links);
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group copy\n");
+ printf(" failed to close group copy\n");
PART_ERROR(H5Ocopy_dont_expand_soft_links);
}
@@ -4022,13 +4016,13 @@ test_object_copy_group_with_soft_links(void)
if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create OCopyPL\n");
+ printf(" couldn't create OCopyPL\n");
PART_ERROR(H5Ocopy_expand_soft_links);
}
if (H5Pset_copy_object(ocpypl_id, H5O_COPY_EXPAND_SOFT_LINK_FLAG) < 0) {
H5_FAILED();
- HDprintf(" couldn't set object copying options\n");
+ printf(" couldn't set object copying options\n");
PART_ERROR(H5Ocopy_expand_soft_links);
}
@@ -4036,24 +4030,24 @@ test_object_copy_group_with_soft_links(void)
OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME, ocpypl_id,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy group '%s' to '%s'\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_GROUP_NAME,
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
+ printf(" failed to copy group '%s' to '%s'\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_GROUP_NAME,
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_expand_soft_links);
}
if ((object_link_exists = H5Lexists(
group_id, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied group exists\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
+ printf(" couldn't determine if link '%s' to copied group exists\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_expand_soft_links);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied group didn't exist!\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
+ printf(" link '%s' to copied group didn't exist!\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_expand_soft_links);
}
@@ -4061,8 +4055,8 @@ test_object_copy_group_with_soft_links(void)
if ((tmp_group_id = H5Gopen2(group_id, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open group copy '%s'\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
+ printf(" failed to open group copy '%s'\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_expand_soft_links);
}
@@ -4076,14 +4070,14 @@ test_object_copy_group_with_soft_links(void)
if (H5Gget_info(tmp_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group info\n");
+ printf(" failed to retrieve group info\n");
PART_ERROR(H5Ocopy_expand_soft_links);
}
if (group_info.nlinks != OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS) {
H5_FAILED();
- HDprintf(" copied group contained %d members instead of %d members after copy!\n",
- (int)group_info.nlinks, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS);
+ printf(" copied group contained %d members instead of %d members after copy!\n",
+ (int)group_info.nlinks, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS);
PART_ERROR(H5Ocopy_expand_soft_links);
}
@@ -4096,28 +4090,28 @@ test_object_copy_group_with_soft_links(void)
if (H5Literate2(tmp_group_id, H5_INDEX_NAME, H5_ITER_INC, NULL,
object_copy_soft_link_expand_callback, &i) < 0) {
H5_FAILED();
- HDprintf(" failed to iterate over links in group '%s'\n",
- OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
+ printf(" failed to iterate over links in group '%s'\n",
+ OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME);
PART_ERROR(H5Ocopy_expand_soft_links);
}
if (i != OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS) {
H5_FAILED();
- HDprintf(" number of links in copied group (%llu) didn't match expected number (%llu)!\n",
- (unsigned long long)i,
- (unsigned long long)OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS);
+ printf(" number of links in copied group (%llu) didn't match expected number (%llu)!\n",
+ (unsigned long long)i,
+ (unsigned long long)OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS);
PART_ERROR(H5Ocopy_expand_soft_links);
}
if (H5Pclose(ocpypl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close OCopyPL\n");
+ printf(" failed to close OCopyPL\n");
PART_ERROR(H5Ocopy_expand_soft_links);
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group copy\n");
+ printf(" failed to close group copy\n");
PART_ERROR(H5Ocopy_expand_soft_links);
}
@@ -4211,8 +4205,8 @@ test_object_copy_between_files(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, link, dataset, attribute, stored "
- "datatype, or iterate aren't supported with this connector\n");
+ printf(" API functions for basic file, group, object, link, dataset, attribute, stored "
+ "datatype, or iterate aren't supported with this connector\n");
return 0;
}
@@ -4224,27 +4218,26 @@ test_object_copy_between_files(void)
if ((file_id2 = H5Fcreate(OBJECT_COPY_BETWEEN_FILES_TEST_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", H5_api_test_filename);
+ printf(" couldn't create file '%s'\n", H5_api_test_filename);
goto error;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_COPY_BETWEEN_FILES_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", OBJECT_COPY_BETWEEN_FILES_TEST_SUBGROUP_NAME);
goto error;
}
@@ -4262,7 +4255,7 @@ test_object_copy_between_files(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME);
goto error;
}
@@ -4273,8 +4266,8 @@ test_object_copy_between_files(void)
if ((tmp_group_id = H5Gcreate2(group_id2, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s' under group '%s'\n", grp_name,
- OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s' under group '%s'\n", grp_name,
+ OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME);
goto error;
}
@@ -4283,15 +4276,15 @@ test_object_copy_between_files(void)
if (H5Gclose(H5Gcreate2(tmp_group_id, OBJECT_COPY_BETWEEN_FILES_TEST_DEEP_NESTED_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create nested group '%s' under group '%s'\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_DEEP_NESTED_GROUP_NAME, grp_name);
+ printf(" couldn't create nested group '%s' under group '%s'\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_DEEP_NESTED_GROUP_NAME, grp_name);
goto error;
}
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s'\n", grp_name);
+ printf(" couldn't close group '%s'\n", grp_name);
goto error;
}
}
@@ -4304,14 +4297,14 @@ test_object_copy_between_files(void)
if ((attr_id = H5Acreate2(group_id2, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on group '%s'\n", attr_name,
- OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME);
+ printf(" couldn't create attribute '%s' on group '%s'\n", attr_name,
+ OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -4320,7 +4313,7 @@ test_object_copy_between_files(void)
if ((dset_id = H5Dcreate2(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME, dset_dtype, space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME);
goto error;
}
@@ -4332,14 +4325,14 @@ test_object_copy_between_files(void)
if ((attr_id = H5Acreate2(dset_id, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on dataset '%s'\n", attr_name,
- OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME);
+ printf(" couldn't create attribute '%s' on dataset '%s'\n", attr_name,
+ OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -4347,14 +4340,14 @@ test_object_copy_between_files(void)
/* Create the test committed datatype object, along with the attributes attached to it. */
if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype\n");
+ printf(" couldn't create datatype\n");
goto error;
}
if (H5Tcommit2(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME, dtype_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME);
goto error;
}
@@ -4366,14 +4359,14 @@ test_object_copy_between_files(void)
if ((attr_id = H5Acreate2(dtype_id, attr_name, H5T_NATIVE_INT, attr_space_id, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create attribute '%s' on committed datatype '%s'\n", attr_name,
- OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME);
+ printf(" couldn't create attribute '%s' on committed datatype '%s'\n", attr_name,
+ OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME);
goto error;
}
if (H5Aclose(attr_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close attribute '%s'\n", attr_name);
+ printf(" couldn't close attribute '%s'\n", attr_name);
goto error;
}
}
@@ -4389,25 +4382,25 @@ test_object_copy_between_files(void)
if (H5Ocopy(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME, file_id2,
OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy group '%s' to second file '%s'\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME,
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME);
+ printf(" failed to copy group '%s' to second file '%s'\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME,
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group_between_files);
}
if ((object_link_exists =
H5Lexists(file_id2, OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied group exists\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME);
+ printf(" couldn't determine if link '%s' to copied group exists\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group_between_files);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied group in second file '%s' didn't exist!\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME,
- OBJECT_COPY_BETWEEN_FILES_TEST_FILE_NAME);
+ printf(" link '%s' to copied group in second file '%s' didn't exist!\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME,
+ OBJECT_COPY_BETWEEN_FILES_TEST_FILE_NAME);
PART_ERROR(H5Ocopy_group_between_files);
}
@@ -4415,8 +4408,7 @@ test_object_copy_between_files(void)
if ((tmp_group_id =
H5Gopen2(file_id2, OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open group copy '%s'\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME);
+ printf(" failed to open group copy '%s'\n", OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME);
PART_ERROR(H5Ocopy_group_between_files);
}
@@ -4430,14 +4422,14 @@ test_object_copy_between_files(void)
if (H5Gget_info(tmp_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group info\n");
+ printf(" failed to retrieve group info\n");
PART_ERROR(H5Ocopy_group_between_files);
}
if (group_info.nlinks != OBJECT_COPY_BETWEEN_FILES_TEST_NUM_NESTED_OBJS) {
H5_FAILED();
- HDprintf(" copied group contained %d members instead of %d members after a deep copy!\n",
- (int)group_info.nlinks, OBJECT_COPY_BETWEEN_FILES_TEST_NUM_NESTED_OBJS);
+ printf(" copied group contained %d members instead of %d members after a deep copy!\n",
+ (int)group_info.nlinks, OBJECT_COPY_BETWEEN_FILES_TEST_NUM_NESTED_OBJS);
PART_ERROR(H5Ocopy_group_between_files);
}
@@ -4451,13 +4443,13 @@ test_object_copy_between_files(void)
if (H5Oget_info3(tmp_group_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_group_between_files);
}
if (object_info.num_attrs == 0) {
H5_FAILED();
- HDprintf(" copied group didn't contain any attributes after copy operation!\n");
+ printf(" copied group didn't contain any attributes after copy operation!\n");
PART_ERROR(H5Ocopy_group_between_files);
}
@@ -4466,13 +4458,13 @@ test_object_copy_between_files(void)
if (H5Aiterate2(tmp_group_id, H5_INDEX_NAME, H5_ITER_INC, NULL,
object_copy_attribute_iter_callback, &i) < 0) {
H5_FAILED();
- HDprintf(" failed to iterate over copied group's attributes\n");
+ printf(" failed to iterate over copied group's attributes\n");
PART_ERROR(H5Ocopy_group_between_files);
}
if (i != OBJECT_COPY_BETWEEN_FILES_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(
+ printf(
" number of attributes on copied group (%llu) didn't match expected number (%llu)!\n",
(unsigned long long)i, (unsigned long long)OBJECT_COPY_BETWEEN_FILES_TEST_NUM_ATTRS);
PART_ERROR(H5Ocopy_group_between_files);
@@ -4480,7 +4472,7 @@ test_object_copy_between_files(void)
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group copy\n");
+ printf(" failed to close group copy\n");
PART_ERROR(H5Ocopy_group_between_files);
}
@@ -4497,7 +4489,7 @@ test_object_copy_between_files(void)
if ((tmp_group_id = H5Gopen2(file_id2, grp_name, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open group '%s'\n", grp_name);
+ printf(" failed to open group '%s'\n", grp_name);
PART_ERROR(H5Ocopy_group_between_files);
}
@@ -4511,20 +4503,20 @@ test_object_copy_between_files(void)
if (H5Gget_info(tmp_group_id, &group_info) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve group info\n");
+ printf(" failed to retrieve group info\n");
PART_ERROR(H5Ocopy_group_between_files);
}
if (group_info.nlinks != 1) {
H5_FAILED();
- HDprintf(" copied group's immediate members didn't contain nested members after a "
- "deep copy!\n");
+ printf(" copied group's immediate members didn't contain nested members after a "
+ "deep copy!\n");
PART_ERROR(H5Ocopy_group_between_files);
}
if (H5Gclose(tmp_group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close group '%s'\n", grp_name);
+ printf(" failed to close group '%s'\n", grp_name);
PART_ERROR(H5Ocopy_group_between_files);
}
}
@@ -4549,25 +4541,25 @@ test_object_copy_between_files(void)
if (H5Ocopy(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME, file_id2,
OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy dataset '%s' to second file '%s'\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME,
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME);
+ printf(" failed to copy dataset '%s' to second file '%s'\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME,
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset_between_files);
}
if ((object_link_exists =
H5Lexists(file_id2, OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied dataset exists\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME);
+ printf(" couldn't determine if link '%s' to copied dataset exists\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset_between_files);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied dataset in second file '%s' didn't exist!\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME,
- OBJECT_COPY_BETWEEN_FILES_TEST_FILE_NAME);
+ printf(" link '%s' to copied dataset in second file '%s' didn't exist!\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME,
+ OBJECT_COPY_BETWEEN_FILES_TEST_FILE_NAME);
PART_ERROR(H5Ocopy_dset_between_files);
}
@@ -4575,8 +4567,8 @@ test_object_copy_between_files(void)
if ((tmp_dset_id =
H5Dopen2(file_id2, OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open dataset copy '%s'\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME);
+ printf(" failed to open dataset copy '%s'\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME);
PART_ERROR(H5Ocopy_dset_between_files);
}
@@ -4590,13 +4582,13 @@ test_object_copy_between_files(void)
if (H5Oget_info3(tmp_dset_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_dset_between_files);
}
if (object_info.num_attrs == 0) {
H5_FAILED();
- HDprintf(" copied dataset didn't contain any attributes after copy operation!\n");
+ printf(" copied dataset didn't contain any attributes after copy operation!\n");
PART_ERROR(H5Ocopy_dset_between_files);
}
@@ -4605,21 +4597,21 @@ test_object_copy_between_files(void)
if (H5Aiterate2(tmp_dset_id, H5_INDEX_NAME, H5_ITER_INC, NULL,
object_copy_attribute_iter_callback, &i) < 0) {
H5_FAILED();
- HDprintf(" failed to iterate over copied dataset's attributes\n");
+ printf(" failed to iterate over copied dataset's attributes\n");
PART_ERROR(H5Ocopy_dset_between_files);
}
if (i != OBJECT_COPY_BETWEEN_FILES_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" number of attributes on copied dataset (%llu) didn't match expected number "
- "(%llu)!\n",
- (unsigned long long)i, (unsigned long long)OBJECT_COPY_BETWEEN_FILES_TEST_NUM_ATTRS);
+ printf(" number of attributes on copied dataset (%llu) didn't match expected number "
+ "(%llu)!\n",
+ (unsigned long long)i, (unsigned long long)OBJECT_COPY_BETWEEN_FILES_TEST_NUM_ATTRS);
PART_ERROR(H5Ocopy_dset_between_files);
}
if (H5Dclose(tmp_dset_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close dataset copy\n");
+ printf(" failed to close dataset copy\n");
PART_ERROR(H5Ocopy_dset_between_files);
}
@@ -4643,25 +4635,25 @@ test_object_copy_between_files(void)
if (H5Ocopy(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME, file_id2,
OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to copy committed datatype '%s' to second file '%s'\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME,
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME);
+ printf(" failed to copy committed datatype '%s' to second file '%s'\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME,
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype_between_files);
}
if ((object_link_exists =
H5Lexists(file_id2, OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't determine if link '%s' to copied committed datatype exists\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME);
+ printf(" couldn't determine if link '%s' to copied committed datatype exists\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype_between_files);
}
if (!object_link_exists) {
H5_FAILED();
- HDprintf(" link '%s' to copied committed datatype in second file '%s' didn't exist!\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME,
- OBJECT_COPY_BETWEEN_FILES_TEST_FILE_NAME);
+ printf(" link '%s' to copied committed datatype in second file '%s' didn't exist!\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME,
+ OBJECT_COPY_BETWEEN_FILES_TEST_FILE_NAME);
PART_ERROR(H5Ocopy_dtype_between_files);
}
@@ -4670,8 +4662,8 @@ test_object_copy_between_files(void)
if ((tmp_dtype_id =
H5Topen2(file_id2, OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to open committed datatype copy '%s'\n",
- OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME);
+ printf(" failed to open committed datatype copy '%s'\n",
+ OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME);
PART_ERROR(H5Ocopy_dtype_between_files);
}
@@ -4685,14 +4677,13 @@ test_object_copy_between_files(void)
if (H5Oget_info3(tmp_dtype_id, &object_info, H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve object info\n");
+ printf(" failed to retrieve object info\n");
PART_ERROR(H5Ocopy_dtype_between_files);
}
if (object_info.num_attrs == 0) {
H5_FAILED();
- HDprintf(
- " copied committed datatype didn't contain any attributes after copy operation!\n");
+ printf(" copied committed datatype didn't contain any attributes after copy operation!\n");
PART_ERROR(H5Ocopy_dtype_between_files);
}
@@ -4701,21 +4692,21 @@ test_object_copy_between_files(void)
if (H5Aiterate2(tmp_dtype_id, H5_INDEX_NAME, H5_ITER_INC, NULL,
object_copy_attribute_iter_callback, &i) < 0) {
H5_FAILED();
- HDprintf(" failed to iterate over copied datatype's attributes\n");
+ printf(" failed to iterate over copied datatype's attributes\n");
PART_ERROR(H5Ocopy_dtype_between_files);
}
if (i != OBJECT_COPY_BETWEEN_FILES_TEST_NUM_ATTRS) {
H5_FAILED();
- HDprintf(" number of attributes on copied datatype (%llu) didn't match expected number "
- "(%llu)!\n",
- (unsigned long long)i, (unsigned long long)OBJECT_COPY_BETWEEN_FILES_TEST_NUM_ATTRS);
+ printf(" number of attributes on copied datatype (%llu) didn't match expected number "
+ "(%llu)!\n",
+ (unsigned long long)i, (unsigned long long)OBJECT_COPY_BETWEEN_FILES_TEST_NUM_ATTRS);
PART_ERROR(H5Ocopy_dtype_between_files);
}
if (H5Tclose(tmp_dtype_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close committed datatype copy\n");
+ printf(" failed to close committed datatype copy\n");
PART_ERROR(H5Ocopy_dtype_between_files);
}
@@ -4803,7 +4794,7 @@ test_object_copy_invalid_params(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or object aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or object aren't supported with this connector\n");
return 0;
}
@@ -4811,28 +4802,28 @@ test_object_copy_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_COPY_INVALID_PARAMS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n",
- OBJECT_COPY_INVALID_PARAMS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n",
+ OBJECT_COPY_INVALID_PARAMS_TEST_SUBGROUP_NAME);
goto error;
}
if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_COPY_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_COPY_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -4853,7 +4844,7 @@ test_object_copy_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ocopy succeeded with an invalid source location ID!\n");
+ printf(" H5Ocopy succeeded with an invalid source location ID!\n");
PART_ERROR(H5Ocopy_invalid_src_loc_id);
}
@@ -4874,7 +4865,7 @@ test_object_copy_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ocopy succeeded with a NULL source object name!\n");
+ printf(" H5Ocopy succeeded with a NULL source object name!\n");
PART_ERROR(H5Ocopy_invalid_src_obj_name);
}
@@ -4887,7 +4878,7 @@ test_object_copy_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ocopy succeeded with an invalid source object name of ''!\n");
+ printf(" H5Ocopy succeeded with an invalid source object name of ''!\n");
PART_ERROR(H5Ocopy_invalid_src_obj_name);
}
@@ -4908,7 +4899,7 @@ test_object_copy_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ocopy succeeded with an invalid destination location ID!\n");
+ printf(" H5Ocopy succeeded with an invalid destination location ID!\n");
PART_ERROR(H5Ocopy_invalid_dst_loc_id);
}
@@ -4929,7 +4920,7 @@ test_object_copy_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ocopy succeeded with a NULL destination object name!\n");
+ printf(" H5Ocopy succeeded with a NULL destination object name!\n");
PART_ERROR(H5Ocopy_invalid_dst_obj_name);
}
@@ -4942,7 +4933,7 @@ test_object_copy_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ocopy succeeded with an invalid destination object name of ''!\n");
+ printf(" H5Ocopy succeeded with an invalid destination object name of ''!\n");
PART_ERROR(H5Ocopy_invalid_dst_obj_name);
}
@@ -4963,7 +4954,7 @@ test_object_copy_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ocopy succeeded with an invalid OcpyPL!\n");
+ printf(" H5Ocopy succeeded with an invalid OcpyPL!\n");
PART_ERROR(H5Ocopy_invalid_ocpypl);
}
@@ -4984,7 +4975,7 @@ test_object_copy_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ocopy succeeded with an invalid LCPL!\n");
+ printf(" H5Ocopy succeeded with an invalid LCPL!\n");
PART_ERROR(H5Ocopy_invalid_lcpl);
}
@@ -5075,8 +5066,8 @@ test_object_visit(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, dataset, attribute, stored datatype, or "
- "iterate aren't supported with this connector\n");
+ printf(" API functions for basic file, group, object, dataset, attribute, stored datatype, or "
+ "iterate aren't supported with this connector\n");
return 0;
}
@@ -5084,26 +5075,26 @@ test_object_visit(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -5111,7 +5102,7 @@ test_object_visit(void)
if ((group_id = H5Gcreate2(container_group, OBJECT_VISIT_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", OBJECT_VISIT_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", OBJECT_VISIT_TEST_SUBGROUP_NAME);
goto error;
}
@@ -5123,28 +5114,28 @@ test_object_visit(void)
if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype '%s'\n", OBJECT_VISIT_TEST_TYPE_NAME);
+ printf(" couldn't create datatype '%s'\n", OBJECT_VISIT_TEST_TYPE_NAME);
goto error;
}
if ((group_id2 = H5Gcreate2(group_id, OBJECT_VISIT_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_VISIT_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_VISIT_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dcreate2(group_id, OBJECT_VISIT_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", OBJECT_VISIT_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", OBJECT_VISIT_TEST_DSET_NAME);
goto error;
}
if (H5Tcommit2(group_id, OBJECT_VISIT_TEST_TYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) <
0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", OBJECT_VISIT_TEST_TYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", OBJECT_VISIT_TEST_TYPE_NAME);
goto error;
}
@@ -5168,13 +5159,13 @@ test_object_visit(void)
if (H5Ovisit3(group_id, H5_INDEX_NAME, H5_ITER_INC, object_visit_callback, &i, H5O_INFO_ALL) <
0) {
H5_FAILED();
- HDprintf(" H5Ovisit by object name in increasing order failed\n");
+ printf(" H5Ovisit by object name in increasing order failed\n");
PART_ERROR(H5Ovisit_obj_name_increasing);
}
if (i != OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_obj_name_increasing);
}
@@ -5192,13 +5183,13 @@ test_object_visit(void)
if (H5Ovisit3(group_id, H5_INDEX_NAME, H5_ITER_DEC, object_visit_callback, &i, H5O_INFO_ALL) <
0) {
H5_FAILED();
- HDprintf(" H5Ovisit by object name in decreasing order failed\n");
+ printf(" H5Ovisit by object name in decreasing order failed\n");
PART_ERROR(H5Ovisit_obj_name_decreasing);
}
if (i != 2 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_obj_name_decreasing);
}
@@ -5212,7 +5203,7 @@ test_object_visit(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ovisit_create_order_increasing);
}
@@ -5222,13 +5213,13 @@ test_object_visit(void)
if (H5Ovisit3(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, object_visit_callback, &i,
H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit by creation order in increasing order failed\n");
+ printf(" H5Ovisit by creation order in increasing order failed\n");
PART_ERROR(H5Ovisit_create_order_increasing);
}
if (i != 3 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_create_order_increasing);
}
@@ -5242,7 +5233,7 @@ test_object_visit(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ovisit_create_order_decreasing);
}
@@ -5252,13 +5243,13 @@ test_object_visit(void)
if (H5Ovisit3(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, object_visit_callback, &i,
H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit by creation order in decreasing order failed\n");
+ printf(" H5Ovisit by creation order in decreasing order failed\n");
PART_ERROR(H5Ovisit_create_order_decreasing);
}
if (i != 4 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_create_order_decreasing);
}
@@ -5286,7 +5277,7 @@ test_object_visit(void)
if (H5Ovisit3(dset_id, H5_INDEX_NAME, H5_ITER_INC, object_visit_dset_callback, NULL,
H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit failed\n");
+ printf(" H5Ovisit failed\n");
PART_ERROR(H5Ovisit_dset);
}
@@ -5301,7 +5292,7 @@ test_object_visit(void)
if (H5Ovisit3(type_id, H5_INDEX_NAME, H5_ITER_INC, object_visit_dtype_callback, NULL,
H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit failed\n");
+ printf(" H5Ovisit failed\n");
PART_ERROR(H5Ovisit_dtype);
}
@@ -5320,13 +5311,13 @@ test_object_visit(void)
if (H5Ovisit_by_name3(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, object_visit_callback, &i,
H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by object name in increasing order failed\n");
+ printf(" H5Ovisit_by_name by object name in increasing order failed\n");
PART_ERROR(H5Ovisit_by_name_obj_name_increasing);
}
if (i != OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_obj_name_increasing);
}
@@ -5336,13 +5327,13 @@ test_object_visit(void)
if (H5Ovisit_by_name3(container_group, OBJECT_VISIT_TEST_SUBGROUP_NAME, H5_INDEX_NAME,
H5_ITER_INC, object_visit_callback, &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by object name in increasing order failed\n");
+ printf(" H5Ovisit_by_name by object name in increasing order failed\n");
PART_ERROR(H5Ovisit_by_name_obj_name_increasing);
}
if (i != OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_obj_name_increasing);
}
@@ -5361,13 +5352,13 @@ test_object_visit(void)
if (H5Ovisit_by_name3(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, object_visit_callback, &i,
H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by object name in decreasing order failed\n");
+ printf(" H5Ovisit_by_name by object name in decreasing order failed\n");
PART_ERROR(H5Ovisit_by_name_obj_name_decreasing);
}
if (i != 2 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_obj_name_decreasing);
}
@@ -5377,13 +5368,13 @@ test_object_visit(void)
if (H5Ovisit_by_name3(container_group, OBJECT_VISIT_TEST_SUBGROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, object_visit_callback, &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by object name in decreasing order failed\n");
+ printf(" H5Ovisit_by_name by object name in decreasing order failed\n");
PART_ERROR(H5Ovisit_by_name_obj_name_decreasing);
}
if (i != 2 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_obj_name_decreasing);
}
@@ -5397,7 +5388,7 @@ test_object_visit(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ovisit_by_name_create_order_increasing);
}
@@ -5408,13 +5399,13 @@ test_object_visit(void)
if (H5Ovisit_by_name3(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, object_visit_callback, &i,
H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by creation order in increasing order failed\n");
+ printf(" H5Ovisit_by_name by creation order in increasing order failed\n");
PART_ERROR(H5Ovisit_by_name_create_order_increasing);
}
if (i != 3 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_create_order_increasing);
}
@@ -5424,13 +5415,13 @@ test_object_visit(void)
if (H5Ovisit_by_name3(container_group, OBJECT_VISIT_TEST_SUBGROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_INC, object_visit_callback, &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by creation order in increasing order failed\n");
+ printf(" H5Ovisit_by_name by creation order in increasing order failed\n");
PART_ERROR(H5Ovisit_by_name_create_order_increasing);
}
if (i != 3 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_create_order_increasing);
}
@@ -5444,7 +5435,7 @@ test_object_visit(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ovisit_by_name_create_order_decreasing);
}
@@ -5455,13 +5446,13 @@ test_object_visit(void)
if (H5Ovisit_by_name3(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, object_visit_callback, &i,
H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by creation order in decreasing order failed\n");
+ printf(" H5Ovisit_by_name by creation order in decreasing order failed\n");
PART_ERROR(H5Ovisit_by_name_create_order_decreasing);
}
if (i != 4 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_create_order_decreasing);
}
@@ -5471,13 +5462,13 @@ test_object_visit(void)
if (H5Ovisit_by_name3(container_group, OBJECT_VISIT_TEST_SUBGROUP_NAME, H5_INDEX_CRT_ORDER,
H5_ITER_DEC, object_visit_callback, &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by creation order in decreasing order failed\n");
+ printf(" H5Ovisit_by_name by creation order in decreasing order failed\n");
PART_ERROR(H5Ovisit_by_name_create_order_decreasing);
}
if (i != 4 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_create_order_decreasing);
}
@@ -5505,7 +5496,7 @@ test_object_visit(void)
if (H5Ovisit_by_name3(group_id, OBJECT_VISIT_TEST_DSET_NAME, H5_INDEX_NAME, H5_ITER_INC,
object_visit_dset_callback, NULL, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name failed\n");
+ printf(" H5Ovisit_by_name failed\n");
PART_ERROR(H5Ovisit_by_name_dset);
}
@@ -5520,7 +5511,7 @@ test_object_visit(void)
if (H5Ovisit_by_name3(group_id, OBJECT_VISIT_TEST_TYPE_NAME, H5_INDEX_NAME, H5_ITER_INC,
object_visit_dtype_callback, NULL, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name failed\n");
+ printf(" H5Ovisit_by_name failed\n");
PART_ERROR(H5Ovisit_by_name_dtype);
}
@@ -5599,8 +5590,8 @@ test_object_visit_soft_link(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, soft link, or iterate "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, object, soft link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -5608,26 +5599,26 @@ test_object_visit_soft_link(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create a GCPL\n");
+ printf(" couldn't create a GCPL\n");
goto error;
}
if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ printf(" couldn't enable link creation order tracking and indexing on GCPL\n");
goto error;
}
}
@@ -5635,7 +5626,7 @@ test_object_visit_soft_link(void)
if ((group_id = H5Gcreate2(container_group, OBJECT_VISIT_SOFT_LINK_TEST_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_SUBGROUP_NAME);
goto error;
}
@@ -5643,7 +5634,7 @@ test_object_visit_soft_link(void)
if ((subgroup_id = H5Gcreate2(group_id, OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME1, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME1);
+ printf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME1);
goto error;
}
@@ -5651,7 +5642,7 @@ test_object_visit_soft_link(void)
if ((subgroup_id2 = H5Gcreate2(group_id, OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME2, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME2);
+ printf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME2);
goto error;
}
@@ -5659,45 +5650,45 @@ test_object_visit_soft_link(void)
if ((linked_group_id = H5Gcreate2(subgroup_id2, OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME1, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME1);
+ printf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME1);
goto error;
}
if (H5Gclose(linked_group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME1);
+ printf(" couldn't close group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME1);
goto error;
}
if ((linked_group_id = H5Gcreate2(subgroup_id2, OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME2, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME2);
+ printf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME2);
goto error;
}
if (H5Gclose(linked_group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME2);
+ printf(" couldn't close group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME2);
goto error;
}
if ((linked_group_id = H5Gcreate2(subgroup_id2, OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME3, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME3);
+ printf(" couldn't create group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME3);
goto error;
}
if (H5Gclose(linked_group_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME3);
+ printf(" couldn't close group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME3);
goto error;
}
if (H5Gclose(subgroup_id2) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME2);
+ printf(" couldn't close group '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME2);
goto error;
}
@@ -5706,7 +5697,7 @@ test_object_visit_soft_link(void)
"/" OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME2 "/" OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME1,
subgroup_id, OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME1, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME1);
+ printf(" couldn't create soft link '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME1);
goto error;
}
@@ -5714,7 +5705,7 @@ test_object_visit_soft_link(void)
"/" OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME2 "/" OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME2,
subgroup_id, OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME2);
+ printf(" couldn't create soft link '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME2);
goto error;
}
@@ -5722,7 +5713,7 @@ test_object_visit_soft_link(void)
"/" OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME2 "/" OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME3,
subgroup_id, OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't create soft link '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME3);
+ printf(" couldn't create soft link '%s'\n", OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME3);
goto error;
}
@@ -5746,13 +5737,13 @@ test_object_visit_soft_link(void)
if (H5Ovisit3(subgroup_id, H5_INDEX_NAME, H5_ITER_INC, object_visit_soft_link_callback, &i,
H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit by object name in increasing order failed\n");
+ printf(" H5Ovisit by object name in increasing order failed\n");
PART_ERROR(H5Ovisit_obj_name_increasing);
}
if (i != OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_obj_name_increasing);
}
@@ -5770,13 +5761,13 @@ test_object_visit_soft_link(void)
if (H5Ovisit3(subgroup_id, H5_INDEX_NAME, H5_ITER_DEC, object_visit_soft_link_callback, &i,
H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit by object name in decreasing order failed\n");
+ printf(" H5Ovisit by object name in decreasing order failed\n");
PART_ERROR(H5Ovisit_obj_name_decreasing);
}
if (i != 2 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_obj_name_decreasing);
}
@@ -5790,7 +5781,7 @@ test_object_visit_soft_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ovisit_create_order_increasing);
}
@@ -5800,13 +5791,13 @@ test_object_visit_soft_link(void)
if (H5Ovisit3(subgroup_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, object_visit_soft_link_callback, &i,
H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit by creation order in increasing order failed\n");
+ printf(" H5Ovisit by creation order in increasing order failed\n");
PART_ERROR(H5Ovisit_create_order_increasing);
}
if (i != 3 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_create_order_increasing);
}
@@ -5820,7 +5811,7 @@ test_object_visit_soft_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ovisit_create_order_decreasing);
}
@@ -5830,13 +5821,13 @@ test_object_visit_soft_link(void)
if (H5Ovisit3(subgroup_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, object_visit_soft_link_callback, &i,
H5O_INFO_ALL) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit by creation order in decreasing order failed\n");
+ printf(" H5Ovisit by creation order in decreasing order failed\n");
PART_ERROR(H5Ovisit_create_order_decreasing);
}
if (i != 4 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_create_order_decreasing);
}
@@ -5855,13 +5846,13 @@ test_object_visit_soft_link(void)
if (H5Ovisit_by_name3(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC,
object_visit_soft_link_callback, &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by object name in increasing order failed\n");
+ printf(" H5Ovisit_by_name by object name in increasing order failed\n");
PART_ERROR(H5Ovisit_by_name_obj_name_increasing);
}
if (i != OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_obj_name_increasing);
}
@@ -5873,13 +5864,13 @@ test_object_visit_soft_link(void)
H5_ITER_INC, object_visit_soft_link_callback, &i, H5O_INFO_ALL,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by object name in increasing order failed\n");
+ printf(" H5Ovisit_by_name by object name in increasing order failed\n");
PART_ERROR(H5Ovisit_by_name_obj_name_increasing);
}
if (i != OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_obj_name_increasing);
}
@@ -5898,13 +5889,13 @@ test_object_visit_soft_link(void)
if (H5Ovisit_by_name3(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC,
object_visit_soft_link_callback, &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by object name in decreasing order failed\n");
+ printf(" H5Ovisit_by_name by object name in decreasing order failed\n");
PART_ERROR(H5Ovisit_by_name_obj_name_decreasing);
}
if (i != 2 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_obj_name_decreasing);
}
@@ -5916,13 +5907,13 @@ test_object_visit_soft_link(void)
H5_ITER_DEC, object_visit_soft_link_callback, &i, H5O_INFO_ALL,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by object name in decreasing order failed\n");
+ printf(" H5Ovisit_by_name by object name in decreasing order failed\n");
PART_ERROR(H5Ovisit_by_name_obj_name_decreasing);
}
if (i != 2 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_obj_name_decreasing);
}
@@ -5936,7 +5927,7 @@ test_object_visit_soft_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ovisit_by_name_create_order_increasing);
}
@@ -5947,13 +5938,13 @@ test_object_visit_soft_link(void)
if (H5Ovisit_by_name3(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC,
object_visit_soft_link_callback, &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by creation order in increasing order failed\n");
+ printf(" H5Ovisit_by_name by creation order in increasing order failed\n");
PART_ERROR(H5Ovisit_by_name_create_order_increasing);
}
if (i != 3 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_create_order_increasing);
}
@@ -5965,13 +5956,13 @@ test_object_visit_soft_link(void)
H5_ITER_INC, object_visit_soft_link_callback, &i, H5O_INFO_ALL,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by creation order in increasing order failed\n");
+ printf(" H5Ovisit_by_name by creation order in increasing order failed\n");
PART_ERROR(H5Ovisit_by_name_create_order_increasing);
}
if (i != 3 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_create_order_increasing);
}
@@ -5985,7 +5976,7 @@ test_object_visit_soft_link(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ printf(" creation order tracking isn't supported with this VOL connector\n");
PART_EMPTY(H5Ovisit_by_name_create_order_decreasing);
}
@@ -5996,13 +5987,13 @@ test_object_visit_soft_link(void)
if (H5Ovisit_by_name3(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC,
object_visit_soft_link_callback, &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by creation order in decreasing order failed\n");
+ printf(" H5Ovisit_by_name by creation order in decreasing order failed\n");
PART_ERROR(H5Ovisit_by_name_create_order_decreasing);
}
if (i != 4 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_create_order_decreasing);
}
@@ -6014,13 +6005,13 @@ test_object_visit_soft_link(void)
H5_ITER_DEC, object_visit_soft_link_callback, &i, H5O_INFO_ALL,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name by creation order in decreasing order failed\n");
+ printf(" H5Ovisit_by_name by creation order in decreasing order failed\n");
PART_ERROR(H5Ovisit_by_name_create_order_decreasing);
}
if (i != 4 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED) {
H5_FAILED();
- HDprintf(" some objects were not visited!\n");
+ printf(" some objects were not visited!\n");
PART_ERROR(H5Ovisit_by_name_create_order_decreasing);
}
@@ -6081,8 +6072,7 @@ test_object_visit_invalid_params(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or iterate aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or iterate aren't supported with this connector\n");
return 0;
}
@@ -6090,28 +6080,28 @@ test_object_visit_invalid_params(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- OBJECT_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ OBJECT_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME);
goto error;
}
if ((group_id2 = H5Gcreate2(group_id, OBJECT_VISIT_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_VISIT_INVALID_PARAMS_TEST_GROUP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_VISIT_INVALID_PARAMS_TEST_GROUP_NAME);
goto error;
}
@@ -6132,7 +6122,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit succeeded with an invalid object ID!\n");
+ printf(" H5Ovisit succeeded with an invalid object ID!\n");
PART_ERROR(H5Ovisit_invalid_obj_id);
}
@@ -6153,7 +6143,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Ovisit succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Ovisit_invalid_index_type);
}
@@ -6166,7 +6156,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Ovisit succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Ovisit_invalid_index_type);
}
@@ -6187,7 +6177,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
+ printf(" H5Ovisit succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Ovisit_invalid_iter_order);
}
@@ -6200,7 +6190,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Ovisit succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Ovisit_invalid_iter_order);
}
@@ -6221,7 +6211,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name succeeded with an invalid location ID!\n");
+ printf(" H5Ovisit_by_name succeeded with an invalid location ID!\n");
PART_ERROR(H5Ovisit_by_name_invalid_loc_id);
}
@@ -6242,7 +6232,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name succeeded with a NULL object name!\n");
+ printf(" H5Ovisit_by_name succeeded with a NULL object name!\n");
PART_ERROR(H5Ovisit_by_name_invalid_obj_name);
}
@@ -6255,7 +6245,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name succeeded with an invalid object name of ''!\n");
+ printf(" H5Ovisit_by_name succeeded with an invalid object name of ''!\n");
PART_ERROR(H5Ovisit_by_name_invalid_obj_name);
}
@@ -6276,7 +6266,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
+ printf(" H5Ovisit_by_name succeeded with invalid index type H5_INDEX_UNKNOWN!\n");
PART_ERROR(H5Ovisit_by_name_invalid_index_type);
}
@@ -6289,7 +6279,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name succeeded with invalid index type H5_INDEX_N!\n");
+ printf(" H5Ovisit_by_name succeeded with invalid index type H5_INDEX_N!\n");
PART_ERROR(H5Ovisit_by_name_invalid_index_type);
}
@@ -6310,7 +6300,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
+ printf(" H5Ovisit_by_name succeeded with invalid iteration ordering H5_ITER_UNKNOWN!\n");
PART_ERROR(H5Ovisit_by_name_invalid_iter_order);
}
@@ -6323,7 +6313,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name succeeded with invalid iteration ordering H5_ITER_N!\n");
+ printf(" H5Ovisit_by_name succeeded with invalid iteration ordering H5_ITER_N!\n");
PART_ERROR(H5Ovisit_by_name_invalid_iter_order);
}
@@ -6344,7 +6334,7 @@ test_object_visit_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Ovisit_by_name succeeded with an invalid LAPL!\n");
+ printf(" H5Ovisit_by_name succeeded with an invalid LAPL!\n");
PART_ERROR(H5Ovisit_by_name_invalid_lapl);
}
@@ -6404,8 +6394,8 @@ test_close_object(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, object, dataset, attribute, or stored datatype "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, object, dataset, attribute, or stored datatype "
+ "aren't supported with this connector\n");
return 0;
}
@@ -6413,20 +6403,20 @@ test_close_object(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_CLOSE_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container subgroup '%s'\n", OBJECT_CLOSE_TEST_GROUP_NAME);
+ printf(" couldn't create container subgroup '%s'\n", OBJECT_CLOSE_TEST_GROUP_NAME);
goto error;
}
@@ -6447,7 +6437,7 @@ test_close_object(void)
if ((group_id2 = H5Gcreate2(group_id, OBJECT_CLOSE_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create group '%s'\n", OBJECT_CLOSE_TEST_GRP_NAME);
+ printf(" couldn't create group '%s'\n", OBJECT_CLOSE_TEST_GRP_NAME);
PART_ERROR(H5Oclose_group);
}
@@ -6459,13 +6449,13 @@ test_close_object(void)
if ((group_id2 = H5Oopen(group_id, OBJECT_CLOSE_TEST_GRP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open group '%s' with H5Oopen\n", OBJECT_CLOSE_TEST_GRP_NAME);
+ printf(" couldn't open group '%s' with H5Oopen\n", OBJECT_CLOSE_TEST_GRP_NAME);
PART_ERROR(H5Oclose_group);
}
if (H5Oclose(group_id2) < 0) {
H5_FAILED();
- HDprintf(" couldn't close group '%s' with H5Oclose\n", OBJECT_CLOSE_TEST_GRP_NAME);
+ printf(" couldn't close group '%s' with H5Oclose\n", OBJECT_CLOSE_TEST_GRP_NAME);
PART_ERROR(H5Oclose_group);
}
@@ -6480,7 +6470,7 @@ test_close_object(void)
if ((dset_id = H5Dcreate2(group_id, OBJECT_CLOSE_TEST_DSET_NAME, dset_dtype, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", OBJECT_CLOSE_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", OBJECT_CLOSE_TEST_DSET_NAME);
PART_ERROR(H5Oclose_dset);
}
@@ -6492,13 +6482,13 @@ test_close_object(void)
if ((dset_id = H5Oopen(group_id, OBJECT_CLOSE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s' with H5Oopen\n", OBJECT_CLOSE_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s' with H5Oopen\n", OBJECT_CLOSE_TEST_DSET_NAME);
PART_ERROR(H5Oclose_dset);
}
if (H5Oclose(dset_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close dataset '%s' with H5Oclose\n", OBJECT_CLOSE_TEST_DSET_NAME);
+ printf(" couldn't close dataset '%s' with H5Oclose\n", OBJECT_CLOSE_TEST_DSET_NAME);
PART_ERROR(H5Oclose_dset);
}
@@ -6512,14 +6502,14 @@ test_close_object(void)
if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create datatype '%s'\n", OBJECT_CLOSE_TEST_TYPE_NAME);
+ printf(" couldn't create datatype '%s'\n", OBJECT_CLOSE_TEST_TYPE_NAME);
PART_ERROR(H5Oclose_dtype);
}
if (H5Tcommit2(group_id, OBJECT_CLOSE_TEST_TYPE_NAME, dtype_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't commit datatype '%s'\n", OBJECT_CLOSE_TEST_TYPE_NAME);
+ printf(" couldn't commit datatype '%s'\n", OBJECT_CLOSE_TEST_TYPE_NAME);
PART_ERROR(H5Oclose_dtype);
}
@@ -6531,13 +6521,13 @@ test_close_object(void)
if ((dtype_id = H5Oopen(group_id, OBJECT_CLOSE_TEST_TYPE_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open datatype '%s' with H5Oopen\n", OBJECT_CLOSE_TEST_TYPE_NAME);
+ printf(" couldn't open datatype '%s' with H5Oopen\n", OBJECT_CLOSE_TEST_TYPE_NAME);
PART_ERROR(H5Oclose_dtype);
}
if (H5Oclose(dtype_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't close datatype '%s' with H5Oclose\n", OBJECT_CLOSE_TEST_TYPE_NAME);
+ printf(" couldn't close datatype '%s' with H5Oclose\n", OBJECT_CLOSE_TEST_TYPE_NAME);
PART_ERROR(H5Oclose_dtype);
}
@@ -6596,13 +6586,13 @@ test_close_object_invalid_params(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file or object aren't supported with this connector\n");
+ printf(" API functions for basic file or object aren't supported with this connector\n");
return 0;
}
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
@@ -6614,7 +6604,7 @@ test_close_object_invalid_params(void)
if (err_ret >= 0) {
H5_FAILED();
- HDprintf(" H5Oclose succeeded with an invalid object ID!\n");
+ printf(" H5Oclose succeeded with an invalid object ID!\n");
goto error;
}
@@ -6656,8 +6646,8 @@ test_close_invalid_objects(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or object "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or object "
+ "aren't supported with this connector\n");
return 0;
}
@@ -6668,20 +6658,20 @@ test_close_invalid_objects(void)
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", OBJECT_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, OBJECT_CLOSE_INVALID_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", OBJECT_OPEN_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", OBJECT_OPEN_TEST_GROUP_NAME);
goto error;
}
@@ -6712,7 +6702,7 @@ test_close_invalid_objects(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Oclose succeeded with an invalid object (file)!\n");
+ printf(" H5Oclose succeeded with an invalid object (file)!\n");
PART_ERROR(H5Oclose_file);
}
@@ -6732,7 +6722,7 @@ test_close_invalid_objects(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Oclose succeeded with an invalid object (property list)!\n");
+ printf(" H5Oclose succeeded with an invalid object (property list)!\n");
PART_ERROR(H5Oclose_plist);
}
@@ -6752,7 +6742,7 @@ test_close_invalid_objects(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Oclose succeeded with an invalid object (data space)!\n");
+ printf(" H5Oclose succeeded with an invalid object (data space)!\n");
PART_ERROR(H5Oclose_dspace);
}
@@ -6772,7 +6762,7 @@ test_close_invalid_objects(void)
if (status >= 0) {
H5_FAILED();
- HDprintf(" H5Oclose succeeded with an invalid object (attribute)!\n");
+ printf(" H5Oclose succeeded with an invalid object (attribute)!\n");
PART_ERROR(H5Oclose_attribute);
}
@@ -6894,31 +6884,31 @@ object_copy_attribute_iter_callback(hid_t location_id, const char *attr_name, co
snprintf(expected_name, 256, "attr%d", (int)(*counter));
if (HDstrncmp(attr_name, expected_name, 256)) {
- HDprintf(" attribute name '%s' did not match expected name '%s'\n", attr_name, expected_name);
+ printf(" attribute name '%s' did not match expected name '%s'\n", attr_name, expected_name);
ret_value = H5_ITER_ERROR;
goto done;
}
if ((attr_id = H5Aopen(location_id, attr_name, H5P_DEFAULT)) < 0) {
- HDprintf(" failed to open attribute '%s'\n", attr_name);
+ printf(" failed to open attribute '%s'\n", attr_name);
ret_value = H5_ITER_ERROR;
goto done;
}
if ((attr_type = H5Aget_type(attr_id)) < 0) {
- HDprintf(" failed to retrieve attribute's datatype\n");
+ printf(" failed to retrieve attribute's datatype\n");
ret_value = H5_ITER_ERROR;
goto done;
}
if ((types_equal = H5Tequal(attr_type, H5T_NATIVE_INT)) < 0) {
- HDprintf(" failed to determine if attribute's datatype matched what is expected\n");
+ printf(" failed to determine if attribute's datatype matched what is expected\n");
ret_value = H5_ITER_ERROR;
goto done;
}
if (!types_equal) {
- HDprintf(" attribute datatype did not match expected H5T_NATIVE_INT\n");
+ printf(" attribute datatype did not match expected H5T_NATIVE_INT\n");
ret_value = H5_ITER_ERROR;
goto done;
}
@@ -6950,20 +6940,20 @@ object_copy_soft_link_non_expand_callback(hid_t group, const char *name, const H
/* Make sure the link type is soft */
if (H5L_TYPE_SOFT != info->type) {
- HDprintf(" link type was not H5L_TYPE_SOFT; link must have been expanded!\n");
+ printf(" link type was not H5L_TYPE_SOFT; link must have been expanded!\n");
ret_value = H5_ITER_ERROR;
goto done;
}
if (NULL == (link_val_buf = calloc(1, info->u.val_size))) {
- HDprintf(" failed to allocate buffer for link value\n");
+ printf(" failed to allocate buffer for link value\n");
ret_value = H5_ITER_ERROR;
goto done;
}
/* Retrieve the link's value */
if (H5Lget_val(group, name, link_val_buf, info->u.val_size, H5P_DEFAULT) < 0) {
- HDprintf(" failed to retrieve value of link '%s'\n", name);
+ printf(" failed to retrieve value of link '%s'\n", name);
ret_value = H5_ITER_ERROR;
goto done;
}
@@ -6974,8 +6964,8 @@ object_copy_soft_link_non_expand_callback(hid_t group, const char *name, const H
(int)(*counter));
if (strncmp(link_val_buf, expected_link_val, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_BUF_SIZE)) {
- HDprintf(" value '%s' for link '%s' did not match expected value '%s'\n", (char *)link_val_buf,
- name, expected_link_val);
+ printf(" value '%s' for link '%s' did not match expected value '%s'\n", (char *)link_val_buf, name,
+ expected_link_val);
ret_value = H5_ITER_ERROR;
goto done;
}
@@ -7005,7 +6995,7 @@ object_copy_soft_link_expand_callback(hid_t group, const char *name, const H5L_i
/* Make sure the link type is hard */
if (H5L_TYPE_HARD != info->type) {
- HDprintf(" link type was not H5L_TYPE_HARD; link must not have been expanded!\n");
+ printf(" link type was not H5L_TYPE_HARD; link must not have been expanded!\n");
ret_value = H5_ITER_ERROR;
goto done;
}
@@ -7014,7 +7004,7 @@ object_copy_soft_link_expand_callback(hid_t group, const char *name, const H5L_i
snprintf(expected_link_name, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_BUF_SIZE, "link%d", (int)(*counter));
if (strncmp(name, expected_link_name, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_BUF_SIZE)) {
- HDprintf(" link name '%s' did not match expected name '%s'\n", name, expected_link_name);
+ printf(" link name '%s' did not match expected name '%s'\n", name, expected_link_name);
ret_value = H5_ITER_ERROR;
goto done;
}
@@ -7043,31 +7033,31 @@ object_visit_callback(hid_t o_id, const char *name, const H5O_info2_t *object_in
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
- HDprintf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
+ printf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
}
else if (!HDstrncmp(name, OBJECT_VISIT_TEST_GROUP_NAME, strlen(OBJECT_VISIT_TEST_GROUP_NAME) + 1) &&
(counter_val == 2 || counter_val == 6 || counter_val == 9 || counter_val == 15)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
- HDprintf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
+ printf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
}
else if (!HDstrncmp(name, OBJECT_VISIT_TEST_DSET_NAME, strlen(OBJECT_VISIT_TEST_DSET_NAME) + 1) &&
(counter_val == 1 || counter_val == 7 || counter_val == 10 || counter_val == 14)) {
if (H5O_TYPE_DATASET == object_info->type)
goto done;
else
- HDprintf(" type for object '%s' was not H5O_TYPE_DATASET\n", name);
+ printf(" type for object '%s' was not H5O_TYPE_DATASET\n", name);
}
else if (!HDstrncmp(name, OBJECT_VISIT_TEST_TYPE_NAME, strlen(OBJECT_VISIT_TEST_TYPE_NAME) + 1) &&
(counter_val == 3 || counter_val == 5 || counter_val == 11 || counter_val == 13)) {
if (H5O_TYPE_NAMED_DATATYPE == object_info->type)
goto done;
else
- HDprintf(" type for object '%s' was not H5O_TYPE_NAMED_DATATYPE\n", name);
+ printf(" type for object '%s' was not H5O_TYPE_NAMED_DATATYPE\n", name);
}
else
- HDprintf(" object '%s' didn't match known names or came in an incorrect order\n", name);
+ printf(" object '%s' didn't match known names or came in an incorrect order\n", name);
ret_val = -1;
@@ -7089,12 +7079,12 @@ object_visit_dset_callback(hid_t o_id, const char *name, const H5O_info2_t *obje
UNUSED(op_data);
if (HDstrncmp(name, ".", strlen(".") + 1)) {
- HDprintf(" object '%s' didn't match known names\n", name);
+ printf(" object '%s' didn't match known names\n", name);
return -1;
}
if (H5O_TYPE_DATASET != object_info->type) {
- HDprintf(" object type was not H5O_TYPE_DATASET\n");
+ printf(" object type was not H5O_TYPE_DATASET\n");
return -1;
}
@@ -7113,12 +7103,12 @@ object_visit_dtype_callback(hid_t o_id, const char *name, const H5O_info2_t *obj
UNUSED(op_data);
if (HDstrncmp(name, ".", strlen(".") + 1)) {
- HDprintf(" object '%s' didn't match known names\n", name);
+ printf(" object '%s' didn't match known names\n", name);
return -1;
}
if (H5O_TYPE_NAMED_DATATYPE != object_info->type) {
- HDprintf(" object type was not H5O_TYPE_NAMED_DATATYPE\n");
+ printf(" object type was not H5O_TYPE_NAMED_DATATYPE\n");
return -1;
}
@@ -7142,10 +7132,10 @@ object_visit_soft_link_callback(hid_t o_id, const char *name, const H5O_info2_t
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
- HDprintf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
+ printf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
}
else
- HDprintf(" object '%s' didn't match known names or came in an incorrect order\n", name);
+ printf(" object '%s' didn't match known names or came in an incorrect order\n", name);
ret_val = -1;
@@ -7185,19 +7175,19 @@ H5_api_object_test(void)
size_t i;
int nerrors;
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Object Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Object Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(object_tests); i++) {
nerrors += (*object_tests[i])() ? 1 : 0;
}
- HDprintf("\n");
+ printf("\n");
- HDprintf("Cleaning up testing files\n");
+ printf("Cleaning up testing files\n");
cleanup_files();
return nerrors;
diff --git a/test/API/H5_api_test.c b/test/API/H5_api_test.c
index 3719524..6c91721 100644
--- a/test/API/H5_api_test.c
+++ b/test/API/H5_api_test.c
@@ -162,7 +162,7 @@ main(int argc, char **argv)
TEST_FILE_NAME);
if (NULL == (vol_connector_string = HDgetenv(HDF5_VOL_CONNECTOR))) {
- HDprintf("No VOL connector selected; using native VOL connector\n");
+ printf("No VOL connector selected; using native VOL connector\n");
vol_connector_name = "native";
vol_connector_info = NULL;
}
@@ -170,13 +170,13 @@ main(int argc, char **argv)
char *token;
if (NULL == (vol_connector_string_copy = HDstrdup(vol_connector_string))) {
- HDfprintf(stderr, "Unable to copy VOL connector string\n");
+ fprintf(stderr, "Unable to copy VOL connector string\n");
err_occurred = TRUE;
goto done;
}
if (NULL == (token = HDstrtok(vol_connector_string_copy, " "))) {
- HDfprintf(stderr, "Error while parsing VOL connector string\n");
+ fprintf(stderr, "Error while parsing VOL connector string\n");
err_occurred = TRUE;
goto done;
}
@@ -188,15 +188,15 @@ main(int argc, char **argv)
}
}
- HDprintf("Running API tests with VOL connector '%s' and info string '%s'\n\n", vol_connector_name,
- vol_connector_info ? vol_connector_info : "");
- HDprintf("Test parameters:\n");
- HDprintf(" - Test file name: '%s'\n", H5_api_test_filename);
- HDprintf(" - Test seed: %u\n", seed);
- HDprintf("\n\n");
+ printf("Running API tests with VOL connector '%s' and info string '%s'\n\n", vol_connector_name,
+ vol_connector_info ? vol_connector_info : "");
+ printf("Test parameters:\n");
+ printf(" - Test file name: '%s'\n", H5_api_test_filename);
+ printf(" - Test seed: %u\n", seed);
+ printf("\n\n");
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- HDfprintf(stderr, "Unable to create FAPL\n");
+ fprintf(stderr, "Unable to create FAPL\n");
err_occurred = TRUE;
goto done;
}
@@ -212,14 +212,14 @@ main(int argc, char **argv)
htri_t is_registered;
if ((is_registered = H5VLis_connector_registered_by_name(vol_connector_name)) < 0) {
- HDfprintf(stderr, "Unable to determine if VOL connector is registered\n");
+ fprintf(stderr, "Unable to determine if VOL connector is registered\n");
err_occurred = TRUE;
goto done;
}
if (!is_registered) {
- HDfprintf(stderr, "Specified VOL connector '%s' wasn't correctly registered!\n",
- vol_connector_name);
+ fprintf(stderr, "Specified VOL connector '%s' wasn't correctly registered!\n",
+ vol_connector_name);
err_occurred = TRUE;
goto done;
}
@@ -230,19 +230,19 @@ main(int argc, char **argv)
* for the registered connector before running the tests.
*/
if (H5Pget_vol_id(fapl_id, &default_con_id) < 0) {
- HDfprintf(stderr, "Couldn't retrieve ID of VOL connector set on default FAPL\n");
+ fprintf(stderr, "Couldn't retrieve ID of VOL connector set on default FAPL\n");
err_occurred = TRUE;
goto done;
}
if ((registered_con_id = H5VLget_connector_id_by_name(vol_connector_name)) < 0) {
- HDfprintf(stderr, "Couldn't retrieve ID of registered VOL connector\n");
+ fprintf(stderr, "Couldn't retrieve ID of registered VOL connector\n");
err_occurred = TRUE;
goto done;
}
if (default_con_id != registered_con_id) {
- HDfprintf(stderr, "VOL connector set on default FAPL didn't match specified VOL connector\n");
+ fprintf(stderr, "VOL connector set on default FAPL didn't match specified VOL connector\n");
err_occurred = TRUE;
goto done;
}
@@ -254,7 +254,7 @@ main(int argc, char **argv)
*/
vol_cap_flags_g = H5VL_CAP_FLAG_NONE;
if (H5Pget_vol_cap_flags(fapl_id, &vol_cap_flags_g) < 0) {
- HDfprintf(stderr, "Unable to retrieve VOL connector capability flags\n");
+ fprintf(stderr, "Unable to retrieve VOL connector capability flags\n");
err_occurred = TRUE;
goto done;
}
@@ -264,7 +264,7 @@ main(int argc, char **argv)
* except for those which test file creation.
*/
if (create_test_container(H5_api_test_filename, vol_cap_flags_g) < 0) {
- HDfprintf(stderr, "Unable to create testing container file '%s'\n", H5_api_test_filename);
+ fprintf(stderr, "Unable to create testing container file '%s'\n", H5_api_test_filename);
err_occurred = TRUE;
goto done;
}
@@ -272,36 +272,34 @@ main(int argc, char **argv)
/* Run all the tests that are enabled */
H5_api_test_run();
- HDprintf("Cleaning up testing files\n");
+ printf("Cleaning up testing files\n");
H5Fdelete(H5_api_test_filename, fapl_id);
if (n_tests_run_g > 0) {
- HDprintf("%zu/%zu (%.2f%%) API tests passed with VOL connector '%s'\n", n_tests_passed_g,
- n_tests_run_g, ((double)n_tests_passed_g / (double)n_tests_run_g * 100.0),
- vol_connector_name);
- HDprintf("%zu/%zu (%.2f%%) API tests did not pass with VOL connector '%s'\n", n_tests_failed_g,
- n_tests_run_g, ((double)n_tests_failed_g / (double)n_tests_run_g * 100.0),
- vol_connector_name);
- HDprintf("%zu/%zu (%.2f%%) API tests were skipped with VOL connector '%s'\n", n_tests_skipped_g,
- n_tests_run_g, ((double)n_tests_skipped_g / (double)n_tests_run_g * 100.0),
- vol_connector_name);
+ printf("%zu/%zu (%.2f%%) API tests passed with VOL connector '%s'\n", n_tests_passed_g, n_tests_run_g,
+ ((double)n_tests_passed_g / (double)n_tests_run_g * 100.0), vol_connector_name);
+ printf("%zu/%zu (%.2f%%) API tests did not pass with VOL connector '%s'\n", n_tests_failed_g,
+ n_tests_run_g, ((double)n_tests_failed_g / (double)n_tests_run_g * 100.0), vol_connector_name);
+ printf("%zu/%zu (%.2f%%) API tests were skipped with VOL connector '%s'\n", n_tests_skipped_g,
+ n_tests_run_g, ((double)n_tests_skipped_g / (double)n_tests_run_g * 100.0),
+ vol_connector_name);
}
done:
- HDfree(vol_connector_string_copy);
+ free(vol_connector_string_copy);
if (default_con_id >= 0 && H5VLclose(default_con_id) < 0) {
- HDfprintf(stderr, "Unable to close VOL connector ID\n");
+ fprintf(stderr, "Unable to close VOL connector ID\n");
err_occurred = TRUE;
}
if (registered_con_id >= 0 && H5VLclose(registered_con_id) < 0) {
- HDfprintf(stderr, "Unable to close VOL connector ID\n");
+ fprintf(stderr, "Unable to close VOL connector ID\n");
err_occurred = TRUE;
}
if (fapl_id >= 0 && H5Pclose(fapl_id) < 0) {
- HDfprintf(stderr, "Unable to close FAPL\n");
+ fprintf(stderr, "Unable to close FAPL\n");
err_occurred = TRUE;
}
@@ -311,5 +309,5 @@ done:
MPI_Finalize();
#endif
- HDexit(((err_occurred || n_tests_failed_g > 0) ? EXIT_FAILURE : EXIT_SUCCESS));
+ exit(((err_occurred || n_tests_failed_g > 0) ? EXIT_FAILURE : EXIT_SUCCESS));
}
diff --git a/test/API/H5_api_test_util.c b/test/API/H5_api_test_util.c
index c37a9ed..d7d330f 100644
--- a/test/API/H5_api_test_util.c
+++ b/test/API/H5_api_test_util.c
@@ -167,13 +167,13 @@ roll_datatype:
gen_func = generate_random_datatype_array;
break;
default:
- HDprintf(" invalid datatype class\n");
+ printf(" invalid datatype class\n");
goto done;
break;
}
if ((datatype = (gen_func)(parent_class, is_compact)) < 0) {
- HDprintf(" couldn't generate datatype\n");
+ printf(" couldn't generate datatype\n");
goto done;
}
@@ -185,7 +185,7 @@ roll_datatype:
*/
if (depth == 1) {
if (0 == (type_size = H5Tget_size(datatype))) {
- HDprintf(" failed to retrieve datatype's size\n");
+ printf(" failed to retrieve datatype's size\n");
H5Tclose(datatype);
datatype = H5I_INVALID_HID;
goto done;
@@ -267,12 +267,12 @@ generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_
type_to_copy = H5T_STD_U64LE;
break;
default:
- HDprintf(" invalid value for predefined integer type; should not happen\n");
+ printf(" invalid value for predefined integer type; should not happen\n");
goto done;
}
if ((datatype = H5Tcopy(type_to_copy)) < 0) {
- HDprintf(" couldn't copy predefined integer type\n");
+ printf(" couldn't copy predefined integer type\n");
goto done;
}
@@ -281,7 +281,7 @@ generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_
done:
if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) {
if (H5Tclose(datatype) < 0)
- HDprintf(" couldn't close datatype\n");
+ printf(" couldn't close datatype\n");
}
return ret_value;
@@ -309,12 +309,12 @@ generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
break;
default:
- HDprintf(" invalid value for floating point type; should not happen\n");
+ printf(" invalid value for floating point type; should not happen\n");
goto done;
}
if ((datatype = H5Tcopy(type_to_copy)) < 0) {
- HDprintf(" couldn't copy predefined floating-point type\n");
+ printf(" couldn't copy predefined floating-point type\n");
goto done;
}
@@ -323,7 +323,7 @@ generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
done:
if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) {
if (H5Tclose(datatype) < 0)
- HDprintf(" couldn't close datatype\n");
+ printf(" couldn't close datatype\n");
}
return ret_value;
@@ -344,12 +344,12 @@ generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
if (0 == (rand() % 2)) {
#endif
if ((datatype = H5Tcreate(H5T_STRING, (size_t)(rand() % STRING_TYPE_MAX_SIZE) + 1)) < 0) {
- HDprintf(" couldn't create fixed-length string datatype\n");
+ printf(" couldn't create fixed-length string datatype\n");
goto done;
}
if (H5Tset_strpad(datatype, H5T_STR_NULLPAD) < 0) {
- HDprintf(" couldn't set H5T_STR_NULLPAD for fixed-length string type\n");
+ printf(" couldn't set H5T_STR_NULLPAD for fixed-length string type\n");
goto done;
}
#if 0 /* Currently, all VL types are disabled */
@@ -358,20 +358,20 @@ generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
if ((datatype = H5Tcreate(H5T_STRING, H5T_VARIABLE)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create variable-length string datatype\n");
+ printf(" couldn't create variable-length string datatype\n");
goto done;
}
if (H5Tset_strpad(datatype, H5T_STR_NULLTERM) < 0) {
H5_FAILED();
- HDprintf(" couldn't set H5T_STR_NULLTERM for variable-length string type\n");
+ printf(" couldn't set H5T_STR_NULLTERM for variable-length string type\n");
goto done;
}
}
#endif
if (H5Tset_cset(datatype, H5T_CSET_ASCII) < 0) {
- HDprintf(" couldn't set string datatype character set\n");
+ printf(" couldn't set string datatype character set\n");
goto done;
}
@@ -380,7 +380,7 @@ generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
done:
if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) {
if (H5Tclose(datatype) < 0)
- HDprintf(" couldn't close datatype\n");
+ printf(" couldn't close datatype\n");
}
return ret_value;
@@ -400,7 +400,7 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool
compound_members[i] = H5I_INVALID_HID;
if ((datatype = H5Tcreate(H5T_COMPOUND, 1)) < 0) {
- HDprintf(" couldn't create compound datatype\n");
+ printf(" couldn't create compound datatype\n");
goto done;
}
@@ -413,24 +413,24 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool
HDsnprintf(member_name, 256, "compound_member%zu", i);
if ((compound_members[i] = generate_random_datatype(H5T_COMPOUND, is_compact)) < 0) {
- HDprintf(" couldn't create compound datatype member %zu\n", i);
+ printf(" couldn't create compound datatype member %zu\n", i);
goto done;
}
if (!(member_size = H5Tget_size(compound_members[i]))) {
- HDprintf(" couldn't get compound member %zu size\n", i);
+ printf(" couldn't get compound member %zu size\n", i);
goto done;
}
compound_size += member_size;
if (H5Tset_size(datatype, compound_size) < 0) {
- HDprintf(" couldn't set size for compound datatype\n");
+ printf(" couldn't set size for compound datatype\n");
goto done;
}
if (H5Tinsert(datatype, member_name, next_offset, compound_members[i]) < 0) {
- HDprintf(" couldn't insert compound datatype member %zu\n", i);
+ printf(" couldn't insert compound datatype member %zu\n", i);
goto done;
}
@@ -442,13 +442,13 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool
done:
for (size_t i = 0; i < COMPOUND_TYPE_MAX_MEMBERS; i++) {
if (compound_members[i] > 0 && H5Tclose(compound_members[i]) < 0) {
- HDprintf(" couldn't close compound member %zu\n", i);
+ printf(" couldn't close compound member %zu\n", i);
}
}
if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) {
if (H5Tclose(datatype) < 0)
- HDprintf(" couldn't close datatype\n");
+ printf(" couldn't close datatype\n");
}
return ret_value;
@@ -464,7 +464,7 @@ generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hboo
if (0 == (rand() % 2)) {
#endif
if ((datatype = H5Tcopy(H5T_STD_REF_OBJ)) < 0) {
- HDprintf(" couldn't copy object reference datatype\n");
+ printf(" couldn't copy object reference datatype\n");
goto done;
}
#if 0 /* Region references are currently unsupported */
@@ -472,7 +472,7 @@ generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hboo
else {
if ((datatype = H5Tcopy(H5T_STD_REF_DSETREG)) < 0) {
H5_FAILED();
- HDprintf(" couldn't copy region reference datatype\n");
+ printf(" couldn't copy region reference datatype\n");
goto done;
}
}
@@ -483,7 +483,7 @@ generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hboo
done:
if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) {
if (H5Tclose(datatype) < 0)
- HDprintf(" couldn't close datatype\n");
+ printf(" couldn't close datatype\n");
}
return ret_value;
@@ -498,14 +498,14 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
hid_t ret_value = H5I_INVALID_HID;
if ((datatype = H5Tenum_create(H5T_NATIVE_INT)) < 0) {
- HDprintf(" couldn't create enum datatype\n");
+ printf(" couldn't create enum datatype\n");
goto done;
}
num_members = (size_t)(rand() % ENUM_TYPE_MAX_MEMBERS + 1);
- if (NULL == (enum_member_vals = HDmalloc(num_members * sizeof(int)))) {
- HDprintf(" couldn't allocate space for enum members\n");
+ if (NULL == (enum_member_vals = malloc(num_members * sizeof(int)))) {
+ printf(" couldn't allocate space for enum members\n");
goto done;
}
@@ -529,7 +529,7 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
enum_member_vals[i] = enum_val;
if (H5Tenum_insert(datatype, name, &enum_val) < 0) {
- HDprintf(" couldn't insert member into enum datatype\n");
+ printf(" couldn't insert member into enum datatype\n");
goto done;
}
}
@@ -537,11 +537,11 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
ret_value = datatype;
done:
- HDfree(enum_member_vals);
+ free(enum_member_vals);
if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) {
if (H5Tclose(datatype) < 0)
- HDprintf(" couldn't close datatype\n");
+ printf(" couldn't close datatype\n");
}
return ret_value;
@@ -558,8 +558,8 @@ generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
ndims = (unsigned)(rand() % ARRAY_TYPE_MAX_DIMS + 1);
- if (NULL == (array_dims = HDmalloc(ndims * sizeof(*array_dims)))) {
- HDprintf(" couldn't allocate space for array datatype dims\n");
+ if (NULL == (array_dims = malloc(ndims * sizeof(*array_dims)))) {
+ printf(" couldn't allocate space for array datatype dims\n");
goto done;
}
@@ -567,28 +567,28 @@ generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
array_dims[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1);
if ((base_datatype = generate_random_datatype(H5T_ARRAY, is_compact)) < 0) {
- HDprintf(" couldn't create array base datatype\n");
+ printf(" couldn't create array base datatype\n");
goto done;
}
if ((datatype = H5Tarray_create2(base_datatype, ndims, array_dims)) < 0) {
- HDprintf(" couldn't create array datatype\n");
+ printf(" couldn't create array datatype\n");
goto done;
}
ret_value = datatype;
done:
- HDfree(array_dims);
+ free(array_dims);
if (base_datatype >= 0) {
if (H5Tclose(base_datatype) < 0)
- HDprintf(" couldn't close array base datatype\n");
+ printf(" couldn't close array base datatype\n");
}
if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) {
if (H5Tclose(datatype) < 0)
- HDprintf(" couldn't close datatype\n");
+ printf(" couldn't close datatype\n");
}
return ret_value;
@@ -608,8 +608,8 @@ generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out,
if (rank < 0)
TEST_ERROR;
if (is_compact && (rank > COMPACT_SPACE_MAX_DIMS)) {
- HDprintf(" current rank of compact dataspace (%lld) exceeds maximum dimensionality (%lld)\n",
- (long long)rank, (long long)COMPACT_SPACE_MAX_DIMS);
+ printf(" current rank of compact dataspace (%lld) exceeds maximum dimensionality (%lld)\n",
+ (long long)rank, (long long)COMPACT_SPACE_MAX_DIMS);
TEST_ERROR;
}
@@ -643,12 +643,12 @@ create_test_container(char *filename, uint64_t vol_cap_flags)
hid_t group_id = H5I_INVALID_HID;
if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC)) {
- HDprintf(" VOL connector doesn't support file creation\n");
+ printf(" VOL connector doesn't support file creation\n");
goto error;
}
if ((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDprintf(" couldn't create testing container file '%s'\n", filename);
+ printf(" couldn't create testing container file '%s'\n", filename);
goto error;
}
@@ -658,49 +658,49 @@ create_test_container(char *filename, uint64_t vol_cap_flags)
*/
if ((group_id = H5Gcreate2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >=
0) {
- HDprintf(" created container group for Group tests\n");
+ printf(" created container group for Group tests\n");
H5Gclose(group_id);
}
if ((group_id = H5Gcreate2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) >= 0) {
- HDprintf(" created container group for Attribute tests\n");
+ printf(" created container group for Attribute tests\n");
H5Gclose(group_id);
}
if ((group_id =
H5Gcreate2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
- HDprintf(" created container group for Dataset tests\n");
+ printf(" created container group for Dataset tests\n");
H5Gclose(group_id);
}
if ((group_id =
H5Gcreate2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
- HDprintf(" created container group for Datatype tests\n");
+ printf(" created container group for Datatype tests\n");
H5Gclose(group_id);
}
if ((group_id = H5Gcreate2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >=
0) {
- HDprintf(" created container group for Link tests\n");
+ printf(" created container group for Link tests\n");
H5Gclose(group_id);
}
if ((group_id = H5Gcreate2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >=
0) {
- HDprintf(" created container group for Object tests\n");
+ printf(" created container group for Object tests\n");
H5Gclose(group_id);
}
if ((group_id = H5Gcreate2(file_id, MISCELLANEOUS_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) >= 0) {
- HDprintf(" created container group for Miscellaneous tests\n");
+ printf(" created container group for Miscellaneous tests\n");
H5Gclose(group_id);
}
}
if (H5Fclose(file_id) < 0) {
- HDprintf(" failed to close testing container\n");
+ printf(" failed to close testing container\n");
goto error;
}
@@ -720,7 +720,7 @@ error:
/*
* Add a prefix to the given filename. The caller
* is responsible for freeing the returned filename
- * pointer with HDfree().
+ * pointer with free().
*/
herr_t
prefix_filename(const char *prefix, const char *filename, char **filename_out)
@@ -729,23 +729,23 @@ prefix_filename(const char *prefix, const char *filename, char **filename_out)
herr_t ret_value = SUCCEED;
if (!prefix) {
- HDprintf(" invalid file prefix\n");
+ printf(" invalid file prefix\n");
ret_value = FAIL;
goto done;
}
if (!filename || (*filename == '\0')) {
- HDprintf(" invalid filename\n");
+ printf(" invalid filename\n");
ret_value = FAIL;
goto done;
}
if (!filename_out) {
- HDprintf(" invalid filename_out buffer\n");
+ printf(" invalid filename_out buffer\n");
ret_value = FAIL;
goto done;
}
- if (NULL == (out_buf = HDmalloc(H5_API_TEST_FILENAME_MAX_LENGTH))) {
- HDprintf(" couldn't allocated filename buffer\n");
+ if (NULL == (out_buf = malloc(H5_API_TEST_FILENAME_MAX_LENGTH))) {
+ printf(" couldn't allocated filename buffer\n");
ret_value = FAIL;
goto done;
}
@@ -772,7 +772,7 @@ remove_test_file(const char *prefix, const char *filename)
if (prefix) {
if (prefix_filename(prefix, filename, &prefixed_filename) < 0) {
- HDprintf(" couldn't prefix filename\n");
+ printf(" couldn't prefix filename\n");
ret_value = FAIL;
goto done;
}
@@ -783,13 +783,13 @@ remove_test_file(const char *prefix, const char *filename)
test_file = filename;
if (H5Fdelete(test_file, H5P_DEFAULT) < 0) {
- HDprintf(" couldn't remove file '%s'\n", test_file);
+ printf(" couldn't remove file '%s'\n", test_file);
ret_value = FAIL;
goto done;
}
done:
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return ret_value;
}
diff --git a/test/API/tarray.c b/test/API/tarray.c
index 214a022..7996d91 100644
--- a/test/API/tarray.c
+++ b/test/API/tarray.c
@@ -1055,7 +1055,7 @@ test_array_alloc_custom(size_t size, void *info)
*/
extra = MAX(sizeof(void *), sizeof(size_t));
- if ((ret_value = HDmalloc(extra + size)) != NULL) {
+ if ((ret_value = malloc(extra + size)) != NULL) {
*(size_t *)ret_value = size;
*mem_used += size;
} /* end if */
@@ -1093,7 +1093,7 @@ test_array_free_custom(void *_mem, void *info)
if (_mem != NULL) {
mem = ((unsigned char *)_mem) - extra;
*mem_used -= *(size_t *)((void *)mem);
- HDfree(mem);
+ free(mem);
} /* end if */
} /* end test_array_free_custom() */
@@ -1136,7 +1136,7 @@ test_array_vlen_atomic(void)
/* Initialize array data to write */
for (i = 0; i < SPACE1_DIM1; i++)
for (j = 0; j < ARRAY1_DIM1; j++) {
- wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int));
+ wdata[i][j].p = malloc((size_t)(i + j + 1) * sizeof(unsigned int));
wdata[i][j].len = (size_t)(i + j + 1);
for (k = 0; k < (i + j + 1); k++)
((unsigned int *)wdata[i][j].p)[k] = (unsigned int)(i * 100 + j * 10 + k);
@@ -1357,7 +1357,7 @@ test_array_vlen_array(void)
/* Initialize array data to write */
for (i = 0; i < SPACE1_DIM1; i++)
for (j = 0; j < ARRAY1_DIM1; j++) {
- wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int) * (size_t)ARRAY1_DIM1);
+ wdata[i][j].p = malloc((size_t)(i + j + 1) * sizeof(unsigned int) * (size_t)ARRAY1_DIM1);
wdata[i][j].len = (size_t)(i + j + 1);
for (k = 0; k < (i + j + 1); k++)
for (l = 0; l < ARRAY1_DIM1; l++)
@@ -1632,9 +1632,9 @@ test_array_bkg(void)
/* Initialize the data */
/* ------------------- */
- dtsinfo = (CmpDTSinfo *)HDmalloc(sizeof(CmpDTSinfo));
- CHECK_PTR(dtsinfo, "HDmalloc");
- HDmemset(dtsinfo, 0, sizeof(CmpDTSinfo));
+ dtsinfo = (CmpDTSinfo *)malloc(sizeof(CmpDTSinfo));
+ CHECK_PTR(dtsinfo, "malloc");
+ memset(dtsinfo, 0, sizeof(CmpDTSinfo));
for (i = 0; i < LENGTH; i++) {
for (j = 0; j < ALEN; j++) {
cf[i].a[j] = 100 * (i + 1) + j;
@@ -1662,7 +1662,7 @@ test_array_bkg(void)
/* Initialize the names of data members */
/* ------------------------------------ */
for (i = 0; i < dtsinfo->nsubfields; i++)
- dtsinfo->name[i] = (char *)HDcalloc((size_t)20, sizeof(char));
+ dtsinfo->name[i] = (char *)calloc((size_t)20, sizeof(char));
HDstrcpy(dtsinfo->name[0], "One");
HDstrcpy(dtsinfo->name[1], "Two");
@@ -1734,7 +1734,7 @@ test_array_bkg(void)
/* Release memory resources */
/* ------------------------ */
for (i = 0; i < dtsinfo->nsubfields; i++)
- HDfree(dtsinfo->name[i]);
+ free(dtsinfo->name[i]);
/* Release IDs */
/* ----------- */
@@ -1849,7 +1849,7 @@ test_array_bkg(void)
/* Reset the data to read in */
/* ------------------------- */
- HDmemset(cfr, 0, sizeof(CmpField) * LENGTH);
+ memset(cfr, 0, sizeof(CmpField) * LENGTH);
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfr);
CHECK(status, FAIL, "H5Dread");
@@ -1885,7 +1885,7 @@ test_array_bkg(void)
status = H5Fclose(fid);
CHECK(status, FAIL, "H5Fclose");
- HDfree(dtsinfo);
+ free(dtsinfo);
} /* end test_array_bkg() */
/*-------------------------------------------------------------------------
@@ -1938,7 +1938,7 @@ test_compat(void)
if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0)
TestErrPrintf("can't check if VFD is default VFD compatible\n");
if (!driver_is_default_compatible) {
- HDprintf(" -- SKIPPED --\n");
+ printf(" -- SKIPPED --\n");
return;
}
@@ -2194,7 +2194,7 @@ test_compat(void)
CHECK_I(ret, "H5Fclose");
} /* end if */
else
- HDprintf("***cannot open the pre-created compound datatype test file (%s)\n", testfile);
+ printf("***cannot open the pre-created compound datatype test file (%s)\n", testfile);
} /* end test_compat() */
#endif
diff --git a/test/API/tattr.c b/test/API/tattr.c
index 0e01134..c29db0b 100644
--- a/test/API/tattr.c
+++ b/test/API/tattr.c
@@ -308,8 +308,8 @@ test_attr_basic_write(hid_t fapl)
CHECK(attr_name_size, FAIL, "H5Aget_name");
if (attr_name_size > 0) {
- attr_name = (char *)HDcalloc((size_t)(attr_name_size + 1), sizeof(char));
- CHECK_PTR(attr_name, "HDcalloc");
+ attr_name = (char *)calloc((size_t)(attr_name_size + 1), sizeof(char));
+ CHECK_PTR(attr_name, "calloc");
if (attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
@@ -317,7 +317,7 @@ test_attr_basic_write(hid_t fapl)
ret = HDstrcmp(attr_name, ATTR_TMP_NAME);
VERIFY(ret, 0, "HDstrcmp");
- HDfree(attr_name);
+ free(attr_name);
attr_name = NULL;
} /* end if */
} /* end if */
@@ -345,8 +345,8 @@ test_attr_basic_write(hid_t fapl)
CHECK(attr_name_size, FAIL, "H5Aget_name");
if (attr_name_size > 0) {
- attr_name = (char *)HDcalloc((size_t)(attr_name_size + 1), sizeof(char));
- CHECK_PTR(attr_name, "HDcalloc");
+ attr_name = (char *)calloc((size_t)(attr_name_size + 1), sizeof(char));
+ CHECK_PTR(attr_name, "calloc");
if (attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
@@ -354,7 +354,7 @@ test_attr_basic_write(hid_t fapl)
ret = HDstrcmp(attr_name, ATTR1A_NAME);
VERIFY(ret, 0, "HDstrcmp");
- HDfree(attr_name);
+ free(attr_name);
attr_name = NULL;
} /* end if */
} /* end if */
@@ -576,7 +576,7 @@ test_attr_flush(hid_t fapl)
TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0);
}
else {
- HDprintf("** SKIPPED attribute pre-read due to fill values not being supported **\n");
+ printf("** SKIPPED attribute pre-read due to fill values not being supported **\n");
}
ret = H5Awrite(att, H5T_NATIVE_DOUBLE, &wdata);
@@ -935,11 +935,11 @@ test_attr_compound_read(hid_t fapl)
/* Verify values read in */
for (i = 0; i < ATTR4_DIM1; i++)
for (j = 0; j < ATTR4_DIM2; j++)
- if (HDmemcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct)) != 0) {
- HDprintf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n",
- __LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i);
- HDprintf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n",
- __LINE__, i, j, attr_data4[i][j].d, i, j, read_data4[i][j].d);
+ if (memcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct)) != 0) {
+ printf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n",
+ __LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i);
+ printf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n",
+ __LINE__, i, j, attr_data4[i][j].d, i, j, read_data4[i][j].d);
TestErrPrintf(
"%d: attribute data different: attr_data4[%d][%d].c=%c, read_data4[%d][%d].c=%c\n",
__LINE__, i, j, attr_data4[i][j].c, i, j, read_data4[i][j].c);
@@ -1082,8 +1082,8 @@ test_attr_scalar_read(hid_t fapl)
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_FLT_ABS_EQUAL(rdata, attr_data5))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Aread",
- (double)attr_data5, (double)rdata, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Aread",
+ (double)attr_data5, (double)rdata, (int)__LINE__, __FILE__);
/* Get the attribute's dataspace */
sid = H5Aget_space(attr);
@@ -4717,7 +4717,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -4801,7 +4801,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -4924,7 +4924,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -5036,7 +5036,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -5269,7 +5269,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -5324,7 +5324,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create several attributes, but keep storage in compact form */
@@ -5488,7 +5488,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -5707,7 +5707,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -5835,19 +5835,19 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
old_nerrs = nerrors;
/* Verify the information for first attribute, in increasing creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in increasing creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing creation order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -5860,21 +5860,21 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
*/
if (use_index) {
/* Verify the information for first attribute, in native creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC /* H5_ITER_NATIVE */,
(hsize_t)0, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in native creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC /* H5_ITER_NATIVE */, n, &ainfo,
H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing native order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC /* H5_ITER_NATIVE */, n,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -5883,19 +5883,19 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
} /* end if */
/* Verify the information for first attribute, in decreasing creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, n, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in increasing creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing creation order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -5903,19 +5903,19 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in increasing name order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing name order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -5927,19 +5927,19 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
*/
/* Verify the information for first attribute, in decreasing name order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, n, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in increasing name order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing name order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -6046,7 +6046,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -6575,7 +6575,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -6647,7 +6647,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Delete attributes from compact storage */
@@ -6657,7 +6657,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify the attribute information for first attribute in appropriate order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, &ainfo,
H5P_DEFAULT);
if (new_format) {
@@ -6670,7 +6670,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Verify the name for first attribute in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
@@ -6707,7 +6707,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -6780,7 +6780,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Delete attributes from dense storage */
@@ -6790,7 +6790,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify the attribute information for first attribute in appropriate order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, &ainfo,
H5P_DEFAULT);
if (new_format) {
@@ -6803,7 +6803,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Verify the name for first attribute in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
@@ -6850,7 +6850,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create attributes, to push into dense form */
@@ -6897,7 +6897,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Delete every other attribute from dense storage, in appropriate order */
@@ -6907,7 +6907,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify the attribute information for first attribute in appropriate order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, &ainfo,
H5P_DEFAULT);
if (new_format) {
@@ -6921,7 +6921,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Verify the name for first attribute in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
@@ -6950,7 +6950,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Delete remaining attributes from dense storage, in appropriate order */
@@ -6960,7 +6960,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify the attribute information for first attribute in appropriate order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, &ainfo,
H5P_DEFAULT);
if (new_format) {
@@ -6974,7 +6974,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Verify the name for first attribute in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
@@ -7160,8 +7160,8 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for iterate aren't "
- "supported with this connector\n");
+ printf(" API functions for iterate aren't "
+ "supported with this connector\n");
return 1;
}
@@ -7171,7 +7171,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
@@ -7186,7 +7186,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7201,7 +7201,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7218,7 +7218,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
@@ -7235,7 +7235,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
@@ -7252,7 +7252,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -7266,7 +7266,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7283,7 +7283,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -7297,7 +7297,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7314,7 +7314,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -7330,7 +7330,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)oskip : ((max_attrs - 1) - oskip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
@@ -7347,7 +7347,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -7363,7 +7363,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate2");
@@ -7375,7 +7375,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7387,7 +7387,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7401,7 +7401,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate1");
@@ -7503,8 +7503,8 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- visited = (hbool_t *)HDmalloc(sizeof(hbool_t) * iter_info.max_visit);
- CHECK_PTR(visited, "HDmalloc");
+ visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit);
+ CHECK_PTR(visited, "malloc");
iter_info.visited = visited;
/* Loop over operating on different indices on link fields */
@@ -7589,7 +7589,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -7694,7 +7694,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -7801,7 +7801,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Free the "visited link" array */
- HDfree(visited);
+ free(visited);
} /* test_attr_iterate2() */
/*-------------------------------------------------------------------------
@@ -7996,7 +7996,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -8074,7 +8074,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -8338,7 +8338,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -8444,7 +8444,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -8635,7 +8635,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
#if 0
/* Check on dataset's attribute storage status */
@@ -8698,7 +8698,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -8815,9 +8815,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Writing Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
- HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
+ memset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
sid = H5Screate(H5S_SCALAR);
@@ -9120,7 +9120,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_write() */
/****************************************************************
@@ -9166,9 +9166,9 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Renaming Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
- HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
+ memset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
sid = H5Screate(H5S_SCALAR);
@@ -9580,7 +9580,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_rename() */
/****************************************************************
@@ -9625,9 +9625,9 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Deleting Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
- HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
+ memset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
sid = H5Screate(H5S_SCALAR);
@@ -9964,7 +9964,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_delete() */
/****************************************************************
@@ -10009,9 +10009,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Unlinking Object with Shared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
- HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
+ memset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
sid = H5Screate(H5S_SCALAR);
@@ -10336,7 +10336,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_unlink() */
/****************************************************************
@@ -11629,8 +11629,8 @@ test_attr_delete_last_dense(hid_t fcpl, hid_t fapl)
CHECK(aid, FAIL, "H5Acreate2");
/* Allocate the data buffer */
- data = (double *)HDmalloc((size_t)(DIM0 * DIM1) * sizeof(double));
- CHECK_PTR(data, "HDmalloc");
+ data = (double *)malloc((size_t)(DIM0 * DIM1) * sizeof(double));
+ CHECK_PTR(data, "malloc");
/* Initialize the data */
for (i = 0; i < DIM0; i++)
@@ -11671,7 +11671,7 @@ test_attr_delete_last_dense(hid_t fcpl, hid_t fapl)
/* Free the data buffer */
if (data)
- HDfree(data);
+ free(data);
} /* test_attr_delete_last_dense() */
#endif
diff --git a/test/API/tchecksum.c b/test/API/tchecksum.c
index a77ffcd..e1c2a1a 100644
--- a/test/API/tchecksum.c
+++ b/test/API/tchecksum.c
@@ -57,7 +57,7 @@ test_chksum_size_one(void)
VERIFY(chksum, 0xa209c931, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
chksum = H5_checksum_fletcher32(buf, sizeof(buf));
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -90,7 +90,7 @@ test_chksum_size_two(void)
VERIFY(chksum, 0x8ba7a6c9, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
chksum = H5_checksum_fletcher32(buf, sizeof(buf));
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -123,7 +123,7 @@ test_chksum_size_three(void)
VERIFY(chksum, 0xcebdf4f0, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
chksum = H5_checksum_fletcher32(buf, sizeof(buf));
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -156,7 +156,7 @@ test_chksum_size_four(void)
VERIFY(chksum, 0x2c88bb51, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
chksum = H5_checksum_fletcher32(buf, sizeof(buf));
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -180,8 +180,8 @@ test_chksum_large(void)
size_t u; /* Local index variable */
/* Allocate the buffer */
- large_buf = (uint8_t *)HDmalloc((size_t)BUF_LEN);
- CHECK_PTR(large_buf, "HDmalloc");
+ large_buf = (uint8_t *)malloc((size_t)BUF_LEN);
+ CHECK_PTR(large_buf, "malloc");
/* Initialize buffer w/known data */
for (u = 0; u < BUF_LEN; u++)
@@ -198,7 +198,7 @@ test_chksum_large(void)
VERIFY(chksum, 0x1bd2ee7b, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(large_buf, 0, (size_t)BUF_LEN);
+ memset(large_buf, 0, (size_t)BUF_LEN);
chksum = H5_checksum_fletcher32(large_buf, (size_t)BUF_LEN);
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -209,7 +209,7 @@ test_chksum_large(void)
VERIFY(chksum, 0x930c7afc, "H5_checksum_lookup3");
/* Release memory for buffer */
- HDfree(large_buf);
+ free(large_buf);
} /* test_chksum_large() */
/****************************************************************
diff --git a/test/API/tcoords.c b/test/API/tcoords.c
index 9c66b40..04b4822 100644
--- a/test/API/tcoords.c
+++ b/test/API/tcoords.c
@@ -86,7 +86,7 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
}
/* Construct dataset's name */
- HDmemset(dset_name, 0, (size_t)NAME_LEN);
+ memset(dset_name, 0, (size_t)NAME_LEN);
HDstrcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
HDstrcat(dset_name, "_chunked");
@@ -258,7 +258,7 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
hsize_t mem3_block[4] = {1, 3, 6, 1};
/* Construct dataset's name */
- HDmemset(dset_name, 0, NAME_LEN);
+ memset(dset_name, 0, NAME_LEN);
HDstrcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
HDstrcat(dset_name, "_chunked");
@@ -435,18 +435,18 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
hsize_t mem5_block[8] = {4, 5, 1, 4, 2, 1, 6, 2};
/* Initialize dynamic arrays */
- data_buf = HDcalloc(1, sizeof(*data_buf));
- CHECK_PTR(data_buf, "HDcalloc");
- mem1_buffer = HDcalloc(1, sizeof(*mem1_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem2_buffer = HDcalloc(1, sizeof(*mem2_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem3_buffer = HDcalloc(1, sizeof(*mem3_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem4_buffer = HDcalloc(1, sizeof(*mem4_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem5_buffer = HDcalloc(1, sizeof(*mem5_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
+ data_buf = calloc(1, sizeof(*data_buf));
+ CHECK_PTR(data_buf, "calloc");
+ mem1_buffer = calloc(1, sizeof(*mem1_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem2_buffer = calloc(1, sizeof(*mem2_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem3_buffer = calloc(1, sizeof(*mem3_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem4_buffer = calloc(1, sizeof(*mem4_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem5_buffer = calloc(1, sizeof(*mem5_buffer));
+ CHECK_PTR(data_buf, "calloc");
/* Create and write the dataset */
sid = H5Screate_simple(8, da_dims, da_dims);
@@ -461,7 +461,7 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
}
/* Construct dataset's name */
- HDmemset(dset_name, 0, NAME_LEN);
+ memset(dset_name, 0, NAME_LEN);
HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
HDstrcat(dset_name, "_chunked");
@@ -664,12 +664,12 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
ret = H5Pclose(plid);
CHECK(ret, FAIL, "H5Pclose");
- HDfree(data_buf);
- HDfree(mem1_buffer);
- HDfree(mem2_buffer);
- HDfree(mem3_buffer);
- HDfree(mem4_buffer);
- HDfree(mem5_buffer);
+ free(data_buf);
+ free(mem1_buffer);
+ free(mem2_buffer);
+ free(mem3_buffer);
+ free(mem4_buffer);
+ free(mem5_buffer);
}
/****************************************************************
diff --git a/test/API/testhdf5.c b/test/API/testhdf5.c
index e4dc0b6..f38bfcb 100644
--- a/test/API/testhdf5.c
+++ b/test/API/testhdf5.c
@@ -55,9 +55,9 @@ print_func(const char *format, ...)
va_list arglist;
int ret_value;
- HDva_start(arglist, format);
+ va_start(arglist, format);
ret_value = HDvprintf(format, arglist);
- HDva_end(arglist);
+ va_end(arglist);
return ret_value;
}
@@ -75,9 +75,9 @@ TestErrPrintf(const char *format, ...)
nerrors++;
/* Print the requested information */
- HDva_start(arglist, format);
+ va_start(arglist, format);
ret_value = HDvprintf(format, arglist);
- HDva_end(arglist);
+ va_end(arglist);
/* Return the length of the string produced (like printf() does) */
return ret_value;
@@ -117,7 +117,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
int len;
static char *env = NULL;
- HDassert(name);
+ assert(name);
MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
@@ -125,7 +125,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (mpi_initialized && !mpi_finalized) {
MPI_Comm_rank(comm, &mpi_rank);
MPI_Comm_size(comm, &mpi_size);
- HDassert(root < mpi_size);
+ assert(root < mpi_size);
/* The root task does the getenv call
* and sends the result to the other tasks */
@@ -146,16 +146,16 @@ getenv_all(MPI_Comm comm, int root, const char *name)
MPI_Bcast(&len, 1, MPI_INT, root, comm);
if (len >= 0) {
if (env == NULL)
- env = (char *)HDmalloc((size_t)len + 1);
+ env = (char *)malloc((size_t)len + 1);
else if (HDstrlen(env) < (size_t)len)
- env = (char *)HDrealloc(env, (size_t)len + 1);
+ env = (char *)realloc(env, (size_t)len + 1);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
env[len] = '\0';
}
else {
if (env)
- HDfree(env);
+ free(env);
env = NULL;
}
}
@@ -166,7 +166,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
else {
/* use original getenv */
if (env)
- HDfree(env);
+ free(env);
env = HDgetenv(name);
} /* end if */
@@ -290,7 +290,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!base_name || !fullname || size < 1)
return NULL;
- HDmemset(fullname, 0, size);
+ memset(fullname, 0, size);
/* Determine if driver is set by environment variable. If it is,
* only generate a suffix if fixing the filename for the superblock
@@ -377,13 +377,13 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (mpi_rank == 0)
- HDprintf("*** Hint ***\n"
- "You can use environment variable HDF5_PARAPREFIX to "
- "run parallel test files in a\n"
- "different directory or to add file type prefix. e.g.,\n"
- " HDF5_PARAPREFIX=pfs:/PFS/user/me\n"
- " export HDF5_PARAPREFIX\n"
- "*** End of Hint ***\n");
+ printf("*** Hint ***\n"
+ "You can use environment variable HDF5_PARAPREFIX to "
+ "run parallel test files in a\n"
+ "different directory or to add file type prefix. e.g.,\n"
+ " HDF5_PARAPREFIX=pfs:/PFS/user/me\n"
+ " export HDF5_PARAPREFIX\n"
+ "*** End of Hint ***\n");
explained = TRUE;
#ifdef HDF5_PARAPREFIX
@@ -515,7 +515,7 @@ h5_using_default_driver(const char *drv_name)
{
hbool_t ret_val = TRUE;
- HDassert(H5_DEFAULT_VFD == H5FD_SEC2);
+ assert(H5_DEFAULT_VFD == H5FD_SEC2);
if (!drv_name)
drv_name = HDgetenv(HDF5_DRIVER);
@@ -533,8 +533,8 @@ h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatib
hid_t driver_id = H5I_INVALID_HID;
herr_t ret_value = SUCCEED;
- HDassert(fapl_id >= 0);
- HDassert(default_vfd_compatible);
+ assert(fapl_id >= 0);
+ assert(default_vfd_compatible);
if (fapl_id == H5P_DEFAULT)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
@@ -560,25 +560,25 @@ main(int argc, char *argv[])
(void)argv;
#endif
- HDprintf("===================================\n");
- HDprintf("HDF5 TESTS START\n");
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("HDF5 TESTS START\n");
+ printf("===================================\n");
/* Initialize testing framework */
/* TestInit(argv[0], NULL, NULL); */
/* Tests are generally arranged from least to most complexity... */
/* AddTest("config", test_configure, cleanup_configure, "Configure definitions", NULL); */
- HDprintf("** CONFIGURE DEFINITIONS **\n");
+ printf("** CONFIGURE DEFINITIONS **\n");
test_configure();
- HDprintf("\n");
+ printf("\n");
/* AddTest("metadata", test_metadata, cleanup_metadata, "Encoding/decoding metadata", NULL); */
/* AddTest("checksum", test_checksum, cleanup_checksum, "Checksum algorithm", NULL); */
- HDprintf("** CHECKSUM ALGORITHM **\n");
+ printf("** CHECKSUM ALGORITHM **\n");
test_checksum();
- HDprintf("\n");
+ printf("\n");
/* AddTest("tst", test_tst, NULL, "Ternary Search Trees", NULL); */
@@ -589,89 +589,89 @@ main(int argc, char *argv[])
/* AddTest("refstr", test_refstr, NULL, "Reference Counted Strings", NULL); */
/* AddTest("file", test_file, cleanup_file, "Low-Level File I/O", NULL); */
- HDprintf("** LOW-LEVEL FILE I/O **\n");
+ printf("** LOW-LEVEL FILE I/O **\n");
test_file();
- HDprintf("\n");
+ printf("\n");
/* AddTest("objects", test_h5o, cleanup_h5o, "Generic Object Functions", NULL); */
- HDprintf("** GENERIC OBJECT FUNCTIONS **\n");
+ printf("** GENERIC OBJECT FUNCTIONS **\n");
test_h5o();
- HDprintf("\n");
+ printf("\n");
/* AddTest("h5s", test_h5s, cleanup_h5s, "Dataspaces", NULL); */
- HDprintf("** DATASPACES **\n");
+ printf("** DATASPACES **\n");
test_h5s();
- HDprintf("\n");
+ printf("\n");
/* AddTest("coords", test_coords, cleanup_coords, "Dataspace coordinates", NULL); */
- HDprintf("** DATASPACE COORDINATES **\n");
+ printf("** DATASPACE COORDINATES **\n");
test_coords();
- HDprintf("\n");
+ printf("\n");
/* AddTest("sohm", test_sohm, cleanup_sohm, "Shared Object Header Messages", NULL); */
/* AddTest("attr", test_attr, cleanup_attr, "Attributes", NULL); */
- HDprintf("** ATTRIBUTES **\n");
+ printf("** ATTRIBUTES **\n");
test_attr();
- HDprintf("\n");
+ printf("\n");
/* AddTest("select", test_select, cleanup_select, "Selections", NULL); */
- HDprintf("** SELECTIONS **\n");
+ printf("** SELECTIONS **\n");
test_select();
- HDprintf("\n");
+ printf("\n");
/* AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL); */
- HDprintf("** TIME DATATYPES**\n");
+ printf("** TIME DATATYPES**\n");
test_time();
- HDprintf("\n");
+ printf("\n");
/* AddTest("ref_deprec", test_reference_deprec, cleanup_reference_deprec, "Deprecated References", NULL);
*/
/* AddTest("ref", test_reference, cleanup_reference, "References", NULL); */
- HDprintf("** REFERENCES **\n");
+ printf("** REFERENCES **\n");
test_reference();
- HDprintf("\n");
+ printf("\n");
/* AddTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes", NULL); */
- HDprintf("** VARIABLE-LENGTH DATATYPES **\n");
+ printf("** VARIABLE-LENGTH DATATYPES **\n");
test_vltypes();
- HDprintf("\n");
+ printf("\n");
/* AddTest("vlstrings", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL); */
- HDprintf("** VARIABLE-LENGTH STRINGS **\n");
+ printf("** VARIABLE-LENGTH STRINGS **\n");
test_vlstrings();
- HDprintf("\n");
+ printf("\n");
/* AddTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration", NULL); */
- HDprintf("** GROUP & ATTRIBUTE ITERATION **\n");
+ printf("** GROUP & ATTRIBUTE ITERATION **\n");
test_iterate();
- HDprintf("\n");
+ printf("\n");
/* AddTest("array", test_array, cleanup_array, "Array Datatypes", NULL); */
- HDprintf("** ARRAY DATATYPES **\n");
+ printf("** ARRAY DATATYPES **\n");
test_array();
- HDprintf("\n");
+ printf("\n");
/* AddTest("genprop", test_genprop, cleanup_genprop, "Generic Properties", NULL); */
- HDprintf("** GENERIC PROPERTIES **\n");
+ printf("** GENERIC PROPERTIES **\n");
test_genprop();
- HDprintf("\n");
+ printf("\n");
/* AddTest("unicode", test_unicode, cleanup_unicode, "UTF-8 Encoding", NULL); */
- HDprintf("** UTF-8 ENCODING **\n");
+ printf("** UTF-8 ENCODING **\n");
test_unicode();
- HDprintf("\n");
+ printf("\n");
/* AddTest("id", test_ids, NULL, "User-Created Identifiers", NULL); */
- HDprintf("** USER-CREATED IDENTIFIERS **\n");
+ printf("** USER-CREATED IDENTIFIERS **\n");
test_ids();
- HDprintf("\n");
+ printf("\n");
/* AddTest("misc", test_misc, cleanup_misc, "Miscellaneous", NULL); */
- HDprintf("** MISCELLANEOUS **\n");
+ printf("** MISCELLANEOUS **\n");
test_misc();
- HDprintf("\n");
+ printf("\n");
/* Display testing information */
/* TestInfo(argv[0]); */
@@ -690,7 +690,7 @@ main(int argc, char *argv[])
if (/* GetTestCleanup() && */ !getenv("HDF5_NOCLEANUP")) {
/* TestCleanup(); */
- HDprintf("TEST CLEANUP\n");
+ printf("TEST CLEANUP\n");
H5E_BEGIN_TRY
cleanup_configure();
@@ -712,7 +712,7 @@ main(int argc, char *argv[])
cleanup_misc();
H5E_END_TRY;
- HDprintf("\n");
+ printf("\n");
}
/* Release test infrastructure */
@@ -721,11 +721,11 @@ main(int argc, char *argv[])
/* Exit failure if errors encountered; else exit success. */
/* No need to print anything since PerformTests() already does. */
if (nerrors /* GetTestNumErrs() */ > 0) {
- HDprintf("** HDF5 tests failed with %d errors **\n", nerrors);
- HDexit(EXIT_FAILURE);
+ printf("** HDF5 tests failed with %d errors **\n", nerrors);
+ exit(EXIT_FAILURE);
}
else {
- HDprintf("** HDF5 tests ran successfully **\n");
- HDexit(EXIT_SUCCESS);
+ printf("** HDF5 tests ran successfully **\n");
+ exit(EXIT_SUCCESS);
}
} /* end main() */
diff --git a/test/API/tfile.c b/test/API/tfile.c
index c0b2921..008fd5e 100644
--- a/test/API/tfile.c
+++ b/test/API/tfile.c
@@ -1230,8 +1230,8 @@ test_get_obj_ids(void)
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, (NGROUPS + NDSETS + 1), "H5Fget_obj_count");
- oid_list = (hid_t *)HDcalloc((size_t)oid_list_size, sizeof(hid_t));
- CHECK_PTR(oid_list, "HDcalloc");
+ oid_list = (hid_t *)calloc((size_t)oid_list_size, sizeof(hid_t));
+ CHECK_PTR(oid_list, "calloc");
/* Call the public function H5F_get_obj_ids to use H5F__get_objects. User reported having problem here.
* that the returned size (ret_count) from H5Fget_obj_ids is one greater than the size passed in
@@ -1271,7 +1271,7 @@ test_get_obj_ids(void)
H5Sclose(filespace);
H5Fclose(fid);
- HDfree(oid_list);
+ free(oid_list);
/* Reopen the file to check whether H5Fget_obj_count and H5Fget_obj_ids still works
* when the file is closed first */
@@ -1294,8 +1294,8 @@ test_get_obj_ids(void)
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, NDSETS, "H5Fget_obj_count");
- oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t));
- CHECK_PTR(oid_list, "HDcalloc");
+ oid_list = (hid_t *)calloc((size_t)oid_count, sizeof(hid_t));
+ CHECK_PTR(oid_list, "calloc");
/* Get the list of all opened objects */
ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list);
@@ -1310,7 +1310,7 @@ test_get_obj_ids(void)
}
H5E_END_TRY;
- HDfree(oid_list);
+ free(oid_list);
}
}
@@ -1536,7 +1536,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, hid_t gid2,
if (oid_count > 0) {
hid_t *oid_list;
- oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t));
+ oid_list = (hid_t *)calloc((size_t)oid_count, sizeof(hid_t));
if (oid_list != NULL) {
int i;
@@ -1586,7 +1586,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, hid_t gid2,
} /* end switch */
} /* end for */
- HDfree(oid_list);
+ free(oid_list);
} /* end if */
} /* end if */
@@ -2852,7 +2852,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
CHECK(tid1, FAIL, "H5Tcopy");
/* Second file's dataset read */
- HDmemset(buffer, 0, sizeof(char *) * 5);
+ memset(buffer, 0, sizeof(char *) * 5);
ret = H5Dread(did2, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
CHECK(ret, FAIL, "H5Dread");
ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, buffer);
@@ -2867,7 +2867,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
CHECK(ret, FAIL, "H5Fclose");
/* First file's dataset read */
- HDmemset(buffer, 0, sizeof(char *) * 5);
+ memset(buffer, 0, sizeof(char *) * 5);
ret = H5Dread(did1, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
CHECK(ret, FAIL, "H5Dread");
ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, buffer);
@@ -3245,19 +3245,19 @@ cal_chksum(const char *file, uint32_t *chksum)
CHECK(fdes, FAIL, "HDfstat");
/* Allocate space for the file data */
- file_data = HDmalloc((size_t)sb.st_size);
- CHECK_PTR(file_data, "HDmalloc");
+ file_data = malloc((size_t)sb.st_size);
+ CHECK_PTR(file_data, "malloc");
if (file_data) {
/* Read file's data into memory */
bytes_read = HDread(fdes, file_data, (size_t)sb.st_size);
- CHECK(bytes_read == sb.st_size, FALSE, "HDmalloc");
+ CHECK(bytes_read == sb.st_size, FALSE, "malloc");
/* Calculate checksum */
*chksum = H5_checksum_lookup3(file_data, sizeof(file_data), 0);
/* Free memory */
- HDfree(file_data);
+ free(file_data);
}
/* Close the file */
@@ -4486,9 +4486,9 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
hbool_t relax;
H5FD_mem_t mt;
- HDassert(split);
+ assert(split);
- HDmemset(memb_name, 0, sizeof memb_name);
+ memset(memb_name, 0, sizeof memb_name);
/* Get current split settings */
if (H5Pget_fapl_multi(fapl, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0)
@@ -4512,7 +4512,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- HDfree(memb_name[mt]);
+ free(memb_name[mt]);
return 0;
@@ -4843,7 +4843,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
VERIFY(nsects, FAIL, "H5Fget_free_sections");
/* Retrieve and verify free space info for all the sections */
- HDmemset(all_sect_info, 0, sizeof(all_sect_info));
+ memset(all_sect_info, 0, sizeof(all_sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)nall, all_sect_info);
VERIFY(nsects, nall, "H5Fget_free_sections");
@@ -4857,7 +4857,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
last_size = all_sect_info[nall - 1].size;
/* Retrieve and verify free space info for -1 sections */
- HDmemset(sect_info, 0, sizeof(sect_info));
+ memset(sect_info, 0, sizeof(sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)(nall - 1), sect_info);
VERIFY(nsects, nall, "H5Fget_free_sections");
@@ -4872,7 +4872,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
VERIFY(((hsize_t)free_space - last_size), total, "H5Fget_free_sections");
#endif
/* Retrieve and verify free-space info for +1 sections */
- HDmemset(sect_info, 0, sizeof(sect_info));
+ memset(sect_info, 0, sizeof(sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)(nall + 1), sect_info);
VERIFY(nsects, nall, "H5Fget_free_sections");
@@ -4889,7 +4889,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
VERIFY(free_space, total, "H5Fget_free_sections");
#endif
- HDmemset(meta_sect_info, 0, sizeof(meta_sect_info));
+ memset(meta_sect_info, 0, sizeof(meta_sect_info));
if (multi_vfd) {
hssize_t ntmp;
@@ -4922,7 +4922,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
CHECK(nraw, FAIL, "H5Fget_free_sections");
/* Retrieve and verify free-space sections for raw data */
- HDmemset(raw_sect_info, 0, sizeof(raw_sect_info));
+ memset(raw_sect_info, 0, sizeof(raw_sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DRAW, (size_t)nraw, raw_sect_info);
VERIFY(nsects, nraw, "H5Fget_free_sections");
@@ -5742,7 +5742,7 @@ test_libver_bounds_copy(void)
CHECK_I(ret, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
diff --git a/test/API/tgenprop.c b/test/API/tgenprop.c
index c1ee8af..43b05c1 100644
--- a/test/API/tgenprop.c
+++ b/test/API/tgenprop.c
@@ -703,8 +703,8 @@ test_genprop_basic_list(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_FLT_ABS_EQUAL(prop2_value, *PROP2_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
/* Close list */
ret = H5Pclose(lid1);
@@ -796,20 +796,20 @@ test_genprop_basic_list_prop(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_FLT_ABS_EQUAL(prop2_value, *PROP2_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
/* Check values of temporary properties (set with regular values) */
ret = H5Pget(lid1, PROP3_NAME, &prop3_value);
CHECK_I(ret, "H5Pget");
- if (HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE) != 0)
+ if (memcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE) != 0)
TestErrPrintf("Property #3 doesn't match!, line=%d\n", __LINE__);
ret = H5Pget(lid1, PROP4_NAME, &prop4_value);
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Delete permanent property */
ret = H5Premove(lid1, PROP2_NAME);
@@ -845,8 +845,8 @@ test_genprop_basic_list_prop(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Close list */
ret = H5Pclose(lid1);
@@ -1027,8 +1027,8 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
/* Set the information from the creation call */
prop1_cb_info.crt_count++;
prop1_cb_info.crt_name = HDstrdup(name);
- prop1_cb_info.crt_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.crt_value, def_value, size);
+ prop1_cb_info.crt_value = malloc(size);
+ memcpy(prop1_cb_info.crt_value, def_value, size);
return (SUCCEED);
}
@@ -1047,8 +1047,8 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
if (prop1_cb_info.set_name == NULL)
prop1_cb_info.set_name = HDstrdup(name);
if (prop1_cb_info.set_value == NULL)
- prop1_cb_info.set_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.set_value, value, size);
+ prop1_cb_info.set_value = malloc(size);
+ memcpy(prop1_cb_info.set_value, value, size);
return (SUCCEED);
}
@@ -1067,8 +1067,8 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
if (prop1_cb_info.get_name == NULL)
prop1_cb_info.get_name = HDstrdup(name);
if (prop1_cb_info.get_value == NULL)
- prop1_cb_info.get_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.get_value, value, size);
+ prop1_cb_info.get_value = malloc(size);
+ memcpy(prop1_cb_info.get_value, value, size);
return (SUCCEED);
}
@@ -1086,8 +1086,8 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
if (prop1_cb_info.cop_name == NULL)
prop1_cb_info.cop_name = HDstrdup(name);
if (prop1_cb_info.cop_value == NULL)
- prop1_cb_info.cop_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.cop_value, value, size);
+ prop1_cb_info.cop_value = malloc(size);
+ memcpy(prop1_cb_info.cop_value, value, size);
return (SUCCEED);
}
@@ -1103,7 +1103,7 @@ test_genprop_prop_cmp_cb1(const void *value1, const void *value2, size_t size)
/* Set the information from the comparison call */
prop1_cb_info.cmp_count++;
- return (HDmemcmp(value1, value2, size));
+ return (memcmp(value1, value2, size));
}
/****************************************************************
@@ -1117,7 +1117,7 @@ test_genprop_prop_cmp_cb3(const void *value1, const void *value2, size_t size)
/* Set the information from the comparison call */
prop3_cb_info.cmp_count++;
- return (HDmemcmp(value1, value2, size));
+ return (memcmp(value1, value2, size));
}
/****************************************************************
@@ -1133,8 +1133,8 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
if (prop1_cb_info.cls_name == NULL)
prop1_cb_info.cls_name = HDstrdup(name);
if (prop1_cb_info.cls_value == NULL)
- prop1_cb_info.cls_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.cls_value, value, size);
+ prop1_cb_info.cls_value = malloc(size);
+ memcpy(prop1_cb_info.cls_value, value, size);
return (SUCCEED);
}
@@ -1151,8 +1151,8 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
prop2_cb_info.del_count++;
prop2_cb_info.del_plist_id = plist_id;
prop2_cb_info.del_name = HDstrdup(name);
- prop2_cb_info.del_value = HDmalloc(size);
- HDmemcpy(prop2_cb_info.del_value, value, size);
+ prop2_cb_info.del_value = malloc(size);
+ memcpy(prop2_cb_info.del_value, value, size);
return (SUCCEED);
}
@@ -1221,9 +1221,9 @@ test_genprop_list_callback(void)
cop_cb_struct.id = (-1);
/* Initialize callback information for properties tracked */
- HDmemset(&prop1_cb_info, 0, sizeof(prop_cb_info));
- HDmemset(&prop2_cb_info, 0, sizeof(prop_cb_info));
- HDmemset(&prop3_cb_info, 0, sizeof(prop_cb_info));
+ memset(&prop1_cb_info, 0, sizeof(prop_cb_info));
+ memset(&prop2_cb_info, 0, sizeof(prop_cb_info));
+ memset(&prop3_cb_info, 0, sizeof(prop_cb_info));
/* Create a property list from the class */
lid1 = H5Pcreate(cid1);
@@ -1240,7 +1240,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
if (HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Check values of permanent properties (set with default values) */
@@ -1253,13 +1253,13 @@ test_genprop_list_callback(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_FLT_ABS_EQUAL(prop2_value, *PROP2_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
/* Check values of temporary properties (set with regular values) */
ret = H5Pget(lid1, PROP3_NAME, &prop3_value);
CHECK_I(ret, "H5Pget");
- if (HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE) != 0)
+ if (memcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE) != 0)
TestErrPrintf("Property #3 doesn't match!, line=%d\n", __LINE__);
/* The compare callback should not have been called, as there is no get
* callback for this property */
@@ -1268,15 +1268,15 @@ test_genprop_list_callback(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Set value of property #1 to different value */
@@ -1288,7 +1288,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
if (HDstrcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* The compare callback should not have been called */
@@ -1311,7 +1311,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Delete property #2 */
@@ -1323,7 +1323,7 @@ test_genprop_list_callback(void)
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
if (HDstrcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
TestErrPrintf("Property #2 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
+ if (memcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
TestErrPrintf("Property #2 value doesn't match!, line=%d\n", __LINE__);
/* Copy first list */
@@ -1334,7 +1334,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
if (HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Verify that the class creation callback occurred */
@@ -1357,7 +1357,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
if (HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Close second list */
@@ -1368,18 +1368,18 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.cls_count, 2, "H5Pclose");
/* Free memory allocated for tracking properties */
- HDfree(prop1_cb_info.crt_name);
- HDfree(prop1_cb_info.crt_value);
- HDfree(prop1_cb_info.get_name);
- HDfree(prop1_cb_info.get_value);
- HDfree(prop1_cb_info.set_name);
- HDfree(prop1_cb_info.set_value);
- HDfree(prop1_cb_info.cop_name);
- HDfree(prop1_cb_info.cop_value);
- HDfree(prop1_cb_info.cls_name);
- HDfree(prop1_cb_info.cls_value);
- HDfree(prop2_cb_info.del_name);
- HDfree(prop2_cb_info.del_value);
+ free(prop1_cb_info.crt_name);
+ free(prop1_cb_info.crt_value);
+ free(prop1_cb_info.get_name);
+ free(prop1_cb_info.get_value);
+ free(prop1_cb_info.set_name);
+ free(prop1_cb_info.set_value);
+ free(prop1_cb_info.cop_name);
+ free(prop1_cb_info.cop_value);
+ free(prop1_cb_info.cls_name);
+ free(prop1_cb_info.cls_value);
+ free(prop2_cb_info.del_name);
+ free(prop2_cb_info.del_value);
/* Close class */
ret = H5Pclose_class(cid1);
diff --git a/test/API/th5o.c b/test/API/th5o.c
index 916f005..eab3281 100644
--- a/test/API/th5o.c
+++ b/test/API/th5o.c
@@ -962,10 +962,10 @@ test_h5o_link(void)
/* Allocate memory buffers */
/* (These are treated as 2-D buffers) */
- wdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
- CHECK_PTR(wdata, "HDmalloc");
- rdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
- CHECK_PTR(rdata, "HDmalloc");
+ wdata = (int *)malloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
+ CHECK_PTR(wdata, "malloc");
+ rdata = (int *)malloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
+ CHECK_PTR(rdata, "malloc");
/* Initialize the raw data */
for (i = n = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
@@ -1088,8 +1088,8 @@ test_h5o_link(void)
CHECK(ret, FAIL, "H5Pclose");
/* Release buffers */
- HDfree(wdata);
- HDfree(rdata);
+ free(wdata);
+ free(rdata);
} /* end test_h5o_link() */
#if 0
@@ -1463,8 +1463,8 @@ test_h5o_getinfo_same_file(void)
CHECK(gid2, FAIL, "H5Gcreate2");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, through group IDs */
ret = H5Oget_info3(gid1, &oinfo1, H5O_INFO_BASIC);
@@ -1475,8 +1475,8 @@ test_h5o_getinfo_same_file(void)
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info3");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, by name */
ret = H5Oget_info_by_name3(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT);
@@ -1507,8 +1507,8 @@ test_h5o_getinfo_same_file(void)
CHECK(gid2, FAIL, "H5Gopen2");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, through group IDs */
ret = H5Oget_info3(gid1, &oinfo1, H5O_INFO_BASIC);
@@ -1519,8 +1519,8 @@ test_h5o_getinfo_same_file(void)
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info3");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, by name */
ret = H5Oget_info_by_name3(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT);
@@ -1782,8 +1782,8 @@ test_h5o_getinfo_visit(void)
CHECK(gid2, FAIL, "H5Gcreate2");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for "group1" via H5Oget_info1 and H5Oget_info2 */
ret = H5Oget_info1(gid1, &oinfo1);
@@ -1796,8 +1796,8 @@ test_h5o_getinfo_visit(void)
VERIFY(oinfo1.num_attrs, oinfo2.num_attrs, "obj info from H5Oget_info1/2");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for "group2" via H5Oget_info1 and H5Oget_info2 */
ret = H5Oget_info_by_name1(fid, "group2", &oinfo1, H5P_DEFAULT);
diff --git a/test/API/th5s.c b/test/API/th5s.c
index f09cfeb..e6343f2 100644
--- a/test/API/th5s.c
+++ b/test/API/th5s.c
@@ -148,7 +148,7 @@ test_h5s_basic(void)
rank = H5Sget_simple_extent_dims(sid1, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
sid2 = H5Screate_simple(SPACE2_RANK, dims2, max2);
CHECK(sid2, FAIL, "H5Screate_simple");
@@ -163,16 +163,16 @@ test_h5s_basic(void)
rank = H5Sget_simple_extent_dims(sid2, tdims, tmax);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims2, SPACE2_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tmax, max2, SPACE2_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
/* Change max dims to be equal to the dimensions */
ret = H5Sset_extent_simple(sid1, SPACE1_RANK, dims1, NULL);
CHECK(ret, FAIL, "H5Sset_extent_simple");
rank = H5Sget_simple_extent_dims(sid1, tdims, tmax);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tmax, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tmax, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -213,7 +213,7 @@ test_h5s_basic(void)
CHECK_I(ret, "H5Fclose");
}
else
- HDprintf("***cannot open the pre-created H5S_MAX_RANK test file (%s)\n", testfile);
+ printf("***cannot open the pre-created H5S_MAX_RANK test file (%s)\n", testfile);
}
#endif
/* Verify that incorrect dimensions don't work */
@@ -723,7 +723,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
}
@@ -744,7 +744,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata_short[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
}
}
}
@@ -821,7 +821,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
@@ -846,8 +846,8 @@ test_h5s_zero_dim(void)
for (k = 0; k < SPACE1_DIM3; k++) {
if (rdata_real[i][j][k] != wdata_real[i][j][k]) {
H5_FAILED();
- HDprintf("element [%d][%d][%d] is %d but should have been %d\n", i, j, k,
- rdata_real[i][j][k], wdata_real[i][j][k]);
+ printf("element [%d][%d][%d] is %d but should have been %d\n", i, j, k,
+ rdata_real[i][j][k], wdata_real[i][j][k]);
}
}
}
@@ -870,7 +870,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
if ((vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) &&
@@ -919,7 +919,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
@@ -962,7 +962,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
}
@@ -993,7 +993,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
}
@@ -1014,7 +1014,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata_short[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
}
}
}
@@ -1043,7 +1043,7 @@ test_h5s_zero_dim(void)
rank = H5Sget_simple_extent_dims(sid_chunk, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
/* Set it to chunked dataset */
plist_id = H5Pcreate(H5P_DATASET_CREATE);
@@ -1074,8 +1074,8 @@ test_h5s_zero_dim(void)
for (k = 0; k < SPACE1_DIM3; k++) {
if (rdata_real[i][j][k] != wdata_real[i][j][k]) {
H5_FAILED();
- HDprintf("element [%d][%d][%d] is %d but should have been %d\n", i, j, k,
- rdata_real[i][j][k], wdata_real[i][j][k]);
+ printf("element [%d][%d][%d] is %d but should have been %d\n", i, j, k,
+ rdata_real[i][j][k], wdata_real[i][j][k]);
}
}
}
@@ -1161,7 +1161,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
}
@@ -1198,7 +1198,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata_short[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
}
}
}
@@ -1274,8 +1274,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
CHECK(ret, FAIL, "H5Sencode2");
if (sbuf_size > 0) {
- sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
- CHECK_PTR(sbuf, "HDcalloc");
+ sbuf = (unsigned char *)calloc((size_t)1, sbuf_size);
+ CHECK_PTR(sbuf, "calloc");
}
/* Try decoding bogus buffer */
@@ -1307,7 +1307,7 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
/* Retrieve and verify the dataspace dimensions */
rank = H5Sget_simple_extent_dims(decoded_sid1, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
/* Verify the type of dataspace selection */
sel_type = H5Sget_select_type(decoded_sid1);
@@ -1336,8 +1336,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
CHECK(ret, FAIL, "H5Sencode");
if (null_size > 0) {
- null_sbuf = (unsigned char *)HDcalloc((size_t)1, null_size);
- CHECK_PTR(null_sbuf, "HDcalloc");
+ null_sbuf = (unsigned char *)calloc((size_t)1, null_size);
+ CHECK_PTR(null_sbuf, "calloc");
}
/* Encode the null dataspace in the buffer */
@@ -1372,8 +1372,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
CHECK(ret, FAIL, "H5Sencode");
if (scalar_size > 0) {
- scalar_buf = (unsigned char *)HDcalloc((size_t)1, scalar_size);
- CHECK_PTR(scalar_buf, "HDcalloc");
+ scalar_buf = (unsigned char *)calloc((size_t)1, scalar_size);
+ CHECK_PTR(scalar_buf, "calloc");
}
/* Encode the scalar dataspace in the buffer */
@@ -1411,11 +1411,11 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
/* Release resources */
if (sbuf)
- HDfree(sbuf);
+ free(sbuf);
if (null_sbuf)
- HDfree(null_sbuf);
+ free(null_sbuf);
if (scalar_buf)
- HDfree(scalar_buf);
+ free(scalar_buf);
} /* test_h5s_encode() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -1466,8 +1466,8 @@ test_h5s_encode1(void)
CHECK(ret, FAIL, "H5Sencode2");
if (sbuf_size > 0) {
- sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
- CHECK_PTR(sbuf, "HDcalloc");
+ sbuf = (unsigned char *)calloc((size_t)1, sbuf_size);
+ CHECK_PTR(sbuf, "calloc");
}
/* Try decoding bogus buffer */
@@ -1499,7 +1499,7 @@ test_h5s_encode1(void)
/* Retrieve and verify the dataspace dimensions */
rank = H5Sget_simple_extent_dims(decoded_sid1, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
/* Verify the type of dataspace selection */
sel_type = H5Sget_select_type(decoded_sid1);
@@ -1528,8 +1528,8 @@ test_h5s_encode1(void)
CHECK(ret, FAIL, "H5Sencode");
if (null_size > 0) {
- null_sbuf = (unsigned char *)HDcalloc((size_t)1, null_size);
- CHECK_PTR(null_sbuf, "HDcalloc");
+ null_sbuf = (unsigned char *)calloc((size_t)1, null_size);
+ CHECK_PTR(null_sbuf, "calloc");
}
/* Encode the null dataspace in the buffer */
@@ -1564,8 +1564,8 @@ test_h5s_encode1(void)
CHECK(ret, FAIL, "H5Sencode");
if (scalar_size > 0) {
- scalar_buf = (unsigned char *)HDcalloc((size_t)1, scalar_size);
- CHECK_PTR(scalar_buf, "HDcalloc");
+ scalar_buf = (unsigned char *)calloc((size_t)1, scalar_size);
+ CHECK_PTR(scalar_buf, "calloc");
}
/* Encode the scalar dataspace in the buffer */
@@ -1599,11 +1599,11 @@ test_h5s_encode1(void)
/* Release resources */
if (sbuf)
- HDfree(sbuf);
+ free(sbuf);
if (null_sbuf)
- HDfree(null_sbuf);
+ free(null_sbuf);
if (scalar_buf)
- HDfree(scalar_buf);
+ free(scalar_buf);
} /* test_h5s_encode1() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -1651,8 +1651,8 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
CHECK(ret, FAIL, "H5Sencode2");
/* Allocate the buffer for encoding */
- buf = (char *)HDmalloc(buf_size);
- CHECK_PTR(buf, "HDmalloc");
+ buf = (char *)malloc(buf_size);
+ CHECK_PTR(buf, "malloc");
/* Encode according to the setting in in_fapl */
ret = H5Sencode2(in_sid, buf, &buf_size, in_fapl);
@@ -1711,7 +1711,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
ret = H5Sclose(d_sid);
CHECK(ret, FAIL, "H5Sclose");
if (buf)
- HDfree(buf);
+ free(buf);
}
return (0);
@@ -1790,7 +1790,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
break;
default:
- HDassert(0);
+ assert(0);
break;
} /* end switch */
@@ -1815,7 +1815,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
expected_enc_size = (uint8_t)(expected_version == 3 ? 4 : 8);
break;
default:
- HDassert(0);
+ assert(0);
break;
} /* end switch */
@@ -1840,7 +1840,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
expected_enc_size = 8;
break;
default:
- HDassert(0);
+ assert(0);
break;
}
@@ -1865,7 +1865,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
expected_enc_size = 8;
break;
default:
- HDassert(0);
+ assert(0);
break;
} /* end switch */
@@ -1890,7 +1890,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
expected_enc_size = 8;
break;
default:
- HDassert(0);
+ assert(0);
break;
}
@@ -1984,7 +1984,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
break;
default:
- HDassert(0);
+ assert(0);
break;
}
@@ -2013,7 +2013,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
break;
default:
- HDassert(0);
+ assert(0);
break;
}
@@ -2026,7 +2026,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
/* Verify the version and encoded size expected for the configuration */
- HDassert(expected_enc_size <= 255);
+ assert(expected_enc_size <= 255);
ret = test_h5s_check_encoding(fapl, sid, expected_version, (uint8_t)expected_enc_size,
expected_to_fail);
CHECK(ret, FAIL, "test_h5s_check_encoding");
@@ -2177,7 +2177,7 @@ test_h5s_encode_length(void)
/* Allocate the buffer */
if (sbuf_size > 0) {
- sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
+ sbuf = (unsigned char *)calloc((size_t)1, sbuf_size);
CHECK_PTR(sbuf, "H5Sencode2");
}
@@ -2202,7 +2202,7 @@ test_h5s_encode_length(void)
/* Free the buffer */
if (sbuf)
- HDfree(sbuf);
+ free(sbuf);
/* Close the original dataspace */
ret = H5Sclose(sid);
@@ -2478,11 +2478,11 @@ test_h5s_compound_scalar_read(void)
ret = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata);
CHECK(ret, FAIL, "H5Dread");
- if (HDmemcmp(&space4_data, &rdata, sizeof(struct space4_struct)) != 0) {
- HDprintf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n", space4_data.c1, rdata.c1);
- HDprintf("scalar data different: space4_data.u=%u, read_data4.u=%u\n", space4_data.u, rdata.u);
- HDprintf("scalar data different: space4_data.f=%f, read_data4.f=%f\n", (double)space4_data.f,
- (double)rdata.f);
+ if (memcmp(&space4_data, &rdata, sizeof(struct space4_struct)) != 0) {
+ printf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n", space4_data.c1, rdata.c1);
+ printf("scalar data different: space4_data.u=%u, read_data4.u=%u\n", space4_data.u, rdata.u);
+ printf("scalar data different: space4_data.f=%f, read_data4.f=%f\n", (double)space4_data.f,
+ (double)rdata.f);
TestErrPrintf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n", space4_data.c1,
rdata.c2);
} /* end if */
@@ -2531,17 +2531,17 @@ test_h5s_chunk(void)
int i, j;
/* Allocate memory */
- chunk_data_dbl_data = (double *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(double));
- CHECK_PTR(chunk_data_dbl_data, "HDcalloc");
- chunk_data_dbl = (double **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_dbl_data));
- CHECK_PTR(chunk_data_dbl, "HDcalloc");
+ chunk_data_dbl_data = (double *)calloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(double));
+ CHECK_PTR(chunk_data_dbl_data, "calloc");
+ chunk_data_dbl = (double **)calloc(CHUNK_DATA_NX, sizeof(chunk_data_dbl_data));
+ CHECK_PTR(chunk_data_dbl, "calloc");
for (i = 0; i < CHUNK_DATA_NX; i++)
chunk_data_dbl[i] = chunk_data_dbl_data + (i * CHUNK_DATA_NY);
- chunk_data_flt_data = (float *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(float));
- CHECK_PTR(chunk_data_flt_data, "HDcalloc");
- chunk_data_flt = (float **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_flt_data));
- CHECK_PTR(chunk_data_flt, "HDcalloc");
+ chunk_data_flt_data = (float *)calloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(float));
+ CHECK_PTR(chunk_data_flt_data, "calloc");
+ chunk_data_flt = (float **)calloc(CHUNK_DATA_NX, sizeof(chunk_data_flt_data));
+ CHECK_PTR(chunk_data_flt, "calloc");
for (i = 0; i < CHUNK_DATA_NX; i++)
chunk_data_flt[i] = chunk_data_flt_data + (i * CHUNK_DATA_NY);
@@ -2583,8 +2583,8 @@ test_h5s_chunk(void)
CHECK(status, FAIL, "H5Fclose");
/* Reset/initialize the data arrays to read in */
- HDmemset(chunk_data_dbl_data, 0, sizeof(double) * CHUNK_DATA_NX * CHUNK_DATA_NY);
- HDmemset(chunk_data_flt_data, 0, sizeof(float) * CHUNK_DATA_NX * CHUNK_DATA_NY);
+ memset(chunk_data_dbl_data, 0, sizeof(double) * CHUNK_DATA_NX * CHUNK_DATA_NY);
+ memset(chunk_data_flt_data, 0, sizeof(float) * CHUNK_DATA_NX * CHUNK_DATA_NY);
fileID = H5Fopen(DATAFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fileID, FAIL, "H5Fopen");
@@ -2611,10 +2611,10 @@ test_h5s_chunk(void)
} /* end for */
} /* end for */
- HDfree(chunk_data_dbl);
- HDfree(chunk_data_dbl_data);
- HDfree(chunk_data_flt);
- HDfree(chunk_data_flt_data);
+ free(chunk_data_dbl);
+ free(chunk_data_dbl_data);
+ free(chunk_data_flt);
+ free(chunk_data_flt_data);
} /* test_h5s_chunk() */
/****************************************************************
diff --git a/test/API/tid.c b/test/API/tid.c
index 2dd8851..b353a8a 100644
--- a/test/API/tid.c
+++ b/test/API/tid.c
@@ -34,7 +34,7 @@
static herr_t
free_wrapper(void *p, void H5_ATTR_UNUSED **_ctx)
{
- HDfree(p);
+ free(p);
return SUCCEED;
}
@@ -98,12 +98,12 @@ basic_id_test(void)
* Once the ID has been registered, testObj will be freed when
* its ID type is destroyed.
*/
- testObj = HDmalloc(7 * sizeof(int));
+ testObj = malloc(7 * sizeof(int));
arrayID = H5Iregister(myType, testObj);
CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
if (arrayID == H5I_INVALID_HID) {
- HDfree(testObj);
+ free(testObj);
goto out;
}
@@ -192,12 +192,12 @@ basic_id_test(void)
* freed when the previous type was destroyed. Allocate new
* memory for it.
*/
- testObj = HDmalloc(7 * sizeof(int));
+ testObj = malloc(7 * sizeof(int));
arrayID = H5Iregister(myType, testObj);
CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
if (arrayID == H5I_INVALID_HID) {
- HDfree(testObj);
+ free(testObj);
goto out;
}
@@ -272,7 +272,7 @@ id_predefined_test(void)
void *testPtr;
herr_t testErr;
- testObj = HDmalloc(sizeof(int));
+ testObj = malloc(sizeof(int));
/*
* Attempt to perform public functions on various library types
@@ -363,14 +363,14 @@ id_predefined_test(void)
/* testObj was never registered as an atom, so it will not be
* automatically freed. */
- HDfree(testObj);
+ free(testObj);
return 0;
out:
if (typeID != H5I_INVALID_HID)
H5Tclose(typeID);
if (testObj != NULL)
- HDfree(testObj);
+ free(testObj);
return -1;
}
@@ -720,8 +720,8 @@ test_remove_clear_type(void)
/* Create an array to hold the objects in the master list */
list_size = RCT_MAX_NOBJS * sizeof(rct_obj_t);
- obj_list.objects = HDmalloc(list_size);
- CHECK_PTR(obj_list.objects, "HDcalloc");
+ obj_list.objects = malloc(list_size);
+ CHECK_PTR(obj_list.objects, "calloc");
if (NULL == obj_list.objects)
goto error;
@@ -740,7 +740,7 @@ test_remove_clear_type(void)
* Build object list *
*********************/
- HDmemset(obj_list.objects, 0, list_size);
+ memset(obj_list.objects, 0, list_size);
/* The number of objects used is a random number between the min and max */
obj_list.count = obj_list.remaining =
@@ -866,7 +866,7 @@ test_remove_clear_type(void)
goto error;
/* Free the object array */
- HDfree(obj_list.objects);
+ free(obj_list.objects);
return 0;
@@ -878,7 +878,7 @@ error:
}
H5E_END_TRY
- HDfree(obj_list.objects);
+ free(obj_list.objects);
return -1;
} /* end test_remove_clear_type() */
@@ -901,7 +901,7 @@ free_actual_object(void *_p, void H5_ATTR_UNUSED **_ctx)
if (7 != *p)
return FAIL;
- HDfree(p);
+ free(p);
return SUCCEED;
}
@@ -934,7 +934,7 @@ realize_future_cb(void *_future_obj, hid_t *actual_id)
}
else {
/* Create a new object (the 'actual object') of the correct type */
- if (NULL == (actual_obj = HDmalloc(sizeof(int))))
+ if (NULL == (actual_obj = malloc(sizeof(int))))
return FAIL;
*actual_obj = 7;
@@ -955,7 +955,7 @@ discard_future_cb(void *future_obj)
if (NULL == future_obj)
return FAIL;
- HDfree(future_obj);
+ free(future_obj);
return SUCCEED;
}
@@ -970,7 +970,7 @@ realize_future_generate_cb(void *_future_obj, hid_t *actual_id)
if (NULL != future_obj)
return FAIL;
/* Create a new object (the 'actual object') of the correct type */
- if (NULL == (actual_obj = HDmalloc(sizeof(int))))
+ if (NULL == (actual_obj = malloc(sizeof(int))))
return FAIL;
*actual_obj = 7;
@@ -1054,7 +1054,7 @@ test_future_ids(void)
/* Test base use-case: create a future object and destroy type without
* realizing the future object.
*/
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = obj_type;
future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1074,7 +1074,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object and realize the actual object. */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = obj_type;
future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1160,7 +1160,7 @@ test_future_ids(void)
/* Test base use-case: create a future object for a pre-defined type */
/* (DATASPACE) */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATASPACE;
future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1178,7 +1178,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATASPACE;
future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1201,7 +1201,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATASPACE;
future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1232,7 +1232,7 @@ test_future_ids(void)
/* Test base use-case: create a future object for a pre-defined type */
/* (DATATYPE) */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATATYPE;
future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1250,7 +1250,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATATYPE;
future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1273,7 +1273,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATATYPE;
future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1304,7 +1304,7 @@ test_future_ids(void)
/* Test base use-case: create a future object for a pre-defined type */
/* (PROPERTY LIST) */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_GENPROP_LST;
future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1322,7 +1322,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_GENPROP_LST;
future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1345,7 +1345,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_GENPROP_LST;
future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
diff --git a/test/API/titerate.c b/test/API/titerate.c
index 6d86130..8ccbe27 100644
--- a/test/API/titerate.c
+++ b/test/API/titerate.c
@@ -92,8 +92,8 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for iterate aren't "
- "supported with this connector\n");
+ printf(" API functions for iterate aren't "
+ "supported with this connector\n");
return 1;
}
@@ -115,7 +115,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
return (count2 > 10 ? 1 : 0);
default:
- HDprintf("invalid iteration command");
+ printf("invalid iteration command");
return (-1);
} /* end switch */
} /* end liter_cb() */
@@ -381,7 +381,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
/* Free the dataset names */
for (i = 0; i < (NDATASETS + 2); i++)
- HDfree(lnames[i]);
+ free(lnames[i]);
}
} /* test_iter_group() */
@@ -415,7 +415,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
return (count2 > 10 ? 1 : 0);
default:
- HDprintf("invalid iteration command");
+ printf("invalid iteration command");
return (-1);
} /* end switch */
} /* end aiter_cb() */
@@ -444,7 +444,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
if ((vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) && (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) &&
(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) && (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
- HDmemset(&info, 0, sizeof(iter_info));
+ memset(&info, 0, sizeof(iter_info));
/* Create the test file with the datasets */
file = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -590,7 +590,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
/* Free the attribute names */
for (i = 0; i < NATTR; i++)
- HDfree(anames[i]);
+ free(anames[i]);
}
} /* test_iter_attr() */
@@ -619,8 +619,8 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC)) {
SKIPPED();
- HDprintf(" API functions for iterate and basic links aren't "
- "supported with this connector\n");
+ printf(" API functions for iterate and basic links aren't "
+ "supported with this connector\n");
return 1;
}
@@ -672,8 +672,8 @@ test_iter_group_large(hid_t fapl)
} s1_t;
/* Allocate & initialize array */
- names = (iter_info *)HDcalloc(sizeof(iter_info), (ITER_NGROUPS + 2));
- CHECK_PTR(names, "HDcalloc");
+ names = (iter_info *)calloc(sizeof(iter_info), (ITER_NGROUPS + 2));
+ CHECK_PTR(names, "calloc");
/* Output message about test being performed */
MESSAGE(5, ("Testing Large Group Iteration Functionality\n"));
@@ -768,7 +768,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
/* Release memory */
- HDfree(names);
+ free(names);
}
} /* test_iterate_group_large() */
@@ -921,8 +921,8 @@ test_grp_memb_funcs(hid_t fapl)
/* Free the dataset names */
for (i = 0; i < (NDATASETS + 2); i++) {
- HDfree(dnames[i]);
- HDfree(obj_names[i]);
+ free(dnames[i]);
+ free(obj_names[i]);
} /* end for */
} /* test_grp_memb_funcs() */
@@ -1068,7 +1068,7 @@ test_corrupted_attnamelen(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
diff --git a/test/API/tmisc.c b/test/API/tmisc.c
index 723c3d2..4094b48 100644
--- a/test/API/tmisc.c
+++ b/test/API/tmisc.c
@@ -496,8 +496,8 @@ test_misc2_write_attribute(void)
char *string_att1 = HDstrdup("string attribute in file one");
char *string_att2 = HDstrdup("string attribute in file two");
- HDmemset(&data, 0, sizeof(data));
- HDmemset(&data_check, 0, sizeof(data_check));
+ memset(&data, 0, sizeof(data));
+ memset(&data_check, 0, sizeof(data_check));
type = misc2_create_type();
@@ -568,8 +568,8 @@ test_misc2_write_attribute(void)
ret = H5Fclose(file2);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(string_att1);
- HDfree(string_att2);
+ free(string_att1);
+ free(string_att2);
}
static void
@@ -782,7 +782,7 @@ create_struct3(void)
misc5_struct3_hndl *str3hndl; /* New 'struct3' created */
herr_t ret; /* For error checking */
- str3hndl = (misc5_struct3_hndl *)HDmalloc(sizeof(misc5_struct3_hndl));
+ str3hndl = (misc5_struct3_hndl *)malloc(sizeof(misc5_struct3_hndl));
CHECK_PTR(str3hndl, "malloc");
str3hndl->st3h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct3));
@@ -808,7 +808,7 @@ delete_struct3(misc5_struct3_hndl *str3hndl)
ret = H5Tclose(str3hndl->st3h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str3hndl);
+ free(str3hndl);
}
static void
@@ -825,8 +825,8 @@ create_struct2(void)
misc5_struct2_hndl *str2hndl; /* New 'struct2' created */
herr_t ret; /* For error checking */
- str2hndl = (misc5_struct2_hndl *)HDmalloc(sizeof(misc5_struct2_hndl));
- CHECK_PTR(str2hndl, "HDmalloc");
+ str2hndl = (misc5_struct2_hndl *)malloc(sizeof(misc5_struct2_hndl));
+ CHECK_PTR(str2hndl, "malloc");
str2hndl->st2h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct2));
CHECK(str2hndl->st2h_base, FAIL, "H5Tcreate");
@@ -860,7 +860,7 @@ delete_struct2(misc5_struct2_hndl *str2hndl)
H5Tclose(str2hndl->st2h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str2hndl);
+ free(str2hndl);
}
static void
@@ -871,8 +871,8 @@ set_struct2(misc5_struct2 *buf)
buf->st2_el1 = MISC5_DBGELVAL2;
buf->st2_el2.len = MISC5_DBGNELM3;
- buf->st2_el2.p = HDmalloc((buf->st2_el2.len) * sizeof(misc5_struct3));
- CHECK_PTR(buf->st2_el2.p, "HDmalloc");
+ buf->st2_el2.p = malloc((buf->st2_el2.len) * sizeof(misc5_struct3));
+ CHECK_PTR(buf->st2_el2.p, "malloc");
for (i = 0; i < (buf->st2_el2.len); i++)
set_struct3(&(((misc5_struct3 *)(buf->st2_el2.p))[i]));
@@ -881,7 +881,7 @@ set_struct2(misc5_struct2 *buf)
static void
clear_struct2(misc5_struct2 *buf)
{
- HDfree(buf->st2_el2.p);
+ free(buf->st2_el2.p);
}
/*********************** struct1 ***********************/
@@ -892,8 +892,8 @@ create_struct1(void)
misc5_struct1_hndl *str1hndl; /* New 'struct1' created */
herr_t ret; /* For error checking */
- str1hndl = (misc5_struct1_hndl *)HDmalloc(sizeof(misc5_struct1_hndl));
- CHECK_PTR(str1hndl, "HDmalloc");
+ str1hndl = (misc5_struct1_hndl *)malloc(sizeof(misc5_struct1_hndl));
+ CHECK_PTR(str1hndl, "malloc");
str1hndl->st1h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct1));
CHECK(str1hndl->st1h_base, FAIL, "H5Tcreate");
@@ -927,7 +927,7 @@ delete_struct1(misc5_struct1_hndl *str1hndl)
ret = H5Tclose(str1hndl->st1h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str1hndl);
+ free(str1hndl);
}
static void
@@ -938,8 +938,8 @@ set_struct1(misc5_struct1 *buf)
buf->st1_el1 = MISC5_DBGELVAL1;
buf->st1_el2.len = MISC5_DBGNELM2;
- buf->st1_el2.p = HDmalloc((buf->st1_el2.len) * sizeof(misc5_struct2));
- CHECK_PTR(buf->st1_el2.p, "HDmalloc");
+ buf->st1_el2.p = malloc((buf->st1_el2.len) * sizeof(misc5_struct2));
+ CHECK_PTR(buf->st1_el2.p, "malloc");
for (i = 0; i < (buf->st1_el2.len); i++)
set_struct2(&(((misc5_struct2 *)(buf->st1_el2.p))[i]));
@@ -952,7 +952,7 @@ clear_struct1(misc5_struct1 *buf)
for (i = 0; i < buf->st1_el2.len; i++)
clear_struct2(&(((misc5_struct2 *)(buf->st1_el2.p))[i]));
- HDfree(buf->st1_el2.p);
+ free(buf->st1_el2.p);
}
static void
@@ -989,8 +989,8 @@ test_misc5(void)
/* Create the variable-length buffer */
buf.len = MISC5_DBGNELM1;
- buf.p = HDmalloc((buf.len) * sizeof(misc5_struct1));
- CHECK_PTR(buf.p, "HDmalloc");
+ buf.p = malloc((buf.len) * sizeof(misc5_struct1));
+ CHECK_PTR(buf.p, "malloc");
/* Create the top-level VL information */
for (i = 0; i < MISC5_DBGNELM1; i++)
@@ -1005,7 +1005,7 @@ test_misc5(void)
clear_struct1(&(((misc5_struct1 *)(buf.p))[j]));
/* Free the variable-length buffer */
- HDfree(buf.p);
+ free(buf.p);
/* Close dataset */
ret = H5Dclose(dataset_id);
@@ -1044,16 +1044,16 @@ test_misc5(void)
/* Verify the correct information was read in */
for (i = 0; i < (buf.len); i++) {
- /* HDprintf("[%d]=%d\n",i, ((misc5_struct1 *)(buf.p))[i].st1_el1); */
+ /* printf("[%d]=%d\n",i, ((misc5_struct1 *)(buf.p))[i].st1_el1); */
VERIFY(((misc5_struct1 *)(buf.p))[i].st1_el1, MISC5_DBGELVAL1, "H5Dread");
for (j = 0; j < (((misc5_struct1 *)(buf.p))[i].st1_el2.len); j++) {
- /* HDprintf(" [%d]=%d\n",j, ((misc5_struct2 *)(((misc5_struct1 *)
+ /* printf(" [%d]=%d\n",j, ((misc5_struct2 *)(((misc5_struct1 *)
* (buf.p))[i].st1_el2.p))[j].st2_el1); */
VERIFY(((misc5_struct2 *)(((misc5_struct1 *)(buf.p))[i].st1_el2.p))[j].st2_el1, MISC5_DBGELVAL2,
"H5Dread");
for (k = 0; k < (((misc5_struct2 *)(((misc5_struct1 *)(buf.p))[i].st1_el2.p))[j].st2_el2.len);
k++) {
- /* HDprintf(" [%d]=%d\n",k, ((misc5_struct3 *)(((misc5_struct2 *) (((misc5_struct1
+ /* printf(" [%d]=%d\n",k, ((misc5_struct3 *)(((misc5_struct2 *) (((misc5_struct1
* *)(buf.p))[i]. st1_el2.p))[j].st2_el2.p))[k].st3_el1); */
VERIFY(((misc5_struct3 *)(((misc5_struct2 *)(((misc5_struct1 *)(buf.p))[i].st1_el2.p))[j]
.st2_el2.p))[k]
@@ -1323,11 +1323,11 @@ test_misc8(void)
MESSAGE(5, ("Testing dataset storage sizes\n"));
/* Allocate space for the data to write & read */
- wdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK_PTR(wdata, "HDmalloc");
+ wdata = (int *)malloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
+ CHECK_PTR(wdata, "malloc");
#ifdef VERIFY_DATA
- rdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK_PTR(rdata, "HDmalloc");
+ rdata = (int *)malloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
+ CHECK_PTR(rdata, "malloc");
#endif /* VERIFY_DATA */
/* Initialize values */
@@ -1794,9 +1794,9 @@ test_misc8(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free the read & write buffers */
- HDfree(wdata);
+ free(wdata);
#ifdef VERIFY_DATA
- HDfree(rdata);
+ free(rdata);
#endif /* VERIFY_DATA */
} /* end test_misc8() */
#endif
@@ -1863,7 +1863,7 @@ test_misc10(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -2264,8 +2264,8 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
herr_t ret; /* Generic return value */
/* Create a data buffer for the dataset read */
- read_data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
- CHECK_PTR(read_data, "HDcalloc");
+ read_data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(read_data, "calloc");
/* Open the contiguous dataset in the root group */
dsid = H5Dopen2(loc_id, name, H5P_DEFAULT);
@@ -2284,7 +2284,7 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
CHECK(ret, FAIL, "H5Dclose");
/* Free the dataset read buffer */
- HDfree(read_data);
+ free(read_data);
} /* end misc13_verify_dataset() */
@@ -2390,27 +2390,27 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
int ret; /* Generic status value */
/* Allocate space for the user block */
- user_block = HDcalloc(size, (size_t)1);
- CHECK_PTR(user_block, "HDcalloc");
+ user_block = calloc(size, (size_t)1);
+ CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
- HDmemcpy(user_block, str, HDstrlen(str));
+ memcpy(user_block, str, HDstrlen(str));
/* Open the new file */
- new_fp = HDfopen(new_name, "wb");
- CHECK_PTR(new_fp, "HDfopen");
+ new_fp = fopen(new_name, "wb");
+ CHECK_PTR(new_fp, "fopen");
/* Write the user block to the new file */
written = HDfwrite(user_block, (size_t)1, size, new_fp);
VERIFY(written, size, "HDfwrite");
/* Open the old file */
- old_fp = HDfopen(old_name, "rb");
- CHECK_PTR(old_fp, "HDfopen");
+ old_fp = fopen(old_name, "rb");
+ CHECK_PTR(old_fp, "fopen");
/* Allocate space for the copy buffer */
- copy_buf = HDmalloc((size_t)MISC13_COPY_BUF_SIZE);
- CHECK_PTR(copy_buf, "HDmalloc");
+ copy_buf = malloc((size_t)MISC13_COPY_BUF_SIZE);
+ CHECK_PTR(copy_buf, "malloc");
/* Copy data from the old file to the new file */
while ((read_in = HDfread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) {
@@ -2428,10 +2428,10 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
VERIFY(ret, 0, "HDfclose");
/* Free the copy buffer */
- HDfree(copy_buf);
+ free(copy_buf);
/* Free the user block */
- HDfree(user_block);
+ free(user_block);
} /* end misc13_insert_user_block() */
@@ -2559,8 +2559,8 @@ test_misc13(void)
hbool_t check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
/* Create a data buffer for the datasets */
- data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
- CHECK_PTR(data, "HDcalloc");
+ data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(data, "calloc");
/* Initialize data to write */
misc13_init_data(data);
@@ -2590,7 +2590,7 @@ test_misc13(void)
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Free the dataset buffer */
- HDfree(data);
+ free(data);
} /* end test_misc13() */
#endif
@@ -2888,15 +2888,15 @@ test_misc16(void)
hsize_t dims[] = {MISC16_SPACE_DIM};
int i;
- HDmemset(wdata, 0, sizeof(wdata));
- HDmemset(rdata, 0, sizeof(rdata));
+ memset(wdata, 0, sizeof(wdata));
+ memset(rdata, 0, sizeof(rdata));
/* Initialize the data */
/* (Note that these are supposed to stress the code, so are a little weird) */
- HDmemcpy(wdata[0], "1234567", MISC16_STR_SIZE);
- HDmemcpy(wdata[1], "1234567\0", MISC16_STR_SIZE);
- HDmemcpy(wdata[2], "12345678", MISC16_STR_SIZE);
- HDmemcpy(wdata[3], "\0\0\0\0\0\0\0\0", MISC16_STR_SIZE);
+ memcpy(wdata[0], "1234567", MISC16_STR_SIZE);
+ memcpy(wdata[1], "1234567\0", MISC16_STR_SIZE);
+ memcpy(wdata[2], "12345678", MISC16_STR_SIZE);
+ memcpy(wdata[3], "\0\0\0\0\0\0\0\0", MISC16_STR_SIZE);
/* Create the file */
file = H5Fcreate(MISC16_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2979,15 +2979,15 @@ test_misc17(void)
hsize_t dims[] = {MISC17_SPACE_DIM1, MISC17_SPACE_DIM2};
int i;
- HDmemset(wdata, 0, sizeof(wdata));
- HDmemset(rdata, 0, sizeof(rdata));
+ memset(wdata, 0, sizeof(wdata));
+ memset(rdata, 0, sizeof(rdata));
/* Initialize the data */
/* (Note that these are supposed to stress the code, so are a little weird) */
- HDmemcpy(wdata[0], "1234567", MISC17_SPACE_DIM2);
- HDmemcpy(wdata[1], "1234567\0", MISC17_SPACE_DIM2);
- HDmemcpy(wdata[2], "12345678", MISC17_SPACE_DIM2);
- HDmemcpy(wdata[3], "\0\0\0\0\0\0\0\0", MISC17_SPACE_DIM2);
+ memcpy(wdata[0], "1234567", MISC17_SPACE_DIM2);
+ memcpy(wdata[1], "1234567\0", MISC17_SPACE_DIM2);
+ memcpy(wdata[2], "12345678", MISC17_SPACE_DIM2);
+ memcpy(wdata[3], "\0\0\0\0\0\0\0\0", MISC17_SPACE_DIM2);
/* Create the file */
file = H5Fcreate(MISC17_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3718,7 +3718,7 @@ test_misc19(void)
H5E_END_TRY;
VERIFY(ret, FAIL, "H5FDunregister");
- HDfree(vfd_cls);
+ free(vfd_cls);
/* Check H5I operations on virtual object connectors */
@@ -3758,7 +3758,7 @@ test_misc19(void)
H5E_END_TRY;
VERIFY(ret, FAIL, "H5VLunregister_connector");
- HDfree(vol_cls);
+ free(vol_cls);
#endif
} /* end test_misc19() */
@@ -3792,7 +3792,7 @@ test_misc20(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -3968,8 +3968,8 @@ test_misc21(void)
MESSAGE(5, ("Testing late allocation time w/chunks & filters\n"));
/* Allocate space for the buffer */
- buf = (char *)HDcalloc(MISC21_SPACE_DIM0 * MISC21_SPACE_DIM1, 1);
- CHECK(buf, NULL, "HDcalloc");
+ buf = (char *)calloc(MISC21_SPACE_DIM0 * MISC21_SPACE_DIM1, 1);
+ CHECK(buf, NULL, "calloc");
/* Create the file */
fid = H5Fcreate(MISC21_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -4009,7 +4009,7 @@ test_misc21(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc21() */
/****************************************************************
@@ -4053,8 +4053,8 @@ test_misc22(void)
MESSAGE(5, ("Testing datatypes with SZIP filter\n"));
/* Allocate space for the buffer */
- buf = (char *)HDcalloc(MISC22_SPACE_DIM0 * MISC22_SPACE_DIM1, 8);
- CHECK(buf, NULL, "HDcalloc");
+ buf = (char *)calloc(MISC22_SPACE_DIM0 * MISC22_SPACE_DIM1, 8);
+ CHECK(buf, NULL, "calloc");
/* Create the file */
fid = H5Fcreate(MISC22_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -4160,7 +4160,7 @@ test_misc22(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc22() */
#endif /* H5_HAVE_FILTER_SZIP */
@@ -5099,7 +5099,7 @@ test_misc25b(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -5362,7 +5362,7 @@ test_misc27(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -5590,7 +5590,7 @@ test_misc29(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -5889,7 +5889,7 @@ test_misc33(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -6192,7 +6192,7 @@ test_misc37(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
diff --git a/test/API/trefer.c b/test/API/trefer.c
index c09b586..2312c3f 100644
--- a/test/API/trefer.c
+++ b/test/API/trefer.c
@@ -112,10 +112,10 @@ test_reference_params(void)
MESSAGE(5, ("Testing Reference Parameters\n"));
/* Allocate write & read buffers */
- wbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- tbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ tbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -411,10 +411,10 @@ test_reference_params(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(tbuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(tbuf);
+ free(obuf);
} /* test_reference_params() */
/****************************************************************
@@ -445,10 +445,10 @@ test_reference_obj(void)
MESSAGE(5, ("Testing Object Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -645,10 +645,10 @@ test_reference_obj(void)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(ibuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_obj() */
/****************************************************************
@@ -682,9 +682,9 @@ test_reference_vlen_obj(void)
MESSAGE(5, ("Testing Object Reference Functions within VLEN type\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -911,10 +911,10 @@ test_reference_vlen_obj(void)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(ibuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_vlen_obj() */
/****************************************************************
@@ -946,8 +946,8 @@ test_reference_cmpnd_obj(void)
MESSAGE(5, ("Testing Object Reference Functions within compound type\n"));
/* Allocate write & read buffers */
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -1047,7 +1047,7 @@ test_reference_cmpnd_obj(void)
CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Reset buffer for writing */
- HDmemset(&cmpnd_wbuf, 0, sizeof(cmpnd_wbuf));
+ memset(&cmpnd_wbuf, 0, sizeof(cmpnd_wbuf));
/* Create reference to dataset */
ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &cmpnd_wbuf.ref0);
@@ -1202,8 +1202,8 @@ test_reference_cmpnd_obj(void)
CHECK(ret, FAIL, "H5Rdestroy");
/* Free memory buffers */
- HDfree(ibuf);
- HDfree(obuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_cmpnd_obj() */
/****************************************************************
@@ -1255,10 +1255,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
MESSAGE(5, ("Testing Dataset Region Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- dwbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ dwbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
for (tu8 = dwbuf, i = 0; i < (SPACE2_DIM1 * SPACE2_DIM2); i++)
*tu8++ = (uint8_t)(i * 3);
@@ -1529,7 +1529,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 1, "H5Sget_select_hyper_nblocks");
/* allocate space for the hyperslab blocks */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) * 2);
+ coords = (hsize_t *)malloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) * 2);
ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
@@ -1537,7 +1537,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[1], 2, "Hyperslab Coordinates");
VERIFY(coords[2], 7, "Hyperslab Coordinates");
VERIFY(coords[3], 7, "Hyperslab Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid2, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 2, "Selection Bounds");
@@ -1560,7 +1560,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, SPACE2_DIM2, "H5Sget_select_elem_npoints");
/* allocate space for the element points */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t));
ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
@@ -1584,7 +1584,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[17], coord1[8][1], "Element Coordinates");
VERIFY(coords[18], coord1[9][0], "Element Coordinates");
VERIFY(coords[19], coord1[9][1], "Element Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid2, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 0, "Selection Bounds");
@@ -1661,10 +1661,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
} /* test_reference_region() */
@@ -1711,10 +1711,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
- dwbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
+ rbuf = calloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
+ dwbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
for (tu8 = dwbuf, i = 0; i < SPACE3_DIM1; i++)
*tu8++ = (uint8_t)(i * 3);
@@ -1889,7 +1889,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 15, "H5Sget_select_hyper_nblocks");
/* allocate space for the hyperslab blocks */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) * 2);
+ coords = (hsize_t *)malloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) * 2);
ret = H5Sget_select_hyper_blocklist(sid3, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
@@ -1923,7 +1923,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[27], 68, "Hyperslab Coordinates");
VERIFY(coords[28], 72, "Hyperslab Coordinates");
VERIFY(coords[29], 73, "Hyperslab Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid3, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 2, "Selection Bounds");
@@ -1944,7 +1944,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 10, "H5Sget_select_elem_npoints");
/* allocate space for the element points */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t));
ret = H5Sget_select_elem_pointlist(sid3, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
@@ -1958,7 +1958,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[7], coord1[7][0], "Element Coordinates");
VERIFY(coords[8], coord1[8][0], "Element Coordinates");
VERIFY(coords[9], coord1[9][0], "Element Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid3, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 3, "Selection Bounds");
@@ -2002,10 +2002,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
} /* test_reference_region_1D() */
@@ -2861,10 +2861,10 @@ test_reference_compat_conv(void)
MESSAGE(5, ("Testing Deprecated Object Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf_obj = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- rbuf_obj = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg = HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- rbuf_reg = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_obj = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ rbuf_obj = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_reg = calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf_reg = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
/* Create file */
fid1 = H5Fcreate(FILE_REF_COMPAT, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3131,10 +3131,10 @@ test_reference_compat_conv(void)
}
/* Free memory buffers */
- HDfree(wbuf_obj);
- HDfree(rbuf_obj);
- HDfree(wbuf_reg);
- HDfree(rbuf_reg);
+ free(wbuf_obj);
+ free(rbuf_obj);
+ free(wbuf_reg);
+ free(rbuf_reg);
} /* test_reference_compat() */
#endif
@@ -3174,17 +3174,17 @@ test_reference_perf(void)
MESSAGE(5, ("Testing Object Reference Performance\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- wbuf_deprec = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- rbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf_deprec = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- tbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf_reg = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg_deprec = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- rbuf_reg_deprec = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf_deprec = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ rbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf_deprec = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ tbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_reg = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf_reg = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_reg_deprec = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf_reg_deprec = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -3266,7 +3266,7 @@ test_reference_perf(void)
CHECK(ret, FAIL, "H5Rdestroy");
}
if (VERBOSE_MED)
- HDprintf("--- Object reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ printf("--- Object reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Create reference to dataset */
ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &wbuf[0]);
@@ -3285,7 +3285,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Object reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ printf("--- Object reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3304,7 +3304,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated object reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ printf("--- Deprecated object reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Create reference to dataset */
ret = H5Rcreate(&wbuf_deprec[0], fid1, "/Group1/Dataset1", H5R_OBJECT1, H5I_INVALID_HID);
@@ -3320,7 +3320,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated object reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ printf("--- Deprecated object reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3342,7 +3342,7 @@ test_reference_perf(void)
CHECK(ret, FAIL, "H5Rdestroy");
}
if (VERBOSE_MED)
- HDprintf("--- Region reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ printf("--- Region reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Store first dataset region */
ret = H5Rcreate_region(fid1, "/Group1/Dataset1", sid1, H5P_DEFAULT, &wbuf_reg[0]);
@@ -3358,7 +3358,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Region reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ printf("--- Region reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3378,7 +3378,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated region reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ printf("--- Deprecated region reference create time: %lfs\n", t / MAX_ITER_CREATE);
t = 0;
for (i = 0; i < MAX_ITER_WRITE; i++) {
@@ -3390,7 +3390,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated region reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ printf("--- Deprecated region reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3424,7 +3424,7 @@ test_reference_perf(void)
CHECK(ret, FAIL, "H5Rdestroy");
}
if (VERBOSE_MED)
- HDprintf("--- Object reference read time: %lfs\n", t / MAX_ITER_READ);
+ printf("--- Object reference read time: %lfs\n", t / MAX_ITER_READ);
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
@@ -3470,7 +3470,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated object reference read time: %lfs\n", t / MAX_ITER_READ);
+ printf("--- Deprecated object reference read time: %lfs\n", t / MAX_ITER_READ);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3492,7 +3492,7 @@ test_reference_perf(void)
CHECK(ret, FAIL, "H5Rdestroy");
}
if (VERBOSE_MED)
- HDprintf("--- Region reference read time: %lfs\n", t / MAX_ITER_READ);
+ printf("--- Region reference read time: %lfs\n", t / MAX_ITER_READ);
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_reg);
@@ -3516,7 +3516,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated region reference read time: %lfs\n", t / MAX_ITER_READ);
+ printf("--- Deprecated region reference read time: %lfs\n", t / MAX_ITER_READ);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3543,17 +3543,17 @@ test_reference_perf(void)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(wbuf_reg);
- HDfree(rbuf_reg);
- HDfree(wbuf_deprec);
- HDfree(rbuf_deprec);
- HDfree(wbuf_reg_deprec);
- HDfree(rbuf_reg_deprec);
- HDfree(tbuf);
- HDfree(ibuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(wbuf_reg);
+ free(rbuf_reg);
+ free(wbuf_deprec);
+ free(rbuf_deprec);
+ free(wbuf_reg_deprec);
+ free(rbuf_reg_deprec);
+ free(tbuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_perf() */
/****************************************************************
diff --git a/test/API/tselect.c b/test/API/tselect.c
index a2f377d..1b742e5 100644
--- a/test/API/tselect.c
+++ b/test/API/tselect.c
@@ -248,10 +248,10 @@ test_select_hyper(hid_t xfer_plist)
MESSAGE(5, ("Testing Hyperslab Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -435,8 +435,8 @@ test_select_hyper(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper() */
struct pnt_iter {
@@ -502,10 +502,10 @@ test_select_point(hid_t xfer_plist)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -649,7 +649,7 @@ test_select_point(hid_t xfer_plist)
/* Save points for later iteration */
/* (these are in the second half of the buffer, because we are prepending */
/* the next list of points to the beginning of the point selection list) */
- HDmemcpy(((char *)pi.coord) + sizeof(coord2), coord2, sizeof(coord2));
+ memcpy(((char *)pi.coord) + sizeof(coord2), coord2, sizeof(coord2));
ret = (int)H5Sget_select_npoints(sid2);
VERIFY(ret, 10, "H5Sget_select_npoints");
@@ -689,7 +689,7 @@ test_select_point(hid_t xfer_plist)
VERIFY(ret, 20, "H5Sget_select_npoints");
/* Save points for later iteration */
- HDmemcpy(pi.coord, coord2, sizeof(coord2));
+ memcpy(pi.coord, coord2, sizeof(coord2));
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -802,8 +802,8 @@ test_select_point(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_point() */
/****************************************************************
@@ -864,10 +864,10 @@ test_select_all(hid_t xfer_plist)
MESSAGE(5, ("Testing 'All' Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++)
@@ -917,8 +917,8 @@ test_select_all(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_all() */
/****************************************************************
@@ -951,10 +951,10 @@ test_select_all_hyper(hid_t xfer_plist)
MESSAGE(5, ("Testing 'All' Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1069,8 +1069,8 @@ test_select_all_hyper(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_all_hyper() */
/****************************************************************
@@ -1105,10 +1105,10 @@ test_select_combo(void)
MESSAGE(5, ("Testing Combination of Hyperslab & Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1230,8 +1230,8 @@ test_select_combo(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_combo() */
static int
@@ -1300,10 +1300,10 @@ test_select_hyper_stride(hid_t xfer_plist)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1390,10 +1390,10 @@ test_select_hyper_stride(hid_t xfer_plist)
tbuf = wbuf + loc1[i];
tbuf2 = rbuf + loc2[i];
if (*tbuf != *tbuf2) {
- HDprintf("%d: hyperslab values don't match!, loc1[%d]=%d, loc2[%d]=%d\n", __LINE__, i,
- (int)loc1[i], i, (int)loc2[i]);
- HDprintf("wbuf=%p, tbuf=%p, rbuf=%p, tbuf2=%p\n", (void *)wbuf, (void *)tbuf, (void *)rbuf,
- (void *)tbuf2);
+ printf("%d: hyperslab values don't match!, loc1[%d]=%d, loc2[%d]=%d\n", __LINE__, i, (int)loc1[i],
+ i, (int)loc2[i]);
+ printf("wbuf=%p, tbuf=%p, rbuf=%p, tbuf2=%p\n", (void *)wbuf, (void *)tbuf, (void *)rbuf,
+ (void *)tbuf2);
TestErrPrintf("*tbuf=%u, *tbuf2=%u\n", (unsigned)*tbuf, (unsigned)*tbuf2);
} /* end if */
} /* end for */
@@ -1415,8 +1415,8 @@ test_select_hyper_stride(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_stride() */
/****************************************************************
@@ -1446,10 +1446,10 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
MESSAGE(5, ("Testing Contiguous Hyperslabs Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1537,7 +1537,7 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 30 * 12) != 0)
+ if (memcmp(rbuf, wbuf, sizeof(uint16_t) * 30 * 12) != 0)
TestErrPrintf("hyperslab values don't match! Line=%d\n", __LINE__);
/* Close memory dataspace */
@@ -1557,8 +1557,8 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_contig() */
/****************************************************************
@@ -1586,11 +1586,11 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
MESSAGE(5, ("Testing More Contiguous Hyperslabs Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t),
- (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf =
+ (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE8_DIM1; i++)
@@ -1680,7 +1680,7 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 2 * SPACE8_DIM3 * SPACE8_DIM2 * SPACE8_DIM1) != 0)
+ if (memcmp(rbuf, wbuf, sizeof(uint16_t) * 2 * SPACE8_DIM3 * SPACE8_DIM2 * SPACE8_DIM1) != 0)
TestErrPrintf("Error: hyperslab values don't match!\n");
/* Close memory dataspace */
@@ -1700,8 +1700,8 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_contig2() */
/****************************************************************
@@ -1732,11 +1732,11 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
MESSAGE(5, ("Testing Yet More Contiguous Hyperslabs Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t),
- (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf =
+ (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE8_DIM4; i++)
@@ -1835,14 +1835,14 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
(k >= start[2] && k < (start[2] + count[2])) &&
(l >= start[3] && l < (start[3] + count[3]))) {
if (*tbuf != *tbuf2) {
- HDprintf("Error: hyperslab values don't match!\n");
+ printf("Error: hyperslab values don't match!\n");
TestErrPrintf("Line: %d, i=%u, j=%u, k=%u, l=%u, *tbuf=%u,*tbuf2=%u\n", __LINE__,
i, j, k, l, (unsigned)*tbuf, (unsigned)*tbuf2);
} /* end if */
} /* end if */
else {
if (*tbuf2 != 0) {
- HDprintf("Error: invalid data in read buffer!\n");
+ printf("Error: invalid data in read buffer!\n");
TestErrPrintf("Line: %d, i=%u, j=%u, k=%u, l=%u, *tbuf=%u,*tbuf2=%u\n", __LINE__,
i, j, k, l, (unsigned)*tbuf, (unsigned)*tbuf2);
} /* end if */
@@ -1865,8 +1865,8 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_contig3() */
#if 0
@@ -1886,8 +1886,8 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t cube_si
size_t s; /* Local index variable */
hbool_t mis_match; /* Flag to indicate mismatch in expected value */
- HDassert(cube_buf);
- HDassert(cube_size > 0);
+ assert(cube_buf);
+ assert(cube_size > 0);
expected_value = 0;
mis_match = FALSE;
@@ -1904,7 +1904,7 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t cube_si
m = 0;
do {
/* Sanity check */
- HDassert(s < cube_size);
+ assert(s < cube_size);
/* Check for correct value */
if (*cube_ptr != expected_value)
@@ -1980,12 +1980,12 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
MESSAGE(7, ("\tranks = %u/%u, edge_size = %u, chunk_edge_size = %u.\n", small_rank, large_rank, edge_size,
chunk_edge_size));
- HDassert(edge_size >= 6);
- HDassert(edge_size >= chunk_edge_size);
- HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
- HDassert(small_rank > 0);
- HDassert(small_rank < large_rank);
- HDassert(large_rank <= SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(edge_size >= chunk_edge_size);
+ assert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
+ assert(small_rank > 0);
+ assert(small_rank < large_rank);
+ assert(large_rank <= SS_DR_MAX_RANK);
/* Compute cube sizes */
small_cube_size = large_cube_size = (size_t)1;
@@ -1996,7 +1996,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
large_cube_size *= (size_t)edge_size;
} /* end for */
- HDassert(large_cube_size < (size_t)UINT_MAX);
+ assert(large_cube_size < (size_t)UINT_MAX);
/* set up the start, stride, count, and block pointers */
start_ptr = &(start[SS_DR_MAX_RANK - large_rank]);
@@ -2005,10 +2005,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
block_ptr = &(block[SS_DR_MAX_RANK - large_rank]);
/* Allocate buffers */
- small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size);
- CHECK_PTR(small_cube_buf_1, "HDcalloc");
- large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size);
- CHECK_PTR(large_cube_buf_1, "HDcalloc");
+ small_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), small_cube_size);
+ CHECK_PTR(small_cube_buf_1, "calloc");
+ large_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), large_cube_size);
+ CHECK_PTR(large_cube_buf_1, "calloc");
/* Create a dataset transfer property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -2199,7 +2199,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
*/
/* zero out the in-memory large cube */
- HDmemset(large_cube_buf_1, 0, large_cube_size * sizeof(uint16_t));
+ memset(large_cube_buf_1, 0, large_cube_size * sizeof(uint16_t));
u = 0;
do {
@@ -2242,8 +2242,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
(x * edge_size);
stop_index = start_index + small_cube_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= large_cube_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= large_cube_size);
mis_match = FALSE;
ptr_1 = large_cube_buf_1;
@@ -2268,7 +2268,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
TestErrPrintf("large cube read from small cube has bad data! Line=%u\n", __LINE__);
/* Zero out the buffer for the next pass */
- HDmemset(large_cube_buf_1 + start_index, 0, small_cube_size * sizeof(uint16_t));
+ memset(large_cube_buf_1 + start_index, 0, small_cube_size * sizeof(uint16_t));
x++;
} while ((large_rank >= 2) && (small_rank <= 1) && (x < edge_size));
@@ -2436,8 +2436,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
(x * edge_size);
stop_index = start_index + small_cube_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= large_cube_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= large_cube_size);
mis_match = FALSE;
ptr_1 = large_cube_buf_1;
@@ -2493,8 +2493,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(small_cube_buf_1);
- HDfree(large_cube_buf_1);
+ free(small_cube_buf_1);
+ free(large_cube_buf_1);
} /* test_select_hyper_contig_dr__run_test() */
#endif
@@ -2533,8 +2533,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
max_cube_size *= (size_t)edge_size;
/* Allocate cube buffer for writing values */
- cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size);
- CHECK_PTR(cube_buf, "HDmalloc");
+ cube_buf = (uint16_t *)malloc(sizeof(uint16_t) * max_cube_size);
+ CHECK_PTR(cube_buf, "malloc");
/* Initialize the cube buffer */
cube_ptr = cube_buf;
@@ -2542,8 +2542,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
*cube_ptr++ = (uint16_t)s;
/* Allocate cube buffer for zeroing values on disk */
- zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size);
- CHECK_PTR(zero_buf, "HDcalloc");
+ zero_buf = (uint16_t *)calloc(sizeof(uint16_t), max_cube_size);
+ CHECK_PTR(zero_buf, "calloc");
for (large_rank = 1; large_rank <= max_rank; large_rank++) {
for (small_rank = 1; small_rank < large_rank; small_rank++) {
@@ -2559,8 +2559,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
} /* for loop on small rank */
} /* for loop on large rank */
- HDfree(cube_buf);
- HDfree(zero_buf);
+ free(cube_buf);
+ free(zero_buf);
} /* test_select_hyper_contig_dr() */
#endif
@@ -2603,16 +2603,16 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
unsigned u; /* Local index variables */
herr_t ret; /* Generic return value */
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(0 < sel_rank);
- HDassert(sel_rank <= tgt_n_cube_rank);
- HDassert(tgt_n_cube_rank <= SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(0 < sel_rank);
+ assert(sel_rank <= tgt_n_cube_rank);
+ assert(tgt_n_cube_rank <= SS_DR_MAX_RANK);
sel_offset = SS_DR_MAX_RANK - sel_rank;
n_cube_offset = SS_DR_MAX_RANK - tgt_n_cube_rank;
- HDassert(n_cube_offset <= sel_offset);
+ assert(n_cube_offset <= sel_offset);
/* First, compute the base count (which assumes start == 0
* for the associated offset) and offset_count (which
@@ -2827,13 +2827,13 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank
unsigned v, w, x, y, z; /* to track position in checker */
const unsigned test_max_rank = 5; /* code changes needed if this is increased */
- HDassert(buf_ptr != NULL);
- HDassert(0 < rank);
- HDassert(rank <= test_max_rank);
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(test_max_rank <= SS_DR_MAX_RANK);
+ assert(buf_ptr != NULL);
+ assert(0 < rank);
+ assert(rank <= test_max_rank);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(test_max_rank <= SS_DR_MAX_RANK);
val_ptr = buf_ptr;
expected_value = first_expected_val;
@@ -2966,15 +2966,15 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
MESSAGE(7, ("\tranks = %d/%d, edge_size = %d, checker_edge_size = %d, chunk_edge_size = %d.\n",
small_rank, large_rank, edge_size, checker_edge_size, chunk_edge_size));
- HDassert(edge_size >= 6);
- HDassert(checker_edge_size > 0);
- HDassert(checker_edge_size <= edge_size);
- HDassert(edge_size >= chunk_edge_size);
- HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
- HDassert(small_rank > 0);
- HDassert(small_rank < large_rank);
- HDassert(large_rank <= test_max_rank);
- HDassert(test_max_rank <= SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(checker_edge_size > 0);
+ assert(checker_edge_size <= edge_size);
+ assert(edge_size >= chunk_edge_size);
+ assert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
+ assert(small_rank > 0);
+ assert(small_rank < large_rank);
+ assert(large_rank <= test_max_rank);
+ assert(test_max_rank <= SS_DR_MAX_RANK);
/* Compute cube sizes */
small_cube_size = large_cube_size = (size_t)1;
@@ -2984,22 +2984,22 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
large_cube_size *= (size_t)edge_size;
} /* end for */
- HDassert(large_cube_size < (size_t)(UINT_MAX));
+ assert(large_cube_size < (size_t)(UINT_MAX));
small_rank_offset = test_max_rank - small_rank;
- HDassert(small_rank_offset >= 1);
+ assert(small_rank_offset >= 1);
/* also, at present, we use 16 bit values in this test --
* hence the following assertion. Delete it if we convert
* to 32 bit values.
*/
- HDassert(large_cube_size < (size_t)(64 * 1024));
+ assert(large_cube_size < (size_t)(64 * 1024));
/* Allocate & initialize buffers */
- small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size);
- CHECK_PTR(small_cube_buf_1, "HDcalloc");
- large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size);
- CHECK_PTR(large_cube_buf_1, "HDcalloc");
+ small_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), small_cube_size);
+ CHECK_PTR(small_cube_buf_1, "calloc");
+ large_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), large_cube_size);
+ CHECK_PTR(large_cube_buf_1, "calloc");
/* Create a dataset transfer property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -3160,11 +3160,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* need for another inner loop.
*/
- HDassert((sel_start[0] == 0) || (0 < small_rank_offset));
- HDassert((sel_start[1] == 0) || (1 < small_rank_offset));
- HDassert((sel_start[2] == 0) || (2 < small_rank_offset));
- HDassert((sel_start[3] == 0) || (3 < small_rank_offset));
- HDassert((sel_start[4] == 0) || (4 < small_rank_offset));
+ assert((sel_start[0] == 0) || (0 < small_rank_offset));
+ assert((sel_start[1] == 0) || (1 < small_rank_offset));
+ assert((sel_start[2] == 0) || (2 < small_rank_offset));
+ assert((sel_start[3] == 0) || (3 < small_rank_offset));
+ assert((sel_start[4] == 0) || (4 < small_rank_offset));
test_select_hyper_checker_board_dr__select_checker_board(
file_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start);
@@ -3176,7 +3176,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
VERIFY(check, TRUE, "H5Sselect_shape_same");
/* zero the buffer that we will be using for reading */
- HDmemset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
+ memset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
/* Read selection from disk */
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, mem_small_cube_sid,
@@ -3240,11 +3240,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* need for another inner loop.
*/
- HDassert((sel_start[0] == 0) || (0 < small_rank_offset));
- HDassert((sel_start[1] == 0) || (1 < small_rank_offset));
- HDassert((sel_start[2] == 0) || (2 < small_rank_offset));
- HDassert((sel_start[3] == 0) || (3 < small_rank_offset));
- HDassert((sel_start[4] == 0) || (4 < small_rank_offset));
+ assert((sel_start[0] == 0) || (0 < small_rank_offset));
+ assert((sel_start[1] == 0) || (1 < small_rank_offset));
+ assert((sel_start[2] == 0) || (2 < small_rank_offset));
+ assert((sel_start[3] == 0) || (3 < small_rank_offset));
+ assert((sel_start[4] == 0) || (4 < small_rank_offset));
test_select_hyper_checker_board_dr__select_checker_board(
mem_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start);
@@ -3256,7 +3256,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
VERIFY(check, TRUE, "H5Sselect_shape_same");
/* zero out the in memory large cube */
- HDmemset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
+ memset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
/* Read selection from disk */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
@@ -3274,8 +3274,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
(x * edge_size);
stop_index = start_index + small_cube_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= large_cube_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= large_cube_size);
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
@@ -3283,7 +3283,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = FALSE;
ptr_1++;
} /* end for */
- HDassert(s == start_index);
+ assert(s == start_index);
data_ok &= test_select_hyper_checker_board_dr__verify_data(
ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
@@ -3291,7 +3291,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
ptr_1 += small_cube_size;
s += small_cube_size;
- HDassert(s == stop_index + 1);
+ assert(s == stop_index + 1);
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
@@ -3360,11 +3360,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* need for another inner loop.
*/
- HDassert((sel_start[0] == 0) || (0 < small_rank_offset));
- HDassert((sel_start[1] == 0) || (1 < small_rank_offset));
- HDassert((sel_start[2] == 0) || (2 < small_rank_offset));
- HDassert((sel_start[3] == 0) || (3 < small_rank_offset));
- HDassert((sel_start[4] == 0) || (4 < small_rank_offset));
+ assert((sel_start[0] == 0) || (0 < small_rank_offset));
+ assert((sel_start[1] == 0) || (1 < small_rank_offset));
+ assert((sel_start[2] == 0) || (2 < small_rank_offset));
+ assert((sel_start[3] == 0) || (3 < small_rank_offset));
+ assert((sel_start[4] == 0) || (4 < small_rank_offset));
test_select_hyper_checker_board_dr__select_checker_board(
mem_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start);
@@ -3383,7 +3383,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(ret, FAIL, "H5Dwrite");
/* zero the buffer that we will be using for reading */
- HDmemset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
+ memset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
/* read the on disk small cube into memory */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
@@ -3455,11 +3455,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* need for another inner loop.
*/
- HDassert((sel_start[0] == 0) || (0 < small_rank_offset));
- HDassert((sel_start[1] == 0) || (1 < small_rank_offset));
- HDassert((sel_start[2] == 0) || (2 < small_rank_offset));
- HDassert((sel_start[3] == 0) || (3 < small_rank_offset));
- HDassert((sel_start[4] == 0) || (4 < small_rank_offset));
+ assert((sel_start[0] == 0) || (0 < small_rank_offset));
+ assert((sel_start[1] == 0) || (1 < small_rank_offset));
+ assert((sel_start[2] == 0) || (2 < small_rank_offset));
+ assert((sel_start[3] == 0) || (3 < small_rank_offset));
+ assert((sel_start[4] == 0) || (4 < small_rank_offset));
test_select_hyper_checker_board_dr__select_checker_board(
file_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start);
@@ -3479,7 +3479,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(ret, FAIL, "H5Dwrite");
/* zero out the in memory large cube */
- HDmemset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
+ memset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
/* read the on disk large cube into memory */
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
@@ -3498,8 +3498,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
(x * edge_size);
stop_index = start_index + small_cube_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= large_cube_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= large_cube_size);
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
@@ -3507,7 +3507,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = FALSE;
ptr_1++;
} /* end for */
- HDassert(s == start_index);
+ assert(s == start_index);
/* verify that the slice contains the expected data */
data_ok &= test_select_hyper_checker_board_dr__verify_data(
@@ -3516,7 +3516,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
ptr_1 += small_cube_size;
s += small_cube_size;
- HDassert(s == stop_index + 1);
+ assert(s == stop_index + 1);
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
@@ -3571,8 +3571,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(small_cube_buf_1);
- HDfree(large_cube_buf_1);
+ free(small_cube_buf_1);
+ free(large_cube_buf_1);
} /* test_select_hyper_checker_board_dr__run_test() */
#endif
@@ -3615,8 +3615,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
max_cube_size *= (size_t)(edge_size + 1);
/* Allocate cube buffer for writing values */
- cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size);
- CHECK_PTR(cube_buf, "HDmalloc");
+ cube_buf = (uint16_t *)malloc(sizeof(uint16_t) * max_cube_size);
+ CHECK_PTR(cube_buf, "malloc");
/* Initialize the cube buffer */
cube_ptr = cube_buf;
@@ -3624,8 +3624,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
*cube_ptr++ = (uint16_t)s;
/* Allocate cube buffer for zeroing values on disk */
- zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size);
- CHECK_PTR(zero_buf, "HDcalloc");
+ zero_buf = (uint16_t *)calloc(sizeof(uint16_t), max_cube_size);
+ CHECK_PTR(zero_buf, "calloc");
for (large_rank = 1; large_rank <= max_rank; large_rank++) {
for (small_rank = 1; small_rank < large_rank; small_rank++) {
@@ -3653,8 +3653,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
} /* for loop on small rank */
} /* for loop on large rank */
- HDfree(cube_buf);
- HDfree(zero_buf);
+ free(cube_buf);
+ free(zero_buf);
} /* test_select_hyper_checker_board_dr() */
#endif
@@ -3688,12 +3688,12 @@ test_select_hyper_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
- rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf2, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
+ rbuf2 = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf2, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -3797,7 +3797,7 @@ test_select_hyper_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
+ if (memcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
TestErrPrintf("hyperslab values don't match! Line=%d\n", __LINE__);
/* Close memory dataspace */
@@ -3825,9 +3825,9 @@ test_select_hyper_copy(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(rbuf2);
+ free(wbuf);
+ free(rbuf);
+ free(rbuf2);
} /* test_select_hyper_copy() */
/****************************************************************
@@ -3859,12 +3859,12 @@ test_select_point_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
- rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf2, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
+ rbuf2 = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf2, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -4010,7 +4010,7 @@ test_select_point_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
+ if (memcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
TestErrPrintf("point values don't match!\n");
/* Close memory dataspace */
@@ -4038,9 +4038,9 @@ test_select_point_copy(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(rbuf2);
+ free(wbuf);
+ free(rbuf);
+ free(rbuf2);
} /* test_select_point_copy() */
/****************************************************************
@@ -4077,10 +4077,10 @@ test_select_hyper_offset(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with Offsets\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -4226,8 +4226,8 @@ test_select_hyper_offset(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_offset() */
/****************************************************************
@@ -4259,10 +4259,10 @@ test_select_hyper_offset2(void)
MESSAGE(5, ("Testing More Hyperslab Selection Functions with Offsets\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE7_DIM1 * SPACE7_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE7_DIM1 * SPACE7_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE7_DIM1; i++)
@@ -4353,8 +4353,8 @@ test_select_hyper_offset2(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_offset2() */
/****************************************************************
@@ -4389,10 +4389,10 @@ test_select_point_offset(void)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -4573,8 +4573,8 @@ test_select_point_offset(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_point_offset() */
/****************************************************************
@@ -4616,10 +4616,10 @@ test_select_hyper_union(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -5199,8 +5199,8 @@ test_select_hyper_union(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_union() */
/****************************************************************
@@ -5271,7 +5271,7 @@ test_select_hyper_union_stagger(void)
CHECK(error, FAIL, "H5Fclose");
/* Initialize input buffer */
- HDmemset(data_out, 0, 7 * 7 * sizeof(int));
+ memset(data_out, 0, 7 * 7 * sizeof(int));
/* Open file */
file_id = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
@@ -5316,10 +5316,10 @@ test_select_hyper_union_stagger(void)
/* Verify input data */
for (i = 0; i < 8; i++) {
if (data[input_loc[i][0]][input_loc[i][1]] != data_out[output_loc[i][0]][output_loc[i][1]]) {
- HDprintf("input data #%d is wrong!\n", i);
- HDprintf("input_loc=[%d][%d]\n", input_loc[i][0], input_loc[i][1]);
- HDprintf("output_loc=[%d][%d]\n", output_loc[i][0], output_loc[i][1]);
- HDprintf("data=%d\n", data[input_loc[i][0]][input_loc[i][1]]);
+ printf("input data #%d is wrong!\n", i);
+ printf("input_loc=[%d][%d]\n", input_loc[i][0], input_loc[i][1]);
+ printf("output_loc=[%d][%d]\n", output_loc[i][0], output_loc[i][1]);
+ printf("data=%d\n", data[input_loc[i][0]][input_loc[i][1]]);
TestErrPrintf("data_out=%d\n", data_out[output_loc[i][0]][output_loc[i][1]]);
} /* end if */
} /* end for */
@@ -5394,10 +5394,10 @@ test_select_hyper_union_3d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of 3-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++)
@@ -5538,8 +5538,8 @@ test_select_hyper_union_3d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_union_3d() */
/****************************************************************
@@ -5569,7 +5569,7 @@ test_select_hyper_valid_combination(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Selection Combination Validity\n"));
- HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ assert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for single point selection */
single_pt_sid = H5Screate_simple(SPACE9_RANK, dims2D, NULL);
@@ -5718,10 +5718,10 @@ test_select_hyper_and_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with intersection of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -5795,14 +5795,14 @@ test_select_hyper_and_2d(void)
for (j = 0; j < SPACE2_DIM2; j++, tbuf++) {
if ((i >= 5 && i <= 9) && (j >= 5 && j <= 9)) {
if (*tbuf != *tbuf2)
- HDprintf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
- i, j, (int)*tbuf, (int)*tbuf2);
+ printf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
+ i, j, (int)*tbuf, (int)*tbuf2);
tbuf2++;
} /* end if */
else {
if (*tbuf != 0)
- HDprintf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
- (int)*tbuf);
+ printf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
+ (int)*tbuf);
} /* end else */
} /* end for */
@@ -5823,8 +5823,8 @@ test_select_hyper_and_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_and_2d() */
/****************************************************************
@@ -5857,10 +5857,10 @@ test_select_hyper_xor_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with XOR of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -5936,14 +5936,14 @@ test_select_hyper_xor_2d(void)
((i >= 5 && i <= 9) && ((j >= 0 && j <= 4) || (j >= 10 && j <= 14))) ||
((i >= 10 && i <= 14) && (j >= 5 && j <= 14))) {
if (*tbuf != *tbuf2)
- HDprintf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
- i, j, (int)*tbuf, (int)*tbuf2);
+ printf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
+ i, j, (int)*tbuf, (int)*tbuf2);
tbuf2++;
} /* end if */
else {
if (*tbuf != 0)
- HDprintf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
- (int)*tbuf);
+ printf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
+ (int)*tbuf);
} /* end else */
} /* end for */
@@ -5964,8 +5964,8 @@ test_select_hyper_xor_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_xor_2d() */
/****************************************************************
@@ -5998,10 +5998,10 @@ test_select_hyper_notb_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTB of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -6075,14 +6075,14 @@ test_select_hyper_notb_2d(void)
for (j = 0; j < SPACE2_DIM2; j++, tbuf++) {
if (((i >= 0 && i <= 4) && (j >= 0 && j <= 9)) || ((i >= 5 && i <= 9) && (j >= 0 && j <= 4))) {
if (*tbuf != *tbuf2)
- HDprintf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
- i, j, (int)*tbuf, (int)*tbuf2);
+ printf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
+ i, j, (int)*tbuf, (int)*tbuf2);
tbuf2++;
} /* end if */
else {
if (*tbuf != 0)
- HDprintf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
- (int)*tbuf);
+ printf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
+ (int)*tbuf);
} /* end else */
} /* end for */
@@ -6103,8 +6103,8 @@ test_select_hyper_notb_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_notb_2d() */
/****************************************************************
@@ -6137,10 +6137,10 @@ test_select_hyper_nota_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTA of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -6243,8 +6243,8 @@ test_select_hyper_nota_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_nota_2d() */
/****************************************************************
@@ -6262,14 +6262,14 @@ test_select_hyper_iter2(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned ndim
if (*tbuf != **tbuf2) {
TestErrPrintf("Error in hyperslab iteration!\n");
- HDprintf("location: { ");
+ printf("location: { ");
for (u = 0; u < ndim; u++) {
- HDprintf("%2d", (int)point[u]);
+ printf("%2d", (int)point[u]);
if (u < (ndim - 1))
- HDprintf(", ");
+ printf(", ");
} /* end for */
- HDprintf("}\n");
- HDprintf("*tbuf=%d, **tbuf2=%d\n", *tbuf, **tbuf2);
+ printf("}\n");
+ printf("*tbuf=%d, **tbuf2=%d\n", *tbuf, **tbuf2);
return (-1);
} /* end if */
else {
@@ -6308,11 +6308,11 @@ test_select_hyper_union_random_5d(hid_t read_plist)
MESSAGE(5, ("Testing Hyperslab Selection Functions with random unions of 5-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (int *)HDmalloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (int *)HDcalloc(sizeof(int),
- (size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (int *)malloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (int *)calloc(sizeof(int),
+ (size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE5_DIM1; i++)
@@ -6401,7 +6401,7 @@ test_select_hyper_union_random_5d(hid_t read_plist)
} /* end if */
/* Set the read buffer back to all zeroes */
- HDmemset(rbuf, 0, (size_t)SPACE6_DIM1);
+ memset(rbuf, 0, (size_t)SPACE6_DIM1);
} /* end for */
/* Close memory dataspace */
@@ -6421,8 +6421,8 @@ test_select_hyper_union_random_5d(hid_t read_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_union_random_5d() */
/****************************************************************
@@ -6463,10 +6463,10 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
MESSAGE(5, ("Testing Hyperslab I/O on Large Chunks\n"));
/* Allocate the transfer buffers */
- data = (short *)HDmalloc(sizeof(short) * X * Y * Z);
- CHECK_PTR(data, "HDmalloc");
- data_out = (short *)HDcalloc((size_t)(NX * NY * NZ), sizeof(short));
- CHECK_PTR(data_out, "HDcalloc");
+ data = (short *)malloc(sizeof(short) * X * Y * Z);
+ CHECK_PTR(data, "malloc");
+ data_out = (short *)calloc((size_t)(NX * NY * NZ), sizeof(short));
+ CHECK_PTR(data_out, "calloc");
/*
* Data buffer initialization.
@@ -6647,8 +6647,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
CHECK(status, FAIL, "H5Sclose");
status = H5Fclose(file);
CHECK(status, FAIL, "H5Fclose");
- HDfree(data);
- HDfree(data_out);
+ free(data);
+ free(data_out);
} /* test_select_hyper_chunk() */
/****************************************************************
@@ -6689,10 +6689,10 @@ test_select_point_chunk(void)
MESSAGE(5, ("Testing Point Selections on Chunked Datasets\n"));
/* Allocate the transfer buffers */
- data = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(data, "HDmalloc");
- data_out = (unsigned *)HDcalloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(unsigned));
- CHECK_PTR(data_out, "HDcalloc");
+ data = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(data, "malloc");
+ data_out = (unsigned *)calloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(unsigned));
+ CHECK_PTR(data_out, "calloc");
/*
* Data buffer initialization.
@@ -6845,8 +6845,8 @@ test_select_point_chunk(void)
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(data);
- HDfree(data_out);
+ free(data);
+ free(data_out);
} /* test_select_point_chunk() */
/****************************************************************
@@ -7133,7 +7133,7 @@ test_select_combine(void)
VERIFY(nblocks, 1, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7168,7 +7168,7 @@ test_select_combine(void)
VERIFY(nblocks, 2, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7207,7 +7207,7 @@ test_select_combine(void)
VERIFY(nblocks, 2, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7266,7 +7266,7 @@ test_select_combine(void)
VERIFY(nblocks, 1, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7321,7 +7321,7 @@ test_select_combine(void)
VERIFY(nblocks, 1, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7376,7 +7376,7 @@ test_select_combine(void)
VERIFY(nblocks, 1, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7468,8 +7468,8 @@ test_select_fill_all(void)
MESSAGE(5, ("Testing Filling 'all' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7516,7 +7516,7 @@ test_select_fill_all(void)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_all() */
/****************************************************************
@@ -7544,8 +7544,8 @@ test_select_fill_point(hssize_t *offset)
MESSAGE(5, ("Testing Filling 'point' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7561,14 +7561,14 @@ test_select_fill_point(hssize_t *offset)
CHECK(ret, FAIL, "H5Sselect_elements");
if (offset != NULL) {
- HDmemcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
+ memcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
/* Set offset, if provided */
ret = H5Soffset_simple(sid1, real_offset);
CHECK(ret, FAIL, "H5Soffset_simple");
} /* end if */
else
- HDmemset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
+ memset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
/* Set fill value */
fill_value = SPACE7_FILL;
@@ -7614,7 +7614,7 @@ test_select_fill_point(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_point() */
/****************************************************************
@@ -7644,8 +7644,8 @@ test_select_fill_hyper_simple(hssize_t *offset)
MESSAGE(5, ("Testing Filling Simple 'hyperslab' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7665,14 +7665,14 @@ test_select_fill_hyper_simple(hssize_t *offset)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
if (offset != NULL) {
- HDmemcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
+ memcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
/* Set offset, if provided */
ret = H5Soffset_simple(sid1, real_offset);
CHECK(ret, FAIL, "H5Soffset_simple");
} /* end if */
else
- HDmemset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
+ memset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
/* Set fill value */
fill_value = SPACE7_FILL;
@@ -7720,7 +7720,7 @@ test_select_fill_hyper_simple(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_hyper_simple() */
/****************************************************************
@@ -7755,8 +7755,8 @@ test_select_fill_hyper_regular(hssize_t *offset)
MESSAGE(5, ("Testing Filling Regular 'hyperslab' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7780,14 +7780,14 @@ test_select_fill_hyper_regular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
if (offset != NULL) {
- HDmemcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
+ memcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
/* Set offset, if provided */
ret = H5Soffset_simple(sid1, real_offset);
CHECK(ret, FAIL, "H5Soffset_simple");
} /* end if */
else
- HDmemset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
+ memset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
/* Set fill value */
fill_value = SPACE7_FILL;
@@ -7833,7 +7833,7 @@ test_select_fill_hyper_regular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_hyper_regular() */
/****************************************************************
@@ -7875,8 +7875,8 @@ test_select_fill_hyper_irregular(hssize_t *offset)
MESSAGE(5, ("Testing Filling Irregular 'hyperslab' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7904,14 +7904,14 @@ test_select_fill_hyper_irregular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
if (offset != NULL) {
- HDmemcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
+ memcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
/* Set offset, if provided */
ret = H5Soffset_simple(sid1, real_offset);
CHECK(ret, FAIL, "H5Soffset_simple");
} /* end if */
else
- HDmemset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
+ memset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
/* Set fill value */
fill_value = SPACE7_FILL;
@@ -7957,7 +7957,7 @@ test_select_fill_hyper_irregular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_hyper_irregular() */
/****************************************************************
@@ -7984,10 +7984,10 @@ test_select_none(void)
MESSAGE(5, ("Testing I/O on 0-sized Selections\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE7_DIM1; i++)
@@ -8054,8 +8054,8 @@ test_select_none(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_none() */
/****************************************************************
@@ -8087,10 +8087,10 @@ test_scalar_select(void)
MESSAGE(5, ("Testing I/O on Selections in Scalar Dataspaces\n"));
/* Allocate write & read buffers */
- wbuf_uint8 = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf_uint8, "HDmalloc");
- wbuf_ushort = (unsigned short *)HDmalloc(sizeof(unsigned short) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf_ushort, "HDmalloc");
+ wbuf_uint8 = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf_uint8, "malloc");
+ wbuf_ushort = (unsigned short *)malloc(sizeof(unsigned short) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf_ushort, "malloc");
/* Initialize write buffers */
for (i = 0, tbuf_uint8 = wbuf_uint8, tbuf_ushort = wbuf_ushort; i < SPACE7_DIM1; i++)
@@ -8213,8 +8213,8 @@ test_scalar_select(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf_uint8);
- HDfree(wbuf_ushort);
+ free(wbuf_uint8);
+ free(wbuf_ushort);
} /* test_scalar_select() */
/****************************************************************
@@ -8459,7 +8459,7 @@ test_shape_same(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Same Shape Comparisons\n"));
- HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ assert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for "all" selection */
all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL);
@@ -10912,13 +10912,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
htri_t check; /* Shape comparison return value */
herr_t ret; /* Generic return value */
- HDassert(0 < small_rank);
- HDassert(small_rank <= large_rank);
- HDassert(large_rank <= SS_DR_MAX_RANK);
- HDassert(0 <= offset);
- HDassert(offset < large_rank);
- HDassert(edge_size > 0);
- HDassert(edge_size <= 1000);
+ assert(0 < small_rank);
+ assert(small_rank <= large_rank);
+ assert(large_rank <= SS_DR_MAX_RANK);
+ assert(0 <= offset);
+ assert(offset < large_rank);
+ assert(edge_size > 0);
+ assert(edge_size <= 1000);
HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n",
test_num);
@@ -10970,7 +10970,7 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
*/
i = SS_DR_MAX_RANK - large_rank;
- HDassert(i >= 0);
+ assert(i >= 0);
start_ptr = &(start[i]);
stride_ptr = &(stride[i]);
@@ -11164,21 +11164,21 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
htri_t check; /* Shape comparison return value */
herr_t ret; /* Generic return value */
- HDassert(0 < small_rank);
- HDassert(small_rank <= large_rank);
- HDassert(large_rank <= SS_DR_MAX_RANK);
- HDassert(0 < checker_size);
- HDassert(checker_size <= edge_size);
- HDassert(edge_size <= 1000);
- HDassert(0 <= offset);
- HDassert(offset < (int)edge_size);
+ assert(0 < small_rank);
+ assert(small_rank <= large_rank);
+ assert(large_rank <= SS_DR_MAX_RANK);
+ assert(0 < checker_size);
+ assert(checker_size <= edge_size);
+ assert(edge_size <= 1000);
+ assert(0 <= offset);
+ assert(offset < (int)edge_size);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
if (dim_selected[i] == TRUE)
dims_selected++;
- HDassert(dims_selected >= 0);
- HDassert(dims_selected <= large_rank);
+ assert(dims_selected >= 0);
+ assert(dims_selected <= large_rank);
HDsnprintf(test_desc_0, sizeof(test_desc_0),
"\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
@@ -11367,7 +11367,7 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
*/
i = SS_DR_MAX_RANK - large_rank;
- HDassert(i >= 0);
+ assert(i >= 0);
start_ptr = &(start[i]);
stride_ptr = &(stride[i]);
@@ -11708,22 +11708,22 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
htri_t check; /* Shape comparison return value */
herr_t ret; /* Generic return value */
- HDassert(0 < small_rank);
- HDassert(small_rank <= large_rank);
- HDassert(large_rank <= SS_DR_MAX_RANK);
- HDassert(9 <= edge_size);
- HDassert(edge_size <= 1000);
- HDassert(0 <= slice_offset);
- HDassert(slice_offset < edge_size);
- HDassert(-2 <= pattern_offset);
- HDassert(pattern_offset <= 2);
+ assert(0 < small_rank);
+ assert(small_rank <= large_rank);
+ assert(large_rank <= SS_DR_MAX_RANK);
+ assert(9 <= edge_size);
+ assert(edge_size <= 1000);
+ assert(0 <= slice_offset);
+ assert(slice_offset < edge_size);
+ assert(-2 <= pattern_offset);
+ assert(pattern_offset <= 2);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
if (dim_selected[i] == TRUE)
dims_selected++;
- HDassert(dims_selected >= 0);
- HDassert(dims_selected <= large_rank);
+ assert(dims_selected >= 0);
+ assert(dims_selected <= large_rank);
HDsnprintf(test_desc_0, sizeof(test_desc_0),
"\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
@@ -11821,7 +11821,7 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
*/
i = SS_DR_MAX_RANK - large_rank;
- HDassert(i >= 0);
+ assert(i >= 0);
start_ptr = &(start[i]);
stride_ptr = &(stride[i]);
@@ -13592,10 +13592,10 @@ test_select_hyper_chunk_offset(void)
MESSAGE(6, ("Testing hyperslab selections using offsets in chunked datasets\n"));
/* Allocate buffers */
- wbuf = (int *)HDmalloc(sizeof(int) * SPACE10_DIM1);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (int *)HDcalloc(sizeof(int), SPACE10_DIM1);
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (int *)malloc(sizeof(int) * SPACE10_DIM1);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (int *)calloc(sizeof(int), SPACE10_DIM1);
+ CHECK_PTR(rbuf, "calloc");
/* Initialize the write buffer */
for (i = 0; i < SPACE10_DIM1; i++)
@@ -13775,8 +13775,8 @@ test_select_hyper_chunk_offset(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free the buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_chunk_offset() */
#endif
/****************************************************************
@@ -14327,14 +14327,14 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t endpoints, hssize_t en
hsize_t blocklist[12];
herr_t ret;
- HDassert(enblocks <= 2);
+ assert(enblocks <= 2);
/* Copy sid to lim_sid */
lim_sid = H5Scopy(sid);
CHECK(lim_sid, FAIL, "H5Scopy");
/* "And" lim_sid with dims to create limited selection */
- HDmemset(start, 0, sizeof(start));
+ memset(start, 0, sizeof(start));
ret = H5Sselect_hyperslab(lim_sid, H5S_SELECT_AND, start, NULL, dims, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -14361,18 +14361,18 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t endpoints, hssize_t en
/* Verify blocklist */
if (nblocks == (hssize_t)1) {
- if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0)
+ if (memcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end if */
else {
- HDassert(nblocks == (hssize_t)2);
- if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0) {
- if (HDmemcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])) != 0)
+ assert(nblocks == (hssize_t)2);
+ if (memcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0) {
+ if (memcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
- if (HDmemcmp(&blocklist[6], eblock1, 6 * sizeof(eblock1[0])) != 0)
+ if (memcmp(&blocklist[6], eblock1, 6 * sizeof(eblock1[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end if */
- else if (HDmemcmp(&blocklist[6], eblock2, 6 * sizeof(eblock2[0])) != 0)
+ else if (memcmp(&blocklist[6], eblock2, 6 * sizeof(eblock2[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end else */
} /* end if */
@@ -14795,7 +14795,7 @@ test_internal_consistency(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Consistency of Internal States\n"));
- HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ assert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for "all" selection */
all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL);
@@ -15144,7 +15144,7 @@ test_irreg_io(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* Reset the buffer */
- HDmemset(rbuf, 0, sizeof(rbuf));
+ memset(rbuf, 0, sizeof(rbuf));
/* Read selection from disk */
ret = H5Dread(did, H5T_NATIVE_UCHAR, mem_sid, sid, H5P_DEFAULT, rbuf);
@@ -15362,7 +15362,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
@@ -15410,7 +15410,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
@@ -15481,7 +15481,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
@@ -15529,7 +15529,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
@@ -15567,7 +15567,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
@@ -16148,7 +16148,7 @@ test_select(void)
test_select_hyper_contig_dr(H5T_STD_U16BE, H5P_DEFAULT);
test_select_hyper_contig_dr(H5T_STD_U16BE, plist_id);
#else
- HDprintf("** SKIPPED a test due to file creation issues\n");
+ printf("** SKIPPED a test due to file creation issues\n");
#endif
#if 0
test_select_hyper_checker_board_dr(H5T_STD_U16LE, H5P_DEFAULT);
@@ -16156,7 +16156,7 @@ test_select(void)
test_select_hyper_checker_board_dr(H5T_STD_U16BE, H5P_DEFAULT);
test_select_hyper_checker_board_dr(H5T_STD_U16BE, plist_id);
#else
- HDprintf("** SKIPPED a test due to assertion in HDF5\n");
+ printf("** SKIPPED a test due to assertion in HDF5\n");
#endif
test_select_hyper_copy(); /* Test hyperslab selection copying code */
test_select_point_copy(); /* Test point selection copying code */
@@ -16261,7 +16261,7 @@ test_select(void)
test_select_hyper_chunk_offset();
test_select_hyper_chunk_offset2();
#else
- HDprintf("** SKIPPED a test due to assertion in HDF5\n");
+ printf("** SKIPPED a test due to assertion in HDF5\n");
#endif
/* Test selection bounds with & without offsets */
diff --git a/test/API/ttime.c b/test/API/ttime.c
index 74128fd..7735aad 100644
--- a/test/API/ttime.c
+++ b/test/API/ttime.c
@@ -176,13 +176,13 @@ test_time_io(void)
tid = H5Dget_type(dsid);
CHECK(tid, FAIL, "H5Dget_type");
if (H5Tget_class(tid) == H5T_TIME)
- HDfprintf(stderr, "datatype class is H5T_TIME\n");
+ fprintf(stderr, "datatype class is H5T_TIME\n");
status = H5Tclose(tid);
CHECK(status, FAIL, "H5Tclose");
status = H5Dread(dsid, H5T_UNIX_D32LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, &timethen);
CHECK(status, FAIL, "H5Dread");
- HDfprintf(stderr, "time written was: %s\n", HDctime(&timethen));
+ fprintf(stderr, "time written was: %s\n", HDctime(&timethen));
status = H5Dclose(dsid);
CHECK(status, FAIL, "H5Dclose");
diff --git a/test/API/tunicode.c b/test/API/tunicode.c
index fa59456..93e28e3 100644
--- a/test/API/tunicode.c
+++ b/test/API/tunicode.c
@@ -152,7 +152,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Create a src_type that holds the UTF-8 string and its final NULL */
big_len = length + 1; /* +1 byte for final NULL */
- HDassert((2 * big_len) <= sizeof(cmpbuf));
+ assert((2 * big_len) <= sizeof(cmpbuf));
src_type = mkstr(big_len, H5T_STR_NULLTERM);
CHECK(src_type, FAIL, "mkstr");
/* Create a dst_type that holds half of the UTF-8 string and a final
@@ -180,7 +180,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
cmpbuf[2 * small_len - 1] = '\0';
HDstrcpy(&cmpbuf[2 * small_len], new_string);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
/* Now convert from smaller datatype to bigger datatype. This should
* leave our buffer looking like: "abc\0\0\0\0\0abc\0\0\0\0\0" */
@@ -188,12 +188,12 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
CHECK(ret, FAIL, "H5Tconvert");
/* First fill the buffer with NULLs */
- HDmemset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
+ memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
HDstrncpy(cmpbuf, new_string, small_len - 1);
HDstrncpy(&cmpbuf[big_len], new_string, small_len - 1);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
ret = H5Tclose(src_type);
CHECK(ret, FAIL, "H5Tclose");
@@ -215,7 +215,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Create a src_type that holds the UTF-8 string */
big_len = length;
- HDassert((2 * big_len) <= sizeof(cmpbuf));
+ assert((2 * big_len) <= sizeof(cmpbuf));
src_type = mkstr(big_len, H5T_STR_NULLPAD);
CHECK(src_type, FAIL, "mkstr");
/* Create a dst_type that holds half of the UTF-8 string */
@@ -240,7 +240,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
HDstrncpy(&cmpbuf[small_len], new_string, small_len);
HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
/* Now convert from smaller datatype to bigger datatype. This should
* leave our buffer looking like: "abcd\0\0\0\0abcd\0\0\0\0" */
@@ -248,12 +248,12 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
CHECK(ret, FAIL, "H5Tconvert");
/* First fill the buffer with NULLs */
- HDmemset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
+ memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
HDstrncpy(cmpbuf, new_string, small_len);
HDstrncpy(&cmpbuf[big_len], new_string, small_len);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
ret = H5Tclose(src_type);
CHECK(ret, FAIL, "H5Tclose");
@@ -285,7 +285,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
HDstrncpy(&cmpbuf[small_len], new_string, small_len);
HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
/* Now convert from smaller datatype to bigger datatype. This should
* leave our buffer looking like: "abcd abcd " */
@@ -293,12 +293,12 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
CHECK(ret, FAIL, "H5Tconvert");
/* First fill the buffer with spaces */
- HDmemset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
+ memset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
HDstrncpy(cmpbuf, new_string, small_len);
HDstrncpy(&cmpbuf[big_len], new_string, small_len);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
ret = H5Tclose(src_type);
CHECK(ret, FAIL, "H5Tclose");
@@ -589,7 +589,7 @@ test_compound(hid_t fid, const char *string)
herr_t ret;
/* Initialize compound data */
- HDmemset(&s1, 0, sizeof(s1_t)); /* To make purify happy */
+ memset(&s1, 0, sizeof(s1_t)); /* To make purify happy */
s1.a = COMP_INT_VAL;
s1.c = COMP_DOUBLE_VAL;
s1.b = COMP_FLOAT_VAL;
@@ -783,15 +783,15 @@ dump_string(const char *string)
size_t length;
size_t x;
- HDprintf("The string was:\n %s", string);
- HDprintf("Or in hex:\n");
+ printf("The string was:\n %s", string);
+ printf("Or in hex:\n");
length = HDstrlen(string);
for (x = 0; x < length; x++)
- HDprintf("%x ", string[x] & (0x000000FF));
+ printf("%x ", string[x] & (0x000000FF));
- HDprintf("\n");
+ printf("\n");
}
/* Main test.
@@ -814,7 +814,7 @@ test_unicode(void)
/* Create a random string with length NUM_CHARS */
HDsrandom((unsigned)HDtime(NULL));
- HDmemset(test_string, 0, sizeof(test_string));
+ memset(test_string, 0, sizeof(test_string));
for (x = 0; x < NUM_CHARS; x++) {
/* We need to avoid unprintable characters (codes 0-31) and the
* . and / characters, since they aren't allowed in path names.
diff --git a/test/API/tvlstr.c b/test/API/tvlstr.c
index 35d5358..047b2ca 100644
--- a/test/API/tvlstr.c
+++ b/test/API/tvlstr.c
@@ -64,7 +64,7 @@ test_vlstr_alloc_custom(size_t size, void *info)
*/
extra = MAX(sizeof(void *), sizeof(size_t));
- if ((ret_value = HDmalloc(extra + size)) != NULL) {
+ if ((ret_value = malloc(extra + size)) != NULL) {
*(size_t *)ret_value = size;
*mem_used += size;
} /* end if */
@@ -96,7 +96,7 @@ test_vlstr_free_custom(void *_mem, void *info)
if (_mem != NULL) {
mem = ((unsigned char *)_mem) - extra;
*mem_used -= *(size_t *)((void *)mem);
- HDfree(mem);
+ free(mem);
} /* end if */
}
@@ -162,15 +162,15 @@ test_vlstrings_basic(void)
dataset2 = H5Dcreate2(fid1, "Dataset2", tid1, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
- wdata2 = (char *)HDcalloc((size_t)65534, sizeof(char));
- HDmemset(wdata2, 'A', (size_t)65533);
+ wdata2 = (char *)calloc((size_t)65534, sizeof(char));
+ memset(wdata2, 'A', (size_t)65533);
ret = H5Dwrite(dataset2, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata2);
CHECK(ret, FAIL, "H5Dwrite");
H5Sclose(dataspace);
H5Dclose(dataset2);
- HDfree(wdata2);
+ free(wdata2);
/* Change to the custom memory allocation routines for reading VL string */
xfer_pid = H5Pcreate(H5P_DATASET_XFER);
@@ -625,8 +625,8 @@ test_write_vl_string_attribute(void)
att = H5Acreate2(root, "test_scalar_large", type, dataspace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(att, FAIL, "H5Acreate2");
- string_att_write = (char *)HDcalloc((size_t)8192, sizeof(char));
- HDmemset(string_att_write, 'A', (size_t)8191);
+ string_att_write = (char *)calloc((size_t)8192, sizeof(char));
+ memset(string_att_write, 'A', (size_t)8191);
ret = H5Awrite(att, type, &string_att_write);
CHECK(ret, FAIL, "H5Awrite");
@@ -642,7 +642,7 @@ test_write_vl_string_attribute(void)
string_att_check = NULL;
/* The attribute string written is freed below, in the test_read_vl_string_attribute() test */
- /* HDfree(string_att_write); */
+ /* free(string_att_write); */
ret = H5Aclose(att);
CHECK(ret, FAIL, "HAclose");
@@ -723,7 +723,7 @@ test_read_vl_string_attribute(void)
/* Free string allocated in test_write_vl_string_attribute */
if (string_att_write)
- HDfree(string_att_write);
+ free(string_att_write);
ret = H5Aclose(att);
CHECK(ret, FAIL, "HAclose");
diff --git a/test/API/tvltypes.c b/test/API/tvltypes.c
index eca534b..4579dc4 100644
--- a/test/API/tvltypes.c
+++ b/test/API/tvltypes.c
@@ -63,7 +63,7 @@ test_vltypes_alloc_custom(size_t size, void *mem_used)
* DEC Alpha to keep the alignment correct - QAK)
*/
- if ((ret_value = HDmalloc(extra + size)) != NULL) {
+ if ((ret_value = malloc(extra + size)) != NULL) {
*(size_t *)ret_value = size;
*(size_t *)mem_used += size;
} /* end if */
@@ -93,7 +93,7 @@ test_vltypes_free_custom(void *_mem, void *mem_used)
unsigned char *mem = ((unsigned char *)_mem) - extra; /* Pointer to actual block allocated */
*(size_t *)mem_used -= *(size_t *)((void *)mem);
- HDfree(mem);
+ free(mem);
} /* end if */
}
@@ -257,7 +257,7 @@ test_vltypes_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(unsigned int));
+ wdata[i].p = malloc((i + 1) * sizeof(unsigned int));
wdata[i].len = i + 1;
for (j = 0; j < (i + 1); j++)
((unsigned int *)wdata[i].p)[j] = i * 10 + j;
@@ -588,7 +588,7 @@ rewrite_vltypes_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(unsigned int));
+ wdata[i].p = malloc((i + increment) * sizeof(unsigned int));
wdata[i].len = i + increment;
for (j = 0; j < (i + increment); j++)
((unsigned int *)wdata[i].p)[j] = i * 20 + j;
@@ -750,7 +750,7 @@ test_vltypes_vlen_compound(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(s1));
+ wdata[i].p = malloc((i + 1) * sizeof(s1));
wdata[i].len = i + 1;
for (j = 0; j < (i + 1); j++) {
((s1 *)wdata[i].p)[j].i = (int)(i * 10 + j);
@@ -902,7 +902,7 @@ rewrite_vltypes_vlen_compound(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(s1));
+ wdata[i].p = malloc((i + increment) * sizeof(s1));
wdata[i].len = i + increment;
for (j = 0; j < (i + increment); j++) {
((s1 *)wdata[i].p)[j].i = (int)(i * 40 + j);
@@ -1051,17 +1051,17 @@ test_vltypes_compound_vlen_vlen(void)
MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n"));
/* Allocate and initialize VL data to write */
- wdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
- CHECK_PTR(wdata, "HDmalloc");
- rdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
- CHECK_PTR(rdata, "HDmalloc");
+ wdata = (s1 *)malloc(sizeof(s1) * SPACE3_DIM1);
+ CHECK_PTR(wdata, "malloc");
+ rdata = (s1 *)malloc(sizeof(s1) * SPACE3_DIM1);
+ CHECK_PTR(rdata, "malloc");
for (i = 0; i < SPACE3_DIM1; i++) {
wdata[i].i = (int)(i * 10);
wdata[i].f = (float)(i * 20) / 3.0F;
- wdata[i].v.p = HDmalloc((i + L1_INCM) * sizeof(hvl_t));
+ wdata[i].v.p = malloc((i + L1_INCM) * sizeof(hvl_t));
wdata[i].v.len = i + L1_INCM;
for (t1 = (hvl_t *)((wdata[i].v).p), j = 0; j < (i + L1_INCM); j++, t1++) {
- t1->p = HDmalloc((j + L2_INCM) * sizeof(unsigned int));
+ t1->p = malloc((j + L2_INCM) * sizeof(unsigned int));
t1->len = j + L2_INCM;
for (k = 0; k < j + L2_INCM; k++)
((unsigned int *)t1->p)[k] = i * 100 + j * 10 + k;
@@ -1193,8 +1193,8 @@ test_vltypes_compound_vlen_vlen(void)
CHECK(ret, FAIL, "H5Fclose");
/* Release buffers */
- HDfree(wdata);
- HDfree(rdata);
+ free(wdata);
+ free(rdata);
} /* end test_vltypes_compound_vlen_vlen() */
/****************************************************************
@@ -1241,11 +1241,11 @@ test_vltypes_compound_vlstr(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].v.p = (s2 *)HDmalloc((i + L3_INCM) * sizeof(s2));
+ wdata[i].v.p = (s2 *)malloc((i + L3_INCM) * sizeof(s2));
wdata[i].v.len = i + L3_INCM;
for (t1 = (s2 *)((wdata[i].v).p), j = 0; j < (i + L3_INCM); j++, t1++) {
HDstrcat(str, "m");
- t1->string = (char *)HDmalloc(HDstrlen(str) * sizeof(char) + 1);
+ t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
HDstrcpy(t1->string, str);
/*t1->color = red;*/
t1->color = blue;
@@ -1411,11 +1411,11 @@ test_vltypes_compound_vlstr(void)
/* Use this part for new data */
HDstrcpy(str, "bbbbbbbb\0");
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata2[i].v.p = (s2 *)HDmalloc((i + 1) * sizeof(s2));
+ wdata2[i].v.p = (s2 *)malloc((i + 1) * sizeof(s2));
wdata2[i].v.len = i + 1;
for (t1 = (s2 *)(wdata2[i].v).p, j = 0; j < i + 1; j++, t1++) {
HDstrcat(str, "pp");
- t1->string = (char *)HDmalloc(HDstrlen(str) * sizeof(char) + 1);
+ t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
HDstrcpy(t1->string, str);
t1->color = green;
}
@@ -1529,7 +1529,7 @@ test_vltypes_compound_vlen_atomic(void)
for (i = 0; i < SPACE1_DIM1; i++) {
wdata[i].i = (int)(i * 10);
wdata[i].f = (float)(i * 20) / 3.0F;
- wdata[i].v.p = HDmalloc((i + 1) * sizeof(unsigned int));
+ wdata[i].v.p = malloc((i + 1) * sizeof(unsigned int));
wdata[i].v.len = i + 1;
for (j = 0; j < (i + 1); j++)
((unsigned int *)wdata[i].v.p)[j] = i * 10 + j;
@@ -1633,7 +1633,7 @@ test_vltypes_compound_vlen_atomic(void)
CHECK(dcpl_pid, FAIL, "H5Pcreate");
/* Set the fill value for the second dataset */
- HDmemset(&fill, 0, sizeof(s1));
+ memset(&fill, 0, sizeof(s1));
ret = H5Pset_fill_value(dcpl_pid, tid2, &fill);
CHECK(ret, FAIL, "H5Pset_fill_value");
@@ -1763,7 +1763,7 @@ rewrite_vltypes_compound_vlen_atomic(void)
for (i = 0; i < SPACE1_DIM1; i++) {
wdata[i].i = (int)(i * 40);
wdata[i].f = (float)(i * 50) / 3.0F;
- wdata[i].v.p = HDmalloc((i + increment) * sizeof(unsigned int));
+ wdata[i].v.p = malloc((i + increment) * sizeof(unsigned int));
wdata[i].v.len = i + increment;
for (j = 0; j < (i + increment); j++)
((unsigned int *)wdata[i].v.p)[j] = i * 60 + j;
@@ -1937,14 +1937,14 @@ test_vltypes_vlen_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + 1) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + 1;
for (t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + 1); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
@@ -2138,14 +2138,14 @@ rewrite_longer_vltypes_vlen_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + increment) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + increment;
for (t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + increment); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
@@ -2318,14 +2318,14 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + increment) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + increment;
for (t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + increment); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
@@ -2594,8 +2594,8 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Tclose");
/* Allocate space for the buffer to read data */
- rbuf = (dtype1_struct *)HDmalloc(SPACE4_DIM_LARGE * sizeof(dtype1_struct));
- CHECK_PTR(rbuf, "HDmalloc");
+ rbuf = (dtype1_struct *)malloc(SPACE4_DIM_LARGE * sizeof(dtype1_struct));
+ CHECK_PTR(rbuf, "malloc");
/* Create the small & large dataspaces to use */
small_dspace_id = H5Screate_simple(SPACE4_RANK, small_dims, NULL);
@@ -2693,13 +2693,13 @@ test_vltypes_fill_value(void)
} break;
case H5D_VIRTUAL:
- HDassert(0 && "Invalid layout type!");
+ assert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -2801,13 +2801,13 @@ test_vltypes_fill_value(void)
break;
case H5D_VIRTUAL:
- HDassert(0 && "Invalid layout type!");
+ assert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -2835,7 +2835,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Clear the read buffer */
- HDmemset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
+ memset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
/* Read in non-contiguous selection from 'empty' dataset of fill value */
ret = H5Dread(dset_id, dtype1_id, dset_select_dspace_id, dset_select_dspace_id, xfer_pid, rbuf);
@@ -2893,7 +2893,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Clear the read buffer */
- HDmemset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
+ memset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
/* Read in non-contiguous selection from 'empty' dataset of fill value */
ret = H5Dread(dset_id, dtype1_id, dset_select_dspace_id, dset_select_dspace_id, xfer_pid, rbuf);
@@ -2988,13 +2988,13 @@ test_vltypes_fill_value(void)
break;
case H5D_VIRTUAL:
- HDassert(0 && "Invalid layout type!");
+ assert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -3048,7 +3048,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Clear the read buffer */
- HDmemset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
+ memset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
/* Read in non-contiguous selection from dataset */
ret = H5Dread(dset_id, dtype1_id, dset_select_dspace_id, dset_select_dspace_id, xfer_pid, rbuf);
@@ -3136,7 +3136,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Clear the read buffer */
- HDmemset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
+ memset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
/* Read in non-contiguous selection from dataset */
ret = H5Dread(dset_id, dtype1_id, dset_select_dspace_id, dset_select_dspace_id, xfer_pid, rbuf);
@@ -3215,7 +3215,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Tclose");
/* Release buffer */
- HDfree(rbuf);
+ free(rbuf);
} /* end test_vltypes_fill_value() */
/****************************************************************
diff --git a/test/accum.c b/test/accum.c
index 816d9c0..aaa65d4 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -192,10 +192,10 @@ test_write_read(H5F_t *f)
TESTING("simple write/read to/from metadata accumulator");
/* Allocate buffers */
- write_buf = (int *)HDmalloc(1024 * sizeof(int));
- HDassert(write_buf);
- read_buf = (int *)HDcalloc((size_t)1024, sizeof(int));
- HDassert(read_buf);
+ write_buf = (int *)malloc(1024 * sizeof(int));
+ assert(write_buf);
+ read_buf = (int *)calloc((size_t)1024, sizeof(int));
+ assert(read_buf);
/* Fill buffer with data, zero out read buffer */
for (i = 0; i < 1024; i++)
@@ -207,7 +207,7 @@ test_write_read(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(0, 1024, read_buf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(write_buf, read_buf, (size_t)1024) != 0)
+ if (memcmp(write_buf, read_buf, (size_t)1024) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -216,15 +216,15 @@ test_write_read(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(write_buf);
- HDfree(read_buf);
+ free(write_buf);
+ free(read_buf);
return 0;
error:
/* Release memory */
- HDfree(write_buf);
- HDfree(read_buf);
+ free(write_buf);
+ free(read_buf);
return 1;
} /* test_write_read */
@@ -251,10 +251,10 @@ test_write_read_nonacc_front(H5F_t *f)
TESTING("simple write/read to/from before metadata accumulator");
/* Allocate buffers */
- write_buf = (int *)HDmalloc(2048 * sizeof(int));
- HDassert(write_buf);
- read_buf = (int *)HDcalloc((size_t)2048, sizeof(int));
- HDassert(read_buf);
+ write_buf = (int *)malloc(2048 * sizeof(int));
+ assert(write_buf);
+ read_buf = (int *)calloc((size_t)2048, sizeof(int));
+ assert(read_buf);
/* Fill buffer with data, zero out read buffer */
for (i = 0; i < 2048; i++)
@@ -272,7 +272,7 @@ test_write_read_nonacc_front(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(0, 1024, read_buf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(write_buf, read_buf, (size_t)1024) != 0)
+ if (memcmp(write_buf, read_buf, (size_t)1024) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -281,15 +281,15 @@ test_write_read_nonacc_front(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(write_buf);
- HDfree(read_buf);
+ free(write_buf);
+ free(read_buf);
return 0;
error:
/* Release memory */
- HDfree(write_buf);
- HDfree(read_buf);
+ free(write_buf);
+ free(read_buf);
return 1;
} /* test_write_read */
@@ -316,10 +316,10 @@ test_write_read_nonacc_end(H5F_t *f)
TESTING("simple write/read to/from after metadata accumulator");
/* Allocate buffers */
- write_buf = (int *)HDmalloc(2048 * sizeof(int));
- HDassert(write_buf);
- read_buf = (int *)HDcalloc((size_t)2048, sizeof(int));
- HDassert(read_buf);
+ write_buf = (int *)malloc(2048 * sizeof(int));
+ assert(write_buf);
+ read_buf = (int *)calloc((size_t)2048, sizeof(int));
+ assert(read_buf);
/* Fill buffer with data, zero out read buffer */
for (i = 0; i < 2048; i++)
@@ -337,7 +337,7 @@ test_write_read_nonacc_end(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(1024, 1024, read_buf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(write_buf, read_buf, (size_t)1024) != 0)
+ if (memcmp(write_buf, read_buf, (size_t)1024) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -346,15 +346,15 @@ test_write_read_nonacc_end(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(write_buf);
- HDfree(read_buf);
+ free(write_buf);
+ free(read_buf);
return 0;
error:
/* Release memory */
- HDfree(write_buf);
- HDfree(read_buf);
+ free(write_buf);
+ free(read_buf);
return 1;
} /* test_write_read */
@@ -383,12 +383,12 @@ test_free(H5F_t *f)
TESTING("simple freeing metadata accumulator");
/* Write and free the whole accumulator. */
- wbuf = (int32_t *)HDmalloc(256 * sizeof(int32_t));
- HDassert(wbuf);
- rbuf = (int32_t *)HDmalloc(256 * sizeof(int32_t));
- HDassert(rbuf);
- expect = (int32_t *)HDmalloc(256 * sizeof(int32_t));
- HDassert(expect);
+ wbuf = (int32_t *)malloc(256 * sizeof(int32_t));
+ assert(wbuf);
+ rbuf = (int32_t *)malloc(256 * sizeof(int32_t));
+ assert(rbuf);
+ expect = (int32_t *)malloc(256 * sizeof(int32_t));
+ assert(expect);
/* Fill buffer with data */
for (i = 0; i < 256; i++)
@@ -424,7 +424,7 @@ test_free(H5F_t *f)
/* Check that the accumulator still contains the correct data */
if (accum_read(1 * sizeof(int32_t), 127 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf + 1, rbuf, 127 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf + 1, rbuf, 127 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Free the block of 4B at 127*4B */
@@ -434,7 +434,7 @@ test_free(H5F_t *f)
/* Check that the accumulator still contains the correct data */
if (accum_read(1 * sizeof(int32_t), 126 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf + 1, rbuf, 126 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf + 1, rbuf, 126 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Free the block of 4B at 2*4B */
@@ -444,132 +444,132 @@ test_free(H5F_t *f)
/* Check that the accumulator still contains the correct data */
if (accum_read(1 * sizeof(int32_t), 1 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf + 1, rbuf, 1 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf + 1, rbuf, 1 * sizeof(int32_t)) != 0)
TEST_ERROR;
if (accum_read(3 * sizeof(int32_t), 124 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf + 3, rbuf, 124 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf + 3, rbuf, 124 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Test freeing section that overlaps the start of the accumulator and is
* entirely before dirty section */
if (accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
+ memcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
if (accum_flush(f) < 0)
FAIL_STACK_ERROR;
if (accum_write(68 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 68, wbuf, 4 * sizeof(int32_t));
+ memcpy(expect + 68, wbuf, 4 * sizeof(int32_t));
if (accum_free(f, 62 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0)
FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if (accum_read(66 * sizeof(int32_t), 126 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(expect + 66, rbuf, 126 * sizeof(int32_t)) != 0)
+ if (memcmp(expect + 66, rbuf, 126 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Test freeing section that overlaps the start of the accumulator and
* completely contains dirty section */
if (accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
+ memcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
if (accum_flush(f) < 0)
FAIL_STACK_ERROR;
if (accum_write(68 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 68, wbuf, 4 * sizeof(int32_t));
+ memcpy(expect + 68, wbuf, 4 * sizeof(int32_t));
if (accum_free(f, 62 * sizeof(int32_t), 16 * sizeof(int32_t)) < 0)
FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if (accum_read(78 * sizeof(int32_t), 114 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(expect + 78, rbuf, 114 * sizeof(int32_t)) != 0)
+ if (memcmp(expect + 78, rbuf, 114 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Test freeing section completely contained in accumulator and is entirely
* before dirty section */
if (accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
+ memcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
if (accum_flush(f) < 0)
FAIL_STACK_ERROR;
if (accum_write(72 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
+ memcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
if (accum_free(f, 66 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0)
FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if (accum_read(70 * sizeof(int32_t), 122 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(expect + 70, rbuf, 122 * sizeof(int32_t)) != 0)
+ if (memcmp(expect + 70, rbuf, 122 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Test freeing section completely contained in accumulator, starts before
* dirty section, and ends in dirty section */
if (accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
+ memcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
if (accum_flush(f) < 0)
FAIL_STACK_ERROR;
if (accum_write(72 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
+ memcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
if (accum_free(f, 70 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0)
FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if (accum_read(74 * sizeof(int32_t), 118 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(expect + 74, rbuf, 118 * sizeof(int32_t)) != 0)
+ if (memcmp(expect + 74, rbuf, 118 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Test freeing section completely contained in accumulator and completely
* contains dirty section */
if (accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
+ memcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
if (accum_flush(f) < 0)
FAIL_STACK_ERROR;
if (accum_write(72 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
+ memcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
if (accum_free(f, 70 * sizeof(int32_t), 8 * sizeof(int32_t)) < 0)
FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if (accum_read(78 * sizeof(int32_t), 114 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(expect + 78, rbuf, 114 * sizeof(int32_t)) != 0)
+ if (memcmp(expect + 78, rbuf, 114 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Test freeing section completely contained in accumulator, starts at start
* of dirty section, and ends in dirty section */
if (accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
+ memcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
if (accum_flush(f) < 0)
FAIL_STACK_ERROR;
if (accum_write(72 * sizeof(int32_t), 8 * sizeof(int32_t), wbuf) < 0)
FAIL_STACK_ERROR;
- HDmemcpy(expect + 72, wbuf, 8 * sizeof(int32_t));
+ memcpy(expect + 72, wbuf, 8 * sizeof(int32_t));
if (accum_free(f, 72 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0)
FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if (accum_read(76 * sizeof(int32_t), 116 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(expect + 76, rbuf, 116 * sizeof(int32_t)) != 0)
+ if (memcmp(expect + 76, rbuf, 116 * sizeof(int32_t)) != 0)
TEST_ERROR;
- HDfree(wbuf);
+ free(wbuf);
wbuf = NULL;
- HDfree(rbuf);
+ free(rbuf);
rbuf = NULL;
- HDfree(expect);
+ free(expect);
expect = NULL;
if (accum_reset(f) < 0)
@@ -581,11 +581,11 @@ test_free(H5F_t *f)
error:
if (wbuf)
- HDfree(wbuf);
+ free(wbuf);
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
if (expect)
- HDfree(expect);
+ free(expect);
return 1;
} /* test_free */
@@ -614,10 +614,10 @@ test_accum_overlap(H5F_t *f)
TESTING("overlapping write to metadata accumulator");
/* Allocate buffers */
- wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t));
- HDassert(wbuf);
- rbuf = (int32_t *)HDcalloc((size_t)4096, sizeof(int32_t));
- HDassert(rbuf);
+ wbuf = (int32_t *)malloc(4096 * sizeof(int32_t));
+ assert(wbuf);
+ rbuf = (int32_t *)calloc((size_t)4096, sizeof(int32_t));
+ assert(rbuf);
/* Case 1: No metadata in accumulator */
/* Write 10 1's at address 40 */
@@ -629,7 +629,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(40, 10 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 10 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 10 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 2: End of new piece aligns with start of accumulated data */
@@ -641,7 +641,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(20, 5 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 5 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 5 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 3: Start of new piece aligns with start of accumulated data */
@@ -653,7 +653,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(20, 3 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 4: New piece overlaps start of accumulated data */
@@ -665,7 +665,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(8, 5 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 5 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 5 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 5: New piece completely within accumulated data */
@@ -677,7 +677,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(48, 4 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 4 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 4 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 6: End of new piece aligns with end of accumulated data */
@@ -689,7 +689,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(68, 3 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 7: New piece overlaps end of accumulated data */
@@ -701,7 +701,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(76, 5 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 5 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 5 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 8: Start of new piece aligns with end of accumulated data */
@@ -713,7 +713,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(96, 3 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Set up expected data buffer and verify contents of
@@ -738,7 +738,7 @@ test_accum_overlap(H5F_t *f)
wbuf[i] = 8;
if (accum_read(8, 25 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 25 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 25 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 9: New piece completely before accumulated data */
@@ -750,7 +750,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(0, 1 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 1 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 1 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 10: New piece completely after accumulated data */
@@ -762,7 +762,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(116, 4 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 4 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 4 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 11: New piece completely overlaps accumulated data */
@@ -774,7 +774,7 @@ test_accum_overlap(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(112, 6 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 6 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 6 * sizeof(int32_t)) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -783,15 +783,15 @@ test_accum_overlap(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 0;
error:
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 1;
} /* test_accum_overlap */
@@ -821,10 +821,10 @@ test_accum_overlap_clean(H5F_t *f)
TESTING("overlapping write to partially clean metadata accumulator");
/* Allocate buffers */
- wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t));
- HDassert(wbuf);
- rbuf = (int32_t *)HDcalloc((size_t)4096, sizeof(int32_t));
- HDassert(rbuf);
+ wbuf = (int32_t *)malloc(4096 * sizeof(int32_t));
+ assert(wbuf);
+ rbuf = (int32_t *)calloc((size_t)4096, sizeof(int32_t));
+ assert(rbuf);
/* Case 1: No metadata in accumulator */
/* Write 10 1's at address 40 */
@@ -836,7 +836,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(40, 10 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 10 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 10 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 2: End of new piece aligns with start of clean accumulated data */
@@ -850,7 +850,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(20, 5 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 5 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 5 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 3: Start of new piece aligns with start of accumulated data,
@@ -863,7 +863,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(20, 6 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 6 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 6 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 4: New piece completely within accumulated data, overlaps
@@ -876,7 +876,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(40, 2 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 2 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 2 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 5: New piece completely within accumulated data, completely
@@ -889,7 +889,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(52, 2 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 2 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 2 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 6: New piece completely within clean accumulated data */
@@ -903,7 +903,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(44, 3 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 7: New piece overlaps start of clean accumulated data */
@@ -917,7 +917,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(16, 2 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 2 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 2 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 8: New piece overlaps start of accumulated data, completely
@@ -930,7 +930,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(12, 4 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 4 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 4 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 9: Start of new piece aligns with end of clean accumulated data */
@@ -944,7 +944,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(80, 3 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 3 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 10: New piece overlaps end of clean accumulated data */
@@ -958,7 +958,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(88, 2 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 2 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 2 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 11: New piece overlaps end of accumulated data, completely encloses
@@ -971,7 +971,7 @@ test_accum_overlap_clean(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(84, 4 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 4 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 4 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Set up expected data buffer and verify contents of
@@ -994,7 +994,7 @@ test_accum_overlap_clean(H5F_t *f)
wbuf[i] = 7;
if (accum_read(12, 22 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 22 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 22 * sizeof(int32_t)) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -1003,15 +1003,15 @@ test_accum_overlap_clean(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 0;
error:
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 1;
} /* test_accum_overlap_clean */
@@ -1040,10 +1040,10 @@ test_accum_non_overlap_size(H5F_t *f)
TESTING("non-overlapping write to accumulator larger then accum_size");
/* Allocate buffers */
- wbuf = (int *)HDmalloc(4096 * sizeof(int32_t));
- HDassert(wbuf);
- rbuf = (int *)HDcalloc((size_t)4096, sizeof(int32_t));
- HDassert(rbuf);
+ wbuf = (int *)malloc(4096 * sizeof(int32_t));
+ assert(wbuf);
+ rbuf = (int *)calloc((size_t)4096, sizeof(int32_t));
+ assert(rbuf);
/* Case 1: No metadata in accumulator */
/* Write 10 1's at address 140 */
@@ -1055,7 +1055,7 @@ test_accum_non_overlap_size(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(140, 10 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 10 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 10 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 9: New piece completely before accumulated data */
@@ -1067,7 +1067,7 @@ test_accum_non_overlap_size(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(0, 20 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 20 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 20 * sizeof(int32_t)) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -1076,15 +1076,15 @@ test_accum_non_overlap_size(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 0;
error:
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 1;
} /* test_accum_non_overlap_size */
@@ -1114,10 +1114,10 @@ test_accum_overlap_size(H5F_t *f)
TESTING("overlapping write to accumulator larger then accum_size");
/* Allocate buffers */
- wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t));
- HDassert(wbuf);
- rbuf = (int32_t *)HDcalloc((size_t)4096, sizeof(int32_t));
- HDassert(rbuf);
+ wbuf = (int32_t *)malloc(4096 * sizeof(int32_t));
+ assert(wbuf);
+ rbuf = (int32_t *)calloc((size_t)4096, sizeof(int32_t));
+ assert(rbuf);
/* Case 1: No metadata in accumulator */
/* Write 10 1's at address 64 */
@@ -1129,7 +1129,7 @@ test_accum_overlap_size(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(64, 10 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 10 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 10 * sizeof(int32_t)) != 0)
TEST_ERROR;
/* Case 9: New piece completely before accumulated data */
@@ -1141,7 +1141,7 @@ test_accum_overlap_size(H5F_t *f)
FAIL_STACK_ERROR;
if (accum_read(60, 72 * sizeof(int32_t), rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, 72 * sizeof(int32_t)) != 0)
+ if (memcmp(wbuf, rbuf, 72 * sizeof(int32_t)) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -1150,15 +1150,15 @@ test_accum_overlap_size(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 0;
error:
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 1;
} /* test_accum_overlap_size */
@@ -1199,10 +1199,10 @@ test_accum_adjust(H5F_t *f)
TESTING("accumulator adjustments after append/prepend of data");
/* Allocate buffers */
- wbuf = (int32_t *)HDmalloc((size_t)s * sizeof(int32_t));
- HDassert(wbuf);
- rbuf = (int32_t *)HDcalloc((size_t)s, sizeof(int32_t));
- HDassert(rbuf);
+ wbuf = (int32_t *)malloc((size_t)s * sizeof(int32_t));
+ assert(wbuf);
+ rbuf = (int32_t *)calloc((size_t)s, sizeof(int32_t));
+ assert(rbuf);
/* Fill up write buffer */
for (i = 0; i < s; i++)
@@ -1232,13 +1232,13 @@ test_accum_adjust(H5F_t *f)
/* Read back and verify first write */
if (accum_read((1024 * 1024), (1024 * 1024) - 1, rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, (size_t)((1024 * 1024) - 1)) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)((1024 * 1024) - 1)) != 0)
TEST_ERROR;
/* Read back and verify second write */
if (accum_read((1024 * 1024) - 1024, 1024, rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, (size_t)1024) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)1024) != 0)
TEST_ERROR;
/* Reset accumulator for next case */
@@ -1269,12 +1269,12 @@ test_accum_adjust(H5F_t *f)
/* Read back and verify both pieces of data */
if (accum_read(1048576, 1048575, rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, (size_t)1048576) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)1048576) != 0)
TEST_ERROR;
if (accum_read(5, 1048571, rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, (size_t)1048571) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)1048571) != 0)
TEST_ERROR;
/* Reset accumulator for next case */
@@ -1316,7 +1316,7 @@ test_accum_adjust(H5F_t *f)
the data is as expected */
if (accum_read((1024 * 1024) - 1, 1024, rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, (size_t)1024) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)1024) != 0)
TEST_ERROR;
/* Reset accumulator for next case */
@@ -1364,7 +1364,7 @@ test_accum_adjust(H5F_t *f)
the data is as expected */
if (accum_read(1048571, 349523, rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, (size_t)349523) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)349523) != 0)
TEST_ERROR;
/* Reset accumulator for next case */
@@ -1409,7 +1409,7 @@ test_accum_adjust(H5F_t *f)
the data is as expected */
if (accum_read((1024 * 1024) - 5, 10, rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, (size_t)10) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)10) != 0)
TEST_ERROR;
/* Reset accumulator for next case */
@@ -1447,7 +1447,7 @@ test_accum_adjust(H5F_t *f)
the data is as expected */
if (accum_read(1048571, 349523, rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, (size_t)349523) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)349523) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -1456,15 +1456,15 @@ test_accum_adjust(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 0;
error:
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 1;
} /* test_accum_adjust */
@@ -1497,10 +1497,10 @@ test_read_after(H5F_t *f)
TESTING("reading data from both accumulator and disk");
/* Allocate buffers */
- wbuf = (int32_t *)HDmalloc((size_t)s * sizeof(int32_t));
- HDassert(wbuf);
- rbuf = (int32_t *)HDcalloc((size_t)s, sizeof(int32_t));
- HDassert(rbuf);
+ wbuf = (int32_t *)malloc((size_t)s * sizeof(int32_t));
+ assert(wbuf);
+ rbuf = (int32_t *)calloc((size_t)s, sizeof(int32_t));
+ assert(rbuf);
/* Fill up write buffer with 1s */
for (i = 0; i < s; i++)
@@ -1536,7 +1536,7 @@ test_read_after(H5F_t *f)
the data is as expected */
if (accum_read(512, 512, rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf, rbuf, (size_t)128) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)128) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -1545,15 +1545,15 @@ test_read_after(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 0;
error:
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
return 1;
} /* end test_read_after */
@@ -1579,14 +1579,14 @@ test_big(H5F_t *f)
unsigned u; /* Local index variable */
/* Allocate space for the write & read buffers */
- wbuf = (uint8_t *)HDmalloc((size_t)BIG_BUF_SIZE);
- HDassert(wbuf);
- wbuf2 = (uint8_t *)HDmalloc((size_t)BIG_BUF_SIZE);
- HDassert(wbuf2);
- rbuf = (uint8_t *)HDcalloc((size_t)(BIG_BUF_SIZE + 1536), (size_t)1);
- HDassert(rbuf);
- zbuf = (uint8_t *)HDcalloc((size_t)(BIG_BUF_SIZE + 1536), (size_t)1);
- HDassert(zbuf);
+ wbuf = (uint8_t *)malloc((size_t)BIG_BUF_SIZE);
+ assert(wbuf);
+ wbuf2 = (uint8_t *)malloc((size_t)BIG_BUF_SIZE);
+ assert(wbuf2);
+ rbuf = (uint8_t *)calloc((size_t)(BIG_BUF_SIZE + 1536), (size_t)1);
+ assert(rbuf);
+ zbuf = (uint8_t *)calloc((size_t)(BIG_BUF_SIZE + 1536), (size_t)1);
+ assert(zbuf);
/* Initialize write buffers */
for (u = 0; u < BIG_BUF_SIZE; u++) {
@@ -1605,13 +1605,13 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(wbuf, rbuf, (size_t)BIG_BUF_SIZE) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(0, BIG_BUF_SIZE, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
+ memset(rbuf, 0, (size_t)BIG_BUF_SIZE);
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1625,17 +1625,17 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(zbuf, rbuf, (size_t)1024) != 0)
+ if (memcmp(zbuf, rbuf, (size_t)1024) != 0)
TEST_ERROR;
- if (HDmemcmp(wbuf, rbuf + 1024, (size_t)1024) != 0)
+ if (memcmp(wbuf, rbuf + 1024, (size_t)1024) != 0)
TEST_ERROR;
- if (HDmemcmp(zbuf, rbuf + 2048, (size_t)(BIG_BUF_SIZE - 2048)) != 0)
+ if (memcmp(zbuf, rbuf + 2048, (size_t)(BIG_BUF_SIZE - 2048)) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(1024, 1024, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
+ memset(rbuf, 0, (size_t)BIG_BUF_SIZE);
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1649,15 +1649,15 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(zbuf, rbuf, (size_t)(BIG_BUF_SIZE - 512)) != 0)
+ if (memcmp(zbuf, rbuf, (size_t)(BIG_BUF_SIZE - 512)) != 0)
TEST_ERROR;
- if (HDmemcmp(wbuf, rbuf + (BIG_BUF_SIZE - 512), (size_t)512) != 0)
+ if (memcmp(wbuf, rbuf + (BIG_BUF_SIZE - 512), (size_t)512) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(BIG_BUF_SIZE - 512, 1024, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
+ memset(rbuf, 0, (size_t)BIG_BUF_SIZE);
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1671,15 +1671,15 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(wbuf + 512, rbuf, (size_t)512) != 0)
+ if (memcmp(wbuf + 512, rbuf, (size_t)512) != 0)
TEST_ERROR;
- if (HDmemcmp(zbuf, rbuf + 512, (size_t)(BIG_BUF_SIZE - 512)) != 0)
+ if (memcmp(zbuf, rbuf + 512, (size_t)(BIG_BUF_SIZE - 512)) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(0, 1024, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
+ memset(rbuf, 0, (size_t)BIG_BUF_SIZE);
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1699,13 +1699,13 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
+ if (memcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(0, BIG_BUF_SIZE, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
+ memset(rbuf, 0, (size_t)BIG_BUF_SIZE);
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1725,15 +1725,15 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
+ if (memcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
- if (HDmemcmp(wbuf + 512, rbuf + BIG_BUF_SIZE, (size_t)512) != 0)
+ if (memcmp(wbuf + 512, rbuf + BIG_BUF_SIZE, (size_t)512) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(0, BIG_BUF_SIZE + 512, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 512));
+ memset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 512));
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1758,17 +1758,17 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
+ if (memcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
- if (HDmemcmp(zbuf, rbuf + BIG_BUF_SIZE, (size_t)512) != 0)
+ if (memcmp(zbuf, rbuf + BIG_BUF_SIZE, (size_t)512) != 0)
TEST_ERROR;
- if (HDmemcmp(wbuf, rbuf + BIG_BUF_SIZE + 512, (size_t)512) != 0)
+ if (memcmp(wbuf, rbuf + BIG_BUF_SIZE + 512, (size_t)512) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(0, BIG_BUF_SIZE + 1536, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1024));
+ memset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1024));
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1795,15 +1795,15 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(zbuf, rbuf, (size_t)1536) != 0)
+ if (memcmp(zbuf, rbuf, (size_t)1536) != 0)
TEST_ERROR;
- if (HDmemcmp(wbuf2, rbuf + 1536, (size_t)BIG_BUF_SIZE) != 0)
+ if (memcmp(wbuf2, rbuf + 1536, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(1536, BIG_BUF_SIZE, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1536));
+ memset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1536));
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1828,15 +1828,15 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(zbuf, rbuf, (size_t)512) != 0)
+ if (memcmp(zbuf, rbuf, (size_t)512) != 0)
TEST_ERROR;
- if (HDmemcmp(wbuf2, rbuf + 512, (size_t)BIG_BUF_SIZE) != 0)
+ if (memcmp(wbuf2, rbuf + 512, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(512, BIG_BUF_SIZE, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 512));
+ memset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 512));
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1861,17 +1861,17 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(wbuf, rbuf, (size_t)1024) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)1024) != 0)
TEST_ERROR;
- if (HDmemcmp(zbuf, rbuf + 1024, (size_t)512) != 0)
+ if (memcmp(zbuf, rbuf + 1024, (size_t)512) != 0)
TEST_ERROR;
- if (HDmemcmp(wbuf2, rbuf + 1536, (size_t)BIG_BUF_SIZE) != 0)
+ if (memcmp(wbuf2, rbuf + 1536, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
/* Reset data in file back to zeros & reset the read buffer */
if (accum_write(0, BIG_BUF_SIZE + 1536, zbuf) < 0)
FAIL_STACK_ERROR;
- HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1536));
+ memset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1536));
if (accum_reset(f) < 0)
FAIL_STACK_ERROR;
@@ -1896,9 +1896,9 @@ test_big(H5F_t *f)
FAIL_STACK_ERROR;
/* Verify data read */
- if (HDmemcmp(wbuf, rbuf, (size_t)512) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)512) != 0)
TEST_ERROR;
- if (HDmemcmp(wbuf2, rbuf + 512, (size_t)BIG_BUF_SIZE) != 0)
+ if (memcmp(wbuf2, rbuf + 512, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -1907,18 +1907,18 @@ test_big(H5F_t *f)
PASSED();
/* Release memory */
- HDfree(wbuf);
- HDfree(wbuf2);
- HDfree(rbuf);
- HDfree(zbuf);
+ free(wbuf);
+ free(wbuf2);
+ free(rbuf);
+ free(zbuf);
return 0;
error:
- HDfree(wbuf);
- HDfree(wbuf2);
- HDfree(rbuf);
- HDfree(zbuf);
+ free(wbuf);
+ free(wbuf2);
+ free(rbuf);
+ free(zbuf);
return 1;
} /* end test_big() */
@@ -1950,10 +1950,10 @@ test_random_write(H5F_t *f)
unsigned u; /* Local index variable */
/* Allocate space for the write & read buffers */
- wbuf = (uint8_t *)HDmalloc((size_t)RANDOM_BUF_SIZE);
- HDassert(wbuf);
- rbuf = (uint8_t *)HDcalloc((size_t)RANDOM_BUF_SIZE, (size_t)1);
- HDassert(rbuf);
+ wbuf = (uint8_t *)malloc((size_t)RANDOM_BUF_SIZE);
+ assert(wbuf);
+ rbuf = (uint8_t *)calloc((size_t)RANDOM_BUF_SIZE, (size_t)1);
+ assert(rbuf);
/* Initialize write buffer */
for (u = 0; u < RANDOM_BUF_SIZE; u++)
@@ -1965,15 +1965,15 @@ test_random_write(H5F_t *f)
seed = (unsigned)HDtime(NULL);
#if 0
/* seed = (unsigned)1155438845; */
-HDfprintf(stderr, "Random # seed was: %u\n", seed);
+fprintf(stderr, "Random # seed was: %u\n", seed);
#endif
HDsrandom(seed);
/* Allocate space for the segment length buffer */
- off = (size_t *)HDmalloc(MAX_RANDOM_SEGMENTS * sizeof(size_t));
- HDassert(off);
- len = (size_t *)HDmalloc(MAX_RANDOM_SEGMENTS * sizeof(size_t));
- HDassert(len);
+ off = (size_t *)malloc(MAX_RANDOM_SEGMENTS * sizeof(size_t));
+ assert(off);
+ len = (size_t *)malloc(MAX_RANDOM_SEGMENTS * sizeof(size_t));
+ assert(len);
/* Randomly choose lengths of segments */
cur_off = 0;
@@ -2035,7 +2035,7 @@ HDfprintf(stderr, "Random # seed was: %u\n", seed);
/* Verify individual reads */
if (accum_read(RANDOM_BASE_OFF + off[u], len[u], rbuf) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(wbuf + off[u], rbuf, len[u]) != 0)
+ if (memcmp(wbuf + off[u], rbuf, len[u]) != 0)
TEST_ERROR;
} /* end for */
@@ -2044,7 +2044,7 @@ HDfprintf(stderr, "Random # seed was: %u\n", seed);
FAIL_STACK_ERROR;
/* Verify data read back in */
- if (HDmemcmp(wbuf, rbuf, (size_t)RANDOM_BUF_SIZE) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)RANDOM_BUF_SIZE) != 0)
TEST_ERROR;
if (accum_reset(f) < 0)
@@ -2053,21 +2053,21 @@ HDfprintf(stderr, "Random # seed was: %u\n", seed);
PASSED();
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(off);
- HDfree(len);
+ free(wbuf);
+ free(rbuf);
+ free(off);
+ free(len);
return 0;
error:
/* Release memory */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(off);
- HDfree(len);
+ free(wbuf);
+ free(rbuf);
+ free(off);
+ free(len);
- HDfprintf(stderr, "Random # seed was: %u\n", seed);
+ fprintf(stderr, "Random # seed was: %u\n", seed);
return 1;
} /* end test_random_write() */
@@ -2176,9 +2176,9 @@ test_swmr_write_big(hbool_t newest_format)
FAIL_STACK_ERROR;
/* Allocate space for the write & read buffers */
- if ((wbuf2 = (uint8_t *)HDmalloc((size_t)BIG_BUF_SIZE)) == NULL)
+ if ((wbuf2 = (uint8_t *)malloc((size_t)BIG_BUF_SIZE)) == NULL)
FAIL_STACK_ERROR;
- if ((rbuf = (uint8_t *)HDmalloc((size_t)BIG_BUF_SIZE)) == NULL)
+ if ((rbuf = (uint8_t *)malloc((size_t)BIG_BUF_SIZE)) == NULL)
FAIL_STACK_ERROR;
/* Initialize wbuf with "0, 1, 2...1024"*/
@@ -2192,7 +2192,7 @@ test_swmr_write_big(hbool_t newest_format)
if (H5F_block_read(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, rbuf) < 0)
FAIL_STACK_ERROR;
/* Verify the data read is correct */
- if (HDmemcmp(wbuf, rbuf, (size_t)1024) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)1024) != 0)
TEST_ERROR;
/* Flush the data to disk */
if (accum_reset(rf) < 0)
@@ -2213,7 +2213,7 @@ test_swmr_write_big(hbool_t newest_format)
if (H5F_block_read(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, rbuf) < 0)
FAIL_STACK_ERROR;
/* Verify the data read is correct */
- if (HDmemcmp(wbuf, rbuf, (size_t)1024) != 0)
+ if (memcmp(wbuf, rbuf, (size_t)1024) != 0)
TEST_ERROR;
/* The data stays in the accumulator */
@@ -2224,7 +2224,7 @@ test_swmr_write_big(hbool_t newest_format)
if (H5F_block_read(rf, H5FD_MEM_DEFAULT, (haddr_t)2048, (size_t)BIG_BUF_SIZE, rbuf) < 0)
FAIL_STACK_ERROR;
/* Verify the data read is correct */
- if (HDmemcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
+ if (memcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
#if defined(H5_HAVE_WIN32_API)
@@ -2238,7 +2238,7 @@ test_swmr_write_big(hbool_t newest_format)
ZeroMemory(&pi, sizeof(pi));
if (0 == CreateProcess(NULL, SWMR_READER, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
- HDprintf("CreateProcess failed (%d).\n", GetLastError());
+ printf("CreateProcess failed (%d).\n", GetLastError());
FAIL_STACK_ERROR;
}
@@ -2272,7 +2272,7 @@ test_swmr_write_big(hbool_t newest_format)
char *const new_argv[] = {swmr_reader, NULL};
/* Run the reader */
status = HDexecv(SWMR_READER, new_argv);
- HDprintf("errno from execv = %s\n", HDstrerror(errno));
+ printf("errno from execv = %s\n", HDstrerror(errno));
FAIL_STACK_ERROR;
} /* end if */
@@ -2309,9 +2309,9 @@ test_swmr_write_big(hbool_t newest_format)
/* Release memory */
if (wbuf2)
- HDfree(wbuf2);
+ free(wbuf2);
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
PASSED();
return 0;
@@ -2327,9 +2327,9 @@ error:
/* Release memory */
if (wbuf2)
- HDfree(wbuf2);
+ free(wbuf2);
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
return 1;
@@ -2355,31 +2355,31 @@ accum_printf(const H5F_t *f)
{
H5F_meta_accum_t *accum = &f->shared->accum;
- HDprintf("\n");
- HDprintf("Current contents of accumulator:\n");
+ printf("\n");
+ printf("Current contents of accumulator:\n");
if (accum->alloc_size == 0) {
- HDprintf("=====================================================\n");
- HDprintf(" No accumulator allocated.\n");
- HDprintf("=====================================================\n");
+ printf("=====================================================\n");
+ printf(" No accumulator allocated.\n");
+ printf("=====================================================\n");
}
else {
- HDprintf("=====================================================\n");
- HDprintf(" accumulator allocated size == %zu\n", accum->alloc_size);
- HDprintf(" accumulated data size == %zu\n", accum->size);
- HDfprintf(stdout, " accumulator dirty? == %s\n", accum->dirty ? "TRUE" : "FALSE");
- HDprintf("=====================================================\n");
- HDfprintf(stdout, " start of accumulated data, loc = %" PRIuHADDR "\n", accum->loc);
+ printf("=====================================================\n");
+ printf(" accumulator allocated size == %zu\n", accum->alloc_size);
+ printf(" accumulated data size == %zu\n", accum->size);
+ fprintf(stdout, " accumulator dirty? == %s\n", accum->dirty ? "TRUE" : "FALSE");
+ printf("=====================================================\n");
+ fprintf(stdout, " start of accumulated data, loc = %" PRIuHADDR "\n", accum->loc);
if (accum->dirty) {
- HDfprintf(stdout, " start of dirty region, loc = %" PRIuHADDR "\n",
- (haddr_t)(accum->loc + accum->dirty_off));
- HDfprintf(stdout, " end of dirty region, loc = %" PRIuHADDR "\n",
- (haddr_t)(accum->loc + accum->dirty_off + accum->dirty_len));
+ fprintf(stdout, " start of dirty region, loc = %" PRIuHADDR "\n",
+ (haddr_t)(accum->loc + accum->dirty_off));
+ fprintf(stdout, " end of dirty region, loc = %" PRIuHADDR "\n",
+ (haddr_t)(accum->loc + accum->dirty_off + accum->dirty_len));
} /* end if */
- HDfprintf(stdout, " end of accumulated data, loc = %" PRIuHADDR "\n",
- (haddr_t)(accum->loc + accum->size));
- HDfprintf(stdout, " end of accumulator allocation, loc = %" PRIuHADDR "\n",
- (haddr_t)(accum->loc + accum->alloc_size));
- HDprintf("=====================================================\n");
+ fprintf(stdout, " end of accumulated data, loc = %" PRIuHADDR "\n",
+ (haddr_t)(accum->loc + accum->size));
+ fprintf(stdout, " end of accumulator allocation, loc = %" PRIuHADDR "\n",
+ (haddr_t)(accum->loc + accum->alloc_size));
+ printf("=====================================================\n");
}
- HDprintf("\n\n");
+ printf("\n\n");
} /* accum_printf() */
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c
index 1269c5a..7f8e775 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -88,7 +88,7 @@ main(void)
FAIL_STACK_ERROR;
/* Verify the data read is correct */
- if (HDmemcmp(buf, rbuf, (size_t)1024) != 0)
+ if (memcmp(buf, rbuf, (size_t)1024) != 0)
TEST_ERROR;
/* CLose the file */
diff --git a/test/app_ref.c b/test/app_ref.c
index 9b08650..f7a8378 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -72,9 +72,9 @@ Abrt_Handler(int H5_ATTR_UNUSED sig)
const char *string = " ID reference count: ";
for (i = 0; i < T_NUMCLASSES; i++) {
- HDfprintf(stderr, "%s%s", IDNAME[i], string);
+ fprintf(stderr, "%s%s", IDNAME[i], string);
n = (int)(strlen(IDNAME[i]) + strlen(string));
- HDfprintf(stderr, "%*d\n", (n < ERR_WIDTH) ? (ERR_WIDTH - n) : 0, rc[i]);
+ fprintf(stderr, "%*d\n", (n < ERR_WIDTH) ? (ERR_WIDTH - n) : 0, rc[i]);
}
}
diff --git a/test/big.c b/test/big.c
index 503570d..08818bf 100644
--- a/test/big.c
+++ b/test/big.c
@@ -270,7 +270,7 @@ enough_room(hid_t fapl)
fd[i] = -1;
/* Get file name template */
- HDassert(H5FD_FAMILY == H5Pget_driver(fapl));
+ assert(H5FD_FAMILY == H5Pget_driver(fapl));
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
/* Create files */
@@ -322,9 +322,9 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n)
hsize_t hs_start[1];
hsize_t hs_size[1];
hid_t file = -1, space1 = -1, space2 = -1, mem_space = -1, d1 = -1, d2 = -1;
- int *buf = (int *)HDmalloc(sizeof(int) * WRT_SIZE);
+ int *buf = (int *)malloc(sizeof(int) * WRT_SIZE);
int i, j;
- FILE *out = HDfopen(DNAME, "w");
+ FILE *out = fopen(DNAME, "w");
hid_t dcpl;
switch (testsize) {
@@ -356,12 +356,12 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n)
case NO_FILE:
/* what to do?? */
- HDfprintf(stdout, "Unexpected file size of NO_FILE\n");
+ fprintf(stdout, "Unexpected file size of NO_FILE\n");
goto error;
break;
default:
- HDfprintf(stdout, "Unexpected file size(%d)\n", testsize);
+ fprintf(stdout, "Unexpected file size(%d)\n", testsize);
goto error;
break;
}
@@ -404,7 +404,7 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n)
for (i = 0; i < wrt_n; i++) {
/* start position must be at least hs_size from the end */
hs_start[0] = randll(size2[0] - hs_size[0], i);
- HDfprintf(out, "#%03d 0x%016" PRIxHSIZE "\n", i, hs_start[0]);
+ fprintf(out, "#%03d 0x%016" PRIxHSIZE "\n", i, hs_start[0]);
if (H5Sselect_hyperslab(space2, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0)
goto error;
for (j = 0; j < WRT_SIZE; j++) {
@@ -426,7 +426,7 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n)
goto error;
if (H5Fclose(file) < 0)
goto error;
- HDfree(buf);
+ free(buf);
HDfclose(out);
PASSED();
return 0;
@@ -443,7 +443,7 @@ error:
}
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
if (out)
HDfclose(out);
return 1;
@@ -471,11 +471,11 @@ reader(char *filename, hid_t fapl)
char ln[128], *s;
hsize_t hs_offset[1];
hsize_t hs_size[1] = {WRT_SIZE};
- int *buf = (int *)HDmalloc(sizeof(int) * WRT_SIZE);
+ int *buf = (int *)malloc(sizeof(int) * WRT_SIZE);
int i, j, zero, wrong, nerrors = 0;
/* Open script file */
- script = HDfopen(DNAME, "r");
+ script = fopen(DNAME, "r");
/* Open HDF5 file */
if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
@@ -497,8 +497,8 @@ reader(char *filename, hid_t fapl)
break;
i = (int)HDstrtol(ln + 1, &s, 10);
hs_offset[0] = HDstrtoull(s, NULL, 0);
- HDfprintf(stdout, "#%03d 0x%016" PRIxHSIZE "%47s", i, hs_offset[0], "");
- HDfflush(stdout);
+ fprintf(stdout, "#%03d 0x%016" PRIxHSIZE "%47s", i, hs_offset[0], "");
+ fflush(stdout);
if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
FAIL_STACK_ERROR;
@@ -514,7 +514,7 @@ reader(char *filename, hid_t fapl)
}
if (zero) {
H5_FAILED();
- HDprintf(" %d zero%s\n", zero, 1 == zero ? "" : "s");
+ printf(" %d zero%s\n", zero, 1 == zero ? "" : "s");
}
else if (wrong) {
SKIPPED();
@@ -534,7 +534,7 @@ reader(char *filename, hid_t fapl)
FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR;
- HDfree(buf);
+ free(buf);
HDfclose(script);
return nerrors;
@@ -549,7 +549,7 @@ error:
}
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
if (script)
HDfclose(script);
return 1;
@@ -570,18 +570,18 @@ error:
static void
usage(void)
{
- HDfprintf(stdout,
- "Usage: big [-h] [-c] [-fsize <fsize>}\n"
- "\t-h\tPrint the help page\n"
- "\t-c\tFile system Checking skipped. Caution: this test generates\n"
- "\t\tmany big files and may fill up the file system.\n"
- "\t-fsize\tChange family size default to <fsize> where <fsize> is\n"
- "\t\ta positive float point number. Default value is %" PRIuHSIZE ".\n"
- "Examples:\n"
- "\t big -fsize 2.1e9 \t# test with file size just under 2GB\n"
- "\t big -fsize 2.2e9 \t# test with file size just above 2GB\n"
- "\t Be sure the file system can support the file size requested\n",
- (hsize_t)FAMILY_SIZE);
+ fprintf(stdout,
+ "Usage: big [-h] [-c] [-fsize <fsize>}\n"
+ "\t-h\tPrint the help page\n"
+ "\t-c\tFile system Checking skipped. Caution: this test generates\n"
+ "\t\tmany big files and may fill up the file system.\n"
+ "\t-fsize\tChange family size default to <fsize> where <fsize> is\n"
+ "\t\ta positive float point number. Default value is %" PRIuHSIZE ".\n"
+ "Examples:\n"
+ "\t big -fsize 2.1e9 \t# test with file size just under 2GB\n"
+ "\t big -fsize 2.2e9 \t# test with file size just above 2GB\n"
+ "\t Be sure the file system can support the file size requested\n",
+ (hsize_t)FAMILY_SIZE);
}
static int
@@ -592,7 +592,7 @@ test_sec2(hid_t fapl)
testsize = supports_big();
if (testsize == NO_FILE) {
- HDfprintf(stdout, "Test for sec2 is skipped because file system does not support big files.\n");
+ fprintf(stdout, "Test for sec2 is skipped because file system does not support big files.\n");
goto quit;
}
/* Test big file with the SEC2 driver */
@@ -627,7 +627,7 @@ test_stdio(hid_t fapl)
testsize = supports_big();
if (testsize == NO_FILE) {
- HDfprintf(stdout, "Test for stdio is skipped because file system does not support big files.\n");
+ fprintf(stdout, "Test for stdio is skipped because file system does not support big files.\n");
goto quit;
}
HDputs("\nTesting big file with the STDIO Driver ");
@@ -649,12 +649,12 @@ quit:
/* Clean up the test file */
h5_clean_files(FILENAME, fapl);
HDremove(DNAME);
- HDfflush(stdout);
+ fflush(stdout);
return 0;
error:
HDputs("*** TEST FAILED ***");
- HDfflush(stdout);
+ fflush(stdout);
return 1;
} /* end test_stdio() */
@@ -744,7 +744,7 @@ main(int ac, char **av)
family_size_def = (hsize_t)HDstrtoull(*av, NULL, 0);
}
else {
- HDprintf("***Missing fsize value***\n");
+ printf("***Missing fsize value***\n");
usage();
return 1;
}
@@ -777,7 +777,7 @@ main(int ac, char **av)
seed = (unsigned long)HDtime(NULL);
#if 0
/* seed = (unsigned long)1155438845; */
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+ fprintf(stderr, "Random # seed was: %lu\n", seed);
#endif
HDsrandom((unsigned)seed);
diff --git a/test/bittests.c b/test/bittests.c
index 285f404..6db1705 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -49,7 +49,7 @@ test_find(void)
TESTING("bit search operations");
/* The zero length buffer */
- HDmemset(v1, 0xaa, sizeof v1);
+ memset(v1, 0xaa, sizeof v1);
n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, TRUE);
if (-1 != n) {
H5_FAILED();
@@ -64,7 +64,7 @@ test_find(void)
}
/* The zero buffer */
- HDmemset(v1, 0, sizeof v1);
+ memset(v1, 0, sizeof v1);
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
if (-1 != n) {
H5_FAILED();
@@ -80,24 +80,24 @@ test_find(void)
/* Try all combinations of one byte */
for (i = 0; i < 8 * (int)sizeof(v1); i++) {
- HDmemset(v1, 0, sizeof v1);
+ memset(v1, 0, sizeof v1);
v1[i / 8] = (uint8_t)(1 << (i % 8));
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
if ((ssize_t)i != n) {
H5_FAILED();
- HDprintf(" Test for set bit %d failed (lsb)!\n", i);
+ printf(" Test for set bit %d failed (lsb)!\n", i);
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
if ((ssize_t)i != n) {
H5_FAILED();
- HDprintf(" Test for set bit %d failed (msb)!\n", i);
+ printf(" Test for set bit %d failed (msb)!\n", i);
goto failed;
}
}
/* The one buffer */
- HDmemset(v1, 0xff, sizeof v1);
+ memset(v1, 0xff, sizeof v1);
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
if (-1 != n) {
H5_FAILED();
@@ -113,18 +113,18 @@ test_find(void)
/* Try all combinations of one byte */
for (i = 0; i < 8 * (int)sizeof(v1); i++) {
- HDmemset(v1, 0xff, sizeof v1);
+ memset(v1, 0xff, sizeof v1);
v1[i / 8] &= (uint8_t) ~(1 << (i % 8));
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
if ((ssize_t)i != n) {
H5_FAILED();
- HDprintf(" Test for clear bit %d failed (lsb)!\n", i);
+ printf(" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE);
if ((ssize_t)i != n) {
H5_FAILED();
- HDprintf(" Test for clear bit %d failed (lsb)!\n", i);
+ printf(" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
}
@@ -133,10 +133,10 @@ test_find(void)
return 0;
failed:
- HDprintf(" v = 0x");
+ printf(" v = 0x");
for (i = 0; i < (int)sizeof(v1); i++)
- HDprintf("%02x", v1[i]);
- HDprintf("\n");
+ printf("%02x", v1[i]);
+ printf("\n");
return -1;
}
@@ -169,8 +169,8 @@ test_copy(void)
d_offset = (size_t)HDrand() % (8 * sizeof v2);
size = (unsigned)HDrand() % MIN(8 * sizeof(v1), 8 * sizeof(v2));
size = MIN3(size, 8 * sizeof(v1) - s_offset, 8 * sizeof(v2) - d_offset);
- HDmemset(v1, 0xff, sizeof v1);
- HDmemset(v2, 0x00, sizeof v2);
+ memset(v1, 0xff, sizeof v1);
+ memset(v2, 0x00, sizeof v2);
/* Copy some bits to v2 and make sure something was copied */
H5T__bit_copy(v2, d_offset, v1, s_offset, size);
@@ -192,9 +192,9 @@ test_copy(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_LSB, 1);
if (size > 0 && n != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find first copied bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first copied bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -205,9 +205,9 @@ test_copy(void)
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
if (d_offset + size < 8 * sizeof(v2) && n != (ssize_t)size) {
H5_FAILED();
- HDprintf(" Unable to find last copied bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find last copied bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
@@ -223,9 +223,9 @@ test_copy(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_MSB, 1);
if (size > 0 && (size_t)(n + 1) != d_offset + size) {
H5_FAILED();
- HDprintf(" Unable to find last copied bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last copied bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -236,9 +236,9 @@ test_copy(void)
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
if (d_offset > 0 && n + 1 != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find beginning of copied data "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find beginning of copied data "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == d_offset && n >= 0) {
@@ -252,15 +252,15 @@ test_copy(void)
return 0;
failed:
- HDprintf(" i=%d, s_offset=%lu, d_offset=%lu, size=%lu\n", i, (unsigned long)s_offset,
- (unsigned long)d_offset, (unsigned long)size);
- HDprintf(" s = 0x");
+ printf(" i=%d, s_offset=%lu, d_offset=%lu, size=%lu\n", i, (unsigned long)s_offset,
+ (unsigned long)d_offset, (unsigned long)size);
+ printf(" s = 0x");
for (j = sizeof(v1) - 1; j >= 0; --j)
- HDprintf("%02x", v1[j]);
- HDprintf("\n d = 0x");
+ printf("%02x", v1[j]);
+ printf("\n d = 0x");
for (j = sizeof(v2) - 1; j >= 0; --j)
- HDprintf("%02x", v2[j]);
- HDprintf("\n");
+ printf("%02x", v2[j]);
+ printf("\n");
return -1;
}
@@ -297,7 +297,7 @@ test_shift(void)
shift_dist = (ssize_t)((size_t)HDrand() % size);
/*-------- LEFT-shift some bits and make sure something was shifted --------*/
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
H5T__bit_set(vector, offset, size, 1);
H5T__bit_shift(vector, shift_dist, offset, size);
@@ -306,9 +306,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if (n != (ssize_t)offset + shift_dist) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -319,14 +319,14 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n != (ssize_t)(offset + size - 1)) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
/*-------- RIGHT-shift some bits and make sure something was shifted --------*/
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
H5T__bit_set(vector, offset, size, 1);
H5T__bit_shift(vector, -shift_dist, offset, size);
@@ -335,9 +335,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if ((size_t)n != offset) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -348,9 +348,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n != (ssize_t)(offset + size) - shift_dist - 1) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
@@ -363,7 +363,7 @@ test_shift(void)
else
shift_dist = -((ssize_t)size);
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
H5T__bit_set(vector, offset, size, 1);
H5T__bit_shift(vector, shift_dist, offset, size);
@@ -372,9 +372,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if (n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all bits are zero in destination(LSB) "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to verify all bits are zero in destination(LSB) "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -382,9 +382,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all bits are zero in destination(MSB) "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to verify all bits are zero in destination(MSB) "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
}
@@ -393,11 +393,11 @@ test_shift(void)
return 0;
failed:
- HDprintf(" i=%d, offset=%lu, size=%lu, shift_dist=%lu\n", i, (unsigned long)offset,
- (unsigned long)size, (unsigned long)shift_dist);
+ printf(" i=%d, offset=%lu, size=%lu, shift_dist=%lu\n", i, (unsigned long)offset, (unsigned long)size,
+ (unsigned long)shift_dist);
for (j = sizeof(vector) - 1; j >= 0; --j)
- HDprintf("%02x", vector[j]);
- HDprintf("\n");
+ printf("%02x", vector[j]);
+ printf("\n");
return -1;
}
@@ -432,7 +432,7 @@ test_increment(void)
if (size == 0)
continue;
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
if (size > 1) /* if size=6, make a sequence like 011111 */
H5T__bit_set(vector, offset, size - 1, 1);
else /* if size=1, just set this one bit to 1 */
@@ -445,16 +445,16 @@ test_increment(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if (size != 1 && (size_t)n != offset + size - 1) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (size == 1 && n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all-zero bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to verify all-zero bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -465,16 +465,16 @@ test_increment(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (size != 1 && n != (ssize_t)(offset + size - 1)) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (size == 1 && n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all-zero bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to verify all-zero bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
}
@@ -483,10 +483,10 @@ test_increment(void)
return 0;
failed:
- HDprintf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
+ printf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
for (j = sizeof(vector) - 1; j >= 0; --j)
- HDprintf("%02x", vector[j]);
- HDprintf("\n");
+ printf("%02x", vector[j]);
+ printf("\n");
return -1;
}
@@ -522,7 +522,7 @@ test_decrement(void)
continue;
/* All-zero sequence will become 111111(size=6) after decrement */
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
/* decrement the sequence by one */
H5T__bit_dec(vector, offset, size);
@@ -531,9 +531,9 @@ test_decrement(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if ((size_t)n != offset) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -544,9 +544,9 @@ test_decrement(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n != (ssize_t)(offset + size - 1)) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
}
@@ -555,10 +555,10 @@ test_decrement(void)
return 0;
failed:
- HDprintf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
+ printf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
for (j = sizeof(vector) - 1; j >= 0; --j)
- HDprintf("%02x", vector[j]);
- HDprintf("\n");
+ printf("%02x", vector[j]);
+ printf("\n");
return -1;
}
@@ -594,7 +594,7 @@ test_negate(void)
continue;
/* All-zero sequence will become 111111(size=6) after negating */
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
/* negate the sequence */
H5T__bit_neg(vector, offset, size);
@@ -603,9 +603,9 @@ test_negate(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if ((size_t)n != offset) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -616,14 +616,14 @@ test_negate(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n != (ssize_t)(offset + size - 1)) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
/* All-one sequence will become 000000(size=6) after negating */
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
H5T__bit_set(vector, offset, size, 1);
/* negate the sequence */
@@ -633,9 +633,9 @@ test_negate(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if (n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all-zero bits in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to verify all-zero bits in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -646,9 +646,9 @@ test_negate(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all-zero bits in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to verify all-zero bits in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
}
@@ -657,10 +657,10 @@ test_negate(void)
return 0;
failed:
- HDprintf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
+ printf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
for (j = sizeof(vector) - 1; j >= 0; --j)
- HDprintf("%02x", vector[j]);
- HDprintf("\n");
+ printf("%02x", vector[j]);
+ printf("\n");
return -1;
}
@@ -692,7 +692,7 @@ test_set(void)
d_offset = (size_t)HDrand() % (8 * sizeof v2);
size = (size_t)HDrand() % (8 * sizeof(v2));
size = MIN(size, 8 * sizeof(v2) - d_offset);
- HDmemset(v2, 0x00, sizeof v2);
+ memset(v2, 0x00, sizeof v2);
/* Set some bits in v2 */
H5T__bit_set(v2, d_offset, size, TRUE);
@@ -714,9 +714,9 @@ test_set(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_LSB, 1);
if (size > 0 && n != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find first set bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first set bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -727,9 +727,9 @@ test_set(void)
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
if (d_offset + size < 8 * sizeof(v2) && n != (ssize_t)size) {
H5_FAILED();
- HDprintf(" Unable to find last set bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find last set bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
@@ -745,9 +745,9 @@ test_set(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_MSB, 1);
if (size > 0 && (size_t)(n + 1) != d_offset + size) {
H5_FAILED();
- HDprintf(" Unable to find last set bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last set bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -758,9 +758,9 @@ test_set(void)
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
if (d_offset > 0 && n + 1 != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find beginning of set bit region "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find beginning of set bit region "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == d_offset && n >= 0) {
@@ -774,11 +774,11 @@ test_set(void)
return 0;
failed:
- HDprintf(" i=%d, d_offset=%lu, size=%lu\n", i, (unsigned long)d_offset, (unsigned long)size);
- HDprintf(" d = 0x");
+ printf(" i=%d, d_offset=%lu, size=%lu\n", i, (unsigned long)d_offset, (unsigned long)size);
+ printf(" d = 0x");
for (j = sizeof(v2) - 1; j >= 0; --j)
- HDprintf("%02x", v2[j]);
- HDprintf("\n");
+ printf("%02x", v2[j]);
+ printf("\n");
return -1;
}
@@ -810,7 +810,7 @@ test_clear(void)
d_offset = (size_t)HDrand() % (8 * sizeof v2);
size = (size_t)HDrand() % (8 * sizeof(v2));
size = MIN(size, 8 * sizeof(v2) - d_offset);
- HDmemset(v2, 0xff, sizeof v2);
+ memset(v2, 0xff, sizeof v2);
/* Clear some bits in v2 */
H5T__bit_set(v2, d_offset, size, FALSE);
@@ -832,9 +832,9 @@ test_clear(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_LSB, 0);
if (size > 0 && n != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find first cleared bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first cleared bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -845,9 +845,9 @@ test_clear(void)
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 1);
if (d_offset + size < 8 * sizeof(v2) && n != (ssize_t)size) {
H5_FAILED();
- HDprintf(" Unable to find last cleared bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find last cleared bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
@@ -863,9 +863,9 @@ test_clear(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_MSB, 0);
if (size > 0 && (size_t)(n + 1) != d_offset + size) {
H5_FAILED();
- HDprintf(" Unable to find last cleared bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last cleared bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -876,9 +876,9 @@ test_clear(void)
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 1);
if (d_offset > 0 && n + 1 != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find beginning of cleared bit region "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find beginning of cleared bit region "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == d_offset && n >= 0) {
@@ -892,11 +892,11 @@ test_clear(void)
return 0;
failed:
- HDprintf(" i=%d, d_offset=%lu, size=%lu\n", i, (unsigned long)d_offset, (unsigned long)size);
- HDprintf(" d = 0x");
+ printf(" i=%d, d_offset=%lu, size=%lu\n", i, (unsigned long)d_offset, (unsigned long)size);
+ printf(" d = 0x");
for (j = sizeof(v2) - 1; j >= 0; --j)
- HDprintf("%02x", v2[j]);
- HDprintf("\n");
+ printf("%02x", v2[j]);
+ printf("\n");
return -1;
}
@@ -932,12 +932,12 @@ main(void)
nerrors += test_negate() < 0 ? 1 : 0;
if (nerrors) {
- HDprintf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
}
- HDprintf("All bit tests passed.\n");
+ printf("All bit tests passed.\n");
H5close();
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end main() */
diff --git a/test/btree2.c b/test/btree2.c
index 35d35d7..1bb0550 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -62,7 +62,7 @@ static int
init_cparam(H5B2_create_t *cparam, H5B2_create_t *cparam2)
{
/* Wipe out background */
- HDmemset(cparam, 0, sizeof(*cparam));
+ memset(cparam, 0, sizeof(*cparam));
/* General parameters */
cparam->cls = H5B2_TEST;
@@ -72,7 +72,7 @@ init_cparam(H5B2_create_t *cparam, H5B2_create_t *cparam2)
cparam->merge_percent = 40;
/* Wipe out background */
- HDmemset(cparam2, 0, sizeof(*cparam2));
+ memset(cparam2, 0, sizeof(*cparam2));
/* General parameters */
cparam2->cls = H5B2_TEST2;
@@ -476,8 +476,8 @@ index_rec_cb(const void *_record, void *_op_data)
const H5B2_test_rec_t *record = (const H5B2_test_rec_t *)_record;
H5B2_test_rec_t *search = (H5B2_test_rec_t *)_op_data;
- HDassert(record);
- HDassert(search);
+ assert(record);
+ assert(search);
search->key = record->key;
search->val = record->val;
@@ -554,7 +554,7 @@ modify_rec_cb(void *_record, void *_op_data, hbool_t *changed)
H5B2_test_rec_t *record = (H5B2_test_rec_t *)_record;
H5B2_test_rec_t *modify = (H5B2_test_rec_t *)_op_data;
- HDassert(record->key == modify->key);
+ assert(record->key == modify->key);
record->val = modify->val;
*changed = TRUE;
@@ -3008,7 +3008,7 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t
curr_time = HDtime(NULL);
#if 0
curr_time=1109170019;
-HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
+fprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
#endif
HDsrandom((unsigned)curr_time);
@@ -3018,7 +3018,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
TESTING("B-tree insert: create random level 4 B-tree");
/* Allocate space for the records */
- if (NULL == (records = (hsize_t *)HDmalloc(sizeof(hsize_t) * INSERT_MANY)))
+ if (NULL == (records = (hsize_t *)malloc(sizeof(hsize_t) * INSERT_MANY)))
TEST_ERROR;
/* Initialize record #'s */
@@ -3198,7 +3198,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
PASSED();
- HDfree(records);
+ free(records);
return 0;
@@ -3210,7 +3210,7 @@ error:
H5Fclose(file);
}
H5E_END_TRY;
- HDfree(records);
+ free(records);
return 1;
} /* test_insert_lots() */
@@ -5102,7 +5102,7 @@ test_update_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t
curr_time = HDtime(NULL);
#if 0
curr_time = 1451342093;
-HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+fprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
#endif
HDsrandom((unsigned)curr_time);
@@ -5112,7 +5112,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TESTING("B-tree update: create random level 4 B-tree");
/* Allocate space for the records */
- if (NULL == (records = (H5B2_test_rec_t *)HDmalloc(sizeof(H5B2_test_rec_t) * INSERT_MANY_REC)))
+ if (NULL == (records = (H5B2_test_rec_t *)malloc(sizeof(H5B2_test_rec_t) * INSERT_MANY_REC)))
TEST_ERROR;
/* Initialize record #'s */
@@ -5300,12 +5300,12 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
PASSED();
- HDfree(records);
+ free(records);
return 0;
error:
- HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+ fprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
H5E_BEGIN_TRY
{
if (bt2)
@@ -5313,7 +5313,7 @@ error:
H5Fclose(file);
}
H5E_END_TRY;
- HDfree(records);
+ free(records);
return 1;
} /* test_update_lots() */
@@ -8814,7 +8814,7 @@ test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cpara
curr_time = HDtime(NULL);
#if 0
curr_time = 1163537969;
-HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+fprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
#endif
HDsrandom((unsigned)curr_time);
@@ -8823,7 +8823,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
*/
/* Allocate space for the records */
- if (NULL == (records = (hsize_t *)HDmalloc(sizeof(hsize_t) * INSERT_MANY)))
+ if (NULL == (records = (hsize_t *)malloc(sizeof(hsize_t) * INSERT_MANY)))
TEST_ERROR;
/* Initialize record #'s */
@@ -8861,7 +8861,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TEST_ERROR;
/* Allocate space for the file data */
- if (NULL == (file_data = HDmalloc((size_t)sb.st_size)))
+ if (NULL == (file_data = malloc((size_t)sb.st_size)))
TEST_ERROR;
/* Read file's data into memory */
@@ -9192,9 +9192,9 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
PASSED();
if (records)
- HDfree(records);
+ free(records);
if (file_data)
- HDfree(file_data);
+ free(file_data);
return 0;
@@ -9210,9 +9210,9 @@ error:
if (fd > 0)
HDclose(fd);
if (records)
- HDfree(records);
+ free(records);
if (file_data)
- HDfree(file_data);
+ free(file_data);
return 1;
} /* test_remove_lots() */
@@ -9246,7 +9246,7 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param
herr_t ret; /* Generic error return value */
/* Allocate space for the records */
- if (NULL == (records = (hsize_t *)HDmalloc(sizeof(hsize_t) * FIND_NEIGHBOR)))
+ if (NULL == (records = (hsize_t *)malloc(sizeof(hsize_t) * FIND_NEIGHBOR)))
TEST_ERROR;
/* Initialize record #'s */
@@ -9426,7 +9426,7 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param
PASSED();
- HDfree(records);
+ free(records);
return 0;
@@ -9438,7 +9438,7 @@ error:
H5Fclose(file);
}
H5E_END_TRY;
- HDfree(records);
+ free(records);
return 1;
} /* test_find_neighbor() */
@@ -10139,7 +10139,7 @@ main(void)
ExpressMode = 2;
if (ExpressMode > 1)
- HDprintf("***Express test mode on. Some tests may be skipped\n");
+ printf("***Express test mode on. Some tests may be skipped\n");
/* Initialize v2 B-tree creation parameters */
init_cparam(&cparam, &cparam2);
@@ -10152,11 +10152,11 @@ main(void)
/* Loop over re-opening B-tree during tests */
for (reopen = FALSE; reopen <= TRUE; reopen++) {
if (reopen) {
- HDfprintf(stdout, "Testing with reopening B-tree:\n");
+ fprintf(stdout, "Testing with reopening B-tree:\n");
tparam.reopen_btree = TRUE;
} /* end if */
else {
- HDfprintf(stdout, "Testing without reopening B-tree:\n");
+ fprintf(stdout, "Testing without reopening B-tree:\n");
tparam.reopen_btree = FALSE;
} /* end else */
@@ -10176,7 +10176,7 @@ main(void)
nerrors += test_insert_level2_3internal_redistrib(fapl, &cparam, &tparam);
nerrors += test_insert_level2_3internal_split(fapl, &cparam, &tparam);
if (ExpressMode > 1)
- HDprintf("***Express test mode on. test_insert_lots skipped\n");
+ printf("***Express test mode on. test_insert_lots skipped\n");
else
nerrors += test_insert_lots(fapl, &cparam, &tparam);
@@ -10190,7 +10190,7 @@ main(void)
nerrors += test_update_level1_middle_split(fapl, &cparam2, &tparam);
nerrors += test_update_make_level2(fapl, &cparam2, &tparam);
if (ExpressMode > 1)
- HDprintf("***Express test mode on. test_update_lots skipped\n");
+ printf("***Express test mode on. test_update_lots skipped\n");
else
nerrors += test_update_lots(fapl, &cparam2, &tparam);
@@ -10217,7 +10217,7 @@ main(void)
nerrors += test_remove_level2_3internal_merge(fapl, &cparam, &tparam);
nerrors += test_remove_level2_collapse_right(fapl, &cparam, &tparam);
if (ExpressMode > 1)
- HDprintf("***Express test mode on. test_remove_lots skipped\n");
+ printf("***Express test mode on. test_remove_lots skipped\n");
else
nerrors += test_remove_lots(envval, fapl, &cparam);
diff --git a/test/cache.c b/test/cache.c
index 517c0b5..39cc0c9 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -286,7 +286,7 @@ smoke_check_1(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -294,17 +294,17 @@ smoke_check_1(int express_test, unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged);
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -322,7 +322,7 @@ smoke_check_1(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -340,7 +340,7 @@ smoke_check_1(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -358,7 +358,7 @@ smoke_check_1(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -368,7 +368,7 @@ smoke_check_1(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -381,7 +381,7 @@ smoke_check_1(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -391,7 +391,7 @@ smoke_check_1(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -404,12 +404,12 @@ smoke_check_1(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -423,7 +423,7 @@ smoke_check_1(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -484,7 +484,7 @@ smoke_check_2(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -492,17 +492,17 @@ smoke_check_2(int express_test, unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged);
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -520,7 +520,7 @@ smoke_check_2(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -538,7 +538,7 @@ smoke_check_2(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -556,7 +556,7 @@ smoke_check_2(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -566,7 +566,7 @@ smoke_check_2(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -579,7 +579,7 @@ smoke_check_2(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -589,7 +589,7 @@ smoke_check_2(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -602,12 +602,12 @@ smoke_check_2(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -621,7 +621,7 @@ smoke_check_2(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -681,7 +681,7 @@ smoke_check_3(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -689,17 +689,17 @@ smoke_check_3(int express_test, unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -717,7 +717,7 @@ smoke_check_3(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -735,7 +735,7 @@ smoke_check_3(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -753,7 +753,7 @@ smoke_check_3(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -763,7 +763,7 @@ smoke_check_3(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -776,7 +776,7 @@ smoke_check_3(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -786,7 +786,7 @@ smoke_check_3(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -799,12 +799,12 @@ smoke_check_3(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -818,7 +818,7 @@ smoke_check_3(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -879,7 +879,7 @@ smoke_check_4(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -887,17 +887,17 @@ smoke_check_4(int express_test, unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -915,7 +915,7 @@ smoke_check_4(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -933,7 +933,7 @@ smoke_check_4(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -951,7 +951,7 @@ smoke_check_4(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -961,7 +961,7 @@ smoke_check_4(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -974,7 +974,7 @@ smoke_check_4(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -984,7 +984,7 @@ smoke_check_4(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -997,12 +997,12 @@ smoke_check_4(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -1016,7 +1016,7 @@ smoke_check_4(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -1117,7 +1117,7 @@ smoke_check_5(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -1125,12 +1125,12 @@ smoke_check_5(int express_test, unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
cache_ptr = file_ptr->shared->cache;
@@ -1147,7 +1147,7 @@ smoke_check_5(int express_test, unsigned paged)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1158,7 +1158,7 @@ smoke_check_5(int express_test, unsigned paged)
/* do_inserts */ FALSE);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1169,7 +1169,7 @@ smoke_check_5(int express_test, unsigned paged)
/* do_inserts */ FALSE);
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1180,7 +1180,7 @@ smoke_check_5(int express_test, unsigned paged)
/* do_inserts */ TRUE);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -1190,7 +1190,7 @@ smoke_check_5(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1202,7 +1202,7 @@ smoke_check_5(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -1212,7 +1212,7 @@ smoke_check_5(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1224,12 +1224,12 @@ smoke_check_5(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -1243,7 +1243,7 @@ smoke_check_5(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -1346,18 +1346,18 @@ smoke_check_6(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
cache_ptr = file_ptr->shared->cache;
@@ -1374,7 +1374,7 @@ smoke_check_6(int express_test, unsigned paged)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1385,7 +1385,7 @@ smoke_check_6(int express_test, unsigned paged)
/* do_inserts */ FALSE);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1396,7 +1396,7 @@ smoke_check_6(int express_test, unsigned paged)
/* do_inserts */ FALSE);
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1407,7 +1407,7 @@ smoke_check_6(int express_test, unsigned paged)
/* do_inserts */ TRUE);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -1417,7 +1417,7 @@ smoke_check_6(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1429,7 +1429,7 @@ smoke_check_6(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -1439,7 +1439,7 @@ smoke_check_6(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1451,12 +1451,12 @@ smoke_check_6(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -1470,7 +1470,7 @@ smoke_check_6(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -1572,7 +1572,7 @@ smoke_check_7(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -1580,12 +1580,12 @@ smoke_check_7(int express_test, unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
cache_ptr = file_ptr->shared->cache;
@@ -1602,7 +1602,7 @@ smoke_check_7(int express_test, unsigned paged)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1613,7 +1613,7 @@ smoke_check_7(int express_test, unsigned paged)
/* do_inserts */ FALSE);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1624,7 +1624,7 @@ smoke_check_7(int express_test, unsigned paged)
/* do_inserts */ FALSE);
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1635,7 +1635,7 @@ smoke_check_7(int express_test, unsigned paged)
/* do_inserts */ TRUE);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -1645,7 +1645,7 @@ smoke_check_7(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1657,7 +1657,7 @@ smoke_check_7(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -1667,7 +1667,7 @@ smoke_check_7(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1679,12 +1679,12 @@ smoke_check_7(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -1698,7 +1698,7 @@ smoke_check_7(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -1800,7 +1800,7 @@ smoke_check_8(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -1808,12 +1808,12 @@ smoke_check_8(int express_test, unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
cache_ptr = file_ptr->shared->cache;
@@ -1830,7 +1830,7 @@ smoke_check_8(int express_test, unsigned paged)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1841,7 +1841,7 @@ smoke_check_8(int express_test, unsigned paged)
/* do_inserts */ FALSE);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1852,7 +1852,7 @@ smoke_check_8(int express_test, unsigned paged)
/* do_inserts */ FALSE);
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1863,7 +1863,7 @@ smoke_check_8(int express_test, unsigned paged)
/* do_inserts */ TRUE);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -1873,7 +1873,7 @@ smoke_check_8(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1885,7 +1885,7 @@ smoke_check_8(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -1895,7 +1895,7 @@ smoke_check_8(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -1907,12 +1907,12 @@ smoke_check_8(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -1926,7 +1926,7 @@ smoke_check_8(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -1993,7 +1993,7 @@ smoke_check_9(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -2001,12 +2001,12 @@ smoke_check_9(int express_test, unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged);
cache_ptr = file_ptr->shared->cache;
@@ -2014,7 +2014,7 @@ smoke_check_9(int express_test, unsigned paged)
/* disable evictions */
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2028,8 +2028,7 @@ smoke_check_9(int express_test, unsigned paged)
}
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2049,7 +2048,7 @@ smoke_check_9(int express_test, unsigned paged)
/* enable evictions */
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2063,8 +2062,7 @@ smoke_check_9(int express_test, unsigned paged)
}
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n", __func__, mile_stone++, (int)pass);
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2082,7 +2080,7 @@ smoke_check_9(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2096,8 +2094,8 @@ smoke_check_9(int express_test, unsigned paged)
}
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled \n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled \n", __func__, mile_stone++,
+ (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2115,7 +2113,7 @@ smoke_check_9(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2129,8 +2127,7 @@ smoke_check_9(int express_test, unsigned paged)
}
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -2140,7 +2137,7 @@ smoke_check_9(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2154,8 +2151,7 @@ smoke_check_9(int express_test, unsigned paged)
}
if (show_progress) /* 12 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2168,7 +2164,7 @@ smoke_check_9(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 13 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -2178,7 +2174,7 @@ smoke_check_9(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 14 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2192,8 +2188,7 @@ smoke_check_9(int express_test, unsigned paged)
}
if (show_progress) /* 15 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, (int)pass);
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2206,7 +2201,7 @@ smoke_check_9(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 16 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2220,13 +2215,12 @@ smoke_check_9(int express_test, unsigned paged)
}
if (show_progress) /* 17 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 18 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -2240,7 +2234,7 @@ smoke_check_9(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -2307,7 +2301,7 @@ smoke_check_10(int express_test, unsigned paged)
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -2315,19 +2309,18 @@ smoke_check_10(int express_test, unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged);
cache_ptr = file_ptr->shared->cache;
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2345,7 +2338,7 @@ smoke_check_10(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2359,8 +2352,7 @@ smoke_check_10(int express_test, unsigned paged)
}
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2378,7 +2370,7 @@ smoke_check_10(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2392,8 +2384,7 @@ smoke_check_10(int express_test, unsigned paged)
}
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2411,7 +2402,7 @@ smoke_check_10(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2425,8 +2416,7 @@ smoke_check_10(int express_test, unsigned paged)
}
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -2436,7 +2426,7 @@ smoke_check_10(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2450,8 +2440,7 @@ smoke_check_10(int express_test, unsigned paged)
}
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, (int)pass);
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2464,7 +2453,7 @@ smoke_check_10(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 12 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2478,8 +2467,7 @@ smoke_check_10(int express_test, unsigned paged)
}
if (show_progress) /* 13 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
/* flush all entries in the cache: */
@@ -2489,7 +2477,7 @@ smoke_check_10(int express_test, unsigned paged)
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 14 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2503,8 +2491,7 @@ smoke_check_10(int express_test, unsigned paged)
}
if (show_progress) /* 15 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, (int)pass);
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2517,7 +2504,7 @@ smoke_check_10(int express_test, unsigned paged)
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 16 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -2531,13 +2518,12 @@ smoke_check_10(int express_test, unsigned paged)
}
if (show_progress) /* 17 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++,
- (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 18 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -2551,7 +2537,7 @@ smoke_check_10(int express_test, unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -2616,7 +2602,7 @@ write_permitted_check(int
default:
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return 0; /* <========== note return */
break;
}
@@ -2624,17 +2610,17 @@ write_permitted_check(int
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
reset_entries();
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(1 * 1024 * 1024), (size_t)0, paged);
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2652,7 +2638,7 @@ write_permitted_check(int
/* dirty_unprotects */ TRUE);
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
write_permitted = FALSE;
@@ -2672,7 +2658,7 @@ write_permitted_check(int
/* dirty_unprotects */ NO_CHANGE);
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
write_permitted = TRUE;
@@ -2692,7 +2678,7 @@ write_permitted_check(int
/* dirty_unprotects */ TRUE);
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
@@ -2702,7 +2688,7 @@ write_permitted_check(int
/* dump_detailed_stats */ FALSE);
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
@@ -2715,7 +2701,7 @@ write_permitted_check(int
/* dirty_unprotects */ TRUE);
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
write_permitted = FALSE;
@@ -2732,12 +2718,12 @@ write_permitted_check(int
write_permitted = TRUE;
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
@@ -2751,14 +2737,14 @@ write_permitted_check(int
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
SKIPPED();
- HDfprintf(stdout, " Clean and dirty LRU lists disabled.\n");
+ fprintf(stdout, " Clean and dirty LRU lists disabled.\n");
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
@@ -3039,7 +3025,7 @@ check_insert_entry(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -3126,7 +3112,7 @@ check_flush_cache(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -4751,14 +4737,14 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
failure_mssg = "cache not empty at beginning of flush ops test.";
}
- spec = HDmalloc((size_t)max_num_spec * sizeof(struct fo_flush_cache_test_spec));
+ spec = malloc((size_t)max_num_spec * sizeof(struct fo_flush_cache_test_spec));
if (spec == NULL) {
pass = FALSE;
failure_mssg = "couldn't allocate flush ops test spec array";
}
- checks = HDmalloc((size_t)max_num_check * sizeof(struct fo_flush_entry_check));
+ checks = malloc((size_t)max_num_check * sizeof(struct fo_flush_entry_check));
if (checks == NULL) {
pass = FALSE;
@@ -4780,8 +4766,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 2;
size_t expected_index_size = 2 * PICO_ENTRY_SIZE;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -4874,8 +4860,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 0;
size_t expected_index_size = 0;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -4965,8 +4951,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5031,8 +5017,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 0;
size_t expected_index_size = 0;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5104,8 +5090,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5201,8 +5187,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5294,8 +5280,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5385,8 +5371,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5478,8 +5464,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 3;
size_t expected_index_size = 3 * PICO_ENTRY_SIZE;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5560,8 +5546,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 0;
size_t expected_index_size = (size_t)0;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5640,8 +5626,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
size_t expected_index_size =
VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2);
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5721,8 +5707,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 0;
size_t expected_index_size = (size_t)0;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5801,8 +5787,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
size_t expected_index_size =
VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2);
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -5905,8 +5891,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
size_t expected_index_size =
VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2);
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -6020,8 +6006,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
size_t expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (VARIABLE_ENTRY_SIZE / 4) +
(VARIABLE_ENTRY_SIZE / 2) + (2 * PICO_ENTRY_SIZE);
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -6208,8 +6194,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
size_t expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (2 * (VARIABLE_ENTRY_SIZE / 4)) +
(2 * (VARIABLE_ENTRY_SIZE / 2)) + (4 * PICO_ENTRY_SIZE);
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -6451,8 +6437,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 0;
size_t expected_index_size = 0;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -6690,8 +6676,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 3;
size_t expected_index_size = 3 * PICO_ENTRY_SIZE;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -6809,8 +6795,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 0;
size_t expected_index_size = (size_t)0;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -6998,8 +6984,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 13;
size_t expected_index_size = 9 * VARIABLE_ENTRY_SIZE;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -7406,8 +7392,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 0;
size_t expected_index_size = (size_t)0;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -7739,8 +7725,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 5;
size_t expected_index_size = 4 * VARIABLE_ENTRY_SIZE;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -7915,8 +7901,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
unsigned expected_index_len = 0;
size_t expected_index_size = 0;
- HDassert(spec_size <= max_num_spec);
- HDassert(check_size <= max_num_check);
+ assert(spec_size <= max_num_spec);
+ assert(check_size <= max_num_check);
spec[0] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 0,
@@ -8074,8 +8060,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
reset_entries();
}
- HDfree(checks);
- HDfree(spec);
+ free(checks);
+ free(spec);
/* finally finish up with the flush ops eviction test */
check_flush_cache__flush_op_eviction_test(file_ptr);
@@ -8370,7 +8356,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
test_entry_t *entry_ptr;
test_entry_t *base_addr;
- expected = HDmalloc((size_t)num_total_entries * sizeof(struct expected_entry_status));
+ expected = malloc((size_t)num_total_entries * sizeof(struct expected_entry_status));
if (expected == NULL) {
pass = FALSE;
@@ -8396,8 +8382,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].serialized = FALSE;
expected[i].destroyed = FALSE;
- HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
- HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+ memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
expected[i].flush_dep_npar = 0;
expected[i].flush_dep_nchd = 0;
@@ -8442,8 +8428,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].serialized = FALSE;
expected[i].destroyed = FALSE;
- HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
- HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+ memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
expected[i].flush_dep_npar = 0;
expected[i].flush_dep_nchd = 0;
@@ -8465,8 +8451,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].serialized = FALSE;
expected[i].destroyed = FALSE;
- HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
- HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+ memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
expected[i].flush_dep_npar = 0;
expected[i].flush_dep_nchd = 0;
@@ -8475,7 +8461,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].is_corked = FALSE;
}
- HDassert(i == num_total_entries);
+ assert(i == num_total_entries);
pass = TRUE;
}
@@ -9588,7 +9574,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
reset_entries();
}
- HDfree(expected);
+ free(expected);
} /* check_flush_cache__flush_op_eviction_test() */
@@ -10654,7 +10640,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
struct pinned_single_entry_test_spec *spec = NULL;
size_t i;
- spec = HDmalloc(256 * sizeof(struct pinned_single_entry_test_spec));
+ spec = malloc(256 * sizeof(struct pinned_single_entry_test_spec));
if (spec == NULL) {
pass = FALSE;
@@ -10772,7 +10758,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
i++;
}
- HDfree(spec);
+ free(spec);
}
} /* check_flush_cache__single_entry() */
@@ -11258,7 +11244,7 @@ check_get_entry_status(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -11536,7 +11522,7 @@ check_expunge_entry(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -11923,7 +11909,7 @@ check_multiple_read_protect(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -12023,7 +12009,7 @@ check_move_entry(unsigned paged)
H5_FAILED();
if (!pass)
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
return (unsigned)!pass;
} /* check_move_entry() */
@@ -12275,7 +12261,7 @@ check_pin_protected_entry(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -13137,7 +13123,7 @@ check_resize_entry(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -13216,7 +13202,7 @@ check_evictions_enabled(unsigned paged)
pass = TRUE;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* create the cache */
if (pass) {
@@ -13238,7 +13224,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that it is empty */
if (pass) {
@@ -13254,7 +13240,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that H5C_get_evictions_enabled() returns the expected value */
if (pass) {
@@ -13270,7 +13256,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13282,7 +13268,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that the cache is full */
if (pass) {
@@ -13298,7 +13284,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13308,7 +13294,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that an entry has been evicted */
if (pass) {
@@ -13324,7 +13310,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13354,7 +13340,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13363,7 +13349,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that another entry has been evicted */
if (pass) {
@@ -13380,7 +13366,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13410,7 +13396,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 12 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* disable evictions */
if (pass) {
@@ -13426,7 +13412,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 13 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that evictions are disabled */
if (pass) {
@@ -13443,7 +13429,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 14 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13453,7 +13439,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 15 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that no entry has been evicted */
if (pass) {
@@ -13470,7 +13456,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 16 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13479,7 +13465,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 17 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that no entry has been evicted */
if (pass) {
@@ -13496,7 +13482,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 18 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* re-enable evictions */
if (pass) {
@@ -13512,7 +13498,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 19 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13522,7 +13508,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 20 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that no entries have been evicted */
if (pass) {
@@ -13539,7 +13525,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 21 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13549,7 +13535,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 22 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that the entries have been evicted to bring the
* cache back down to its normal size.
@@ -13569,7 +13555,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 23 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13599,7 +13585,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 24 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13629,7 +13615,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 25 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* disable evictions again */
if (pass) {
@@ -13645,7 +13631,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 26 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13657,7 +13643,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 27 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that the cache has grown */
if (pass) {
@@ -13674,7 +13660,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 28 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* re-enable evictions again */
if (pass) {
@@ -13690,7 +13676,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 29 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13699,7 +13685,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 30 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* verify that the cache has returned to its maximum size */
if (pass) {
@@ -13716,7 +13702,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 31 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13746,7 +13732,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 32 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* disable evictions one last time before we shut down */
if (pass) {
@@ -13762,7 +13748,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 33 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -13770,7 +13756,7 @@ check_evictions_enabled(unsigned paged)
}
if (show_progress) /* 34 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
PASSED();
@@ -13781,7 +13767,7 @@ check_evictions_enabled(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -13872,7 +13858,7 @@ check_flush_protected_err(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -13958,7 +13944,7 @@ check_destroy_pinned_err(unsigned paged)
}
if (!pass)
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
return (unsigned)!pass;
@@ -14052,7 +14038,7 @@ check_destroy_protected_err(unsigned paged)
}
if (!pass)
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
return (unsigned)!pass;
@@ -14131,7 +14117,7 @@ check_duplicate_insert_err(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -14216,7 +14202,7 @@ check_double_pin_err(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -14310,7 +14296,7 @@ check_double_unpin_err(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -14418,7 +14404,7 @@ check_pin_entry_errs(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -14500,7 +14486,7 @@ check_double_protect_err(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -14578,7 +14564,7 @@ check_double_unprotect_err(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -14660,7 +14646,7 @@ check_mark_entry_dirty_errs(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -14773,7 +14759,7 @@ check_expunge_entry_errs(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -14890,7 +14876,7 @@ check_move_entry_errs(unsigned paged)
else {
H5_FAILED();
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
} /* end else */
return (unsigned)!pass;
@@ -14990,7 +14976,7 @@ check_resize_entry_errs(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -15111,7 +15097,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -15194,7 +15180,7 @@ check_protect_ro_rw_err(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -15276,7 +15262,7 @@ check_protect_retries(unsigned paged)
}
else {
- HDassert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
+ assert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
@@ -15285,7 +15271,7 @@ check_protect_retries(unsigned paged)
entry_ptr->ro_ref_count++;
}
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
}
if (pass)
@@ -15323,7 +15309,7 @@ check_protect_retries(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_msg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_msg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -15459,7 +15445,7 @@ check_check_evictions_enabled_err(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -15554,7 +15540,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
pass = TRUE;
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* allocate a cache, enable automatic cache resizing, and then force
* the cache through all its operational modes. Verify that all
@@ -15585,7 +15571,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache not full -- should result in not
* full status.
@@ -15610,7 +15596,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- should result in increase
* of cache size from .5 to 1 meg.
@@ -15636,7 +15622,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache not full -- should result in not
* full status.
@@ -15662,7 +15648,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 1 to 2 meg.
@@ -15689,7 +15675,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 2 to 4 meg.
@@ -15716,7 +15702,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 4 to 8 meg.
@@ -15743,7 +15729,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 8 to 12 meg. Note that max increase reduced the
@@ -15771,7 +15757,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 12 to 14 meg.
@@ -15798,7 +15784,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full and at maximum size -- should
* in no change in size and a result of at_max_size.
@@ -15825,7 +15811,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate with cache full and at maximum size -- should
* result in a decrease from 14 to 13 Meg -- note that max decrease
@@ -15853,7 +15839,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* the current cache configuration is inconvenient for testing cache
* size reduction, so lets change it some something easier to work
@@ -15920,7 +15906,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should result in a decrease from ~4 to ~3
* M -- note that max decrease reduces the size of the reduction
@@ -15947,7 +15933,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should result in a decrease from ~3
* to ~2 M -- again note that max decrease reduces the size of the
@@ -15975,7 +15961,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should result in a decrease from ~2
* to ~1 M -- again note that max decrease reduces the size of the
@@ -16003,7 +15989,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should result in a decrease from ~1
* to ~0.5 M -- max decrease is no longer a factor. New size is five
@@ -16030,7 +16016,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should result in a decrease of five
* bytes to the minimum cache size.
@@ -16056,7 +16042,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- Already at minimum size so no change in
* cache size and result should be at_min_size.
@@ -16082,7 +16068,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force in range hit rate -- should be no change in cache size,
* and result should be in_spec.
@@ -16116,7 +16102,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- should
* increase cache size from .5 to 1 M.
@@ -16142,7 +16128,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should result in a decrease to the
* minimum cache size.
@@ -16168,7 +16154,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/******************************************************************
* now do some tests with the maximum increase and decrease sizes
@@ -16235,7 +16221,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should result in a decrease to the
* minimum cache size.
@@ -16261,7 +16247,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- should increase cache size
* from 1 to 4 Meg.
@@ -16288,7 +16274,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate again with cache full -- should increase cache
* size from 4 to 16 Meg.
@@ -16315,7 +16301,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should result in a decrease cache size from
* 16 to 4 Meg.
@@ -16342,7 +16328,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/******************************************************************
* We have tested the threshold increment and decrement modes.
@@ -16411,7 +16397,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (cork_ageout)
cork_entry_type(file_ptr, MEDIUM_ENTRY_TYPE);
@@ -16444,7 +16430,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* second epoch */
rpt_fcn_called = FALSE;
@@ -16467,7 +16453,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* third epoch */
rpt_fcn_called = FALSE;
@@ -16490,7 +16476,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- If the hit rate were above the lower threshold,
* we would see cache size reduction now. However, nothing will
@@ -16517,7 +16503,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- force the hit rate to 100%. We should see cache size
* reduction now.
@@ -16542,7 +16528,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- force the hit rate to 100% again.
*/
@@ -16566,7 +16552,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- force the hit rate to 100% again.
*/
@@ -16590,7 +16576,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* eighth epoch -- force the hit rate to 100% again -- should be steady
* state.
@@ -16615,7 +16601,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
@@ -16641,7 +16627,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* tenth epoch */
rpt_fcn_called = FALSE;
@@ -16663,7 +16649,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* eleventh epoch -- cache size reduction */
rpt_fcn_called = FALSE;
@@ -16686,7 +16672,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* twelfth epoch -- at minimum size so no more ageouts */
rpt_fcn_called = FALSE;
@@ -16709,7 +16695,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (cork_ageout)
uncork_entry_type(file_ptr, MEDIUM_ENTRY_TYPE);
@@ -16781,7 +16767,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fill the cache with 1024 byte entries -- nothing should happen
* for three epochs while the markers are inserted into the cache
@@ -16812,7 +16798,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* second epoch */
@@ -16836,7 +16822,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* third epoch */
@@ -16860,7 +16846,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- If the hit rate were above the lower threshold,
* we would see cache size reduction now. However, nothing will
@@ -16888,7 +16874,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- force the hit rate to 100%. We should see cache size
* reduction now.
@@ -16915,7 +16901,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- force the hit rate to 100% again.
*/
@@ -16941,7 +16927,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- keep hit rate at 100%, and keep 2K entries active.
*/
@@ -16967,7 +16953,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* eighth epoch -- still 100% hit rate
*/
@@ -16993,7 +16979,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* ninth epoch --hit rate at 100%.
*/
@@ -17019,7 +17005,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* tenth epoch -- still 100% hit rate
*/
@@ -17045,7 +17031,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* eleventh epoch -- hit rate at 100% -- starting to stableize
*/
@@ -17070,7 +17056,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* twelfth epoch -- force the hit rate to 100% again -- should be steady
* state.
@@ -17096,7 +17082,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
@@ -17123,7 +17109,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* fourteenth epoch */
@@ -17147,7 +17133,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* fifteenth epoch -- cache size reduction */
@@ -17171,7 +17157,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* sixteenth epoch -- at minimum size so no more ageouts */
@@ -17195,7 +17181,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* repeat the test yet again, this time with empty reserve enabled.
* Again, some structural changes in the test are necessary.
@@ -17263,7 +17249,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fill the cache with 1024 byte entries -- nothing should happen
* for three epochs while the markers are inserted into the cache
@@ -17294,7 +17280,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* second epoch */
@@ -17318,7 +17304,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* third epoch */
@@ -17342,7 +17328,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- If the hit rate were above the lower threshold,
* we would see cache size reduction now. However, nothing will
@@ -17370,7 +17356,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- force the hit rate to 100%. We should see cache size
* reduction now.
@@ -17396,7 +17382,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- force the hit rate to 100% again.
*/
@@ -17421,7 +17407,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- force the hit rate to 100% again.
*/
@@ -17446,7 +17432,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* eighth epoch -- force the hit rate to 100% again -- should be steady
* state.
@@ -17472,7 +17458,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
@@ -17499,7 +17485,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* tenth epoch */
@@ -17522,7 +17508,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* eleventh epoch -- cache size reduction */
@@ -17546,7 +17532,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* twelfth epoch -- at minimum size so no more ageouts */
@@ -17570,7 +17556,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the test again, this time using the age out with threshold
* mode. To simplify the testing, set epochs to eviction to 1.
@@ -17641,7 +17627,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fill the cache with 4K byte entries -- increment mode is off,
* so cache size reduction should kick in as soon as we get the
@@ -17669,7 +17655,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* second epoch -- hit rate 0 */
@@ -17693,7 +17679,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* third epoch -- hit rate 1.0 -- should see decrease */
@@ -17717,7 +17703,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- load up the cache again -- hit rate 0 */
if (pass) {
@@ -17742,7 +17728,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- still loading up the cache -- hit rate 0 */
if (pass) {
@@ -17767,7 +17753,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- force hit rate to .998 -- should be no reduction */
if (pass) {
@@ -17792,7 +17778,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- force hit rate to .999 -- should see reduction
*/
@@ -17818,7 +17804,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* We have now tested all the major ageout modes individually.
* Lets try them all together to look for unexpected interactions
@@ -17885,7 +17871,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fill the cache with 4K byte entries -- increment mode is threshold,
* so the decrease code will not be executed until the hit rate exceeds
@@ -17913,7 +17899,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* second epoch -- hit rate 0 */
@@ -17937,7 +17923,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* third epoch -- force the hit rate to 1.0. Should be no change
* in the cache size due to the combination of the empty reserve
@@ -17970,7 +17956,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- hit rate still 1.0. Index size should decrease,
* but otherwise no change expected.
@@ -17998,7 +17984,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- hit rate still 1.0. Index size should decrease,
* but otherwise no change expected.
@@ -18026,7 +18012,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- hit rate still 1.0. Index size should decrease,
* but otherwise no change expected. Note that the cache size is
@@ -18055,7 +18041,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- hit rate still 1.0. No change in index size expected.
*/
@@ -18082,7 +18068,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* eighth epoch -- start loading 1 KB entries. Hit rate 0 so
* decrease code shouldn't be called.
@@ -18110,7 +18096,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* ninth epoch -- access the 1 KB entries again, driving the hit rate
* to 1.0. Decrease code should be triggered, but the max decrease
@@ -18139,7 +18125,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* tenth epoch -- access the 1 KB entries yet again, forcing hit rate
* to 1.0. Decrease code should be triggered, and the empty reserve
@@ -18168,7 +18154,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* eleventh epoch -- access the 1 KB entries yet again, forcing hit rate
* to 1.0. Decrease code should be triggered, and the empty reserve
@@ -18197,7 +18183,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* twelfth epoch -- hit rate 1.0 -- decrease as before.
*/
@@ -18224,7 +18210,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* thirteenth epoch -- hit rate 1.0 -- decrease as before.
*/
@@ -18251,7 +18237,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fourteenth epoch -- hit rate 1.0 -- decrease as before.
*/
@@ -18278,7 +18264,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* fifteenth epoch -- hit rate 1.0 -- decrease as before.
*/
@@ -18305,7 +18291,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* sixteenth epoch -- hit rate 1.0 -- should be stable now
*/
@@ -18332,7 +18318,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* now test the flash cache size increment code. At least at present,
* there should be no interaction between the regular auto-resize
@@ -18346,7 +18332,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Place the cache in a known state via a flush-destroy on the cache
* to clear out all entries, and then a reset on all the entries.
@@ -18361,7 +18347,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* now repeat the above tests using the add space flash cache size
* increment algorithm.
@@ -18427,7 +18413,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Load a huge entry into the cache */
if (pass) {
@@ -18447,7 +18433,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now load a monster entry. Since a monster entry is larger than
* half the size of the cache, and there is not sufficient space
@@ -18472,7 +18458,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Load a second monster entry. Since the monster entry is larger
* than half the size of the cache yet again, and there is not
@@ -18496,7 +18482,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Load a third moster entry. Should be no cache size increase this
* time.
@@ -18518,7 +18504,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* delete existing entries to prepare for next test, and reset
* the size of the cache.
@@ -18551,7 +18537,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* insert a huge entry into the cache */
if (pass) {
@@ -18574,7 +18560,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now insert a monster entry. Since a monster entry is larger than
* half the size of the cache, and there is not sufficient space
@@ -18596,7 +18582,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Insert a second monster entry. Cache size should increase again.
*/
@@ -18615,7 +18601,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Insert a third monster entry. Should be no cache size increase this
* time.
@@ -18637,7 +18623,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* delete existing entries to prepare for next test, and reset
* the size of the cache. We must also change the size of the needed
@@ -18689,7 +18675,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now load the variable entries into the cache */
if (pass) {
@@ -18716,7 +18702,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* protect a variable entry, and re-size it to 3K. Should be
* no effect on the size of the cache.
@@ -18737,7 +18723,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* protect the variable entry again, and re-size it to 10K. Should
* resize the cache to 13 KB. Note that cache_accesses will be 0
@@ -18759,7 +18745,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* protect a second variable entry, and re-size it to 10K. Should
* resize to 22 KB.
@@ -18780,7 +18766,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* protect a third variable entry, and re-size it to 10K. Should
* be no change in cache size.
@@ -18801,7 +18787,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* re-size the variable entries back down to their initial size, and
* restore the cache to its initial size as well, in preparation
@@ -18843,7 +18829,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now test flash cache resizes with pinned entries...
*/
@@ -18863,7 +18849,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -18879,7 +18865,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -18897,7 +18883,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -18915,7 +18901,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Unpin the entries. Note that no entries are evicted as we don't
* load any entries.
@@ -18941,7 +18927,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* re-size the variable entries back down to their initial size, and
* restore the cache to its initial size as well, in preparation
@@ -18998,7 +18984,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -19014,7 +19000,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -19032,7 +19018,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -19050,7 +19036,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Unpin the entries. Note that no entries are evicted as we don't
* load any entries.
@@ -19095,7 +19081,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* ...and then reconfigure. Note that we change the flash_multiple
* and flash_threshold just to make sure that such changed perform
@@ -19151,7 +19137,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -19164,7 +19150,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* protect and unprotect a large entry -- no change in cache size since
* a large entry will just fill the available space in the cache.
@@ -19186,7 +19172,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* protect and unprotect another a large entry -- should trigger a
* flash cache size increase to 12 KB (remember that flash_multiple is
@@ -19210,7 +19196,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* protect and unprotect two more large entries -- shouldn't trigger a
* flash cache size increase.
@@ -19235,7 +19221,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* do many accesses of a single entry to talk the cache into reducing
* its size to the minimum.
@@ -19261,7 +19247,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Force another flash increase */
if (pass) {
@@ -19283,7 +19269,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force regular size increase up to maximum */
if (pass) {
@@ -19307,7 +19293,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -19315,7 +19301,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
PASSED();
@@ -19325,7 +19311,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
} /* end else */
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return (unsigned)!pass;
} /* check_auto_cache_resize() */
@@ -19403,7 +19389,7 @@ check_auto_cache_resize_disable(unsigned paged)
pass = TRUE;
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* allocate a cache, enable automatic cache resizing, and then force
* the cache through all its operational modes. Verify that all
@@ -19448,7 +19434,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/******************************************************************
* So far, we have forced the auto cache resize through all modes
@@ -19519,7 +19505,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
@@ -19547,7 +19533,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- make sure that we haven't disabled decreases.
* should result in a decrease cache size from 4 to 2 Meg.
@@ -19575,7 +19561,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate again -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
@@ -19603,7 +19589,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the above tests, disabling increase through the lower
* threshold instead of the increment.
@@ -19670,7 +19656,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- increase disabled so should
* be no change in cache size, and result should be in_spec.
@@ -19698,7 +19684,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- make sure that we haven't disabled decreases.
* should result in a decrease cache size from 4 to 2 Meg.
@@ -19726,7 +19712,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate again -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
@@ -19754,7 +19740,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the above tests yet again, disabling increase through the
* incr_mode.
@@ -19822,7 +19808,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- increase disabled so should
* be no change in cache size, and result should be in_spec.
@@ -19850,7 +19836,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- make sure that we haven't disabled decreases.
* should result in a decrease cache size from 4 to 2 Meg.
@@ -19878,7 +19864,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate again -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
@@ -19906,7 +19892,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now, disable size decreases, and repeat the above tests.
*/
@@ -19963,7 +19949,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -19976,7 +19962,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no change in cache size,
* and result should be decrease_disabled.
@@ -20004,7 +19990,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
@@ -20031,7 +20017,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should be no change in cache size,
* and result should be decrease_disabled.
@@ -20059,7 +20045,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the above tests, disabling decrease through the upper
* threshold instead of the decrement.
@@ -20127,7 +20113,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no change in cache size,
* and result should be in_spec.
@@ -20155,7 +20141,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
@@ -20182,7 +20168,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should be no change in cache size,
* and result should be in_spec.
@@ -20210,7 +20196,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the above tests, disabling decrease through the decr_mode.
*/
@@ -20277,7 +20263,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no change in cache size,
* and result should be in_spec.
@@ -20305,7 +20291,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
@@ -20332,7 +20318,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should be no change in cache size,
* and result should be in_spec.
@@ -20360,7 +20346,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now do tests disabling size decrement in age out mode.
*
@@ -20429,7 +20415,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -20438,7 +20424,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* load up the cache with small entries. Note that it will take an
* epoch for the ageout code to initialize itself if it is enabled.
@@ -20466,7 +20452,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Load up some more small entries.
*/
@@ -20493,7 +20479,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now force a high hit rate so that the size increase code is
* is satisfied. We would see a decrease here if decrease were
@@ -20522,7 +20508,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
@@ -20549,7 +20535,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* just bang on a single entry. This will see to it that there are
* many entries that could be aged out were decreases enabled.
@@ -20579,7 +20565,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now disable size decrement in age out mode via the empty reserve.
*/
@@ -20646,7 +20632,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -20655,7 +20641,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* load up the cache with small entries. Note that it will take an
* epoch for the ageout code to initialize itself if it is enabled.
@@ -20683,7 +20669,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Load up some more small entries.
*/
@@ -20710,7 +20696,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now force a high hit rate so that the size increase code is
* is satisfied. We would see a decrease here if decrease were
@@ -20739,7 +20725,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
@@ -20766,7 +20752,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* just bang on a single entry. This will see to it that there are
* many entries that could be aged out were decreases enabled.
@@ -20796,7 +20782,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now work with age out with threshold. One can argue that we should
* repeat the above age out tests with age out with threshold, but the
@@ -20870,7 +20856,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -20879,7 +20865,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* load up the cache with small entries. Note that it will take an
* epoch for the ageout code to initialize itself if it is enabled.
@@ -20907,7 +20893,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Load up some more small entries.
*/
@@ -20934,7 +20920,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now force a high hit rate so that the size increase code is
* is satisfied. We would see a decrease here if decrease were
@@ -20966,7 +20952,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
@@ -20993,7 +20979,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* just bang on a single entry. This keeps the hit rate high, and sees
* to it that there are many entries that could be aged out were
@@ -21025,7 +21011,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/*********************************************************************
* Finally, use the auto cache resize code to set the size of the
@@ -21096,7 +21082,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21124,7 +21110,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21152,7 +21138,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -21216,7 +21202,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21244,7 +21230,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21272,7 +21258,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -21336,7 +21322,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21364,7 +21350,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21392,7 +21378,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -21456,7 +21442,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21484,7 +21470,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21512,7 +21498,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -21576,7 +21562,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21604,7 +21590,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21632,7 +21618,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -21696,7 +21682,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21724,7 +21710,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
@@ -21752,7 +21738,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now test the flash cache size increment code to verify that it
* is disabled when it should be.
@@ -21856,11 +21842,11 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
(cache_ptr->index_size != LARGE_ENTRY_SIZE) || (rpt_fcn_called != FALSE)))) {
- HDfprintf(stdout, "\nmax_cache_size = %ld.\n", (long)(cache_ptr->max_cache_size));
- HDfprintf(stdout, "min_clean_size = %ld.\n", (long)(cache_ptr->min_clean_size));
- HDfprintf(stdout, "index_len = %ld.\n", (long)(cache_ptr->index_len));
- HDfprintf(stdout, "index_size = %ld.\n", (long)(cache_ptr->index_size));
- HDfprintf(stdout, "rpt_fcn_called = %ld.\n", (long)(rpt_fcn_called));
+ fprintf(stdout, "\nmax_cache_size = %ld.\n", (long)(cache_ptr->max_cache_size));
+ fprintf(stdout, "min_clean_size = %ld.\n", (long)(cache_ptr->min_clean_size));
+ fprintf(stdout, "index_len = %ld.\n", (long)(cache_ptr->index_len));
+ fprintf(stdout, "index_size = %ld.\n", (long)(cache_ptr->index_size));
+ fprintf(stdout, "rpt_fcn_called = %ld.\n", (long)(rpt_fcn_called));
pass = FALSE;
failure_mssg = "Unexpected cache size change results 46.\n";
@@ -21868,7 +21854,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now protect and unprotect a monster entry. If the flash cache
* size increment code was active, this would trigger an increase.
@@ -21888,11 +21874,11 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE) || (rpt_fcn_called != FALSE)))) {
- HDfprintf(stdout, "\nmax_cache_size = %ld.\n", (long)(cache_ptr->max_cache_size));
- HDfprintf(stdout, "min_clean_size = %ld.\n", (long)(cache_ptr->min_clean_size));
- HDfprintf(stdout, "index_len = %ld.\n", (long)(cache_ptr->index_len));
- HDfprintf(stdout, "index_size = %ld.\n", (long)(cache_ptr->index_size));
- HDfprintf(stdout, "rpt_fcn_called = %ld.\n", (long)(rpt_fcn_called));
+ fprintf(stdout, "\nmax_cache_size = %ld.\n", (long)(cache_ptr->max_cache_size));
+ fprintf(stdout, "min_clean_size = %ld.\n", (long)(cache_ptr->min_clean_size));
+ fprintf(stdout, "index_len = %ld.\n", (long)(cache_ptr->index_len));
+ fprintf(stdout, "index_size = %ld.\n", (long)(cache_ptr->index_size));
+ fprintf(stdout, "rpt_fcn_called = %ld.\n", (long)(rpt_fcn_called));
pass = FALSE;
failure_mssg = "Unexpected cache size change results 47.\n";
@@ -21900,7 +21886,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -21908,7 +21894,7 @@ check_auto_cache_resize_disable(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
PASSED();
@@ -21919,7 +21905,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -22000,7 +21986,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
pass = TRUE;
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -22031,7 +22017,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Now make sure that we are managing the epoch markers correctly.
*/
@@ -22098,7 +22084,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Since we just created the cache, there should be no epoch markers
* active. Verify that this is true.
@@ -22137,7 +22123,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -22166,7 +22152,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* we now have a full complement of epoch markers -- see if
* we get the expected reduction.
@@ -22195,7 +22181,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* now reduce the epochs before eviction, and see if the cache
* deletes the extra markers
@@ -22262,7 +22248,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* There should be exactly one active epoch marker at present.
*/
@@ -22302,7 +22288,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* There should be exactly one active epoch marker at present...
*/
@@ -22391,7 +22377,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* shift the decrement mode to age out with threshold. Set epochs
* before eviction to 10 again.
@@ -22459,7 +22445,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* build up a full set of epoch markers. */
if (pass) {
@@ -22489,7 +22475,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* Verify that there are now 10 active epoch markers.
*/
@@ -22568,7 +22554,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
/* verify that we still have the expected number of entries in the cache,
* and that the cache is of the expected size.
@@ -22585,7 +22571,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
@@ -22593,7 +22579,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
}
if (show_progress)
- HDfprintf(stderr, "check point %d\n", checkpoint++);
+ fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) {
PASSED();
@@ -22604,7 +22590,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -24829,7 +24815,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -25318,7 +25304,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -25368,7 +25354,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
hbool_t deserialized = (hbool_t) !(fill_via_insertion);
- expected = HDmalloc(150 * sizeof(struct expected_entry_status));
+ expected = malloc(150 * sizeof(struct expected_entry_status));
if (expected == NULL) {
pass = FALSE;
@@ -25392,8 +25378,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
expected[i].serialized = FALSE;
expected[i].destroyed = FALSE;
- HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
- HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+ memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
expected[i].flush_dep_npar = 0;
expected[i].flush_dep_nchd = 0;
@@ -25421,7 +25407,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
} /* end else */
if (show_progress) /* 0 */
- HDfprintf(stdout, "\n%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "\n%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
if (pass) {
@@ -25442,7 +25428,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
/* ========================================================================
* ========================================================================
@@ -25505,7 +25491,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
/* ========================================================================
* ========================================================================
@@ -25575,7 +25561,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
if (pass) {
@@ -25629,7 +25615,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
if (pass) {
@@ -25682,7 +25668,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
/* ========================================================================
* ========================================================================
@@ -25757,7 +25743,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
if (pass) {
@@ -25828,7 +25814,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
/* ========================================================================
* ========================================================================
@@ -25887,7 +25873,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
if (pass) {
@@ -25935,7 +25921,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
if (pass) {
@@ -25986,7 +25972,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
if (pass) {
@@ -26032,7 +26018,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
if (cache_ptr) {
@@ -26042,9 +26028,9 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 12 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
- HDfree(expected);
+ free(expected);
if (pass) {
PASSED();
@@ -27974,7 +27960,7 @@ done:
PASSED();
else {
H5_FAILED();
- HDfprintf(stdout, "%s.\n", failure_mssg);
+ fprintf(stdout, "%s.\n", failure_mssg);
} /* end else */
return (unsigned)!pass;
@@ -28240,7 +28226,7 @@ done:
PASSED();
else {
H5_FAILED();
- HDfprintf(stdout, "%s.\n", failure_mssg);
+ fprintf(stdout, "%s.\n", failure_mssg);
} /* end else */
return (unsigned)!pass;
@@ -30970,7 +30956,7 @@ done:
PASSED();
else {
H5_FAILED();
- HDfprintf(stdout, "%s.\n", failure_mssg);
+ fprintf(stdout, "%s.\n", failure_mssg);
} /* end else */
return (unsigned)!pass;
@@ -31186,7 +31172,7 @@ done:
PASSED();
else {
H5_FAILED();
- HDfprintf(stdout, "%s.\n", failure_mssg);
+ fprintf(stdout, "%s.\n", failure_mssg);
} /* end else */
return (unsigned)!pass;
@@ -31225,7 +31211,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
*/
hbool_t deserialized = (hbool_t) !(fill_via_insertion);
- expected = HDmalloc(150 * sizeof(struct expected_entry_status));
+ expected = malloc(150 * sizeof(struct expected_entry_status));
if (expected == NULL) {
pass = FALSE;
@@ -31249,8 +31235,8 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
expected[i].serialized = FALSE;
expected[i].destroyed = FALSE;
- HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
- HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+ memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
expected[i].flush_dep_npar = 0;
expected[i].flush_dep_nchd = 0;
@@ -31270,7 +31256,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
TESTING("to ensure cork/uncork metadata on protect/unprotect");
if (show_progress) /* 0 */
- HDfprintf(stdout, "\n%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "\n%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
if (pass) {
@@ -31294,7 +31280,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
cork_entry_type(file_ptr, entry_type);
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
/* ========================================================================
* ========================================================================
@@ -31347,7 +31333,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
/* ========================================================================
* ========================================================================
@@ -31403,7 +31389,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
if (pass) {
@@ -31444,7 +31430,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
if (pass) {
@@ -31493,7 +31479,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
/* ========================================================================
* ========================================================================
@@ -31506,7 +31492,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
*/
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
if (pass) {
@@ -31545,7 +31531,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
/* ========================================================================
* ========================================================================
@@ -31589,7 +31575,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
if (pass) {
@@ -31632,7 +31618,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
if (pass) {
@@ -31676,7 +31662,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
if (pass) {
@@ -31716,7 +31702,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
if (pass) {
@@ -31760,16 +31746,16 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
if (show_progress) /* 12 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
/* We're done with testing. We can take down the cache. */
takedown_cache(file_ptr, FALSE, FALSE);
reset_entries();
if (show_progress) /* 13 */
- HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
- HDfree(expected);
+ free(expected);
if (pass) {
PASSED();
@@ -31869,7 +31855,7 @@ check_entry_deletions_during_scans(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return (unsigned)!pass;
@@ -31909,7 +31895,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
H5C_t *cache_ptr = file_ptr->shared->cache;
int i;
- expected = HDmalloc(36 * sizeof(struct expected_entry_status));
+ expected = malloc(36 * sizeof(struct expected_entry_status));
if (expected == NULL) {
pass = FALSE;
@@ -32103,7 +32089,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
- HDfree(expected);
+ free(expected);
} /* cedds__expunge_dirty_entry_in_flush_test() */
@@ -32143,7 +32129,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
const int num_huge_entries = 4;
const int num_monster_entries = 32;
- expected = HDmalloc(36 * sizeof(struct expected_entry_status));
+ expected = malloc(36 * sizeof(struct expected_entry_status));
if (expected == NULL) {
pass = FALSE;
@@ -32457,7 +32443,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
- HDfree(expected);
+ free(expected);
} /* cedds__H5C_make_space_in_cache() */
@@ -32538,7 +32524,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05};
- expected = HDmalloc(36 * sizeof(struct expected_entry_status));
+ expected = malloc(36 * sizeof(struct expected_entry_status));
if (expected == NULL) {
pass = FALSE;
@@ -32848,7 +32834,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
- HDfree(expected);
+ free(expected);
} /* cedds__H5C__autoadjust__ageout__evict_aged_out_entries() */
@@ -33027,7 +33013,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
entry_ptr = &(base_addr[0]);
entry_addr = entry_ptr->header.addr;
- HDassert(entry_addr == entry_ptr->addr);
+ assert(entry_addr == entry_ptr->addr);
expected_hash_bucket = H5C__HASH_FCN(entry_addr);
@@ -33281,14 +33267,14 @@ check_stats(unsigned paged)
if (!pass) {
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
#else /* H5C_COLLECT_CACHE_STATS */
SKIPPED();
- HDfprintf(stdout, " Statistics collection disabled.\n");
+ fprintf(stdout, " Statistics collection disabled.\n");
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -33694,7 +33680,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
static herr_t
check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, hbool_t *write_permitted_ptr)
{
- HDassert(write_permitted_ptr);
+ assert(write_permitted_ptr);
*write_permitted_ptr = write_permitted;
@@ -33749,7 +33735,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
hid_t fcpl_id = H5P_DEFAULT;
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
saved_fid = -1;
@@ -33792,7 +33778,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
}
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass && try_core_file_driver) {
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == FAIL) {
@@ -33809,7 +33795,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
core_file_driver_failed = TRUE;
if (verbose)
- HDfprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", __func__);
+ fprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", __func__);
}
else {
saved_fapl_id = fapl_id;
@@ -33817,7 +33803,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* if we either aren't using the core file driver, or a create
* with the core file driver failed, try again with a regular file.
@@ -33832,7 +33818,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
failure_mssg = "H5Fcreate() failed.";
if (verbose)
- HDfprintf(stdout, "%s: H5Fcreate() failed.\n", __func__);
+ fprintf(stdout, "%s: H5Fcreate() failed.\n", __func__);
} /* end if */
} /* end if */
@@ -33840,17 +33826,17 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
H5CX_push();
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
- HDassert(fid >= 0);
+ assert(fid >= 0);
saved_fid = fid;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
pass = FALSE;
failure_mssg = "H5Fflush() failed.";
if (verbose)
- HDfprintf(stdout, "%s: H5Fflush() failed.\n", __func__);
+ fprintf(stdout, "%s: H5Fflush() failed.\n", __func__);
}
else {
file_ptr = (H5F_t *)H5VL_object_verify(fid, H5I_FILE);
@@ -33859,13 +33845,13 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
failure_mssg = "Can't get file_ptr.";
if (verbose)
- HDfprintf(stdout, "%s: H5Fflush() failed.\n", __func__);
+ fprintf(stdout, "%s: H5Fflush() failed.\n", __func__);
}
}
}
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
@@ -33897,7 +33883,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
* instance, and then close the file normally.
*/
- HDassert(saved_cache == NULL);
+ assert(saved_cache == NULL);
saved_cache = file_ptr->shared->cache;
file_ptr->shared->cache = NULL;
@@ -33908,7 +33894,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
}
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
if (cache_ptr == NULL) {
@@ -33916,19 +33902,19 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
failure_mssg = "H5C_create() failed.";
if (verbose)
- HDfprintf(stdout, "%s: H5C_create() failed.\n", __func__);
+ fprintf(stdout, "%s: H5C_create() failed.\n", __func__);
}
else if (cache_ptr->magic != H5C__H5C_T_MAGIC) {
pass = FALSE;
failure_mssg = "Bad cache_ptr magic.";
if (verbose)
- HDfprintf(stdout, "%s: Bad cache_ptr magic.\n", __func__);
+ fprintf(stdout, "%s: Bad cache_ptr magic.\n", __func__);
}
}
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) { /* allocate space for test entries */
actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
@@ -33938,7 +33924,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
failure_mssg = "H5MF_alloc() failed.";
if (verbose)
- HDfprintf(stdout, "%s: H5MF_alloc() failed.\n", __func__);
+ fprintf(stdout, "%s: H5MF_alloc() failed.\n", __func__);
}
else if (actual_base_addr > BASE_ADDR) {
/* If this happens, must increase BASE_ADDR so that the
@@ -33949,14 +33935,14 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
failure_mssg = "actual_base_addr > BASE_ADDR";
if (verbose)
- HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n", __func__);
+ fprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n", __func__);
}
saved_actual_base_addr = actual_base_addr;
}
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
/* Need to set this else all cache tests will fail */
@@ -33967,7 +33953,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
}
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
+ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
return (ret_val);
} /* setup_cache() */
@@ -34036,7 +34022,7 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
if (NULL == file_ptr) {
file_ptr = (H5F_t *)H5VL_object_verify(saved_fid, H5I_FILE);
- HDassert(file_ptr);
+ assert(file_ptr);
}
H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, saved_actual_base_addr,
@@ -34097,19 +34083,19 @@ main(void)
express_test = GetTestExpress();
- HDprintf("=========================================\n");
- HDprintf("Internal cache tests\n");
- HDprintf(" express_test = %d\n", express_test);
- HDprintf("=========================================\n");
+ printf("=========================================\n");
+ printf("Internal cache tests\n");
+ printf(" express_test = %d\n", express_test);
+ printf("=========================================\n");
if (!h5_using_default_driver(NULL)) {
HDputs(" -- SKIPPED for incompatible VFD --");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
if (create_entry_arrays() < 0) {
- HDprintf("ERROR: Unable to create entries arrays. Aborting.\n");
+ printf("ERROR: Unable to create entries arrays. Aborting.\n");
return EXIT_FAILURE;
} /* end if */
@@ -34119,12 +34105,12 @@ main(void)
if (paged) {
- HDfprintf(stdout, "\n\nRe-running tests with paged aggregation:\n");
+ fprintf(stdout, "\n\nRe-running tests with paged aggregation:\n");
if (express_test > 0)
- HDfprintf(stdout, " Skipping smoke checks.\n");
+ fprintf(stdout, " Skipping smoke checks.\n");
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
}
nerrs += smoke_check_1(express_test, paged);
diff --git a/test/cache_api.c b/test/cache_api.c
index a34a6ca..184a879 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -477,7 +477,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return pass;
@@ -802,7 +802,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return pass;
@@ -966,7 +966,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
SKIPPED();
- HDfprintf(stdout, " Long tests disabled.\n");
+ fprintf(stdout, " Long tests disabled.\n");
return pass;
}
@@ -1420,7 +1420,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return pass;
@@ -1457,8 +1457,7 @@ init_invalid_configs(void)
H5AC_cache_config_t *configs = NULL;
/* Allocate memory */
- if (NULL ==
- (configs = (H5AC_cache_config_t *)HDcalloc(NUM_INVALID_CONFIGS, sizeof(H5AC_cache_config_t)))) {
+ if (NULL == (configs = (H5AC_cache_config_t *)calloc(NUM_INVALID_CONFIGS, sizeof(H5AC_cache_config_t)))) {
return NULL;
}
@@ -1798,7 +1797,7 @@ check_fapl_mdc_api_errs(void)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return pass;
@@ -1851,7 +1850,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: calling h5_fixname().\n", __func__);
+ fprintf(stdout, "%s: calling h5_fixname().\n", __func__);
}
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
@@ -1865,7 +1864,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: calling H5Fcreate().\n", __func__);
+ fprintf(stdout, "%s: calling H5Fcreate().\n", __func__);
}
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT);
@@ -1886,7 +1885,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 1.\n", __func__);
+ fprintf(stdout, "%s: testing H5Fget_mdc_config() 1.\n", __func__);
}
H5E_BEGIN_TRY
@@ -1906,7 +1905,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 2.\n", __func__);
+ fprintf(stdout, "%s: testing H5Fget_mdc_config() 2.\n", __func__);
}
H5E_BEGIN_TRY
@@ -1927,7 +1926,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 3.\n", __func__);
+ fprintf(stdout, "%s: testing H5Fget_mdc_config() 3.\n", __func__);
}
H5E_BEGIN_TRY
@@ -1950,7 +1949,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 1.\n", __func__);
+ fprintf(stdout, "%s: testing H5Fset_mdc_config() 1.\n", __func__);
}
H5E_BEGIN_TRY
@@ -1970,7 +1969,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 2.\n", __func__);
+ fprintf(stdout, "%s: testing H5Fset_mdc_config() 2.\n", __func__);
}
H5E_BEGIN_TRY
@@ -1990,7 +1989,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
while ((pass) && (i < NUM_INVALID_CONFIGS)) {
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fset_mdc_config() with invalid config %d.\n", __func__, i);
+ fprintf(stdout, "%s: testing H5Fset_mdc_config() with invalid config %d.\n", __func__, i);
}
H5E_BEGIN_TRY
@@ -2018,7 +2017,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 1.\n", __func__);
+ fprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 1.\n", __func__);
}
H5E_BEGIN_TRY
@@ -2038,7 +2037,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 2.\n", __func__);
+ fprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 2.\n", __func__);
}
H5E_BEGIN_TRY
@@ -2059,7 +2058,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Freset_mdc_hit_rate_stats().\n", __func__);
+ fprintf(stdout, "%s: testing H5Freset_mdc_hit_rate_stats().\n", __func__);
}
H5E_BEGIN_TRY
@@ -2080,7 +2079,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 1.\n", __func__);
+ fprintf(stdout, "%s: testing H5Fget_mdc_size() 1.\n", __func__);
}
H5E_BEGIN_TRY
@@ -2100,7 +2099,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 2.\n", __func__);
+ fprintf(stdout, "%s: testing H5Fget_mdc_size() 2.\n", __func__);
}
if ((H5Fget_mdc_size(file_id, &max_size, NULL, NULL, NULL) < 0) ||
@@ -2119,7 +2118,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (show_progress) {
- HDfprintf(stdout, "%s: cleaning up from tests.\n", __func__);
+ fprintf(stdout, "%s: cleaning up from tests.\n", __func__);
}
if (H5Fclose(file_id) < 0) {
@@ -2145,7 +2144,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (!pass) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
}
return pass;
@@ -2177,36 +2176,36 @@ main(void)
express_test = GetTestExpress();
- HDprintf("===================================\n");
- HDprintf("Cache API tests\n");
- HDprintf(" express_test = %d\n", express_test);
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("Cache API tests\n");
+ printf(" express_test = %d\n", express_test);
+ printf("===================================\n");
/* Initialize invalid configurations.
*/
invalid_configs = init_invalid_configs();
if (NULL == invalid_configs) {
failure_mssg = "Unable to allocate memory for invalid configs.";
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return EXIT_FAILURE;
} /* end if */
if ((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0) {
failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.\n";
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return EXIT_FAILURE;
} /* end if */
/* Set file space strategy to default or paged aggregation strategy */
if ((fcpl2_id = H5Pcopy(fcpl_id)) < 0) {
failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.\n";
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return EXIT_FAILURE;
} /* end if */
if (H5Pset_file_space_strategy(fcpl2_id, H5F_FSPACE_STRATEGY_PAGE, 1, (hsize_t)1) < 0) {
failure_mssg = "H5Pset_file_space_strategy() failed.\n";
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return EXIT_FAILURE;
} /* end if */
@@ -2240,11 +2239,11 @@ main(void)
nerrs += 1;
if (invalid_configs)
- HDfree(invalid_configs);
+ free(invalid_configs);
if (H5Pclose(fcpl_id) < 0) {
failure_mssg = "H5Pclose() failed.\n";
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return EXIT_FAILURE;
} /* end if */
diff --git a/test/cache_common.c b/test/cache_common.c
index e647abf..aaf42f1 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -389,8 +389,8 @@ addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr)
int32_t type;
int32_t idx;
- HDassert(type_ptr);
- HDassert(index_ptr);
+ assert(type_ptr);
+ assert(index_ptr);
/* we only have a small number of entry types, so just do a
* linear search. If NUMBER_OF_ENTRY_TYPES grows, we may want
@@ -412,24 +412,24 @@ addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr)
type = i - 1;
- HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
if (addr >= PICO_ALT_BASE_ADDR) {
idx = (int32_t)((addr - alt_base_addrs[type]) / entry_sizes[type]);
- HDassert((idx >= 0) && (idx <= max_indices[type]));
- HDassert(!((entries[type])[idx].at_main_addr));
- HDassert(addr == (entries[type])[idx].alt_addr);
+ assert((idx >= 0) && (idx <= max_indices[type]));
+ assert(!((entries[type])[idx].at_main_addr));
+ assert(addr == (entries[type])[idx].alt_addr);
}
else {
idx = (int32_t)((addr - base_addrs[type]) / entry_sizes[type]);
- HDassert((idx >= 0) && (idx <= max_indices[type]));
- HDassert((entries[type])[idx].at_main_addr);
- HDassert(addr == (entries[type])[idx].main_addr);
+ assert((idx >= 0) && (idx <= max_indices[type]));
+ assert((entries[type])[idx].at_main_addr);
+ assert(addr == (entries[type])[idx].main_addr);
}
- HDassert(addr == (entries[type])[idx].addr);
+ assert(addr == (entries[type])[idx].addr);
*type_ptr = type;
*index_ptr = idx;
@@ -465,15 +465,15 @@ get_initial_load_size(void *udata, size_t *image_length, int32_t H5_ATTR_NDEBUG_
base_addr = entries[type];
entry = &(base_addr[idx]);
- HDassert(entry->type >= 0);
- HDassert(entry->type == type);
- HDassert(entry->type == entry_type);
- HDassert(entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(entry->index == idx);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[type]);
- HDassert(entry == entry->self);
- HDassert(entry->addr == addr);
+ assert(entry->type >= 0);
+ assert(entry->type == type);
+ assert(entry->type == entry_type);
+ assert(entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(entry->index == idx);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[type]);
+ assert(entry == entry->self);
+ assert(entry->addr == addr);
*image_length = entry->size;
@@ -574,16 +574,16 @@ get_final_load_size(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED imag
base_addr = entries[type];
entry = &(base_addr[idx]);
- HDassert(entry->type >= 0);
- HDassert(entry->type == type);
- HDassert(entry->type == entry_type);
- HDassert(entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(entry->index == idx);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[type]);
- HDassert(entry == entry->self);
- HDassert(entry->addr == addr);
- HDassert(type == VARIABLE_ENTRY_TYPE);
+ assert(entry->type >= 0);
+ assert(entry->type == type);
+ assert(entry->type == entry_type);
+ assert(entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(entry->index == idx);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[type]);
+ assert(entry == entry->self);
+ assert(entry->addr == addr);
+ assert(type == VARIABLE_ENTRY_TYPE);
/* Simulate SPECULATIVE read with a specified actual_len */
if (entry->actual_len) {
@@ -633,16 +633,16 @@ verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void
base_addr = entries[type];
entry = &(base_addr[idx]);
- HDassert(entry->type >= 0);
- HDassert(entry->type == type);
- HDassert(entry->type == entry_type);
- HDassert(entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(type == VARIABLE_ENTRY_TYPE);
- HDassert(entry->index == idx);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[type]);
- HDassert(entry == entry->self);
- HDassert(entry->addr == addr);
+ assert(entry->type >= 0);
+ assert(entry->type == type);
+ assert(entry->type == entry_type);
+ assert(entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(type == VARIABLE_ENTRY_TYPE);
+ assert(entry->index == idx);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[type]);
+ assert(entry == entry->self);
+ assert(entry->addr == addr);
if (++entry->verify_ct >= entry->max_verify_ct)
return (TRUE);
@@ -686,48 +686,48 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
base_addr = entries[type];
entry = &(base_addr[idx]);
- HDassert(entry->type >= 0);
- HDassert(entry->type == type);
- HDassert(entry->type == entry_type);
- HDassert(entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(entry->index == idx);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[type]);
- HDassert(entry == entry->self);
- HDassert(entry->addr == addr);
- HDassert(entry->size == len);
- HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[type]));
- HDassert(dirty != NULL);
- HDassert(entry->flush_dep_npar == 0);
- HDassert(entry->flush_dep_nchd == 0);
+ assert(entry->type >= 0);
+ assert(entry->type == type);
+ assert(entry->type == entry_type);
+ assert(entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(entry->index == idx);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[type]);
+ assert(entry == entry->self);
+ assert(entry->addr == addr);
+ assert(entry->size == len);
+ assert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[type]));
+ assert(dirty != NULL);
+ assert(entry->flush_dep_npar == 0);
+ assert(entry->flush_dep_nchd == 0);
/* for now *dirty will always be FALSE */
*dirty = FALSE;
/* verify that the image contains the expected data. */
- HDassert(image != NULL);
+ assert(image != NULL);
if ((entry->at_main_addr && entry->written_to_main_addr) ||
(!entry->at_main_addr && entry->written_to_alt_addr)) {
if ((type == PICO_ENTRY_TYPE) || (type == VARIABLE_ENTRY_TYPE) || (type == NOTIFY_ENTRY_TYPE)) {
if ((*((const char *)image)) != (char)(idx & 0xFF)) {
- HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr);
- HDfprintf(stdout, "*image = 0x%x\n", (int)(*((const char *)image)));
- HDfprintf(stdout, "expected *image = 0x%x\n", (int)(idx & 0xFF));
+ fprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr);
+ fprintf(stdout, "*image = 0x%x\n", (int)(*((const char *)image)));
+ fprintf(stdout, "expected *image = 0x%x\n", (int)(idx & 0xFF));
} /* end if */
- HDassert((*((const char *)image)) == (char)(idx & 0xFF));
+ assert((*((const char *)image)) == (char)(idx & 0xFF));
} /* end if */
else {
if ((*(((const char *)image) + 2)) != (char)(idx & 0xFF)) {
- HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr);
- HDfprintf(stdout, "*image = 0x%" PRIx8 " 0x%" PRIx8 " 0x%" PRIx8 "\n",
- (*((const uint8_t *)image)), (*(((const uint8_t *)image) + 1)),
- (*(((const uint8_t *)image) + 2)));
- HDfprintf(stdout, "expected *image = 0x%02" PRIx32 "%02" PRIx32 "\n", (uint32_t)idx & 0xFF,
- (((uint32_t)idx & 0xFF00) >> 8));
+ fprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr);
+ fprintf(stdout, "*image = 0x%" PRIx8 " 0x%" PRIx8 " 0x%" PRIx8 "\n",
+ (*((const uint8_t *)image)), (*(((const uint8_t *)image) + 1)),
+ (*(((const uint8_t *)image) + 2)));
+ fprintf(stdout, "expected *image = 0x%02" PRIx32 "%02" PRIx32 "\n", (uint32_t)idx & 0xFF,
+ (((uint32_t)idx & 0xFF00) >> 8));
} /* end if */
- HDassert((*((const char *)image)) == (char)(type & 0xFF));
- HDassert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8));
- HDassert((*(((const char *)image) + 2)) == (char)(idx & 0xFF));
+ assert((*((const char *)image)) == (char)(type & 0xFF));
+ assert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8));
+ assert((*(((const char *)image) + 2)) == (char)(idx & 0xFF));
} /* end else */
} /* end if */
@@ -826,26 +826,26 @@ image_len(const void *thing, size_t *image_length, int32_t H5_ATTR_NDEBUG_UNUSED
const test_entry_t *entry;
int32_t type;
- HDassert(thing);
- HDassert(image_length);
+ assert(thing);
+ assert(image_length);
entry = (const test_entry_t *)thing;
- HDassert(entry->self == entry);
+ assert(entry->self == entry);
type = entry->type;
- HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert(type == entry_type);
- HDassert((entry->index >= 0) && (entry->index <= max_indices[type]));
+ assert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert(type == entry_type);
+ assert((entry->index >= 0) && (entry->index <= max_indices[type]));
- HDassert(entry == &(entries[type][entry->index]));
+ assert(entry == &(entries[type][entry->index]));
if (type != VARIABLE_ENTRY_TYPE)
- HDassert(entry->size == entry_sizes[type]);
+ assert(entry->size == entry_sizes[type]);
else {
- HDassert(entry->size <= entry_sizes[type]);
- HDassert(entry->size > 0);
+ assert(entry->size <= entry_sizes[type]);
+ assert(entry->size > 0);
} /* end else */
*image_length = entry->size;
@@ -945,32 +945,32 @@ pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *thing, haddr_t H5_ATTR_NDEBU
test_entry_t *entry;
int32_t i;
- HDassert(f);
- HDassert(thing);
- HDassert(flags_ptr);
+ assert(f);
+ assert(thing);
+ assert(flags_ptr);
*flags_ptr = H5C__SERIALIZE_NO_FLAGS_SET;
- HDassert(new_addr_ptr);
- HDassert(new_len_ptr);
+ assert(new_addr_ptr);
+ assert(new_len_ptr);
entry = (test_entry_t *)thing;
- HDassert(entry->self == entry);
- HDassert(entry->addr == addr);
- HDassert(entry->size == len);
+ assert(entry->self == entry);
+ assert(entry->addr == addr);
+ assert(entry->size == len);
/* shouldn't serialize the entry unless it is dirty */
- HDassert(entry->is_dirty);
- HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
- HDassert((entry->index >= 0) && (entry->index <= max_indices[entry->type]));
- HDassert(entry == &(entries[entry->type][entry->index]));
- HDassert(entry->num_flush_ops >= 0);
- HDassert(entry->num_flush_ops < MAX_FLUSH_OPS);
+ assert(entry->is_dirty);
+ assert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
+ assert((entry->index >= 0) && (entry->index <= max_indices[entry->type]));
+ assert(entry == &(entries[entry->type][entry->index]));
+ assert(entry->num_flush_ops >= 0);
+ assert(entry->num_flush_ops < MAX_FLUSH_OPS);
if (entry->num_flush_ops > 0) {
for (i = 0; i < entry->num_flush_ops; i++) {
- HDassert(entry->file_ptr);
+ assert(entry->file_ptr);
execute_flush_op(entry->file_ptr, entry, &((entry->flush_ops)[i]), flags_ptr);
} /* end for */
@@ -986,16 +986,16 @@ pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *thing, haddr_t H5_ATTR_NDEBU
/* set *new_len_ptr to the new length. */
- HDassert(entry->type == VARIABLE_ENTRY_TYPE);
- HDassert(entry->size > 0);
- HDassert(entry->size <= VARIABLE_ENTRY_SIZE);
+ assert(entry->type == VARIABLE_ENTRY_TYPE);
+ assert(entry->size > 0);
+ assert(entry->size <= VARIABLE_ENTRY_SIZE);
*new_len_ptr = entry->size;
} /* end if */
if (((*flags_ptr) & H5C__SERIALIZE_MOVED_FLAG) != 0) {
- HDassert(((*flags_ptr) | H5C__SERIALIZE_RESIZED_FLAG) != 0);
+ assert(((*flags_ptr) | H5C__SERIALIZE_RESIZED_FLAG) != 0);
/* place the new address in *new_addr */
*new_addr_ptr = entry->addr;
@@ -1109,35 +1109,35 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin
test_entry_t *entry;
int32_t type;
- HDassert(image_ptr);
- HDassert(thing);
+ assert(image_ptr);
+ assert(thing);
entry = (test_entry_t *)thing;
- HDassert(entry->self == entry);
- HDassert(entry->size == len);
+ assert(entry->self == entry);
+ assert(entry->size == len);
/* shouldn't serialize the entry unless it is dirty */
- HDassert(entry->is_dirty);
+ assert(entry->is_dirty);
type = entry->type;
- HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((entry->index >= 0) && (entry->index <= max_indices[type]));
+ assert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((entry->index >= 0) && (entry->index <= max_indices[type]));
- HDassert(entry == &(entries[type][entry->index]));
- HDassert(entry->num_flush_ops >= 0);
- HDassert(entry->num_flush_ops < MAX_FLUSH_OPS);
+ assert(entry == &(entries[type][entry->index]));
+ assert(entry->num_flush_ops >= 0);
+ assert(entry->num_flush_ops < MAX_FLUSH_OPS);
/* null out the image to avoid spurious failures */
- HDmemset(image_ptr, 0, len);
+ memset(image_ptr, 0, len);
if ((type == PICO_ENTRY_TYPE) || (type == VARIABLE_ENTRY_TYPE) || (type == NOTIFY_ENTRY_TYPE)) {
- HDassert(entry->size >= PICO_ENTRY_SIZE);
+ assert(entry->size >= PICO_ENTRY_SIZE);
*((char *)image_ptr) = (char)((entry->index) & 0xFF);
} /* end if */
else {
- HDassert(entry->size >= NANO_ENTRY_SIZE);
+ assert(entry->size >= NANO_ENTRY_SIZE);
*((char *)image_ptr) = (char)((entry->type) & 0xFF);
*(((char *)image_ptr) + 1) = (char)(((entry->index) & 0xFF00) >> 8);
*(((char *)image_ptr) + 2) = (char)((entry->index) & 0xFF);
@@ -1150,7 +1150,7 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin
entry->is_dirty = FALSE;
if (entry->flush_dep_npar > 0) {
- HDassert(entry->flush_dep_ndirty_chd == 0);
+ assert(entry->flush_dep_ndirty_chd == 0);
mark_flush_dep_clean(entry);
} /* end if */
@@ -1254,19 +1254,19 @@ notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_NDEBUG_UNUSED en
{
test_entry_t *entry;
- HDassert(thing);
+ assert(thing);
entry = (test_entry_t *)thing;
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[entry->type]);
- HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
- HDassert(entry->type == entry_type);
- HDassert(entry == &(entries[entry->type][entry->index]));
- HDassert(entry == entry->self);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[entry->type]);
+ assert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
+ assert(entry->type == entry_type);
+ assert(entry == &(entries[entry->type][entry->index]));
+ assert(entry == entry->self);
if (!(action == H5C_NOTIFY_ACTION_ENTRY_DIRTIED && entry->action == TEST_ENTRY_ACTION_MOVE))
- HDassert(entry->header.addr == entry->addr);
- HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type]));
+ assert(entry->header.addr == entry->addr);
+ assert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type]));
/* Increment count for appropriate action */
switch (action) {
@@ -1290,7 +1290,7 @@ notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_NDEBUG_UNUSED en
break;
default:
- HDassert(0 && "Unknown notify action!?!");
+ assert(0 && "Unknown notify action!?!");
} /* end switch */
return (SUCCEED);
@@ -1327,21 +1327,21 @@ notify_notify(H5C_notify_action_t action, void *thing)
herr_t
free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
- HDassert(entry);
-
- HDassert(entry->type == entry_type);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[entry->type]);
- HDassert(entry == &(entries[entry->type][entry->index]));
- HDassert(entry == entry->self);
- HDassert(entry->cache_ptr != NULL);
- HDassert(entry->cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert((entry->header.destroy_in_progress) || (entry->header.addr == entry->addr));
- HDassert(entry->header.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(entry->header.size == entry->size);
- HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type]));
- HDassert(entry->header.tl_next == NULL);
- HDassert(entry->header.tl_prev == NULL);
+ assert(entry);
+
+ assert(entry->type == entry_type);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[entry->type]);
+ assert(entry == &(entries[entry->type][entry->index]));
+ assert(entry == entry->self);
+ assert(entry->cache_ptr != NULL);
+ assert(entry->cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert((entry->header.destroy_in_progress) || (entry->header.addr == entry->addr));
+ assert(entry->header.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(entry->header.size == entry->size);
+ assert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type]));
+ assert(entry->header.tl_next == NULL);
+ assert(entry->header.tl_prev == NULL);
if (entry->num_pins > 0) {
int i;
@@ -1353,21 +1353,21 @@ free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
pinned_base_addr = entries[entry->pin_type[i]];
pinned_entry = &(pinned_base_addr[entry->pin_idx[i]]);
- HDassert(0 <= pinned_entry->type);
- HDassert(pinned_entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(pinned_entry->type == entry->pin_type[i]);
- HDassert(pinned_entry->index >= 0);
- HDassert(pinned_entry->index <= max_indices[pinned_entry->type]);
- HDassert(pinned_entry->index == entry->pin_idx[i]);
- HDassert(pinned_entry == pinned_entry->self);
- HDassert(pinned_entry->header.is_pinned);
- HDassert(pinned_entry->is_pinned);
- HDassert(pinned_entry->pinning_ref_count > 0);
+ assert(0 <= pinned_entry->type);
+ assert(pinned_entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(pinned_entry->type == entry->pin_type[i]);
+ assert(pinned_entry->index >= 0);
+ assert(pinned_entry->index <= max_indices[pinned_entry->type]);
+ assert(pinned_entry->index == entry->pin_idx[i]);
+ assert(pinned_entry == pinned_entry->self);
+ assert(pinned_entry->header.is_pinned);
+ assert(pinned_entry->is_pinned);
+ assert(pinned_entry->pinning_ref_count > 0);
pinned_entry->pinning_ref_count--;
if (pinned_entry->pinning_ref_count <= 0) {
- HDassert(pinned_entry->file_ptr);
+ assert(pinned_entry->file_ptr);
unpin_entry(pinned_entry->type, pinned_entry->index);
} /* end if */
@@ -1480,23 +1480,23 @@ add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hb
test_entry_t *target_base_addr;
test_entry_t *target_entry_ptr;
- HDassert((0 <= target_type) && (target_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= target_idx) && (target_idx <= max_indices[target_type]));
- HDassert((0 <= op_code) && (op_code <= FLUSH_OP__MAX_OP));
- HDassert((op_code != FLUSH_OP__RESIZE) || (type == VARIABLE_ENTRY_TYPE));
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
- HDassert(new_size <= VARIABLE_ENTRY_SIZE);
+ assert((0 <= target_type) && (target_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= target_idx) && (target_idx <= max_indices[target_type]));
+ assert((0 <= op_code) && (op_code <= FLUSH_OP__MAX_OP));
+ assert((op_code != FLUSH_OP__RESIZE) || (type == VARIABLE_ENTRY_TYPE));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
+ assert(new_size <= VARIABLE_ENTRY_SIZE);
if (pass) {
target_base_addr = entries[target_type];
target_entry_ptr = &(target_base_addr[target_idx]);
- HDassert(target_entry_ptr->index == target_idx);
- HDassert(target_entry_ptr->type == target_type);
- HDassert(target_entry_ptr == target_entry_ptr->self);
- HDassert(target_entry_ptr->num_flush_ops < MAX_FLUSH_OPS);
+ assert(target_entry_ptr->index == target_idx);
+ assert(target_entry_ptr->type == target_type);
+ assert(target_entry_ptr == target_entry_ptr->self);
+ assert(target_entry_ptr->num_flush_ops < MAX_FLUSH_OPS);
i = (target_entry_ptr->num_flush_ops)++;
(target_entry_ptr->flush_ops)[i].op_code = op_code;
@@ -1542,10 +1542,10 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id
if (pass) {
- HDassert((0 <= pinning_type) && (pinning_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= pinning_idx) && (pinning_idx <= max_indices[pinning_type]));
- HDassert((0 <= pinned_type) && (pinned_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= pinned_idx) && (pinned_idx <= max_indices[pinned_type]));
+ assert((0 <= pinning_type) && (pinning_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= pinning_idx) && (pinning_idx <= max_indices[pinning_type]));
+ assert((0 <= pinned_type) && (pinned_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= pinned_idx) && (pinned_idx <= max_indices[pinned_type]));
pinning_base_addr = entries[pinning_type];
pinning_entry_ptr = &(pinning_base_addr[pinning_idx]);
@@ -1553,15 +1553,15 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id
pinned_base_addr = entries[pinned_type];
pinned_entry_ptr = &(pinned_base_addr[pinned_idx]);
- HDassert(pinning_entry_ptr->index == pinning_idx);
- HDassert(pinning_entry_ptr->type == pinning_type);
- HDassert(pinning_entry_ptr == pinning_entry_ptr->self);
- HDassert(pinning_entry_ptr->num_pins < MAX_PINS);
+ assert(pinning_entry_ptr->index == pinning_idx);
+ assert(pinning_entry_ptr->type == pinning_type);
+ assert(pinning_entry_ptr == pinning_entry_ptr->self);
+ assert(pinning_entry_ptr->num_pins < MAX_PINS);
- HDassert(pinning_entry_ptr->index == pinning_idx);
- HDassert(pinning_entry_ptr->type == pinning_type);
- HDassert(pinning_entry_ptr == pinning_entry_ptr->self);
- HDassert(!(pinning_entry_ptr->is_protected));
+ assert(pinning_entry_ptr->index == pinning_idx);
+ assert(pinning_entry_ptr->type == pinning_type);
+ assert(pinning_entry_ptr == pinning_entry_ptr->self);
+ assert(!(pinning_entry_ptr->is_protected));
pinning_entry_ptr->pin_type[pinning_entry_ptr->num_pins] = pinned_type;
pinning_entry_ptr->pin_idx[pinning_entry_ptr->num_pins] = pinned_idx;
@@ -1605,16 +1605,16 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
test_entry_t *base_addr;
test_entry_t *entry_ptr;
- HDassert(file_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(file_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
if (pass) {
if (dirty_pin) {
H5C_t *cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
+ assert(cache_ptr);
if (!entry_in_cache(cache_ptr, type, idx)) {
@@ -1626,9 +1626,9 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
if (!((entry_ptr->header).is_pinned)) {
@@ -1672,20 +1672,20 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
{
H5C_t *cache_ptr;
- HDassert(file_ptr);
+ assert(file_ptr);
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(entry_ptr != NULL);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->header.addr == entry_ptr->addr);
- HDassert((entry_ptr->flush_op_self_resize_in_progress) || (entry_ptr->header.size == entry_ptr->size));
- HDassert(op_ptr != NULL);
- HDassert((0 <= entry_ptr->type) && (entry_ptr->type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= entry_ptr->index) && (entry_ptr->index <= max_indices[entry_ptr->type]));
- HDassert((0 <= op_ptr->type) && (op_ptr->type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= op_ptr->idx) && (op_ptr->idx <= max_indices[op_ptr->type]));
- HDassert(flags_ptr != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(entry_ptr != NULL);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->header.addr == entry_ptr->addr);
+ assert((entry_ptr->flush_op_self_resize_in_progress) || (entry_ptr->header.size == entry_ptr->size));
+ assert(op_ptr != NULL);
+ assert((0 <= entry_ptr->type) && (entry_ptr->type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= entry_ptr->index) && (entry_ptr->index <= max_indices[entry_ptr->type]));
+ assert((0 <= op_ptr->type) && (op_ptr->type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= op_ptr->idx) && (op_ptr->idx <= max_indices[op_ptr->type]));
+ assert(flags_ptr != NULL);
if (pass) {
@@ -1694,7 +1694,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
break;
case FLUSH_OP__DIRTY:
- HDassert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
+ assert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
dirty_entry(file_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag);
break;
@@ -1705,9 +1705,9 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
/* the flush operation is acting on the entry to
* which it is attached. Handle this here:
*/
- HDassert(entry_ptr->type == VARIABLE_ENTRY_TYPE);
- HDassert(op_ptr->size > 0);
- HDassert(op_ptr->size <= VARIABLE_ENTRY_SIZE);
+ assert(entry_ptr->type == VARIABLE_ENTRY_TYPE);
+ assert(op_ptr->size > 0);
+ assert(op_ptr->size <= VARIABLE_ENTRY_SIZE);
entry_ptr->size = op_ptr->size;
@@ -1730,16 +1730,16 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
* which it is attached. Handle this here:
*/
- HDassert(((*flags_ptr) & H5C__SERIALIZE_RESIZED_FLAG) != 0);
+ assert(((*flags_ptr) & H5C__SERIALIZE_RESIZED_FLAG) != 0);
(*flags_ptr) |= H5C__SERIALIZE_MOVED_FLAG;
if (op_ptr->flag) {
- HDassert(entry_ptr->addr == entry_ptr->alt_addr);
+ assert(entry_ptr->addr == entry_ptr->alt_addr);
entry_ptr->addr = entry_ptr->main_addr;
entry_ptr->at_main_addr = TRUE;
} /* end if */
else {
- HDassert(entry_ptr->addr == entry_ptr->main_addr);
+ assert(entry_ptr->addr == entry_ptr->main_addr);
entry_ptr->addr = entry_ptr->alt_addr;
entry_ptr->at_main_addr = FALSE;
} /* end else */
@@ -1749,7 +1749,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
break;
case FLUSH_OP__ORDER:
- HDassert(op_ptr->order_ptr);
+ assert(op_ptr->order_ptr);
entry_ptr->flush_order = *op_ptr->order_ptr;
(*op_ptr->order_ptr)++;
break;
@@ -1769,12 +1769,12 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
* must always be executed on an entry other than the
* entry being flushed.
*/
- HDassert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
+ assert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
expunge_entry(file_ptr, op_ptr->type, op_ptr->idx);
break;
case FLUSH_OP__DEST_FLUSH_DEP:
- HDassert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
+ assert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
destroy_flush_dependency(op_ptr->type, op_ptr->idx, entry_ptr->type, entry_ptr->index);
break;
@@ -1809,24 +1809,24 @@ entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx)
test_entry_t *entry_ptr;
H5C_cache_entry_t *test_ptr = NULL;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
H5C_TEST__SEARCH_INDEX(cache_ptr, entry_ptr->addr, test_ptr)
if (test_ptr != NULL) {
in_cache = TRUE;
- HDassert(test_ptr == (H5C_cache_entry_t *)entry_ptr);
- HDassert(entry_ptr->addr == entry_ptr->header.addr);
+ assert(test_ptr == (H5C_cache_entry_t *)entry_ptr);
+ assert(entry_ptr->addr == entry_ptr->header.addr);
}
return (in_cache);
@@ -1851,70 +1851,69 @@ create_entry_arrays(void)
{
/* pico entries */
- if (NULL == (pico_entries = (test_entry_t *)HDcalloc(NUM_PICO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (pico_entries = (test_entry_t *)calloc(NUM_PICO_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_pico_entries = (test_entry_t *)HDcalloc(NUM_PICO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_pico_entries = (test_entry_t *)calloc(NUM_PICO_ENTRIES, sizeof(test_entry_t))))
goto error;
/* nano entries */
- if (NULL == (nano_entries = (test_entry_t *)HDcalloc(NUM_NANO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (nano_entries = (test_entry_t *)calloc(NUM_NANO_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_nano_entries = (test_entry_t *)HDcalloc(NUM_NANO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_nano_entries = (test_entry_t *)calloc(NUM_NANO_ENTRIES, sizeof(test_entry_t))))
goto error;
/* micro entries */
- if (NULL == (micro_entries = (test_entry_t *)HDcalloc(NUM_MICRO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (micro_entries = (test_entry_t *)calloc(NUM_MICRO_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_micro_entries = (test_entry_t *)HDcalloc(NUM_MICRO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_micro_entries = (test_entry_t *)calloc(NUM_MICRO_ENTRIES, sizeof(test_entry_t))))
goto error;
/* tiny entries */
- if (NULL == (tiny_entries = (test_entry_t *)HDcalloc(NUM_TINY_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (tiny_entries = (test_entry_t *)calloc(NUM_TINY_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_tiny_entries = (test_entry_t *)HDcalloc(NUM_TINY_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_tiny_entries = (test_entry_t *)calloc(NUM_TINY_ENTRIES, sizeof(test_entry_t))))
goto error;
/* small entries */
- if (NULL == (small_entries = (test_entry_t *)HDcalloc(NUM_SMALL_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (small_entries = (test_entry_t *)calloc(NUM_SMALL_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_small_entries = (test_entry_t *)HDcalloc(NUM_SMALL_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_small_entries = (test_entry_t *)calloc(NUM_SMALL_ENTRIES, sizeof(test_entry_t))))
goto error;
/* medium entries */
- if (NULL == (medium_entries = (test_entry_t *)HDcalloc(NUM_MEDIUM_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (medium_entries = (test_entry_t *)calloc(NUM_MEDIUM_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_medium_entries = (test_entry_t *)HDcalloc(NUM_MEDIUM_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_medium_entries = (test_entry_t *)calloc(NUM_MEDIUM_ENTRIES, sizeof(test_entry_t))))
goto error;
/* large entries */
- if (NULL == (large_entries = (test_entry_t *)HDcalloc(NUM_LARGE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (large_entries = (test_entry_t *)calloc(NUM_LARGE_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_large_entries = (test_entry_t *)HDcalloc(NUM_LARGE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_large_entries = (test_entry_t *)calloc(NUM_LARGE_ENTRIES, sizeof(test_entry_t))))
goto error;
/* huge entries */
- if (NULL == (huge_entries = (test_entry_t *)HDcalloc(NUM_HUGE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (huge_entries = (test_entry_t *)calloc(NUM_HUGE_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_huge_entries = (test_entry_t *)HDcalloc(NUM_HUGE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_huge_entries = (test_entry_t *)calloc(NUM_HUGE_ENTRIES, sizeof(test_entry_t))))
goto error;
/* monster entries */
- if (NULL == (monster_entries = (test_entry_t *)HDcalloc(NUM_MONSTER_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (monster_entries = (test_entry_t *)calloc(NUM_MONSTER_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_monster_entries = (test_entry_t *)HDcalloc(NUM_MONSTER_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_monster_entries = (test_entry_t *)calloc(NUM_MONSTER_ENTRIES, sizeof(test_entry_t))))
goto error;
/* variable entries */
- if (NULL == (variable_entries = (test_entry_t *)HDcalloc(NUM_VARIABLE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (variable_entries = (test_entry_t *)calloc(NUM_VARIABLE_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL ==
- (orig_variable_entries = (test_entry_t *)HDcalloc(NUM_VARIABLE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_variable_entries = (test_entry_t *)calloc(NUM_VARIABLE_ENTRIES, sizeof(test_entry_t))))
goto error;
/* notify entries */
- if (NULL == (notify_entries = (test_entry_t *)HDcalloc(NUM_NOTIFY_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (notify_entries = (test_entry_t *)calloc(NUM_NOTIFY_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_notify_entries = (test_entry_t *)HDcalloc(NUM_NOTIFY_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_notify_entries = (test_entry_t *)calloc(NUM_NOTIFY_ENTRIES, sizeof(test_entry_t))))
goto error;
entries[0] = pico_entries;
@@ -1967,48 +1966,48 @@ free_entry_arrays(void)
{
/* pico entries */
- HDfree(pico_entries);
- HDfree(orig_pico_entries);
+ free(pico_entries);
+ free(orig_pico_entries);
/* nano entries */
- HDfree(nano_entries);
- HDfree(orig_nano_entries);
+ free(nano_entries);
+ free(orig_nano_entries);
/* micro entries */
- HDfree(micro_entries);
- HDfree(orig_micro_entries);
+ free(micro_entries);
+ free(orig_micro_entries);
/* tiny entries */
- HDfree(tiny_entries);
- HDfree(orig_tiny_entries);
+ free(tiny_entries);
+ free(orig_tiny_entries);
/* small entries */
- HDfree(small_entries);
- HDfree(orig_small_entries);
+ free(small_entries);
+ free(orig_small_entries);
/* medium entries */
- HDfree(medium_entries);
- HDfree(orig_medium_entries);
+ free(medium_entries);
+ free(orig_medium_entries);
/* large entries */
- HDfree(large_entries);
- HDfree(orig_large_entries);
+ free(large_entries);
+ free(orig_large_entries);
/* huge entries */
- HDfree(huge_entries);
- HDfree(orig_huge_entries);
+ free(huge_entries);
+ free(orig_huge_entries);
/* monster entries */
- HDfree(monster_entries);
- HDfree(orig_monster_entries);
+ free(monster_entries);
+ free(orig_monster_entries);
/* variable entries */
- HDfree(variable_entries);
- HDfree(orig_variable_entries);
+ free(variable_entries);
+ free(orig_variable_entries);
/* notify entries */
- HDfree(notify_entries);
- HDfree(orig_notify_entries);
+ free(notify_entries);
+ free(orig_notify_entries);
} /* free_entry_arrays() */
@@ -2047,8 +2046,8 @@ reset_entries(void)
base_addr = entries[i];
orig_base_addr = orig_entries[i];
- HDassert(base_addr);
- HDassert(orig_base_addr);
+ assert(base_addr);
+ assert(orig_base_addr);
for (j = 0; j <= max_index; j++) {
int k;
@@ -2136,7 +2135,7 @@ reset_entries(void)
} /* end for */
/* Make copy of entries in base_addr for later */
- HDmemcpy(orig_base_addr, base_addr, (size_t)(max_index + 1) * sizeof(*base_addr));
+ memcpy(orig_base_addr, base_addr, (size_t)(max_index + 1) * sizeof(*base_addr));
} /* end for */
/* Indicate that we've made a copy for later */
@@ -2149,7 +2148,7 @@ reset_entries(void)
orig_base_addr = orig_entries[i];
/* Make copy of entries in base_addr for later */
- HDmemcpy(base_addr, orig_base_addr, (size_t)(max_index + 1) * sizeof(*base_addr));
+ memcpy(base_addr, orig_base_addr, (size_t)(max_index + 1) * sizeof(*base_addr));
} /* end for */
} /* end else */
@@ -2181,17 +2180,17 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
test_entry_t *entry_ptr;
herr_t result;
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert(type == VARIABLE_ENTRY_TYPE);
- HDassert((0 <= idx) && (idx <= max_indices[type]));
- HDassert((0 < new_size) && (new_size <= entry_sizes[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert(type == VARIABLE_ENTRY_TYPE);
+ assert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 < new_size) && (new_size <= entry_sizes[type]));
if (pass) {
if (in_cache) {
H5C_t *cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
+ assert(cache_ptr);
if (!entry_in_cache(cache_ptr, type, idx)) {
@@ -2203,10 +2202,10 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr->cache_ptr == cache_ptr);
- HDassert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr->cache_ptr == cache_ptr);
+ assert(entry_ptr == entry_ptr->self);
if (!(entry_ptr->header.is_pinned || entry_ptr->header.is_protected)) {
@@ -2231,7 +2230,7 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
}
else {
- HDassert(entry_ptr->size == (entry_ptr->header).size);
+ assert(entry_ptr->size == (entry_ptr->header).size);
}
}
}
@@ -2278,7 +2277,7 @@ verify_clean(void)
max_index = max_indices[i];
base_addr = entries[i];
- HDassert(base_addr);
+ assert(base_addr);
for (j = 0; j <= max_index; j++) {
if ((base_addr[j].header.is_dirty) || (base_addr[j].is_dirty)) {
@@ -2645,10 +2644,10 @@ verify_unprotected(void)
max_index = max_indices[i];
base_addr = entries[i];
- HDassert(base_addr);
+ assert(base_addr);
for (j = 0; j <= max_index; j++) {
- HDassert(base_addr[j].header.is_protected == base_addr[j].is_protected);
+ assert(base_addr[j].header.is_protected == base_addr[j].is_protected);
if ((base_addr[j].header.is_protected) || (base_addr[j].is_protected)) {
@@ -2691,23 +2690,23 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
#ifndef NDEBUG
H5C_t *cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
+ assert(cache_ptr);
#endif /* NDEBUG */
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->cache_ptr == cache_ptr);
- HDassert(!(entry_ptr->header.is_protected));
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->header.is_pinned));
- HDassert(!(entry_ptr->is_pinned));
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->cache_ptr == cache_ptr);
+ assert(!(entry_ptr->header.is_protected));
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->header.is_pinned));
+ assert(!(entry_ptr->is_pinned));
result = H5C_expunge_entry(file_ptr, types[type], entry_ptr->addr, H5C__NO_FLAGS_SET);
@@ -2748,7 +2747,7 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_
if (pass) {
H5C_t *cache_ptr;
- HDassert(file_ptr);
+ assert(file_ptr);
cache_ptr = file_ptr->shared->cache;
@@ -2772,9 +2771,9 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_
if (verbose) {
- HDfprintf(stdout, "%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n", __func__,
- (long long)(cache_ptr->index_len), (long long)(cache_ptr->index_size),
- (long long)(cache_ptr->clean_index_size), (long long)(cache_ptr->dirty_index_size));
+ fprintf(stdout, "%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n", __func__,
+ (long long)(cache_ptr->index_len), (long long)(cache_ptr->index_size),
+ (long long)(cache_ptr->clean_index_size), (long long)(cache_ptr->dirty_index_size));
}
pass = FALSE;
failure_mssg = "non zero index len/sizes after H5C_flush_cache() with invalidate.";
@@ -2806,8 +2805,8 @@ cork_entry_type(H5F_t *file_ptr, int32_t type)
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
baddrs = base_addrs[type];
if (H5C_cork(cache_ptr, baddrs, H5C__SET_CORK, NULL) < 0) {
@@ -2841,8 +2840,8 @@ uncork_entry_type(H5F_t *file_ptr, int32_t type)
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
baddrs = base_addrs[type];
if (H5C_cork(cache_ptr, baddrs, H5C__UNCORK, NULL) < 0) {
@@ -2882,20 +2881,20 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
baddrs = base_addrs[type];
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(!(entry_ptr->is_protected));
- HDassert(entry_ptr->flush_dep_npar == 0);
- HDassert(entry_ptr->flush_dep_nchd == 0);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(!(entry_ptr->is_protected));
+ assert(entry_ptr->flush_dep_npar == 0);
+ assert(entry_ptr->flush_dep_nchd == 0);
insert_pinned = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0);
@@ -2915,37 +2914,37 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
#if 0 /* This is useful debugging code. Lets keep it around. */
- HDfprintf(stdout, "result = %d\n", (int)result);
- HDfprintf(stdout, "entry_ptr->header.is_protected = %d\n",
+ fprintf(stdout, "result = %d\n", (int)result);
+ fprintf(stdout, "entry_ptr->header.is_protected = %d\n",
(int)(entry_ptr->header.is_protected));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->header.type != types[type] = %d\n",
(int)(entry_ptr->header.type != types[type]));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->size != entry_ptr->header.size = %d\n",
(int)(entry_ptr->size != entry_ptr->header.size));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->addr != entry_ptr->header.addr = %d\n",
(int)(entry_ptr->addr != entry_ptr->header.addr));
#endif
} /* end if */
- HDassert(entry_ptr->cache_ptr == NULL);
+ assert(entry_ptr->cache_ptr == NULL);
entry_ptr->file_ptr = file_ptr;
entry_ptr->cache_ptr = cache_ptr;
if (insert_pinned)
- HDassert(entry_ptr->header.is_pinned);
+ assert(entry_ptr->header.is_pinned);
else
- HDassert(!(entry_ptr->header.is_pinned));
+ assert(!(entry_ptr->header.is_pinned));
entry_ptr->is_pinned = insert_pinned;
entry_ptr->pinned_from_client = insert_pinned;
if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked)
entry_ptr->is_corked = TRUE;
- HDassert(entry_ptr->header.is_dirty);
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(entry_ptr->header.is_dirty);
+ assert(((entry_ptr->header).type)->id == type);
} /* end if */
} /* insert_entry() */
@@ -2975,16 +2974,16 @@ mark_entry_dirty(int32_t type, int32_t idx)
if (pass) {
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->header.is_protected || entry_ptr->header.is_pinned);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->header.is_protected || entry_ptr->header.is_pinned);
was_dirty = entry_ptr->is_dirty;
entry_ptr->is_dirty = TRUE;
@@ -3004,7 +3003,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
failure_mssg = "error in H5C_mark_entry_dirty().";
}
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
}
} /* mark_entry_dirty() */
@@ -3036,25 +3035,25 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
if (pass) {
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->cache_ptr == cache_ptr);
- HDassert(!entry_ptr->is_read_only);
- HDassert(!entry_ptr->header.is_read_only);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->cache_ptr == cache_ptr);
+ assert(!entry_ptr->is_read_only);
+ assert(!entry_ptr->header.is_read_only);
if (entry_ptr->at_main_addr && !main_addr) {
/* move to alt addr */
- HDassert(entry_ptr->addr == entry_ptr->main_addr);
+ assert(entry_ptr->addr == entry_ptr->main_addr);
done = FALSE;
old_addr = entry_ptr->addr;
@@ -3064,7 +3063,7 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
/* move to main addr */
- HDassert(entry_ptr->addr == entry_ptr->alt_addr);
+ assert(entry_ptr->addr == entry_ptr->alt_addr);
done = FALSE;
old_addr = entry_ptr->addr;
@@ -3099,10 +3098,10 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
}
}
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
- HDassert(entry_ptr->header.is_dirty);
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->header.is_dirty);
+ assert(entry_ptr->is_dirty);
}
} /* move_entry() */
@@ -3133,18 +3132,18 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
if (pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
baddrs = base_addrs[type];
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(!(entry_ptr->is_protected));
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(!(entry_ptr->is_protected));
/* Set the base address of the entry type into the property list as tag */
/* Use to cork entries for the object */
@@ -3163,22 +3162,22 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
* again.
* - JRM
*/
- HDfprintf(stdout, "( cache_entry_ptr != (void *)entry_ptr ) = %d\n",
+ fprintf(stdout, "( cache_entry_ptr != (void *)entry_ptr ) = %d\n",
(int)( cache_entry_ptr != (void *)entry_ptr ));
- HDfprintf(stdout, "cache_entry_ptr = 0x%lx, entry_ptr = 0x%lx\n",
+ fprintf(stdout, "cache_entry_ptr = 0x%lx, entry_ptr = 0x%lx\n",
(long)cache_entry_ptr, (long)entry_ptr);
- HDfprintf(stdout, "entry_ptr->header.is_protected = %d\n",
+ fprintf(stdout, "entry_ptr->header.is_protected = %d\n",
(int)(entry_ptr->header.is_protected));
- HDfprintf(stdout,
+ fprintf(stdout,
"( entry_ptr->header.type != types[type] ) = %d\n",
(int)( entry_ptr->header.type != types[type] ));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->size = %d, entry_ptr->header.size = %d\n",
(int)(entry_ptr->size), (int)(entry_ptr->header.size));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->addr = %d, entry_ptr->header.addr = %d\n",
(int)(entry_ptr->addr), (int)(entry_ptr->header.addr));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->verify_ct = %d, entry_ptr->max_verify_ct = %d\n",
entry_ptr->verify_ct, entry_ptr->max_verify_ct);
H5Eprint2(H5E_DEFAULT, stdout);
@@ -3189,7 +3188,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
} /* end if */
else {
- HDassert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
+ assert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
@@ -3200,7 +3199,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked)
entry_ptr->is_corked = TRUE;
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
} /* end if */
} /* protect_entry() */
@@ -3233,18 +3232,17 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert((!(entry_ptr->is_protected)) ||
- ((entry_ptr->is_read_only) && (entry_ptr->ro_ref_count > 0)));
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert((!(entry_ptr->is_protected)) || ((entry_ptr->is_read_only) && (entry_ptr->ro_ref_count > 0)));
cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, types[type], entry_ptr->addr,
&entry_ptr->addr, H5C__READ_ONLY_FLAG);
@@ -3259,7 +3257,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
}
else {
- HDassert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
+ assert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
@@ -3268,7 +3266,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
entry_ptr->ro_ref_count++;
}
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
}
} /* protect_entry_ro() */
@@ -3291,8 +3289,8 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
void
pin_entry(int32_t type, int32_t idx)
{
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
if (pass) {
test_entry_t *base_addr;
@@ -3302,11 +3300,11 @@ pin_entry(int32_t type, int32_t idx)
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->is_protected);
- HDassert(!(entry_ptr->pinned_from_client));
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->is_protected);
+ assert(!(entry_ptr->pinned_from_client));
result = H5C_pin_protected_entry((void *)entry_ptr);
@@ -3352,19 +3350,19 @@ unpin_entry(int32_t type, int32_t idx)
test_entry_t *entry_ptr;
if (pass) {
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->header.is_pinned);
- HDassert(entry_ptr->header.pinned_from_client);
- HDassert(entry_ptr->is_pinned);
- HDassert(entry_ptr->pinned_from_client);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->header.is_pinned);
+ assert(entry_ptr->header.pinned_from_client);
+ assert(entry_ptr->is_pinned);
+ assert(entry_ptr->pinned_from_client);
result = H5C_unpin_entry(entry_ptr);
@@ -3381,7 +3379,7 @@ unpin_entry(int32_t type, int32_t idx)
entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
}
} /* unpin_entry() */
@@ -3411,24 +3409,24 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
test_entry_t *entry_ptr;
if (pass) {
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->header.is_protected);
- HDassert(entry_ptr->is_protected);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->header.is_protected);
+ assert(entry_ptr->is_protected);
pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0);
unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0);
- HDassert(!(pin_flag_set && unpin_flag_set));
- HDassert((!pin_flag_set) || (!(entry_ptr->is_pinned)));
- HDassert((!unpin_flag_set) || (entry_ptr->is_pinned));
+ assert(!(pin_flag_set && unpin_flag_set));
+ assert((!pin_flag_set) || (!(entry_ptr->is_pinned)));
+ assert((!unpin_flag_set) || (entry_ptr->is_pinned));
if (flags & H5C__DIRTIED_FLAG) {
hbool_t was_dirty = entry_ptr->is_dirty;
@@ -3468,29 +3466,29 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
if (pin_flag_set) {
- HDassert(entry_ptr->header.is_pinned);
+ assert(entry_ptr->header.is_pinned);
entry_ptr->pinned_from_client = TRUE;
entry_ptr->is_pinned = TRUE;
}
else if (unpin_flag_set) {
- HDassert(entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache);
+ assert(entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache);
entry_ptr->pinned_from_client = FALSE;
entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
}
}
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
if ((flags & H5C__DIRTIED_FLAG) != 0 && ((flags & H5C__DELETED_FLAG) == 0)) {
- HDassert(entry_ptr->header.is_dirty);
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->header.is_dirty);
+ assert(entry_ptr->is_dirty);
}
- HDassert(entry_ptr->header.is_protected == entry_ptr->is_protected);
- HDassert(entry_ptr->header.is_read_only == entry_ptr->is_read_only);
- HDassert(entry_ptr->header.ro_ref_count == entry_ptr->ro_ref_count);
+ assert(entry_ptr->header.is_protected == entry_ptr->is_protected);
+ assert(entry_ptr->header.is_read_only == entry_ptr->is_read_only);
+ assert(entry_ptr->header.ro_ref_count == entry_ptr->ro_ref_count);
}
} /* unprotect_entry() */
@@ -3521,12 +3519,12 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s(): entering.\n", __func__);
+ fprintf(stdout, "%s(): entering.\n", __func__);
if (pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag >= 10);
+ assert(cache_ptr != NULL);
+ assert(lag >= 10);
if (reset_stats)
H5C_stats__reset(cache_ptr);
@@ -3540,79 +3538,73 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t tmp_idx;
if (verbose)
- HDfprintf(stdout, "%d:%d: ", type, idx);
+ fprintf(stdout, "%d:%d: ", type, idx);
tmp_idx = idx + lag;
if (pass && do_inserts && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
((tmp_idx % 2) == 0) && !entry_in_cache(cache_ptr, type, tmp_idx)) {
if (verbose)
- HDfprintf(stdout, "1(i, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "1(i, %d, %d) ", type, tmp_idx);
insert_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 3) == 0) {
if (verbose)
- HDfprintf(stdout, "2(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "2(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 3) == 0) {
if (verbose)
- HDfprintf(stdout, "3(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "3(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
/* (don't decrement tmp_idx) */
if (pass && do_moves && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 3) == 0) {
if (verbose)
- HDfprintf(stdout, "4(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
+ fprintf(stdout, "4(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
move_entry(cache_ptr, type, tmp_idx, move_to_main_addr);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 5) == 0) {
if (verbose)
- HDfprintf(stdout, "5(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "5(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx -= 2;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 5) == 0) {
if (verbose)
- HDfprintf(stdout, "6(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "6(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
if (do_mult_ro_protects) {
@@ -3620,107 +3612,104 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 9) == 0) {
if (verbose)
- HDfprintf(stdout, "7(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "7(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 11) == 0) {
if (verbose)
- HDfprintf(stdout, "8(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "8(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 13) == 0) {
if (verbose)
- HDfprintf(stdout, "9(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "9(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
/* (don't decrement tmp_idx) */
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 9) == 0) {
if (verbose)
- HDfprintf(stdout, "10(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "10(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 11) == 0) {
if (verbose)
- HDfprintf(stdout, "11(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "11(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 13) == 0) {
if (verbose)
- HDfprintf(stdout, "12(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "12(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
} /* if ( do_mult_ro_protects ) */
if (pass && (idx >= 0) && (idx <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "13(p, %d, %d) ", type, idx);
+ fprintf(stdout, "13(p, %d, %d) ", type, idx);
protect_entry(file_ptr, type, idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx = idx - lag + 2;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 7) == 0) {
if (verbose)
- HDfprintf(stdout, "14(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "14(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 7) == 0) {
if (verbose)
- HDfprintf(stdout, "15(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "15(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
if (do_destroys) {
@@ -3729,71 +3718,71 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
switch (tmp_idx % 4) {
case 0: /* we just did an insert */
if (verbose)
- HDfprintf(stdout, "16(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "16(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
break;
case 1:
if ((entries[type])[tmp_idx].is_dirty) {
if (verbose)
- HDfprintf(stdout, "17(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "17(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
else {
if (verbose)
- HDfprintf(stdout, "18(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "18(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end else */
break;
case 2: /* we just did an insert */
if (verbose)
- HDfprintf(stdout, "19(u-del, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "19(u-del, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
break;
case 3:
if ((entries[type])[tmp_idx].is_dirty) {
if (verbose)
- HDfprintf(stdout, "20(u-del, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "20(u-del, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
else {
if (verbose)
- HDfprintf(stdout, "21(u-del, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "21(u-del, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx,
(dirty_destroys ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET) |
H5C__DELETED_FLAG);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end else */
break;
default:
- HDassert(0); /* this can't happen... */
+ assert(0); /* this can't happen... */
break;
} /* end switch */
} /* end if */
@@ -3802,18 +3791,18 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
tmp_idx = idx - lag;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "22(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "22(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
} /* end elseif */
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
idx++;
} /* end while */
@@ -3853,16 +3842,16 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s(): entering.\n", __func__);
+ fprintf(stdout, "%s(): entering.\n", __func__);
if (pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag > 5);
- HDassert(max_index >= 200);
- HDassert(max_index <= MAX_ENTRIES);
+ assert(cache_ptr != NULL);
+ assert(lag > 5);
+ assert(max_index >= 200);
+ assert(max_index <= MAX_ENTRIES);
if (reset_stats) {
@@ -3880,7 +3869,7 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
(((idx + lag) % 2) == 0) && (!entry_in_cache(cache_ptr, type, (idx + lag)))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
@@ -3891,12 +3880,12 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, i);
+ fprintf(stdout, "(p, %d, %d) ", type, i);
protect_entry(file_ptr, type, i);
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ fprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
@@ -3904,7 +3893,7 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
idx++;
}
@@ -3945,14 +3934,14 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s(): Entering.\n", __func__);
+ fprintf(stdout, "%s(): Entering.\n", __func__);
if (pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag >= 10);
+ assert(cache_ptr != NULL);
+ assert(lag >= 10);
if (reset_stats) {
@@ -3973,7 +3962,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
((tmp_idx % 2) == 1) && (!entry_in_cache(cache_ptr, type, tmp_idx))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(i, %d, %d) ", type, tmp_idx);
insert_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -3982,7 +3971,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 3) == 0)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
}
@@ -3991,7 +3980,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 3) == 0)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4001,7 +3990,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
((tmp_idx % 3) == 0)) {
if (verbose)
- HDfprintf(stdout, "(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
+ fprintf(stdout, "(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
move_entry(cache_ptr, type, tmp_idx, move_to_main_addr);
}
@@ -4010,7 +3999,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 5) == 0)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, (idx - lag + 3));
}
@@ -4019,7 +4008,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 5) == 0)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4029,7 +4018,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 9 == 0)) {
if (verbose)
- HDfprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
}
@@ -4038,7 +4027,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 11 == 0)) {
if (verbose)
- HDfprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
}
@@ -4047,7 +4036,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 13 == 0)) {
if (verbose)
- HDfprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
}
@@ -4056,7 +4045,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 9 == 0)) {
if (verbose)
- HDfprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4065,7 +4054,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 11 == 0)) {
if (verbose)
- HDfprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4074,7 +4063,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 13 == 0)) {
if (verbose)
- HDfprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4083,7 +4072,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (idx >= 0) && (idx <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, idx);
+ fprintf(stdout, "(p, %d, %d) ", type, idx);
protect_entry(file_ptr, type, idx);
}
@@ -4092,7 +4081,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 7) == 0)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4101,7 +4090,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 7) == 0)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
}
@@ -4146,7 +4135,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
break;
default:
- HDassert(0); /* this can't happen... */
+ assert(0); /* this can't happen... */
break;
}
}
@@ -4156,7 +4145,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && ((idx + lag) >= 0) && ((idx + lag) <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
unprotect_entry(file_ptr, type, idx + lag,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
@@ -4164,7 +4153,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
idx--;
}
@@ -4205,16 +4194,16 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s(): entering.\n", __func__);
+ fprintf(stdout, "%s(): entering.\n", __func__);
if (pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag > 5);
- HDassert(max_index >= 200);
- HDassert(max_index <= MAX_ENTRIES);
+ assert(cache_ptr != NULL);
+ assert(lag > 5);
+ assert(max_index >= 200);
+ assert(max_index <= MAX_ENTRIES);
if (reset_stats) {
@@ -4232,7 +4221,7 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
(((idx + lag) % 2) == 0) && (!entry_in_cache(cache_ptr, type, (idx + lag)))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
@@ -4243,12 +4232,12 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, i);
+ fprintf(stdout, "(p, %d, %d) ", type, i);
protect_entry(file_ptr, type, i);
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ fprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
@@ -4256,7 +4245,7 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
idx--;
}
@@ -4296,7 +4285,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t local_max_index[NUMBER_OF_ENTRY_TYPES];
if (verbose)
- HDfprintf(stdout, "%s: entering.\n", __func__);
+ fprintf(stdout, "%s: entering.\n", __func__);
if (pass) {
int i;
@@ -4306,7 +4295,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
for (i = 0; i < NUMBER_OF_ENTRY_TYPES; i++)
local_max_index[i] = MIN(max_index, max_indices[i]);
- HDassert(lag > 5);
+ assert(lag > 5);
if (reset_stats) {
@@ -4324,7 +4313,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
(((idx + lag) % 3) == 0) && (!entry_in_cache(cache_ptr, type, (idx + lag)))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
@@ -4332,7 +4321,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (idx >= 0) && (idx <= local_max_index[type])) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, idx);
+ fprintf(stdout, "(p, %d, %d) ", type, idx);
protect_entry(file_ptr, type, idx);
}
@@ -4340,14 +4329,14 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && ((idx - lag) >= 0) && ((idx - lag) <= local_max_index[type])) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
+ fprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
unprotect_entry(file_ptr, type, idx - lag,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
type++;
}
@@ -4390,16 +4379,16 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s: entering.\n", __func__);
+ fprintf(stdout, "%s: entering.\n", __func__);
if (pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag > 5);
- HDassert(max_index >= 500);
- HDassert(max_index <= MAX_ENTRIES);
+ assert(cache_ptr != NULL);
+ assert(lag > 5);
+ assert(max_index >= 500);
+ assert(max_index <= MAX_ENTRIES);
if (reset_stats) {
@@ -4424,7 +4413,7 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
(!entry_in_cache(cache_ptr, type, i))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, i);
+ fprintf(stdout, "(i, %d, %d) ", type, i);
insert_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
@@ -4432,7 +4421,7 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, i);
+ fprintf(stdout, "(p, %d, %d) ", type, i);
protect_entry(file_ptr, type, i);
}
@@ -4440,14 +4429,14 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ fprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
type++;
}
@@ -4492,19 +4481,19 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t local_max_index[NUMBER_OF_ENTRY_TYPES] = {0};
if (verbose)
- HDfprintf(stdout, "%s: entering.\n", __func__);
+ fprintf(stdout, "%s: entering.\n", __func__);
if (pass) {
int i;
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
for (i = 0; i < NUMBER_OF_ENTRY_TYPES; i++)
local_max_index[i] = MIN(max_index, max_indices[i]);
- HDassert(lag > 5);
+ assert(lag > 5);
if (reset_stats) {
@@ -4515,7 +4504,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
idx = local_max_index[NUMBER_OF_ENTRY_TYPES - 1] + lag;
if (verbose) /* 1 */
- HDfprintf(stdout, "%s: point %d.\n", __func__, mile_stone++);
+ fprintf(stdout, "%s: point %d.\n", __func__, mile_stone++);
while ((pass) && ((idx + lag) >= 0)) {
type = NUMBER_OF_ENTRY_TYPES - 1;
@@ -4525,7 +4514,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
(((idx - lag) % 3) == 0) && (!entry_in_cache(cache_ptr, type, (idx - lag)))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
+ fprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
insert_entry(file_ptr, type, (idx - lag), H5C__NO_FLAGS_SET);
}
@@ -4533,7 +4522,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (idx >= 0) && (idx <= local_max_index[type])) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, idx);
+ fprintf(stdout, "(p, %d, %d) ", type, idx);
protect_entry(file_ptr, type, idx);
}
@@ -4541,14 +4530,14 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && ((idx + lag) >= 0) && ((idx + lag) <= local_max_index[type])) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
unprotect_entry(file_ptr, type, idx + lag,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
type--;
}
@@ -4557,7 +4546,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
}
if (verbose) /* 2 */
- HDfprintf(stdout, "%s: point %d.\n", __func__, mile_stone++);
+ fprintf(stdout, "%s: point %d.\n", __func__, mile_stone++);
if ((pass) && (display_stats)) {
@@ -4565,7 +4554,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
}
if (verbose)
- HDfprintf(stdout, "%s: exiting.\n", __func__);
+ fprintf(stdout, "%s: exiting.\n", __func__);
} /* col_major_scan_backward() */
@@ -4597,16 +4586,16 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
int32_t local_max_index = -1;
if (verbose)
- HDfprintf(stdout, "%s: entering.\n", __func__);
+ fprintf(stdout, "%s: entering.\n", __func__);
if (pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag > 5);
- HDassert(max_index >= 500);
- HDassert(max_index <= MAX_ENTRIES);
+ assert(cache_ptr != NULL);
+ assert(lag > 5);
+ assert(max_index >= 500);
+ assert(max_index <= MAX_ENTRIES);
local_max_index = MIN(max_index, MAX_ENTRIES);
@@ -4631,7 +4620,7 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
(!entry_in_cache(cache_ptr, type, i))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, i);
+ fprintf(stdout, "(i, %d, %d) ", type, i);
insert_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
@@ -4639,7 +4628,7 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, i);
+ fprintf(stdout, "(p, %d, %d) ", type, i);
protect_entry(file_ptr, type, i);
}
@@ -4647,14 +4636,14 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ fprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
type++;
}
@@ -4690,10 +4679,10 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
void
create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int32_t chd_idx)
{
- HDassert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= par_idx) && (par_idx <= max_indices[par_type]));
- HDassert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type]));
+ assert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= par_idx) && (par_idx <= max_indices[par_type]));
+ assert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type]));
if (pass) {
test_entry_t *par_base_addr; /* Base entry of parent's entry array */
@@ -4709,19 +4698,19 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
par_is_pinned = par_entry_ptr->header.is_pinned;
/* Sanity check parent entry */
- HDassert(par_entry_ptr->index == par_idx);
- HDassert(par_entry_ptr->type == par_type);
- HDassert(par_entry_ptr->header.is_protected);
- HDassert(par_entry_ptr == par_entry_ptr->self);
+ assert(par_entry_ptr->index == par_idx);
+ assert(par_entry_ptr->type == par_type);
+ assert(par_entry_ptr->header.is_protected);
+ assert(par_entry_ptr == par_entry_ptr->self);
/* Get parent entry */
chd_base_addr = entries[chd_type];
chd_entry_ptr = &(chd_base_addr[chd_idx]);
/* Sanity check child entry */
- HDassert(chd_entry_ptr->index == chd_idx);
- HDassert(chd_entry_ptr->type == chd_type);
- HDassert(chd_entry_ptr == chd_entry_ptr->self);
+ assert(chd_entry_ptr->index == chd_idx);
+ assert(chd_entry_ptr->type == chd_type);
+ assert(chd_entry_ptr == chd_entry_ptr->self);
result = H5C_create_flush_dependency(par_entry_ptr, chd_entry_ptr);
@@ -4733,13 +4722,13 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
} /* end if */
/* Update information about entries */
- HDassert(chd_entry_ptr->flush_dep_npar < MAX_FLUSH_DEP_PARS);
+ assert(chd_entry_ptr->flush_dep_npar < MAX_FLUSH_DEP_PARS);
chd_entry_ptr->flush_dep_par_type[chd_entry_ptr->flush_dep_npar] = par_type;
chd_entry_ptr->flush_dep_par_idx[chd_entry_ptr->flush_dep_npar] = par_idx;
chd_entry_ptr->flush_dep_npar++;
par_entry_ptr->flush_dep_nchd++;
if (chd_entry_ptr->is_dirty || chd_entry_ptr->flush_dep_ndirty_chd > 0) {
- HDassert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
+ assert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
par_entry_ptr->flush_dep_ndirty_chd++;
} /* end if */
par_entry_ptr->pinned_from_cache = TRUE;
@@ -4766,10 +4755,10 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
void
destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int32_t chd_idx)
{
- HDassert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= par_idx) && (par_idx <= max_indices[par_type]));
- HDassert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type]));
+ assert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= par_idx) && (par_idx <= max_indices[par_type]));
+ assert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type]));
if (pass) {
test_entry_t *par_base_addr; /* Base entry of parent's entry array */
@@ -4783,20 +4772,20 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
par_entry_ptr = &(par_base_addr[par_idx]);
/* Sanity check parent entry */
- HDassert(par_entry_ptr->is_pinned);
- HDassert(par_entry_ptr->pinned_from_cache);
- HDassert(par_entry_ptr->flush_dep_nchd > 0);
- HDassert(par_entry_ptr == par_entry_ptr->self);
+ assert(par_entry_ptr->is_pinned);
+ assert(par_entry_ptr->pinned_from_cache);
+ assert(par_entry_ptr->flush_dep_nchd > 0);
+ assert(par_entry_ptr == par_entry_ptr->self);
/* Get parent entry */
chd_base_addr = entries[chd_type];
chd_entry_ptr = &(chd_base_addr[chd_idx]);
/* Sanity check child entry */
- HDassert(chd_entry_ptr->index == chd_idx);
- HDassert(chd_entry_ptr->type == chd_type);
- HDassert(chd_entry_ptr->flush_dep_npar > 0);
- HDassert(chd_entry_ptr == chd_entry_ptr->self);
+ assert(chd_entry_ptr->index == chd_idx);
+ assert(chd_entry_ptr->type == chd_type);
+ assert(chd_entry_ptr->flush_dep_npar > 0);
+ assert(chd_entry_ptr == chd_entry_ptr->self);
if (H5C_destroy_flush_dependency(par_entry_ptr, chd_entry_ptr) < 0) {
pass = FALSE;
@@ -4808,7 +4797,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
if (chd_entry_ptr->flush_dep_par_type[i] == par_type &&
chd_entry_ptr->flush_dep_par_idx[i] == par_idx)
break;
- HDassert(i < chd_entry_ptr->flush_dep_npar);
+ assert(i < chd_entry_ptr->flush_dep_npar);
if (i < chd_entry_ptr->flush_dep_npar - 1)
HDmemmove(&chd_entry_ptr->flush_dep_par_type[i], &chd_entry_ptr->flush_dep_par_type[i + 1],
(chd_entry_ptr->flush_dep_npar - i - 1) * sizeof(chd_entry_ptr->flush_dep_par_type[0]));
@@ -4822,7 +4811,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
par_entry_ptr->is_pinned = par_entry_ptr->pinned_from_client;
} /* end if */
if (chd_entry_ptr->is_dirty || chd_entry_ptr->flush_dep_ndirty_chd > 0) {
- HDassert(par_entry_ptr->flush_dep_ndirty_chd > 0);
+ assert(par_entry_ptr->flush_dep_ndirty_chd > 0);
par_entry_ptr->flush_dep_ndirty_chd--;
if (!par_entry_ptr->is_dirty && par_entry_ptr->flush_dep_ndirty_chd == 0)
mark_flush_dep_clean(par_entry_ptr);
@@ -4849,7 +4838,7 @@ static void
mark_flush_dep_dirty(test_entry_t *entry_ptr)
{
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
/* Iterate over the parent entries */
if (entry_ptr->flush_dep_npar) {
@@ -4863,7 +4852,7 @@ mark_flush_dep_dirty(test_entry_t *entry_ptr)
par_entry_ptr = &(par_base_addr[entry_ptr->flush_dep_par_idx[u]]);
/* Sanity check */
- HDassert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
+ assert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
/* Adjust the parent's number of dirty children */
par_entry_ptr->flush_dep_ndirty_chd++;
@@ -4890,8 +4879,8 @@ static void
mark_flush_dep_clean(test_entry_t *entry_ptr)
{
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(!entry_ptr->is_dirty && entry_ptr->flush_dep_ndirty_chd == 0);
+ assert(entry_ptr);
+ assert(!entry_ptr->is_dirty && entry_ptr->flush_dep_ndirty_chd == 0);
/* Iterate over the parent entries */
if (entry_ptr->flush_dep_npar) {
@@ -4905,7 +4894,7 @@ mark_flush_dep_clean(test_entry_t *entry_ptr)
par_entry_ptr = &(par_base_addr[entry_ptr->flush_dep_par_idx[u]]);
/* Sanity check */
- HDassert(par_entry_ptr->flush_dep_ndirty_chd > 0);
+ assert(par_entry_ptr->flush_dep_ndirty_chd > 0);
/* Adjust the parent's number of dirty children */
par_entry_ptr->flush_dep_ndirty_chd--;
@@ -5032,8 +5021,8 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
/* dump data to stdout if requested */
if ((pass) && (dump_data)) {
- HDfprintf(stdout, "cache_hits: %ld, cache_accesses: %ld, hit_rate: %lf\n", (long)cache_hits,
- (long)cache_accesses, hit_rate);
+ fprintf(stdout, "cache_hits: %ld, cache_accesses: %ld, hit_rate: %lf\n", (long)cache_hits,
+ (long)cache_accesses, hit_rate);
}
if ((pass) && (cache_accesses > min_accesses) && (hit_rate < min_hit_rate)) {
@@ -5159,8 +5148,8 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
/* dump data to stdout if requested */
if ((pass) && (dump_data)) {
- HDfprintf(stdout, "max_sz: %ld, min_clean_sz: %ld, cur_sz: %ld, cur_ent: %ld\n", (long)max_size,
- (long)min_clean_size, (long)cur_size, (long)cur_num_entries);
+ fprintf(stdout, "max_sz: %ld, min_clean_sz: %ld, cur_sz: %ld, cur_ent: %ld\n", (long)max_size,
+ (long)min_clean_size, (long)cur_size, (long)cur_num_entries);
}
} /* check_and_validate_cache_size() */
@@ -5351,27 +5340,27 @@ dump_LRU(H5F_t * file_ptr)
H5C_cache_entry_t * entry_ptr = NULL;
H5C_t *cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
entry_ptr = cache_ptr->LRU_head_ptr;
- HDfprintf(stdout,
+ fprintf(stdout,
"\n\nIndex len/size/clean size/dirty size = %u/%lld/%lld/%lld\n",
cache_ptr->index_len, (long long)(cache_ptr->index_size),
(long long)(cache_ptr->clean_index_size),
(long long)(cache_ptr->dirty_index_size));
- HDfprintf(stdout, "\nLRU len/size = %d/%lld.\n\n",
+ fprintf(stdout, "\nLRU len/size = %d/%lld.\n\n",
cache_ptr->LRU_list_len, (long long)(cache_ptr->LRU_list_size));
if ( entry_ptr != NULL )
{
- HDfprintf(stdout, "%s%s%s", hdr_0, hdr_1, hdr_2);
+ fprintf(stdout, "%s%s%s", hdr_0, hdr_1, hdr_2);
}
while ( entry_ptr != NULL )
{
- HDfprintf(stdout,
+ fprintf(stdout,
" %3d %d %10lld 0x%010llx %s(%d)\n",
i,
(int)(entry_ptr->is_dirty),
@@ -5385,7 +5374,7 @@ dump_LRU(H5F_t * file_ptr)
if ( cache_ptr->LRU_list_len > 0 )
{
- HDfprintf(stdout, "%s\n", hdr_2);
+ fprintf(stdout, "%s\n", hdr_2);
}
return;
diff --git a/test/cache_common.h b/test/cache_common.h
index bdeeded..c8c3d16 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -448,7 +448,7 @@ typedef struct test_entry_t {
if (entry_ptr != ((cache_ptr)->index)[k]) { \
if ((entry_ptr)->ht_next) \
(entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \
- HDassert((entry_ptr)->ht_prev != NULL); \
+ assert((entry_ptr)->ht_prev != NULL); \
(entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \
((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \
(entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
diff --git a/test/cache_image.c b/test/cache_image.c
index 8c996d5..1ab5008 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -110,11 +110,11 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
hsize_t chunk_size[2];
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- HDassert(0 <= min_dset);
- HDassert(min_dset <= max_dset);
- HDassert(max_dset < MAX_NUM_DSETS);
+ assert(0 <= min_dset);
+ assert(min_dset <= max_dset);
+ assert(max_dset < MAX_NUM_DSETS);
/* create the datasets */
@@ -191,7 +191,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* create the mem space to be used to read and write chunks */
if (pass) {
@@ -208,7 +208,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* select in memory hyperslab */
if (pass) {
@@ -227,7 +227,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* initialize all datasets on a round robin basis */
i = 0;
@@ -274,7 +274,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* read data from datasets and validate it */
i = 0;
@@ -323,11 +323,11 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (verbose) {
- HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
- data_chunk[k][l],
- ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l));
- HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k,
- l);
+ fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
+ data_chunk[k][l],
+ ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l));
+ fprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k,
+ l);
}
}
}
@@ -340,7 +340,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (verbose) {
- HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m);
+ fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m);
}
}
}
@@ -352,7 +352,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* close the file spaces */
i = min_dset;
@@ -421,20 +421,20 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
int i;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- HDassert(0 <= min_dset);
- HDassert(min_dset <= max_dset);
- HDassert(max_dset < MAX_NUM_DSETS);
+ assert(0 <= min_dset);
+ assert(min_dset <= max_dset);
+ assert(max_dset < MAX_NUM_DSETS);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* first, verify the contents of the target dataset(s) */
verify_datasets(file_id, min_dset, max_dset);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* now delete the target datasets */
if (pass) {
@@ -455,7 +455,7 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
} /* delete_datasets() */
@@ -536,12 +536,12 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
else if (verbose) {
- HDfprintf(stdout, "%s: HDF file name = \"%s\".\n", fcn_name, hdf_file_name);
+ fprintf(stdout, "%s: HDF file name = \"%s\".\n", fcn_name, hdf_file_name);
}
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* create a file access property list. */
if (pass) {
@@ -556,7 +556,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* call H5Pset_libver_bounds() on the fapl_id */
if (pass) {
@@ -569,7 +569,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* get metadata cache image config -- verify that it is the default */
if (pass) {
@@ -593,7 +593,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* set metadata cache image fapl entry if indicated */
if ((pass) && (set_mdci_fapl)) {
@@ -613,7 +613,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* setup the persistent free space manager if indicated */
if ((pass) && (config_fsm)) {
@@ -635,7 +635,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* set evict on close if indicated */
if ((pass) && (set_eoc)) {
@@ -648,7 +648,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* open the file */
if (pass) {
@@ -691,14 +691,14 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
failure_mssg = "Can't get file_ptr.";
if (verbose) {
- HDfprintf(stdout, "%s: Can't get file_ptr.\n", fcn_name);
+ fprintf(stdout, "%s: Can't get file_ptr.\n", fcn_name);
}
}
}
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* get a pointer to the files internal data structure and then
* to the cache structure
@@ -717,7 +717,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* verify expected metadata cache status */
@@ -736,7 +736,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
if (pass) {
@@ -779,7 +779,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
if ((pass) && (set_mdci_fapl)) {
@@ -793,7 +793,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
if (pass) {
@@ -833,7 +833,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
if (pass) {
@@ -843,7 +843,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d -- exiting.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d -- exiting.\n", fcn_name, cp++);
} /* open_hdf5_file() */
@@ -891,7 +891,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* call H5Pset_libver_bounds() on the fapl_id */
if (pass) {
@@ -904,7 +904,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* set metadata cache image fapl entry if indicated */
if ((pass) && (set_mdci_fapl)) {
@@ -924,7 +924,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* open the file */
if (pass) {
@@ -954,7 +954,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
} /* attempt_swmr_open_hdf5_file() */
@@ -1002,11 +1002,11 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
hsize_t offset[2];
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- HDassert(0 <= min_dset);
- HDassert(min_dset <= max_dset);
- HDassert(max_dset < MAX_NUM_DSETS);
+ assert(0 <= min_dset);
+ assert(min_dset <= max_dset);
+ assert(max_dset < MAX_NUM_DSETS);
/* open the datasets */
@@ -1045,7 +1045,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* create the mem space to be used to read and write chunks */
if (pass) {
@@ -1062,7 +1062,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* select in memory hyperslab */
if (pass) {
@@ -1081,7 +1081,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* read data from datasets and validate it */
i = 0;
@@ -1130,11 +1130,11 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (verbose) {
- HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
- data_chunk[k][l],
- ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l));
- HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k,
- l);
+ fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
+ data_chunk[k][l],
+ ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l));
+ fprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k,
+ l);
}
}
}
@@ -1147,7 +1147,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (verbose) {
- HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m);
+ fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m);
}
}
}
@@ -1159,7 +1159,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* close the file spaces */
i = min_dset;
@@ -1289,7 +1289,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -1302,7 +1302,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -1328,7 +1328,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create some datasets in the file. */
@@ -1338,7 +1338,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -1352,7 +1352,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file.
*
@@ -1378,7 +1378,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Open and close a dataset.
*
@@ -1399,7 +1399,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the file. */
@@ -1413,7 +1413,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Open the file.
*
@@ -1437,7 +1437,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the file. */
@@ -1451,7 +1451,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Delete the file */
@@ -1472,7 +1472,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -1566,7 +1566,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -1579,7 +1579,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -1605,7 +1605,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Close the file. */
@@ -1619,7 +1619,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Open the file.
*
@@ -1645,7 +1645,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Close the file. */
@@ -1659,7 +1659,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Open the file.
*
@@ -1683,7 +1683,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the file. */
@@ -1697,7 +1697,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Delete the file */
@@ -1718,7 +1718,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -1830,7 +1830,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress) /* 0 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -1843,7 +1843,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
*
@@ -1867,7 +1867,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Close the file. */
@@ -1881,7 +1881,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Open the file WITH the cache image FAPL entry.
*
@@ -1907,7 +1907,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Create some datasets. */
@@ -1917,7 +1917,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Close the file. */
@@ -1931,7 +1931,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Open the file READ ONLY.
*
@@ -1958,7 +1958,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Verify the contents of the datasets. */
@@ -1968,7 +1968,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the file. */
@@ -1982,7 +1982,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Open the file READ/WRITE.
*
@@ -2009,7 +2009,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Verify the contents of the datasets. */
@@ -2019,7 +2019,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Close the file. */
@@ -2033,7 +2033,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 12 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Open the file
*
@@ -2057,7 +2057,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 13 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Close the file. */
@@ -2071,7 +2071,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (show_progress) /* 14 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 14) Delete the file. */
@@ -2092,7 +2092,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -2196,7 +2196,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress) /* 0 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -2209,7 +2209,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file WITHOUT the cache image FAPL entry.
*
@@ -2233,7 +2233,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Close the file. */
@@ -2247,7 +2247,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Open the file WITH the cache image FAPL entry.
*
@@ -2273,7 +2273,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Close the file. */
@@ -2287,7 +2287,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Open the file READ ONLY.
*
@@ -2314,7 +2314,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the file. */
@@ -2328,7 +2328,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Open the file READ/WRITE.
*
@@ -2355,7 +2355,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the file. */
@@ -2369,7 +2369,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Open the file
*
@@ -2393,7 +2393,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Close the file. */
@@ -2407,7 +2407,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (show_progress) /* 11 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Delete the file. */
@@ -2428,7 +2428,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -2525,7 +2525,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress) /* 0 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -2538,7 +2538,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -2564,7 +2564,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create some datasets. */
@@ -2574,7 +2574,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -2588,7 +2588,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file WITH the cache image FAPL entry.
*
@@ -2621,7 +2621,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Verify the contents of the datasets. */
@@ -2631,7 +2631,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the file. */
@@ -2645,7 +2645,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Open the file.
*
@@ -2672,7 +2672,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 8 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Verify the contents of the datasets. */
@@ -2682,7 +2682,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 9 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Close the file. */
@@ -2696,7 +2696,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (show_progress) /* 10 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Delete the file. */
@@ -2717,7 +2717,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -2806,7 +2806,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress) /* 0 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -2819,7 +2819,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
}
if (show_progress) /* 1 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -2845,7 +2845,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
}
if (show_progress) /* 2 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Close the file. */
@@ -2859,7 +2859,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
}
if (show_progress) /* 3 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file WITH the cache image FAPL entry.
*
@@ -2892,7 +2892,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
}
if (show_progress) /* 4 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Close the file. */
@@ -2906,7 +2906,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
}
if (show_progress) /* 5 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Open the file.
*
@@ -2933,7 +2933,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
}
if (show_progress) /* 6 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the file. */
@@ -2947,7 +2947,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
}
if (show_progress) /* 7 */
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Delete the file. */
@@ -2968,7 +2968,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -3092,7 +3092,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -3105,7 +3105,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -3130,7 +3130,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create some datasets in the file. */
@@ -3151,7 +3151,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -3165,7 +3165,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file.
*
@@ -3191,7 +3191,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Open and close a dataset.
*
@@ -3216,7 +3216,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the file. */
@@ -3230,7 +3230,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Open the file.
*
@@ -3254,7 +3254,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Open and close a dataset.
*
@@ -3279,7 +3279,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Close the file. */
@@ -3293,7 +3293,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Open the file with the cache image FAPL entry.
*
@@ -3317,7 +3317,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Close the file. Since there has been no access to
* any entries that would be included in the cache image,
@@ -3334,7 +3334,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Open the file.
*
@@ -3358,7 +3358,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Open a dataset.
*
@@ -3382,7 +3382,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 14) Close the file. */
@@ -3396,7 +3396,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 15) Delete the file */
@@ -3417,7 +3417,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -3503,7 +3503,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -3516,7 +3516,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -3541,7 +3541,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create some datasets in the file. */
@@ -3562,7 +3562,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -3576,7 +3576,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file.
*
@@ -3606,7 +3606,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
*/
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Close the file. */
@@ -3620,7 +3620,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Open the file.
*
@@ -3644,7 +3644,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Open and close a dataset.
*
@@ -3658,7 +3658,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the file. */
@@ -3672,7 +3672,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Delete the file */
@@ -3693,7 +3693,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -3801,7 +3801,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -3814,7 +3814,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -3839,7 +3839,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create some datasets in the file. */
@@ -3860,7 +3860,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -3874,7 +3874,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file read only.
*
@@ -3898,7 +3898,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Open and close a dataset.
*
@@ -3923,7 +3923,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the file. */
@@ -3937,7 +3937,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Open the file.
*
@@ -3961,7 +3961,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Open and close a dataset.
*
@@ -3986,7 +3986,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Close the file. */
@@ -4021,7 +4021,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Open and close a dataset.
*
@@ -4046,7 +4046,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Close the file. */
@@ -4060,7 +4060,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Delete the file */
@@ -4081,7 +4081,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -4180,7 +4180,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -4193,7 +4193,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -4218,7 +4218,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create a dataset in the file. */
@@ -4239,7 +4239,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -4253,7 +4253,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
while ((pass) && (max_dset < MAX_NUM_DSETS)) {
@@ -4279,7 +4279,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp, max_dset, pass);
+ fprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp, max_dset, pass);
/* 5) Create a dataset in the file. */
@@ -4300,7 +4300,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 1, max_dset, pass);
+ fprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 1, max_dset, pass);
/* 6) Close the file. */
@@ -4314,7 +4314,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 2, max_dset, pass);
+ fprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 2, max_dset, pass);
} /* end while */
cp += 3;
@@ -4340,7 +4340,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Open and close all datasets.
*
@@ -4365,7 +4365,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Close the file. */
@@ -4400,7 +4400,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Open and close all datasets.
*
@@ -4425,7 +4425,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Close the file. */
@@ -4439,7 +4439,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Delete the file */
@@ -4460,7 +4460,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
} /* cache_image_smoke_check_4() */
@@ -4576,7 +4576,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -4593,7 +4593,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -4618,7 +4618,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create a process specific group. */
if (pass) {
@@ -4635,7 +4635,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Construct a "zoo" in the above group, and validate it. */
if (pass)
@@ -4653,7 +4653,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Close the file. */
@@ -4676,7 +4676,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
while ((pass) && (max_group < MAX_NUM_GROUPS)) {
@@ -4702,7 +4702,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s:L1 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp, max_group, pass);
+ fprintf(stdout, "%s:L1 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp, max_group, pass);
/* 6) Validate the "zoo" created in the previous file open. */
if (pass)
@@ -4720,8 +4720,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s:L2 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp + 1, max_group,
- pass);
+ fprintf(stdout, "%s:L2 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp + 1, max_group, pass);
/* 7) Create a process specific group for this file open */
if (pass) {
@@ -4739,16 +4738,14 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s:L3 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp + 2, max_group,
- pass);
+ fprintf(stdout, "%s:L3 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp + 2, max_group, pass);
/* 8) Construct a "zoo" in the above group, and validate it. */
if (pass)
create_zoo(file_id, process_group_name, max_group);
if (show_progress)
- HDfprintf(stdout, "%s:L4 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp + 3, max_group,
- pass);
+ fprintf(stdout, "%s:L4 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp + 3, max_group, pass);
/* 9) Close the file. */
@@ -4771,8 +4768,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s:L5 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp + 4, max_group,
- pass);
+ fprintf(stdout, "%s:L5 cp = %d, max_group = %d, pass = %d.\n", fcn_name, cp + 4, max_group, pass);
} /* end while */
cp += 5;
@@ -4796,7 +4792,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Validate all the zoos. */
i = min_group;
@@ -4815,7 +4811,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Close the file. */
if (pass) {
@@ -4847,7 +4843,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 14) Validate all the zoos. */
i = min_group;
@@ -4869,7 +4865,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 15) Close the file. */
@@ -4904,7 +4900,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 17) Validate all the zoos.
*
@@ -4929,7 +4925,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 18) Close the file. */
@@ -4943,7 +4939,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 19) Delete the file */
@@ -4964,7 +4960,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -5076,7 +5072,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -5089,7 +5085,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -5114,7 +5110,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create a dataset in the file. */
@@ -5135,7 +5131,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -5149,7 +5145,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
while ((pass) && (max_dset < MAX_NUM_DSETS)) {
@@ -5175,7 +5171,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp, max_dset, pass);
+ fprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp, max_dset, pass);
/* 5) Create a dataset in the file. */
@@ -5196,7 +5192,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 1, max_dset, pass);
+ fprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 1, max_dset, pass);
/* 6) Verify and delete the old dataset. */
if (pass) {
@@ -5205,7 +5201,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 2, max_dset, pass);
+ fprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 2, max_dset, pass);
/* 7) Close the file. */
@@ -5219,7 +5215,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s:L4 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 3, max_dset, pass);
+ fprintf(stdout, "%s:L4 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 3, max_dset, pass);
} /* end while */
cp += 4;
@@ -5245,7 +5241,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Verify the last dataset created. */
@@ -5266,7 +5262,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Close the file. */
@@ -5301,7 +5297,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Verify and delete the last dataset.
*
@@ -5336,7 +5332,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 14) Get the size of the file. Verify that it is less
* than 20 KB. Without deletions and persistent free
@@ -5361,7 +5357,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 15) Delete the file */
if (pass) {
@@ -5381,7 +5377,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -5468,7 +5464,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -5481,7 +5477,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file. */
@@ -5501,7 +5497,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create some datasets in the file. */
@@ -5522,7 +5518,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -5536,7 +5532,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file read only with a cache image FAPL entry requested. */
@@ -5556,7 +5552,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Open and close a dataset.
*
@@ -5582,7 +5578,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the file. */
@@ -5596,7 +5592,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Open the file read only. */
@@ -5616,7 +5612,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Open and close a dataset.
*
@@ -5642,7 +5638,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Close the file. */
@@ -5656,7 +5652,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Open the file read / write. */
@@ -5676,7 +5672,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Open and close a dataset.
*
@@ -5702,7 +5698,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Close the file. */
@@ -5716,7 +5712,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Delete the file */
@@ -5737,7 +5733,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -5836,7 +5832,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -5849,7 +5845,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with a cache image requested. */
@@ -5869,7 +5865,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create some datasets in the file. */
@@ -5890,7 +5886,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -5904,7 +5900,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file read only with a cache image FAPL entry requested. */
@@ -5924,7 +5920,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Open and close a dataset.
*
@@ -5950,7 +5946,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the file. */
@@ -5964,7 +5960,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Open the file read only. */
@@ -5984,7 +5980,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Open and close a dataset.
*
@@ -6010,7 +6006,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Close the file. */
@@ -6024,7 +6020,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Open the file read / write. */
@@ -6044,7 +6040,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Open and close a dataset.
*
@@ -6070,7 +6066,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Close the file. */
@@ -6084,7 +6080,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Open the file read / write. */
@@ -6104,7 +6100,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 14) Open and close a dataset.
*
@@ -6130,7 +6126,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 15) Close the file. */
@@ -6144,7 +6140,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Delete the file */
@@ -6165,7 +6161,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -6237,7 +6233,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -6250,7 +6246,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with a cache image requested. */
@@ -6270,7 +6266,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Try to start SWMR write -- should fail. */
@@ -6288,7 +6284,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Discard the file if necessary */
@@ -6308,7 +6304,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Attempt to create a HDF5 file with SWMR write
* access and cache image requested -- should fail.
@@ -6319,7 +6315,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
/* hdf_file_name */ filename);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Discard the file if necessary */
@@ -6332,7 +6328,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Create a HDF5 file with a cache image requested. */
@@ -6352,7 +6348,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Create some datasets in the file. */
@@ -6373,7 +6369,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the file. */
@@ -6387,7 +6383,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Attempt to open the file with SWMR write access -- should fail. */
@@ -6396,7 +6392,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
/* hdf_file_name */ filename);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Discard the file if necessary. */
@@ -6410,7 +6406,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
PASSED();
@@ -6420,7 +6416,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -6520,7 +6516,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -6533,7 +6529,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a FAPL requesting a cache image, but WITHOUT
* specifying the latest file format.
@@ -6550,7 +6546,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -6568,7 +6564,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create a HDF5 file using the above FAPL. */
@@ -6594,7 +6590,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* get a pointer to the files internal data structure and then
* to the cache structure
@@ -6613,7 +6609,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Create some datasets in the file. */
@@ -6625,7 +6621,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
#if H5C_COLLECT_CACHE_STATS
if (pass) {
- HDassert(cache_ptr);
+ assert(cache_ptr);
if (cache_ptr->images_loaded != 0) {
@@ -6636,7 +6632,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Close the file. */
@@ -6650,7 +6646,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Open the file read only. */
@@ -6670,7 +6666,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Verify that the datasets exist and contain the
* expected data
@@ -6693,7 +6689,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Close the file. */
@@ -6707,7 +6703,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Open the file R/W using the FAPL defined in 1) above.
*
@@ -6736,7 +6732,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* get a pointer to the files internal data structure and then
* to the cache structure
@@ -6755,7 +6751,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -6767,7 +6763,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Close the file. */
@@ -6781,7 +6777,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Open the file R/W using the FAPL defined in 1) above.
* Verify that the file does not contain a cache image.
@@ -6809,7 +6805,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* get a pointer to the files internal data structure and then
* to the cache structure
@@ -6828,7 +6824,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -6840,7 +6836,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Verify that the data sets contain the expected data
*
@@ -6864,7 +6860,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Create several more data sets. */
@@ -6874,7 +6870,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Close the file. */
@@ -6888,7 +6884,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 14) Open the file read write.
*
@@ -6911,7 +6907,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 15) Verify the data sets exist and contain the expected data.
*
@@ -6935,7 +6931,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 16) Close the file. */
@@ -6949,7 +6945,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 17) Delete the file */
@@ -6963,7 +6959,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* tidy up */
if (fapl_id != -1)
@@ -6977,7 +6973,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -7091,7 +7087,7 @@ get_free_sections_test(hbool_t single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -7104,7 +7100,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with a cache image requested
* and persistent free space managers enabled.
@@ -7126,7 +7122,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create some data sets, and then delete some of
* of those near the beginning of the file.
@@ -7138,7 +7134,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -7146,7 +7142,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -7154,7 +7150,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -7168,7 +7164,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file read only. */
@@ -7188,7 +7184,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Verify that a cache image exists, and has not been loaded. */
@@ -7202,7 +7198,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Verify that one or more self referential FSMs
* have been stored at the end of the file just
@@ -7224,7 +7220,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Call H5Fget_free_sections(). */
@@ -7238,7 +7234,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Verify that the cache image has been loaded and
* that the self referential FSMs have been floated.
@@ -7253,7 +7249,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Verify that the remaining data sets contain the expected data. */
@@ -7263,7 +7259,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Close the file. */
@@ -7277,7 +7273,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Open the file R/W. */
@@ -7297,7 +7293,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Verify that a cache image exists, and has not been loaded. */
@@ -7311,7 +7307,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Verify that one or more self referential FSMs
* have been stored at the end of the file just
@@ -7329,7 +7325,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 14) Call H5Fget_free_sections(). */
@@ -7343,7 +7339,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 15) Verify that the cache image has been loaded and
* that the self referential FSMs have been floated.
@@ -7358,7 +7354,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 16) Verify that the remaining data sets contain the expected data. */
@@ -7368,7 +7364,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 17) Delete the remaining data sets. */
@@ -7378,7 +7374,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 18) Close the file. */
@@ -7392,7 +7388,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 19) Verify that file space has been reclaimed. */
@@ -7411,7 +7407,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 20) Discard the file. */
@@ -7425,7 +7421,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
PASSED();
@@ -7435,7 +7431,7 @@ get_free_sections_test(hbool_t single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
@@ -7540,7 +7536,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -7553,7 +7549,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file without a cache image requested
* and persistent free space managers enabled.
@@ -7574,7 +7570,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create some data sets and verify them. */
@@ -7584,7 +7580,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -7592,7 +7588,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -7606,7 +7602,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file R/W, and with cache image requested. */
@@ -7626,7 +7622,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Verify the datasets created in 2) above. This will
* force their (clean) metadata into the metadata cache,
@@ -7639,7 +7635,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Create some more datasets and verify them */
@@ -7649,7 +7645,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -7658,15 +7654,15 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (verbose) {
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDfprintf(stdout, "index size / index dirty size = %lld / %lld\n", (long long)(cache_ptr->index_size),
- (long long)(cache_ptr->dirty_index_size));
+ fprintf(stdout, "index size / index dirty size = %lld / %lld\n", (long long)(cache_ptr->index_size),
+ (long long)(cache_ptr->dirty_index_size));
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Close the file. */
@@ -7680,7 +7676,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Open the file R/O and with evict on close enabled. */
@@ -7700,7 +7696,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s*: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s*: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Verify all datasets twice */
@@ -7710,7 +7706,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -7718,7 +7714,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Close the file. */
@@ -7732,7 +7728,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Open the file R/w and with evict on close enabled. */
@@ -7752,7 +7748,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s*: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s*: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Verify all datasets twice */
@@ -7762,7 +7758,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -7770,7 +7766,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Close the file. */
@@ -7784,7 +7780,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 14) Discard the file. */
@@ -7798,7 +7794,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
PASSED();
@@ -7808,7 +7804,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
}
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg);
return !pass;
#endif /* H5_HAVE_PARALLEL */
@@ -7846,10 +7842,10 @@ main(void)
express_test = GetTestExpress();
- HDprintf("=========================================\n");
- HDprintf("Cache image tests\n");
- HDprintf(" express_test = %d\n", express_test);
- HDprintf("=========================================\n");
+ printf("=========================================\n");
+ printf("Cache image tests\n");
+ printf(" express_test = %d\n", express_test);
+ printf("=========================================\n");
/* Check for VFD which stores data in multiple files */
single_file_vfd = !h5_driver_uses_multiple_files(env_h5_drvr, H5_EXCLUDE_NON_MULTIPART_DRIVERS);
diff --git a/test/cache_logging.c b/test/cache_logging.c
index 7092110..d8aa424 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -77,7 +77,7 @@ test_logging_api(void)
TEST_ERROR;
/* Check to make sure that the property list getter works */
- if (NULL == (location = (char *)HDcalloc(size, sizeof(char))))
+ if (NULL == (location = (char *)calloc(size, sizeof(char))))
TEST_ERROR;
if (H5Pget_mdc_log_options(fapl, &is_enabled_out, location, &size, &start_on_access_out) < 0)
TEST_ERROR;
@@ -109,7 +109,7 @@ test_logging_api(void)
/* Perform some manipulations */
for (i = 0; i < N_GROUPS; i++) {
- HDmemset(group_name, 0, sizeof(group_name));
+ memset(group_name, 0, sizeof(group_name));
HDsnprintf(group_name, sizeof(group_name), "%d", i);
if ((gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -127,7 +127,7 @@ test_logging_api(void)
TEST_ERROR;
/* Clean up */
- HDfree(location);
+ free(location);
if (H5Fclose(fid) < 0)
TEST_ERROR;
@@ -165,16 +165,16 @@ main(void)
/* Reset library */
h5_reset();
- HDprintf("Testing basic metadata cache logging functionality.\n");
+ printf("Testing basic metadata cache logging functionality.\n");
nerrors += test_logging_api();
if (nerrors) {
- HDprintf("***** %d Metadata cache logging TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
- HDexit(EXIT_FAILURE);
+ printf("***** %d Metadata cache logging TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ exit(EXIT_FAILURE);
}
- HDprintf("All Metadata Cache Logging tests passed.\n");
+ printf("All Metadata Cache Logging tests passed.\n");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 71260a8..af6ff58 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -1810,7 +1810,7 @@ check_attribute_rename_tags(hid_t fcpl, int type)
TEST_ERROR;
/* Allocate array */
- if ((NULL == (data = (int *)HDcalloc(DIMS * DIMS, sizeof(int)))))
+ if ((NULL == (data = (int *)calloc(DIMS * DIMS, sizeof(int)))))
TEST_ERROR;
/* Create Fapl */
@@ -1967,14 +1967,14 @@ check_attribute_rename_tags(hid_t fcpl, int type)
/* Finished Test. Print status and return. */
/* ========================================== */
- HDfree(data);
+ free(data);
PASSED();
return 0;
error:
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* check_attribute_rename_tags */
@@ -2023,7 +2023,7 @@ check_attribute_delete_tags(hid_t fcpl, int type)
TEST_ERROR;
/* Allocate array */
- if ((NULL == (data = (int *)HDcalloc(DIMS * DIMS, sizeof(int)))))
+ if ((NULL == (data = (int *)calloc(DIMS * DIMS, sizeof(int)))))
TEST_ERROR;
/* Create Fapl */
@@ -2159,14 +2159,14 @@ check_attribute_delete_tags(hid_t fcpl, int type)
/* Finished Test. Print status and return. */
/* ========================================== */
- HDfree(data);
+ free(data);
PASSED();
return 0;
error:
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* check_attribute_delete_tags */
@@ -2690,7 +2690,7 @@ check_dataset_write_tags(void)
/* ===== */
/* Allocate array */
- if ((NULL == (data = (int *)HDcalloc(DIMS * DIMS, sizeof(int)))))
+ if ((NULL == (data = (int *)calloc(DIMS * DIMS, sizeof(int)))))
TEST_ERROR;
/* Create Fapl */
@@ -2803,14 +2803,14 @@ check_dataset_write_tags(void)
/* Finished Test. Print status and return. */
/* ========================================== */
- HDfree(data);
+ free(data);
PASSED();
return 0;
error:
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* check_dataset_write_tags */
@@ -2854,7 +2854,7 @@ check_attribute_write_tags(hid_t fcpl, int type)
/* ===== */
/* Allocate array */
- if ((NULL == (data = (int *)HDcalloc(DIMS * DIMS, sizeof(int)))))
+ if ((NULL == (data = (int *)calloc(DIMS * DIMS, sizeof(int)))))
TEST_ERROR;
/* Create Fapl */
@@ -2990,14 +2990,14 @@ check_attribute_write_tags(hid_t fcpl, int type)
/* Finished Test. Print status and return. */
/* ========================================== */
- HDfree(data);
+ free(data);
PASSED();
return 0;
error:
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* check_attribute_write_tags */
@@ -3043,7 +3043,7 @@ check_dataset_read_tags(void)
/* ===== */
/* Allocate array */
- if ((NULL == (data = (int *)HDcalloc(DIMS * DIMS, sizeof(int)))))
+ if ((NULL == (data = (int *)calloc(DIMS * DIMS, sizeof(int)))))
TEST_ERROR;
/* Create Fapl */
@@ -3152,14 +3152,14 @@ check_dataset_read_tags(void)
/* Finished Test. Print status and return. */
/* ========================================== */
- HDfree(data);
+ free(data);
PASSED();
return 0;
error:
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* check_dataset_read_tags */
@@ -3206,7 +3206,7 @@ check_dataset_size_retrieval(void)
/* ===== */
/* Allocate array */
- if ((NULL == (data = (int *)HDcalloc(DIMS * DIMS, sizeof(int)))))
+ if ((NULL == (data = (int *)calloc(DIMS * DIMS, sizeof(int)))))
TEST_ERROR;
/* Create Fapl */
@@ -3315,14 +3315,14 @@ check_dataset_size_retrieval(void)
/* Finished Test. Print status and return. */
/* ========================================== */
- HDfree(data);
+ free(data);
PASSED();
return 0;
error:
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* check_dataset_size_retrieval */
@@ -3370,7 +3370,7 @@ check_dataset_extend_tags(void)
/* ===== */
/* Allocate array */
- if ((NULL == (data = (int *)HDcalloc(DIMS * DIMS, sizeof(int)))))
+ if ((NULL == (data = (int *)calloc(DIMS * DIMS, sizeof(int)))))
TEST_ERROR;
/* Create Fapl */
@@ -3479,14 +3479,14 @@ check_dataset_extend_tags(void)
/* Finished Test. Print status and return. */
/* ========================================== */
- HDfree(data);
+ free(data);
PASSED();
return 0;
error:
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* check_dataset_extend_tags */
@@ -3817,7 +3817,7 @@ check_link_removal_tags(hid_t fcpl, int type)
/* ===== */
/* Allocate array */
- if ((NULL == (data = (int *)HDcalloc(DIMS * DIMS, sizeof(int)))))
+ if ((NULL == (data = (int *)calloc(DIMS * DIMS, sizeof(int)))))
TEST_ERROR;
/* Create Fapl */
@@ -3950,14 +3950,14 @@ check_link_removal_tags(hid_t fcpl, int type)
/* Finished Test. Print status and return. */
/* ========================================== */
- HDfree(data);
+ free(data);
PASSED();
return 0;
error:
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* check_link_removal_tags */
@@ -4006,7 +4006,7 @@ check_link_getname_tags(void)
/* ===== */
/* Allocate array */
- if ((NULL == (data = (int *)HDcalloc(DIMS * DIMS, sizeof(int)))))
+ if ((NULL == (data = (int *)calloc(DIMS * DIMS, sizeof(int)))))
TEST_ERROR;
/* Create Fapl */
@@ -4129,14 +4129,14 @@ check_link_getname_tags(void)
/* Finished Test. Print status and return. */
/* ========================================== */
- HDfree(data);
+ free(data);
PASSED();
return 0;
error:
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* check_link_getname_tags */
@@ -4532,7 +4532,7 @@ check_invalid_tag_application(void)
PASSED();
#else
SKIPPED();
- HDprintf(" test skipped because sanity checking on tag value is disabled.\n");
+ printf(" test skipped because sanity checking on tag value is disabled.\n");
#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
return 0;
@@ -4575,7 +4575,7 @@ main(void)
/* Only run with sec2/default driver */
if (!h5_using_default_driver(NULL)) {
HDputs(" -- SKIPPED for incompatible VFD --");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* ========== */
@@ -4601,13 +4601,13 @@ main(void)
if (test_type == TEST_DEFAULT) {
if (!nerrs)
- HDprintf("Testing standard tag application cases w/ default fcpl:\n");
+ printf("Testing standard tag application cases w/ default fcpl:\n");
fcpl = fcpl_default;
}
else if (test_type == TEST_SHMESG) {
if (!nerrs)
- HDprintf("Testing standard tag application cases w/ shared messages:\n");
+ printf("Testing standard tag application cases w/ shared messages:\n");
fcpl = fcpl_shmesg_all;
}
else {
@@ -4638,7 +4638,7 @@ main(void)
} /* end for */
if (!nerrs)
- HDprintf("Testing other specific tag application cases:\n");
+ printf("Testing other specific tag application cases:\n");
if (!nerrs)
nerrs += check_group_creation_tags();
if (!nerrs)
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 77d2b8a..a2eab94 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -323,7 +323,7 @@ verify_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsiz
hsize_t ii, jj; /* Array indices */
int n;
- HDmemset(&read_buf, 0, sizeof(read_buf));
+ memset(&read_buf, 0, sizeof(read_buf));
/* Initialize the array of chunk data for all NUM_CHUNKS chunks, this is
the same as the written data and will be used to verify the read data */
@@ -345,10 +345,10 @@ verify_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsiz
TEST_ERROR;
/* Verify that read chunk is the same as the corresponding written one */
- if (HDmemcmp(expected_buf[chk_index], read_buf, CHUNK_NX * CHUNK_NY) != 0) {
- HDfprintf(stderr,
- "Read chunk differs from written chunk at offset (%" PRIuHSIZE ",%" PRIuHSIZE ")\n",
- offset[0], offset[1]);
+ if (memcmp(expected_buf[chk_index], read_buf, CHUNK_NX * CHUNK_NY) != 0) {
+ fprintf(stderr,
+ "Read chunk differs from written chunk at offset (%" PRIuHSIZE ",%" PRIuHSIZE ")\n",
+ offset[0], offset[1]);
return FAIL;
}
}
@@ -555,7 +555,7 @@ test_get_chunk_info_highest_v18(hid_t fapl)
#ifdef H5_HAVE_FILTER_DEFLATE
/* Allocate input (compressed) buffer */
- inbuf = HDcalloc(1, z_dst_nbytes);
+ inbuf = calloc(1, z_dst_nbytes);
/* zlib-friendly alias for the input buffer */
z_dst = (Bytef *)inbuf;
@@ -568,22 +568,22 @@ test_get_chunk_info_highest_v18(hid_t fapl)
/* Check for various zlib errors */
if (Z_BUF_ERROR == ret) {
- HDfprintf(stderr, "overflow");
+ fprintf(stderr, "overflow");
TEST_ERROR;
}
else if (Z_MEM_ERROR == ret) {
- HDfprintf(stderr, "deflate memory error");
+ fprintf(stderr, "deflate memory error");
TEST_ERROR;
}
else if (Z_OK != ret) {
- HDfprintf(stderr, "other deflate error");
+ fprintf(stderr, "other deflate error");
TEST_ERROR;
}
#else
/* Allocate input (non-compressed) buffer */
- if (NULL == (inbuf = HDcalloc(1, CHK_SIZE)))
+ if (NULL == (inbuf = calloc(1, CHK_SIZE)))
TEST_ERROR;
- HDmemcpy(inbuf, direct_buf, CHK_SIZE);
+ memcpy(inbuf, direct_buf, CHK_SIZE);
#endif /* end H5_HAVE_FILTER_DEFLATE */
/* Write only NUM_CHUNKS_WRITTEN chunks at the following logical coords:
@@ -600,7 +600,7 @@ test_get_chunk_info_highest_v18(hid_t fapl)
/* Free the input buffer */
if (inbuf)
- HDfree(inbuf);
+ free(inbuf);
if (H5Fflush(dset, H5F_SCOPE_LOCAL) < 0)
TEST_ERROR;
@@ -1923,7 +1923,7 @@ test_get_chunk_info_v110(hid_t fapl)
H5F_libver_t low, high; /* File format bounds */
TESTING("getting chunk information in file with versions 1.10 and later");
- HDprintf("\n"); /* to list sub-tests */
+ printf("\n"); /* to list sub-tests */
/* Set high bound to the current latest version */
high = H5F_LIBVER_LATEST;
@@ -2099,9 +2099,9 @@ test_flt_msk_with_skip_compress(hid_t fapl)
for (ii = 0; ii < CHUNK_NX; ii++)
for (jj = 0; jj < CHUNK_NY; jj++)
if (direct_buf[ii][jj] != check_chunk[ii][jj]) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", ii, jj);
- HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[ii][jj], check_chunk[ii][jj]);
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", ii, jj);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[ii][jj], check_chunk[ii][jj]);
TEST_ERROR;
}
@@ -2112,7 +2112,7 @@ test_flt_msk_with_skip_compress(hid_t fapl)
TEST_ERROR;
/* Read the raw chunk back with H5Dread_chunk */
- HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf));
+ memset(&read_direct_buf, 0, sizeof(read_direct_buf));
if (H5Dread_chunk(dset, H5P_DEFAULT, offset, &read_flt_msk, read_direct_buf) < 0)
TEST_ERROR;
if (read_flt_msk != flt_msk)
@@ -2122,10 +2122,10 @@ test_flt_msk_with_skip_compress(hid_t fapl)
for (ii = 0; ii < CHUNK_NX; ii++)
for (jj = 0; jj < CHUNK_NY; jj++)
if (direct_buf[ii][jj] != read_direct_buf[ii][jj]) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", ii, jj);
- HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[ii][jj],
- read_direct_buf[ii][jj]);
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", ii, jj);
+ printf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[ii][jj],
+ read_direct_buf[ii][jj]);
TEST_ERROR;
}
@@ -2221,7 +2221,7 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All chunk query tests passed.\n");
+ printf("All chunk query tests passed.\n");
h5_cleanup(FILENAME, fapl);
@@ -2229,7 +2229,7 @@ main(void)
error:
nerrors = MAX(1, nerrors);
- HDprintf("***** %d QUERY CHUNK INFO TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d QUERY CHUNK INFO TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return EXIT_FAILURE;
}
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 73d0459..9bb245f 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -182,17 +182,17 @@ test_compound(char *filename, hid_t fapl)
int ret_code;
/* Allocate buffers for datasets */
- if (NULL == (s1 = (s1_t *)HDmalloc(sizeof(s1_t) * NX * NY)))
+ if (NULL == (s1 = (s1_t *)malloc(sizeof(s1_t) * NX * NY)))
goto error;
- if (NULL == (s2 = (s2_t *)HDmalloc(sizeof(s2_t) * NX * NY)))
+ if (NULL == (s2 = (s2_t *)malloc(sizeof(s2_t) * NX * NY)))
goto error;
- if (NULL == (s3 = (s3_t *)HDmalloc(sizeof(s3_t) * NX * NY)))
+ if (NULL == (s3 = (s3_t *)malloc(sizeof(s3_t) * NX * NY)))
goto error;
- if (NULL == (s4 = (s4_t *)HDmalloc(sizeof(s4_t) * NX * NY)))
+ if (NULL == (s4 = (s4_t *)malloc(sizeof(s4_t) * NX * NY)))
goto error;
- if (NULL == (s5 = (s5_t *)HDmalloc(sizeof(s5_t) * NX * NY)))
+ if (NULL == (s5 = (s5_t *)malloc(sizeof(s5_t) * NX * NY)))
goto error;
- if (NULL == (s6 = (s6_t *)HDmalloc(sizeof(s6_t) * NX * NY)))
+ if (NULL == (s6 = (s6_t *)malloc(sizeof(s6_t) * NX * NY)))
goto error;
/* Create the file */
@@ -209,17 +209,17 @@ test_compound(char *filename, hid_t fapl)
if ((PRESERVE = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
if ((ret_code = H5Pget_preserve(PRESERVE)) != 0) {
- HDprintf("Preserve status of dataset transfer property list should be"
- " 0 (FALSE), got %d\n",
- ret_code);
+ printf("Preserve status of dataset transfer property list should be"
+ " 0 (FALSE), got %d\n",
+ ret_code);
goto error;
}
if (H5Pset_preserve(PRESERVE, 1) < 0)
goto error;
if ((ret_code = H5Pget_preserve(PRESERVE)) != 1) {
- HDprintf("Preserve status of dataset transfer property list should be"
- " 1 (TRUE), got %d\n",
- ret_code);
+ printf("Preserve status of dataset transfer property list should be"
+ " 1 (TRUE), got %d\n",
+ ret_code);
goto error;
}
@@ -520,11 +520,11 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != 8 * i + 3 || s1[i].c[2] != 8 * i + 4 || s1[i].c[3] != 8 * i + 5 ||
s1[i].d != 8 * i + 6 || s1[i].e != 8 * i + 7) {
H5_FAILED();
- HDprintf(" i==%u, row=%u, col=%u\n", i, i / NY, i % NY);
- HDprintf(" got: {%7d,%7d,[%7d,%7d,%7d,%7d],%7d,%7d}\n", s1[i].a, s1[i].b, s1[i].c[0],
- s1[i].c[1], s1[i].c[2], s1[i].c[3], s1[i].d, s1[i].e);
- HDprintf(" ans: {%7d,%7d,[%7d,%7d,%7d,%7d],%7d,%7d}\n", 8 * i + 0, 8 * i + 1, 8 * i + 2,
- 8 * i + 3, 8 * i + 4, 8 * i + 5, 8 * i + 6, 8 * i + 7);
+ printf(" i==%u, row=%u, col=%u\n", i, i / NY, i % NY);
+ printf(" got: {%7d,%7d,[%7d,%7d,%7d,%7d],%7d,%7d}\n", s1[i].a, s1[i].b, s1[i].c[0], s1[i].c[1],
+ s1[i].c[2], s1[i].c[3], s1[i].d, s1[i].e);
+ printf(" ans: {%7d,%7d,[%7d,%7d,%7d,%7d],%7d,%7d}\n", 8 * i + 0, 8 * i + 1, 8 * i + 2,
+ 8 * i + 3, 8 * i + 4, 8 * i + 5, 8 * i + 6, 8 * i + 7);
goto error;
}
}
@@ -581,8 +581,8 @@ test_compound(char *filename, hid_t fapl)
goto error;
/* Read the dataset */
- s8 = (s1_t *)HDcalloc((size_t)(h_size[0] * h_size[1]), sizeof(s1_t));
- HDassert(s8);
+ s8 = (s1_t *)calloc((size_t)(h_size[0] * h_size[1]), sizeof(s1_t));
+ assert(s8);
if (H5Dread(dataset, s1_tid, s8_m_sid, s8_f_sid, H5P_DEFAULT, s8) < 0) {
goto error;
}
@@ -602,7 +602,7 @@ test_compound(char *filename, hid_t fapl)
}
}
- HDfree(s8);
+ free(s8);
s8 = NULL;
PASSED();
@@ -714,8 +714,8 @@ test_compound(char *filename, hid_t fapl)
f_offset[1] = NY / 3;
h_size[0] = 2 * NX / 3 - f_offset[0];
h_size[1] = 2 * NY / 3 - f_offset[1];
- s11 = (s4_t *)HDmalloc((size_t)h_size[0] * (size_t)h_size[1] * sizeof(s4_t));
- HDassert(s11);
+ s11 = (s4_t *)malloc((size_t)h_size[0] * (size_t)h_size[1] * sizeof(s4_t));
+ assert(s11);
/* Initialize */
for (i = 0; i < h_size[0] * h_size[1]; i++) {
@@ -726,7 +726,7 @@ test_compound(char *filename, hid_t fapl)
if (H5Dwrite(dataset, s4_tid, s8_m_sid, s8_f_sid, PRESERVE, s11) < 0) {
goto error;
}
- HDfree(s11);
+ free(s11);
s11 = NULL;
/* Read the whole thing */
@@ -773,12 +773,12 @@ test_compound(char *filename, hid_t fapl)
H5Fclose(file);
/* Release buffers */
- HDfree(s1);
- HDfree(s2);
- HDfree(s3);
- HDfree(s4);
- HDfree(s5);
- HDfree(s6);
+ free(s1);
+ free(s2);
+ free(s3);
+ free(s4);
+ free(s5);
+ free(s6);
PASSED();
return 0;
@@ -788,17 +788,17 @@ error:
/* Release resources */
if (s1)
- HDfree(s1);
+ free(s1);
if (s2)
- HDfree(s2);
+ free(s2);
if (s3)
- HDfree(s3);
+ free(s3);
if (s4)
- HDfree(s4);
+ free(s4);
if (s5)
- HDfree(s5);
+ free(s5);
if (s6)
- HDfree(s6);
+ free(s6);
return 1;
}
@@ -1220,8 +1220,8 @@ compare_data(void *src_data, void *dst_data, hbool_t src_subset)
!H5_DBL_ABS_EQUAL(s_ptr->n, d_ptr->n)) {
H5_FAILED();
- HDprintf(" i=%d\n", i);
- HDprintf(
+ printf(" i=%d\n", i);
+ printf(
" src={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, "
"h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f}\n",
s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2], s_ptr->c[3], s_ptr->c[4],
@@ -1231,7 +1231,7 @@ compare_data(void *src_data, void *dst_data, hbool_t src_subset)
(double)s_ptr->h[8], (double)s_ptr->h[9], (double)s_ptr->h[10], (double)s_ptr->h[11],
(double)s_ptr->h[12], (double)s_ptr->h[13], (double)s_ptr->h[14], (double)s_ptr->h[15],
(double)s_ptr->i, (double)s_ptr->j, s_ptr->k, s_ptr->l, s_ptr->m, s_ptr->n);
- HDprintf(
+ printf(
" dst={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, "
"h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f}\n",
d_ptr->a, d_ptr->b, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2], d_ptr->c[3], d_ptr->c[4],
@@ -1306,12 +1306,12 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
goto error;
/* Allocate space and initialize data */
- orig = (unsigned char *)HDmalloc(NX * NY * sizeof(stype1));
+ orig = (unsigned char *)malloc(NX * NY * sizeof(stype1));
initialize_stype1(orig, (size_t)NX * NY);
- rbuf = (unsigned char *)HDmalloc(NX * NY * sizeof(stype2));
+ rbuf = (unsigned char *)malloc(NX * NY * sizeof(stype2));
- rew_buf = (unsigned char *)HDmalloc(NX * NY * sizeof(stype3));
+ rew_buf = (unsigned char *)malloc(NX * NY * sizeof(stype3));
initialize_stype3(rew_buf, (size_t)NX * NY);
/* Create dataset creation property list */
@@ -1440,17 +1440,17 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR;
- HDfree(orig);
- HDfree(rbuf);
- HDfree(rew_buf);
+ free(orig);
+ free(rbuf);
+ free(rew_buf);
PASSED();
return 0;
error:
- HDfree(orig);
- HDfree(rbuf);
- HDfree(rew_buf);
+ free(orig);
+ free(rbuf);
+ free(rew_buf);
HDputs("*** DATASET TESTS FAILED ***");
return 1;
@@ -1512,12 +1512,12 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
goto error;
/* Allocate space and initialize data */
- orig = (unsigned char *)HDmalloc(NX * NY * sizeof(stype2));
+ orig = (unsigned char *)malloc(NX * NY * sizeof(stype2));
initialize_stype2(orig, (size_t)NX * NY);
- rbuf = (unsigned char *)HDmalloc(NX * NY * sizeof(stype1));
+ rbuf = (unsigned char *)malloc(NX * NY * sizeof(stype1));
- rew_buf = (unsigned char *)HDmalloc(NX * NY * sizeof(stype4));
+ rew_buf = (unsigned char *)malloc(NX * NY * sizeof(stype4));
initialize_stype4(rew_buf, (size_t)NX * NY);
/* Create dataset creation property list */
@@ -1646,9 +1646,9 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if (H5Fclose(file) < 0)
goto error;
- HDfree(orig);
- HDfree(rbuf);
- HDfree(rew_buf);
+ free(orig);
+ free(rbuf);
+ free(rew_buf);
PASSED();
return 0;
@@ -1665,11 +1665,11 @@ error:
int _i; \
H5_FAILED(); \
AT(); \
- HDprintf(" Insertion order ="); \
+ printf(" Insertion order ="); \
for (_i = 0; _i < PACK_NMEMBS; _i++) \
- HDprintf(" %d", order[_i]); \
- HDprintf("\n Inner compound order = %d, location = %d\n", sub_cmpd_order, order[sub_cmpd_order]); \
- HDfflush(stdout); \
+ printf(" %d", order[_i]); \
+ printf("\n Inner compound order = %d, location = %d\n", sub_cmpd_order, order[sub_cmpd_order]); \
+ fflush(stdout); \
goto error; \
}
@@ -2216,8 +2216,8 @@ main(int argc, char *argv[])
/* Turn off optimized compound converter? */
if (argc > 1) {
if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) {
- HDfprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
+ exit(EXIT_FAILURE);
}
H5Tunregister(H5T_PERS_DONTCARE, NULL, (hid_t)-1, (hid_t)-1,
(H5T_conv_t)((void (*)(void))H5T__conv_struct_opt));
@@ -2249,8 +2249,8 @@ main(int argc, char *argv[])
nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0);
if (nerrors) {
- HDprintf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
}
h5_cleanup(FILENAME, fapl_id);
diff --git a/test/cmpd_dtransform.c b/test/cmpd_dtransform.c
index 6e38ec9..9487531 100644
--- a/test/cmpd_dtransform.c
+++ b/test/cmpd_dtransform.c
@@ -47,7 +47,7 @@ main(void)
att_t *atts_res = NULL;
/* Compound datatype */
- if (NULL == (atts = HDmalloc(sizeof(att_t))))
+ if (NULL == (atts = malloc(sizeof(att_t))))
TEST_ERROR;
HDstrcpy(atts[0].name, "Name");
HDstrcpy(atts[0].unit, "Unit");
@@ -92,13 +92,13 @@ main(void)
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
FAIL_STACK_ERROR;
if (H5Pset_data_transform(dxpl_id, expr) < 0) {
- HDprintf("**** ERROR: H5Pset_data_transform (expression: %s) ****\n", expr);
+ printf("**** ERROR: H5Pset_data_transform (expression: %s) ****\n", expr);
FAIL_STACK_ERROR;
}
- if (NULL == (data = HDmalloc(LENGTH * sizeof(int))))
+ if (NULL == (data = malloc(LENGTH * sizeof(int))))
TEST_ERROR;
- if (NULL == (data_res = HDmalloc(LENGTH * sizeof(int))))
+ if (NULL == (data_res = malloc(LENGTH * sizeof(int))))
TEST_ERROR;
for (unsigned i = 0; i < LENGTH; i++) {
data[i] = 10;
@@ -110,7 +110,7 @@ main(void)
FAIL_STACK_ERROR;
/* Read attribute */
- if (NULL == (atts_res = HDmalloc(sizeof(att_t))))
+ if (NULL == (atts_res = malloc(sizeof(att_t))))
TEST_ERROR;
if (H5Aread(att_attr_id, att_dtyp_id, atts_res) < 0)
FAIL_STACK_ERROR;
@@ -130,10 +130,10 @@ main(void)
if (data[idx] != data_res[idx])
TEST_ERROR;
- HDfree(atts);
- HDfree(atts_res);
- HDfree(data);
- HDfree(data_res);
+ free(atts);
+ free(atts_res);
+ free(data);
+ free(data_res);
/* Close all identifiers. */
if (H5Pclose(dxpl_id) < 0)
@@ -170,13 +170,13 @@ error:
H5E_END_TRY
if (atts)
- HDfree(atts);
+ free(atts);
if (atts_res)
- HDfree(atts_res);
+ free(atts_res);
if (data)
- HDfree(data);
+ free(data);
if (data_res)
- HDfree(data_res);
+ free(data_res);
return 1;
}
diff --git a/test/cork.c b/test/cork.c
index ad10fa2..e5138cf 100644
--- a/test/cork.c
+++ b/test/cork.c
@@ -141,9 +141,9 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Set up data array */
- if (NULL == (buf_data = (int *)HDcalloc(100 * 20, sizeof(int))))
+ if (NULL == (buf_data = (int *)calloc(100 * 20, sizeof(int))))
TEST_ERROR;
- if (NULL == (buf = (int **)HDcalloc(100, sizeof(buf_data))))
+ if (NULL == (buf = (int **)calloc(100, sizeof(buf_data))))
TEST_ERROR;
for (i = 0; i < 100; i++)
buf[i] = buf_data + (i * 20);
@@ -255,8 +255,8 @@ verify_old_dset_cork(void)
if (H5Fclose(fid) < 0)
TEST_ERROR;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
PASSED();
return 0;
@@ -277,8 +277,8 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
return 1;
} /* verify_old_dset_cork */
@@ -653,9 +653,9 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Set up data array */
- if (NULL == (buf_data = (int *)HDcalloc(100 * 20, sizeof(int))))
+ if (NULL == (buf_data = (int *)calloc(100 * 20, sizeof(int))))
TEST_ERROR;
- if (NULL == (buf = (int **)HDcalloc(100, sizeof(buf_data))))
+ if (NULL == (buf = (int **)calloc(100, sizeof(buf_data))))
TEST_ERROR;
for (i = 0; i < 100; i++)
buf[i] = buf_data + (i * 20);
@@ -719,8 +719,8 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
if (H5Fclose(fid) < 0)
TEST_ERROR;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
PASSED();
return 0;
@@ -740,8 +740,8 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
return 1;
} /* verify_dset_cork */
@@ -2001,9 +2001,9 @@ test_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Set up data array */
- if (NULL == (wbuf_data = (int *)HDcalloc(DIMS0 * DIMS1, sizeof(int))))
+ if (NULL == (wbuf_data = (int *)calloc(DIMS0 * DIMS1, sizeof(int))))
TEST_ERROR;
- if (NULL == (wbuf = (int **)HDcalloc(DIMS0, sizeof(wbuf_data))))
+ if (NULL == (wbuf = (int **)calloc(DIMS0, sizeof(wbuf_data))))
TEST_ERROR;
for (i = 0; i < DIMS0; i++)
wbuf[i] = wbuf_data + (i * DIMS1);
@@ -2048,7 +2048,7 @@ test_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Set up data array */
- if (NULL == (rbuf_data = (int *)HDcalloc(DIMS0 * DIMS1, sizeof(int))))
+ if (NULL == (rbuf_data = (int *)calloc(DIMS0 * DIMS1, sizeof(int))))
TEST_ERROR;
/* Read from the dataset */
@@ -2195,9 +2195,9 @@ test_dset_cork(hbool_t swmr, hbool_t new_format)
if (H5Pclose(dcpl) < 0)
TEST_ERROR;
- HDfree(wbuf);
- HDfree(wbuf_data);
- HDfree(rbuf_data);
+ free(wbuf);
+ free(wbuf_data);
+ free(rbuf_data);
PASSED();
return 0;
@@ -2217,9 +2217,9 @@ error:
}
H5E_END_TRY;
- HDfree(wbuf);
- HDfree(wbuf_data);
- HDfree(rbuf_data);
+ free(wbuf);
+ free(wbuf_data);
+ free(rbuf_data);
return 1;
diff --git a/test/cross_read.c b/test/cross_read.c
index c1073cb..05ff7ca 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -90,7 +90,7 @@ check_data_i(const char *dsetname, hid_t fid)
for (i = 0; i < NY; i++)
data_in[NX][i] = -2;
/* Output */
- HDmemset(data_out, 0, (NX + 1) * NY * sizeof(long long));
+ memset(data_out, 0, (NX + 1) * NY * sizeof(long long));
/* Read data from hyperslab in the file into the hyperslab in
* memory and display.
@@ -104,8 +104,8 @@ check_data_i(const char *dsetname, hid_t fid)
if (data_out[i][j] != data_in[i][j])
if (!nerrors++) {
H5_FAILED();
- HDprintf("element [%d][%d] is %lld but should have been %lld\n", (int)i, (int)j,
- data_out[i][j], data_in[i][j]);
+ printf("element [%d][%d] is %lld but should have been %lld\n", (int)i, (int)j,
+ data_out[i][j], data_in[i][j]);
} /* end if */
/* Close/release resources. */
@@ -114,7 +114,7 @@ check_data_i(const char *dsetname, hid_t fid)
/* Failure */
if (nerrors) {
- HDprintf("total of %d errors out of %d elements\n", nerrors, (int)(NX * NY));
+ printf("total of %d errors out of %d elements\n", nerrors, (int)(NX * NY));
return 1;
} /* end if */
@@ -164,7 +164,7 @@ check_data_f(const char *dsetname, hid_t fid)
for (i = 0; i < NY; i++)
data_in[NX][i] = -2.2;
/* Output */
- HDmemset(data_out, 0, (NX + 1) * NY * sizeof(double));
+ memset(data_out, 0, (NX + 1) * NY * sizeof(double));
/* Read data from hyperslab in the file into the hyperslab in
* memory and display.
@@ -178,8 +178,8 @@ check_data_f(const char *dsetname, hid_t fid)
if (!H5_DBL_REL_EQUAL(data_out[i][j], data_in[i][j], 0.001))
if (!nerrors++) {
H5_FAILED();
- HDprintf("element [%d][%d] is %g but should have been %g\n", (int)i, (int)j,
- data_out[i][j], data_in[i][j]);
+ printf("element [%d][%d] is %g but should have been %g\n", (int)i, (int)j, data_out[i][j],
+ data_in[i][j]);
} /* end if */
/* Close/release resources. */
@@ -188,7 +188,7 @@ check_data_f(const char *dsetname, hid_t fid)
/* Failure */
if (nerrors) {
- HDprintf("total of %d errors out of %d elements\n", nerrors, (int)(NX * NY));
+ printf("total of %d errors out of %d elements\n", nerrors, (int)(NX * NY));
return 1;
} /* end if */
@@ -364,11 +364,11 @@ main(void)
*/
if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0) {
HDputs(" -- couldn't check if VFD is compatible with default VFD --");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
if (!driver_is_default_compatible) {
HDputs(" -- SKIPPED for incompatible VFD --");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
HDputs("\n");
@@ -382,10 +382,10 @@ main(void)
nerrors += check_file(filename);
if (nerrors) {
- HDprintf("***** %d FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
return EXIT_FAILURE;
} /* end if */
- HDprintf("All data type tests passed.\n");
+ printf("All data type tests passed.\n");
return EXIT_SUCCESS;
} /* end main() */
diff --git a/test/dangle.c b/test/dangle.c
index 36984b8..d0b0295 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -598,7 +598,7 @@ test_dangle_force(void)
TEST_ERROR;
/* Allocate the array of object IDs */
- if (NULL == (objs = (hid_t *)HDcalloc((size_t)count, sizeof(hid_t))))
+ if (NULL == (objs = (hid_t *)calloc((size_t)count, sizeof(hid_t))))
TEST_ERROR;
/* Get the list of open IDs */
@@ -620,14 +620,14 @@ test_dangle_force(void)
HDremove(filename);
/* Release object ID array */
- HDfree(objs);
+ free(objs);
PASSED();
return 0;
error:
if (objs)
- HDfree(objs);
+ free(objs);
return 1;
}
diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c
index 806c25f..8a1243a 100644
--- a/test/del_many_dense_attrs.c
+++ b/test/del_many_dense_attrs.c
@@ -37,7 +37,7 @@ const char *FILENAME[] = {"del_many_dense_attrs", NULL};
static void
catch_signal(int H5_ATTR_UNUSED signo)
{
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* catch_signal() */
/*-------------------------------------------------------------------------
diff --git a/test/direct_chunk.c b/test/direct_chunk.c
index d6f094e..95ff9df 100644
--- a/test/direct_chunk.c
+++ b/test/direct_chunk.c
@@ -204,7 +204,7 @@ test_direct_chunk_write(hid_t file)
direct_buf[i][j] = n++;
/* Allocate output (compressed) buffer */
- outbuf = HDmalloc(z_dst_nbytes);
+ outbuf = malloc(z_dst_nbytes);
z_dst = (Bytef *)outbuf;
/* Perform compression from the source to the destination buffer */
@@ -212,15 +212,15 @@ test_direct_chunk_write(hid_t file)
/* Check for various zlib errors */
if (Z_BUF_ERROR == ret) {
- HDfprintf(stderr, "overflow");
+ fprintf(stderr, "overflow");
goto error;
}
else if (Z_MEM_ERROR == ret) {
- HDfprintf(stderr, "deflate memory error");
+ fprintf(stderr, "deflate memory error");
goto error;
}
else if (Z_OK != ret) {
- HDfprintf(stderr, "other deflate error");
+ fprintf(stderr, "other deflate error");
goto error;
}
@@ -236,7 +236,7 @@ test_direct_chunk_write(hid_t file)
}
if (outbuf)
- HDfree(outbuf);
+ free(outbuf);
if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
goto error;
@@ -269,9 +269,9 @@ test_direct_chunk_write(hid_t file)
for (i = 0; i < CHUNK_NX; i++) {
for (j = 0; j < CHUNK_NY; j++) {
if (direct_buf[i][j] != check_chunk[i][j]) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
goto error;
}
}
@@ -283,7 +283,7 @@ test_direct_chunk_write(hid_t file)
direct_buf[i][j] = i + j;
/* Allocate output (compressed) buffer */
- outbuf = HDmalloc(z_dst_nbytes);
+ outbuf = malloc(z_dst_nbytes);
z_dst = (Bytef *)outbuf;
/* Perform compression from the source to the destination buffer */
@@ -291,15 +291,15 @@ test_direct_chunk_write(hid_t file)
/* Check for various zlib errors */
if (Z_BUF_ERROR == ret) {
- HDfprintf(stderr, "overflow");
+ fprintf(stderr, "overflow");
goto error;
}
else if (Z_MEM_ERROR == ret) {
- HDfprintf(stderr, "deflate memory error");
+ fprintf(stderr, "deflate memory error");
goto error;
}
else if (Z_OK != ret) {
- HDfprintf(stderr, "other deflate error");
+ fprintf(stderr, "other deflate error");
goto error;
}
@@ -316,7 +316,7 @@ test_direct_chunk_write(hid_t file)
}
if (outbuf)
- HDfree(outbuf);
+ free(outbuf);
if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
goto error;
@@ -335,9 +335,9 @@ test_direct_chunk_write(hid_t file)
for (i = 0; i < CHUNK_NX; i++) {
for (j = 0; j < CHUNK_NY; j++) {
if (direct_buf[i][j] != check_chunk[i][j]) {
- HDprintf(" 2. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
+ printf(" 2. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
goto error;
}
}
@@ -367,7 +367,7 @@ error:
H5E_END_TRY;
if (outbuf)
- HDfree(outbuf);
+ free(outbuf);
H5_FAILED();
return 1;
@@ -605,9 +605,9 @@ test_skip_compress_write1(hid_t file)
for (i = 0; i < CHUNK_NX; i++) {
for (j = 0; j < CHUNK_NY; j++) {
if (direct_buf[i][j] != check_chunk[i][j]) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
goto error;
}
}
@@ -620,7 +620,7 @@ test_skip_compress_write1(hid_t file)
goto error;
/* Read the raw chunk back */
- HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf));
+ memset(&read_direct_buf, 0, sizeof(read_direct_buf));
if ((status = H5Dread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0)
goto error;
if (read_filter_mask != filter_mask)
@@ -630,9 +630,9 @@ test_skip_compress_write1(hid_t file)
for (i = 0; i < CHUNK_NX; i++) {
for (j = 0; j < CHUNK_NY; j++) {
if (direct_buf[i][j] != read_direct_buf[i][j]) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]);
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]);
goto error;
}
}
@@ -880,10 +880,10 @@ test_skip_compress_write2(hid_t file)
for (i = 0; i < CHUNK_NX; i++) {
for (j = 0; j < CHUNK_NY; j++) {
if (origin_direct_buf[i][j] != check_chunk[i][j]) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" origin_direct_buf=%d, check_chunk=%d\n", origin_direct_buf[i][j],
- check_chunk[i][j]);
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" origin_direct_buf=%d, check_chunk=%d\n", origin_direct_buf[i][j],
+ check_chunk[i][j]);
goto error;
}
}
@@ -896,7 +896,7 @@ test_skip_compress_write2(hid_t file)
goto error;
/* Read the raw chunk back */
- HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf));
+ memset(&read_direct_buf, 0, sizeof(read_direct_buf));
if ((status = H5Dread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0)
goto error;
if (read_filter_mask != filter_mask)
@@ -906,9 +906,9 @@ test_skip_compress_write2(hid_t file)
for (i = 0; i < CHUNK_NX; i++) {
for (j = 0; j < CHUNK_NY; j++) {
if (direct_buf[i][j] != read_direct_buf[i][j]) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]);
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]);
goto error;
}
}
@@ -1088,16 +1088,16 @@ test_data_conv(hid_t file)
(direct_buf[i][j]).c[3] != (read_chunk[i][j]).c[3] ||
(direct_buf[i][j]).d != (read_chunk[i][j]).d ||
(direct_buf[i][j]).e != (read_chunk[i][j]).e) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (direct_buf[i][j]).a,
- (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
- (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d,
- (direct_buf[i][j]).e);
- HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (read_chunk[i][j]).a,
- (read_chunk[i][j]).b, (read_chunk[i][j]).c[0], (read_chunk[i][j]).c[1],
- (read_chunk[i][j]).c[2], (read_chunk[i][j]).c[3], (read_chunk[i][j]).d,
- (read_chunk[i][j]).e);
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (direct_buf[i][j]).a,
+ (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
+ (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d,
+ (direct_buf[i][j]).e);
+ printf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (read_chunk[i][j]).a,
+ (read_chunk[i][j]).b, (read_chunk[i][j]).c[0], (read_chunk[i][j]).c[1],
+ (read_chunk[i][j]).c[2], (read_chunk[i][j]).c[3], (read_chunk[i][j]).d,
+ (read_chunk[i][j]).e);
goto error;
}
@@ -1131,15 +1131,15 @@ test_data_conv(hid_t file)
(direct_buf[i][j]).c[2] != (check_chunk[i][j]).c[2] ||
(direct_buf[i][j]).c[3] != (check_chunk[i][j]).c[3] ||
(direct_buf[i][j]).e != (check_chunk[i][j]).e) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (direct_buf[i][j]).a,
- (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
- (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d,
- (direct_buf[i][j]).e);
- HDprintf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n", (check_chunk[i][j]).a,
- (check_chunk[i][j]).c[0], (check_chunk[i][j]).c[1], (check_chunk[i][j]).c[2],
- (check_chunk[i][j]).c[3], (check_chunk[i][j]).e);
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (direct_buf[i][j]).a,
+ (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
+ (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d,
+ (direct_buf[i][j]).e);
+ printf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n", (check_chunk[i][j]).a,
+ (check_chunk[i][j]).c[0], (check_chunk[i][j]).c[1], (check_chunk[i][j]).c[2],
+ (check_chunk[i][j]).c[3], (check_chunk[i][j]).e);
goto error;
}
@@ -1510,7 +1510,7 @@ test_direct_chunk_read_no_cache(hid_t file)
goto error;
/* Allocate output (compressed) buffer */
- outbuf = HDmalloc(z_src_nbytes);
+ outbuf = malloc(z_src_nbytes);
z_src = (Bytef *)outbuf;
/* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */
@@ -1550,19 +1550,19 @@ test_direct_chunk_read_no_cache(hid_t file)
/* Check for various zlib errors */
if (Z_BUF_ERROR == ret) {
- HDfprintf(stderr, "overflow\n");
+ fprintf(stderr, "overflow\n");
goto error;
}
else if (Z_MEM_ERROR == ret) {
- HDfprintf(stderr, "deflate memory error\n");
+ fprintf(stderr, "deflate memory error\n");
goto error;
}
else if (Z_DATA_ERROR == ret) {
- HDfprintf(stderr, "corrupted data\n");
+ fprintf(stderr, "corrupted data\n");
goto error;
}
else if (Z_OK != ret) {
- HDfprintf(stderr, "other deflate error\n");
+ fprintf(stderr, "other deflate error\n");
goto error;
}
@@ -1570,9 +1570,9 @@ test_direct_chunk_read_no_cache(hid_t file)
for (k = 0; k < CHUNK_NX; k++) {
for (l = 0; l < CHUNK_NY; l++) {
if (direct_buf[k][l] != check_chunk[k][l]) {
- HDprintf("\n 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", k, l);
- HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
+ printf("\n 1. Read different values than written.");
+ printf(" At index %d,%d\n", k, l);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
goto error;
}
}
@@ -1589,7 +1589,7 @@ test_direct_chunk_read_no_cache(hid_t file)
H5Pclose(dapl);
if (outbuf)
- HDfree(outbuf);
+ free(outbuf);
PASSED();
return 0;
@@ -1607,7 +1607,7 @@ error:
H5E_END_TRY;
if (outbuf)
- HDfree(outbuf);
+ free(outbuf);
H5_FAILED();
return 1;
@@ -1694,7 +1694,7 @@ test_direct_chunk_read_cache(hid_t file, hbool_t flush)
}
/* Allocate output (compressed) buffer */
- outbuf = HDmalloc(z_src_nbytes);
+ outbuf = malloc(z_src_nbytes);
z_src = (Bytef *)outbuf;
/* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */
@@ -1741,19 +1741,19 @@ test_direct_chunk_read_cache(hid_t file, hbool_t flush)
/* Check for various zlib errors */
if (Z_BUF_ERROR == ret) {
- HDfprintf(stderr, "overflow\n");
+ fprintf(stderr, "overflow\n");
goto error;
}
else if (Z_MEM_ERROR == ret) {
- HDfprintf(stderr, "deflate memory error\n");
+ fprintf(stderr, "deflate memory error\n");
goto error;
}
else if (Z_DATA_ERROR == ret) {
- HDfprintf(stderr, "corrupted data\n");
+ fprintf(stderr, "corrupted data\n");
goto error;
}
else if (Z_OK != ret) {
- HDfprintf(stderr, "other deflate error\n");
+ fprintf(stderr, "other deflate error\n");
goto error;
}
@@ -1761,9 +1761,9 @@ test_direct_chunk_read_cache(hid_t file, hbool_t flush)
for (k = 0; k < CHUNK_NX; k++) {
for (l = 0; l < CHUNK_NY; l++) {
if (direct_buf[k][l] != check_chunk[k][l]) {
- HDprintf("\n 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", k, l);
- HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
+ printf("\n 1. Read different values than written.");
+ printf(" At index %d,%d\n", k, l);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
goto error;
}
}
@@ -1779,7 +1779,7 @@ test_direct_chunk_read_cache(hid_t file, hbool_t flush)
H5Pclose(dxpl);
if (outbuf)
- HDfree(outbuf);
+ free(outbuf);
PASSED();
return 0;
@@ -1796,7 +1796,7 @@ error:
H5E_END_TRY;
if (outbuf)
- HDfree(outbuf);
+ free(outbuf);
H5_FAILED();
return 1;
@@ -1910,7 +1910,7 @@ test_read_unfiltered_dset(hid_t file)
offset[0] = (hsize_t)i * CHUNK_NX;
offset[1] = (hsize_t)j * CHUNK_NY;
/* Read the raw chunk back */
- HDmemset(&direct_buf, 0, sizeof(direct_buf));
+ memset(&direct_buf, 0, sizeof(direct_buf));
filter_mask = UINT_MAX;
if ((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) < 0)
goto error;
@@ -1923,9 +1923,9 @@ test_read_unfiltered_dset(hid_t file)
for (k = 0; k < CHUNK_NX; k++) {
for (l = 0; l < CHUNK_NY; l++) {
if (direct_buf[k][l] != check_chunk[k][l]) {
- HDprintf("\n 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", k, l);
- HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
+ printf("\n 1. Read different values than written.");
+ printf(" At index %d,%d\n", k, l);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
goto error;
}
}
@@ -2014,7 +2014,7 @@ test_read_unallocated_chunk(hid_t file)
FAIL_STACK_ERROR;
/* Write a single chunk to initialize the chunk storage */
- HDmemset(direct_buf, 0, CHUNK_NX * CHUNK_NY * sizeof(int));
+ memset(direct_buf, 0, CHUNK_NX * CHUNK_NY * sizeof(int));
offset[0] = 0;
offset[1] = 0;
@@ -2299,41 +2299,41 @@ main(void)
continue;
/* Print configuration */
- HDprintf("Configuration: ");
+ printf("Configuration: ");
if (config == 0)
- HDprintf("<empty>");
+ printf("<empty>");
if (config & CONFIG_LATEST) {
if (need_comma)
- HDprintf(", ");
- HDprintf("latest format");
+ printf(", ");
+ printf("latest format");
need_comma = TRUE;
} /* end if */
if (config & CONFIG_REOPEN_FILE) {
if (need_comma)
- HDprintf(", ");
- HDprintf("reopen file");
+ printf(", ");
+ printf("reopen file");
need_comma = TRUE;
} /* end if */
else if (config & CONFIG_REOPEN_DSET) {
if (need_comma)
- HDprintf(", ");
- HDprintf("reopen dataset");
+ printf(", ");
+ printf("reopen dataset");
need_comma = TRUE;
} /* end if */
if (config & CONFIG_DIRECT_WRITE) {
if (need_comma)
- HDprintf(", ");
- HDprintf("direct write");
+ printf(", ");
+ printf("direct write");
need_comma = TRUE;
} /* end if */
if (config & CONFIG_DIRECT_READ) {
if (need_comma)
- HDprintf(", ");
- HDprintf("direct read");
+ printf(", ");
+ printf("direct read");
need_comma = TRUE;
} /* end if */
- HDprintf(":\n");
- HDfflush(stdout);
+ printf(":\n");
+ fflush(stdout);
nerrors += test_single_chunk(config);
} /* end for */
diff --git a/test/dsets.c b/test/dsets.c
index fc3de08..801eb6a 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -380,13 +380,13 @@ test_create(hid_t file)
dims[0] = 256;
dims[1] = 512;
space = H5Screate_simple(2, dims, NULL);
- HDassert(space >= 0);
+ assert(space >= 0);
/* Create a small data space for compact dataset */
small_dims[0] = 16;
small_dims[1] = 8;
small_space = H5Screate_simple(2, small_dims, NULL);
- HDassert(space >= 0);
+ assert(space >= 0);
/*
* Create a dataset using the default dataset creation properties. We're
@@ -455,13 +455,13 @@ test_create(hid_t file)
* layout.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- HDassert(create_parms >= 0);
+ assert(create_parms >= 0);
/* Attempt to create a dataset with invalid chunk sizes */
csize[0] = dims[0] * 2;
csize[1] = dims[1] * 2;
status = H5Pset_chunk(create_parms, 2, csize);
- HDassert(status >= 0);
+ assert(status >= 0);
H5E_BEGIN_TRY
{
dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms,
@@ -477,7 +477,7 @@ test_create(hid_t file)
csize[0] = 5;
csize[1] = 100;
status = H5Pset_chunk(create_parms, 2, csize);
- HDassert(status >= 0);
+ assert(status >= 0);
dataset =
H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms, H5P_DEFAULT);
@@ -499,11 +499,11 @@ test_create(hid_t file)
* Create a compact dataset, then close it.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- HDassert(create_parms >= 0);
+ assert(create_parms >= 0);
status = H5Pset_layout(create_parms, H5D_COMPACT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY);
- HDassert(status >= 0);
+ assert(status >= 0);
dataset = H5Dcreate2(file, DSET_COMPACT_NAME, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT, create_parms,
H5P_DEFAULT);
@@ -552,9 +552,9 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
/* Set up data array */
- if (NULL == (rdata_bytes = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ if (NULL == (rdata_bytes = (int *)calloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
TEST_ERROR;
- if (NULL == (rdata = (int **)HDcalloc(DSET_DIM1, sizeof(rdata_bytes))))
+ if (NULL == (rdata = (int **)calloc(DSET_DIM1, sizeof(rdata_bytes))))
TEST_ERROR;
for (i = 0; i < DSET_DIM1; i++)
rdata[i] = rdata_bytes + (i * DSET_DIM2);
@@ -574,9 +574,9 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
goto error;
/* Create a small conversion buffer to test strip mining */
- tconv_buf = HDmalloc((size_t)1000);
+ tconv_buf = malloc((size_t)1000);
xfer = H5Pcreate(H5P_DATASET_XFER);
- HDassert(xfer >= 0);
+ assert(xfer >= 0);
if (H5Pset_buffer(xfer, (size_t)1000, tconv_buf, NULL) < 0)
goto error;
@@ -611,8 +611,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
for (j = 0; j < DSET_DIM2; j++) {
if (points[i][j] != check[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
}
}
@@ -638,8 +638,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
for (j = 0; j < DSET_DIM2; j++) {
if (points[i][j] != rdata[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
}
}
@@ -648,9 +648,9 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
HDclose(f);
f = -1;
- HDfree(tconv_buf);
- HDfree(rdata_bytes);
- HDfree(rdata);
+ free(tconv_buf);
+ free(rdata_bytes);
+ free(rdata);
PASSED();
} /* end if */
@@ -677,9 +677,9 @@ error:
if (f > 0)
HDclose(f);
- HDfree(tconv_buf);
- HDfree(rdata_bytes);
- HDfree(rdata);
+ free(tconv_buf);
+ free(rdata_bytes);
+ free(rdata);
return FAIL;
} /* end test_simple_io() */
@@ -713,9 +713,9 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
/* Set up data array */
- if (NULL == (rdata_bytes = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ if (NULL == (rdata_bytes = (int *)calloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
TEST_ERROR;
- if (NULL == (rdata = (int **)HDcalloc(DSET_DIM1, sizeof(rdata_bytes))))
+ if (NULL == (rdata = (int **)calloc(DSET_DIM1, sizeof(rdata_bytes))))
TEST_ERROR;
for (i = 0; i < DSET_DIM1; i++)
rdata[i] = rdata_bytes + (i * DSET_DIM2);
@@ -775,8 +775,8 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
for (j = 0; j < DSET_DIM2; j++) {
if (points[i][j] != rdata[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
}
}
@@ -785,8 +785,8 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
HDclose(f);
f = -1;
- HDfree(rdata_bytes);
- HDfree(rdata);
+ free(rdata_bytes);
+ free(rdata);
PASSED();
} /* end if */
@@ -813,8 +813,8 @@ error:
if (f > 0)
HDclose(f);
- HDfree(rdata_bytes);
- HDfree(rdata);
+ free(rdata_bytes);
+ free(rdata);
return FAIL;
} /* end test_userblock_offset() */
@@ -913,10 +913,10 @@ test_compact_io(hid_t fapl)
for (j = 0; j < 8; j++)
if (rbuf[i][j] != wbuf[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
- HDprintf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
+ printf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
+ printf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
goto error;
} /* end */
@@ -979,10 +979,10 @@ test_compact_io(hid_t fapl)
for (j = 0; j < 8; j++)
if (rbuf[i][j] != wbuf[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
- HDprintf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
+ printf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
+ printf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
goto error;
} /* end */
@@ -1075,9 +1075,9 @@ test_max_compact(hid_t fapl)
/* Initialize data */
compact_size = (SIXTY_FOUR_KB - 64) / sizeof(int);
- if (NULL == (wbuf = (int *)HDmalloc(sizeof(int) * compact_size)))
+ if (NULL == (wbuf = (int *)malloc(sizeof(int) * compact_size)))
TEST_ERROR;
- if (NULL == (rbuf = (int *)HDmalloc(sizeof(int) * compact_size)))
+ if (NULL == (rbuf = (int *)malloc(sizeof(int) * compact_size)))
TEST_ERROR;
n = 0;
@@ -1132,8 +1132,8 @@ test_max_compact(hid_t fapl)
for (u = 0; u < compact_size; u++)
if (rbuf[u] != wbuf[u]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %u\n", (unsigned)u);
+ printf(" Read different values than written.\n");
+ printf(" At index %u\n", (unsigned)u);
goto error;
} /* end if */
@@ -1141,9 +1141,9 @@ test_max_compact(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR;
- HDfree(wbuf);
+ free(wbuf);
wbuf = NULL;
- HDfree(rbuf);
+ free(rbuf);
rbuf = NULL;
/* Test compact dataset of size 64KB */
@@ -1184,9 +1184,9 @@ test_max_compact(hid_t fapl)
error:
if (wbuf)
- HDfree(wbuf);
+ free(wbuf);
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
H5E_BEGIN_TRY
{
@@ -1389,7 +1389,7 @@ test_conv_buffer(hid_t fid)
TESTING("data type conversion buffer size");
- if ((cf = (CmpField *)HDcalloc((size_t)1, sizeof(CmpField))) == 0)
+ if ((cf = (CmpField *)calloc((size_t)1, sizeof(CmpField))) == 0)
goto error;
/* Populate the data members */
@@ -1454,7 +1454,7 @@ test_conv_buffer(hid_t fid)
goto error;
/* Read should succeed since library will set conversion buffer big enough */
- if ((cfrR = (CmpFieldR *)HDcalloc((size_t)1, sizeof(CmpFieldR))) == 0)
+ if ((cfrR = (CmpFieldR *)calloc((size_t)1, sizeof(CmpFieldR))) == 0)
goto error;
if (H5Dread(dataset, ctype2, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfrR) < 0)
goto error;
@@ -1505,14 +1505,14 @@ test_conv_buffer(hid_t fid)
if (H5Dclose(dataset) < 0)
goto error;
- HDfree(cf);
- HDfree(cfrR);
+ free(cf);
+ free(cfrR);
HDputs(" PASSED");
return SUCCEED;
error:
- HDfree(cfrR);
- HDfree(cf);
+ free(cfrR);
+ free(cf);
H5E_BEGIN_TRY
{
@@ -1549,9 +1549,9 @@ test_tconv(hid_t file)
hid_t space = -1, dataset = -1;
int i;
- if ((out = (char *)HDmalloc((size_t)(4 * 1000 * 1000))) == NULL)
+ if ((out = (char *)malloc((size_t)(4 * 1000 * 1000))) == NULL)
goto error;
- if ((in = (char *)HDmalloc((size_t)(4 * 1000 * 1000))) == NULL)
+ if ((in = (char *)malloc((size_t)(4 * 1000 * 1000))) == NULL)
goto error;
TESTING("data type conversion");
@@ -1596,17 +1596,17 @@ test_tconv(hid_t file)
goto error;
if (H5Sclose(space) < 0)
goto error;
- HDfree(out);
- HDfree(in);
+ free(out);
+ free(in);
HDputs(" PASSED");
return SUCCEED;
error:
if (out)
- HDfree(out);
+ free(out);
if (in)
- HDfree(in);
+ free(in);
H5E_BEGIN_TRY
{
@@ -1822,13 +1822,13 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_valu
if (offset > nbytes || (offset + length) > nbytes || length < sizeof(unsigned int))
TEST_ERROR;
- if (NULL == (data = HDmalloc((size_t)length)))
+ if (NULL == (data = malloc((size_t)length)))
TEST_ERROR;
- HDmemset(data, (int)value, (size_t)length);
+ memset(data, (int)value, (size_t)length);
if (flags & H5Z_FLAG_REVERSE) { /* Verify data is actually corrupted during read */
dst += offset;
- if (HDmemcmp(data, dst, (size_t)length) != 0)
+ if (memcmp(data, dst, (size_t)length) != 0)
TEST_ERROR;
else {
*buf_size = nbytes;
@@ -1837,14 +1837,14 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_valu
} /* end if */
else { /* Write corrupted data */
dst += offset;
- HDmemcpy(dst, data, (size_t)length);
+ memcpy(dst, data, (size_t)length);
*buf_size = nbytes;
ret_value = *buf_size;
} /* end else */
error:
if (data)
- HDfree(data);
+ free(data);
return ret_value;
} /* end filter_corrupt() */
@@ -1922,7 +1922,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
*/
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
- tconv_buf = HDmalloc((size_t)1000);
+ tconv_buf = malloc((size_t)1000);
if (H5Pset_buffer(dxpl, (size_t)1000, tconv_buf, NULL) < 0)
goto error;
if ((write_dxpl = H5Pcopy(dxpl)) < 0)
@@ -1940,7 +1940,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Check if all the filters are available */
if (H5Pall_filters_avail(dcpl) != TRUE) {
H5_FAILED();
- HDprintf(" Line %d: Incorrect filter availability\n", __LINE__);
+ printf(" Line %d: Incorrect filter availability\n", __LINE__);
goto error;
} /* end if */
@@ -1963,8 +1963,8 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (j = 0; j < (size_t)size[1]; j++) {
if (0 != check[i][j]) {
H5_FAILED();
- HDprintf(" Read a non-zero value.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read a non-zero value.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -2037,10 +2037,10 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (j = 0; j < size[1]; j++) {
if (points[i][j] != check[i][j]) {
H5_FAILED();
- HDfprintf(stderr, " Read different values than written.\n");
- HDfprintf(stderr, " At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- HDfprintf(stderr, " At original: %d\n", (int)points[i][j]);
- HDfprintf(stderr, " At returned: %d\n", (int)check[i][j]);
+ fprintf(stderr, " Read different values than written.\n");
+ fprintf(stderr, " At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ fprintf(stderr, " At original: %d\n", (int)points[i][j]);
+ fprintf(stderr, " At returned: %d\n", (int)check[i][j]);
goto error;
}
}
@@ -2105,8 +2105,8 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (j = 0; j < size[1]; j++) {
if (points[i][j] != check[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -2169,8 +2169,8 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (j = 0; j < size[1]; j++)
if (points[i][j] != check[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
} /* end if */
} /* end else */
@@ -2236,13 +2236,13 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
if (points[(size_t)hs_offset[0] + i][(size_t)hs_offset[1] + j] !=
check[(size_t)hs_offset[0] + i][(size_t)hs_offset[1] + j]) {
H5_FAILED();
- HDfprintf(stderr, " Read different values than written.\n");
- HDfprintf(stderr, " At index %lu,%lu\n", (unsigned long)((size_t)hs_offset[0] + i),
- (unsigned long)((size_t)hs_offset[1] + j));
- HDfprintf(stderr, " At original: %d\n",
- (int)points[(size_t)hs_offset[0] + i][(size_t)hs_offset[1] + j]);
- HDfprintf(stderr, " At returned: %d\n",
- (int)check[(size_t)hs_offset[0] + i][(size_t)hs_offset[1] + j]);
+ fprintf(stderr, " Read different values than written.\n");
+ fprintf(stderr, " At index %lu,%lu\n", (unsigned long)((size_t)hs_offset[0] + i),
+ (unsigned long)((size_t)hs_offset[1] + j));
+ fprintf(stderr, " At original: %d\n",
+ (int)points[(size_t)hs_offset[0] + i][(size_t)hs_offset[1] + j]);
+ fprintf(stderr, " At returned: %d\n",
+ (int)check[(size_t)hs_offset[0] + i][(size_t)hs_offset[1] + j]);
goto error;
}
}
@@ -2264,13 +2264,13 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
goto error;
if (H5Pclose(write_dxpl) < 0)
goto error;
- HDfree(tconv_buf);
+ free(tconv_buf);
return SUCCEED;
error:
if (tconv_buf)
- HDfree(tconv_buf);
+ free(tconv_buf);
return FAIL;
} /* end test_filter_internal() */
@@ -2857,7 +2857,7 @@ test_missing_filter(hid_t file)
/* Verify deflate filter is registered currently */
if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE) {
H5_FAILED();
- HDprintf(" Line %d: Deflate filter not available\n", __LINE__);
+ printf(" Line %d: Deflate filter not available\n", __LINE__);
goto error;
} /* end if */
@@ -2870,31 +2870,31 @@ test_missing_filter(hid_t file)
/* (Use private routine, to avoid range checking on filter ID) */
if (H5Z__unregister(H5Z_FILTER_DEFLATE) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't unregister deflate filter\n", __LINE__);
+ printf(" Line %d: Can't unregister deflate filter\n", __LINE__);
goto error;
} /* end if */
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Verify deflate filter is not registered currently */
if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != FALSE) {
H5_FAILED();
- HDprintf(" Line %d: Deflate filter available\n", __LINE__);
+ printf(" Line %d: Deflate filter available\n", __LINE__);
goto error;
} /* end if */
/* Create dcpl with deflate filter */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dcpl\n", __LINE__);
+ printf(" Line %d: Can't create dcpl\n", __LINE__);
goto error;
} /* end if */
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set chunk sizes\n", __LINE__);
+ printf(" Line %d: Can't set chunk sizes\n", __LINE__);
goto error;
} /* end if */
if (H5Pset_deflate(dcpl, 9) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set deflate filter\n", __LINE__);
+ printf(" Line %d: Can't set deflate filter\n", __LINE__);
goto error;
} /* end if */
@@ -2902,19 +2902,19 @@ test_missing_filter(hid_t file)
ret = H5Pall_filters_avail(dcpl);
if (ret < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't check filter availability\n", __LINE__);
+ printf(" Line %d: Can't check filter availability\n", __LINE__);
goto error;
} /* end if */
if (ret != FALSE) {
H5_FAILED();
- HDprintf(" Line %d: Filter shouldn't be available\n", __LINE__);
+ printf(" Line %d: Filter shouldn't be available\n", __LINE__);
goto error;
} /* end if */
/* Create the data space */
if ((sid = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open dataspace\n", __LINE__);
+ printf(" Line %d: Can't open dataspace\n", __LINE__);
goto error;
} /* end if */
@@ -2922,29 +2922,29 @@ test_missing_filter(hid_t file)
if ((dsid = H5Dcreate2(file, DSET_MISSING_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dataset\n", __LINE__);
+ printf(" Line %d: Can't create dataset\n", __LINE__);
goto error;
} /* end if */
/* Write data */
if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
+ printf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
} /* end if */
/* Flush the file (to clear the cache) */
if (H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error flushing file\n", __LINE__);
+ printf(" Line %d: Error flushing file\n", __LINE__);
goto error;
} /* end if */
/* Query the dataset's size on disk */
if (0 == (dset_size = H5Dget_storage_size(dsid))) {
H5_FAILED();
- HDprintf(" Line %d: Error querying dataset size, dset_size=%lu\n", __LINE__,
- (unsigned long)dset_size);
+ printf(" Line %d: Error querying dataset size, dset_size=%lu\n", __LINE__,
+ (unsigned long)dset_size);
goto error;
} /* end if */
@@ -2952,14 +2952,14 @@ test_missing_filter(hid_t file)
/* (i.e. the deflation filter we asked for was silently ignored) */
if ((H5Tget_size(H5T_NATIVE_INT) * DSET_DIM1 * DSET_DIM2) != dset_size) {
H5_FAILED();
- HDprintf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
+ printf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
goto error;
} /* end if */
/* Read data */
if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
+ printf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
} /* end if */
@@ -2969,10 +2969,10 @@ test_missing_filter(hid_t file)
for (j = 0; j < (size_t)dims[1]; j++) {
if (points[i][j] != check[i][j]) {
H5_FAILED();
- HDprintf(" Line %d: Read different values than written.\n", __LINE__);
- HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- HDprintf(" At original: %d\n", points[i][j]);
- HDprintf(" At returned: %d\n", check[i][j]);
+ printf(" Line %d: Read different values than written.\n", __LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %d\n", points[i][j]);
+ printf(" At returned: %d\n", check[i][j]);
goto error;
} /* end if */
} /* end for */
@@ -2981,21 +2981,21 @@ test_missing_filter(hid_t file)
/* Close dataset */
if (H5Dclose(dsid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataset\n", __LINE__);
+ printf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
/* Close dataspace */
if (H5Sclose(sid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataspace\n", __LINE__);
+ printf(" Line %d: Can't close dataspace\n", __LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if (H5Pclose(dcpl) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dcpl\n", __LINE__);
+ printf(" Line %d: Can't close dcpl\n", __LINE__);
goto error;
} /* end if */
@@ -3004,14 +3004,14 @@ test_missing_filter(hid_t file)
/* Open existing file */
if ((fid = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open existing deflated file\n", __LINE__);
+ printf(" Line %d: Can't open existing deflated file\n", __LINE__);
goto error;
} /* end if */
/* Open dataset */
if ((dsid = H5Dopen2(fid, "Dataset1", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open dataset\n", __LINE__);
+ printf(" Line %d: Can't open dataset\n", __LINE__);
goto error;
} /* end if */
@@ -3023,21 +3023,21 @@ test_missing_filter(hid_t file)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Should not be able to read dataset data\n", __LINE__);
+ printf(" Line %d: Should not be able to read dataset data\n", __LINE__);
goto error;
} /* end if */
/* Close dataset */
if (H5Dclose(dsid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataset\n", __LINE__);
+ printf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
/* Close existing file */
if (H5Fclose(fid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close file\n", __LINE__);
+ printf(" Line %d: Can't close file\n", __LINE__);
goto error;
} /* end if */
@@ -3045,21 +3045,21 @@ test_missing_filter(hid_t file)
/* Verify deflate filter is not registered currently */
if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != FALSE) {
H5_FAILED();
- HDprintf(" Line %d: Deflate filter available\n", __LINE__);
+ printf(" Line %d: Deflate filter available\n", __LINE__);
goto error;
} /* end if */
#ifdef H5_HAVE_FILTER_DEFLATE
/* Register deflate filter (use internal function to avoid range checks) */
if (H5Z_register(H5Z_DEFLATE) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't unregister deflate filter\n", __LINE__);
+ printf(" Line %d: Can't unregister deflate filter\n", __LINE__);
goto error;
} /* end if */
/* Verify deflate filter is registered currently */
if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE) {
H5_FAILED();
- HDprintf(" Line %d: Deflate filter not available\n", __LINE__);
+ printf(" Line %d: Deflate filter not available\n", __LINE__);
goto error;
} /* end if */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -3152,8 +3152,8 @@ test_onebyte_shuffle(hid_t file)
for (j = 0; j < (size_t)size[1]; j++) {
if (new_data[i][j] != orig_data[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -3275,8 +3275,8 @@ test_nbit_int(hid_t file)
for (j = 0; j < (size_t)size[1]; j++) {
if (((unsigned)new_data[i][j] & mask) != ((unsigned)orig_data[i][j] & mask)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -3394,8 +3394,8 @@ test_nbit_float(hid_t file)
continue; /* skip if value is NaN */
if (!H5_FLT_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -3516,8 +3516,8 @@ test_nbit_double(hid_t file)
continue; /* skip if value is NaN */
if (!H5_DBL_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -3649,9 +3649,9 @@ test_nbit_array(hid_t file)
for (n = 0; n < (size_t)adims[1]; n++) {
if (new_data[i][j][m][n] != orig_data[i][j][m][n]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu,%lu,%lu\n", (unsigned long)i, (unsigned long)j,
- (unsigned long)m, (unsigned long)n);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu,%lu,%lu\n", (unsigned long)i, (unsigned long)j,
+ (unsigned long)m, (unsigned long)n);
goto error;
}
}
@@ -3860,8 +3860,8 @@ test_nbit_compound(hid_t file)
((unsigned)new_data[i][j].s & s_mask) != ((unsigned)orig_data[i][j].s & s_mask) ||
(!HDisnan(orig_data[i][j].f) && !H5_FLT_ABS_EQUAL(new_data[i][j].f, orig_data[i][j].f))) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -4198,8 +4198,8 @@ out:
(!HDisnan(new_data[i][j].a.f) && !H5_FLT_ABS_EQUAL(new_data[i][j].a.f, new_data[i][j].a.f)) ||
new_data[i][j].v != orig_data[i][j].v || b_failed || d_failed) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -4348,12 +4348,12 @@ test_nbit_compound_3(hid_t file)
/* Initialize data */
for (i = 0; i < (size_t)size[0]; i++) {
power = HDpow(2.0, 17.0 - 1.0);
- HDmemset(&orig_data[i], 0, sizeof(orig_data[i]));
+ memset(&orig_data[i], 0, sizeof(orig_data[i]));
orig_data[i].i = (int)(HDrandom() % (long)power);
HDstrcpy(orig_data[i].str, "fixed-length C string");
orig_data[i].vl_str = HDstrdup("variable-length C string");
- orig_data[i].v.p = HDmalloc((size_t)(i + 1) * sizeof(unsigned int));
+ orig_data[i].v.p = malloc((size_t)(i + 1) * sizeof(unsigned int));
orig_data[i].v.len = (size_t)i + 1;
for (k = 0; k < (i + 1); k++)
((unsigned int *)orig_data[i].v.p)[k] = (unsigned int)(i * 100 + k);
@@ -4395,24 +4395,24 @@ test_nbit_compound_3(hid_t file)
HDstrcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 ||
new_data[i].v.len != orig_data[i].v.len || new_data[i].r != orig_data[i].r) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu\n", (unsigned long)i);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu\n", (unsigned long)i);
goto error;
}
for (k = 0; k < i + 1; k++)
if (((unsigned int *)orig_data[i].v.p)[k] != ((unsigned int *)new_data[i].v.p)[k]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu\n", (unsigned long)i);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu\n", (unsigned long)i);
goto error;
}
for (j = 0; j < 5; j++)
if (orig_data[i].o[j] != new_data[i].o[j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu\n", (unsigned long)i);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu\n", (unsigned long)i);
goto error;
}
}
@@ -4483,9 +4483,9 @@ test_nbit_int_size(hid_t file)
TESTING(" nbit integer dataset size");
/* Set up data array */
- if (NULL == (orig_data = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ if (NULL == (orig_data = (int *)calloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
TEST_ERROR;
- if (NULL == (orig = (int **)HDcalloc(DSET_DIM1, sizeof(orig_data))))
+ if (NULL == (orig = (int **)calloc(DSET_DIM1, sizeof(orig_data))))
TEST_ERROR;
for (i = 0; i < DSET_DIM1; i++)
orig[i] = orig_data + (i * DSET_DIM2);
@@ -4493,41 +4493,41 @@ test_nbit_int_size(hid_t file)
/* Define dataset datatype (integer), and set precision, offset */
if ((datatype = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Tcopy failed\n", __LINE__);
+ printf(" line %d: H5Tcopy failed\n", __LINE__);
goto error;
}
precision = 16; /* precision includes sign bit */
if (H5Tset_precision(datatype, precision) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_precision failed\n", __LINE__);
+ printf(" line %d: H5Pset_precision failed\n", __LINE__);
goto error;
}
offset = 8;
if (H5Tset_offset(datatype, offset) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Tset_offset failed\n", __LINE__);
+ printf(" line %d: H5Tset_offset failed\n", __LINE__);
goto error;
}
/* Copy to memory datatype */
if ((mem_datatype = H5Tcopy(datatype)) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Tcopy failed\n", __LINE__);
+ printf(" line %d: H5Tcopy failed\n", __LINE__);
goto error;
}
/* Set order of dataset datatype */
if (H5Tset_order(datatype, H5T_ORDER_BE) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_order failed\n", __LINE__);
+ printf(" line %d: H5Pset_order failed\n", __LINE__);
goto error;
}
if (H5Tset_size(datatype, 4) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_size failed\n", __LINE__);
+ printf(" line %d: H5Pset_size failed\n", __LINE__);
goto error;
}
@@ -4545,7 +4545,7 @@ test_nbit_int_size(hid_t file)
dims[1] = DSET_DIM2;
if ((dataspace = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pcreate failed\n", __LINE__);
+ printf(" line %d: H5Pcreate failed\n", __LINE__);
goto error;
}
@@ -4556,13 +4556,13 @@ test_nbit_int_size(hid_t file)
chunk_size[1] = DSET_DIM2 / 10;
if ((dset_create_props = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pcreate failed\n", __LINE__);
+ printf(" line %d: H5Pcreate failed\n", __LINE__);
goto error;
}
if (H5Pset_chunk(dset_create_props, 2, chunk_size) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_chunk failed\n", __LINE__);
+ printf(" line %d: H5Pset_chunk failed\n", __LINE__);
goto error;
}
@@ -4571,7 +4571,7 @@ test_nbit_int_size(hid_t file)
*/
if (H5Pset_nbit(dset_create_props) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_nbit failed\n", __LINE__);
+ printf(" line %d: H5Pset_nbit failed\n", __LINE__);
goto error;
}
@@ -4581,7 +4581,7 @@ test_nbit_int_size(hid_t file)
if ((dataset = H5Dcreate2(file, DSET_NBIT_INT_SIZE_NAME, datatype, dataspace, H5P_DEFAULT,
dset_create_props, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5dwrite failed\n", __LINE__);
+ printf(" line %d: H5dwrite failed\n", __LINE__);
goto error;
}
@@ -4590,7 +4590,7 @@ test_nbit_int_size(hid_t file)
*/
if (H5Dwrite(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: H5Dwrite failed\n", __LINE__);
+ printf(" Line %d: H5Dwrite failed\n", __LINE__);
goto error;
}
@@ -4599,7 +4599,7 @@ test_nbit_int_size(hid_t file)
*/
if ((precision = H5Tget_precision(datatype)) == 0) {
H5_FAILED();
- HDprintf(" Line %d: wrong precision size: %zu\n", __LINE__, precision);
+ printf(" Line %d: wrong precision size: %zu\n", __LINE__, precision);
goto error;
}
@@ -4609,7 +4609,7 @@ test_nbit_int_size(hid_t file)
if ((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1 * DSET_DIM2 * (precision / 8) ||
dset_size > DSET_DIM1 * DSET_DIM2 * (precision / 8) + 1 * KB) {
H5_FAILED();
- HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size);
+ fprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size);
goto error;
}
@@ -4619,16 +4619,16 @@ test_nbit_int_size(hid_t file)
H5Sclose(dataspace);
H5Pclose(dset_create_props);
- HDfree(orig);
- HDfree(orig_data);
+ free(orig);
+ free(orig_data);
PASSED();
return SUCCEED;
error:
- HDfree(orig);
- HDfree(orig_data);
+ free(orig);
+ free(orig_data);
return FAIL;
} /* end test_nbit_int_size() */
@@ -4663,9 +4663,9 @@ test_nbit_flt_size(hid_t file)
TESTING(" nbit floating-number dataset size");
/* Set up data array */
- if (NULL == (orig_data = (float *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(float))))
+ if (NULL == (orig_data = (float *)calloc(DSET_DIM1 * DSET_DIM2, sizeof(float))))
TEST_ERROR;
- if (NULL == (orig = (float **)HDcalloc(DSET_DIM1, sizeof(orig_data))))
+ if (NULL == (orig = (float **)calloc(DSET_DIM1, sizeof(orig_data))))
TEST_ERROR;
for (i = 0; i < DSET_DIM1; i++)
orig[i] = orig_data + (i * DSET_DIM2);
@@ -4694,7 +4694,7 @@ test_nbit_flt_size(hid_t file)
*-------------------------------------------------------------------*/
if ((datatype = H5Tcopy(H5T_IEEE_F32LE)) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Tcopy failed\n", __LINE__);
+ printf(" line %d: H5Tcopy failed\n", __LINE__);
goto error;
} /* end if */
@@ -4708,38 +4708,38 @@ test_nbit_flt_size(hid_t file)
if (H5Tset_fields(datatype, spos, epos, esize, mpos, msize) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Tset_fields failed\n", __LINE__);
+ printf(" line %d: H5Tset_fields failed\n", __LINE__);
goto error;
} /* end if */
if (H5Tset_offset(datatype, offset) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Tset_offset failed\n", __LINE__);
+ printf(" line %d: H5Tset_offset failed\n", __LINE__);
goto error;
} /* end if */
if (H5Tset_precision(datatype, precision) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Tset_precision failed\n", __LINE__);
+ printf(" line %d: H5Tset_precision failed\n", __LINE__);
goto error;
} /* end if */
if (H5Tset_size(datatype, 4) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_size failed\n", __LINE__);
+ printf(" line %d: H5Pset_size failed\n", __LINE__);
goto error;
} /* end if */
/* Set order of dataset datatype */
if (H5Tset_order(datatype, H5T_ORDER_BE) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_order failed\n", __LINE__);
+ printf(" line %d: H5Pset_order failed\n", __LINE__);
goto error;
} /* end if */
if (H5Tset_ebias(datatype, 31) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_size failed\n", __LINE__);
+ printf(" line %d: H5Pset_size failed\n", __LINE__);
goto error;
} /* end if */
@@ -4755,7 +4755,7 @@ test_nbit_flt_size(hid_t file)
dims[1] = DSET_DIM2;
if ((dataspace = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pcreate failed\n", __LINE__);
+ printf(" line %d: H5Pcreate failed\n", __LINE__);
goto error;
} /* end if */
@@ -4766,13 +4766,13 @@ test_nbit_flt_size(hid_t file)
chunk_size[1] = DSET_DIM2 / 10;
if ((dset_create_props = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pcreate failed\n", __LINE__);
+ printf(" line %d: H5Pcreate failed\n", __LINE__);
goto error;
} /* end if */
if (H5Pset_chunk(dset_create_props, 2, chunk_size) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_chunk failed\n", __LINE__);
+ printf(" line %d: H5Pset_chunk failed\n", __LINE__);
goto error;
} /* end if */
@@ -4781,7 +4781,7 @@ test_nbit_flt_size(hid_t file)
*/
if (H5Pset_nbit(dset_create_props) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5Pset_nbit failed\n", __LINE__);
+ printf(" line %d: H5Pset_nbit failed\n", __LINE__);
goto error;
} /* end if */
@@ -4791,7 +4791,7 @@ test_nbit_flt_size(hid_t file)
if ((dataset = H5Dcreate2(file, DSET_NBIT_FLT_SIZE_NAME, datatype, dataspace, H5P_DEFAULT,
dset_create_props, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" line %d: H5dwrite failed\n", __LINE__);
+ printf(" line %d: H5dwrite failed\n", __LINE__);
goto error;
} /* end if */
@@ -4800,7 +4800,7 @@ test_nbit_flt_size(hid_t file)
*/
if (H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: H5Dwrite failed\n", __LINE__);
+ printf(" Line %d: H5Dwrite failed\n", __LINE__);
goto error;
} /* end if */
@@ -4809,7 +4809,7 @@ test_nbit_flt_size(hid_t file)
*/
if ((precision = H5Tget_precision(datatype)) == 0) {
H5_FAILED();
- HDprintf(" Line %d: wrong precision size: %zu\n", __LINE__, precision);
+ printf(" Line %d: wrong precision size: %zu\n", __LINE__, precision);
goto error;
} /* end if */
@@ -4819,7 +4819,7 @@ test_nbit_flt_size(hid_t file)
if ((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1 * DSET_DIM2 * (precision / 8) ||
dset_size > DSET_DIM1 * DSET_DIM2 * (precision / 8) + 1 * KB) {
H5_FAILED();
- HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size);
+ fprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size);
goto error;
} /* end if */
@@ -4830,13 +4830,13 @@ test_nbit_flt_size(hid_t file)
PASSED();
- HDfree(orig);
- HDfree(orig_data);
+ free(orig);
+ free(orig_data);
return SUCCEED;
error:
- HDfree(orig);
- HDfree(orig_data);
+ free(orig);
+ free(orig_data);
return FAIL;
} /* end test_nbit_flt_size() */
@@ -4936,8 +4936,8 @@ test_scaleoffset_int(hid_t file)
for (j = 0; j < (size_t)size[1]; j++) {
if (new_data[i][j] != orig_data[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -5080,8 +5080,8 @@ test_scaleoffset_int_2(hid_t file)
for (j = 0; j < (size_t)size[1]; j++) {
if (new_data[0][j] != orig_data[0][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
goto error;
}
}
@@ -5202,8 +5202,8 @@ test_scaleoffset_float(hid_t file)
for (j = 0; j < (size_t)size[1]; j++) {
if (HDfabs((double)(new_data[i][j] - orig_data[i][j])) > HDpow(10.0, -3.0)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -5348,8 +5348,8 @@ test_scaleoffset_float_2(hid_t file)
for (j = 0; j < (size_t)size[1]; j++) {
if (HDfabs((double)(new_data[0][j] - orig_data[0][j])) > HDpow(10.0, -3.0)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
goto error;
}
}
@@ -5469,8 +5469,8 @@ test_scaleoffset_double(hid_t file)
for (j = 0; j < (size_t)size[1]; j++) {
if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0, -7.0)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
}
}
@@ -5615,8 +5615,8 @@ test_scaleoffset_double_2(hid_t file)
for (j = 0; j < (size_t)size[1]; j++) {
if (HDfabs((double)(new_data[0][j] - orig_data[0][j])) > HDpow(10.0, -7.0)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
goto error;
}
}
@@ -5694,7 +5694,7 @@ test_multiopen(hid_t file)
goto error;
if (cur_size[0] != tmp_size[0]) {
H5_FAILED();
- HDprintf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]);
+ printf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]);
goto error;
} /* end if */
@@ -5874,30 +5874,30 @@ test_can_apply(hid_t file)
/* Create dcpl with special filter */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dcpl\n", __LINE__);
+ printf(" Line %d: Can't create dcpl\n", __LINE__);
goto error;
} /* end if */
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set chunk sizes\n", __LINE__);
+ printf(" Line %d: Can't set chunk sizes\n", __LINE__);
goto error;
} /* end if */
if (H5Zregister(H5Z_CAN_APPLY_TEST) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't register 'can apply' filter\n", __LINE__);
+ printf(" Line %d: Can't register 'can apply' filter\n", __LINE__);
goto error;
}
/* The filter is mandate. */
if (H5Pset_filter(dcpl, H5Z_FILTER_CAN_APPLY_TEST, 0, (size_t)0, NULL) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set bogus filter\n", __LINE__);
+ printf(" Line %d: Can't set bogus filter\n", __LINE__);
goto error;
}
/* Create the data space */
if ((sid = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open dataspace\n", __LINE__);
+ printf(" Line %d: Can't open dataspace\n", __LINE__);
goto error;
} /* end if */
@@ -5911,7 +5911,7 @@ test_can_apply(hid_t file)
H5E_END_TRY;
if (dsid >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Shouldn't have created dataset!\n", __LINE__);
+ printf(" Line %d: Shouldn't have created dataset!\n", __LINE__);
H5Dclose(dsid);
goto error;
} /* end if */
@@ -5924,7 +5924,7 @@ test_can_apply(hid_t file)
H5E_END_TRY;
if (dsid >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Shouldn't have created dataset!\n", __LINE__);
+ printf(" Line %d: Shouldn't have created dataset!\n", __LINE__);
H5Dclose(dsid);
goto error;
} /* end if */
@@ -5933,42 +5933,42 @@ test_can_apply(hid_t file)
if ((dsid = H5Dcreate2(file, DSET_CAN_APPLY_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dataset\n", __LINE__);
+ printf(" Line %d: Can't create dataset\n", __LINE__);
goto error;
} /* end if */
/* Write data */
if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
+ printf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
} /* end if */
/* Flush the file (to clear the cache) */
if (H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error flushing file\n", __LINE__);
+ printf(" Line %d: Error flushing file\n", __LINE__);
goto error;
} /* end if */
/* Query the dataset's size on disk */
if ((dset_size = H5Dget_storage_size(dsid)) == 0) {
H5_FAILED();
- HDprintf(" Line %d: Error querying dataset size\n", __LINE__);
+ printf(" Line %d: Error querying dataset size\n", __LINE__);
goto error;
} /* end if */
/* Verify that the size indicates data is uncompressed */
if ((H5Tget_size(H5T_NATIVE_INT) * dims[0] * dims[1]) != dset_size) {
H5_FAILED();
- HDprintf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
+ printf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
goto error;
} /* end if */
/* Read data */
if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
+ printf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
} /* end if */
@@ -5978,10 +5978,10 @@ test_can_apply(hid_t file)
for (j = 0; j < (size_t)dims[1]; j++) {
if (points[i][j] != check[i][j]) {
H5_FAILED();
- HDprintf(" Line %d: Read different values than written.\n", __LINE__);
- HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- HDprintf(" At original: %d\n", points[i][j]);
- HDprintf(" At returned: %d\n", check[i][j]);
+ printf(" Line %d: Read different values than written.\n", __LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %d\n", points[i][j]);
+ printf(" At returned: %d\n", check[i][j]);
goto error;
} /* end if */
} /* end for */
@@ -5990,21 +5990,21 @@ test_can_apply(hid_t file)
/* Close dataset */
if (H5Dclose(dsid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataset\n", __LINE__);
+ printf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
/* Close dataspace */
if (H5Sclose(sid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataspace\n", __LINE__);
+ printf(" Line %d: Can't close dataspace\n", __LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if (H5Pclose(dcpl) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dcpl\n", __LINE__);
+ printf(" Line %d: Can't close dcpl\n", __LINE__);
goto error;
} /* end if */
@@ -6058,30 +6058,30 @@ test_can_apply2(hid_t file)
/* Create dcpl with special filter */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dcpl\n", __LINE__);
+ printf(" Line %d: Can't create dcpl\n", __LINE__);
goto error;
} /* end if */
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set chunk sizes\n", __LINE__);
+ printf(" Line %d: Can't set chunk sizes\n", __LINE__);
goto error;
} /* end if */
if (H5Zregister(H5Z_CAN_APPLY_TEST2) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't register 'can apply' filter\n", __LINE__);
+ printf(" Line %d: Can't register 'can apply' filter\n", __LINE__);
goto error;
}
/* The filter is optional. */
if (H5Pset_filter(dcpl, H5Z_FILTER_CAN_APPLY_TEST2, H5Z_FLAG_OPTIONAL, (size_t)0, NULL) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set bogus filter\n", __LINE__);
+ printf(" Line %d: Can't set bogus filter\n", __LINE__);
goto error;
}
/* Create the data space */
if ((sid = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open dataspace\n", __LINE__);
+ printf(" Line %d: Can't open dataspace\n", __LINE__);
goto error;
} /* end if */
@@ -6089,42 +6089,42 @@ test_can_apply2(hid_t file)
if ((dsid = H5Dcreate2(file, DSET_CAN_APPLY_NAME2, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dataset\n", __LINE__);
+ printf(" Line %d: Can't create dataset\n", __LINE__);
goto error;
} /* end if */
/* Write data */
if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
+ printf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
} /* end if */
/* Flush the file (to clear the cache) */
if (H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error flushing file\n", __LINE__);
+ printf(" Line %d: Error flushing file\n", __LINE__);
goto error;
} /* end if */
/* Query the dataset's size on disk */
if ((dset_size = H5Dget_storage_size(dsid)) == 0) {
H5_FAILED();
- HDprintf(" Line %d: Error querying dataset size\n", __LINE__);
+ printf(" Line %d: Error querying dataset size\n", __LINE__);
goto error;
} /* end if */
/* Verify that the size indicates data is uncompressed */
if ((H5Tget_size(H5T_NATIVE_DOUBLE) * dims[0] * dims[1]) != dset_size) {
H5_FAILED();
- HDprintf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
+ printf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
goto error;
} /* end if */
/* Read data */
if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
+ printf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
} /* end if */
@@ -6134,10 +6134,10 @@ test_can_apply2(hid_t file)
for (j = 0; j < (size_t)dims[1]; j++) {
if (points[i][j] != check[i][j]) {
H5_FAILED();
- HDprintf(" Line %d: Read different values than written.\n", __LINE__);
- HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- HDprintf(" At original: %d\n", points[i][j]);
- HDprintf(" At returned: %d\n", check[i][j]);
+ printf(" Line %d: Read different values than written.\n", __LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %d\n", points[i][j]);
+ printf(" At returned: %d\n", check[i][j]);
goto error;
} /* end if */
} /* end for */
@@ -6146,21 +6146,21 @@ test_can_apply2(hid_t file)
/* Close dataset */
if (H5Dclose(dsid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataset\n", __LINE__);
+ printf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
/* Close dataspace */
if (H5Sclose(sid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataspace\n", __LINE__);
+ printf(" Line %d: Can't close dataspace\n", __LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if (H5Pclose(dcpl) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dcpl\n", __LINE__);
+ printf(" Line %d: Can't close dcpl\n", __LINE__);
goto error;
} /* end if */
@@ -6322,19 +6322,19 @@ test_can_apply_szip(hid_t
/* Create the data space */
if ((sid = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open dataspace\n", __LINE__);
+ printf(" Line %d: Can't open dataspace\n", __LINE__);
goto error;
} /* end if */
/* Create dcpl with special filter */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dcpl\n", __LINE__);
+ printf(" Line %d: Can't create dcpl\n", __LINE__);
goto error;
} /* end if */
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set chunk sizes\n", __LINE__);
+ printf(" Line %d: Can't set chunk sizes\n", __LINE__);
goto error;
} /* end if */
@@ -6347,7 +6347,7 @@ test_can_apply_szip(hid_t
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Shouldn't be able to set szip filter\n", __LINE__);
+ printf(" Line %d: Shouldn't be able to set szip filter\n", __LINE__);
goto error;
}
@@ -6360,7 +6360,7 @@ test_can_apply_szip(hid_t
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Shouldn't be able to set szip filter\n", __LINE__);
+ printf(" Line %d: Shouldn't be able to set szip filter\n", __LINE__);
goto error;
}
@@ -6368,7 +6368,7 @@ test_can_apply_szip(hid_t
szip_pixels_per_block = 2;
if (H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set szip filter\n", __LINE__);
+ printf(" Line %d: Can't set szip filter\n", __LINE__);
goto error;
}
@@ -6383,47 +6383,47 @@ test_can_apply_szip(hid_t
H5E_END_TRY;
if (dsid <= 0) {
H5_FAILED();
- HDprintf(" Line %d: Should have created dataset!\n", __LINE__);
+ printf(" Line %d: Should have created dataset!\n", __LINE__);
goto error;
} /* end if */
/* Close dataset */
if (H5Dclose(dsid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataset\n", __LINE__);
+ printf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
/* Close dataspace */
if (H5Sclose(sid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataspace\n", __LINE__);
+ printf(" Line %d: Can't close dataspace\n", __LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if (H5Pclose(dcpl) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dcpl\n", __LINE__);
+ printf(" Line %d: Can't close dcpl\n", __LINE__);
goto error;
} /* end if */
/* Create another data space */
if ((sid = H5Screate_simple(2, dims2, NULL)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open dataspace\n", __LINE__);
+ printf(" Line %d: Can't open dataspace\n", __LINE__);
goto error;
} /* end if */
/* Create dcpl with special filter */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dcpl\n", __LINE__);
+ printf(" Line %d: Can't create dcpl\n", __LINE__);
goto error;
} /* end if */
if (H5Pset_chunk(dcpl, 2, chunk_dims2) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set chunk sizes\n", __LINE__);
+ printf(" Line %d: Can't set chunk sizes\n", __LINE__);
goto error;
} /* end if */
@@ -6431,7 +6431,7 @@ test_can_apply_szip(hid_t
szip_pixels_per_block = 32;
if (H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set szip filter\n", __LINE__);
+ printf(" Line %d: Can't set szip filter\n", __LINE__);
goto error;
}
@@ -6445,7 +6445,7 @@ test_can_apply_szip(hid_t
H5E_END_TRY;
if (dsid >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Shouldn't have created dataset!\n", __LINE__);
+ printf(" Line %d: Shouldn't have created dataset!\n", __LINE__);
H5Dclose(dsid);
goto error;
} /* end if */
@@ -6453,14 +6453,14 @@ test_can_apply_szip(hid_t
/* Close dataspace */
if (H5Sclose(sid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataspace\n", __LINE__);
+ printf(" Line %d: Can't close dataspace\n", __LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if (H5Pclose(dcpl) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dcpl\n", __LINE__);
+ printf(" Line %d: Can't close dcpl\n", __LINE__);
goto error;
} /* end if */
@@ -6534,36 +6534,36 @@ test_set_local(hid_t fapl)
/* Open file */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open file\n", __LINE__);
+ printf(" Line %d: Can't open file\n", __LINE__);
goto error;
}
/* Create dcpl with special filter */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dcpl\n", __LINE__);
+ printf(" Line %d: Can't create dcpl\n", __LINE__);
goto error;
} /* end if */
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set chunk sizes\n", __LINE__);
+ printf(" Line %d: Can't set chunk sizes\n", __LINE__);
goto error;
} /* end if */
if (H5Zregister(H5Z_SET_LOCAL_TEST) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't register 'set local' filter\n", __LINE__);
+ printf(" Line %d: Can't register 'set local' filter\n", __LINE__);
goto error;
}
if (H5Pset_filter(dcpl, H5Z_FILTER_SET_LOCAL_TEST, 0, (size_t)BOGUS2_PERM_NPARMS, cd_values) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't set bogus2 filter\n", __LINE__);
+ printf(" Line %d: Can't set bogus2 filter\n", __LINE__);
goto error;
}
/* Create the data space */
if ((sid = H5Screate_simple(2, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open dataspace\n", __LINE__);
+ printf(" Line %d: Can't open dataspace\n", __LINE__);
goto error;
} /* end if */
@@ -6571,21 +6571,21 @@ test_set_local(hid_t fapl)
if ((dsid = H5Dcreate2(file, DSET_SET_LOCAL_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dataset\n", __LINE__);
+ printf(" Line %d: Can't create dataset\n", __LINE__);
goto error;
} /* end if */
/* Write data */
if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
+ printf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
} /* end if */
/* Close dataset */
if (H5Dclose(dsid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataset\n", __LINE__);
+ printf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
@@ -6594,77 +6594,77 @@ test_set_local(hid_t fapl)
if ((dsid = H5Dcreate2(file, DSET_SET_LOCAL_NAME_2, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't create dataset\n", __LINE__);
+ printf(" Line %d: Can't create dataset\n", __LINE__);
goto error;
} /* end if */
/* Write data */
if (H5Dwrite(dsid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_dbl_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
+ printf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
} /* end if */
/* Close dataset */
if (H5Dclose(dsid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataset\n", __LINE__);
+ printf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
/* Close dataspace */
if (H5Sclose(sid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataspace\n", __LINE__);
+ printf(" Line %d: Can't close dataspace\n", __LINE__);
goto error;
} /* end if */
/* Close dataset creation property list */
if (H5Pclose(dcpl) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dcpl\n", __LINE__);
+ printf(" Line %d: Can't close dcpl\n", __LINE__);
goto error;
} /* end if */
/* Close file (flushes & empties cache) */
if (H5Fclose(file) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close file\n", __LINE__);
+ printf(" Line %d: Can't close file\n", __LINE__);
goto error;
} /* end if */
/* Open file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open file\n", __LINE__);
+ printf(" Line %d: Can't open file\n", __LINE__);
goto error;
}
/* Re-open dataset */
if ((dsid = H5Dopen2(file, DSET_SET_LOCAL_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open dataset\n", __LINE__);
+ printf(" Line %d: Can't open dataset\n", __LINE__);
goto error;
} /* end if */
/* Query the dataset's size on disk */
if ((dset_size = H5Dget_storage_size(dsid)) == 0) {
H5_FAILED();
- HDprintf(" Line %d: Error querying dataset size\n", __LINE__);
+ printf(" Line %d: Error querying dataset size\n", __LINE__);
goto error;
} /* end if */
/* Verify that the size indicates data is uncompressed */
if ((H5Tget_size(H5T_NATIVE_INT) * dims[0] * dims[1]) != dset_size) {
H5_FAILED();
- HDprintf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
+ printf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
goto error;
} /* end if */
/* Read data */
if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
+ printf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
} /* end if */
@@ -6674,10 +6674,10 @@ test_set_local(hid_t fapl)
for (j = 0; j < dims[1]; j++) {
if ((points[i][j] + (int)sizeof(int)) != check[i][j]) {
H5_FAILED();
- HDprintf(" Line %d: Read different values than written.\n", __LINE__);
- HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- HDprintf(" At original: %d\n", points[i][j]);
- HDprintf(" At returned: %d\n", check[i][j]);
+ printf(" Line %d: Read different values than written.\n", __LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %d\n", points[i][j]);
+ printf(" At returned: %d\n", check[i][j]);
goto error;
} /* end if */
} /* end for */
@@ -6686,35 +6686,35 @@ test_set_local(hid_t fapl)
/* Close dataset */
if (H5Dclose(dsid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataset\n", __LINE__);
+ printf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
/* Re-open second dataset */
if ((dsid = H5Dopen2(file, DSET_SET_LOCAL_NAME_2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't open dataset\n", __LINE__);
+ printf(" Line %d: Can't open dataset\n", __LINE__);
goto error;
} /* end if */
/* Query the dataset's size on disk */
if ((dset_size = H5Dget_storage_size(dsid)) == 0) {
H5_FAILED();
- HDprintf(" Line %d: Error querying dataset size\n", __LINE__);
+ printf(" Line %d: Error querying dataset size\n", __LINE__);
goto error;
} /* end if */
/* Verify that the size indicates data is uncompressed */
if ((H5Tget_size(H5T_NATIVE_DOUBLE) * dims[0] * dims[1]) != dset_size) {
H5_FAILED();
- HDprintf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
+ printf(" Line %d: Incorrect dataset size: %lu\n", __LINE__, (unsigned long)dset_size);
goto error;
} /* end if */
/* Read data */
if (H5Dread(dsid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_dbl_data) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
+ printf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
} /* end if */
@@ -6726,10 +6726,10 @@ test_set_local(hid_t fapl)
* considered not equal. */
if (!H5_DBL_REL_EQUAL(points_dbl[i][j], check_dbl[i][j], 0.00001)) {
H5_FAILED();
- HDprintf(" Line %d: Read different values than written.\n", __LINE__);
- HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- HDprintf(" At original: %f\n", points_dbl[i][j]);
- HDprintf(" At returned: %f\n", check_dbl[i][j]);
+ printf(" Line %d: Read different values than written.\n", __LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %f\n", points_dbl[i][j]);
+ printf(" At returned: %f\n", check_dbl[i][j]);
goto error;
} /* end if */
} /* end for */
@@ -6738,14 +6738,14 @@ test_set_local(hid_t fapl)
/* Close dataset */
if (H5Dclose(dsid) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close dataset\n", __LINE__);
+ printf(" Line %d: Can't close dataset\n", __LINE__);
goto error;
} /* end if */
/* Close file */
if (H5Fclose(file) < 0) {
H5_FAILED();
- HDprintf(" Line %d: Can't close file\n", __LINE__);
+ printf(" Line %d: Can't close file\n", __LINE__);
goto error;
} /* end if */
@@ -7106,7 +7106,7 @@ test_filter_delete(hid_t file)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Shouldn't have deleted filter!\n", __LINE__);
+ printf(" Line %d: Shouldn't have deleted filter!\n", __LINE__);
goto error;
} /* end if */
@@ -7118,7 +7118,7 @@ test_filter_delete(hid_t file)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Shouldn't have deleted filter!\n", __LINE__);
+ printf(" Line %d: Shouldn't have deleted filter!\n", __LINE__);
goto error;
} /* end if */
@@ -7212,7 +7212,7 @@ auxread_fdata(hid_t fid, const char *name)
goto error;
if ((rank = H5Sget_simple_extent_ndims(space_id)) < 0)
goto error;
- HDmemset(dims, 0, sizeof dims);
+ memset(dims, 0, sizeof dims);
if (H5Sget_simple_extent_dims(space_id, dims, NULL) < 0)
goto error;
nelmts = 1;
@@ -7224,9 +7224,9 @@ auxread_fdata(hid_t fid, const char *name)
goto error;
if (nelmts) {
- buf = (void *)HDmalloc((size_t)(nelmts * msize));
+ buf = (void *)malloc((size_t)(nelmts * msize));
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
+ printf("cannot read into memory\n");
goto error;
}
if (H5Dread(dset_id, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -7240,7 +7240,7 @@ auxread_fdata(hid_t fid, const char *name)
if (H5Dclose(dset_id) < 0)
goto error;
if (buf)
- HDfree(buf);
+ free(buf);
return SUCCEED;
@@ -7253,7 +7253,7 @@ error:
H5Tclose(ftype_id);
H5Tclose(mtype_id);
if (buf)
- HDfree(buf);
+ free(buf);
}
H5E_END_TRY;
return FAIL;
@@ -7593,21 +7593,21 @@ test_missing_chunk(hid_t file)
TESTING("Read dataset with unwritten chunk & undefined fill value");
/* Set up data arrays */
- if (NULL == (wdata = (int *)HDcalloc(MISSING_CHUNK_DIM, sizeof(int))))
+ if (NULL == (wdata = (int *)calloc(MISSING_CHUNK_DIM, sizeof(int))))
TEST_ERROR;
- if (NULL == (rdata = (int *)HDcalloc(MISSING_CHUNK_DIM, sizeof(int))))
+ if (NULL == (rdata = (int *)calloc(MISSING_CHUNK_DIM, sizeof(int))))
TEST_ERROR;
- if (NULL == (wdata2_bytes = (int *)HDcalloc(MISSING_CHUNK_DIM * MISSING_CHUNK_DIM, sizeof(int))))
+ if (NULL == (wdata2_bytes = (int *)calloc(MISSING_CHUNK_DIM * MISSING_CHUNK_DIM, sizeof(int))))
TEST_ERROR;
- if (NULL == (wdata2 = (int **)HDcalloc(MISSING_CHUNK_DIM, sizeof(wdata2_bytes))))
+ if (NULL == (wdata2 = (int **)calloc(MISSING_CHUNK_DIM, sizeof(wdata2_bytes))))
TEST_ERROR;
for (i = 0; i < MISSING_CHUNK_DIM; i++)
wdata2[i] = wdata2_bytes + (i * MISSING_CHUNK_DIM);
- if (NULL == (rdata2_bytes = (int *)HDcalloc(MISSING_CHUNK_DIM * MISSING_CHUNK_DIM, sizeof(int))))
+ if (NULL == (rdata2_bytes = (int *)calloc(MISSING_CHUNK_DIM * MISSING_CHUNK_DIM, sizeof(int))))
TEST_ERROR;
- if (NULL == (rdata2 = (int **)HDcalloc(MISSING_CHUNK_DIM, sizeof(rdata2_bytes))))
+ if (NULL == (rdata2 = (int **)calloc(MISSING_CHUNK_DIM, sizeof(rdata2_bytes))))
TEST_ERROR;
for (i = 0; i < MISSING_CHUNK_DIM; i++)
rdata2[i] = rdata2_bytes + (i * MISSING_CHUNK_DIM);
@@ -7721,14 +7721,14 @@ test_missing_chunk(hid_t file)
for (u = 0; u < MISSING_CHUNK_DIM; u++) {
if ((u % 10) >= 5) {
if (rdata[u] != 911) {
- HDprintf(" Line %d: Incorrect value, rdata[%u]=%d\n", __LINE__, (unsigned)u, rdata[u]);
+ printf(" Line %d: Incorrect value, rdata[%u]=%d\n", __LINE__, (unsigned)u, rdata[u]);
TEST_ERROR;
} /* end if */
} /* end if */
else {
if (rdata[u] != wdata[u]) {
- HDprintf(" Line %d: Incorrect value, wdata[%u]=%d, rdata[%u]=%d\n", __LINE__, (unsigned)u,
- wdata[u], (unsigned)u, rdata[u]);
+ printf(" Line %d: Incorrect value, wdata[%u]=%d, rdata[%u]=%d\n", __LINE__, (unsigned)u,
+ wdata[u], (unsigned)u, rdata[u]);
TEST_ERROR;
} /* end if */
} /* end else */
@@ -7740,16 +7740,16 @@ test_missing_chunk(hid_t file)
if ((i % 10) >= 5 || (j % 10) >= 5) {
if (rdata2[i][j] != 911) {
- HDprintf(" Line %d: Incorrect value, rdata2[%u][%u] = %d\n", __LINE__, (unsigned)i,
- (unsigned)j, rdata2[i][j]);
+ printf(" Line %d: Incorrect value, rdata2[%u][%u] = %d\n", __LINE__, (unsigned)i,
+ (unsigned)j, rdata2[i][j]);
TEST_ERROR;
} /* end if */
} /* end if */
else {
if (rdata2[i][j] != wdata2[i][j]) {
- HDprintf(" Line %d: Incorrect value, wdata2[%u][%u] = %d, rdata2[%u][%u] = %d\n",
- __LINE__, (unsigned)i, (unsigned)j, wdata2[i][j], (unsigned)i, (unsigned)j,
- rdata2[i][j]);
+ printf(" Line %d: Incorrect value, wdata2[%u][%u] = %d, rdata2[%u][%u] = %d\n",
+ __LINE__, (unsigned)i, (unsigned)j, wdata2[i][j], (unsigned)i, (unsigned)j,
+ rdata2[i][j]);
TEST_ERROR;
} /* end if */
} /* end else */
@@ -7770,12 +7770,12 @@ test_missing_chunk(hid_t file)
if (H5Dclose(did2) < 0)
TEST_ERROR;
- HDfree(rdata);
- HDfree(wdata);
- HDfree(rdata2);
- HDfree(wdata2);
- HDfree(rdata2_bytes);
- HDfree(wdata2_bytes);
+ free(rdata);
+ free(wdata);
+ free(rdata2);
+ free(wdata2);
+ free(rdata2_bytes);
+ free(wdata2_bytes);
PASSED();
return SUCCEED;
@@ -7794,12 +7794,12 @@ error:
}
H5E_END_TRY;
- HDfree(rdata);
- HDfree(wdata);
- HDfree(rdata2);
- HDfree(wdata2);
- HDfree(rdata2_bytes);
- HDfree(wdata2_bytes);
+ free(rdata);
+ free(wdata);
+ free(rdata2);
+ free(wdata2);
+ free(rdata2_bytes);
+ free(wdata2_bytes);
return FAIL;
} /* end test_missing_chunk() */
@@ -7850,7 +7850,7 @@ make_random_offset_and_increment(long nelts, long *offsetp, long *incp)
long inc;
long maxinc;
- HDassert(0 < nelts);
+ assert(0 < nelts);
*offsetp = HDrandom() % nelts;
@@ -7907,7 +7907,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
TESTING(testname);
- HDassert(NPOINTS < 100);
+ assert(NPOINTS < 100);
h5_fixname(FILENAME[6], fapl, filename, sizeof filename);
@@ -7953,7 +7953,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long);
H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long);
ofs = (ofs + inc) % (rows * cols);
- HDassert(!check2[chunk_row][chunk_col]);
+ assert(!check2[chunk_row][chunk_col]);
wbuf[i] = check2[chunk_row][chunk_col] = chunk_row + chunk_col + 1;
coord[i][0] = (hsize_t)chunk_row * csize[0];
@@ -8029,10 +8029,10 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
/* Verify that written and read data are the same */
for (i = 0; i < NPOINTS; i++)
if (rbuf[i] != wbuf[i]) {
- HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__, (unsigned)i,
- wbuf[i], (unsigned)i, rbuf[i]);
- HDprintf(" coord[%u] = {%lu, %lu}\n", (unsigned)i, (unsigned long)coord[i][0],
- (unsigned long)coord[i][1]);
+ printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__, (unsigned)i, wbuf[i],
+ (unsigned)i, rbuf[i]);
+ printf(" coord[%u] = {%lu, %lu}\n", (unsigned)i, (unsigned long)coord[i][0],
+ (unsigned long)coord[i][1]);
TEST_ERROR;
} /* end if */
@@ -8113,7 +8113,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long);
H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long);
ofs = (ofs + inc) % (rows * cols);
- HDassert(!check2[chunk_row][chunk_col]);
+ assert(!check2[chunk_row][chunk_col]);
wbuf[i] = check2[chunk_row][chunk_col] = chunk_row + chunk_col + 1;
coord[i][0] = (hsize_t)chunk_row * csize[0];
@@ -8171,8 +8171,8 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
/* Verify that written and read data are the same */
for (i = 0; i < NPOINTS; i++)
if (rbuf[i] != wbuf[i]) {
- HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__, (unsigned)i,
- wbuf[i], (unsigned)i, rbuf[i]);
+ printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__, (unsigned)i, wbuf[i],
+ (unsigned)i, rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -8251,7 +8251,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long);
H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long);
ofs = (ofs + inc) % (rows * cols);
- HDassert(!check2[chunk_row][chunk_col]);
+ assert(!check2[chunk_row][chunk_col]);
wbuf[i] = check2[chunk_row][chunk_col] = chunk_row + chunk_col + 1;
coord[i][0] = (hsize_t)chunk_row * csize[0];
@@ -8309,8 +8309,8 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
/* Verify that written and read data are the same */
for (i = 0; i < NPOINTS; i++)
if (rbuf[i] != wbuf[i]) {
- HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__, (unsigned)i,
- wbuf[i], (unsigned)i, rbuf[i]);
+ printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__, (unsigned)i, wbuf[i],
+ (unsigned)i, rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -8429,13 +8429,13 @@ test_deprec(hid_t file)
dims[0] = 256;
dims[1] = 512;
space = H5Screate_simple(2, dims, NULL);
- HDassert(space >= 0);
+ assert(space >= 0);
/* Create a small data space for compact dataset */
small_dims[0] = 16;
small_dims[1] = 8;
small_space = H5Screate_simple(2, small_dims, NULL);
- HDassert(space >= 0);
+ assert(space >= 0);
/*
* Create a dataset using the default dataset creation properties. We're
@@ -8494,7 +8494,7 @@ test_deprec(hid_t file)
* layout.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- HDassert(create_parms >= 0);
+ assert(create_parms >= 0);
/* Add the deflate filter, if available */
#if defined H5_HAVE_FILTER_DEFLATE
@@ -8530,7 +8530,7 @@ test_deprec(hid_t file)
csize[0] = dims[0] * 2;
csize[1] = dims[1] * 2;
status = H5Pset_chunk(create_parms, 2, csize);
- HDassert(status >= 0);
+ assert(status >= 0);
H5E_BEGIN_TRY
{
dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms);
@@ -8545,7 +8545,7 @@ test_deprec(hid_t file)
csize[0] = 5;
csize[1] = 100;
status = H5Pset_chunk(create_parms, 2, csize);
- HDassert(status >= 0);
+ assert(status >= 0);
if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms)) < 0)
goto error;
@@ -8570,11 +8570,11 @@ test_deprec(hid_t file)
* Create a compact dataset, then close it.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- HDassert(create_parms >= 0);
+ assert(create_parms >= 0);
status = H5Pset_layout(create_parms, H5D_COMPACT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY);
- HDassert(status >= 0);
+ assert(status >= 0);
if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_COMPACT, H5T_NATIVE_DOUBLE, small_space, create_parms)) <
0)
@@ -9067,25 +9067,24 @@ test_big_chunks_bypass_cache(hid_t fapl)
h5_fixname(FILENAME[9], fapl, filename, sizeof filename);
/* Set up data arrays */
- if (NULL ==
- (t_wdata_bytes = (int *)HDcalloc((BYPASS_CHUNK_DIM / 2) * (BYPASS_CHUNK_DIM / 2), sizeof(int))))
+ if (NULL == (t_wdata_bytes = (int *)calloc((BYPASS_CHUNK_DIM / 2) * (BYPASS_CHUNK_DIM / 2), sizeof(int))))
TEST_ERROR;
- if (NULL == (t_wdata = (int **)HDcalloc((BYPASS_CHUNK_DIM / 2), sizeof(t_wdata_bytes))))
+ if (NULL == (t_wdata = (int **)calloc((BYPASS_CHUNK_DIM / 2), sizeof(t_wdata_bytes))))
TEST_ERROR;
for (i = 0; i < (BYPASS_CHUNK_DIM / 2); i++)
t_wdata[i] = t_wdata_bytes + (i * (BYPASS_CHUNK_DIM / 2));
- if (NULL == (t_rdata1_bytes = (int *)HDcalloc(BYPASS_DIM * BYPASS_DIM, sizeof(int))))
+ if (NULL == (t_rdata1_bytes = (int *)calloc(BYPASS_DIM * BYPASS_DIM, sizeof(int))))
TEST_ERROR;
- if (NULL == (t_rdata1 = (int **)HDcalloc(BYPASS_DIM, sizeof(t_rdata1_bytes))))
+ if (NULL == (t_rdata1 = (int **)calloc(BYPASS_DIM, sizeof(t_rdata1_bytes))))
TEST_ERROR;
for (i = 0; i < BYPASS_DIM; i++)
t_rdata1[i] = t_rdata1_bytes + (i * BYPASS_DIM);
if (NULL ==
- (t_rdata2_bytes = (int *)HDcalloc((BYPASS_CHUNK_DIM / 2) * (BYPASS_CHUNK_DIM / 2), sizeof(int))))
+ (t_rdata2_bytes = (int *)calloc((BYPASS_CHUNK_DIM / 2) * (BYPASS_CHUNK_DIM / 2), sizeof(int))))
TEST_ERROR;
- if (NULL == (t_rdata2 = (int **)HDcalloc((BYPASS_CHUNK_DIM / 2), sizeof(t_rdata2_bytes))))
+ if (NULL == (t_rdata2 = (int **)calloc((BYPASS_CHUNK_DIM / 2), sizeof(t_rdata2_bytes))))
TEST_ERROR;
for (i = 0; i < (BYPASS_CHUNK_DIM / 2); i++)
t_rdata2[i] = t_rdata2_bytes + (i * (BYPASS_CHUNK_DIM / 2));
@@ -9189,11 +9188,11 @@ test_big_chunks_bypass_cache(hid_t fapl)
FAIL_STACK_ERROR;
/* Allocate buffers */
- if (NULL == (wdata = (int *)HDmalloc(sizeof(int) * (BYPASS_CHUNK_DIM / 2))))
+ if (NULL == (wdata = (int *)malloc(sizeof(int) * (BYPASS_CHUNK_DIM / 2))))
TEST_ERROR;
- if (NULL == (rdata1 = (int *)HDmalloc(sizeof(int) * BYPASS_DIM)))
+ if (NULL == (rdata1 = (int *)malloc(sizeof(int) * BYPASS_DIM)))
TEST_ERROR;
- if (NULL == (rdata2 = (int *)HDmalloc(sizeof(int) * (BYPASS_CHUNK_DIM / 2))))
+ if (NULL == (rdata2 = (int *)malloc(sizeof(int) * (BYPASS_CHUNK_DIM / 2))))
TEST_ERROR;
/* Initialize data to write for 1-D dataset */
@@ -9237,17 +9236,16 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Verify data for the first 1-D dataset */
for (i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
if (rdata1[i] != i) {
- HDprintf(" Read different values than written in the 1st chunk.\n");
- HDprintf(" At line %d and index %d, rdata1 = %d. It should be %d.\n", __LINE__, i, rdata1[i],
- i);
+ printf(" Read different values than written in the 1st chunk.\n");
+ printf(" At line %d and index %d, rdata1 = %d. It should be %d.\n", __LINE__, i, rdata1[i], i);
TEST_ERROR;
} /* end if */
for (j = BYPASS_CHUNK_DIM / 2; j < BYPASS_DIM; j++)
if (rdata1[j] != fvalue) {
- HDprintf(" Read different values than written in the 2nd chunk.\n");
- HDprintf(" At line %d and index %d, rdata1 = %d. It should be %d.\n", __LINE__, i, rdata1[i],
- fvalue);
+ printf(" Read different values than written in the 2nd chunk.\n");
+ printf(" At line %d and index %d, rdata1 = %d. It should be %d.\n", __LINE__, i, rdata1[i],
+ fvalue);
TEST_ERROR;
} /* end if */
@@ -9255,18 +9253,18 @@ test_big_chunks_bypass_cache(hid_t fapl)
for (i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
for (j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
if (t_rdata1[i][j] != j) {
- HDprintf(" Read different values than written in the 1st chunk.\n");
- HDprintf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n", __LINE__, i,
- j, t_rdata1[i][j], j);
+ printf(" Read different values than written in the 1st chunk.\n");
+ printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n", __LINE__, i, j,
+ t_rdata1[i][j], j);
TEST_ERROR;
} /* end if */
for (i = BYPASS_CHUNK_DIM / 2; i < BYPASS_DIM; i++)
for (j = BYPASS_CHUNK_DIM / 2; j < BYPASS_DIM; j++)
if (t_rdata1[i][j] != fvalue) {
- HDprintf(" Read different values than written in the 2nd chunk.\n");
- HDprintf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n", __LINE__, i,
- j, t_rdata1[i][j], fvalue);
+ printf(" Read different values than written in the 2nd chunk.\n");
+ printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n", __LINE__, i, j,
+ t_rdata1[i][j], fvalue);
TEST_ERROR;
} /* end if */
@@ -9320,9 +9318,8 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Verify data for the second 1-D dataset */
for (i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
if (rdata2[i] != i) {
- HDprintf(" Read different values than written in the chunk.\n");
- HDprintf(" At line %d and index %d, rdata2 = %d. It should be %d.\n", __LINE__, i, rdata2[i],
- i);
+ printf(" Read different values than written in the chunk.\n");
+ printf(" At line %d and index %d, rdata2 = %d. It should be %d.\n", __LINE__, i, rdata2[i], i);
TEST_ERROR;
} /* end if */
@@ -9330,9 +9327,9 @@ test_big_chunks_bypass_cache(hid_t fapl)
for (i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
for (j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
if (t_rdata2[i][j] != j) {
- HDprintf(" Read different values than written in the chunk.\n");
- HDprintf(" At line %d and index (%d, %d), t_rdata2 = %d. It should be %d.\n", __LINE__, i,
- j, t_rdata2[i][j], j);
+ printf(" Read different values than written in the chunk.\n");
+ printf(" At line %d and index (%d, %d), t_rdata2 = %d. It should be %d.\n", __LINE__, i, j,
+ t_rdata2[i][j], j);
TEST_ERROR;
} /* end if */
@@ -9355,15 +9352,15 @@ test_big_chunks_bypass_cache(hid_t fapl)
FAIL_STACK_ERROR;
/* Release buffers */
- HDfree(wdata);
- HDfree(rdata1);
- HDfree(rdata2);
- HDfree(t_wdata);
- HDfree(t_rdata1);
- HDfree(t_rdata2);
- HDfree(t_wdata_bytes);
- HDfree(t_rdata1_bytes);
- HDfree(t_rdata2_bytes);
+ free(wdata);
+ free(rdata1);
+ free(rdata2);
+ free(t_wdata);
+ free(t_rdata1);
+ free(t_rdata2);
+ free(t_wdata_bytes);
+ free(t_rdata1_bytes);
+ free(t_rdata2_bytes);
PASSED();
return SUCCEED;
@@ -9382,15 +9379,15 @@ error:
}
H5E_END_TRY;
- HDfree(wdata);
- HDfree(rdata1);
- HDfree(rdata2);
- HDfree(t_wdata);
- HDfree(t_rdata1);
- HDfree(t_rdata2);
- HDfree(t_wdata_bytes);
- HDfree(t_rdata1_bytes);
- HDfree(t_rdata2_bytes);
+ free(wdata);
+ free(rdata1);
+ free(rdata2);
+ free(t_wdata);
+ free(t_rdata1);
+ free(t_rdata2);
+ free(t_wdata_bytes);
+ free(t_rdata1_bytes);
+ free(t_rdata2_bytes);
return FAIL;
} /* end test_big_chunks_bypass_cache() */
@@ -9988,16 +9985,16 @@ test_chunk_fast_bug1(hid_t fapl)
h5_fixname(FILENAME[10], fapl, filename, sizeof filename);
/* Set up data array */
- if (NULL == (wbuf_bytes = (unsigned *)HDcalloc(40 * 20, sizeof(unsigned))))
+ if (NULL == (wbuf_bytes = (unsigned *)calloc(40 * 20, sizeof(unsigned))))
TEST_ERROR;
- if (NULL == (wbuf = (unsigned **)HDcalloc(40, sizeof(wbuf_bytes))))
+ if (NULL == (wbuf = (unsigned **)calloc(40, sizeof(wbuf_bytes))))
TEST_ERROR;
for (i = 0; i < 40; i++)
wbuf[i] = wbuf_bytes + (i * 20);
- if (NULL == (rbuf_bytes = (unsigned *)HDcalloc(40 * 20, sizeof(unsigned))))
+ if (NULL == (rbuf_bytes = (unsigned *)calloc(40 * 20, sizeof(unsigned))))
TEST_ERROR;
- if (NULL == (rbuf = (unsigned **)HDcalloc(40, sizeof(rbuf_bytes))))
+ if (NULL == (rbuf = (unsigned **)calloc(40, sizeof(rbuf_bytes))))
TEST_ERROR;
for (i = 0; i < 40; i++)
rbuf[i] = rbuf_bytes + (i * 20);
@@ -10073,10 +10070,10 @@ test_chunk_fast_bug1(hid_t fapl)
if (H5Sclose(sid) < 0)
FAIL_STACK_ERROR;
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(wbuf_bytes);
- HDfree(rbuf_bytes);
+ free(wbuf);
+ free(rbuf);
+ free(wbuf_bytes);
+ free(rbuf_bytes);
PASSED();
return SUCCEED;
@@ -10091,10 +10088,10 @@ error:
}
H5E_END_TRY;
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(wbuf_bytes);
- HDfree(rbuf_bytes);
+ free(wbuf);
+ free(rbuf);
+ free(wbuf_bytes);
+ free(rbuf_bytes);
return FAIL;
} /* end test_chunk_fast_bug1() */
@@ -10786,30 +10783,30 @@ test_fixed_array(hid_t fapl)
h5_fixname(FILENAME[12], fapl, filename, sizeof filename);
/* Set up 2D data arrays */
- if (NULL == (chunks_bytes = (int *)HDcalloc(12 * 6, sizeof(int))))
+ if (NULL == (chunks_bytes = (int *)calloc(12 * 6, sizeof(int))))
TEST_ERROR;
- if (NULL == (chunks = (int **)HDcalloc(12, sizeof(chunks_bytes))))
+ if (NULL == (chunks = (int **)calloc(12, sizeof(chunks_bytes))))
TEST_ERROR;
for (i = 0; i < 12; i++)
chunks[i] = chunks_bytes + (i * 6);
- if (NULL == (chunks_big_bytes = (int *)HDcalloc(125 * 20, sizeof(int))))
+ if (NULL == (chunks_big_bytes = (int *)calloc(125 * 20, sizeof(int))))
TEST_ERROR;
- if (NULL == (chunks_big = (int **)HDcalloc(125, sizeof(chunks_big_bytes))))
+ if (NULL == (chunks_big = (int **)calloc(125, sizeof(chunks_big_bytes))))
TEST_ERROR;
for (i = 0; i < 125; i++)
chunks_big[i] = chunks_big_bytes + (i * 20);
- if (NULL == (coord_bytes = (hsize_t *)HDcalloc(POINTS * 2, sizeof(hsize_t))))
+ if (NULL == (coord_bytes = (hsize_t *)calloc(POINTS * 2, sizeof(hsize_t))))
TEST_ERROR;
- if (NULL == (coord = (hsize_t **)HDcalloc(POINTS, sizeof(coord_bytes))))
+ if (NULL == (coord = (hsize_t **)calloc(POINTS, sizeof(coord_bytes))))
TEST_ERROR;
for (i = 0; i < POINTS; i++)
coord[i] = coord_bytes + (i * 2);
- if (NULL == (coord_big_bytes = (hsize_t *)HDcalloc(POINTS_BIG * 2, sizeof(hsize_t))))
+ if (NULL == (coord_big_bytes = (hsize_t *)calloc(POINTS_BIG * 2, sizeof(hsize_t))))
TEST_ERROR;
- if (NULL == (coord_big = (hsize_t **)HDcalloc(POINTS_BIG, sizeof(coord_big_bytes))))
+ if (NULL == (coord_big = (hsize_t **)calloc(POINTS_BIG, sizeof(coord_big_bytes))))
TEST_ERROR;
for (i = 0; i < POINTS_BIG; i++)
coord_big[i] = coord_big_bytes + (i * 2);
@@ -10829,9 +10826,9 @@ test_fixed_array(hid_t fapl)
TEST_ERROR;
/* Allocate the "big" buffers */
- if (NULL == (wbuf_big = (int *)HDmalloc(sizeof(int) * POINTS_BIG)))
+ if (NULL == (wbuf_big = (int *)malloc(sizeof(int) * POINTS_BIG)))
TEST_ERROR;
- if (NULL == (rbuf_big = (int *)HDmalloc(sizeof(int) * POINTS_BIG)))
+ if (NULL == (rbuf_big = (int *)malloc(sizeof(int) * POINTS_BIG)))
TEST_ERROR;
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -10882,7 +10879,7 @@ test_fixed_array(hid_t fapl)
H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long);
H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long);
ofs = (ofs + inc) % (rows * cols);
- HDassert(!chunks[chunk_row][chunk_col]);
+ assert(!chunks[chunk_row][chunk_col]);
wbuf[i] = chunks[chunk_row][chunk_col] = chunk_row + chunk_col + 1;
coord[i][0] = (hsize_t)chunk_row * chunk_dim2[0];
@@ -11032,7 +11029,7 @@ test_fixed_array(hid_t fapl)
H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long);
H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long);
ofs = (ofs + inc) % (rows * cols);
- HDassert(!chunks_big[chunk_row][chunk_col]);
+ assert(!chunks_big[chunk_row][chunk_col]);
wbuf_big[i] = chunks_big[chunk_row][chunk_col] = chunk_row + chunk_col + 1;
coord_big[i][0] = (hsize_t)chunk_row * chunk_dim2[0];
@@ -11084,8 +11081,8 @@ test_fixed_array(hid_t fapl)
/* Verify that written and read data are the same */
for (i = 0; i < POINTS; i++)
if (rbuf[i] != wbuf[i]) {
- HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__,
- (unsigned)i, wbuf[i], (unsigned)i, rbuf[i]);
+ printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__, (unsigned)i,
+ wbuf[i], (unsigned)i, rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -11120,8 +11117,8 @@ test_fixed_array(hid_t fapl)
/* Verify that written and read data are the same */
for (i = 0; i < POINTS; i++)
if (rbuf[i] != wbuf[i]) {
- HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__,
- (unsigned)i, wbuf[i], (unsigned)i, rbuf[i]);
+ printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__, (unsigned)i,
+ wbuf[i], (unsigned)i, rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -11154,8 +11151,8 @@ test_fixed_array(hid_t fapl)
/* Verify that written and read data are the same */
for (i = 0; i < POINTS_BIG; i++)
if (rbuf_big[i] != wbuf_big[i]) {
- HDprintf(" Line %d: Incorrect value, wbuf_bif[%u]=%d, rbuf_big[%u]=%d\n", __LINE__,
- (unsigned)i, wbuf_big[i], (unsigned)i, rbuf_big[i]);
+ printf(" Line %d: Incorrect value, wbuf_bif[%u]=%d, rbuf_big[%u]=%d\n", __LINE__,
+ (unsigned)i, wbuf_big[i], (unsigned)i, rbuf_big[i]);
TEST_ERROR;
} /* end if */
@@ -11193,17 +11190,17 @@ test_fixed_array(hid_t fapl)
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Release buffers */
- HDfree(wbuf_big);
- HDfree(rbuf_big);
-
- HDfree(chunks);
- HDfree(chunks_big);
- HDfree(coord);
- HDfree(coord_big);
- HDfree(chunks_bytes);
- HDfree(chunks_big_bytes);
- HDfree(coord_bytes);
- HDfree(coord_big_bytes);
+ free(wbuf_big);
+ free(rbuf_big);
+
+ free(chunks);
+ free(chunks_big);
+ free(coord);
+ free(coord_big);
+ free(chunks_bytes);
+ free(chunks_big_bytes);
+ free(coord_bytes);
+ free(coord_big_bytes);
PASSED();
return SUCCEED;
@@ -11219,16 +11216,16 @@ error:
}
H5E_END_TRY;
- HDfree(wbuf_big);
- HDfree(rbuf_big);
- HDfree(chunks);
- HDfree(chunks_big);
- HDfree(coord);
- HDfree(coord_big);
- HDfree(chunks_bytes);
- HDfree(chunks_big_bytes);
- HDfree(coord_bytes);
- HDfree(coord_big_bytes);
+ free(wbuf_big);
+ free(rbuf_big);
+ free(chunks);
+ free(chunks_big);
+ free(coord);
+ free(coord_big);
+ free(chunks_bytes);
+ free(chunks_big_bytes);
+ free(coord_bytes);
+ free(coord_big_bytes);
return FAIL;
} /* end test_fixed_array() */
@@ -11307,13 +11304,13 @@ test_single_chunk(hid_t fapl)
TEST_ERROR;
/* Allocate the buffers */
- if (NULL == (wbuf = (int *)HDmalloc(sizeof(int) * (DSET_DIM1 * DSET_DIM2))))
+ if (NULL == (wbuf = (int *)malloc(sizeof(int) * (DSET_DIM1 * DSET_DIM2))))
TEST_ERROR;
- if (NULL == (rbuf = (int *)HDmalloc(sizeof(int) * (DSET_DIM1 * DSET_DIM2))))
+ if (NULL == (rbuf = (int *)malloc(sizeof(int) * (DSET_DIM1 * DSET_DIM2))))
TEST_ERROR;
- if (NULL == (t_wbuf = (int *)HDmalloc(sizeof(int) * (DSET_TMP_DIM1 * DSET_TMP_DIM2))))
+ if (NULL == (t_wbuf = (int *)malloc(sizeof(int) * (DSET_TMP_DIM1 * DSET_TMP_DIM2))))
TEST_ERROR;
- if (NULL == (t_rbuf = (int *)HDmalloc(sizeof(int) * (DSET_TMP_DIM1 * DSET_TMP_DIM2))))
+ if (NULL == (t_rbuf = (int *)malloc(sizeof(int) * (DSET_TMP_DIM1 * DSET_TMP_DIM2))))
TEST_ERROR;
for (i = n = 0; i < (DSET_DIM1 * DSET_DIM2); i++)
@@ -11442,8 +11439,8 @@ test_single_chunk(hid_t fapl)
/* Verify that written and read data are the same */
for (i = 0; i < (DSET_DIM1 * DSET_DIM2); i++)
if (rbuf[i] != wbuf[i]) {
- HDprintf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__,
- (unsigned)i, wbuf[i], (unsigned)i, rbuf[i]);
+ printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", __LINE__, (unsigned)i,
+ wbuf[i], (unsigned)i, rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -11455,7 +11452,7 @@ test_single_chunk(hid_t fapl)
if ((did = H5Dopen2(fid, DSET_SINGLE_NOMAX, H5P_DEFAULT)) < 0)
TEST_ERROR;
- HDmemset(rbuf, 0, sizeof(int) * (DSET_DIM1 * DSET_DIM2));
+ memset(rbuf, 0, sizeof(int) * (DSET_DIM1 * DSET_DIM2));
/* Read from dataset */
if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, t_rbuf) < 0)
@@ -11464,8 +11461,8 @@ test_single_chunk(hid_t fapl)
/* Verify that written and read data are the same */
for (i = 0; i < (DSET_TMP_DIM1 * DSET_TMP_DIM2); i++)
if (t_rbuf[i] != t_wbuf[i]) {
- HDprintf(" Line %d: Incorrect value, t_wbuf[%u]=%d, t_rbuf[%u]=%d\n", __LINE__,
- (unsigned)i, t_wbuf[i], (unsigned)i, t_rbuf[i]);
+ printf(" Line %d: Incorrect value, t_wbuf[%u]=%d, t_rbuf[%u]=%d\n", __LINE__,
+ (unsigned)i, t_wbuf[i], (unsigned)i, t_rbuf[i]);
TEST_ERROR;
} /* end if */
@@ -11497,10 +11494,10 @@ test_single_chunk(hid_t fapl)
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Release buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(t_wbuf);
- HDfree(t_rbuf);
+ free(wbuf);
+ free(rbuf);
+ free(t_wbuf);
+ free(t_rbuf);
PASSED();
return SUCCEED;
@@ -11518,13 +11515,13 @@ error:
}
H5E_END_TRY;
if (wbuf)
- HDfree(wbuf);
+ free(wbuf);
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
if (t_wbuf)
- HDfree(t_wbuf);
+ free(t_wbuf);
if (t_rbuf)
- HDfree(t_rbuf);
+ free(t_rbuf);
return FAIL;
} /* end test_single_chunk() */
@@ -12538,7 +12535,7 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
TESTING("Version 2 B-tree chunk index header flush dependencies handled correctly");
/* Initialize struct */
- HDmemset(&info, 0, sizeof(info));
+ memset(&info, 0, sizeof(info));
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
@@ -12695,7 +12692,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12744,7 +12741,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12805,7 +12802,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12866,7 +12863,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12927,7 +12924,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12988,7 +12985,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -13049,7 +13046,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -13242,8 +13239,8 @@ typedef struct scatter_info_t {
if (ARR[i][j][k] != EXP[i][j][k]) { \
H5_FAILED(); \
AT(); \
- HDprintf(" " #ARR "[%d][%d][%d] == %d, " #EXP "[%d][%d][%d] == %d\n", i, j, k, \
- ARR[i][j][k], i, j, k, EXP[i][j][k]); \
+ printf(" " #ARR "[%d][%d][%d] == %d, " #EXP "[%d][%d][%d] == %d\n", i, j, k, \
+ ARR[i][j][k], i, j, k, EXP[i][j][k]); \
goto error; \
}
@@ -13255,7 +13252,7 @@ scatter_cb(void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/, void *_sc
/* Calculate number of elements */
nelmts = MIN(scatter_info->block, scatter_info->size);
- HDassert(nelmts > 0);
+ assert(nelmts > 0);
/* Set output variables */
*src_buf = (void *)scatter_info->src_buf;
@@ -13308,14 +13305,14 @@ test_scatter(void)
TEST_ERROR;
/* Initialize dst_buf and expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < 8; i++)
expect_dst_buf[0][0][i] = src_buf[i];
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 9; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13344,7 +13341,7 @@ test_scatter(void)
TEST_ERROR;
/* Initialize expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
src_i = 0;
for (i = 3; i < 5; i++)
for (j = 2; j < 5; j++)
@@ -13354,7 +13351,7 @@ test_scatter(void)
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 13; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13392,7 +13389,7 @@ test_scatter(void)
/* Iterate over block containing selection, checking if each element is in
* selection. Note that the algorithm used here (if statement) would not
* work for overlapping hyperslabs. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
src_i = 0;
for (i = 1; i < 8; i++)
for (j = 1; j < 4; j++)
@@ -13408,7 +13405,7 @@ test_scatter(void)
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 37; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13447,7 +13444,7 @@ test_scatter(void)
/* Initialize expect_dst_buf */
/* Iterate over block containing selection, checking if each element is in
* selection. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
src_i = 0;
for (i = 1; i < 4; i++)
for (j = 1; j < 4; j++)
@@ -13463,7 +13460,7 @@ test_scatter(void)
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 17; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13488,14 +13485,14 @@ test_scatter(void)
/* Initialize expect_dst_buf */
/* Iterate over block containing selection, checking if each element is in
* selection. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < (int)(sizeof(point) / sizeof(point[0])); i++)
expect_dst_buf[point[i][0]][point[i][1]][point[i][2]] = src_buf[i];
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 5; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13554,7 +13551,7 @@ gather_cb(const void *dst_buf, size_t dst_buf_bytes_used, void *_gather_info)
size_t nelmts; /* Number of elements in src_buf */
int i; /* Local index variable */
- HDassert(dst_buf_bytes_used > 0);
+ assert(dst_buf_bytes_used > 0);
/* Calculate number of elements */
nelmts = dst_buf_bytes_used / sizeof(gather_info->expect_dst_buf[0]);
@@ -13629,14 +13626,14 @@ test_gather(void)
TEST_ERROR;
/* Initialize expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < 8; i++)
expect_dst_buf[i] = src_buf[0][0][i];
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 9; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13657,7 +13654,7 @@ test_gather(void)
/* Loop over buffer sizes */
for (dst_buf_size = 8; dst_buf_size <= 9; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, NULL, NULL) <
@@ -13673,7 +13670,7 @@ test_gather(void)
/* Test with a dst_buf_size that is not a multiple of the datatype size */
/* Reset dst_buf */
dst_buf_size = 7;
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13703,7 +13700,7 @@ test_gather(void)
TEST_ERROR;
/* Initialize expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
dst_i = 0;
for (i = 3; i < 5; i++)
for (j = 2; j < 5; j++)
@@ -13713,7 +13710,7 @@ test_gather(void)
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 13; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13753,7 +13750,7 @@ test_gather(void)
/* Iterate over block containing selection, checking if each element is in
* selection. Note that the algorithm used here (if statement) would not
* work for overlapping hyperslabs. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
dst_i = 0;
for (i = 1; i < 8; i++)
for (j = 1; j < 4; j++)
@@ -13769,7 +13766,7 @@ test_gather(void)
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 37; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13810,7 +13807,7 @@ test_gather(void)
/* Initialize expect_dst_buf */
/* Iterate over block containing selection, checking if each element is in
* selection. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
dst_i = 0;
for (i = 1; i < 4; i++)
for (j = 1; j < 4; j++)
@@ -13826,7 +13823,7 @@ test_gather(void)
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 17; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13853,14 +13850,14 @@ test_gather(void)
/* Initialize expect_dst_buf */
/* Iterate over block containing selection, checking if each element is in
* selection. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < (int)(sizeof(point) / sizeof(point[0])); i++)
expect_dst_buf[i] = src_buf[point[i][0]][point[i][1]][point[i][2]];
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 5; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13916,7 +13913,7 @@ scatter_error_cb_fail(void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/
/* Calculate number of elements */
nelmts = MIN(scatter_info->block, scatter_info->size);
- HDassert(nelmts > 0);
+ assert(nelmts > 0);
/* Set output variables */
*src_buf = (void *)scatter_info->src_buf;
@@ -13933,7 +13930,7 @@ scatter_error_cb_null(void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/
/* Calculate number of elements */
nelmts = MIN(scatter_info->block, scatter_info->size);
- HDassert(nelmts > 0);
+ assert(nelmts > 0);
/* Set output variables */
*src_buf = NULL;
@@ -14177,7 +14174,7 @@ test_gather_error(void)
TEST_ERROR;
/* Initialize expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < 6; i++)
expect_dst_buf[i] = src_buf[i + 2];
@@ -14522,7 +14519,7 @@ dls_01_main(void)
if (NULL == h5_fixname(FILENAME[23], H5P_DEFAULT, filename, sizeof(filename)))
TEST_ERROR;
- buffer = (char *)HDcalloc(DLS_01_DIMS, DLS_01_STR_SIZE);
+ buffer = (char *)calloc(DLS_01_DIMS, DLS_01_STR_SIZE);
if (NULL == buffer)
TEST_ERROR;
@@ -14568,7 +14565,7 @@ dls_01_main(void)
if (status != 0)
TEST_ERROR;
- HDfree(buffer);
+ free(buffer);
PASSED();
@@ -14576,7 +14573,7 @@ dls_01_main(void)
error:
if (buffer)
- HDfree(buffer);
+ free(buffer);
return FAIL;
} /* end dls_01_main() */
@@ -15057,7 +15054,7 @@ test_h5s_block(void)
FAIL_STACK_ERROR;
/* Reset the memory buffer */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
/* Read the entire dataset */
if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_BLOCK, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -15238,7 +15235,7 @@ test_h5s_plist(void)
FAIL_STACK_ERROR;
/* Reset the memory buffer */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
/* Read the entire dataset */
if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_BLOCK, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -15250,7 +15247,7 @@ test_h5s_plist(void)
TEST_ERROR;
/* Reset the memory buffer */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
/* Set valid selection in DXPL */
if (H5Pset_dataset_io_hyperslab_selection(dxpl_id, 1, H5S_SELECT_SET, &start, &stride, &count, &block) <
@@ -15267,7 +15264,7 @@ test_h5s_plist(void)
TEST_ERROR;
/* Reset the memory buffer */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
/* Check for copying property list w/selection */
if ((dxpl_id_copy = H5Pcopy(dxpl_id)) < 0)
@@ -15468,7 +15465,7 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id)
FAIL_STACK_ERROR;
/* Retrieve & verify the dataset's index info */
- HDmemset(&nat_info, 0, sizeof(nat_info));
+ memset(&nat_info, 0, sizeof(nat_info));
if (H5Oget_native_info(dset_id, &nat_info, H5O_NATIVE_INFO_META_SIZE) < 0)
FAIL_STACK_ERROR;
if (0 != nat_info.meta_size.obj.index_size)
@@ -15507,7 +15504,7 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id)
FAIL_STACK_ERROR;
/* Retrieve & verify the dataset's index info */
- HDmemset(&nat_info, 0, sizeof(nat_info));
+ memset(&nat_info, 0, sizeof(nat_info));
if (H5Oget_native_info(dset_id, &nat_info, H5O_NATIVE_INFO_META_SIZE) < 0)
FAIL_STACK_ERROR;
if (0 == nat_info.meta_size.obj.index_size)
@@ -15596,33 +15593,33 @@ main(void)
/* Initialize global arrays */
/* points */
- if (NULL == (points_data = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ if (NULL == (points_data = (int *)calloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
TEST_ERROR;
- if (NULL == (points = (int **)HDcalloc(DSET_DIM1, sizeof(points_data))))
+ if (NULL == (points = (int **)calloc(DSET_DIM1, sizeof(points_data))))
TEST_ERROR;
for (i = 0; i < DSET_DIM1; i++)
points[i] = points_data + (i * DSET_DIM2);
/* check */
- if (NULL == (check_data = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ if (NULL == (check_data = (int *)calloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
TEST_ERROR;
- if (NULL == (check = (int **)HDcalloc(DSET_DIM1, sizeof(check_data))))
+ if (NULL == (check = (int **)calloc(DSET_DIM1, sizeof(check_data))))
TEST_ERROR;
for (i = 0; i < DSET_DIM1; i++)
check[i] = check_data + (i * DSET_DIM2);
/* points_dbl */
- if (NULL == (points_dbl_data = (double *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(double))))
+ if (NULL == (points_dbl_data = (double *)calloc(DSET_DIM1 * DSET_DIM2, sizeof(double))))
TEST_ERROR;
- if (NULL == (points_dbl = (double **)HDcalloc(DSET_DIM1, sizeof(points_dbl_data))))
+ if (NULL == (points_dbl = (double **)calloc(DSET_DIM1, sizeof(points_dbl_data))))
TEST_ERROR;
for (i = 0; i < DSET_DIM1; i++)
points_dbl[i] = points_dbl_data + (i * DSET_DIM2);
/* check_dbl */
- if (NULL == (check_dbl_data = (double *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(double))))
+ if (NULL == (check_dbl_data = (double *)calloc(DSET_DIM1 * DSET_DIM2, sizeof(double))))
TEST_ERROR;
- if (NULL == (check_dbl = (double **)HDcalloc(DSET_DIM1, sizeof(check_dbl_data))))
+ if (NULL == (check_dbl = (double **)calloc(DSET_DIM1, sizeof(check_dbl_data))))
TEST_ERROR;
for (i = 0; i < DSET_DIM1; i++)
check_dbl[i] = check_dbl_data + (i * DSET_DIM2);
@@ -15835,37 +15832,37 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All dataset tests passed.\n");
+ printf("All dataset tests passed.\n");
#ifdef H5_HAVE_FILTER_SZIP
if (GetTestCleanup())
HDremove(NOENCODER_COPY_FILENAME);
#endif /* H5_HAVE_FILTER_SZIP */
h5_cleanup(FILENAME, fapl);
- HDfree(points);
- HDfree(check);
- HDfree(points_dbl);
- HDfree(check_dbl);
+ free(points);
+ free(check);
+ free(points_dbl);
+ free(check_dbl);
- HDfree(points_data);
- HDfree(check_data);
- HDfree(points_dbl_data);
- HDfree(check_dbl_data);
+ free(points_data);
+ free(check_data);
+ free(points_dbl_data);
+ free(check_dbl_data);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDfree(points);
- HDfree(check);
- HDfree(points_dbl);
- HDfree(check_dbl);
+ free(points);
+ free(check);
+ free(points_dbl);
+ free(check_dbl);
- HDfree(points_data);
- HDfree(check_data);
- HDfree(points_dbl_data);
- HDfree(check_dbl_data);
+ free(points_data);
+ free(check_data);
+ free(points_dbl_data);
+ free(check_dbl_data);
nerrors = MAX(1, nerrors);
- HDprintf("***** %d DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %d DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/dt_arith.c b/test/dt_arith.c
index a26945f..c7b72cb 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -99,8 +99,8 @@ typedef enum dtype_t {
static int without_hardware_g = 0;
/* Allocates memory aligned on a certain boundary. */
-#define aligned_malloc(Z) ((void *)((char *)HDmalloc(ALIGNMENT + Z) + ALIGNMENT))
-#define aligned_free(M) HDfree((char *)(M)-ALIGNMENT)
+#define aligned_malloc(Z) ((void *)((char *)malloc(ALIGNMENT + Z) + ALIGNMENT))
+#define aligned_free(M) free((char *)(M)-ALIGNMENT)
/* Initialize source buffer of integer for integer->integer and integer->floating-point conversion test.
* This algorithm is mainly to avoid any casting and comparison between source and destination types
@@ -116,8 +116,8 @@ static int without_hardware_g = 0;
NELMTS = SRC_PREC * 3; \
BUF = (unsigned char *)aligned_malloc(NELMTS * MAX(SRC_SIZE, DST_SIZE)); \
SAVED = (unsigned char *)aligned_malloc(NELMTS * MAX(SRC_SIZE, DST_SIZE)); \
- HDmemset(BUF, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
- HDmemset(SAVED, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
+ memset(BUF, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
+ memset(SAVED, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
\
buf_p = BUF; \
saved_p = SAVED; \
@@ -126,14 +126,14 @@ static int without_hardware_g = 0;
/*VALUE2 ascends from 00000000, to 00000011, 00000111,..., until 11111111.*/ \
for (n = 0; n < SRC_PREC; n++) { \
{ \
- HDmemcpy(buf_p, &value1, SRC_SIZE); \
- HDmemcpy(saved_p, &value1, SRC_SIZE); \
+ memcpy(buf_p, &value1, SRC_SIZE); \
+ memcpy(saved_p, &value1, SRC_SIZE); \
buf_p += SRC_SIZE; \
saved_p += SRC_SIZE; \
} \
{ \
- HDmemcpy(buf_p, &value2, SRC_SIZE); \
- HDmemcpy(saved_p, &value2, SRC_SIZE); \
+ memcpy(buf_p, &value2, SRC_SIZE); \
+ memcpy(saved_p, &value2, SRC_SIZE); \
buf_p += SRC_SIZE; \
saved_p += SRC_SIZE; \
} \
@@ -152,8 +152,8 @@ static int without_hardware_g = 0;
/* VALUE2 descends from 11111111 to 11111110, 11111100, ..., until 10000000. */ \
for (n = 0; n < SRC_PREC - 1; n++) { \
{ \
- HDmemcpy(buf_p, &value2, SRC_SIZE); \
- HDmemcpy(saved_p, &value2, SRC_SIZE); \
+ memcpy(buf_p, &value2, SRC_SIZE); \
+ memcpy(saved_p, &value2, SRC_SIZE); \
buf_p += SRC_SIZE; \
saved_p += SRC_SIZE; \
} \
@@ -233,8 +233,8 @@ static int without_hardware_g = 0;
/* Allocate buffers */ \
BUF = (unsigned char *)aligned_malloc(NELMTS * MAX(SRC_SIZE, DST_SIZE)); \
SAVED = (unsigned char *)aligned_malloc(NELMTS * MAX(SRC_SIZE, DST_SIZE)); \
- HDmemset(BUF, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
- HDmemset(SAVED, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
+ memset(BUF, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
+ memset(SAVED, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
\
buf_p = BUF; \
saved_p = SAVED; \
@@ -244,15 +244,15 @@ static int without_hardware_g = 0;
value2 = -SRC_MIN; \
for (n = 0; n < num_norm; n++) { \
if (value1 < SRC_MAX) { /*positive*/ \
- HDmemcpy(buf_p, &value1, SRC_SIZE); \
- HDmemcpy(saved_p, &value1, SRC_SIZE); \
+ memcpy(buf_p, &value1, SRC_SIZE); \
+ memcpy(saved_p, &value1, SRC_SIZE); \
value1 *= multiply; \
buf_p += SRC_SIZE; \
saved_p += SRC_SIZE; \
} \
if (value2 > -SRC_MAX) { /*negative*/ \
- HDmemcpy(buf_p, &value2, SRC_SIZE); \
- HDmemcpy(saved_p, &value2, SRC_SIZE); \
+ memcpy(buf_p, &value2, SRC_SIZE); \
+ memcpy(saved_p, &value2, SRC_SIZE); \
value2 *= multiply; \
buf_p += SRC_SIZE; \
saved_p += SRC_SIZE; \
@@ -260,14 +260,14 @@ static int without_hardware_g = 0;
} \
\
value1 = SRC_MAX; /*maximal value*/ \
- HDmemcpy(buf_p, &value1, SRC_SIZE); \
- HDmemcpy(saved_p, &value1, SRC_SIZE); \
+ memcpy(buf_p, &value1, SRC_SIZE); \
+ memcpy(saved_p, &value1, SRC_SIZE); \
buf_p += SRC_SIZE; \
saved_p += SRC_SIZE; \
\
value2 = -SRC_MAX; /*negative value*/ \
- HDmemcpy(buf_p, &value2, SRC_SIZE); \
- HDmemcpy(saved_p, &value2, SRC_SIZE); \
+ memcpy(buf_p, &value2, SRC_SIZE); \
+ memcpy(saved_p, &value2, SRC_SIZE); \
buf_p += SRC_SIZE; \
saved_p += SRC_SIZE; \
}
@@ -288,25 +288,25 @@ static int without_hardware_g = 0;
/* Allocate buffers */ \
BUF = (unsigned char *)aligned_malloc(NELMTS * MAX(SRC_SIZE, DST_SIZE)); \
SAVED = (unsigned char *)aligned_malloc(NELMTS * MAX(SRC_SIZE, DST_SIZE)); \
- HDmemset(BUF, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
- HDmemset(SAVED, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
+ memset(BUF, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
+ memset(SAVED, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
\
- tmp1 = (unsigned char *)HDcalloc((size_t)1, (size_t)SRC_SIZE); \
- tmp2 = (unsigned char *)HDcalloc((size_t)1, (size_t)SRC_SIZE); \
+ tmp1 = (unsigned char *)calloc((size_t)1, (size_t)SRC_SIZE); \
+ tmp2 = (unsigned char *)calloc((size_t)1, (size_t)SRC_SIZE); \
\
buf_p = BUF; \
saved_p = SAVED; \
\
/*Denormalized values. Exponent is 0. Let mantissa starts from 00000001, 00000011, \
*00000111,..., until 11111111.*/ \
- HDmemset(tmp1, 0, SRC_SIZE); \
- HDmemset(tmp2, 0, SRC_SIZE); \
+ memset(tmp1, 0, SRC_SIZE); \
+ memset(tmp2, 0, SRC_SIZE); \
H5T__bit_set(tmp2, SRC_PREC - 1, (size_t)1, TRUE); /*the negative value*/ \
for (n = 0; n < SRC_MANT_DIG - 1; n++) { \
H5T__bit_set(tmp1, n, (size_t)1, TRUE); /*turn on 1 bit each time*/ \
CHANGE_ORDER(tmp1, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
- HDmemcpy(buf_p, tmp1, SRC_SIZE); \
- HDmemcpy(saved_p, tmp1, SRC_SIZE); \
+ memcpy(buf_p, tmp1, SRC_SIZE); \
+ memcpy(saved_p, tmp1, SRC_SIZE); \
CHANGE_ORDER(tmp1, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
buf_p += SRC_SIZE; \
saved_p += SRC_SIZE; \
@@ -314,14 +314,14 @@ static int without_hardware_g = 0;
/*negative values*/ \
H5T__bit_set(tmp2, n, (size_t)1, TRUE); \
CHANGE_ORDER(tmp2, SRC_ORDR, SRC_SIZE); \
- HDmemcpy(buf_p, tmp2, SRC_SIZE); \
- HDmemcpy(saved_p, tmp2, SRC_SIZE); \
+ memcpy(buf_p, tmp2, SRC_SIZE); \
+ memcpy(saved_p, tmp2, SRC_SIZE); \
CHANGE_ORDER(tmp2, SRC_ORDR, SRC_SIZE); \
buf_p += SRC_SIZE; \
saved_p += SRC_SIZE; \
} \
- HDfree(tmp1); \
- HDfree(tmp2); \
+ free(tmp1); \
+ free(tmp2); \
}
/* Allocate buffer and initialize it with floating-point special values, +/-0, +/-infinity,
@@ -340,24 +340,24 @@ static int without_hardware_g = 0;
/* Allocate buffers */ \
BUF = (unsigned char *)aligned_malloc(NELMTS * MAX(SRC_SIZE, DST_SIZE)); \
SAVED = (unsigned char *)aligned_malloc(NELMTS * MAX(SRC_SIZE, DST_SIZE)); \
- HDmemset(BUF, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
- HDmemset(SAVED, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
- value = (unsigned char *)HDcalloc(SRC_SIZE, sizeof(unsigned char)); \
+ memset(BUF, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
+ memset(SAVED, 0, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
+ value = (unsigned char *)calloc(SRC_SIZE, sizeof(unsigned char)); \
\
buf_p = BUF; \
\
/* +0 */ \
H5T__bit_set(value, (size_t)0, SRC_PREC, FALSE); \
- HDmemcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
+ memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
buf_p += SRC_SIZE; \
\
for (n = 0; n < 2; n++) { \
if (n == 1) { \
- HDmemset(value, 0, SRC_SIZE * sizeof(unsigned char)); \
+ memset(value, 0, SRC_SIZE * sizeof(unsigned char)); \
/* -0 */ \
H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, TRUE); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
- HDmemcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
+ memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
buf_p += SRC_SIZE; \
} \
@@ -365,27 +365,27 @@ static int without_hardware_g = 0;
/* +/-infinity */ \
H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 1), SRC_PREC - SRC_MANT_DIG, TRUE); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
- HDmemcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
+ memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
buf_p += SRC_SIZE; \
\
/* +/-SNaN */ \
H5T__bit_set(value, (size_t)0, (size_t)1, TRUE); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
- HDmemcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
+ memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
buf_p += SRC_SIZE; \
\
/* +/-QNaN */ \
H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 2), (size_t)1, TRUE); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
- HDmemcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
+ memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
buf_p += SRC_SIZE; \
} \
\
- HDmemcpy(SAVED, BUF, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
- HDfree(value); \
+ memcpy(SAVED, BUF, NELMTS *MAX(SRC_SIZE, DST_SIZE)); \
+ free(value); \
}
static hbool_t overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits);
@@ -414,7 +414,7 @@ fpe_handler(int H5_ATTR_UNUSED signo)
HDputs(" Remaining tests could not be run.");
HDputs(" Please turn off SIGFPE on overflows and try again.");
#endif
- HDexit(255);
+ exit(255);
}
/*-------------------------------------------------------------------------
@@ -522,7 +522,7 @@ test_hard_query(void)
/* Verify the conversion from int to float is a hard conversion. */
if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != TRUE) {
H5_FAILED();
- HDprintf("Can't query conversion function\n");
+ printf("Can't query conversion function\n");
goto error;
}
@@ -532,7 +532,7 @@ test_hard_query(void)
(H5T_conv_t)((void (*)(void))H5T__conv_int_float));
if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != FALSE) {
H5_FAILED();
- HDprintf("Can't query conversion function\n");
+ printf("Can't query conversion function\n");
goto error;
}
@@ -542,7 +542,7 @@ test_hard_query(void)
(H5T_conv_t)((void (*)(void))H5T__conv_int_float));
if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != TRUE) {
H5_FAILED();
- HDprintf("Can't query conversion function\n");
+ printf("Can't query conversion function\n");
goto error;
}
@@ -637,7 +637,7 @@ test_particular_fp_integer(void)
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) {
H5_FAILED();
- HDprintf("Can't create data transfer property list\n");
+ printf("Can't create data transfer property list\n");
goto error;
}
@@ -645,28 +645,28 @@ test_particular_fp_integer(void)
endian = H5Tget_order(H5T_NATIVE_DOUBLE);
src_size1 = H5Tget_size(H5T_NATIVE_DOUBLE);
dst_size1 = H5Tget_size(H5T_NATIVE_SCHAR);
- buf1 = (unsigned char *)HDcalloc((size_t)1, (size_t)MAX(src_size1, dst_size1));
- saved_buf1 = (unsigned char *)HDcalloc((size_t)1, (size_t)MAX(src_size1, dst_size1));
+ buf1 = (unsigned char *)calloc((size_t)1, (size_t)MAX(src_size1, dst_size1));
+ saved_buf1 = (unsigned char *)calloc((size_t)1, (size_t)MAX(src_size1, dst_size1));
- HDmemcpy(buf1, &src_d, src_size1);
- HDmemcpy(saved_buf1, &src_d, src_size1);
+ memcpy(buf1, &src_d, src_size1);
+ memcpy(saved_buf1, &src_d, src_size1);
/* Register exception handling function and signal the destination is "signed char". */
flag = 1;
if (H5Pset_type_conv_cb(dxpl_id, expt_handle, &flag) < 0) {
H5_FAILED();
- HDprintf("Can't register conversion callback\n");
+ printf("Can't register conversion callback\n");
goto error;
}
/* Do conversion */
if (H5Tconvert(H5T_NATIVE_DOUBLE, H5T_NATIVE_SCHAR, (size_t)1, buf1, NULL, dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't convert data\n");
+ printf("Can't convert data\n");
goto error;
}
- HDmemcpy(&dst_c, buf1, dst_size1);
+ memcpy(&dst_c, buf1, dst_size1);
/* Print errors */
if (dst_c != SCHAR_MAX) {
@@ -676,29 +676,29 @@ test_particular_fp_integer(void)
if (0 == fails_this_test++)
H5_FAILED();
- HDprintf(" test double to signed char:\n");
- HDprintf(" src = ");
+ printf(" test double to signed char:\n");
+ printf(" src = ");
for (j = 0; j < src_size1; j++)
- HDprintf(" %02x", saved_buf1[ENDIAN(src_size1, j, endian)]);
+ printf(" %02x", saved_buf1[ENDIAN(src_size1, j, endian)]);
- HDmemcpy(&x, saved_buf1, src_size1);
- HDprintf(" %29.20e\n", x);
+ memcpy(&x, saved_buf1, src_size1);
+ printf(" %29.20e\n", x);
- HDprintf(" dst = ");
+ printf(" dst = ");
for (j = 0; j < dst_size1; j++)
- HDprintf(" %02x", buf1[ENDIAN(dst_size1, j, endian)]);
+ printf(" %02x", buf1[ENDIAN(dst_size1, j, endian)]);
- HDmemcpy(&y, buf1, dst_size1);
- HDprintf(" %29d\n", y);
+ memcpy(&y, buf1, dst_size1);
+ printf(" %29d\n", y);
}
/* Test conversion from float (the value is INT_MAX) to int. */
src_size2 = H5Tget_size(H5T_NATIVE_FLOAT);
dst_size2 = H5Tget_size(H5T_NATIVE_INT);
- buf2 = (unsigned char *)HDcalloc((size_t)1, (size_t)MAX(src_size2, dst_size2));
- saved_buf2 = (unsigned char *)HDcalloc((size_t)1, (size_t)MAX(src_size2, dst_size2));
- HDmemcpy(buf2, &src_f, src_size2);
- HDmemcpy(saved_buf2, &src_f, src_size2);
+ buf2 = (unsigned char *)calloc((size_t)1, (size_t)MAX(src_size2, dst_size2));
+ saved_buf2 = (unsigned char *)calloc((size_t)1, (size_t)MAX(src_size2, dst_size2));
+ memcpy(buf2, &src_f, src_size2);
+ memcpy(saved_buf2, &src_f, src_size2);
/* signal exception handling function that the destination is "int". */
flag = 0;
@@ -706,11 +706,11 @@ test_particular_fp_integer(void)
/* Do conversion */
if (H5Tconvert(H5T_NATIVE_FLOAT, H5T_NATIVE_INT, (size_t)1, buf2, NULL, dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't convert data\n");
+ printf("Can't convert data\n");
goto error;
}
- HDmemcpy(&dst_i, buf2, dst_size2);
+ memcpy(&dst_i, buf2, dst_size2);
/* Print errors */
if (dst_i != fill_value) {
@@ -720,20 +720,20 @@ test_particular_fp_integer(void)
if (0 == fails_this_test++)
H5_FAILED();
- HDprintf(" test float to int:\n");
- HDprintf(" src = ");
+ printf(" test float to int:\n");
+ printf(" src = ");
for (j = 0; j < src_size2; j++)
- HDprintf(" %02x", saved_buf2[ENDIAN(src_size2, j, endian)]);
+ printf(" %02x", saved_buf2[ENDIAN(src_size2, j, endian)]);
- HDmemcpy(&x, saved_buf2, src_size2);
- HDprintf(" %29.20e\n", (double)x);
+ memcpy(&x, saved_buf2, src_size2);
+ printf(" %29.20e\n", (double)x);
- HDprintf(" dst = ");
+ printf(" dst = ");
for (j = 0; j < dst_size2; j++)
- HDprintf(" %02x", buf2[ENDIAN(dst_size2, j, endian)]);
+ printf(" %02x", buf2[ENDIAN(dst_size2, j, endian)]);
- HDmemcpy(&y, buf2, dst_size2);
- HDprintf(" %29d\n", y);
+ memcpy(&y, buf2, dst_size2);
+ printf(" %29d\n", y);
}
if (fails_this_test)
@@ -741,37 +741,37 @@ test_particular_fp_integer(void)
if (H5Pclose(dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't close property list\n");
+ printf("Can't close property list\n");
goto error;
}
if (buf1)
- HDfree(buf1);
+ free(buf1);
if (buf2)
- HDfree(buf2);
+ free(buf2);
if (saved_buf1)
- HDfree(saved_buf1);
+ free(saved_buf1);
if (saved_buf2)
- HDfree(saved_buf2);
+ free(saved_buf2);
PASSED();
return 0;
error:
- HDfflush(stdout);
+ fflush(stdout);
H5E_BEGIN_TRY
{
H5Pclose(dxpl_id);
}
H5E_END_TRY;
if (buf1)
- HDfree(buf1);
+ free(buf1);
if (buf2)
- HDfree(buf2);
+ free(buf2);
if (saved_buf1)
- HDfree(saved_buf1);
+ free(saved_buf1);
if (saved_buf2)
- HDfree(saved_buf2);
+ free(saved_buf2);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -818,25 +818,25 @@ test_derived_flt(void)
h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename);
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf("Can't create file\n");
+ printf("Can't create file\n");
goto error;
}
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) {
H5_FAILED();
- HDprintf("Can't create data transfer property list\n");
+ printf("Can't create data transfer property list\n");
goto error;
}
if ((tid1 = H5Tcopy(H5T_IEEE_F64LE)) < 0) {
H5_FAILED();
- HDprintf("Can't copy data type\n");
+ printf("Can't copy data type\n");
goto error;
}
if ((tid2 = H5Tcopy(H5T_IEEE_F32LE)) < 0) {
H5_FAILED();
- HDprintf("Can't copy data type\n");
+ printf("Can't copy data type\n");
goto error;
}
@@ -860,44 +860,44 @@ test_derived_flt(void)
*-----------------------------------------------------------------------*/
if (H5Tset_fields(tid1, (size_t)44, (size_t)34, (size_t)10, (size_t)3, (size_t)31) < 0) {
H5_FAILED();
- HDprintf("Can't set fields\n");
+ printf("Can't set fields\n");
goto error;
}
if (H5Tset_offset(tid1, (size_t)3) < 0) {
H5_FAILED();
- HDprintf("Can't set offset\n");
+ printf("Can't set offset\n");
goto error;
}
if (H5Tset_precision(tid1, (size_t)42) < 0) {
H5_FAILED();
- HDprintf("Can't set precision 1\n");
+ printf("Can't set precision 1\n");
goto error;
}
if (H5Tset_size(tid1, (size_t)7) < 0) {
H5_FAILED();
- HDprintf("Can't set size\n");
+ printf("Can't set size\n");
goto error;
}
if (H5Tset_ebias(tid1, (size_t)511) < 0) {
H5_FAILED();
- HDprintf("Can't set exponent bias\n");
+ printf("Can't set exponent bias\n");
goto error;
}
if (H5Tset_pad(tid1, H5T_PAD_ZERO, H5T_PAD_ZERO) < 0) {
H5_FAILED();
- HDprintf("Can't set padding\n");
+ printf("Can't set padding\n");
goto error;
}
if (H5Tcommit2(file, "new float type 1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Can't set inpad\n");
+ printf("Can't set inpad\n");
goto error;
}
if (H5Tclose(tid1) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
@@ -905,33 +905,33 @@ test_derived_flt(void)
FAIL_PUTS_ERROR("Can't open datatype");
if (H5Tget_fields(tid1, &spos, &epos, &esize, &mpos, &msize) < 0) {
H5_FAILED();
- HDprintf("Can't get fields\n");
+ printf("Can't get fields\n");
goto error;
}
if (spos != 44 || epos != 34 || esize != 10 || mpos != 3 || msize != 31) {
H5_FAILED();
- HDprintf("Wrong field values\n");
+ printf("Wrong field values\n");
goto error;
}
if (H5Tget_precision(tid1) != 42) {
H5_FAILED();
- HDprintf("Can't get precision or wrong precision\n");
+ printf("Can't get precision or wrong precision\n");
goto error;
}
if (H5Tget_offset(tid1) != 3) {
H5_FAILED();
- HDprintf("Can't get offset or wrong offset\n");
+ printf("Can't get offset or wrong offset\n");
goto error;
}
if ((size = H5Tget_size(tid1)) != 7) {
H5_FAILED();
- HDprintf("Can't get size or wrong size\n");
+ printf("Can't get size or wrong size\n");
goto error;
}
if (H5Tget_ebias(tid1) != 511) {
H5_FAILED();
- HDprintf("Can't get exponent bias or wrong bias\n");
+ printf("Can't get exponent bias or wrong bias\n");
goto error;
}
@@ -941,11 +941,11 @@ test_derived_flt(void)
*/
src_size = H5Tget_size(H5T_NATIVE_INT);
endian = H5Tget_order(H5T_NATIVE_INT);
- buf = (unsigned char *)HDmalloc(nelmts * (MAX(src_size, size)));
- saved_buf = (unsigned char *)HDmalloc(nelmts * src_size);
- HDmemset(buf, 0, nelmts * MAX(src_size, size));
- HDmemset(saved_buf, 0, nelmts * src_size);
- aligned = (int *)HDcalloc((size_t)1, src_size);
+ buf = (unsigned char *)malloc(nelmts * (MAX(src_size, size)));
+ saved_buf = (unsigned char *)malloc(nelmts * src_size);
+ memset(buf, 0, nelmts * MAX(src_size, size));
+ memset(saved_buf, 0, nelmts * src_size);
+ aligned = (int *)calloc((size_t)1, src_size);
for (i = 0; i < nelmts * src_size; i++)
buf[i] = saved_buf[i] = (unsigned char)HDrand();
@@ -954,13 +954,13 @@ test_derived_flt(void)
* The mantissa is big enough to retain the integer's precision. */
if (H5Tconvert(H5T_NATIVE_INT, tid1, nelmts, buf, NULL, dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't convert data\n");
+ printf("Can't convert data\n");
goto error;
}
/* Convert data from the derived floating-point type back to native integer. */
if (H5Tconvert(tid1, H5T_NATIVE_INT, nelmts, buf, NULL, dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't convert data\n");
+ printf("Can't convert data\n");
goto error;
}
@@ -976,25 +976,25 @@ test_derived_flt(void)
if (0 == fails_this_test++) {
HDsnprintf(str, sizeof(str),
"\nTesting random sw derived floating-point -> derived floating-point conversions");
- HDprintf("%-70s", str);
- HDfflush(stdout);
+ printf("%-70s", str);
+ fflush(stdout);
H5_FAILED();
}
- HDprintf(" test %u elmt %u: \n", 1, (unsigned)i);
+ printf(" test %u elmt %u: \n", 1, (unsigned)i);
- HDprintf(" src = ");
+ printf(" src = ");
for (j = 0; j < src_size; j++)
- HDprintf(" %02x", saved_buf[i * src_size + ENDIAN(src_size, j, endian)]);
+ printf(" %02x", saved_buf[i * src_size + ENDIAN(src_size, j, endian)]);
- HDmemcpy(aligned, saved_buf + i * sizeof(int), sizeof(int));
- HDprintf(" %29d\n", *aligned);
+ memcpy(aligned, saved_buf + i * sizeof(int), sizeof(int));
+ printf(" %29d\n", *aligned);
- HDprintf(" dst = ");
+ printf(" dst = ");
for (j = 0; j < src_size; j++)
- HDprintf(" %02x", buf[i * src_size + ENDIAN(src_size, j, endian)]);
+ printf(" %02x", buf[i * src_size + ENDIAN(src_size, j, endian)]);
- HDmemcpy(aligned, buf + i * sizeof(int), sizeof(int));
- HDprintf(" %29d\n", *aligned);
+ memcpy(aligned, buf + i * sizeof(int), sizeof(int));
+ printf(" %29d\n", *aligned);
if (fails_this_test >= max_fails) {
HDputs(" maximum failures reached, aborting test...");
@@ -1003,9 +1003,9 @@ test_derived_flt(void)
}
fails_this_test = 0;
- HDfree(buf);
- HDfree(saved_buf);
- HDfree(aligned);
+ free(buf);
+ free(saved_buf);
+ free(aligned);
buf = NULL;
saved_buf = NULL;
aligned = NULL;
@@ -1021,43 +1021,43 @@ test_derived_flt(void)
*--------------------------------------------------------------------------*/
if (H5Tset_fields(tid2, (size_t)23, (size_t)16, (size_t)7, (size_t)0, (size_t)16) < 0) {
H5_FAILED();
- HDprintf("Can't set fields\n");
+ printf("Can't set fields\n");
goto error;
}
if (H5Tset_offset(tid2, (size_t)0) < 0) {
H5_FAILED();
- HDprintf("Can't set offset\n");
+ printf("Can't set offset\n");
goto error;
}
if (H5Tset_precision(tid2, (size_t)24) < 0) {
H5_FAILED();
- HDprintf("Can't set precision 2\n");
+ printf("Can't set precision 2\n");
goto error;
}
if (H5Tset_size(tid2, (size_t)3) < 0) {
H5_FAILED();
- HDprintf("Can't set size\n");
+ printf("Can't set size\n");
goto error;
}
if (H5Tset_ebias(tid2, (size_t)63) < 0) {
H5_FAILED();
- HDprintf("Can't set size\n");
+ printf("Can't set size\n");
goto error;
}
if (H5Tset_pad(tid2, H5T_PAD_ZERO, H5T_PAD_ZERO) < 0) {
H5_FAILED();
- HDprintf("Can't set padding\n");
+ printf("Can't set padding\n");
goto error;
}
if (H5Tcommit2(file, "new float type 2", tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Can't set inpad\n");
+ printf("Can't set inpad\n");
goto error;
}
if (H5Tclose(tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
@@ -1065,33 +1065,33 @@ test_derived_flt(void)
FAIL_PUTS_ERROR("Can't open datatype");
if (H5Tget_fields(tid2, &spos, &epos, &esize, &mpos, &msize) < 0) {
H5_FAILED();
- HDprintf("Can't get fields\n");
+ printf("Can't get fields\n");
goto error;
}
if (spos != 23 || epos != 16 || esize != 7 || mpos != 0 || msize != 16) {
H5_FAILED();
- HDprintf("Wrong field values\n");
+ printf("Wrong field values\n");
goto error;
}
if (H5Tget_precision(tid2) != 24) {
H5_FAILED();
- HDprintf("Can't get precision or wrong precision\n");
+ printf("Can't get precision or wrong precision\n");
goto error;
}
if (H5Tget_offset(tid2) != 0) {
H5_FAILED();
- HDprintf("Can't get offset or wrong offset\n");
+ printf("Can't get offset or wrong offset\n");
goto error;
}
if ((size = H5Tget_size(tid2)) != 3) {
H5_FAILED();
- HDprintf("Can't get size or wrong size\n");
+ printf("Can't get size or wrong size\n");
goto error;
}
if (H5Tget_ebias(tid2) != 63) {
H5_FAILED();
- HDprintf("Can't get exponent bias or wrong bias\n");
+ printf("Can't get exponent bias or wrong bias\n");
goto error;
}
@@ -1102,10 +1102,10 @@ test_derived_flt(void)
src_size = H5Tget_size(tid2);
dst_size = H5Tget_size(tid1);
endian = H5Tget_order(tid2);
- buf = (unsigned char *)HDmalloc(nelmts * (MAX(src_size, dst_size)));
- saved_buf = (unsigned char *)HDmalloc(nelmts * src_size);
- HDmemset(buf, 0, nelmts * MAX(src_size, dst_size));
- HDmemset(saved_buf, 0, nelmts * src_size);
+ buf = (unsigned char *)malloc(nelmts * (MAX(src_size, dst_size)));
+ saved_buf = (unsigned char *)malloc(nelmts * src_size);
+ memset(buf, 0, nelmts * MAX(src_size, dst_size));
+ memset(saved_buf, 0, nelmts * src_size);
for (i = 0; i < nelmts * src_size; i++)
buf[i] = saved_buf[i] = (unsigned char)HDrand();
@@ -1115,13 +1115,13 @@ test_derived_flt(void)
* the precision and exponent power. */
if (H5Tconvert(tid2, tid1, nelmts, buf, NULL, dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't convert data\n");
+ printf("Can't convert data\n");
goto error;
}
/* Convert data from the 1st back to the 2nd derived floating-point type. */
if (H5Tconvert(tid1, tid2, nelmts, buf, NULL, dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't convert data\n");
+ printf("Can't convert data\n");
goto error;
}
@@ -1145,21 +1145,21 @@ test_derived_flt(void)
if (0 == fails_this_test++) {
HDsnprintf(str, sizeof(str),
"\nTesting random sw derived floating-point -> derived floating-point conversions");
- HDprintf("%-70s", str);
- HDfflush(stdout);
+ printf("%-70s", str);
+ fflush(stdout);
H5_FAILED();
}
- HDprintf(" test %u elmt %u: \n", 1, (unsigned)i);
+ printf(" test %u elmt %u: \n", 1, (unsigned)i);
- HDprintf(" src = ");
+ printf(" src = ");
for (j = 0; j < src_size; j++)
- HDprintf(" %02x", saved_buf[i * src_size + ENDIAN(src_size, j, endian)]);
- HDprintf("\n");
+ printf(" %02x", saved_buf[i * src_size + ENDIAN(src_size, j, endian)]);
+ printf("\n");
- HDprintf(" dst = ");
+ printf(" dst = ");
for (j = 0; j < src_size; j++)
- HDprintf(" %02x", buf[i * src_size + ENDIAN(src_size, j, endian)]);
- HDprintf("\n");
+ printf(" %02x", buf[i * src_size + ENDIAN(src_size, j, endian)]);
+ printf("\n");
if (fails_this_test >= max_fails) {
HDputs(" maximum failures reached, aborting test...");
@@ -1168,31 +1168,31 @@ test_derived_flt(void)
}
if (buf)
- HDfree(buf);
+ free(buf);
if (saved_buf)
- HDfree(saved_buf);
+ free(saved_buf);
if (H5Tclose(tid1) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Tclose(tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Pclose(dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't close property list\n");
+ printf("Can't close property list\n");
goto error;
}
if (H5Fclose(file) < 0) {
H5_FAILED();
- HDprintf("Can't close file\n");
+ printf("Can't close file\n");
goto error;
} /* end if */
@@ -1207,12 +1207,12 @@ test_derived_flt(void)
error:
if (buf)
- HDfree(buf);
+ free(buf);
if (saved_buf)
- HDfree(saved_buf);
+ free(saved_buf);
if (aligned)
- HDfree(aligned);
- HDfflush(stdout);
+ free(aligned);
+ fflush(stdout);
H5E_BEGIN_TRY
{
H5Tclose(tid1);
@@ -1265,25 +1265,25 @@ test_derived_integer(void)
h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof filename);
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf("Can't create file\n");
+ printf("Can't create file\n");
goto error;
}
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) {
H5_FAILED();
- HDprintf("Can't create data transfer property list\n");
+ printf("Can't create data transfer property list\n");
goto error;
}
if ((tid1 = H5Tcopy(H5T_STD_I32LE)) < 0) {
H5_FAILED();
- HDprintf("Can't copy data type\n");
+ printf("Can't copy data type\n");
goto error;
}
if ((tid2 = H5Tcopy(H5T_STD_U64LE)) < 0) {
H5_FAILED();
- HDprintf("Can't copy data type\n");
+ printf("Can't copy data type\n");
goto error;
}
@@ -1301,37 +1301,37 @@ test_derived_integer(void)
*--------------------------------------------------------------------------*/
if (H5Tset_offset(tid1, (size_t)0) < 0) {
H5_FAILED();
- HDprintf("Can't set offset\n");
+ printf("Can't set offset\n");
goto error;
}
if (H5Tset_size(tid1, (size_t)3) < 0) {
H5_FAILED();
- HDprintf("Can't set size\n");
+ printf("Can't set size\n");
goto error;
}
if (H5Tset_precision(tid1, (size_t)24) < 0) {
H5_FAILED();
- HDprintf("Can't set precision\n");
+ printf("Can't set precision\n");
goto error;
}
if (H5Tset_order(tid1, H5T_ORDER_BE) < 0) {
H5_FAILED();
- HDprintf("Can't set order\n");
+ printf("Can't set order\n");
goto error;
}
if (H5Tcommit2(file, "new integer type 1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Can't commit data type\n");
+ printf("Can't commit data type\n");
goto error;
}
if (H5Tclose(tid1) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
@@ -1339,22 +1339,22 @@ test_derived_integer(void)
FAIL_PUTS_ERROR("Can't open datatype");
if (H5Tget_precision(tid1) != 24) {
H5_FAILED();
- HDprintf("Can't get precision or wrong precision\n");
+ printf("Can't get precision or wrong precision\n");
goto error;
}
if (H5Tget_offset(tid1) != 0) {
H5_FAILED();
- HDprintf("Can't get offset or wrong offset\n");
+ printf("Can't get offset or wrong offset\n");
goto error;
}
if (H5Tget_size(tid1) != 3) {
H5_FAILED();
- HDprintf("Can't get size or wrong size\n");
+ printf("Can't get size or wrong size\n");
goto error;
}
if (H5Tget_order(tid1) != H5T_ORDER_BE) {
H5_FAILED();
- HDprintf("Can't get order or wrong order\n");
+ printf("Can't get order or wrong order\n");
goto error;
}
@@ -1368,31 +1368,31 @@ test_derived_integer(void)
*--------------------------------------------------------------------------*/
if (H5Tset_precision(tid2, (size_t)48) < 0) {
H5_FAILED();
- HDprintf("Can't set precision\n");
+ printf("Can't set precision\n");
goto error;
}
if (H5Tset_offset(tid2, (size_t)10) < 0) {
H5_FAILED();
- HDprintf("Can't set offset\n");
+ printf("Can't set offset\n");
goto error;
}
if (H5Tset_sign(tid2, H5T_SGN_2) < 0) {
H5_FAILED();
- HDprintf("Can't set offset\n");
+ printf("Can't set offset\n");
goto error;
}
if (H5Tcommit2(file, "new integer type 2", tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Can't commit data type\n");
+ printf("Can't commit data type\n");
goto error;
}
if (H5Tclose(tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
@@ -1400,22 +1400,22 @@ test_derived_integer(void)
FAIL_PUTS_ERROR("Can't open datatype");
if (H5Tget_precision(tid2) != 48) {
H5_FAILED();
- HDprintf("Can't get precision or wrong precision\n");
+ printf("Can't get precision or wrong precision\n");
goto error;
}
if (H5Tget_offset(tid2) != 10) {
H5_FAILED();
- HDprintf("Can't get offset or wrong offset\n");
+ printf("Can't get offset or wrong offset\n");
goto error;
}
if (H5Tget_size(tid2) != 8) {
H5_FAILED();
- HDprintf("Can't get size or wrong size\n");
+ printf("Can't get size or wrong size\n");
goto error;
}
if (H5Tget_sign(tid2) != H5T_SGN_2) {
H5_FAILED();
- HDprintf("Can't get sign or wrong sign\n");
+ printf("Can't get sign or wrong sign\n");
goto error;
}
@@ -1426,10 +1426,10 @@ test_derived_integer(void)
src_size = H5Tget_size(tid1);
dst_size = H5Tget_size(tid2);
endian = H5Tget_order(tid1);
- buf = (unsigned char *)HDmalloc(nelmts * (MAX(src_size, dst_size)));
- saved_buf = (unsigned char *)HDmalloc(nelmts * src_size);
- HDmemset(buf, 0, nelmts * MAX(src_size, dst_size));
- HDmemset(saved_buf, 0, nelmts * src_size);
+ buf = (unsigned char *)malloc(nelmts * (MAX(src_size, dst_size)));
+ saved_buf = (unsigned char *)malloc(nelmts * src_size);
+ memset(buf, 0, nelmts * MAX(src_size, dst_size));
+ memset(saved_buf, 0, nelmts * src_size);
for (i = 0; i < nelmts * src_size; i++)
buf[i] = saved_buf[i] = (unsigned char)HDrand();
@@ -1439,13 +1439,13 @@ test_derived_integer(void)
* the 1st type's precision. */
if (H5Tconvert(tid1, tid2, nelmts, buf, NULL, dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't convert data\n");
+ printf("Can't convert data\n");
goto error;
}
/* Convert data from the 2nd back to the 1st derived integer type. */
if (H5Tconvert(tid2, tid1, nelmts, buf, NULL, dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't convert data\n");
+ printf("Can't convert data\n");
goto error;
}
@@ -1461,21 +1461,21 @@ test_derived_integer(void)
if (0 == fails_this_test++) {
HDsnprintf(str, sizeof(str),
"\nTesting random sw derived integer -> derived integer conversions");
- HDprintf("%-70s", str);
- HDfflush(stdout);
+ printf("%-70s", str);
+ fflush(stdout);
H5_FAILED();
}
- HDprintf(" test %u elmt %u: \n", 1, (unsigned)i);
+ printf(" test %u elmt %u: \n", 1, (unsigned)i);
- HDprintf(" src = ");
+ printf(" src = ");
for (j = 0; j < src_size; j++)
- HDprintf(" %02x", saved_buf[i * src_size + ENDIAN(src_size, j, endian)]);
- HDprintf("\n");
+ printf(" %02x", saved_buf[i * src_size + ENDIAN(src_size, j, endian)]);
+ printf("\n");
- HDprintf(" dst = ");
+ printf(" dst = ");
for (j = 0; j < src_size; j++)
- HDprintf(" %02x", buf[i * src_size + ENDIAN(src_size, j, endian)]);
- HDprintf("\n");
+ printf(" %02x", buf[i * src_size + ENDIAN(src_size, j, endian)]);
+ printf("\n");
if (fails_this_test >= max_fails) {
HDputs(" maximum failures reached, aborting test...");
@@ -1485,30 +1485,30 @@ test_derived_integer(void)
if (H5Tclose(tid1) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Tclose(tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Pclose(dxpl_id) < 0) {
H5_FAILED();
- HDprintf("Can't close property list\n");
+ printf("Can't close property list\n");
goto error;
}
if (H5Fclose(file) < 0) {
H5_FAILED();
- HDprintf("Can't close file\n");
+ printf("Can't close file\n");
goto error;
} /* end if */
- HDfree(buf);
- HDfree(saved_buf);
+ free(buf);
+ free(saved_buf);
PASSED();
@@ -1521,10 +1521,10 @@ test_derived_integer(void)
error:
if (buf)
- HDfree(buf);
+ free(buf);
if (saved_buf)
- HDfree(saved_buf);
- HDfflush(stdout);
+ free(saved_buf);
+ fflush(stdout);
H5E_BEGIN_TRY
{
H5Tclose(tid1);
@@ -1692,15 +1692,15 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
/* Sanity checks */
if (OTHER == src_type || OTHER == dst_type) {
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
- HDprintf("%-70s", str);
+ printf("%-70s", str);
H5_FAILED();
HDputs(" Unknown data type.");
goto error;
}
else {
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
- HDprintf("%-70s", str);
- HDfflush(stdout);
+ printf("%-70s", str);
+ fflush(stdout);
fails_this_test = 0;
}
@@ -1712,7 +1712,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
dst_nbits = H5Tget_precision(dst); /* not 8*dst_size, esp on J90 - QAK */
src_sign = H5Tget_sign(src);
dst_sign = H5Tget_sign(dst);
- aligned = HDcalloc((size_t)1, sizeof(long long));
+ aligned = calloc((size_t)1, sizeof(long long));
/* Allocate and initialize the source buffer through macro INIT_INTEGER. The BUF
* will be used for the conversion while the SAVED buffer will be
@@ -1761,43 +1761,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_char;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_char = (signed char)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_char = (signed char)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_char = (signed char)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_char = (signed char)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_char = (signed char)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_char = (signed char)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_char = (signed char)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_char = (signed char)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_char = (signed char)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_char = (signed char)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -1805,7 +1805,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -1813,43 +1813,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_uchar;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_uchar = (unsigned char)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_uchar = (unsigned char)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_uchar = (unsigned char)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_uchar = (unsigned char)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_uchar = (unsigned char)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_uchar = (unsigned char)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_uchar = (unsigned char)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_uchar = (unsigned char)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_uchar = (unsigned char)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_uchar = (unsigned char)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -1857,7 +1857,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -1865,43 +1865,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_short;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(char), sizeof(char));
+ memcpy(aligned, saved + j * sizeof(char), sizeof(char));
hw_short = (short)(*((char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_short = (short)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_short = (short)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_short = (short)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_short = (short)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_short = (short)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_short = (short)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_short = (short)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_short = (short)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_short = (short)(*((unsigned long long *)aligned));
break;
@@ -1910,7 +1910,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -1918,43 +1918,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_ushort;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_ushort = (unsigned short)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_ushort = (unsigned short)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_ushort = (unsigned short)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_ushort = (unsigned short)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_ushort = (unsigned short)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_ushort = (unsigned short)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_ushort = (unsigned short)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_ushort = (unsigned short)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_ushort = (unsigned short)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_ushort = (unsigned short)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -1962,7 +1962,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -1970,43 +1970,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_int;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_int = (int)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_int = (int)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_int = (int)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_int = (int)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_int = (int)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_int = (int)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_int = (int)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_int = (int)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_int = (int)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_int = (int)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -2014,7 +2014,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -2022,43 +2022,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_uint;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_uint = (unsigned int)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_uint = (unsigned int)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_uint = (unsigned int)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_uint = (unsigned int)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_uint = (unsigned int)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_uint = (unsigned int)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_uint = (unsigned int)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_uint = (unsigned int)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_uint = (unsigned int)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_uint = (unsigned int)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -2066,7 +2066,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -2074,43 +2074,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_long;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_long = (long int)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_long = (long int)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_long = (long int)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_long = (long int)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_long = (long int)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_long = (long int)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_long = (long int)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_long = (long int)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_long = (long int)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_long = (long int)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -2118,7 +2118,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -2126,43 +2126,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_ulong;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_ulong = (unsigned long)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_ulong = (unsigned long)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_ulong = (unsigned long)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_ulong = (unsigned long)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_ulong = (unsigned long)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_ulong = (unsigned long)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_ulong = (unsigned long)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_ulong = (unsigned long)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_ulong = (unsigned long)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_ulong = (unsigned long)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -2170,7 +2170,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -2178,43 +2178,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_llong;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(char), sizeof(char));
+ memcpy(aligned, saved + j * sizeof(char), sizeof(char));
hw_llong = (long long)(*((char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_llong = (long long)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_llong = (long long)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_llong = (long long)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_llong = (long long)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_llong = (long long)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_llong = (long long)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_llong = (long long)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_llong = (long long)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_llong = (long long)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -2222,7 +2222,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -2230,43 +2230,43 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_ullong;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_ullong = (unsigned long long)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_ullong = (unsigned long long)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_ullong = (unsigned long long)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_ullong = (unsigned long long)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_ullong = (unsigned long long)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_ullong = (unsigned long long)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_ullong = (unsigned long long)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_ullong = (unsigned long long)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_ullong = (unsigned long long)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_ullong = (unsigned long long)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -2274,13 +2274,13 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
/* Make certain that there isn't some weird number of destination bits */
- HDassert(dst_nbits % 8 == 0);
+ assert(dst_nbits % 8 == 0);
/* Are the two results the same? */
for (k = (dst_size - (dst_nbits / 8)); k < dst_size; k++)
@@ -2404,157 +2404,157 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
/* Print errors */
if (0 == fails_this_test++)
H5_FAILED();
- HDprintf(" elmt %u\n", (unsigned)j);
+ printf(" elmt %u\n", (unsigned)j);
- HDprintf(" src = ");
+ printf(" src = ");
for (k = 0; k < src_size; k++)
- HDprintf(" %02x", saved[j * src_size + ENDIAN(src_size, k, endian)]);
- HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), "");
+ printf(" %02x", saved[j * src_size + ENDIAN(src_size, k, endian)]);
+ printf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), "");
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
- HDprintf(" %29d\n", (int)*((signed char *)aligned));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ printf(" %29d\n", (int)*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
- HDprintf(" %29u\n", (unsigned)*((unsigned char *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ printf(" %29u\n", (unsigned)*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
- HDprintf(" %29hd\n", *((short *)aligned));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ printf(" %29hd\n", *((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
- HDprintf(" %29hu\n", *((unsigned short *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ printf(" %29hu\n", *((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
- HDprintf(" %29d\n", *((int *)aligned));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ printf(" %29d\n", *((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
- HDprintf(" %29u\n", *((unsigned *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ printf(" %29u\n", *((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
- HDprintf(" %29ld\n", *((long *)aligned));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ printf(" %29ld\n", *((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
- HDprintf(" %29lu\n", *((unsigned long *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ printf(" %29lu\n", *((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
- HDfprintf(stdout, " %29lld\n", *((long long *)aligned));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ fprintf(stdout, " %29lld\n", *((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
- HDfprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ fprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
break;
case FLT_FLOAT:
case FLT_DOUBLE:
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
- HDprintf(" dst = ");
+ printf(" dst = ");
for (k = 0; k < dst_size; k++)
- HDprintf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, endian)]);
- HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
+ printf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, endian)]);
+ printf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
switch (dst_type) {
case INT_SCHAR:
- HDmemcpy(aligned, buf + j * sizeof(signed char), sizeof(signed char));
- HDprintf(" %29d\n", (int)*((signed char *)aligned));
+ memcpy(aligned, buf + j * sizeof(signed char), sizeof(signed char));
+ printf(" %29d\n", (int)*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, buf + j * sizeof(unsigned char), sizeof(unsigned char));
- HDprintf(" %29u\n", (unsigned)*((unsigned char *)aligned));
+ memcpy(aligned, buf + j * sizeof(unsigned char), sizeof(unsigned char));
+ printf(" %29u\n", (unsigned)*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, buf + j * sizeof(short), sizeof(short));
- HDprintf(" %29hd\n", *((short *)aligned));
+ memcpy(aligned, buf + j * sizeof(short), sizeof(short));
+ printf(" %29hd\n", *((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, buf + j * sizeof(unsigned short), sizeof(unsigned short));
- HDprintf(" %29hu\n", *((unsigned short *)aligned));
+ memcpy(aligned, buf + j * sizeof(unsigned short), sizeof(unsigned short));
+ printf(" %29hu\n", *((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, buf + j * sizeof(int), sizeof(int));
- HDprintf(" %29d\n", *((int *)aligned));
+ memcpy(aligned, buf + j * sizeof(int), sizeof(int));
+ printf(" %29d\n", *((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, buf + j * sizeof(unsigned), sizeof(unsigned));
- HDprintf(" %29u\n", *((unsigned *)aligned));
+ memcpy(aligned, buf + j * sizeof(unsigned), sizeof(unsigned));
+ printf(" %29u\n", *((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, buf + j * sizeof(long), sizeof(long));
- HDprintf(" %29ld\n", *((long *)aligned));
+ memcpy(aligned, buf + j * sizeof(long), sizeof(long));
+ printf(" %29ld\n", *((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, buf + j * sizeof(unsigned long), sizeof(unsigned long));
- HDprintf(" %29lu\n", *((unsigned long *)aligned));
+ memcpy(aligned, buf + j * sizeof(unsigned long), sizeof(unsigned long));
+ printf(" %29lu\n", *((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, buf + j * sizeof(long long), sizeof(long long));
- HDfprintf(stdout, " %29lld\n", *((long long *)aligned));
+ memcpy(aligned, buf + j * sizeof(long long), sizeof(long long));
+ fprintf(stdout, " %29lld\n", *((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, buf + j * sizeof(long long), sizeof(unsigned long long));
- HDfprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
+ memcpy(aligned, buf + j * sizeof(long long), sizeof(unsigned long long));
+ fprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
break;
case FLT_FLOAT:
case FLT_DOUBLE:
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
- HDprintf(" ans = ");
+ printf(" ans = ");
for (k = 0; k < dst_size; k++)
- HDprintf(" %02x", hw[ENDIAN(dst_size, k, endian)]);
- HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
+ printf(" %02x", hw[ENDIAN(dst_size, k, endian)]);
+ printf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
switch (dst_type) {
case INT_SCHAR:
- HDprintf(" %29d\n", (int)*((signed char *)((void *)hw)));
+ printf(" %29d\n", (int)*((signed char *)((void *)hw)));
break;
case INT_UCHAR:
- HDprintf(" %29u\n", (unsigned)*((unsigned char *)((void *)hw)));
+ printf(" %29u\n", (unsigned)*((unsigned char *)((void *)hw)));
break;
case INT_SHORT:
- HDprintf(" %29hd\n", *((short *)((void *)hw)));
+ printf(" %29hd\n", *((short *)((void *)hw)));
break;
case INT_USHORT:
- HDprintf(" %29hu\n", *((unsigned short *)((void *)hw)));
+ printf(" %29hu\n", *((unsigned short *)((void *)hw)));
break;
case INT_INT:
- HDprintf(" %29d\n", *((int *)((void *)hw)));
+ printf(" %29d\n", *((int *)((void *)hw)));
break;
case INT_UINT:
- HDprintf(" %29u\n", *((unsigned *)((void *)hw)));
+ printf(" %29u\n", *((unsigned *)((void *)hw)));
break;
case INT_LONG:
- HDprintf(" %29ld\n", *((long *)((void *)hw)));
+ printf(" %29ld\n", *((long *)((void *)hw)));
break;
case INT_ULONG:
- HDprintf(" %29lu\n", *((unsigned long *)((void *)hw)));
+ printf(" %29lu\n", *((unsigned long *)((void *)hw)));
break;
case INT_LLONG:
- HDfprintf(stdout, " %29lld\n", *((long long *)((void *)hw)));
+ fprintf(stdout, " %29lld\n", *((long long *)((void *)hw)));
break;
case INT_ULLONG:
- HDfprintf(stdout, " %29llu\n", *((unsigned long long *)((void *)hw)));
+ fprintf(stdout, " %29llu\n", *((unsigned long long *)((void *)hw)));
break;
case FLT_FLOAT:
case FLT_DOUBLE:
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
@@ -2572,8 +2572,8 @@ done:
if (saved)
aligned_free(saved);
if (aligned)
- HDfree(aligned);
- HDfflush(stdout);
+ free(aligned);
+ fflush(stdout);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -2588,8 +2588,8 @@ error:
if (saved)
aligned_free(saved);
if (aligned)
- HDfree(aligned);
- HDfflush(stdout);
+ free(aligned);
+ fflush(stdout);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -2621,11 +2621,11 @@ test_conv_int_2(void)
hid_t src_type, dst_type;
char *buf;
- HDprintf("%-70s", "Testing overlap calculations");
- HDfflush(stdout);
+ printf("%-70s", "Testing overlap calculations");
+ fflush(stdout);
- buf = (char *)HDcalloc(TMP_BUF_DIM1, TMP_BUF_DIM2);
- HDassert(buf);
+ buf = (char *)calloc(TMP_BUF_DIM1, TMP_BUF_DIM2);
+ assert(buf);
for (i = 1; i <= TMP_BUF_DIM1; i++) {
for (j = 1; j <= TMP_BUF_DIM1; j++) {
@@ -2648,7 +2648,7 @@ test_conv_int_2(void)
}
}
PASSED();
- HDfree(buf);
+ free(buf);
return 0;
}
@@ -2672,18 +2672,18 @@ my_isnan(dtype_t type, void *val)
if (FLT_FLOAT == type) {
float x = 0.0;
- HDmemcpy(&x, val, sizeof(float));
+ memcpy(&x, val, sizeof(float));
retval = isnan(x);
}
else if (FLT_DOUBLE == type) {
double x = 0.0;
- HDmemcpy(&x, val, sizeof(double));
+ memcpy(&x, val, sizeof(double));
retval = isnan(x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else if (FLT_LDOUBLE == type) {
long double x = 0.0L;
- HDmemcpy(&x, val, sizeof(long double));
+ memcpy(&x, val, sizeof(long double));
retval = isnan(x);
#endif
}
@@ -2699,20 +2699,20 @@ my_isnan(dtype_t type, void *val)
if (FLT_FLOAT == type) {
float x = 0.0;
- HDmemcpy(&x, val, sizeof(float));
+ memcpy(&x, val, sizeof(float));
HDsnprintf(s, sizeof(s), "%g", (double)x);
}
else if (FLT_DOUBLE == type) {
double x = 0.0;
- HDmemcpy(&x, val, sizeof(double));
+ memcpy(&x, val, sizeof(double));
HDsnprintf(s, sizeof(s), "%g", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else if (FLT_LDOUBLE == type) {
long double x = 0.0L;
- HDmemcpy(&x, val, sizeof(long double));
+ memcpy(&x, val, sizeof(long double));
HDsnprintf(s, sizeof(s), "%Lg", x);
#endif
}
@@ -2746,7 +2746,7 @@ my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t
int retval = 0;
size_t i;
- bits = (unsigned char *)HDcalloc((size_t)1, size);
+ bits = (unsigned char *)calloc((size_t)1, size);
for (i = 0; i < size; i++)
bits[size - (i + 1)] = *(val + ENDIAN(size, i, endian));
@@ -2755,7 +2755,7 @@ my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t
H5T__bit_find(bits, epos, esize, H5T_BIT_LSB, 0) < 0)
retval = 1;
- HDfree(bits);
+ free(bits);
return retval;
}
@@ -2822,8 +2822,8 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
* fork here and let the child run the test and return the number of
* failures with the exit status.
*/
- HDfflush(stdout);
- HDfflush(stderr);
+ fflush(stdout);
+ fflush(stderr);
if ((child_pid = HDfork()) < 0) {
HDperror("fork");
return 1;
@@ -2911,7 +2911,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
dst_type_name);
- HDprintf("%-70s", str);
+ printf("%-70s", str);
H5_FAILED();
HDputs(" Unknown data type.");
goto error;
@@ -2930,8 +2930,8 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
dst_type_name);
- HDprintf("%-70s", str);
- HDfflush(stdout);
+ printf("%-70s", str);
+ fflush(stdout);
fails_this_test = 0;
}
@@ -2947,7 +2947,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
dendian = H5Tget_order(dst);
/* Allocate buffers */
- aligned = HDcalloc((size_t)1, MAX(sizeof(long double), sizeof(double)));
+ aligned = calloc((size_t)1, MAX(sizeof(long double), sizeof(double)));
/* Allocate and initialize the source buffer through macro INIT_FP_NORM or INIT_FP_SPECIAL.
* The BUF will be used for the conversion while the SAVED buffer will be used for
@@ -3032,7 +3032,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
/* The hardware conversion */
/* Check for underflow when src is a "larger" float than dst.*/
if (FLT_FLOAT == src_type) {
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
if (FLT_FLOAT == dst_type) {
hw_f = *((float *)aligned);
hw = (unsigned char *)&hw_f;
@@ -3049,7 +3049,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
}
}
else if (FLT_DOUBLE == src_type) {
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
if (FLT_FLOAT == dst_type) {
hw_f = (float)(*((double *)aligned));
hw = (unsigned char *)&hw_f;
@@ -3069,7 +3069,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else {
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
if (FLT_FLOAT == dst_type) {
hw_f = (float)*((long double *)aligned);
hw = (unsigned char *)&hw_f;
@@ -3158,7 +3158,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
if (FLT_FLOAT == dst_type) {
float x = 0.0;
- HDmemcpy(&x, &buf[j * dst_size], sizeof(float));
+ memcpy(&x, &buf[j * dst_size], sizeof(float));
if (underflow && HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN)
continue; /* all underflowed, no error */
if (overflow && my_isinf(dendian, buf + j * sizeof(float), dst_size, dst_mpos, dst_msize,
@@ -3169,7 +3169,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
}
else if (FLT_DOUBLE == dst_type) {
double x = 0.0;
- HDmemcpy(&x, &buf[j * dst_size], sizeof(double));
+ memcpy(&x, &buf[j * dst_size], sizeof(double));
if (underflow && HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN)
continue; /* all underflowed, no error */
if (overflow && my_isinf(dendian, buf + j * sizeof(double), dst_size, dst_mpos, dst_msize,
@@ -3181,7 +3181,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
}
else {
long double x = 0.0L;
- HDmemcpy(&x, &buf[j * dst_size], sizeof(long double));
+ memcpy(&x, &buf[j * dst_size], sizeof(long double));
/* dst is largest float, no need to check underflow. */
check_mant[0] = (double)HDfrexpl(x, check_expo + 0);
check_mant[1] = (double)HDfrexpl(hw_ld, check_expo + 1);
@@ -3220,63 +3220,63 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
H5_WARNING();
}
}
- HDprintf(" elmt %u\n", (unsigned)j);
+ printf(" elmt %u\n", (unsigned)j);
- HDprintf(" src =");
+ printf(" src =");
for (k = 0; k < src_size; k++)
- HDprintf(" %02x", saved[j * src_size + ENDIAN(src_size, k, sendian)]);
- HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), "");
+ printf(" %02x", saved[j * src_size + ENDIAN(src_size, k, sendian)]);
+ printf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), "");
if (FLT_FLOAT == src_type) {
float x = 0.0;
- HDmemcpy(&x, &saved[j * src_size], sizeof(float));
- HDprintf(" %29.20e\n", (double)x);
+ memcpy(&x, &saved[j * src_size], sizeof(float));
+ printf(" %29.20e\n", (double)x);
}
else if (FLT_DOUBLE == src_type) {
double x = 0.0;
- HDmemcpy(&x, &saved[j * src_size], sizeof(double));
- HDprintf(" %29.20e\n", x);
+ memcpy(&x, &saved[j * src_size], sizeof(double));
+ printf(" %29.20e\n", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else {
long double x = 0.0L;
- HDmemcpy(&x, &saved[j * src_size], sizeof(long double));
- HDfprintf(stdout, " %29.20Le\n", x);
+ memcpy(&x, &saved[j * src_size], sizeof(long double));
+ fprintf(stdout, " %29.20Le\n", x);
#endif
}
- HDprintf(" dst =");
+ printf(" dst =");
for (k = 0; k < dst_size; k++)
- HDprintf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, dendian)]);
- HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
+ printf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, dendian)]);
+ printf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
if (FLT_FLOAT == dst_type) {
float x = 0.0;
- HDmemcpy(&x, &buf[j * dst_size], sizeof(float));
- HDprintf(" %29.20e\n", (double)x);
+ memcpy(&x, &buf[j * dst_size], sizeof(float));
+ printf(" %29.20e\n", (double)x);
}
else if (FLT_DOUBLE == dst_type) {
double x = 0.0;
- HDmemcpy(&x, &buf[j * dst_size], sizeof(double));
- HDprintf(" %29.20e\n", x);
+ memcpy(&x, &buf[j * dst_size], sizeof(double));
+ printf(" %29.20e\n", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else {
long double x = 0.0L;
- HDmemcpy(&x, &buf[j * dst_size], sizeof(long double));
- HDfprintf(stdout, " %29.20Le\n", x);
+ memcpy(&x, &buf[j * dst_size], sizeof(long double));
+ fprintf(stdout, " %29.20Le\n", x);
#endif
}
- HDprintf(" ans =");
+ printf(" ans =");
for (k = 0; k < dst_size; k++)
- HDprintf(" %02x", hw[ENDIAN(dst_size, k, dendian)]);
- HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
+ printf(" %02x", hw[ENDIAN(dst_size, k, dendian)]);
+ printf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
if (FLT_FLOAT == dst_type)
- HDprintf(" %29.20e\n", (double)hw_f);
+ printf(" %29.20e\n", (double)hw_f);
else if (FLT_DOUBLE == dst_type)
- HDprintf(" %29.20e\n", hw_d);
+ printf(" %29.20e\n", hw_d);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
else
- HDfprintf(stdout, " %29.20Le\n", hw_ld);
+ fprintf(stdout, " %29.20Le\n", hw_ld);
#endif
/* If the source is normalized values, print out error message; if it is
@@ -3301,14 +3301,14 @@ done:
if (saved)
aligned_free(saved);
if (aligned)
- HDfree(aligned);
- HDfflush(stdout);
+ free(aligned);
+ fflush(stdout);
#ifdef HANDLE_SIGFPE
if (run_test == TEST_NOOP || run_test == TEST_NORMAL)
- HDexit(MIN((int)fails_all_tests, 254));
+ exit(MIN((int)fails_all_tests, 254));
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
- HDexit(EXIT_SUCCESS);
- HDassert(0 && "Should not reach this point!");
+ exit(EXIT_SUCCESS);
+ assert(0 && "Should not reach this point!");
return 1;
#else
/* Restore the default error handler (set in h5_reset()) */
@@ -3330,14 +3330,14 @@ error:
if (saved)
aligned_free(saved);
if (aligned)
- HDfree(aligned);
- HDfflush(stdout);
+ free(aligned);
+ fflush(stdout);
#ifdef HANDLE_SIGFPE
if (run_test == TEST_NOOP || run_test == TEST_NORMAL)
- HDexit(MIN(MAX((int)fails_all_tests, 1), 254));
+ exit(MIN(MAX((int)fails_all_tests, 1), 254));
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
- HDexit(EXIT_FAILURE);
- HDassert(0 && "Should not reach this point!");
+ exit(EXIT_FAILURE);
+ assert(0 && "Should not reach this point!");
return 1;
#else
/* Restore the default error handler (set in h5_reset()) */
@@ -3539,7 +3539,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
/* Sanity checks */
if (OTHER == src_type || OTHER == dst_type) {
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
- HDprintf("%-70s", str);
+ printf("%-70s", str);
H5_FAILED();
HDputs(" Unknown data type.");
goto error;
@@ -3550,7 +3550,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
INT_LLONG == src_type || INT_ULLONG == src_type) &&
(FLT_FLOAT != dst_type && FLT_DOUBLE != dst_type && FLT_LDOUBLE != dst_type)) {
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
- HDprintf("%-70s", str);
+ printf("%-70s", str);
H5_FAILED();
HDputs(" 1. Not an integer-float conversion.");
goto error;
@@ -3561,7 +3561,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
INT_INT != dst_type && INT_UINT != dst_type && INT_LONG != dst_type && INT_ULONG != dst_type &&
INT_LLONG != dst_type && INT_ULLONG != dst_type)) {
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
- HDprintf("%-70s", str);
+ printf("%-70s", str);
H5_FAILED();
HDputs(" 2. Not a float-integer conversion.");
goto error;
@@ -3571,8 +3571,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
INT_INT == src_type || INT_UINT == src_type || INT_LONG == src_type || INT_ULONG == src_type ||
INT_LLONG == src_type || INT_ULLONG == src_type) {
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
- HDprintf("%-70s", str);
- HDfflush(stdout);
+ printf("%-70s", str);
+ fflush(stdout);
fails_this_test = 0;
}
else {
@@ -3585,8 +3585,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
else
HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
dst_type_name);
- HDprintf("%-70s", str);
- HDfflush(stdout);
+ printf("%-70s", str);
+ fflush(stdout);
fails_this_test = 0;
}
@@ -3597,7 +3597,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
dst_size = H5Tget_size(dst);
src_nbits = H5Tget_precision(src); /* not 8*src_size, esp on J90 - QAK */
dst_nbits = H5Tget_precision(dst); /* not 8*dst_size, esp on J90 - QAK */
- aligned = HDcalloc((size_t)1, MAX(sizeof(long double), sizeof(long long)));
+ aligned = calloc((size_t)1, MAX(sizeof(long double), sizeof(long long)));
#ifdef SHOW_OVERFLOWS
noverflows_g = 0;
#endif
@@ -3606,7 +3606,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
* 12 bytes but precision is 10 bytes. The 2 unused bytes may
* have garbage causing wrong value comparison.
*/
- HDmemset(&hw_ldouble, 0, sizeof(long double));
+ memset(&hw_ldouble, 0, sizeof(long double));
/* Create a dataset transfer property list and datatype conversion
* exception handler function and pass in fill value. This is mainly
@@ -3721,43 +3721,43 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_float;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_float = (float)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_float = (float)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_float = (float)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_float = (float)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_float = (float)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_float = (float)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_float = (float)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_float = (float)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_float = (float)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_float = (float)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -3765,7 +3765,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -3773,43 +3773,43 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_double;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_double = (double)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_double = (double)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_double = (double)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_double = (double)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_double = (double)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_double = (double)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_double = (double)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_double = (double)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_double = (double)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_double = (double)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -3817,7 +3817,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -3825,43 +3825,43 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_ldouble;
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
hw_ldouble = (long double)(*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
hw_ldouble = (long double)(*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
hw_ldouble = (long double)(*((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
hw_ldouble = (long double)(*((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
hw_ldouble = (long double)(*((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
hw_ldouble = (long double)(*((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
hw_ldouble = (long double)(*((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
hw_ldouble = (long double)(*((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
hw_ldouble = (long double)(*((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
hw_ldouble = (long double)(*((unsigned long long *)aligned));
break;
case FLT_FLOAT:
@@ -3869,7 +3869,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case FLT_LDOUBLE:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -3877,15 +3877,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_schar;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_schar = (signed char)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_schar = (signed char)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_schar = (signed char)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -3900,7 +3900,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -3908,15 +3908,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_uchar;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_uchar = (unsigned char)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_uchar = (unsigned char)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_uchar = (unsigned char)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -3931,7 +3931,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -3939,15 +3939,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_short;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_short = (short)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_short = (short)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_short = (short)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -3962,7 +3962,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -3970,15 +3970,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_ushort;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_ushort = (unsigned short)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_ushort = (unsigned short)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_ushort = (unsigned short)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -3993,7 +3993,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -4001,15 +4001,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_int;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_int = (int)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_int = (int)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_int = (int)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -4024,7 +4024,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -4032,15 +4032,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_uint;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_uint = (unsigned int)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_uint = (unsigned int)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_uint = (unsigned int)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -4055,7 +4055,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -4063,15 +4063,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_long;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_long = (long)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_long = (long)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_long = (long)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -4086,7 +4086,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -4094,15 +4094,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_ulong;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_ulong = (unsigned long)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_ulong = (unsigned long)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_ulong = (unsigned long)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -4117,7 +4117,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -4125,15 +4125,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_llong;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_llong = (long long)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_llong = (long long)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_llong = (long long)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -4148,7 +4148,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
@@ -4156,15 +4156,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_ullong;
switch (src_type) {
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
hw_ullong = (unsigned long long)(*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
hw_ullong = (unsigned long long)(*((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
hw_ullong = (unsigned long long)(*((long double *)aligned));
break;
case INT_SCHAR:
@@ -4179,13 +4179,13 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case INT_ULLONG:
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
}
/* Make certain that there isn't some weird number of destination bits */
- HDassert(dst_nbits % 8 == 0);
+ assert(dst_nbits % 8 == 0);
/* For Intel machines, the size of "long double" is 12 bytes, precision
* is 80 bits; for AMD processors, the size of "long double" is 16 bytes,
@@ -4321,181 +4321,181 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
H5_WARNING();
}
}
- HDprintf(" elmt %u: \n", (unsigned)j);
+ printf(" elmt %u: \n", (unsigned)j);
- HDprintf(" src = ");
+ printf(" src = ");
for (k = 0; k < src_size; k++)
- HDprintf(" %02x", saved[j * src_size + ENDIAN(src_size, k, sendian)]);
- HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), "");
+ printf(" %02x", saved[j * src_size + ENDIAN(src_size, k, sendian)]);
+ printf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), "");
switch (src_type) {
case INT_SCHAR:
- HDmemcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
- HDprintf(" %29d\n", (int)*((signed char *)aligned));
+ memcpy(aligned, saved + j * sizeof(signed char), sizeof(signed char));
+ printf(" %29d\n", (int)*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
- HDprintf(" %29u\n", (unsigned)*((unsigned char *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned char), sizeof(unsigned char));
+ printf(" %29u\n", (unsigned)*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, saved + j * sizeof(short), sizeof(short));
- HDprintf(" %29hd\n", *((short *)aligned));
+ memcpy(aligned, saved + j * sizeof(short), sizeof(short));
+ printf(" %29hd\n", *((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
- HDprintf(" %29hu\n", *((unsigned short *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned short), sizeof(unsigned short));
+ printf(" %29hu\n", *((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, saved + j * sizeof(int), sizeof(int));
- HDprintf(" %29d\n", *((int *)aligned));
+ memcpy(aligned, saved + j * sizeof(int), sizeof(int));
+ printf(" %29d\n", *((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
- HDprintf(" %29u\n", *((unsigned *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned), sizeof(unsigned));
+ printf(" %29u\n", *((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, saved + j * sizeof(long), sizeof(long));
- HDprintf(" %29ld\n", *((long *)aligned));
+ memcpy(aligned, saved + j * sizeof(long), sizeof(long));
+ printf(" %29ld\n", *((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
- HDprintf(" %29lu\n", *((unsigned long *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned long), sizeof(unsigned long));
+ printf(" %29lu\n", *((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
- HDfprintf(stdout, " %29lld\n", *((long long *)aligned));
+ memcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
+ fprintf(stdout, " %29lld\n", *((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
- HDfprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
+ memcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ fprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
break;
case FLT_FLOAT:
- HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
- HDprintf(" %29f\n", (double)*((float *)aligned));
+ memcpy(aligned, saved + j * sizeof(float), sizeof(float));
+ printf(" %29f\n", (double)*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(double), sizeof(double));
- HDprintf(" %29f\n", *((double *)aligned));
+ memcpy(aligned, saved + j * sizeof(double), sizeof(double));
+ printf(" %29f\n", *((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
- HDprintf(" %29Lf\n", *((long double *)aligned));
+ memcpy(aligned, saved + j * sizeof(long double), sizeof(long double));
+ printf(" %29Lf\n", *((long double *)aligned));
break;
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
- HDprintf(" dst = ");
+ printf(" dst = ");
for (k = 0; k < dst_size; k++)
- HDprintf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, dendian)]);
- HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
+ printf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, dendian)]);
+ printf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
switch (dst_type) {
case INT_SCHAR:
- HDmemcpy(aligned, buf + j * sizeof(signed char), sizeof(signed char));
- HDprintf(" %29d\n", (int)*((signed char *)aligned));
+ memcpy(aligned, buf + j * sizeof(signed char), sizeof(signed char));
+ printf(" %29d\n", (int)*((signed char *)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, buf + j * sizeof(unsigned char), sizeof(unsigned char));
- HDprintf(" %29u\n", (unsigned)*((unsigned char *)aligned));
+ memcpy(aligned, buf + j * sizeof(unsigned char), sizeof(unsigned char));
+ printf(" %29u\n", (unsigned)*((unsigned char *)aligned));
break;
case INT_SHORT:
- HDmemcpy(aligned, buf + j * sizeof(short), sizeof(short));
- HDprintf(" %29hd\n", *((short *)aligned));
+ memcpy(aligned, buf + j * sizeof(short), sizeof(short));
+ printf(" %29hd\n", *((short *)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, buf + j * sizeof(unsigned short), sizeof(unsigned short));
- HDprintf(" %29hu\n", *((unsigned short *)aligned));
+ memcpy(aligned, buf + j * sizeof(unsigned short), sizeof(unsigned short));
+ printf(" %29hu\n", *((unsigned short *)aligned));
break;
case INT_INT:
- HDmemcpy(aligned, buf + j * sizeof(int), sizeof(int));
- HDprintf(" %29d\n", *((int *)aligned));
+ memcpy(aligned, buf + j * sizeof(int), sizeof(int));
+ printf(" %29d\n", *((int *)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, buf + j * sizeof(unsigned), sizeof(unsigned));
- HDprintf(" %29u\n", *((unsigned *)aligned));
+ memcpy(aligned, buf + j * sizeof(unsigned), sizeof(unsigned));
+ printf(" %29u\n", *((unsigned *)aligned));
break;
case INT_LONG:
- HDmemcpy(aligned, buf + j * sizeof(long), sizeof(long));
- HDprintf(" %29ld\n", *((long *)aligned));
+ memcpy(aligned, buf + j * sizeof(long), sizeof(long));
+ printf(" %29ld\n", *((long *)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, buf + j * sizeof(unsigned long), sizeof(unsigned long));
- HDprintf(" %29lu\n", *((unsigned long *)aligned));
+ memcpy(aligned, buf + j * sizeof(unsigned long), sizeof(unsigned long));
+ printf(" %29lu\n", *((unsigned long *)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, buf + j * sizeof(long long), sizeof(long long));
- HDfprintf(stdout, " %29lld\n", *((long long *)aligned));
+ memcpy(aligned, buf + j * sizeof(long long), sizeof(long long));
+ fprintf(stdout, " %29lld\n", *((long long *)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, buf + j * sizeof(unsigned long long), sizeof(unsigned long long));
- HDfprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
+ memcpy(aligned, buf + j * sizeof(unsigned long long), sizeof(unsigned long long));
+ fprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
break;
case FLT_FLOAT:
- HDmemcpy(aligned, buf + j * sizeof(float), sizeof(float));
- HDprintf(" %29f\n", (double)*((float *)aligned));
+ memcpy(aligned, buf + j * sizeof(float), sizeof(float));
+ printf(" %29f\n", (double)*((float *)aligned));
break;
case FLT_DOUBLE:
- HDmemcpy(aligned, buf + j * sizeof(double), sizeof(double));
- HDprintf(" %29f\n", *((double *)aligned));
+ memcpy(aligned, buf + j * sizeof(double), sizeof(double));
+ printf(" %29f\n", *((double *)aligned));
break;
case FLT_LDOUBLE:
- HDmemcpy(aligned, buf + j * sizeof(long double), sizeof(long double));
- HDprintf(" %29Lf\n", *((long double *)aligned));
+ memcpy(aligned, buf + j * sizeof(long double), sizeof(long double));
+ printf(" %29Lf\n", *((long double *)aligned));
break;
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
- HDprintf(" and = ");
+ printf(" and = ");
for (k = 0; k < dst_size; k++)
- HDprintf(" %02x", hw[ENDIAN(dst_size, k, dendian)]);
- HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
+ printf(" %02x", hw[ENDIAN(dst_size, k, dendian)]);
+ printf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
switch (dst_type) {
case INT_SCHAR:
- HDprintf(" %29d\n", (int)*((signed char *)((void *)hw)));
+ printf(" %29d\n", (int)*((signed char *)((void *)hw)));
break;
case INT_UCHAR:
- HDprintf(" %29u\n", (unsigned)*((unsigned char *)((void *)hw)));
+ printf(" %29u\n", (unsigned)*((unsigned char *)((void *)hw)));
break;
case INT_SHORT:
- HDprintf(" %29hd\n", *((short *)((void *)hw)));
+ printf(" %29hd\n", *((short *)((void *)hw)));
break;
case INT_USHORT:
- HDprintf(" %29hu\n", *((unsigned short *)((void *)hw)));
+ printf(" %29hu\n", *((unsigned short *)((void *)hw)));
break;
case INT_INT:
- HDprintf(" %29d\n", *((int *)((void *)hw)));
+ printf(" %29d\n", *((int *)((void *)hw)));
break;
case INT_UINT:
- HDprintf(" %29u\n", *((unsigned int *)((void *)hw)));
+ printf(" %29u\n", *((unsigned int *)((void *)hw)));
break;
case INT_LONG:
- HDprintf(" %29ld\n", *((long *)((void *)hw)));
+ printf(" %29ld\n", *((long *)((void *)hw)));
break;
case INT_ULONG:
- HDprintf(" %29lu\n", *((unsigned long *)((void *)hw)));
+ printf(" %29lu\n", *((unsigned long *)((void *)hw)));
break;
case INT_LLONG:
- HDfprintf(stdout, " %29lld\n", *((long long *)((void *)hw)));
+ fprintf(stdout, " %29lld\n", *((long long *)((void *)hw)));
break;
case INT_ULLONG:
- HDfprintf(stdout, " %29llu\n", *((unsigned long long *)((void *)hw)));
+ fprintf(stdout, " %29llu\n", *((unsigned long long *)((void *)hw)));
break;
case FLT_FLOAT:
- HDprintf(" %29f\n", (double)*((float *)((void *)hw)));
+ printf(" %29f\n", (double)*((float *)((void *)hw)));
break;
case FLT_DOUBLE:
- HDprintf(" %29f\n", *((double *)((void *)hw)));
+ printf(" %29f\n", *((double *)((void *)hw)));
break;
case FLT_LDOUBLE:
- HDprintf(" %29Lf\n", *((long double *)((void *)hw)));
+ printf(" %29Lf\n", *((long double *)((void *)hw)));
break;
case OTHER:
default:
- HDassert(0 && "Unknown type");
+ assert(0 && "Unknown type");
break;
}
@@ -4521,8 +4521,8 @@ done:
if (saved)
aligned_free(saved);
if (aligned)
- HDfree(aligned);
- HDfflush(stdout);
+ free(aligned);
+ fflush(stdout);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -4541,8 +4541,8 @@ error:
if (saved)
aligned_free(saved);
if (aligned)
- HDfree(aligned);
- HDfflush(stdout);
+ free(aligned);
+ fflush(stdout);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -4552,7 +4552,7 @@ error:
if (run_test == TEST_NORMAL)
return MAX((int)fails_all_tests, 1);
else {
- HDassert(run_test == TEST_DENORM || run_test == TEST_SPECIAL);
+ assert(run_test == TEST_DENORM || run_test == TEST_SPECIAL);
return 1;
}
}
@@ -4585,8 +4585,8 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
ssize_t indx;
unsigned char bits[32], mant_bits[32];
- HDmemset(bits, 0, (size_t)32);
- HDmemset(mant_bits, 0, (size_t)32);
+ memset(bits, 0, (size_t)32);
+ memset(mant_bits, 0, (size_t)32);
/*
* Sometimes, type size isn't equal to the precision like Linux's "long
@@ -4598,7 +4598,7 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
bias = H5Tget_ebias(src_id);
norm = H5Tget_norm(src_id);
- HDmemcpy(bits, origin_bits, src_prec / 8 + 1);
+ memcpy(bits, origin_bits, src_prec / 8 + 1);
/*Check for special cases: +Inf, -Inf*/
if (H5T__bit_find(bits, mpos, mant_digits, H5T_BIT_LSB, TRUE) < 0) {
@@ -4853,7 +4853,7 @@ run_fp_tests(const char *name)
HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, "long double",
"float");
- HDprintf("%-70s", str);
+ printf("%-70s", str);
SKIPPED();
HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
}
@@ -4877,7 +4877,7 @@ run_fp_tests(const char *name)
HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
"float or double");
- HDprintf("%-70s", str);
+ printf("%-70s", str);
SKIPPED();
HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
}
@@ -4956,7 +4956,7 @@ run_int_fp_conv(const char *name)
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "(unsigned) long",
"long double");
- HDprintf("%-70s", str);
+ printf("%-70s", str);
SKIPPED();
HDputs(" Test skipped due to the special algorithm of hardware conversion.");
}
@@ -4970,7 +4970,7 @@ run_int_fp_conv(const char *name)
char str[256]; /*hello string */
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long long", "long double");
- HDprintf("%-70s", str);
+ printf("%-70s", str);
SKIPPED();
HDputs(" Test skipped due to compiler error in handling conversion.");
}
@@ -4983,7 +4983,7 @@ run_int_fp_conv(const char *name)
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long",
"long double");
- HDprintf("%-70s", str);
+ printf("%-70s", str);
SKIPPED();
HDputs(" Test skipped due to compiler not handling conversion.");
}
@@ -5075,7 +5075,7 @@ run_fp_int_conv(const char *name)
HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
"signed and unsigned char, short, int, long");
- HDprintf("%-70s", str);
+ printf("%-70s", str);
SKIPPED();
HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
#endif
@@ -5098,7 +5098,7 @@ run_fp_int_conv(const char *name)
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
"(unsigned) long");
- HDprintf("%-70s", str);
+ printf("%-70s", str);
SKIPPED();
HDputs(" Test skipped due to the special algorithm of hardware conversion.");
}
@@ -5113,7 +5113,7 @@ run_fp_int_conv(const char *name)
char str[256]; /*string */
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "long long");
- HDprintf("%-70s", str);
+ printf("%-70s", str);
SKIPPED();
HDputs(" Test skipped due to hardware conversion error.");
}
@@ -5126,7 +5126,7 @@ run_fp_int_conv(const char *name)
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
"unsigned long long");
- HDprintf("%-70s", str);
+ printf("%-70s", str);
SKIPPED();
HDputs(" Test skipped due to hardware conversion error.");
}
@@ -5163,7 +5163,7 @@ main(void)
reset_hdf5();
if (ALIGNMENT)
- HDprintf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
+ printf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
/* Do the tests */
@@ -5229,9 +5229,9 @@ main(void)
h5_restore_err();
if (nerrors) {
- HDprintf("***** %lu FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %lu FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
}
- HDprintf("All data type tests passed.\n");
+ printf("All data type tests passed.\n");
return 0;
}
diff --git a/test/dtransform.c b/test/dtransform.c
index d73bc1a..a67cfed 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -80,7 +80,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
(((VAR1)[i][j] <= (TYPE)((VAR2)[i][j])) && \
(((VAR1)[i][j] + (TOL)) > (TYPE)((VAR2)[i][j]))))) { \
H5_FAILED(); \
- HDfprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \
+ fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \
goto error; \
} \
} \
@@ -96,7 +96,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
if (!(((VAR1)[i][j] <= ((TYPE)(VAR2)[i][j] + (TOL))) && \
((VAR1)[i][j] >= ((TYPE)(VAR2)[i][j] - (TOL))))) { \
H5_FAILED(); \
- HDfprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \
+ fprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \
goto error; \
} \
} \
@@ -111,7 +111,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
for (j = 0; j < COLS; j++) { \
if ((VAR1)[i][j] != (VAR2)[i][j]) { \
H5_FAILED(); \
- HDfprintf(stderr, " ERROR: data failed to match computed data\n"); \
+ fprintf(stderr, " ERROR: data failed to match computed data\n"); \
goto error; \
} \
} \
@@ -131,7 +131,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
hsize_t dim[2] = {ROWS, COLS}; \
\
/* NOTE: If this macro encounters errors, this memory will leak */ \
- if (NULL == (array = HDcalloc(1, sizeof(*array)))) \
+ if (NULL == (array = calloc(1, sizeof(*array)))) \
TEST_ERROR; \
\
if ((dataspace = H5Screate_simple(2, dim, NULL)) < 0) \
@@ -210,7 +210,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
if (H5Sclose(dataspace) < 0) \
TEST_ERROR; \
\
- HDfree(array); \
+ free(array); \
}
#define TEST_TYPE_CHUNK(XFORM, TYPE, HDF_TYPE, TEST_STR, COMPARE_DATA, SIGNED) \
@@ -227,7 +227,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
hsize_t offset[2] = {0, 0}; \
\
/* NOTE: If this macro encounters errors, this memory will leak */ \
- if (NULL == (array = HDcalloc(1, sizeof(*array)))) \
+ if (NULL == (array = calloc(1, sizeof(*array)))) \
TEST_ERROR; \
\
if ((dataspace = H5Screate_simple(2, dim, NULL)) < 0) \
@@ -297,7 +297,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
if (H5Sclose(memspace) < 0) \
TEST_ERROR; \
\
- HDfree(array); \
+ free(array); \
}
#define INVALID_SET_TEST(TRANSFORM) \
@@ -307,7 +307,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
} \
else { \
H5_FAILED(); \
- HDfprintf(stderr, " ERROR: Data transform allowed invalid TRANSFORM transform to be set\n"); \
+ fprintf(stderr, " ERROR: Data transform allowed invalid TRANSFORM transform to be set\n"); \
goto error; \
} \
}
@@ -857,7 +857,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
TESTING("H5Pget_data_transform");
- if (NULL == (ptrgetTest = (char *)HDmalloc(HDstrlen(simple) + 1)))
+ if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(simple) + 1)))
TEST_ERROR;
if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(c_to_f) + 1) < 0)
@@ -867,7 +867,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
PASSED();
- HDfree(ptrgetTest);
+ free(ptrgetTest);
ptrgetTest = NULL;
TESTING("data transform, read after resetting of transform property");
@@ -888,7 +888,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
TESTING("H5Pget_data_transform, after resetting transform property");
- if (NULL == (ptrgetTest = (char *)HDcalloc((size_t)1, HDstrlen(simple) + 1)))
+ if (NULL == (ptrgetTest = (char *)calloc((size_t)1, HDstrlen(simple) + 1)))
TEST_ERROR;
if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(simple) + 1) < 0)
TEST_ERROR;
@@ -897,14 +897,14 @@ test_getset(const hid_t dxpl_id_c_to_f)
PASSED();
- HDfree(ptrgetTest);
+ free(ptrgetTest);
ptrgetTest = NULL;
return 0;
error:
if (ptrgetTest)
- HDfree(ptrgetTest);
+ free(ptrgetTest);
return -1;
}
@@ -919,7 +919,7 @@ test_set(void)
TESTING("H5Pget_data_transform (get before set)");
- if (NULL == (ptrgetTest = (char *)HDmalloc(HDstrlen(str) + 1)))
+ if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(str) + 1)))
TEST_ERROR;
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -935,7 +935,7 @@ test_set(void)
else
FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n");
- HDfree(ptrgetTest);
+ free(ptrgetTest);
ptrgetTest = NULL;
TESTING("H5Pset_data_transform (set with NULL transform)");
@@ -974,7 +974,7 @@ test_set(void)
error:
if (ptrgetTest)
- HDfree(ptrgetTest);
+ free(ptrgetTest);
H5E_BEGIN_TRY
{
H5Pclose(dxpl_id);
diff --git a/test/dtypes.c b/test/dtypes.c
index bd55491..6650c8c 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -70,8 +70,8 @@
FAIL_STACK_ERROR; \
if ((NMEMBS) != H5I_nmembers(H5I_DATATYPE)) { \
H5_FAILED(); \
- HDprintf(" #dtype ids expected: %lld; found: %lld\n", (long long)(NMEMBS), \
- (long long)H5I_nmembers(H5I_DATATYPE)); \
+ printf(" #dtype ids expected: %lld; found: %lld\n", (long long)(NMEMBS), \
+ (long long)H5I_nmembers(H5I_DATATYPE)); \
goto error; \
} \
} while (0)
@@ -777,11 +777,11 @@ test_compound_2(void)
FAIL_STACK_ERROR;
/* Sizes should be the same, but be careful just in case */
- if (NULL == (buf = (unsigned char *)HDmalloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)))))
+ if (NULL == (buf = (unsigned char *)malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)))))
goto error;
- if (NULL == (bkg = (unsigned char *)HDmalloc(nelmts * sizeof(struct dt))))
+ if (NULL == (bkg = (unsigned char *)malloc(nelmts * sizeof(struct dt))))
goto error;
- if (NULL == (orig = (unsigned char *)HDmalloc(nelmts * sizeof(struct st))))
+ if (NULL == (orig = (unsigned char *)malloc(nelmts * sizeof(struct st))))
goto error;
for (i = 0; i < (int)nelmts; i++) {
s_ptr = ((struct st *)((void *)orig)) + i;
@@ -794,7 +794,7 @@ test_compound_2(void)
s_ptr->d = i * 8 + 6;
s_ptr->e = i * 8 + 7;
}
- HDmemcpy(buf, orig, nelmts * sizeof(struct st));
+ memcpy(buf, orig, nelmts * sizeof(struct st));
/* Build hdf5 datatypes */
array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four);
@@ -829,19 +829,19 @@ test_compound_2(void)
s_ptr->c[1] != d_ptr->c[1] || s_ptr->c[2] != d_ptr->c[2] || s_ptr->c[3] != d_ptr->c[3] ||
s_ptr->d != d_ptr->d || s_ptr->e != d_ptr->e) {
H5_FAILED();
- HDprintf(" i=%d\n", i);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", s_ptr->a, s_ptr->b, s_ptr->c[0],
- s_ptr->c[1], s_ptr->c[2], s_ptr->c[3], s_ptr->d, s_ptr->e);
- HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", d_ptr->a, d_ptr->b, d_ptr->c[0],
- d_ptr->c[1], d_ptr->c[2], d_ptr->c[3], d_ptr->d, d_ptr->e);
+ printf(" i=%d\n", i);
+ printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", s_ptr->a, s_ptr->b, s_ptr->c[0],
+ s_ptr->c[1], s_ptr->c[2], s_ptr->c[3], s_ptr->d, s_ptr->e);
+ printf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", d_ptr->a, d_ptr->b, d_ptr->c[0],
+ d_ptr->c[1], d_ptr->c[2], d_ptr->c[3], d_ptr->d, d_ptr->e);
goto error;
}
}
/* Release resources */
- HDfree(buf);
- HDfree(bkg);
- HDfree(orig);
+ free(buf);
+ free(bkg);
+ free(orig);
CHECK_NMEMBS(nmembs, st, dt);
PASSED();
@@ -854,9 +854,9 @@ test_compound_2(void)
return 0;
error:
- HDfree(buf);
- HDfree(bkg);
- HDfree(orig);
+ free(buf);
+ free(bkg);
+ free(orig);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -904,11 +904,11 @@ test_compound_3(void)
FAIL_STACK_ERROR;
/* Initialize */
- if (NULL == (buf = (unsigned char *)HDmalloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)))))
+ if (NULL == (buf = (unsigned char *)malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)))))
goto error;
- if (NULL == (bkg = (unsigned char *)HDmalloc(nelmts * sizeof(struct dt))))
+ if (NULL == (bkg = (unsigned char *)malloc(nelmts * sizeof(struct dt))))
goto error;
- if (NULL == (orig = (unsigned char *)HDmalloc(nelmts * sizeof(struct st))))
+ if (NULL == (orig = (unsigned char *)malloc(nelmts * sizeof(struct st))))
goto error;
for (i = 0; i < (int)nelmts; i++) {
s_ptr = ((struct st *)((void *)orig)) + i;
@@ -921,7 +921,7 @@ test_compound_3(void)
s_ptr->d = i * 8 + 6;
s_ptr->e = i * 8 + 7;
}
- HDmemcpy(buf, orig, nelmts * sizeof(struct st));
+ memcpy(buf, orig, nelmts * sizeof(struct st));
/* Build hdf5 datatypes */
array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four);
@@ -953,19 +953,19 @@ test_compound_3(void)
if (s_ptr->a != d_ptr->a || s_ptr->c[0] != d_ptr->c[0] || s_ptr->c[1] != d_ptr->c[1] ||
s_ptr->c[2] != d_ptr->c[2] || s_ptr->c[3] != d_ptr->c[3] || s_ptr->e != d_ptr->e) {
H5_FAILED();
- HDprintf(" i=%d\n", i);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", s_ptr->a, s_ptr->b, s_ptr->c[0],
- s_ptr->c[1], s_ptr->c[2], s_ptr->c[3], s_ptr->d, s_ptr->e);
- HDprintf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n", d_ptr->a, d_ptr->c[0], d_ptr->c[1],
- d_ptr->c[2], d_ptr->c[3], d_ptr->e);
+ printf(" i=%d\n", i);
+ printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", s_ptr->a, s_ptr->b, s_ptr->c[0],
+ s_ptr->c[1], s_ptr->c[2], s_ptr->c[3], s_ptr->d, s_ptr->e);
+ printf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n", d_ptr->a, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2],
+ d_ptr->c[3], d_ptr->e);
goto error;
}
}
/* Release resources */
- HDfree(buf);
- HDfree(bkg);
- HDfree(orig);
+ free(buf);
+ free(bkg);
+ free(orig);
CHECK_NMEMBS(nmembs, st, dt);
PASSED();
@@ -977,9 +977,9 @@ test_compound_3(void)
return 0;
error:
- HDfree(buf);
- HDfree(bkg);
- HDfree(orig);
+ free(buf);
+ free(bkg);
+ free(orig);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -1031,11 +1031,11 @@ test_compound_4(void)
FAIL_STACK_ERROR;
/* Sizes should be the same, but be careful just in case */
- if (NULL == (buf = (unsigned char *)HDmalloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)))))
+ if (NULL == (buf = (unsigned char *)malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)))))
goto error;
- if (NULL == (bkg = (unsigned char *)HDmalloc(nelmts * sizeof(struct dt))))
+ if (NULL == (bkg = (unsigned char *)malloc(nelmts * sizeof(struct dt))))
goto error;
- if (NULL == (orig = (unsigned char *)HDmalloc(nelmts * sizeof(struct st))))
+ if (NULL == (orig = (unsigned char *)malloc(nelmts * sizeof(struct st))))
goto error;
for (i = 0; i < (int)nelmts; i++) {
s_ptr = ((struct st *)((void *)orig)) + i;
@@ -1048,7 +1048,7 @@ test_compound_4(void)
s_ptr->d = (i * 8 + 6) & 0x7fff;
s_ptr->e = i * 8 + 7;
}
- HDmemcpy(buf, orig, nelmts * sizeof(struct st));
+ memcpy(buf, orig, nelmts * sizeof(struct st));
/* Build hdf5 datatypes */
array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four);
@@ -1083,19 +1083,19 @@ test_compound_4(void)
s_ptr->c[1] != d_ptr->c[1] || s_ptr->c[2] != d_ptr->c[2] || s_ptr->c[3] != d_ptr->c[3] ||
s_ptr->d != d_ptr->d || s_ptr->e != d_ptr->e) {
H5_FAILED();
- HDprintf(" i=%d\n", i);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", s_ptr->a, s_ptr->b, s_ptr->c[0],
- s_ptr->c[1], s_ptr->c[2], s_ptr->c[3], s_ptr->d, s_ptr->e);
- HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", d_ptr->a, d_ptr->b, d_ptr->c[0],
- d_ptr->c[1], d_ptr->c[2], d_ptr->c[3], d_ptr->d, d_ptr->e);
+ printf(" i=%d\n", i);
+ printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", s_ptr->a, s_ptr->b, s_ptr->c[0],
+ s_ptr->c[1], s_ptr->c[2], s_ptr->c[3], s_ptr->d, s_ptr->e);
+ printf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", d_ptr->a, d_ptr->b, d_ptr->c[0],
+ d_ptr->c[1], d_ptr->c[2], d_ptr->c[3], d_ptr->d, d_ptr->e);
goto error;
}
}
/* Release resources */
- HDfree(buf);
- HDfree(bkg);
- HDfree(orig);
+ free(buf);
+ free(bkg);
+ free(orig);
CHECK_NMEMBS(nmembs, st, dt);
PASSED();
@@ -1107,9 +1107,9 @@ test_compound_4(void)
return 0;
error:
- HDfree(buf);
- HDfree(bkg);
- HDfree(orig);
+ free(buf);
+ free(bkg);
+ free(orig);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -1155,15 +1155,15 @@ test_compound_5(void)
src_type_t src[2] = {{"one", 102, {104, 105, 106, 107}}, {"two", 202, {204, 205, 206, 207}}};
dst_type_t *dst;
- void *buf = HDcalloc((size_t)2, sizeof(dst_type_t));
- void *bkg = HDcalloc((size_t)2, sizeof(dst_type_t));
+ void *buf = calloc((size_t)2, sizeof(dst_type_t));
+ void *bkg = calloc((size_t)2, sizeof(dst_type_t));
int retval = 1;
TESTING("optimized struct converter");
if (!buf || !bkg) {
- HDfree(buf);
- HDfree(bkg);
+ free(buf);
+ free(bkg);
return 1;
}
@@ -1192,7 +1192,7 @@ test_compound_5(void)
H5Tinsert(dst_type, "coll_ids", HOFFSET(dst_type_t, coll_ids), int_array);
/* Convert data */
- HDmemcpy(buf, src, sizeof(src));
+ memcpy(buf, src, sizeof(src));
H5Tconvert(src_type, dst_type, (size_t)2, buf, bkg, H5P_DEFAULT);
dst = (dst_type_t *)buf;
@@ -1204,7 +1204,7 @@ test_compound_5(void)
H5Tclose(int_array);
/* Check results */
- if (HDmemcmp(src[1].name, dst[1].name, sizeof(src[1].name)) != 0 || src[1].tdim != dst[1].tdim ||
+ if (memcmp(src[1].name, dst[1].name, sizeof(src[1].name)) != 0 || src[1].tdim != dst[1].tdim ||
src[1].coll_ids[0] != dst[1].coll_ids[0] || src[1].coll_ids[1] != dst[1].coll_ids[1] ||
src[1].coll_ids[2] != dst[1].coll_ids[2] || src[1].coll_ids[3] != dst[1].coll_ids[3]) {
H5_FAILED();
@@ -1215,8 +1215,8 @@ test_compound_5(void)
}
/* Free memory buffers */
- HDfree(buf);
- HDfree(bkg);
+ free(buf);
+ free(bkg);
return retval;
}
@@ -1259,18 +1259,18 @@ test_compound_6(void)
FAIL_STACK_ERROR;
/* Sizes should be the same, but be careful just in case */
- if (NULL == (buf = (unsigned char *)HDmalloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)))))
+ if (NULL == (buf = (unsigned char *)malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)))))
goto error;
- if (NULL == (bkg = (unsigned char *)HDmalloc(nelmts * sizeof(struct dt))))
+ if (NULL == (bkg = (unsigned char *)malloc(nelmts * sizeof(struct dt))))
goto error;
- if (NULL == (orig = (unsigned char *)HDmalloc(nelmts * sizeof(struct st))))
+ if (NULL == (orig = (unsigned char *)malloc(nelmts * sizeof(struct st))))
goto error;
for (i = 0; i < (int)nelmts; i++) {
s_ptr = ((struct st *)((void *)orig)) + i;
s_ptr->b = (int16_t)((i * 8 + 1) & 0x7fff);
s_ptr->d = (int16_t)((i * 8 + 6) & 0x7fff);
}
- HDmemcpy(buf, orig, nelmts * sizeof(struct st));
+ memcpy(buf, orig, nelmts * sizeof(struct st));
/* Build hdf5 datatypes */
if ((st = H5Tcreate(H5T_COMPOUND, sizeof(struct st))) < 0 ||
@@ -1299,17 +1299,17 @@ test_compound_6(void)
d_ptr = ((struct dt *)((void *)buf)) + i;
if (s_ptr->b != d_ptr->b || s_ptr->d != d_ptr->d) {
H5_FAILED();
- HDprintf(" i=%d\n", i);
- HDprintf(" src={b=%d, d=%d\n", (int)s_ptr->b, (int)s_ptr->d);
- HDprintf(" dst={b=%ld, d=%ld\n", d_ptr->b, d_ptr->d);
+ printf(" i=%d\n", i);
+ printf(" src={b=%d, d=%d\n", (int)s_ptr->b, (int)s_ptr->d);
+ printf(" dst={b=%ld, d=%ld\n", d_ptr->b, d_ptr->d);
goto error;
}
}
/* Release resources */
- HDfree(buf);
- HDfree(bkg);
- HDfree(orig);
+ free(buf);
+ free(bkg);
+ free(orig);
CHECK_NMEMBS(nmembs, st, dt);
PASSED();
@@ -1367,43 +1367,43 @@ test_compound_7(void)
if ((tid1 = H5Tcreate(H5T_COMPOUND, sizeof(struct s1))) < 0) {
H5_FAILED();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(tid1, "a", HOFFSET(struct s1, a), H5T_NATIVE_INT) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'a'\n");
+ printf("Can't insert field 'a'\n");
goto error;
} /* end if */
if (H5Tinsert(tid1, "b", HOFFSET(struct s1, b), H5T_NATIVE_FLOAT) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'b'\n");
+ printf("Can't insert field 'b'\n");
goto error;
} /* end if */
if (H5Tinsert(tid1, "c", HOFFSET(struct s1, c), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'c'\n");
+ printf("Can't insert field 'c'\n");
goto error;
} /* end if */
if (H5Tget_size(tid1) != sizeof(struct s1)) {
H5_FAILED();
- HDprintf("Incorrect size for struct 1\n");
+ printf("Incorrect size for struct 1\n");
goto error;
} /* end if */
if ((tid2 = H5Tcopy(tid1)) < 0) {
H5_FAILED();
- HDprintf("Can't copy datatype\n");
+ printf("Can't copy datatype\n");
goto error;
} /* end if */
if (H5Tget_size(tid2) == sizeof(struct s2)) {
H5_FAILED();
- HDprintf("Incorrect size for struct 2\n");
+ printf("Incorrect size for struct 2\n");
goto error;
} /* end if */
@@ -1415,7 +1415,7 @@ test_compound_7(void)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf("Inserted field 'd'?\n");
+ printf("Inserted field 'd'?\n");
goto error;
} /* end if */
@@ -1427,33 +1427,33 @@ test_compound_7(void)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf("Shrunk compound type?\n");
+ printf("Shrunk compound type?\n");
goto error;
} /* end if */
/* Increase compound type size and try inserting field again */
if (H5Tset_size(tid2, sizeof(struct s2)) < 0) {
H5_FAILED();
- HDprintf("Can't increase size for compound type\n");
+ printf("Can't increase size for compound type\n");
goto error;
} /* end if */
if (H5Tinsert(tid2, "d", HOFFSET(struct s2, d), H5T_NATIVE_DOUBLE) < 0) {
H5_FAILED();
- HDprintf("Can't expand compound datatype\n");
+ printf("Can't expand compound datatype\n");
goto error;
} /* end if */
if (H5Tget_size(tid2) != sizeof(struct s2)) {
H5_FAILED();
- HDprintf("Incorrect size for struct 2\n");
+ printf("Incorrect size for struct 2\n");
goto error;
} /* end if */
/* Release resources */
if (H5Tclose(tid1) < 0 || H5Tclose(tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatypes\n");
+ printf("Can't close datatypes\n");
goto error;
} /* end if */
@@ -1514,21 +1514,21 @@ test_compound_8(void)
if ((tid1 = H5Tcreate(H5T_COMPOUND, sizeof(struct s1))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(tid1, "a", HOFFSET(struct s1, a), H5T_NATIVE_CHAR) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'a'\n");
+ printf("Can't insert field 'a'\n");
goto error;
} /* end if */
if (H5Tinsert(tid1, "b", HOFFSET(struct s1, b), H5T_NATIVE_INT) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'b'\n");
+ printf("Can't insert field 'b'\n");
goto error;
} /* end if */
@@ -1536,7 +1536,7 @@ test_compound_8(void)
if ((tid1_copy = H5Tcopy(tid1)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't copy type #1\n");
+ printf("Can't copy type #1\n");
goto error;
} /* end if */
@@ -1544,14 +1544,14 @@ test_compound_8(void)
if (H5Tpack(tid1) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't pack the compound datatype\n");
+ printf("Can't pack the compound datatype\n");
goto error;
} /* end if */
if (H5Tlock(tid1) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't lock the compound datatype\n");
+ printf("Can't lock the compound datatype\n");
goto error;
} /* end if */
@@ -1559,7 +1559,7 @@ test_compound_8(void)
if (H5Tpack(tid1) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't pack the compound datatype for second time\n");
+ printf("Can't pack the compound datatype for second time\n");
goto error;
} /* end if */
@@ -1567,14 +1567,14 @@ test_compound_8(void)
if ((tsize = H5Tget_size(tid1)) == 0) {
H5_FAILED();
AT();
- HDprintf("Can't get size of the compound datatype\n");
+ printf("Can't get size of the compound datatype\n");
goto error;
} /* end if */
if (tsize != (sizeof(char) + sizeof(int))) {
H5_FAILED();
AT();
- HDprintf("The size of the packed compound datatype is incorrect\n");
+ printf("The size of the packed compound datatype is incorrect\n");
goto error;
} /* end if */
@@ -1585,14 +1585,14 @@ test_compound_8(void)
if ((tid2 = H5Tcreate(H5T_COMPOUND, sizeof(struct s2))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(tid2, "c", HOFFSET(struct s2, c), H5T_NATIVE_CHAR) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'c'\n");
+ printf("Can't insert field 'c'\n");
goto error;
} /* end if */
@@ -1600,7 +1600,7 @@ test_compound_8(void)
if (H5Tinsert(tid2, "d", HOFFSET(struct s2, d), tid1_copy) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'd'\n");
+ printf("Can't insert field 'd'\n");
goto error;
} /* end if */
@@ -1608,7 +1608,7 @@ test_compound_8(void)
if ((tid3 = H5Tcopy(tid2)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't copy type #2\n");
+ printf("Can't copy type #2\n");
goto error;
} /* end if */
@@ -1616,7 +1616,7 @@ test_compound_8(void)
if ((tid2_copy = H5Tcopy(tid2)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't copy type #2\n");
+ printf("Can't copy type #2\n");
goto error;
} /* end if */
@@ -1624,14 +1624,14 @@ test_compound_8(void)
if (H5Tpack(tid2) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't pack the compound datatype\n");
+ printf("Can't pack the compound datatype\n");
goto error;
} /* end if */
if (H5Tlock(tid2) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't lock the compound datatype\n");
+ printf("Can't lock the compound datatype\n");
goto error;
} /* end if */
@@ -1639,7 +1639,7 @@ test_compound_8(void)
if (H5Tpack(tid2) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't pack the compound datatype for second time\n");
+ printf("Can't pack the compound datatype for second time\n");
goto error;
} /* end if */
@@ -1647,7 +1647,7 @@ test_compound_8(void)
if (H5Tlock(tid3) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't lock the compound datatype\n");
+ printf("Can't lock the compound datatype\n");
goto error;
} /* end if */
@@ -1660,7 +1660,7 @@ test_compound_8(void)
if (ret >= 0) {
H5_FAILED();
AT();
- HDprintf("Packing locked datatype worked?\n");
+ printf("Packing locked datatype worked?\n");
goto error;
} /* end if */
@@ -1668,14 +1668,14 @@ test_compound_8(void)
if ((tsize = H5Tget_size(tid2)) == 0) {
H5_FAILED();
AT();
- HDprintf("Can't get size of the compound datatype\n");
+ printf("Can't get size of the compound datatype\n");
goto error;
} /* end if */
if (tsize != (sizeof(char) + sizeof(char) + sizeof(int))) {
H5_FAILED();
AT();
- HDprintf("The size of the packed compound datatype is incorrect: tsize = %zu\n", tsize);
+ printf("The size of the packed compound datatype is incorrect: tsize = %zu\n", tsize);
goto error;
} /* end if */
@@ -1686,7 +1686,7 @@ test_compound_8(void)
if ((arr_tid = H5Tarray_create2(tid2_copy, 1, dims)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create an array datatype\n");
+ printf("Can't create an array datatype\n");
goto error;
} /* end if */
@@ -1694,7 +1694,7 @@ test_compound_8(void)
if (H5Tpack(arr_tid) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't pack the array datatype\n");
+ printf("Can't pack the array datatype\n");
goto error;
} /* end if */
@@ -1702,35 +1702,35 @@ test_compound_8(void)
if ((tsize = H5Tget_size(arr_tid)) == 0) {
H5_FAILED();
AT();
- HDprintf("Can't get size of the array datatype\n");
+ printf("Can't get size of the array datatype\n");
goto error;
} /* end if */
if (tsize != ARRAY_DIM * (sizeof(char) + sizeof(char) + sizeof(int))) {
H5_FAILED();
AT();
- HDprintf("The size of the packed array datatype is incorrect\n");
+ printf("The size of the packed array datatype is incorrect\n");
goto error;
} /* end if */
if (H5Tclose(tid1_copy) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't close the compound datatype\n");
+ printf("Can't close the compound datatype\n");
goto error;
} /* end if */
if (H5Tclose(tid2_copy) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't close the compound datatype\n");
+ printf("Can't close the compound datatype\n");
goto error;
} /* end if */
if (H5Tclose(arr_tid) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't close the array datatype\n");
+ printf("Can't close the array datatype\n");
goto error;
} /* end if */
@@ -1787,7 +1787,7 @@ test_compound_9(void)
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create file!\n");
+ printf("Can't create file!\n");
goto error;
} /* end if */
@@ -1795,14 +1795,14 @@ test_compound_9(void)
if ((cmpd_tid = H5Tcreate(H5T_COMPOUND, sizeof(struct cmpd_struct_w))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_tid, "i1", HOFFSET(struct cmpd_struct_w, i1), H5T_NATIVE_INT) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'i1'\n");
+ printf("Can't insert field 'i1'\n");
goto error;
} /* end if */
@@ -1810,35 +1810,35 @@ test_compound_9(void)
if (H5Tset_size(str_id, H5T_VARIABLE) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't set size for VL string\n");
+ printf("Can't set size for VL string\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_tid, "vl_string", HOFFSET(cmpd_struct_w, str), str_id) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'i1'\n");
+ printf("Can't insert field 'i1'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_tid, "i2", HOFFSET(struct cmpd_struct_w, i2), H5T_NATIVE_INT) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'i2'\n");
+ printf("Can't insert field 'i2'\n");
goto error;
} /* end if */
if (H5Tcommit2(file, "compound", cmpd_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't commit datatype\n");
+ printf("Can't commit datatype\n");
goto error;
} /* end if */
if (H5Tclose(cmpd_tid) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
} /* end if */
@@ -1848,7 +1848,7 @@ test_compound_9(void)
if ((dup_tid = H5Tcopy(cmpd_tid)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't copy datatype\n");
+ printf("Can't copy datatype\n");
goto error;
} /* end if */
@@ -1856,7 +1856,7 @@ test_compound_9(void)
if ((space_id = H5Screate_simple(1, dim1, NULL)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create space\n");
+ printf("Can't create space\n");
goto error;
} /* end if */
@@ -1864,35 +1864,35 @@ test_compound_9(void)
0) {
H5_FAILED();
AT();
- HDprintf("Can't create dataset\n");
+ printf("Can't create dataset\n");
goto error;
} /* end if */
if (H5Dwrite(dset_id, dup_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't write data\n");
+ printf("Can't write data\n");
goto error;
} /* end if */
if (H5Dread(dset_id, dup_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
- HDprintf("incorrect read data\n");
+ printf("incorrect read data\n");
goto error;
} /* end if */
if (H5Treclaim(dup_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim read data\n");
+ printf("Can't reclaim read data\n");
goto error;
} /* end if */
rdata.str = NULL;
@@ -1913,66 +1913,66 @@ test_compound_9(void)
if ((file = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("cannot open file\n");
+ printf("cannot open file\n");
goto error;
} /* end if */
if ((dset_id = H5Dopen2(file, "Dataset", H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("cannot open dataset\n");
+ printf("cannot open dataset\n");
goto error;
} /* end if */
if ((space_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't get space\n");
+ printf("Can't get space\n");
goto error;
} /* end if */
if ((cmpd_tid = H5Dget_type(dset_id)) < 0) {
H5_FAILED();
AT();
- HDprintf("cannot open dataset\n");
+ printf("cannot open dataset\n");
goto error;
} /* end if */
if ((dup_tid = H5Tcopy(cmpd_tid)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't copy datatype\n");
+ printf("Can't copy datatype\n");
goto error;
} /* end if */
rdata.i1 = rdata.i2 = 0;
if (rdata.str)
- HDfree(rdata.str);
+ free(rdata.str);
if (H5Dread(dset_id, dup_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
- HDprintf("incorrect read data\n");
+ printf("incorrect read data\n");
goto error;
} /* end if */
if (H5Treclaim(dup_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
rdata.str = NULL;
if (rdata.str)
- HDfree(rdata.str);
+ free(rdata.str);
if (H5Dclose(dset_id) < 0)
goto error;
@@ -2048,7 +2048,7 @@ test_compound_10(void)
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create file!\n");
+ printf("Can't create file!\n");
goto error;
} /* end if */
@@ -2056,14 +2056,14 @@ test_compound_10(void)
if ((cmpd_tid = H5Tcreate(H5T_COMPOUND, sizeof(struct cmpd_struct))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_tid, "i1", HOFFSET(struct cmpd_struct, i1), H5T_NATIVE_INT) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'i1'\n");
+ printf("Can't insert field 'i1'\n");
goto error;
} /* end if */
@@ -2071,14 +2071,14 @@ test_compound_10(void)
if (H5Tset_size(cstr_id, H5T_VARIABLE) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't set size for C string\n");
+ printf("Can't set size for C string\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_tid, "c_string", HOFFSET(cmpd_struct, str), cstr_id) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'str'\n");
+ printf("Can't insert field 'str'\n");
goto error;
} /* end if */
@@ -2086,21 +2086,21 @@ test_compound_10(void)
if ((vlstr_id = H5Tvlen_create(H5T_NATIVE_CHAR)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create VL string\n");
+ printf("Can't create VL string\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_tid, "vl_string", HOFFSET(cmpd_struct, text), vlstr_id) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'text'\n");
+ printf("Can't insert field 'text'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_tid, "i2", HOFFSET(struct cmpd_struct, i2), H5T_NATIVE_INT) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'i2'\n");
+ printf("Can't insert field 'i2'\n");
goto error;
} /* end if */
@@ -2108,7 +2108,7 @@ test_compound_10(void)
if ((arr_tid = H5Tarray_create2(cmpd_tid, 1, arr_dim)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create array type\n");
+ printf("Can't create array type\n");
goto error;
} /* end if */
@@ -2116,7 +2116,7 @@ test_compound_10(void)
if ((space_id = H5Screate_simple(1, dim1, NULL)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create space\n");
+ printf("Can't create space\n");
goto error;
} /* end if */
@@ -2124,21 +2124,21 @@ test_compound_10(void)
0) {
H5_FAILED();
AT();
- HDprintf("Can't create dataset\n");
+ printf("Can't create dataset\n");
goto error;
} /* end if */
if (H5Dwrite(dset_id, arr_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't write data\n");
+ printf("Can't write data\n");
goto error;
} /* end if */
if (H5Dread(dset_id, arr_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
@@ -2147,14 +2147,14 @@ test_compound_10(void)
HDstrcmp(rdata[i].str, wdata[i].str) != 0) {
H5_FAILED();
AT();
- HDprintf("incorrect read data\n");
+ printf("incorrect read data\n");
goto error;
} /* end if */
if (rdata[i].text.len != wdata[i].text.len) {
H5_FAILED();
AT();
- HDprintf("incorrect VL length\n");
+ printf("incorrect VL length\n");
goto error;
} /* end if */
@@ -2163,20 +2163,20 @@ test_compound_10(void)
if (HDstrcmp((char *)t1, (char *)t2) != 0) {
H5_FAILED();
AT();
- HDprintf("incorrect VL read data\n");
+ printf("incorrect VL read data\n");
goto error;
}
} /* end for */
if (H5Treclaim(arr_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim read data\n");
+ printf("Can't reclaim read data\n");
goto error;
} /* end if */
if (H5Treclaim(arr_tid, space_id, H5P_DEFAULT, &wdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim read data\n");
+ printf("Can't reclaim read data\n");
goto error;
} /* end if */
@@ -2285,11 +2285,11 @@ test_compound_11(void)
TEST_ERROR;
/* Allocate buffers */
- if ((buf = HDmalloc(sizeof(big_t) * NTESTELEM)) == NULL)
+ if ((buf = malloc(sizeof(big_t) * NTESTELEM)) == NULL)
TEST_ERROR;
- if ((buf_orig = HDmalloc(sizeof(big_t) * NTESTELEM)) == NULL)
+ if ((buf_orig = malloc(sizeof(big_t) * NTESTELEM)) == NULL)
TEST_ERROR;
- if ((bkg = HDmalloc(sizeof(big_t) * NTESTELEM)) == NULL)
+ if ((bkg = malloc(sizeof(big_t) * NTESTELEM)) == NULL)
TEST_ERROR;
/* Initialize buffer */
@@ -2299,20 +2299,20 @@ test_compound_11(void)
((big_t *)buf)[u].d3 = (double)u * 3.5;
((big_t *)buf)[u].i1 = (int)(u * 3);
((big_t *)buf)[u].i2 = (int)(u * 5);
- ((big_t *)buf)[u].s1 = (char *)HDmalloc((size_t)32);
+ ((big_t *)buf)[u].s1 = (char *)malloc((size_t)32);
if (!((big_t *)buf)[u].s1)
TEST_ERROR;
HDsnprintf(((big_t *)buf)[u].s1, 32, "%u", (unsigned)u);
} /* end for */
/* Make copy of buffer before conversion */
- HDmemcpy(buf_orig, buf, sizeof(big_t) * NTESTELEM);
+ memcpy(buf_orig, buf, sizeof(big_t) * NTESTELEM);
dim[0] = NTESTELEM;
if ((space_id = H5Screate_simple(1, dim, NULL)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create space\n");
+ printf("Can't create space\n");
goto error;
} /* end if */
@@ -2331,30 +2331,30 @@ test_compound_11(void)
/* Verify converted buffer is correct */
for (u = 0; u < NTESTELEM; u++) {
if (!H5_DBL_ABS_EQUAL(((big_t *)buf_orig)[u].d1, ((little_t *)buf)[u].d1)) {
- HDprintf("Error, line #%d: buf_orig[%u].d1=%f, buf[%u].d1=%f\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].d1, (unsigned)u, ((little_t *)buf)[u].d1);
+ printf("Error, line #%d: buf_orig[%u].d1=%f, buf[%u].d1=%f\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].d1, (unsigned)u, ((little_t *)buf)[u].d1);
TEST_ERROR;
} /* end if */
if (((big_t *)buf_orig)[u].i1 != ((little_t *)buf)[u].i1) {
- HDprintf("Error, line #%d: buf_orig[%u].i1=%d, buf[%u].i1=%d\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].i1, (unsigned)u, ((little_t *)buf)[u].i1);
+ printf("Error, line #%d: buf_orig[%u].i1=%d, buf[%u].i1=%d\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].i1, (unsigned)u, ((little_t *)buf)[u].i1);
TEST_ERROR;
} /* end if */
if (((big_t *)buf_orig)[u].s1 == NULL || ((little_t *)buf)[u].s1 == NULL) {
- HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
+ printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
- HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
+ printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
} /* end for */
if (H5Treclaim(little_tid2, space_id, H5P_DEFAULT, buf) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim data\n");
+ printf("Can't reclaim data\n");
goto error;
} /* end if */
@@ -2373,7 +2373,7 @@ test_compound_11(void)
TEST_ERROR;
/* Recover the original buffer information */
- HDmemcpy(buf, buf_orig, sizeof(big_t) * NTESTELEM);
+ memcpy(buf, buf_orig, sizeof(big_t) * NTESTELEM);
/* Convert buffer from 'big' to 'little' struct */
if (H5Tconvert(big_tid, little_tid, (size_t)NTESTELEM, buf, bkg, H5P_DEFAULT) < 0)
@@ -2382,30 +2382,30 @@ test_compound_11(void)
/* Verify converted buffer is correct */
for (u = 0; u < NTESTELEM; u++) {
if (!H5_DBL_ABS_EQUAL(((big_t *)buf_orig)[u].d1, ((little_t *)buf)[u].d1)) {
- HDprintf("Error, line #%d: buf_orig[%u].d1=%f, buf[%u].d1=%f\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].d1, (unsigned)u, ((little_t *)buf)[u].d1);
+ printf("Error, line #%d: buf_orig[%u].d1=%f, buf[%u].d1=%f\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].d1, (unsigned)u, ((little_t *)buf)[u].d1);
TEST_ERROR;
} /* end if */
if (((big_t *)buf_orig)[u].i1 != ((little_t *)buf)[u].i1) {
- HDprintf("Error, line #%d: buf_orig[%u].i1=%d, buf[%u].i1=%d\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].i1, (unsigned)u, ((little_t *)buf)[u].i1);
+ printf("Error, line #%d: buf_orig[%u].i1=%d, buf[%u].i1=%d\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].i1, (unsigned)u, ((little_t *)buf)[u].i1);
TEST_ERROR;
} /* end if */
if (((big_t *)buf_orig)[u].s1 == NULL || ((little_t *)buf)[u].s1 == NULL) {
- HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
+ printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
- HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
+ printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
} /* end for */
if (H5Treclaim(little_tid, space_id, H5P_DEFAULT, buf) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim data\n");
+ printf("Can't reclaim data\n");
goto error;
} /* end if */
@@ -2414,7 +2414,7 @@ test_compound_11(void)
TEST_ERROR;
/* Recover the original buffer information */
- HDmemcpy(buf, buf_orig, sizeof(big_t) * NTESTELEM);
+ memcpy(buf, buf_orig, sizeof(big_t) * NTESTELEM);
/* Convert buffer from 'big' to 'little' struct */
if (H5Tconvert(big_tid, little_tid, (size_t)NTESTELEM, buf, bkg, H5P_DEFAULT) < 0)
@@ -2423,36 +2423,36 @@ test_compound_11(void)
/* Verify converted buffer is correct */
for (u = 0; u < NTESTELEM; u++) {
if (!H5_DBL_ABS_EQUAL(((big_t *)buf_orig)[u].d1, ((little_t *)buf)[u].d1)) {
- HDprintf("Error, line #%d: buf_orig[%u].d1=%f, buf[%u].d1=%f\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].d1, (unsigned)u, ((little_t *)buf)[u].d1);
+ printf("Error, line #%d: buf_orig[%u].d1=%f, buf[%u].d1=%f\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].d1, (unsigned)u, ((little_t *)buf)[u].d1);
TEST_ERROR;
} /* end if */
if (((big_t *)buf_orig)[u].i1 != ((little_t *)buf)[u].i1) {
- HDprintf("Error, line #%d: buf_orig[%u].i1=%d, buf[%u].i1=%d\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].i1, (unsigned)u, ((little_t *)buf)[u].i1);
+ printf("Error, line #%d: buf_orig[%u].i1=%d, buf[%u].i1=%d\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].i1, (unsigned)u, ((little_t *)buf)[u].i1);
TEST_ERROR;
} /* end if */
if (((big_t *)buf_orig)[u].s1 == NULL || ((little_t *)buf)[u].s1 == NULL) {
- HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
+ printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
- HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
- ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
+ printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
+ ((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
} /* end for */
if (H5Treclaim(little_tid, space_id, H5P_DEFAULT, buf) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim data\n");
+ printf("Can't reclaim data\n");
goto error;
} /* end if */
/* Free everything */
for (u = 0; u < NTESTELEM; u++)
- HDfree(((big_t *)buf_orig)[u].s1);
+ free(((big_t *)buf_orig)[u].s1);
if (H5Sclose(space_id) < 0)
TEST_ERROR;
if (H5Tclose(opaq_dst_tid) < 0)
@@ -2475,11 +2475,11 @@ test_compound_11(void)
error:
if (buf)
- HDfree(buf);
+ free(buf);
if (buf_orig)
- HDfree(buf_orig);
+ free(buf_orig);
if (bkg)
- HDfree(bkg);
+ free(bkg);
return retval;
}
@@ -2612,7 +2612,7 @@ test_compound_13(void)
TESTING("compound datatypes of boundary size with latest format");
/* Create some phony data. */
- HDmemset(&data_out, 0, sizeof(data_out));
+ memset(&data_out, 0, sizeof(data_out));
for (u = 0; u < COMPOUND13_ARRAY_SIZE + 1; u++)
data_out.x[u] = (unsigned char)u;
data_out.y = 99.99F;
@@ -2782,7 +2782,7 @@ test_compound_14(void)
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create file!\n");
+ printf("Can't create file!\n");
goto error;
} /* end if */
@@ -2790,21 +2790,21 @@ test_compound_14(void)
if ((cmpd_m1_tid = H5Tcreate(H5T_COMPOUND, sizeof(struct cmpd_struct_1_w))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m1_tid, "c1", HOFFSET(struct cmpd_struct_1_w, c1), H5T_NATIVE_CHAR) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'c1'\n");
+ printf("Can't insert field 'c1'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m1_tid, "c2", HOFFSET(struct cmpd_struct_1_w, c2), H5T_NATIVE_CHAR) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'c2'\n");
+ printf("Can't insert field 'c2'\n");
goto error;
} /* end if */
@@ -2812,14 +2812,14 @@ test_compound_14(void)
if (H5Tset_size(str_id, H5T_VARIABLE) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't set size for VL string\n");
+ printf("Can't set size for VL string\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m1_tid, "vl_string", HOFFSET(cmpd_struct_1_w, str), str_id) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'vl_string'\n");
+ printf("Can't insert field 'vl_string'\n");
goto error;
} /* end if */
@@ -2827,28 +2827,28 @@ test_compound_14(void)
if ((cmpd_f1_tid = H5Tcreate(H5T_COMPOUND, 8 + 1 + sizeof(hvl_t))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f1_tid, "c1", (size_t)0, H5T_STD_I64BE) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'c1'\n");
+ printf("Can't insert field 'c1'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f1_tid, "c2", (size_t)8, H5T_NATIVE_CHAR) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'c2'\n");
+ printf("Can't insert field 'c2'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f1_tid, "vl_string", (size_t)(8 + 1), str_id) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'vl_string'\n");
+ printf("Can't insert field 'vl_string'\n");
goto error;
} /* end if */
@@ -2856,56 +2856,56 @@ test_compound_14(void)
if ((cmpd_m2_tid = H5Tcreate(H5T_COMPOUND, sizeof(struct cmpd_struct_2_w))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m2_tid, "c1", HOFFSET(struct cmpd_struct_2_w, c1), H5T_NATIVE_CHAR) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'c1'\n");
+ printf("Can't insert field 'c1'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m2_tid, "c2", HOFFSET(struct cmpd_struct_2_w, c2), H5T_NATIVE_CHAR) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'c2'\n");
+ printf("Can't insert field 'c2'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m2_tid, "vl_string", HOFFSET(cmpd_struct_2_w, str), str_id) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'vl_string'\n");
+ printf("Can't insert field 'vl_string'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m2_tid, "l1", HOFFSET(struct cmpd_struct_2_w, l1), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'l1'\n");
+ printf("Can't insert field 'l1'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m2_tid, "l2", HOFFSET(struct cmpd_struct_2_w, l2), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'l2'\n");
+ printf("Can't insert field 'l2'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m2_tid, "l3", HOFFSET(struct cmpd_struct_2_w, l3), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'l3'\n");
+ printf("Can't insert field 'l3'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m2_tid, "l4", HOFFSET(struct cmpd_struct_2_w, l4), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'l4'\n");
+ printf("Can't insert field 'l4'\n");
goto error;
} /* end if */
@@ -2913,56 +2913,56 @@ test_compound_14(void)
if ((cmpd_f2_tid = H5Tcreate(H5T_COMPOUND, 8 + 1 + sizeof(hvl_t) + 4 * sizeof(long))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f2_tid, "c1", (size_t)0, H5T_STD_I64BE) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'c1'\n");
+ printf("Can't insert field 'c1'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f2_tid, "c2", (size_t)8, H5T_NATIVE_CHAR) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'c2'\n");
+ printf("Can't insert field 'c2'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f2_tid, "vl_string", (size_t)(8 + 1), str_id) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'vl_string'\n");
+ printf("Can't insert field 'vl_string'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f2_tid, "l1", 8 + 1 + sizeof(hvl_t), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'l1'\n");
+ printf("Can't insert field 'l1'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f2_tid, "l2", 8 + 1 + sizeof(hvl_t) + sizeof(long), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'l2'\n");
+ printf("Can't insert field 'l2'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f2_tid, "l3", 8 + 1 + sizeof(hvl_t) + 2 * sizeof(long), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'l3'\n");
+ printf("Can't insert field 'l3'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f2_tid, "l4", 8 + 1 + sizeof(hvl_t) + 3 * sizeof(long), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'l4'\n");
+ printf("Can't insert field 'l4'\n");
goto error;
} /* end if */
@@ -2970,7 +2970,7 @@ test_compound_14(void)
if ((space_id = H5Screate_simple(1, dim1, NULL)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create space\n");
+ printf("Can't create space\n");
goto error;
} /* end if */
@@ -2978,7 +2978,7 @@ test_compound_14(void)
H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create dataset\n");
+ printf("Can't create dataset\n");
goto error;
} /* end if */
@@ -2986,42 +2986,42 @@ test_compound_14(void)
H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create dataset\n");
+ printf("Can't create dataset\n");
goto error;
} /* end if */
if (H5Dwrite(dset1_id, cmpd_m1_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata1) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't write data\n");
+ printf("Can't write data\n");
goto error;
} /* end if */
if (H5Dwrite(dset2_id, cmpd_m2_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata2) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't write data\n");
+ printf("Can't write data\n");
goto error;
} /* end if */
if (H5Dread(dset1_id, cmpd_m1_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata1) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
if (H5Dread(dset2_id, cmpd_m2_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata2) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
- HDprintf("incorrect read data\n");
+ printf("incorrect read data\n");
goto error;
} /* end if */
@@ -3030,21 +3030,21 @@ test_compound_14(void)
rdata2.l4 != wdata2.l4) {
H5_FAILED();
AT();
- HDprintf("incorrect read data\n");
+ printf("incorrect read data\n");
goto error;
} /* end if */
if (H5Treclaim(cmpd_m1_tid, space_id, H5P_DEFAULT, &rdata1) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim read data\n");
+ printf("Can't reclaim read data\n");
goto error;
} /* end if */
rdata1.str = NULL;
if (H5Treclaim(cmpd_m2_tid, space_id, H5P_DEFAULT, &rdata2) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim read data\n");
+ printf("Can't reclaim read data\n");
goto error;
} /* end if */
rdata2.str = NULL;
@@ -3066,60 +3066,60 @@ test_compound_14(void)
if ((file = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("cannot open file\n");
+ printf("cannot open file\n");
goto error;
} /* end if */
if ((dset1_id = H5Dopen2(file, "Dataset1", H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("cannot open dataset\n");
+ printf("cannot open dataset\n");
goto error;
} /* end if */
if ((dset2_id = H5Dopen2(file, "Dataset2", H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("cannot open dataset\n");
+ printf("cannot open dataset\n");
goto error;
} /* end if */
if ((space_id = H5Dget_space(dset2_id)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't get space\n");
+ printf("Can't get space\n");
goto error;
} /* end if */
rdata1.c1 = rdata1.c2 = 0;
if (rdata1.str)
- HDfree(rdata1.str);
+ free(rdata1.str);
rdata2.c1 = rdata2.c2 = 0;
rdata2.l1 = rdata2.l2 = rdata2.l3 = rdata2.l4 = 0;
if (rdata2.str) {
- HDfree(rdata2.str);
+ free(rdata2.str);
rdata2.str = NULL;
} /* end if */
if (H5Dread(dset1_id, cmpd_m1_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata1) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
if (H5Dread(dset2_id, cmpd_m2_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata2) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
- HDprintf("incorrect read data\n");
+ printf("incorrect read data\n");
goto error;
} /* end if */
@@ -3128,21 +3128,21 @@ test_compound_14(void)
rdata2.l4 != wdata2.l4) {
H5_FAILED();
AT();
- HDprintf("incorrect read data\n");
+ printf("incorrect read data\n");
goto error;
} /* end if */
if (H5Treclaim(cmpd_m1_tid, space_id, H5P_DEFAULT, &rdata1) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim read data\n");
+ printf("Can't reclaim read data\n");
goto error;
} /* end if */
rdata1.str = NULL;
if (H5Treclaim(cmpd_m2_tid, space_id, H5P_DEFAULT, &rdata2) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't reclaim read data\n");
+ printf("Can't reclaim read data\n");
goto error;
} /* end if */
rdata2.str = NULL;
@@ -3208,7 +3208,7 @@ test_compound_15(void)
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create file!\n");
+ printf("Can't create file!\n");
goto error;
} /* end if */
@@ -3216,21 +3216,21 @@ test_compound_15(void)
if ((cmpd_f_tid = H5Tcreate(H5T_COMPOUND, sizeof(struct cmpd_struct))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f_tid, "i1", HOFFSET(struct cmpd_struct, i1), H5T_NATIVE_INT) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'i1'\n");
+ printf("Can't insert field 'i1'\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_f_tid, "i2", HOFFSET(struct cmpd_struct, i2), H5T_NATIVE_INT) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'i2'\n");
+ printf("Can't insert field 'i2'\n");
goto error;
} /* end if */
@@ -3238,14 +3238,14 @@ test_compound_15(void)
if ((cmpd_m_tid = H5Tcreate(H5T_COMPOUND, sizeof(struct cmpd_struct))) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(cmpd_m_tid, "i1", (size_t)0, H5T_NATIVE_INT) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't insert field 'i1'\n");
+ printf("Can't insert field 'i1'\n");
goto error;
} /* end if */
@@ -3254,7 +3254,7 @@ test_compound_15(void)
if ((space_id = H5Screate_simple(1, dim1, NULL)) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't create space\n");
+ printf("Can't create space\n");
goto error;
} /* end if */
@@ -3262,14 +3262,14 @@ test_compound_15(void)
0) {
H5_FAILED();
AT();
- HDprintf("Can't create dataset\n");
+ printf("Can't create dataset\n");
goto error;
} /* end if */
if (H5Dwrite(dset_id, cmpd_f_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata1) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't write data\n");
+ printf("Can't write data\n");
goto error;
} /* end if */
@@ -3278,7 +3278,7 @@ test_compound_15(void)
if (H5Dwrite(dset_id, cmpd_m_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata2) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't write data\n");
+ printf("Can't write data\n");
goto error;
} /* end if */
@@ -3286,7 +3286,7 @@ test_compound_15(void)
if (H5Dread(dset_id, cmpd_f_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
@@ -3294,7 +3294,7 @@ test_compound_15(void)
if (rdata.i1 != wdata2[0] || rdata.i2 != wdata1.i2) {
H5_FAILED();
AT();
- HDprintf("incorrect read data\n");
+ printf("incorrect read data\n");
goto error;
} /* end if */
@@ -3307,7 +3307,7 @@ test_compound_15(void)
if (H5Dread(dset_id, cmpd_m_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0) {
H5_FAILED();
AT();
- HDprintf("Can't read data\n");
+ printf("Can't read data\n");
goto error;
} /* end if */
@@ -3315,7 +3315,7 @@ test_compound_15(void)
if (rdata.i1 != wdata2[0] || rdata.i2 != wdata2[1]) {
H5_FAILED();
AT();
- HDprintf("incorrect read data\n");
+ printf("incorrect read data\n");
goto error;
} /* end if */
@@ -3542,7 +3542,7 @@ test_compound_16(void)
if ((obj_count = H5Fget_obj_count(file, H5F_OBJ_DATATYPE)) != 1) {
H5_FAILED();
AT();
- HDprintf(" H5Fget_obj_count returned: %zd; expected: 1\n", obj_count);
+ printf(" H5Fget_obj_count returned: %zd; expected: 1\n", obj_count);
goto error;
}
@@ -3552,7 +3552,7 @@ test_compound_16(void)
if (open_dtypes[1]) {
H5_FAILED();
AT();
- HDprintf(" H5Fget_obj_ids returned as second id: %lld; expected: 0\n", (long long)open_dtypes[1]);
+ printf(" H5Fget_obj_ids returned as second id: %lld; expected: 0\n", (long long)open_dtypes[1]);
goto error;
}
@@ -3635,7 +3635,7 @@ test_compound_17(void)
if (2 != H5Tget_size(tmp_dt)) {
H5_FAILED();
AT();
- HDprintf(" Size after packing: %u; expected: 2\n", (unsigned)H5Tget_size(tmp_dt));
+ printf(" Size after packing: %u; expected: 2\n", (unsigned)H5Tget_size(tmp_dt));
goto error;
}
if (H5Tclose(tmp_dt) < 0)
@@ -3649,7 +3649,7 @@ test_compound_17(void)
if (4 != H5Tget_size(tmp_dt)) {
H5_FAILED();
AT();
- HDprintf(" Size after packing: %u; expected: 4\n", (unsigned)H5Tget_size(tmp_dt));
+ printf(" Size after packing: %u; expected: 4\n", (unsigned)H5Tget_size(tmp_dt));
goto error;
}
if (H5Tclose(tmp_dt) < 0)
@@ -3698,7 +3698,7 @@ test_compound_17(void)
if (2 != H5Tget_size(tmp_dt)) {
H5_FAILED();
AT();
- HDprintf(" Size after packing: %u; expected: 2\n", (unsigned)H5Tget_size(tmp_dt));
+ printf(" Size after packing: %u; expected: 2\n", (unsigned)H5Tget_size(tmp_dt));
goto error;
}
if (H5Tclose(tmp_dt) < 0)
@@ -3712,7 +3712,7 @@ test_compound_17(void)
if (4 != H5Tget_size(tmp_dt)) {
H5_FAILED();
AT();
- HDprintf(" Size after packing: %u; expected: 4\n", (unsigned)H5Tget_size(tmp_dt));
+ printf(" Size after packing: %u; expected: 4\n", (unsigned)H5Tget_size(tmp_dt));
goto error;
}
if (H5Tclose(tmp_dt) < 0)
@@ -3766,7 +3766,7 @@ test_compound_18(void)
/* Create compound datatype, but don't insert fields */
tid = H5Tcreate(H5T_COMPOUND, (size_t)8);
- HDassert(tid > 0);
+ assert(tid > 0);
/* Attempt to create file with compound datatype that has no fields */
/* Create File */
@@ -3776,7 +3776,7 @@ test_compound_18(void)
/* Create a dataspace to use */
sid = H5Screate_simple(1, &dim, NULL);
- HDassert(sid > 0);
+ assert(sid > 0);
/* Create a dataset with the bad compound datatype */
H5E_BEGIN_TRY
@@ -3791,7 +3791,7 @@ test_compound_18(void)
/* Create a group */
gid = H5Gcreate2(file, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(gid > 0);
+ assert(gid > 0);
/* Create an attribute with the bad compound datatype */
H5E_BEGIN_TRY
@@ -3923,107 +3923,107 @@ test_query(void)
/* Create a compound datatype */
if ((tid1 = H5Tcreate(H5T_COMPOUND, sizeof(struct s1))) < 0) {
H5_FAILED();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
} /* end if */
if (H5Tinsert(tid1, "a", HOFFSET(struct s1, a), H5T_NATIVE_INT) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'a'\n");
+ printf("Can't insert field 'a'\n");
goto error;
} /* end if */
if (H5Tinsert(tid1, "b", HOFFSET(struct s1, b), H5T_NATIVE_FLOAT) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'b'\n");
+ printf("Can't insert field 'b'\n");
goto error;
} /* end if */
if (H5Tinsert(tid1, "c", HOFFSET(struct s1, c), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'c'\n");
+ printf("Can't insert field 'c'\n");
goto error;
} /* end if */
if (H5Tinsert(tid1, "d", HOFFSET(struct s1, d), H5T_NATIVE_DOUBLE) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'd'\n");
+ printf("Can't insert field 'd'\n");
goto error;
} /* end if */
/* Create a enumerate datatype */
if ((tid2 = H5Tcreate(H5T_ENUM, sizeof(short))) < 0) {
H5_FAILED();
- HDprintf("Can't create enumerate type\n");
+ printf("Can't create enumerate type\n");
goto error;
} /* end if */
if (H5Tenum_insert(tid2, "RED", (enum_val = 10, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
if (H5Tenum_insert(tid2, "GREEN", (enum_val = 11, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
if (H5Tenum_insert(tid2, "BLUE", (enum_val = 12, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
if (H5Tenum_insert(tid2, "ORANGE", (enum_val = 13, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
if (H5Tenum_insert(tid2, "YELLOW", (enum_val = 14, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
/* Query member number and member index by name, for compound type. */
if (H5Tget_nmembers(tid1) != 4) {
H5_FAILED();
- HDprintf("Can't get member number\n");
+ printf("Can't get member number\n");
goto error;
} /* end if */
if (H5Tget_member_index(tid1, "c") != 2) {
H5_FAILED();
- HDprintf("Can't get correct index number\n");
+ printf("Can't get correct index number\n");
goto error;
} /* end if */
/* Query member number and member index by member name, for enumeration type. */
if (H5Tget_nmembers(tid2) != 5) {
H5_FAILED();
- HDprintf("Can't get member number\n");
+ printf("Can't get member number\n");
goto error;
} /* end if */
if (H5Tget_member_index(tid2, "ORANGE") != 3) {
H5_FAILED();
- HDprintf("Can't get correct index number\n");
+ printf("Can't get correct index number\n");
goto error;
} /* end if */
/* Commit compound datatype and close it */
if (H5Tcommit2(file, compnd_type, tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Can't commit compound datatype\n");
+ printf("Can't commit compound datatype\n");
goto error;
} /* end if */
if (H5Tclose(tid1) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
} /* end if */
/* Commit enumeration datatype and close it */
if (H5Tcommit2(file, enum_type, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Can't commit compound datatype\n");
+ printf("Can't commit compound datatype\n");
goto error;
} /* end if */
if (H5Tclose(tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
} /* end if */
@@ -4036,48 +4036,48 @@ test_query(void)
/* Query member number and member index by name, for compound type */
if (H5Tget_nmembers(tid1) != 4) {
H5_FAILED();
- HDprintf("Can't get member number\n");
+ printf("Can't get member number\n");
goto error;
} /* end if */
if (H5Tget_member_index(tid1, "c") != 2) {
H5_FAILED();
- HDprintf("Can't get correct index number\n");
+ printf("Can't get correct index number\n");
goto error;
} /* end if */
/* Query member number and member index by member name, for enumeration type */
if (H5Tget_nmembers(tid2) != 5) {
H5_FAILED();
- HDprintf("Can't get member number\n");
+ printf("Can't get member number\n");
goto error;
} /* end if */
if (H5Tget_member_index(tid2, "ORANGE") != 3) {
H5_FAILED();
- HDprintf("Can't get correct index number\n");
+ printf("Can't get correct index number\n");
goto error;
} /* end if */
/* Query member value by member name, for enumeration type */
if (H5Tenum_valueof(tid2, "ORANGE", &enum_val) < 0) {
H5_FAILED();
- HDprintf("Can't get value for enumerate member\n");
+ printf("Can't get value for enumerate member\n");
goto error;
} /* end if */
if (enum_val != 13) {
H5_FAILED();
- HDprintf("Incorrect value for enum member\n");
+ printf("Incorrect value for enum member\n");
goto error;
} /* end if */
/* Query member value by member index, for enumeration type */
if (H5Tget_member_value(tid2, 2, &enum_val) < 0) {
H5_FAILED();
- HDprintf("Can't get value for enum member\n");
+ printf("Can't get value for enum member\n");
goto error;
} /* end if */
if (enum_val != 12) {
H5_FAILED();
- HDprintf("Incorrect value for enum member\n");
+ printf("Incorrect value for enum member\n");
goto error;
} /* end if */
@@ -4085,30 +4085,30 @@ test_query(void)
enum_val = 14;
if (H5Tenum_nameof(tid2, &enum_val, enum_name, (size_t)16) < 0) {
H5_FAILED();
- HDprintf("Can't get name for enum member\n");
+ printf("Can't get name for enum member\n");
goto error;
} /* end if */
if (HDstrcmp("YELLOW", enum_name) != 0) {
H5_FAILED();
- HDprintf("Incorrect name for enum member\n");
+ printf("Incorrect name for enum member\n");
goto error;
} /* end if */
/* Close datatype and file */
if (H5Tclose(tid1) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
} /* end if */
if (H5Tclose(tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
} /* end if */
if (H5Fclose(file) < 0) {
H5_FAILED();
- HDprintf("Can't close file\n");
+ printf("Can't close file\n");
goto error;
} /* end if */
@@ -4719,24 +4719,24 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)5, H5T_STR_NULLTERM)) < 0)
goto error;
- if (NULL == (buf = (char *)HDcalloc((size_t)2, (size_t)10)))
+ if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10)))
goto error;
- HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20);
+ memcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20) != 0) {
+ if (memcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Truncated C-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20) != 0) {
+ if (memcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Extended C-string test failed");
goto error;
}
- HDfree(buf);
+ free(buf);
buf = NULL;
if (H5Tclose(src_type) < 0)
goto error;
@@ -4750,24 +4750,24 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)5, H5T_STR_NULLPAD)) < 0)
goto error;
- if (NULL == (buf = (char *)HDcalloc((size_t)2, (size_t)10)))
+ if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10)))
goto error;
- HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
+ memcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
+ if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Truncated C buffer test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
+ if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Extended C buffer test failed");
goto error;
}
- HDfree(buf);
+ free(buf);
buf = NULL;
if (H5Tclose(src_type) < 0)
goto error;
@@ -4781,24 +4781,24 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)5, H5T_STR_SPACEPAD)) < 0)
goto error;
- if (NULL == (buf = (char *)HDcalloc((size_t)2, (size_t)10)))
+ if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10)))
goto error;
- HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
+ memcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
+ if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Truncated Fortran-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde abcde ", (size_t)20) != 0) {
+ if (memcmp(buf, "abcde abcde ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Extended Fortran-string test failed");
goto error;
}
- HDfree(buf);
+ free(buf);
buf = NULL;
if (H5Tclose(src_type) < 0)
goto error;
@@ -4815,12 +4815,12 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)10, H5T_STR_NULLTERM)) < 0)
goto error;
- if (NULL == (buf = (char *)HDcalloc((size_t)2, (size_t)10)))
+ if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10)))
goto error;
- HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
+ memcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
+ if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Non-terminated string test 1");
goto error;
@@ -4828,23 +4828,23 @@ test_conv_str_1(void)
H5Tclose(dst_type);
if ((dst_type = mkstr((size_t)5, H5T_STR_NULLTERM)) < 0)
goto error;
- HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
+ memcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20) != 0) {
+ if (memcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Non-terminated string test 2");
goto error;
}
- HDmemcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20);
+ memcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20);
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
+ if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Non-terminated string test 2");
goto error;
}
- HDfree(buf);
+ free(buf);
buf = NULL;
if (H5Tclose(src_type) < 0)
goto error;
@@ -4858,19 +4858,19 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0)
goto error;
- if (NULL == (buf = (char *)HDcalloc((size_t)2, (size_t)10)))
+ if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10)))
goto error;
- HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20);
+ memcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghi abcdefghi ", (size_t)20) != 0) {
+ if (memcmp(buf, "abcdefghi abcdefghi ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C string to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20) != 0) {
+ if (memcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C string test 1");
goto error;
@@ -4879,17 +4879,17 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)5, H5T_STR_SPACEPAD)) < 0)
goto error;
- HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20);
+ memcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
+ if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C string to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
+ if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C string test 2");
goto error;
@@ -4902,22 +4902,22 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0)
goto error;
- HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20);
+ memcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd abcd ", (size_t)20) != 0) {
+ if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C string to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
+ if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C string test 3");
goto error;
}
- HDfree(buf);
+ free(buf);
buf = NULL;
if (H5Tclose(src_type) < 0)
goto error;
@@ -4931,19 +4931,19 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0)
goto error;
- if (NULL == (buf = (char *)HDcalloc((size_t)2, (size_t)10)))
+ if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10)))
goto error;
- HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
+ memcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
+ if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C buffer to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
+ if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C buffer test 1");
goto error;
@@ -4952,17 +4952,17 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)5, H5T_STR_SPACEPAD)) < 0)
goto error;
- HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20);
+ memcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
+ if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C buffer to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
+ if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C buffer test 2");
goto error;
@@ -4975,17 +4975,17 @@ test_conv_str_1(void)
goto error;
if ((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0)
goto error;
- HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20);
+ memcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd abcd ", (size_t)20) != 0) {
+ if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C buffer to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
+ if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C buffer test 3");
goto error;
@@ -4994,7 +4994,7 @@ test_conv_str_1(void)
goto error;
if (H5Tclose(dst_type) < 0)
goto error;
- HDfree(buf);
+ free(buf);
PASSED();
@@ -5013,7 +5013,7 @@ error:
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -5053,7 +5053,7 @@ test_conv_str_2(void)
goto error;
if ((f_type = mkstr((size_t)8, H5T_STR_SPACEPAD)) < 0)
goto error;
- if (NULL == (buf = (char *)HDcalloc(nelmts, (size_t)8)))
+ if (NULL == (buf = (char *)calloc(nelmts, (size_t)8)))
goto error;
for (i = 0; i < nelmts; i++) {
nchars = (size_t)(HDrand() % 8);
@@ -5065,8 +5065,8 @@ test_conv_str_2(void)
/* Do the conversions */
HDsnprintf(s, sizeof(s), "Testing random string conversion speed");
- HDprintf("%-70s", s);
- HDfflush(stdout);
+ printf("%-70s", s);
+ fflush(stdout);
if (H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (H5Tconvert(f_type, c_type, nelmts, buf, NULL, H5P_DEFAULT) < 0)
@@ -5084,7 +5084,7 @@ error:
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -5130,7 +5130,7 @@ test_conv_str_3(void)
*/
if ((type = mkstr((size_t)8, H5T_STR_NULLPAD)) < 0)
goto error;
- if (NULL == (buf = (char *)HDcalloc(nelmts, (size_t)8)))
+ if (NULL == (buf = (char *)calloc(nelmts, (size_t)8)))
FAIL_PUTS_ERROR("Allocation failed.");
for (i = 0; i < nelmts; i++) {
nchars = (size_t)(HDrand() % 8);
@@ -5221,7 +5221,7 @@ error:
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
if (tag)
H5free_memory(tag); /* Technically allocated by API call */
@@ -5271,22 +5271,22 @@ test_conv_enum_1(void)
} /* end for */
/* Initialize the buffer */
- if (NULL == (buf = (int *)HDmalloc(nelmts * MAX(H5Tget_size(t1), H5Tget_size(t2)))))
+ if (NULL == (buf = (int *)malloc(nelmts * MAX(H5Tget_size(t1), H5Tget_size(t2)))))
goto error;
for (u = 0; u < nelmts; u++)
buf[u] = HDrand() % 26;
/* Conversions */
HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N)");
- HDprintf("%-70s", s);
- HDfflush(stdout);
+ printf("%-70s", s);
+ fflush(stdout);
if (H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT) < 0)
goto error;
PASSED();
HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N log N)");
- HDprintf("%-70s", s);
- HDfflush(stdout);
+ printf("%-70s", s);
+ fflush(stdout);
if (H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT) < 0)
goto error;
PASSED();
@@ -5302,7 +5302,7 @@ error:
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
@@ -5346,12 +5346,12 @@ test_conv_enum_2(void)
/* Destination enum type */
dsttype = H5Tenum_create(H5T_NATIVE_INT);
- HDassert(H5Tget_size(dsttype) > H5Tget_size(srctype));
+ assert(H5Tget_size(dsttype) > H5Tget_size(srctype));
for (i = 0; i < 8; i++)
H5Tenum_insert(dsttype, mname[i], &i);
/* Source data */
- data = (int *)HDmalloc(NTESTELEM * sizeof(int));
+ data = (int *)malloc(NTESTELEM * sizeof(int));
for (i = 0; i < NTESTELEM; i++) {
((char *)data)[i * 3 + 2] = (char)(i % 8);
((char *)data)[i * 3 + 0] = 0;
@@ -5366,20 +5366,20 @@ test_conv_enum_2(void)
if (data[i] != i % 8) {
if (!nerrors++) {
H5_FAILED();
- HDprintf("element %d is %d but should have been %d\n", i, data[i], i % 8);
+ printf("element %d is %d but should have been %d\n", i, data[i], i % 8);
}
}
}
/* Cleanup */
- HDfree(data);
+ free(data);
H5Tclose(srctype);
H5Tclose(dsttype);
H5Tclose(oddsize);
/* Failure */
if (nerrors) {
- HDprintf("total of %d conversion errors out of %d elements for enums\n", nerrors, NTESTELEM);
+ printf("total of %d conversion errors out of %d elements for enums\n", nerrors, NTESTELEM);
return 1;
}
@@ -5420,7 +5420,7 @@ test_conv_bitfield(void)
goto error;
if (buf[0] != 0xAA || buf[1] != 0xAA || buf[2] != 0 || buf[3] != 0) {
H5_FAILED();
- HDprintf(" s=0xaaaa, d=0x%02x%02x%02x%02x (test 1)\n", buf[3], buf[2], buf[1], buf[0]);
+ printf(" s=0xaaaa, d=0x%02x%02x%02x%02x (test 1)\n", buf[3], buf[2], buf[1], buf[0]);
goto error;
}
@@ -5441,7 +5441,7 @@ test_conv_bitfield(void)
goto error;
if (buf[0] != 0 || buf[1] != 0xA8 || buf[2] != 0x2A || buf[3] != 0) {
H5_FAILED();
- HDprintf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 2)\n", buf[3], buf[2], buf[1], buf[0]);
+ printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 2)\n", buf[3], buf[2], buf[1], buf[0]);
goto error;
}
@@ -5457,7 +5457,7 @@ test_conv_bitfield(void)
goto error;
if (buf[0] != 0xff || buf[1] != 0xAB || buf[2] != 0xEA || buf[3] != 0xff) {
H5_FAILED();
- HDprintf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 3)\n", buf[3], buf[2], buf[1], buf[0]);
+ printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 3)\n", buf[3], buf[2], buf[1], buf[0]);
goto error;
}
@@ -5541,7 +5541,7 @@ test_bitfield_funcs(void)
H5E_END_TRY;
if (size > 0) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -5552,7 +5552,7 @@ test_bitfield_funcs(void)
H5E_END_TRY;
if (inpad > -1) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -5563,7 +5563,7 @@ test_bitfield_funcs(void)
H5E_END_TRY;
if (cset > -1) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -5574,7 +5574,7 @@ test_bitfield_funcs(void)
H5E_END_TRY;
if (strpad > -1) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -5585,7 +5585,7 @@ test_bitfield_funcs(void)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -5596,7 +5596,7 @@ test_bitfield_funcs(void)
H5E_END_TRY;
if (tag) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -5607,7 +5607,7 @@ test_bitfield_funcs(void)
H5E_END_TRY;
if (super >= 0) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -5735,7 +5735,7 @@ opaque_check(int tag_it)
H5E_END_TRY;
if (status >= 0) {
H5_FAILED();
- HDprintf(" opaque conversion should have failed but succeeded\n");
+ printf(" opaque conversion should have failed but succeeded\n");
goto error;
}
@@ -5748,7 +5748,7 @@ opaque_check(int tag_it)
goto error;
if (saved + 1 != num_opaque_conversions_g) {
H5_FAILED();
- HDprintf(" unexpected number of opaque conversions\n");
+ printf(" unexpected number of opaque conversions\n");
goto error;
}
@@ -5794,9 +5794,9 @@ opaque_long(void)
TEST_ERROR;
/* Create long tag */
- if (NULL == (long_tag = (char *)HDmalloc((size_t)(16384 + 1))))
+ if (NULL == (long_tag = (char *)malloc((size_t)(16384 + 1))))
TEST_ERROR;
- HDmemset(long_tag, 'a', (size_t)16384);
+ memset(long_tag, 'a', (size_t)16384);
long_tag[16384] = '\0';
/* Set opaque type's tag */
@@ -5813,7 +5813,7 @@ opaque_long(void)
TEST_ERROR;
/* Release memory for tag */
- HDfree(long_tag);
+ free(long_tag);
return 0;
@@ -5821,7 +5821,7 @@ error:
if (dt > 0)
H5Tclose(dt);
if (long_tag)
- HDfree(long_tag);
+ free(long_tag);
H5_FAILED();
return 1;
}
@@ -5865,7 +5865,7 @@ opaque_funcs(void)
}
H5E_END_TRY;
if (ret >= 0) {
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
TEST_ERROR;
} /* end if */
@@ -5875,7 +5875,7 @@ opaque_funcs(void)
}
H5E_END_TRY;
if (ret >= 0) {
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
TEST_ERROR;
} /* end if */
@@ -5885,7 +5885,7 @@ opaque_funcs(void)
}
H5E_END_TRY;
if (size > 0) {
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
TEST_ERROR;
} /* end if */
@@ -5895,7 +5895,7 @@ opaque_funcs(void)
}
H5E_END_TRY;
if (inpad > -1) {
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
TEST_ERROR;
} /* end if */
@@ -5905,7 +5905,7 @@ opaque_funcs(void)
}
H5E_END_TRY;
if (cset > -1) {
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
TEST_ERROR;
} /* end if */
@@ -5915,7 +5915,7 @@ opaque_funcs(void)
}
H5E_END_TRY;
if (strpad > -1) {
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
TEST_ERROR;
} /* end if */
@@ -5925,7 +5925,7 @@ opaque_funcs(void)
}
H5E_END_TRY;
if (ret >= 0) {
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
TEST_ERROR;
} /* end if */
@@ -5935,7 +5935,7 @@ opaque_funcs(void)
}
H5E_END_TRY;
if (sign > -1) {
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
TEST_ERROR;
} /* end if */
@@ -5945,7 +5945,7 @@ opaque_funcs(void)
}
H5E_END_TRY;
if (super >= 0) {
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
TEST_ERROR;
} /* end if */
@@ -6013,71 +6013,71 @@ test_encode(void)
/* Create a compound datatype */
if ((tid1 = H5Tcreate(H5T_COMPOUND, sizeof(struct cmpd))) < 0) {
H5_FAILED();
- HDprintf("Can't create datatype!\n");
+ printf("Can't create datatype!\n");
goto error;
}
if (H5Tinsert(tid1, "a", HOFFSET(struct cmpd, a), H5T_NATIVE_INT) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'a'\n");
+ printf("Can't insert field 'a'\n");
goto error;
}
if (H5Tinsert(tid1, "b", HOFFSET(struct cmpd, b), H5T_NATIVE_FLOAT) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'b'\n");
+ printf("Can't insert field 'b'\n");
goto error;
}
if (H5Tinsert(tid1, "c", HOFFSET(struct cmpd, c), H5T_NATIVE_LONG) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'c'\n");
+ printf("Can't insert field 'c'\n");
goto error;
}
if (H5Tinsert(tid1, "d", HOFFSET(struct cmpd, d), H5T_NATIVE_DOUBLE) < 0) {
H5_FAILED();
- HDprintf("Can't insert field 'd'\n");
+ printf("Can't insert field 'd'\n");
goto error;
}
/* Create a enumerate datatype */
if ((tid2 = H5Tcreate(H5T_ENUM, sizeof(short))) < 0) {
H5_FAILED();
- HDprintf("Can't create enumerate type\n");
+ printf("Can't create enumerate type\n");
goto error;
}
if (H5Tenum_insert(tid2, "RED", (enum_val = 0, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
}
if (H5Tenum_insert(tid2, "GREEN", (enum_val = 1, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
}
if (H5Tenum_insert(tid2, "BLUE", (enum_val = 2, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
}
if (H5Tenum_insert(tid2, "ORANGE", (enum_val = 3, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
}
if (H5Tenum_insert(tid2, "YELLOW", (enum_val = 4, &enum_val)) < 0) {
H5_FAILED();
- HDprintf("Can't insert field into enumeration type\n");
+ printf("Can't insert field into enumeration type\n");
goto error;
}
/* Create a variable-length string type */
if ((tid3 = H5Tcopy(H5T_C_S1)) < 0) {
H5_FAILED();
- HDprintf("Can't copy a string type\n");
+ printf("Can't copy a string type\n");
goto error;
}
if (H5Tset_size(tid3, H5T_VARIABLE) < 0) {
H5_FAILED();
- HDprintf("Can't the string type to be variable-length\n");
+ printf("Can't the string type to be variable-length\n");
goto error;
}
@@ -6088,12 +6088,12 @@ test_encode(void)
/* Encode compound type in a buffer */
if (H5Tencode(tid1, NULL, &cmpd_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode compound type\n");
+ printf("Can't encode compound type\n");
goto error;
}
if (cmpd_buf_size > 0)
- cmpd_buf = (unsigned char *)HDcalloc((size_t)1, cmpd_buf_size);
+ cmpd_buf = (unsigned char *)calloc((size_t)1, cmpd_buf_size);
/* Try decoding an incorrect (empty) buffer (should fail) */
H5E_BEGIN_TRY
@@ -6103,13 +6103,13 @@ test_encode(void)
H5E_END_TRY;
if (ret_id != FAIL) {
H5_FAILED();
- HDprintf("Decoded an empty buffer!\n");
+ printf("Decoded an empty buffer!\n");
goto error;
}
if (H5Tencode(tid1, cmpd_buf, &cmpd_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode compound type\n");
+ printf("Can't encode compound type\n");
goto error;
}
@@ -6120,96 +6120,96 @@ test_encode(void)
/* Verify that the datatype was copied exactly */
if (H5Tequal(decoded_tid1, tid1) <= 0) {
H5_FAILED();
- HDprintf("Datatype wasn't encoded & decoded identically\n");
+ printf("Datatype wasn't encoded & decoded identically\n");
goto error;
}
/* Query member number and member index by name, for compound type. */
if (H5Tget_nmembers(decoded_tid1) != 4) {
H5_FAILED();
- HDprintf("Can't get member number\n");
+ printf("Can't get member number\n");
goto error;
}
if (H5Tget_member_index(decoded_tid1, "c") != 2) {
H5_FAILED();
- HDprintf("Can't get correct index number\n");
+ printf("Can't get correct index number\n");
goto error;
}
/* Encode enumerate type in a buffer */
if (H5Tencode(tid2, NULL, &enum_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode enumerate type\n");
+ printf("Can't encode enumerate type\n");
goto error;
}
if (enum_buf_size > 0)
- enum_buf = (unsigned char *)HDcalloc((size_t)1, enum_buf_size);
+ enum_buf = (unsigned char *)calloc((size_t)1, enum_buf_size);
if (H5Tencode(tid2, enum_buf, &enum_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode enumerate type\n");
+ printf("Can't encode enumerate type\n");
goto error;
}
/* Decode from the enumerate buffer and return an object handle */
if ((decoded_tid2 = H5Tdecode(enum_buf)) < 0) {
H5_FAILED();
- HDprintf("Can't decode enumerate type\n");
+ printf("Can't decode enumerate type\n");
goto error;
}
/* Verify that the datatype was copied exactly */
if (H5Tequal(decoded_tid2, tid2) <= 0) {
H5_FAILED();
- HDprintf("Datatype wasn't encoded & decoded identically\n");
+ printf("Datatype wasn't encoded & decoded identically\n");
goto error;
}
/* Query member number and member index by name, for enumeration type. */
if (H5Tget_nmembers(decoded_tid2) != 5) {
H5_FAILED();
- HDprintf("Can't get member number\n");
+ printf("Can't get member number\n");
goto error;
}
if (H5Tget_member_index(decoded_tid2, "ORANGE") != 3) {
H5_FAILED();
- HDprintf("Can't get correct index number\n");
+ printf("Can't get correct index number\n");
goto error;
}
/* Encode VL string type in a buffer */
if (H5Tencode(tid3, NULL, &vlstr_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode VL string type\n");
+ printf("Can't encode VL string type\n");
goto error;
}
if (vlstr_buf_size > 0)
- vlstr_buf = (unsigned char *)HDcalloc((size_t)1, vlstr_buf_size);
+ vlstr_buf = (unsigned char *)calloc((size_t)1, vlstr_buf_size);
if (H5Tencode(tid3, vlstr_buf, &vlstr_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode VL string type\n");
+ printf("Can't encode VL string type\n");
goto error;
}
/* Decode from the VL string buffer and return an object handle */
if ((decoded_tid3 = H5Tdecode(vlstr_buf)) < 0) {
H5_FAILED();
- HDprintf("Can't decode VL string type\n");
+ printf("Can't decode VL string type\n");
goto error;
}
/* Verify that the datatype was copied exactly */
if (H5Tequal(decoded_tid3, tid3) <= 0) {
H5_FAILED();
- HDprintf("Datatype wasn't encoded & decoded identically\n");
+ printf("Datatype wasn't encoded & decoded identically\n");
goto error;
}
if (!H5Tis_variable_str(decoded_tid3)) {
H5_FAILED();
- HDprintf("Datatype wasn't encoded & decoded identically\n");
+ printf("Datatype wasn't encoded & decoded identically\n");
goto error;
}
@@ -6220,58 +6220,58 @@ test_encode(void)
/* Commit compound datatype and close it */
if (H5Tcommit2(file, compnd_type, tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Can't commit compound datatype\n");
+ printf("Can't commit compound datatype\n");
goto error;
}
if (H5Tclose(tid1) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Tclose(decoded_tid1) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
- HDfree(cmpd_buf);
+ free(cmpd_buf);
cmpd_buf_size = 0;
/* Commit enumeration datatype and close it */
if (H5Tcommit2(file, enum_type, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Can't commit compound datatype\n");
+ printf("Can't commit compound datatype\n");
goto error;
}
if (H5Tclose(tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Tclose(decoded_tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
- HDfree(enum_buf);
+ free(enum_buf);
enum_buf_size = 0;
/* Commit enumeration datatype and close it */
if (H5Tcommit2(file, vlstr_type, tid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Can't commit vl string datatype\n");
+ printf("Can't commit vl string datatype\n");
goto error;
}
if (H5Tclose(tid3) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Tclose(decoded_tid3) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
- HDfree(vlstr_buf);
+ free(vlstr_buf);
vlstr_buf_size = 0;
/* Open the dataytpe for query */
@@ -6289,16 +6289,16 @@ test_encode(void)
/* Encode compound type in a buffer */
if (H5Tencode(tid1, NULL, &cmpd_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode compound type\n");
+ printf("Can't encode compound type\n");
goto error;
}
if (cmpd_buf_size > 0)
- cmpd_buf = (unsigned char *)HDcalloc((size_t)1, cmpd_buf_size);
+ cmpd_buf = (unsigned char *)calloc((size_t)1, cmpd_buf_size);
if (H5Tencode(tid1, cmpd_buf, &cmpd_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode compound type\n");
+ printf("Can't encode compound type\n");
goto error;
}
@@ -6309,97 +6309,97 @@ test_encode(void)
/* Verify that the datatype was copied exactly */
if (H5Tequal(decoded_tid1, tid1) <= 0) {
H5_FAILED();
- HDprintf("Datatype wasn't encoded & decoded identically\n");
+ printf("Datatype wasn't encoded & decoded identically\n");
goto error;
}
/* Query member number and member index by name, for compound type. */
if (H5Tget_nmembers(decoded_tid1) != 4) {
H5_FAILED();
- HDprintf("Can't get member number\n");
+ printf("Can't get member number\n");
goto error;
}
if (H5Tget_member_index(decoded_tid1, "c") != 2) {
H5_FAILED();
- HDprintf("Can't get correct index number\n");
+ printf("Can't get correct index number\n");
goto error;
}
/* Encode enumerate type in a buffer */
if (H5Tencode(tid2, NULL, &enum_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode enumerate type\n");
+ printf("Can't encode enumerate type\n");
goto error;
}
if (enum_buf_size > 0)
- enum_buf = (unsigned char *)HDcalloc((size_t)1, enum_buf_size);
+ enum_buf = (unsigned char *)calloc((size_t)1, enum_buf_size);
if (H5Tencode(tid2, enum_buf, &enum_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode enumerate type\n");
+ printf("Can't encode enumerate type\n");
goto error;
}
/* Decode from the enumerate buffer and return an object handle */
if ((decoded_tid2 = H5Tdecode(enum_buf)) < 0) {
H5_FAILED();
- HDprintf("Can't decode enumerate type\n");
+ printf("Can't decode enumerate type\n");
goto error;
}
/* Verify that the datatype was copied exactly */
if (H5Tequal(decoded_tid2, tid2) <= 0) {
H5_FAILED();
- HDprintf("Datatype wasn't encoded & decoded identically\n");
+ printf("Datatype wasn't encoded & decoded identically\n");
goto error;
}
/* Query member number and member index by name, for enumeration type. */
if (H5Tget_nmembers(decoded_tid2) != 5) {
H5_FAILED();
- HDprintf("Can't get member number\n");
+ printf("Can't get member number\n");
goto error;
}
if (H5Tget_member_index(decoded_tid2, "ORANGE") != 3) {
H5_FAILED();
- HDprintf("Can't get correct index number\n");
+ printf("Can't get correct index number\n");
goto error;
}
/* Encode VL string type in a buffer */
if (H5Tencode(tid3, NULL, &vlstr_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode VL string type\n");
+ printf("Can't encode VL string type\n");
goto error;
}
if (vlstr_buf_size > 0)
- vlstr_buf = (unsigned char *)HDcalloc((size_t)1, vlstr_buf_size);
+ vlstr_buf = (unsigned char *)calloc((size_t)1, vlstr_buf_size);
if (H5Tencode(tid3, vlstr_buf, &vlstr_buf_size) < 0) {
H5_FAILED();
- HDprintf("Can't encode VL string type\n");
+ printf("Can't encode VL string type\n");
goto error;
}
/* Decode from the VL string buffer and return an object handle */
if ((decoded_tid3 = H5Tdecode(vlstr_buf)) < 0) {
H5_FAILED();
- HDprintf("Can't decode VL string type\n");
+ printf("Can't decode VL string type\n");
goto error;
}
- HDfree(vlstr_buf);
+ free(vlstr_buf);
/* Verify that the datatype was copied exactly */
if (H5Tequal(decoded_tid3, tid3) <= 0) {
H5_FAILED();
- HDprintf("Datatype wasn't encoded & decoded identically\n");
+ printf("Datatype wasn't encoded & decoded identically\n");
goto error;
}
if (!H5Tis_variable_str(decoded_tid3)) {
H5_FAILED();
- HDprintf("Datatype wasn't encoded & decoded identically\n");
+ printf("Datatype wasn't encoded & decoded identically\n");
goto error;
}
@@ -6411,19 +6411,19 @@ test_encode(void)
/* Make sure the reference counts for the decoded datatypes are one. */
if (H5Iget_ref(decoded_tid1) != 1) {
H5_FAILED();
- HDprintf("Decoded datatype has incorrect reference count\n");
+ printf("Decoded datatype has incorrect reference count\n");
goto error;
}
if (H5Iget_ref(decoded_tid2) != 1) {
H5_FAILED();
- HDprintf("Decoded datatype has incorrect reference count\n");
+ printf("Decoded datatype has incorrect reference count\n");
goto error;
}
if (H5Iget_ref(decoded_tid3) != 1) {
H5_FAILED();
- HDprintf("Decoded datatype has incorrect reference count\n");
+ printf("Decoded datatype has incorrect reference count\n");
goto error;
}
@@ -6431,19 +6431,19 @@ test_encode(void)
* decremented and the datatypes are closed. */
if (H5Idec_ref(decoded_tid1) != 0) {
H5_FAILED();
- HDprintf("Decoded datatype can't close\n");
+ printf("Decoded datatype can't close\n");
goto error;
}
if (H5Idec_ref(decoded_tid2) != 0) {
H5_FAILED();
- HDprintf("Decoded datatype can't close\n");
+ printf("Decoded datatype can't close\n");
goto error;
}
if (H5Idec_ref(decoded_tid3) != 0) {
H5_FAILED();
- HDprintf("Decoded datatype can't close\n");
+ printf("Decoded datatype can't close\n");
goto error;
}
@@ -6455,7 +6455,7 @@ test_encode(void)
H5E_END_TRY;
if (ret != FAIL) {
H5_FAILED();
- HDprintf("Decoded datatype should have been closed\n");
+ printf("Decoded datatype should have been closed\n");
goto error;
}
@@ -6466,7 +6466,7 @@ test_encode(void)
H5E_END_TRY;
if (ret != FAIL) {
H5_FAILED();
- HDprintf("Decoded datatype should have been closed\n");
+ printf("Decoded datatype should have been closed\n");
goto error;
}
@@ -6477,7 +6477,7 @@ test_encode(void)
H5E_END_TRY;
if (ret != FAIL) {
H5_FAILED();
- HDprintf("Decoded datatype should have been closed\n");
+ printf("Decoded datatype should have been closed\n");
goto error;
}
@@ -6488,28 +6488,28 @@ test_encode(void)
/* Close datatype and file */
if (H5Tclose(tid1) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Tclose(tid2) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Tclose(tid3) < 0) {
H5_FAILED();
- HDprintf("Can't close datatype\n");
+ printf("Can't close datatype\n");
goto error;
}
if (H5Fclose(file) < 0) {
H5_FAILED();
- HDprintf("Can't close file\n");
+ printf("Can't close file\n");
goto error;
}
- HDfree(cmpd_buf);
- HDfree(enum_buf);
+ free(cmpd_buf);
+ free(enum_buf);
PASSED();
return 0;
@@ -6796,7 +6796,7 @@ test_int_float_except(void)
TEST_ERROR;
/* Convert buffer */
- HDmemset(&e, 0, sizeof(except_info_t));
+ memset(&e, 0, sizeof(except_info_t));
if (H5Tconvert(H5T_NATIVE_FLOAT, H5T_NATIVE_INT, (size_t)CONVERT_SIZE, buf, NULL, dxpl) < 0)
TEST_ERROR;
@@ -6820,7 +6820,7 @@ test_int_float_except(void)
TEST_ERROR;
/* Convert buffer */
- HDmemset(&e, 0, sizeof(except_info_t));
+ memset(&e, 0, sizeof(except_info_t));
if (H5Tconvert(H5T_NATIVE_INT, H5T_NATIVE_FLOAT, (size_t)CONVERT_SIZE, buf, NULL, dxpl) < 0)
TEST_ERROR;
@@ -6846,7 +6846,7 @@ test_int_float_except(void)
/* Work on second buffer */
/* Convert second buffer */
- HDmemset(&e, 0, sizeof(except_info_t));
+ memset(&e, 0, sizeof(except_info_t));
if (H5Tconvert(H5T_NATIVE_INT, H5T_NATIVE_FLOAT, (size_t)CONVERT_SIZE, buf2, NULL, dxpl) < 0)
TEST_ERROR;
@@ -6870,7 +6870,7 @@ test_int_float_except(void)
TEST_ERROR;
/* Convert buffer */
- HDmemset(&e, 0, sizeof(except_info_t));
+ memset(&e, 0, sizeof(except_info_t));
if (H5Tconvert(H5T_NATIVE_FLOAT, H5T_NATIVE_INT, (size_t)CONVERT_SIZE, buf2, NULL, dxpl) < 0)
TEST_ERROR;
@@ -7597,11 +7597,11 @@ create_del_obj_named_test_file(const char *filename, hid_t fapl, H5F_libver_t lo
/* Make copy of FAPL */
my_fapl = H5Pcopy(fapl);
- HDassert(my_fapl > 0);
+ assert(my_fapl > 0);
/* Use low/high version of file format */
status = H5Pset_libver_bounds(my_fapl, low, high);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Set new format flag. Note: the case high < low should be caught in the caller */
use_at_least_v18 = 0;
@@ -7610,80 +7610,80 @@ create_del_obj_named_test_file(const char *filename, hid_t fapl, H5F_libver_t lo
/* Create a file creation property list (used for the root group's creation property list) */
fcpl = H5Pcreate(H5P_FILE_CREATE);
- HDassert(fcpl > 0);
+ assert(fcpl > 0);
if (use_at_least_v18) {
/* Use dense link storage for all links in root group */
status = H5Pset_link_phase_change(fcpl, 0, 0);
- HDassert(status >= 0);
+ assert(status >= 0);
} /* end if */
/* Create file with attribute that uses committed datatype */
file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, my_fapl);
- HDassert(file > 0);
+ assert(file > 0);
/* Close FCPL */
status = H5Pclose(fcpl);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Close FAPL */
status = H5Pclose(my_fapl);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create datatype to commit */
type = H5Tvlen_create(H5T_NATIVE_INT);
- HDassert(type > 0);
+ assert(type > 0);
/* Commit datatype */
status = H5Tcommit2(file, DEL_OBJ_NAMED_NAMED_DTYPE, type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create scalar dataspace */
space = H5Screate(H5S_SCALAR);
- HDassert(space > 0);
+ assert(space > 0);
/* Create a dataset creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
- HDassert(dcpl > 0);
+ assert(dcpl > 0);
if (use_at_least_v18) {
/* Use dense attribute storage for all attributes on dataset */
status = H5Pset_attr_phase_change(dcpl, 0, 0);
- HDassert(status >= 0);
+ assert(status >= 0);
} /* end if */
/* Create dataset */
dset = H5Dcreate2(file, DEL_OBJ_NAMED_DATASET, type, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- HDassert(dset > 0);
+ assert(dset > 0);
/* Close DCPL */
status = H5Pclose(dcpl);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Close dataset */
status = H5Dclose(dset);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create attribute */
attr = H5Acreate_by_name(file, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, type, space, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
- HDassert(attr > 0);
+ assert(attr > 0);
/* Close dataspace */
status = H5Sclose(space);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Close datatype */
status = H5Tclose(type);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Close attribute */
status = H5Aclose(attr);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Close file */
status = H5Fclose(file);
- HDassert(status >= 0);
+ assert(status >= 0);
} /* end create_del_obj_named_test_file() */
/*-------------------------------------------------------------------------
@@ -8878,12 +8878,12 @@ main(void)
fapl = h5_fileaccess();
if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0) {
- HDprintf("Can't check if driver is parallel-enabled\n");
- HDexit(EXIT_FAILURE);
+ printf("Can't check if driver is parallel-enabled\n");
+ exit(EXIT_FAILURE);
}
if (ALIGNMENT)
- HDprintf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
+ printf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
/* Do the tests */
nerrors += test_classes();
@@ -8951,11 +8951,11 @@ main(void)
nerrors += test_versionbounds();
if (nerrors) {
- HDprintf("***** %lu FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %lu FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
}
- HDprintf("All datatype tests passed.\n");
+ printf("All datatype tests passed.\n");
return 0;
}
diff --git a/test/earray.c b/test/earray.c
index cc79987..37462df 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -186,7 +186,7 @@ static int
init_cparam(H5EA_create_t *cparam)
{
/* Wipe out background */
- HDmemset(cparam, 0, sizeof(*cparam));
+ memset(cparam, 0, sizeof(*cparam));
/* General parameters */
cparam->cls = H5EA_CLS_TEST;
@@ -223,14 +223,14 @@ init_tparam(earray_test_param_t *tparam, const H5EA_create_t *cparam)
size_t u; /* Local index variable */
/* Wipe out background */
- HDmemset(tparam, 0, sizeof(*tparam));
+ memset(tparam, 0, sizeof(*tparam));
/* Compute general information */
tparam->nsblks = 1 + (cparam->max_nelmts_bits - H5VM_log2_of2(cparam->data_blk_min_elmts));
/* Allocate information for each super block */
- tparam->sblk_info = (H5EA_sblk_info_t *)HDmalloc(sizeof(H5EA_sblk_info_t) * tparam->nsblks);
- HDassert(tparam->sblk_info);
+ tparam->sblk_info = (H5EA_sblk_info_t *)malloc(sizeof(H5EA_sblk_info_t) * tparam->nsblks);
+ assert(tparam->sblk_info);
/* Compute information about each super block */
start_idx = 0;
@@ -266,7 +266,7 @@ static int
finish_tparam(earray_test_param_t *tparam)
{
/* Release super block information */
- HDfree(tparam->sblk_info);
+ free(tparam->sblk_info);
tparam->sblk_info = NULL;
return (0);
@@ -331,64 +331,62 @@ check_stats(const H5EA_t *ea, const earray_state_t *state)
/* Compare information */
if (earray_stats.stored.max_idx_set != state->max_idx_set) {
- HDfprintf(stdout,
- "earray_stats.stored.max_idx_set = %" PRIuHSIZE ", state->max_idx_set = %" PRIuHSIZE "\n",
- earray_stats.stored.max_idx_set, state->max_idx_set);
+ fprintf(stdout,
+ "earray_stats.stored.max_idx_set = %" PRIuHSIZE ", state->max_idx_set = %" PRIuHSIZE "\n",
+ earray_stats.stored.max_idx_set, state->max_idx_set);
TEST_ERROR;
} /* end if */
if (earray_stats.stored.nelmts != state->nelmts) {
- HDfprintf(stdout, "earray_stats.stored.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n",
- earray_stats.stored.nelmts, state->nelmts);
+ fprintf(stdout, "earray_stats.stored.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n",
+ earray_stats.stored.nelmts, state->nelmts);
TEST_ERROR;
} /* end if */
if (earray_stats.computed.hdr_size != state->hdr_size) {
- HDfprintf(stdout,
- "earray_stats.computed.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n",
- earray_stats.computed.hdr_size, state->hdr_size);
+ fprintf(stdout, "earray_stats.computed.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n",
+ earray_stats.computed.hdr_size, state->hdr_size);
TEST_ERROR;
} /* end if */
if (earray_stats.computed.nindex_blks != state->nindex_blks) {
- HDfprintf(stdout,
- "earray_stats.computed.nindex_blks = %" PRIuHSIZE ", state->nindex_blks = %" PRIuHSIZE "\n",
- earray_stats.computed.nindex_blks, state->nindex_blks);
+ fprintf(stdout,
+ "earray_stats.computed.nindex_blks = %" PRIuHSIZE ", state->nindex_blks = %" PRIuHSIZE "\n",
+ earray_stats.computed.nindex_blks, state->nindex_blks);
TEST_ERROR;
} /* end if */
if (earray_stats.computed.index_blk_size != state->index_blk_size) {
- HDfprintf(stdout,
- "earray_stats.computed.index_blk_size = %" PRIuHSIZE ", state->index_blk_size = %" PRIuHSIZE
- "\n",
- earray_stats.computed.index_blk_size, state->index_blk_size);
+ fprintf(stdout,
+ "earray_stats.computed.index_blk_size = %" PRIuHSIZE ", state->index_blk_size = %" PRIuHSIZE
+ "\n",
+ earray_stats.computed.index_blk_size, state->index_blk_size);
TEST_ERROR;
} /* end if */
if (earray_stats.stored.ndata_blks != state->ndata_blks) {
- HDfprintf(stdout,
- "earray_stats.stored.ndata_blks = %" PRIuHSIZE ", state->ndata_blks = %" PRIuHSIZE "\n",
- earray_stats.stored.ndata_blks, state->ndata_blks);
+ fprintf(stdout,
+ "earray_stats.stored.ndata_blks = %" PRIuHSIZE ", state->ndata_blks = %" PRIuHSIZE "\n",
+ earray_stats.stored.ndata_blks, state->ndata_blks);
TEST_ERROR;
} /* end if */
/* Don't compare this currently, it's very hard to compute */
#ifdef NOT_YET
if (earray_stats.stored.data_blk_size != state->data_blk_size) {
- HDfprintf(stdout,
- "earray_stats.stored.data_blk_size = %" PRIuHSIZE ", state->data_blk_size = %" PRIuHSIZE
- "\n",
- earray_stats.stored.data_blk_size, state->data_blk_size);
+ fprintf(stdout,
+ "earray_stats.stored.data_blk_size = %" PRIuHSIZE ", state->data_blk_size = %" PRIuHSIZE "\n",
+ earray_stats.stored.data_blk_size, state->data_blk_size);
TEST_ERROR;
} /* end if */
#endif /* NOT_YET */
if (earray_stats.stored.nsuper_blks != state->nsuper_blks) {
- HDfprintf(stdout,
- "earray_stats.stored.nsuper_blks = %" PRIuHSIZE ", state->nsuper_blks = %" PRIuHSIZE "\n",
- earray_stats.stored.nsuper_blks, state->nsuper_blks);
+ fprintf(stdout,
+ "earray_stats.stored.nsuper_blks = %" PRIuHSIZE ", state->nsuper_blks = %" PRIuHSIZE "\n",
+ earray_stats.stored.nsuper_blks, state->nsuper_blks);
TEST_ERROR;
} /* end if */
/* Don't compare this currently, it's very hard to compute */
#ifdef NOT_YET
if (earray_stats.stored.super_blk_size != state->super_blk_size) {
- HDfprintf(stdout,
- "earray_stats.stored.super_blk_size = %" PRIuHSIZE ", state->super_blk_size = %" PRIuHSIZE
- "\n",
- earray_stats.stored.super_blk_size, state->super_blk_size);
+ fprintf(stdout,
+ "earray_stats.stored.super_blk_size = %" PRIuHSIZE ", state->super_blk_size = %" PRIuHSIZE
+ "\n",
+ earray_stats.stored.super_blk_size, state->super_blk_size);
TEST_ERROR;
} /* end if */
#endif /* NOT_YET */
@@ -493,7 +491,7 @@ create_array(H5F_t *f, const H5EA_create_t *cparam, H5EA_t **ea, haddr_t *ea_add
FAIL_STACK_ERROR;
if (!H5F_addr_defined(*ea_addr))
TEST_ERROR;
- HDmemset(&state, 0, sizeof(state));
+ memset(&state, 0, sizeof(state));
state.hdr_size = EA_HDR_SIZE;
if (check_stats(*ea, &state))
TEST_ERROR;
@@ -524,7 +522,7 @@ verify_cparam(const H5EA_t *ea, const H5EA_create_t *cparam)
H5EA_create_t test_cparam; /* Creation parameters for array */
/* Retrieve creation parameters */
- HDmemset(&test_cparam, 0, sizeof(H5EA_create_t));
+ memset(&test_cparam, 0, sizeof(H5EA_create_t));
if (H5EA__get_cparam_test(ea, &test_cparam) < 0)
FAIL_STACK_ERROR;
@@ -620,7 +618,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
H5EA_create_t test_cparam; /* Creation parameters for array */
/* Set invalid element size */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.raw_elmt_size = 0;
H5E_BEGIN_TRY
{
@@ -637,7 +635,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
} /* end if */
/* Set invalid max. # of elements bits */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_nelmts_bits = 0;
H5E_BEGIN_TRY
{
@@ -653,7 +651,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
TEST_ERROR;
} /* end if */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_nelmts_bits = 65;
H5E_BEGIN_TRY
{
@@ -670,7 +668,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
} /* end if */
/* Set invalid min. # of data block pointers in super blocks */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.sup_blk_min_data_ptrs = 0;
H5E_BEGIN_TRY
{
@@ -685,7 +683,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
/* Indicate error */
TEST_ERROR;
} /* end if */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.sup_blk_min_data_ptrs = 1;
H5E_BEGIN_TRY
{
@@ -700,7 +698,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
/* Indicate error */
TEST_ERROR;
} /* end if */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.sup_blk_min_data_ptrs = 6;
H5E_BEGIN_TRY
{
@@ -717,7 +715,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
} /* end if */
/* Set invalid min. # of elements per data block */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.data_blk_min_elmts = 0;
H5E_BEGIN_TRY
{
@@ -735,7 +733,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
/* Set invalid max. # of elements per data block page bits */
if (test_cparam.idx_blk_elmts > 0) {
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits =
(uint8_t)(H5VM_log2_gen((uint64_t)test_cparam.idx_blk_elmts) - 1);
H5E_BEGIN_TRY
@@ -752,7 +750,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
TEST_ERROR;
} /* end if */
} /* end if */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = 4; /* corresponds to 16 elements in data block page, which is
less than the 64 elements for the default settings */
H5E_BEGIN_TRY
@@ -768,7 +766,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
/* Indicate error */
TEST_ERROR;
} /* end if */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = (uint8_t)(test_cparam.max_nelmts_bits + 1);
H5E_BEGIN_TRY
{
@@ -1300,8 +1298,8 @@ eiter_fw_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_para
eiter_fw_t *eiter; /* Forward element iteration object */
/* Allocate space for the element iteration object */
- eiter = (eiter_fw_t *)HDmalloc(sizeof(eiter_fw_t));
- HDassert(eiter);
+ eiter = (eiter_fw_t *)malloc(sizeof(eiter_fw_t));
+ assert(eiter);
/* Initialize the element iteration object */
eiter->idx = 0;
@@ -1331,7 +1329,7 @@ eiter_fw_next(void *in_eiter)
hssize_t ret_val;
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Get the next array index to test */
ret_val = (hssize_t)eiter->idx++;
@@ -1358,7 +1356,7 @@ eiter_fw_max(const void *in_eiter)
const eiter_fw_t *eiter = (const eiter_fw_t *)in_eiter;
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Return the max. array index used */
return ((hssize_t)(eiter->idx - 1));
@@ -1384,10 +1382,10 @@ eiter_fw_state(void *in_eiter, const H5EA_create_t *cparam, const earray_test_pa
eiter_fw_t *eiter = (eiter_fw_t *)in_eiter;
/* Sanity check */
- HDassert(eiter);
- HDassert(cparam);
- HDassert(tparam);
- HDassert(state);
+ assert(eiter);
+ assert(cparam);
+ assert(tparam);
+ assert(state);
/* Compute the state of the extensible array */
state->hdr_size = EA_HDR_SIZE;
@@ -1441,10 +1439,10 @@ static int
eiter_fw_term(void *eiter)
{
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Free iteration object */
- HDfree(eiter);
+ free(eiter);
return (0);
} /* end eiter_fw_term() */
@@ -1487,8 +1485,8 @@ eiter_rv_init(const H5EA_create_t *cparam, const earray_test_param_t *tparam, hs
eiter_rv_t *eiter; /* Reverse element iteration object */
/* Allocate space for the element iteration object */
- eiter = (eiter_rv_t *)HDmalloc(sizeof(eiter_rv_t));
- HDassert(eiter);
+ eiter = (eiter_rv_t *)malloc(sizeof(eiter_rv_t));
+ assert(eiter);
/* Initialize reverse iteration info */
eiter->idx = cnt - 1;
@@ -1531,7 +1529,7 @@ eiter_rv_next(void *in_eiter)
hssize_t ret_val;
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Get the next array index to test */
ret_val = (hssize_t)eiter->idx--;
@@ -1558,7 +1556,7 @@ eiter_rv_max(const void *in_eiter)
const eiter_rv_t *eiter = (const eiter_rv_t *)in_eiter;
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Return the max. array index used */
return ((hssize_t)eiter->max);
@@ -1584,10 +1582,10 @@ eiter_rv_state(void *in_eiter, const H5EA_create_t *cparam, const earray_test_pa
eiter_rv_t *eiter = (eiter_rv_t *)in_eiter;
/* Sanity check */
- HDassert(eiter);
- HDassert(cparam);
- HDassert(tparam);
- HDassert(state);
+ assert(eiter);
+ assert(cparam);
+ assert(tparam);
+ assert(state);
/* Compute the state of the extensible array */
state->hdr_size = EA_HDR_SIZE;
@@ -1666,10 +1664,10 @@ static int
eiter_rv_term(void *eiter)
{
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Free iteration object */
- HDfree(eiter);
+ free(eiter);
return (0);
} /* end eiter_rv_term() */
@@ -1711,12 +1709,12 @@ eiter_rnd_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_par
size_t u; /* Local index variable */
/* Allocate space for the element iteration object */
- eiter = (eiter_rnd_t *)HDmalloc(sizeof(eiter_rnd_t));
- HDassert(eiter);
+ eiter = (eiter_rnd_t *)malloc(sizeof(eiter_rnd_t));
+ assert(eiter);
/* Allocate space for the array of shuffled indices */
- eiter->idx = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)cnt);
- HDassert(eiter->idx);
+ eiter->idx = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)cnt);
+ assert(eiter->idx);
/* Initialize reverse iteration info */
eiter->max = 0;
@@ -1761,7 +1759,7 @@ eiter_rnd_next(void *in_eiter)
hssize_t ret_val;
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Get the next array index to test */
ret_val = (hssize_t)eiter->idx[eiter->pos];
@@ -1793,7 +1791,7 @@ eiter_rnd_max(const void *in_eiter)
const eiter_rnd_t *eiter = (const eiter_rnd_t *)in_eiter;
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Return the max. array index used */
return ((hssize_t)eiter->max);
@@ -1818,14 +1816,14 @@ eiter_rnd_term(void *in_eiter)
eiter_rnd_t *eiter = (eiter_rnd_t *)in_eiter;
/* Sanity check */
- HDassert(eiter);
- HDassert(eiter->idx);
+ assert(eiter);
+ assert(eiter->idx);
/* Free shuffled index array */
- HDfree(eiter->idx);
+ free(eiter->idx);
/* Free iteration object */
- HDfree(eiter);
+ free(eiter);
return (0);
} /* end eiter_rnd_term() */
@@ -1860,12 +1858,12 @@ eiter_rnd2_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_pa
size_t u; /* Local index variable */
/* Allocate space for the element iteration object */
- eiter = (eiter_rnd_t *)HDmalloc(sizeof(eiter_rnd_t));
- HDassert(eiter);
+ eiter = (eiter_rnd_t *)malloc(sizeof(eiter_rnd_t));
+ assert(eiter);
/* Allocate space for the array of shuffled indices */
- eiter->idx = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)cnt);
- HDassert(eiter->idx);
+ eiter->idx = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)cnt);
+ assert(eiter->idx);
/* Initialize reverse iteration info */
eiter->max = 0;
@@ -1877,8 +1875,8 @@ eiter_rnd2_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_pa
hsize_t sparse_cnt = (hsize_t)(cnt * EA_RND2_SCALE); /* Sparse range to choose from */
/* Allocate temporary index array */
- tmp_idx = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)sparse_cnt);
- HDassert(tmp_idx);
+ tmp_idx = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)sparse_cnt);
+ assert(tmp_idx);
/* Initialize temporary index array, for shuffling */
for (u = 0; u < (size_t)sparse_cnt; u++)
@@ -1894,7 +1892,7 @@ eiter_rnd2_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_pa
} /* end for */
/* Release temporary array */
- HDfree(tmp_idx);
+ free(tmp_idx);
} /* end if */
else {
for (u = 0; u < (size_t)cnt; u++)
@@ -1942,8 +1940,8 @@ eiter_cyc_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_par
eiter_cyc_t *eiter; /* Cyclic element iteration object */
/* Allocate space for the element iteration object */
- eiter = (eiter_cyc_t *)HDmalloc(sizeof(eiter_cyc_t));
- HDassert(eiter);
+ eiter = (eiter_cyc_t *)malloc(sizeof(eiter_cyc_t));
+ assert(eiter);
/* Initialize reverse iteration info */
eiter->max = 0;
@@ -1975,7 +1973,7 @@ eiter_cyc_next(void *in_eiter)
hssize_t ret_val;
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Get the next array index to test */
ret_val = (hssize_t)eiter->pos;
@@ -2009,7 +2007,7 @@ eiter_cyc_max(const void *in_eiter)
const eiter_cyc_t *eiter = (const eiter_cyc_t *)in_eiter;
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Return the max. array index used */
return ((hssize_t)eiter->max);
@@ -2034,10 +2032,10 @@ eiter_cyc_term(void *in_eiter)
eiter_cyc_t *eiter = (eiter_cyc_t *)in_eiter;
/* Sanity check */
- HDassert(eiter);
+ assert(eiter);
/* Free iteration object */
- HDfree(eiter);
+ free(eiter);
return (0);
} /* end eiter_cyc_term() */
@@ -2112,7 +2110,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, h
TEST_ERROR;
/* Verify array state */
- HDmemset(&state, 0, sizeof(state));
+ memset(&state, 0, sizeof(state));
state.hdr_size = EA_HDR_SIZE;
if (check_stats(ea, &state))
TEST_ERROR;
@@ -2286,7 +2284,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR;
/* Verify array state */
- HDmemset(&state, 0, sizeof(state));
+ memset(&state, 0, sizeof(state));
state.hdr_size = EA_HDR_SIZE;
if (check_stats(ea, &state))
TEST_ERROR;
@@ -2316,7 +2314,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR;
/* Set array state */
- HDmemset(&state, 0, sizeof(state));
+ memset(&state, 0, sizeof(state));
state.hdr_size = EA_HDR_SIZE;
state.nindex_blks = 1;
state.index_blk_size = EA_IBLOCK_SIZE;
@@ -2419,7 +2417,7 @@ main(void)
fapl = h5_fileaccess();
ExpressMode = GetTestExpress();
if (ExpressMode > 1)
- HDprintf("***Express test mode on. Some tests may be skipped\n");
+ printf("***Express test mode on. Some tests may be skipped\n");
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename_g, sizeof(filename_g));
diff --git a/test/efc.c b/test/efc.c
index c29cddb..ad7a5f0 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -2666,7 +2666,7 @@ main(void)
/* Allocate memory for filenames */
for (i = 0; i < N_FILENAMES; i++) {
- filename[i] = (char *)HDcalloc(PATH_MAX, sizeof(char));
+ filename[i] = (char *)calloc(PATH_MAX, sizeof(char));
}
/* Patch filenames */
@@ -2716,7 +2716,7 @@ main(void)
h5_clean_files(FILENAME, fapl_id);
for (i = 0; i < N_FILENAMES; i++) {
- HDfree(filename[i]);
+ free(filename[i]);
}
return EXIT_SUCCESS;
@@ -2734,7 +2734,7 @@ error:
H5CX_pop(FALSE);
for (i = 0; i < N_FILENAMES; i++) {
- HDfree(filename[i]);
+ free(filename[i]);
}
return EXIT_FAILURE;
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index 5b75178..83375f8 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -41,7 +41,7 @@ test_encode_decode(hid_t orig_pl, H5F_libver_t low, H5F_libver_t high)
TEST_ERROR;
/* Allocate the buffer for encoding */
- if (NULL == (temp_buf = (void *)HDmalloc(temp_size)))
+ if (NULL == (temp_buf = (void *)malloc(temp_size)))
TEST_ERROR;
/* Encode the property list to the buffer */
@@ -62,7 +62,7 @@ test_encode_decode(hid_t orig_pl, H5F_libver_t low, H5F_libver_t high)
/* Free the buffer */
if (temp_buf)
- HDfree(temp_buf);
+ free(temp_buf);
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Test H5Pencode1() */
@@ -71,7 +71,7 @@ test_encode_decode(hid_t orig_pl, H5F_libver_t low, H5F_libver_t high)
if (H5Pencode1(orig_pl, NULL, &temp_size) < 0)
STACK_ERROR;
- if (NULL == (temp_buf = (void *)HDmalloc(temp_size)))
+ if (NULL == (temp_buf = (void *)malloc(temp_size)))
TEST_ERROR;
if (H5Pencode1(orig_pl, temp_buf, &temp_size) < 0)
@@ -87,7 +87,7 @@ test_encode_decode(hid_t orig_pl, H5F_libver_t low, H5F_libver_t high)
STACK_ERROR;
if (temp_buf)
- HDfree(temp_buf);
+ free(temp_buf);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
if ((H5Pclose(fapl)) < 0)
@@ -98,7 +98,7 @@ test_encode_decode(hid_t orig_pl, H5F_libver_t low, H5F_libver_t high)
error:
if (temp_buf)
- HDfree(temp_buf);
+ free(temp_buf);
H5E_BEGIN_TRY
{
@@ -192,7 +192,7 @@ main(void)
HDputs(msg);
if (VERBOSE_MED)
- HDprintf("Encode/Decode DCPLs\n");
+ printf("Encode/Decode DCPLs\n");
/******* ENCODE/DECODE DCPLS *****/
TESTING("Default DCPL Encoding/Decoding");
@@ -242,7 +242,7 @@ main(void)
/******* ENCODE/DECODE DCPLS *****/
TESTING("DCPL Encoding/Decoding for virtual layout");
if (high < H5F_LIBVER_V110)
- HDprintf(" SKIPPED: virtual layout not supported yet\n");
+ printf(" SKIPPED: virtual layout not supported yet\n");
else {
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -679,6 +679,6 @@ main(void)
return 0;
error:
- HDprintf("***** Plist Encode/Decode tests FAILED! *****\n");
+ printf("***** Plist Encode/Decode tests FAILED! *****\n");
return 1;
}
diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c
index 8aac862..81464cb 100644
--- a/test/enc_dec_plist_cross_platform.c
+++ b/test/enc_dec_plist_cross_platform.c
@@ -27,7 +27,7 @@ int
main(void)
{
if (VERBOSE_MED)
- HDprintf("Encode/Decode property list endianness\n");
+ printf("Encode/Decode property list endianness\n");
/******* ENCODE/DECODE DCPLS *****/
TESTING("Default DCPL Encoding/Decoding");
@@ -180,7 +180,7 @@ test_plists(const char *filename_prefix)
TEST_ERROR;
size_1 = (size_t)HDlseek(fd_1, (HDoff_t)0, SEEK_END);
HDlseek(fd_1, (HDoff_t)0, SEEK_SET);
- buf_1 = (void *)HDmalloc(size_1);
+ buf_1 = (void *)malloc(size_1);
if (HDread(fd_1, buf_1, size_1) < 0)
TEST_ERROR;
HDclose(fd_1);
@@ -196,7 +196,7 @@ test_plists(const char *filename_prefix)
TEST_ERROR;
size_2 = (size_t)HDlseek(fd_2, (HDoff_t)0, SEEK_END);
HDlseek(fd_2, (HDoff_t)0, SEEK_SET);
- buf_2 = (void *)HDmalloc(size_2);
+ buf_2 = (void *)malloc(size_2);
if (HDread(fd_2, buf_2, size_2) < 0)
TEST_ERROR;
HDclose(fd_2);
@@ -217,13 +217,13 @@ test_plists(const char *filename_prefix)
if ((H5Pclose(plist_2)) < 0)
FAIL_STACK_ERROR;
- HDfree(buf_1);
- HDfree(buf_2);
+ free(buf_1);
+ free(buf_2);
} /* end for */
return 1;
error:
- HDprintf("***** Plist Encode/Decode tests FAILED! *****\n");
+ printf("***** Plist Encode/Decode tests FAILED! *****\n");
return -1;
}
diff --git a/test/enum.c b/test/enum.c
index 592236a..3aa2855 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -192,8 +192,8 @@ test_conv(hid_t file)
for (i = 0; i < (size_t)ds_size[0]; i++)
if (data1[i] != data2[i]) {
H5_FAILED();
- HDprintf(" 1. data1[%lu]=%d, data2[%lu]=%d (should be same)\n", (unsigned long)i,
- (int)(data1[i]), (unsigned long)i, (int)(data2[i]));
+ printf(" 1. data1[%lu]=%d, data2[%lu]=%d (should be same)\n", (unsigned long)i,
+ (int)(data1[i]), (unsigned long)i, (int)(data2[i]));
goto error;
} /* end if */
@@ -204,8 +204,8 @@ test_conv(hid_t file)
for (i = 0; i < (size_t)ds_size[0]; i++)
if ((short)data1[i] != data_short[i]) {
H5_FAILED();
- HDprintf(" 2. data1[%lu]=%d, data_short[%lu]=%d (should be same)\n", (unsigned long)i,
- (int)(data1[i]), (unsigned long)i, (int)(data_short[i]));
+ printf(" 2. data1[%lu]=%d, data_short[%lu]=%d (should be same)\n", (unsigned long)i,
+ (int)(data1[i]), (unsigned long)i, (int)(data_short[i]));
goto error;
} /* end if */
@@ -216,8 +216,8 @@ test_conv(hid_t file)
for (i = 0; i < (size_t)ds_size[0]; i++)
if ((int)data1[i] != (int)data_double[i]) {
H5_FAILED();
- HDprintf(" 3. data1[%lu]=%d, data_double[%lu]=%d (should be same)\n", (unsigned long)i,
- (int)(data1[i]), (unsigned long)i, (int)(data_double[i]));
+ printf(" 3. data1[%lu]=%d, data_double[%lu]=%d (should be same)\n", (unsigned long)i,
+ (int)(data1[i]), (unsigned long)i, (int)(data_double[i]));
goto error;
} /* end if */
@@ -242,8 +242,8 @@ test_conv(hid_t file)
for (i = 0; i < (size_t)ds_size[0]; i++)
if ((int)data1[i] != data_int[i]) {
H5_FAILED();
- HDprintf(" 4. data1[%lu]=%d, data_int[%lu]=%d (should be same)\n", (unsigned long)i,
- (int)(data1[i]), (unsigned long)i, (int)(data_int[i]));
+ printf(" 4. data1[%lu]=%d, data_int[%lu]=%d (should be same)\n", (unsigned long)i,
+ (int)(data1[i]), (unsigned long)i, (int)(data_int[i]));
goto error;
} /* end if */
@@ -268,8 +268,8 @@ test_conv(hid_t file)
for (i = 0; i < (size_t)ds_size[0]; i++)
if ((int)data1[i] != (int)data_double[i]) {
H5_FAILED();
- HDprintf(" 5. data1[%lu]=%d, data_double[%lu]=%d (should be same)\n", (unsigned long)i,
- (int)(data1[i]), (unsigned long)i, (int)(data_double[i]));
+ printf(" 5. data1[%lu]=%d, data_double[%lu]=%d (should be same)\n", (unsigned long)i,
+ (int)(data1[i]), (unsigned long)i, (int)(data_double[i]));
goto error;
} /* end if */
@@ -370,8 +370,8 @@ test_tr1(hid_t file)
for (i = 0; i < (size_t)ds_size[0]; i++)
if (data1[i] != data2[i]) {
H5_FAILED();
- HDprintf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n", (unsigned long)i, (int)(data1[i]),
- (unsigned long)i, (int)(data2[i]));
+ printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n", (unsigned long)i, (int)(data1[i]),
+ (unsigned long)i, (int)(data2[i]));
goto error;
}
@@ -472,8 +472,8 @@ test_tr2(hid_t file)
for (i = 0; i < (size_t)ds_size[0]; i++)
if (data1[i] != data2[i]) {
H5_FAILED();
- HDprintf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n", (unsigned long)i, (int)(data1[i]),
- (unsigned long)i, (int)(data2[i]));
+ printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n", (unsigned long)i, (int)(data1[i]),
+ (unsigned long)i, (int)(data2[i]));
goto error;
}
@@ -660,7 +660,7 @@ test_funcs(void)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -671,7 +671,7 @@ test_funcs(void)
H5E_END_TRY;
if (size > 0) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -682,7 +682,7 @@ test_funcs(void)
H5E_END_TRY;
if (inpad > -1) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -693,7 +693,7 @@ test_funcs(void)
H5E_END_TRY;
if (cset > -1) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -705,7 +705,7 @@ test_funcs(void)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
@@ -716,7 +716,7 @@ test_funcs(void)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf("Operation not allowed for this type.\n");
+ printf("Operation not allowed for this type.\n");
goto error;
} /* end if */
diff --git a/test/err_compat.c b/test/err_compat.c
index 1f7eb45..73cc797 100644
--- a/test/err_compat.c
+++ b/test/err_compat.c
@@ -22,7 +22,7 @@
int
main(void)
{
- HDprintf("Test skipped because backward compatibility with v1.6 is NOT configured in\n");
+ printf("Test skipped because backward compatibility with v1.6 is NOT configured in\n");
return 0;
}
#else /* H5_NO_DEPRECATED_SYMBOLS */
@@ -60,7 +60,7 @@ static herr_t
user_print1(FILE *stream)
{
/* Customized way to print errors */
- HDfprintf(stderr, "\n********* Print error stack in customized way *********\n");
+ fprintf(stderr, "\n********* Print error stack in customized way *********\n");
if (H5Ewalk1(H5E_WALK_UPWARD, (H5E_walk1_t)custom_print_cb1, stream) < 0)
TEST_ERROR;
@@ -88,7 +88,7 @@ static herr_t
user_print2(hid_t err_stack, FILE *stream)
{
/* Customized way to print errors */
- HDfprintf(stderr, "\n********* Print error stack in customized way *********\n");
+ fprintf(stderr, "\n********* Print error stack in customized way *********\n");
if (H5Ewalk2(err_stack, H5E_WALK_UPWARD, (H5E_walk2_t)custom_print_cb2, stream) < 0)
TEST_ERROR;
@@ -125,11 +125,11 @@ custom_print_cb1(int n, H5E_error1_t *err_desc, void *client_data)
if (NULL == (maj = H5Eget_major(err_desc->maj_num)))
TEST_ERROR;
- HDfprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
- err_desc->func_name, err_desc->line);
+ fprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
+ err_desc->func_name, err_desc->line);
- HDfprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
- HDfprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
+ fprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
+ fprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
H5free_memory(maj);
H5free_memory(min);
@@ -172,11 +172,11 @@ custom_print_cb2(int n, H5E_error2_t *err_desc, void *client_data)
if (NULL == (maj = H5Eget_major(err_desc->maj_num)))
TEST_ERROR;
- HDfprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
- err_desc->func_name, err_desc->line);
+ fprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
+ err_desc->func_name, err_desc->line);
- HDfprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
- HDfprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
+ fprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
+ fprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
H5free_memory(maj);
H5free_memory(min);
@@ -218,8 +218,8 @@ test_error_compat(void)
TESTING("error API H5Eset/get_auto");
/* Add a newline and flush so the output file looks nicer */
- HDprintf("\n");
- HDfflush(stdout);
+ printf("\n");
+ fflush(stdout);
/* Create the dataspace */
dims[0] = DIM0;
@@ -351,8 +351,8 @@ test_h5epush1(hid_t file)
TESTING("error API based on data I/O");
/* Add a newline and flush so the output file looks nicer */
- HDprintf("\n");
- HDfflush(stdout);
+ printf("\n");
+ fflush(stdout);
/* Create the dataspace */
dims[0] = DIM0;
@@ -430,12 +430,12 @@ static herr_t
dump_error(void)
{
/* Print errors in library default way */
- HDfprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
+ fprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
if (H5Eprint1(stderr) < 0)
TEST_ERROR;
/* Customized way to print errors */
- HDfprintf(stderr, "\n********* Print error stack in customized way *********\n");
+ fprintf(stderr, "\n********* Print error stack in customized way *********\n");
if (H5Ewalk1(H5E_WALK_UPWARD, custom_print_cb1, stderr) < 0)
TEST_ERROR;
@@ -464,21 +464,21 @@ main(void)
const char *FUNC_main = "main";
int i;
- HDfprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There are supposed to "
- "be some error messages\n");
+ fprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There are supposed to "
+ "be some error messages\n");
fapl_id = h5_fileaccess();
/* Set up data arrays */
- if (NULL == (ipoints2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ if (NULL == (ipoints2_data = (int *)calloc(DIM0 * DIM1, sizeof(int))))
TEST_ERROR;
- if (NULL == (ipoints2 = (int **)HDcalloc(DIM0, sizeof(ipoints2_data))))
+ if (NULL == (ipoints2 = (int **)calloc(DIM0, sizeof(ipoints2_data))))
TEST_ERROR;
for (i = 0; i < DIM0; i++)
ipoints2[i] = ipoints2_data + (i * DIM1);
- if (NULL == (icheck2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ if (NULL == (icheck2_data = (int *)calloc(DIM0 * DIM1, sizeof(int))))
TEST_ERROR;
- if (NULL == (icheck2 = (int **)HDcalloc(DIM0, sizeof(icheck2_data))))
+ if (NULL == (icheck2 = (int **)calloc(DIM0, sizeof(icheck2_data))))
TEST_ERROR;
for (i = 0; i < DIM0; i++)
icheck2[i] = icheck2_data + (i * DIM1);
@@ -518,19 +518,19 @@ main(void)
TEST_ERROR;
h5_clean_files(FILENAME, fapl_id);
- HDfree(ipoints2);
- HDfree(ipoints2_data);
- HDfree(icheck2);
- HDfree(icheck2_data);
+ free(ipoints2);
+ free(ipoints2_data);
+ free(icheck2);
+ free(icheck2_data);
- HDprintf("All error API tests passed.\n");
+ printf("All error API tests passed.\n");
return EXIT_SUCCESS;
error:
- HDfree(ipoints2);
- HDfree(ipoints2_data);
- HDfree(icheck2);
- HDfree(icheck2_data);
+ free(ipoints2);
+ free(ipoints2_data);
+ free(icheck2);
+ free(icheck2_data);
H5E_BEGIN_TRY
{
@@ -539,7 +539,7 @@ error:
}
H5E_END_TRY
- HDprintf("***** ERROR TEST FAILED! *****\n");
+ printf("***** ERROR TEST FAILED! *****\n");
return EXIT_FAILURE;
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/test/error_test.c b/test/error_test.c
index 3aa4970..739cbf5 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -23,7 +23,7 @@
int
main(void)
{
- HDfprintf(stderr, "Test skipped because backward compatibility with v1.6 is configured in\n");
+ fprintf(stderr, "Test skipped because backward compatibility with v1.6 is configured in\n");
return 0;
}
#else /* H5_USE_16_API */
@@ -100,7 +100,7 @@ test_error(hid_t file)
H5E_auto2_t old_func;
void *old_data = NULL;
- HDfprintf(stderr, "\nTesting error API based on data I/O\n");
+ fprintf(stderr, "\nTesting error API based on data I/O\n");
/* Create the data space */
dims[0] = DIM0;
@@ -184,9 +184,9 @@ init_error(void)
char *msg = NULL;
H5E_type_t msg_type;
- if (NULL == (cls_name = (char *)HDmalloc(HDstrlen(ERR_CLS_NAME) + 1)))
+ if (NULL == (cls_name = (char *)malloc(HDstrlen(ERR_CLS_NAME) + 1)))
TEST_ERROR;
- if (NULL == (msg = (char *)HDmalloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
+ if (NULL == (msg = (char *)malloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
TEST_ERROR;
if ((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0)
@@ -226,16 +226,16 @@ init_error(void)
if ((ERR_CLS2 = H5Eregister_class(ERR_CLS2_NAME, PROG2_NAME, PROG_VERS)) < 0)
TEST_ERROR;
- HDfree(cls_name);
- HDfree(msg);
+ free(cls_name);
+ free(msg);
return 0;
error:
if (cls_name)
- HDfree(cls_name);
+ free(cls_name);
if (msg)
- HDfree(msg);
+ free(msg);
return -1;
} /* end init_error() */
@@ -329,9 +329,9 @@ test_long_desc(void)
const char *test_FUNC = "test_long_desc";
/* Allocate space for the error description info */
- if (NULL == (long_desc = (char *)HDmalloc(LONG_DESC_SIZE)))
+ if (NULL == (long_desc = (char *)malloc(LONG_DESC_SIZE)))
TEST_ERROR;
- if (NULL == (full_desc = (char *)HDmalloc(LONG_DESC_SIZE + 128)))
+ if (NULL == (full_desc = (char *)malloc(LONG_DESC_SIZE + 128)))
TEST_ERROR;
/* Create the long part of the error description */
@@ -361,16 +361,16 @@ test_long_desc(void)
if (H5Eclear2(H5E_DEFAULT) < 0)
TEST_ERROR;
- HDfree(long_desc);
- HDfree(full_desc);
+ free(long_desc);
+ free(full_desc);
return 0;
error:
if (long_desc)
- HDfree(long_desc);
+ free(long_desc);
if (full_desc)
- HDfree(full_desc);
+ free(full_desc);
return -1;
} /* end test_long_desc() */
@@ -390,12 +390,12 @@ static herr_t
dump_error(hid_t estack)
{
/* Print errors in library default way */
- HDfprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
+ fprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
if (H5Eprint2(estack, stderr) < 0)
TEST_ERROR;
/* Customized way to print errors */
- HDfprintf(stderr, "\n********* Print error stack in customized way *********\n");
+ fprintf(stderr, "\n********* Print error stack in customized way *********\n");
if (H5Ewalk2(estack, H5E_WALK_UPWARD, custom_print_cb, stderr) < 0)
TEST_ERROR;
@@ -434,11 +434,11 @@ custom_print_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
if (H5Eget_msg(err_desc->min_num, NULL, min, MSG_SIZE) < 0)
TEST_ERROR;
- HDfprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
- err_desc->func_name, err_desc->line);
- HDfprintf(stream, "%*sclass: %s\n", indent * 2, "", cls);
- HDfprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
- HDfprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
+ fprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
+ err_desc->func_name, err_desc->line);
+ fprintf(stream, "%*sclass: %s\n", indent * 2, "", cls);
+ fprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
+ fprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
return 0;
@@ -744,7 +744,7 @@ test_filter_error(const char *fname, hid_t fapl)
hid_t dataset = -1;
int buf[20];
- HDfprintf(stderr, "\nTesting error message during data reading when filter isn't registered\n");
+ fprintf(stderr, "\nTesting error message during data reading when filter isn't registered\n");
/* Open the file */
if ((file = H5Fopen(pathname, H5F_ACC_RDONLY, fapl)) < 0)
@@ -793,7 +793,7 @@ main(void)
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
- HDfprintf(stderr, " This program tests the Error API. There're supposed to be some error messages\n");
+ fprintf(stderr, " This program tests the Error API. There're supposed to be some error messages\n");
/* Initialize errors */
if (init_error() < 0)
@@ -803,16 +803,16 @@ main(void)
TEST_ERROR;
/* Set up data arrays */
- if (NULL == (ipoints2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ if (NULL == (ipoints2_data = (int *)calloc(DIM0 * DIM1, sizeof(int))))
TEST_ERROR;
- if (NULL == (ipoints2 = (int **)HDcalloc(DIM0, sizeof(ipoints2_data))))
+ if (NULL == (ipoints2 = (int **)calloc(DIM0, sizeof(ipoints2_data))))
TEST_ERROR;
for (i = 0; i < DIM0; i++)
ipoints2[i] = ipoints2_data + (i * DIM1);
- if (NULL == (icheck2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ if (NULL == (icheck2_data = (int *)calloc(DIM0 * DIM1, sizeof(int))))
TEST_ERROR;
- if (NULL == (icheck2 = (int **)HDcalloc(DIM0, sizeof(icheck2_data))))
+ if (NULL == (icheck2 = (int **)calloc(DIM0, sizeof(icheck2_data))))
TEST_ERROR;
for (i = 0; i < DIM0; i++)
icheck2[i] = icheck2_data + (i * DIM1);
@@ -895,21 +895,21 @@ main(void)
h5_clean_files(FILENAME, fapl);
- HDfree(ipoints2);
- HDfree(ipoints2_data);
- HDfree(icheck2);
- HDfree(icheck2_data);
+ free(ipoints2);
+ free(ipoints2_data);
+ free(icheck2);
+ free(icheck2_data);
- HDfprintf(stderr, "\nAll error API tests passed.\n");
+ fprintf(stderr, "\nAll error API tests passed.\n");
return 0;
error:
- HDfree(ipoints2);
- HDfree(ipoints2_data);
- HDfree(icheck2);
- HDfree(icheck2_data);
+ free(ipoints2);
+ free(ipoints2_data);
+ free(icheck2);
+ free(icheck2_data);
- HDfprintf(stderr, "\n***** ERROR TEST FAILED (real problem)! *****\n");
+ fprintf(stderr, "\n***** ERROR TEST FAILED (real problem)! *****\n");
return 1;
}
#endif /* H5_USE_16_API */
diff --git a/test/event_set.c b/test/event_set.c
index df6b8cb..9340457 100644
--- a/test/event_set.c
+++ b/test/event_set.c
@@ -698,9 +698,9 @@ main(void)
/* Report status */
HDputs("All event set tests passed.");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
HDputs("***** EVENT SET TESTS FAILED *****");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index 7efe0e8..89a1ae0 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -151,7 +151,7 @@ generate_eoc_test_file(hid_t fapl_id)
TEST_ERROR;
/* Create a data buffer for dataset writes */
- if (NULL == (data = (int *)HDcalloc(NELEMENTS, sizeof(int))))
+ if (NULL == (data = (int *)calloc(NELEMENTS, sizeof(int))))
TEST_ERROR;
/* Create file */
@@ -183,7 +183,7 @@ generate_eoc_test_file(hid_t fapl_id)
char subgroup_name[SUBGROUP_NAME_SIZE];
/* Create the group name */
- HDmemset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
+ memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
@@ -278,7 +278,7 @@ generate_eoc_test_file(hid_t fapl_id)
char subgroup_name[SUBGROUP_NAME_SIZE];
/* Create the group name */
- HDmemset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
+ memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
@@ -546,7 +546,7 @@ generate_eoc_test_file(hid_t fapl_id)
if (H5Pclose(fapl_copy_id) < 0)
TEST_ERROR;
- HDfree(data);
+ free(data);
PASSED();
return fid;
@@ -564,7 +564,7 @@ error:
}
H5E_END_TRY;
- HDfree(data);
+ free(data);
H5_FAILED();
return -1;
@@ -601,10 +601,10 @@ check_group_layout(hid_t fid, const char *group_name)
before = file_ptr->shared->cache->index_len;
#ifdef EOC_MANUAL_INSPECTION
- HDprintf("\nCACHE BEFORE GROUP OPEN:\n");
+ printf("\nCACHE BEFORE GROUP OPEN:\n");
if (H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("NUMBER OF CACHE ENTRIES: %u\n", before);
+ printf("NUMBER OF CACHE ENTRIES: %u\n", before);
#endif
/* Open the main group and get its tag */
@@ -619,7 +619,7 @@ check_group_layout(hid_t fid, const char *group_name)
char subgroup_name[SUBGROUP_NAME_SIZE];
/* Create the group name */
- HDmemset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
+ memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
@@ -641,11 +641,11 @@ check_group_layout(hid_t fid, const char *group_name)
during = file_ptr->shared->cache->index_len;
#ifdef EOC_MANUAL_INSPECTION
- HDprintf("\nCACHE AFTER OPENING GROUPS (WHILE OPEN):\n");
+ printf("\nCACHE AFTER OPENING GROUPS (WHILE OPEN):\n");
if (H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("MAIN GROUP TAG: %#X\n", tag1);
- HDprintf("NUMBER OF CACHE ENTRIES: %u\n", during);
+ printf("MAIN GROUP TAG: %#X\n", tag1);
+ printf("NUMBER OF CACHE ENTRIES: %u\n", during);
#endif
/* Close the main group */
@@ -656,10 +656,10 @@ check_group_layout(hid_t fid, const char *group_name)
after = file_ptr->shared->cache->index_len;
#ifdef EOC_MANUAL_INSPECTION
- HDprintf("\nCACHE AFTER CLOSING GROUPS:\n");
+ printf("\nCACHE AFTER CLOSING GROUPS:\n");
if (H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("NUMBER OF CACHE ENTRIES: %u\n", after);
+ printf("NUMBER OF CACHE ENTRIES: %u\n", after);
#endif
/* Ensure that the cache does not contain entries with the tag */
@@ -712,17 +712,17 @@ check_dset_scheme(hid_t fid, const char *dset_name)
TEST_ERROR;
/* Create the data buffer */
- if (NULL == (data = (int *)HDcalloc(NELEMENTS, sizeof(int))))
+ if (NULL == (data = (int *)calloc(NELEMENTS, sizeof(int))))
TEST_ERROR;
/* Record the number of cache entries */
before = file_ptr->shared->cache->index_len;
#ifdef EOC_MANUAL_INSPECTION
- HDprintf("\nCACHE BEFORE DATASET OPEN:\n");
+ printf("\nCACHE BEFORE DATASET OPEN:\n");
if (H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("NUMBER OF CACHE ENTRIES: %u\n", before);
+ printf("NUMBER OF CACHE ENTRIES: %u\n", before);
#endif
/* Open dataset and get the metadata tag */
@@ -742,11 +742,11 @@ check_dset_scheme(hid_t fid, const char *dset_name)
during = file_ptr->shared->cache->index_len;
#ifdef EOC_MANUAL_INSPECTION
- HDprintf("\nCACHE AFTER DATA READ (WHILE OPEN):\n");
+ printf("\nCACHE AFTER DATA READ (WHILE OPEN):\n");
if (H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("TAG: %#X\n", tag);
- HDprintf("NUMBER OF CACHE ENTRIES: %u\n", during);
+ printf("TAG: %#X\n", tag);
+ printf("NUMBER OF CACHE ENTRIES: %u\n", during);
#endif
/* Close the dataset */
@@ -757,10 +757,10 @@ check_dset_scheme(hid_t fid, const char *dset_name)
after = file_ptr->shared->cache->index_len;
#ifdef EOC_MANUAL_INSPECTION
- HDprintf("\nCACHE AFTER DATASET CLOSE:\n");
+ printf("\nCACHE AFTER DATASET CLOSE:\n");
if (H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("NUMBER OF CACHE ENTRIES: %u\n", after);
+ printf("NUMBER OF CACHE ENTRIES: %u\n", after);
#endif
/* Ensure that the cache does not contain entries with the tag */
@@ -771,7 +771,7 @@ check_dset_scheme(hid_t fid, const char *dset_name)
if (before != after || before == during)
TEST_ERROR;
- HDfree(data);
+ free(data);
PASSED();
return SUCCEED;
@@ -887,7 +887,7 @@ main(void)
hid_t fid = -1; /* file ID */
unsigned nerrors = 0; /* number of test errors */
- HDprintf("Testing evict-on-close cache behavior\n");
+ printf("Testing evict-on-close cache behavior\n");
/* Initialize */
h5_reset();
@@ -955,13 +955,13 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All evict-on-close tests passed.\n");
+ printf("All evict-on-close tests passed.\n");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDprintf("***** %u evict-on-close test%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("***** %u evict-on-close test%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
h5_delete_all_test_files(FILENAMES, fapl_id);
H5E_BEGIN_TRY
@@ -971,7 +971,7 @@ error:
}
H5E_END_TRY;
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
@@ -1035,7 +1035,7 @@ main(void)
{
unsigned nerrors = 0; /* number of test errors */
- HDprintf("Testing evict-on-close cache behavior\n");
+ printf("Testing evict-on-close cache behavior\n");
/* Initialize */
h5_reset();
@@ -1046,16 +1046,16 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All evict-on-close tests passed.\n");
- HDprintf("Note that EoC is not supported under parallel so most tests are skipped.\n");
+ printf("All evict-on-close tests passed.\n");
+ printf("Note that EoC is not supported under parallel so most tests are skipped.\n");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDprintf("***** %u evict-on-close test%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("***** %u evict-on-close test%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* main() - parallel */
diff --git a/test/extend.c b/test/extend.c
index 33d68b7..40e90a6 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -115,10 +115,10 @@ write_data(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t me
for (k = 0; k < N2X; k++)
for (m = 0; m < N2Y; m++)
if (buf2[k][m] != buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]) {
- HDprintf(" i=%d, j=%d, k=%d, m=%d\n", i, j, k, m);
- HDprintf(" buf2[%d][%d]=%d\n", k, m, buf2[k][m]);
- HDprintf(" buf1[%d][%d]=%d\n", (i % 2) * N2X + k, (j % 2) * N2Y + m,
- buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]);
+ printf(" i=%d, j=%d, k=%d, m=%d\n", i, j, k, m);
+ printf(" buf2[%d][%d]=%d\n", k, m, buf2[k][m]);
+ printf(" buf1[%d][%d]=%d\n", (i % 2) * N2X + k, (j % 2) * N2Y + m,
+ buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]);
TEST_ERROR;
} /* end if */
} /* end for */
@@ -218,10 +218,10 @@ write_data_deprec(const char *msg, hid_t file, const char *name, hid_t cparms, h
for (k = 0; k < N2X; k++)
for (m = 0; m < N2Y; m++)
if (buf2[k][m] != buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]) {
- HDprintf(" i=%d, j=%d, k=%d, m=%d\n", i, j, k, m);
- HDprintf(" buf2[%d][%d]=%d\n", k, m, buf2[k][m]);
- HDprintf(" buf1[%d][%d]=%d\n", (i % 2) * N2X + k, (j % 2) * N2Y + m,
- buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]);
+ printf(" i=%d, j=%d, k=%d, m=%d\n", i, j, k, m);
+ printf(" buf2[%d][%d]=%d\n", k, m, buf2[k][m]);
+ printf(" buf1[%d][%d]=%d\n", (i % 2) * N2X + k, (j % 2) * N2Y + m,
+ buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]);
TEST_ERROR;
} /* end if */
} /* end for */
@@ -271,16 +271,16 @@ main(void)
fapl = h5_fileaccess();
/* Initialize buffer and space */
- if (NULL == (buf1_data = (int *)HDcalloc(N1X * N1Y, sizeof(int))))
+ if (NULL == (buf1_data = (int *)calloc(N1X * N1Y, sizeof(int))))
TEST_ERROR;
- if (NULL == (buf1 = (int **)HDcalloc(N1X, sizeof(buf1_data))))
+ if (NULL == (buf1 = (int **)calloc(N1X, sizeof(buf1_data))))
TEST_ERROR;
for (i = 0; i < N1X; i++)
buf1[i] = buf1_data + (i * N1Y);
- if (NULL == (buf2_data = (int *)HDcalloc(N2X * N2Y, sizeof(int))))
+ if (NULL == (buf2_data = (int *)calloc(N2X * N2Y, sizeof(int))))
TEST_ERROR;
- if (NULL == (buf2 = (int **)HDcalloc(N2X, sizeof(buf2_data))))
+ if (NULL == (buf2 = (int **)calloc(N2X, sizeof(buf2_data))))
TEST_ERROR;
for (i = 0; i < N2X; i++)
buf2[i] = buf2_data + (i * N2Y);
@@ -338,27 +338,27 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
if (nerrors) {
- HDprintf("***** %d FAILURE%s! *****\n", nerrors, (1 == nerrors) ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %d FAILURE%s! *****\n", nerrors, (1 == nerrors) ? "" : "S");
+ exit(EXIT_FAILURE);
} /* end if */
- HDprintf("All extend tests passed.\n");
+ printf("All extend tests passed.\n");
h5_cleanup(FILENAME, fapl);
- HDfree(buf1);
- HDfree(buf1_data);
- HDfree(buf2);
- HDfree(buf2_data);
+ free(buf1);
+ free(buf1_data);
+ free(buf2);
+ free(buf2_data);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDfree(buf1);
- HDfree(buf1_data);
- HDfree(buf2);
- HDfree(buf2_data);
+ free(buf1);
+ free(buf1_data);
+ free(buf2);
+ free(buf2_data);
- HDprintf("*** One or more extend tests failed ***\n");
- HDexit(EXIT_FAILURE);
+ printf("*** One or more extend tests failed ***\n");
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/external.c b/test/external.c
index d0d7f60..9914c5b 100644
--- a/test/external.c
+++ b/test/external.c
@@ -53,8 +53,8 @@ files_have_same_contents(const char *name1, const char *name2)
/* Loop until files are empty or we encounter a problem */
while (1) {
- HDmemset(buf1, 0, sizeof(buf1));
- HDmemset(buf2, 0, sizeof(buf2));
+ memset(buf1, 0, sizeof(buf1));
+ memset(buf2, 0, sizeof(buf2));
n1 = HDread(fd1, buf1, sizeof(buf1));
if (n1 < 0 || (size_t)n1 > sizeof(buf1))
@@ -71,7 +71,7 @@ files_have_same_contents(const char *name1, const char *name2)
break;
}
- if (HDmemcmp(buf1, buf2, (size_t)n1) != 0)
+ if (memcmp(buf1, buf2, (size_t)n1) != 0)
break;
} /* end while */
@@ -149,7 +149,7 @@ test_non_extendible(hid_t file)
if (1 != n) {
H5_FAILED();
HDputs(" Returned external count is wrong.");
- HDprintf(" got: %d\n ans: 1\n", n);
+ printf(" got: %d\n ans: 1\n", n);
goto error;
}
@@ -159,13 +159,13 @@ test_non_extendible(hid_t file)
if (file_offset != 0) {
H5_FAILED();
HDputs(" Wrong file offset.");
- HDprintf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
+ printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (file_size != (max_size[0] * sizeof(int))) {
H5_FAILED();
HDputs(" Wrong file size.");
- HDprintf(" got: %" PRIuHSIZE "\n ans: %" PRIuHSIZE "\n", file_size, max_size[0] * sizeof(int));
+ printf(" got: %" PRIuHSIZE "\n ans: %" PRIuHSIZE "\n", file_size, max_size[0] * sizeof(int));
goto error;
}
@@ -418,7 +418,7 @@ test_unlimited(hid_t file)
if (1 != n) {
H5_FAILED();
HDputs(" Returned external count is wrong.");
- HDprintf(" got: %d\n ans: 1\n", n);
+ printf(" got: %d\n ans: 1\n", n);
goto error;
} /* end if */
@@ -427,13 +427,13 @@ test_unlimited(hid_t file)
if (file_offset != 0) {
H5_FAILED();
HDputs(" Wrong file offset.");
- HDprintf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
+ printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (H5F_UNLIMITED != file_size) {
H5_FAILED();
HDputs(" Wrong file size.");
- HDprintf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
+ printf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
goto error;
}
@@ -482,13 +482,13 @@ add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, h
}
for (i = 0; i < n_external_files; i++) {
if (HDsnprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) {
- HDfprintf(stderr, "External file %d overflows name buffer\n", i + 1);
- HDfflush(stderr);
+ fprintf(stderr, "External file %d overflows name buffer\n", i + 1);
+ fflush(stderr);
return -1;
}
if (H5Pset_external(dcpl_id, exname, offset, max_ext_size) < 0) {
- HDfprintf(stderr, "Problem adding external file %s\n", exname);
- HDfflush(stderr);
+ fprintf(stderr, "Problem adding external file %s\n", exname);
+ fflush(stderr);
return -1;
}
}
@@ -756,7 +756,7 @@ test_read_file_set(hid_t fapl)
FAIL_STACK_ERROR;
/* Read the entire dataset */
- HDmemset(whole, 0, sizeof(whole));
+ memset(whole, 0, sizeof(whole));
if (H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
FAIL_STACK_ERROR;
@@ -774,7 +774,7 @@ test_read_file_set(hid_t fapl)
FAIL_STACK_ERROR;
/* Read */
- HDmemset(whole, 0, sizeof(whole));
+ memset(whole, 0, sizeof(whole));
if (H5Dread(dset, H5T_NATIVE_INT, hs_space, hs_space, H5P_DEFAULT, whole) < 0)
FAIL_STACK_ERROR;
@@ -1004,7 +1004,7 @@ test_path_absolute(hid_t fapl)
FAIL_STACK_ERROR;
/* Read the entire dataset and compare with the original */
- HDmemset(whole, 0, sizeof(whole));
+ memset(whole, 0, sizeof(whole));
if (H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < TOTAL_SIZE; i++)
@@ -1094,7 +1094,7 @@ test_path_relative(hid_t fapl)
FAIL_STACK_ERROR;
/* Read the entire dataset and compare with the original */
- HDmemset(whole, 0, sizeof(whole));
+ memset(whole, 0, sizeof(whole));
if (H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < TOTAL_SIZE; i++)
@@ -1218,7 +1218,7 @@ test_path_relative_cwd(hid_t fapl)
FAIL_PUTS_ERROR("reopening the dataset with a different efile_prefix succeeded");
/* Read the entire dataset and compare with the original */
- HDmemset(whole, 0, sizeof(whole));
+ memset(whole, 0, sizeof(whole));
if (H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < TOTAL_SIZE; i++)
@@ -1255,7 +1255,7 @@ test_path_relative_cwd(hid_t fapl)
FAIL_PUTS_ERROR("reopening the dataset with a different efile_prefix succeeded");
/* Read the entire dataset and compare with the original */
- HDmemset(whole, 0, sizeof(whole));
+ memset(whole, 0, sizeof(whole));
if (H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < TOTAL_SIZE; i++)
@@ -1362,7 +1362,7 @@ test_h5d_get_access_plist(hid_t fapl_id)
FAIL_STACK_ERROR;
/* Check the value for the external prefix */
- if ((buffer = (char *)HDcalloc((size_t)64, sizeof(char))) == NULL)
+ if ((buffer = (char *)calloc((size_t)64, sizeof(char))) == NULL)
TEST_ERROR;
if (H5Pget_efile_prefix(dapl_id, buffer, (size_t)64) < 0)
FAIL_STACK_ERROR;
@@ -1370,7 +1370,7 @@ test_h5d_get_access_plist(hid_t fapl_id)
FAIL_PUTS_ERROR("external file prefix from dapl incorrect");
/* Close everything */
- HDfree(buffer);
+ free(buffer);
if (H5Sclose(sid) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(did) < 0)
@@ -1387,7 +1387,7 @@ test_h5d_get_access_plist(hid_t fapl_id)
error:
if (buffer)
- HDfree(buffer);
+ free(buffer);
H5E_BEGIN_TRY
{
H5Dclose(did);
@@ -1527,6 +1527,6 @@ error:
}
H5E_END_TRY;
nerrors = MAX(1, nerrors);
- HDprintf("%d TEST%s FAILED.\n", nerrors, 1 == nerrors ? "" : "s");
+ printf("%d TEST%s FAILED.\n", nerrors, 1 == nerrors ? "" : "s");
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/external_common.c b/test/external_common.c
index 7d72605..25bf43e 100644
--- a/test/external_common.c
+++ b/test/external_common.c
@@ -46,7 +46,7 @@ reset_raw_data_files(hbool_t is_env)
/* Set up garbage buffer */
garbage_count = N_EXT_FILES * GARBAGE_PER_FILE;
- if (NULL == (garbage = (uint8_t *)HDcalloc(garbage_count, sizeof(uint8_t))))
+ if (NULL == (garbage = (uint8_t *)calloc(garbage_count, sizeof(uint8_t))))
goto error;
for (i = 0; i < garbage_count; i++)
garbage[i] = 0xFF;
@@ -113,13 +113,13 @@ reset_raw_data_files(hbool_t is_env)
HDclose(fd);
} /* end for */
- HDfree(garbage);
+ free(garbage);
return SUCCEED;
error:
if (fd)
HDclose(fd);
if (garbage)
- HDfree(garbage);
+ free(garbage);
return FAIL;
}
diff --git a/test/external_env.c b/test/external_env.c
index 3718dc2..da7715c 100644
--- a/test/external_env.c
+++ b/test/external_env.c
@@ -94,7 +94,7 @@ test_path_env(hid_t fapl)
FAIL_STACK_ERROR;
/* Read the entire dataset and compare with the original */
- HDmemset(whole, 0, sizeof(whole));
+ memset(whole, 0, sizeof(whole));
if (H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < TOTAL_SIZE; i++)
@@ -214,6 +214,6 @@ error:
}
H5E_END_TRY;
nerrors = MAX(1, nerrors);
- HDprintf("%d TEST%s FAILED.\n", nerrors, 1 == nerrors ? "" : "s");
+ printf("%d TEST%s FAILED.\n", nerrors, 1 == nerrors ? "" : "s");
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/farray.c b/test/farray.c
index b772ce3..c4627dc 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -116,7 +116,7 @@ static herr_t
init_cparam(H5FA_create_t *cparam, farray_test_param_t *tparam)
{
/* Wipe out background */
- HDmemset(cparam, 0, sizeof(*cparam));
+ memset(cparam, 0, sizeof(*cparam));
cparam->cls = H5FA_CLS_TEST;
cparam->raw_elmt_size = ELMT_SIZE;
@@ -177,20 +177,20 @@ check_stats(const H5FA_t *fa, const farray_state_t *state)
/* Compare information */
if (farray_stats.hdr_size != state->hdr_size) {
- HDfprintf(stdout, "farray_stats.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n",
- farray_stats.hdr_size, state->hdr_size);
+ fprintf(stdout, "farray_stats.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n",
+ farray_stats.hdr_size, state->hdr_size);
TEST_ERROR;
}
if (farray_stats.dblk_size != state->dblk_size) {
- HDfprintf(stdout, "farray_stats.dblk_size = %" PRIuHSIZE ", state->dblk_size = %" PRIuHSIZE "\n",
- farray_stats.dblk_size, state->dblk_size);
+ fprintf(stdout, "farray_stats.dblk_size = %" PRIuHSIZE ", state->dblk_size = %" PRIuHSIZE "\n",
+ farray_stats.dblk_size, state->dblk_size);
TEST_ERROR;
}
if (farray_stats.nelmts != state->nelmts) {
- HDfprintf(stdout, "farray_stats.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n",
- farray_stats.nelmts, state->nelmts);
+ fprintf(stdout, "farray_stats.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n",
+ farray_stats.nelmts, state->nelmts);
TEST_ERROR;
}
@@ -216,8 +216,8 @@ set_fa_state(const H5FA_create_t *cparam, farray_state_t *state)
size_t dblk_page_nelmts; /* # of elements per page */
/* Sanity check */
- HDassert(cparam);
- HDassert(state);
+ assert(cparam);
+ assert(state);
/* Compute the state of the fixed array */
state->hdr_size = FA_HDR_SIZE;
@@ -320,7 +320,7 @@ create_array(H5F_t *f, const H5FA_create_t *cparam, H5FA_t **fa, haddr_t *fa_add
TEST_ERROR;
/* Check array stats */
- HDmemset(&state, 0, sizeof(state));
+ memset(&state, 0, sizeof(state));
state.hdr_size = FA_HDR_SIZE;
state.nelmts = cparam->nelmts;
if (check_stats(*fa, &state))
@@ -348,7 +348,7 @@ verify_cparam(const H5FA_t *fa, const H5FA_create_t *cparam)
H5FA_create_t test_cparam; /* Creation parameters for array */
/* Retrieve creation parameters */
- HDmemset(&test_cparam, 0, sizeof(H5FA_create_t));
+ memset(&test_cparam, 0, sizeof(H5FA_create_t));
if (H5FA__get_cparam_test(fa, &test_cparam) < 0)
FAIL_STACK_ERROR;
@@ -437,7 +437,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
H5FA_create_t test_cparam; /* Creation parameters for array */
/* Set invalid element size */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.raw_elmt_size = 0;
H5E_BEGIN_TRY
{
@@ -454,7 +454,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
} /* end if */
/* Set invalid max. # of elements bits */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = 0;
H5E_BEGIN_TRY
{
@@ -471,7 +471,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
} /* end if */
/* Set invalid max. # of elements */
- HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
+ memcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.nelmts = 0;
H5E_BEGIN_TRY
{
@@ -982,8 +982,8 @@ fiter_fw_init(const H5FA_create_t H5_ATTR_UNUSED *cparam, const farray_test_para
fiter_fw_t *fiter; /* Forward element iteration object */
/* Allocate space for the element iteration object */
- fiter = (fiter_fw_t *)HDmalloc(sizeof(fiter_fw_t));
- HDassert(fiter);
+ fiter = (fiter_fw_t *)malloc(sizeof(fiter_fw_t));
+ assert(fiter);
/* Initialize the element iteration object */
fiter->idx = 0;
@@ -1009,7 +1009,7 @@ fiter_fw_next(void *_fiter)
hssize_t ret_val;
/* Sanity check */
- HDassert(fiter);
+ assert(fiter);
/* Get the next array index to test */
ret_val = (hssize_t)fiter->idx++;
@@ -1031,10 +1031,10 @@ static int
fiter_term(void *fiter)
{
/* Sanity check */
- HDassert(fiter);
+ assert(fiter);
/* Free iteration object */
- HDfree(fiter);
+ free(fiter);
return (0);
} /* end fiter_term() */
@@ -1068,8 +1068,8 @@ fiter_rv_init(const H5FA_create_t *cparam, const farray_test_param_t H5_ATTR_UNU
fiter_rv_t *fiter; /* Reverse element iteration object */
/* Allocate space for the element iteration object */
- fiter = (fiter_rv_t *)HDmalloc(sizeof(fiter_rv_t));
- HDassert(fiter);
+ fiter = (fiter_rv_t *)malloc(sizeof(fiter_rv_t));
+ assert(fiter);
/* Initialize reverse iteration info */
fiter->idx = cparam->nelmts - 1;
@@ -1095,7 +1095,7 @@ fiter_rv_next(void *_fiter)
hssize_t ret_val;
/* Sanity check */
- HDassert(fiter);
+ assert(fiter);
/* Get the next array index to test */
ret_val = (hssize_t)fiter->idx--;
@@ -1134,12 +1134,12 @@ fiter_rnd_init(const H5FA_create_t H5_ATTR_UNUSED *cparam, const farray_test_par
size_t u; /* Local index variable */
/* Allocate space for the element iteration object */
- fiter = (fiter_rnd_t *)HDmalloc(sizeof(fiter_rnd_t));
- HDassert(fiter);
+ fiter = (fiter_rnd_t *)malloc(sizeof(fiter_rnd_t));
+ assert(fiter);
/* Allocate space for the array of shuffled indices */
- fiter->idx = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)cnt);
- HDassert(fiter->idx);
+ fiter->idx = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)cnt);
+ assert(fiter->idx);
/* Initialize reverse iteration info */
fiter->pos = 0;
@@ -1180,7 +1180,7 @@ fiter_rnd_next(void *_fiter)
hssize_t ret_val;
/* Sanity check */
- HDassert(fiter);
+ assert(fiter);
/* Get the next array index to test */
ret_val = (hssize_t)fiter->idx[fiter->pos];
@@ -1205,14 +1205,14 @@ fiter_rnd_term(void *_fiter)
fiter_rnd_t *fiter = (fiter_rnd_t *)_fiter;
/* Sanity check */
- HDassert(fiter);
- HDassert(fiter->idx);
+ assert(fiter);
+ assert(fiter->idx);
/* Free shuffled index array */
- HDfree(fiter->idx);
+ free(fiter->idx);
/* Free iteration object */
- HDfree(fiter);
+ free(fiter);
return (0);
} /* end fiter_rnd_term() */
@@ -1248,8 +1248,8 @@ fiter_cyc_init(const H5FA_create_t H5_ATTR_UNUSED *cparam, const farray_test_par
fiter_cyc_t *fiter; /* Cyclic element iteration object */
/* Allocate space for the element iteration object */
- fiter = (fiter_cyc_t *)HDmalloc(sizeof(fiter_cyc_t));
- HDassert(fiter);
+ fiter = (fiter_cyc_t *)malloc(sizeof(fiter_cyc_t));
+ assert(fiter);
/* Initialize reverse iteration info */
fiter->pos = 0;
@@ -1277,7 +1277,7 @@ fiter_cyc_next(void *_fiter)
hssize_t ret_val;
/* Sanity check */
- HDassert(fiter);
+ assert(fiter);
/* Get the next array index to test */
ret_val = (hssize_t)fiter->pos;
@@ -1356,7 +1356,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, h
hsize_t fa_nelmts; /* # of elements in fixed array */
haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
- HDassert(nelmts);
+ assert(nelmts);
/*
* Display testing message
*/
@@ -1385,7 +1385,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, h
TEST_ERROR;
/* Verify array state */
- HDmemset(&state, 0, sizeof(state));
+ memset(&state, 0, sizeof(state));
state.hdr_size = FA_HDR_SIZE;
state.nelmts = cparam->nelmts;
state.dblk_size = 0;
@@ -1456,7 +1456,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, h
} /* end for */
/* Verify array state */
- HDmemset(&state, 0, sizeof(state));
+ memset(&state, 0, sizeof(state));
set_fa_state(cparam, &state);
if (check_stats(fa, &state))
TEST_ERROR;
@@ -1540,7 +1540,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR;
/* Verify array state */
- HDmemset(&state, 0, sizeof(state));
+ memset(&state, 0, sizeof(state));
state.hdr_size = FA_HDR_SIZE;
state.nelmts = cparam->nelmts;
state.dblk_size = 0;
@@ -1565,7 +1565,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
FAIL_STACK_ERROR;
/* Verify array state */
- HDmemset(&state, 0, sizeof(state));
+ memset(&state, 0, sizeof(state));
set_fa_state(cparam, &state);
if (check_stats(fa, &state))
TEST_ERROR;
@@ -1642,7 +1642,7 @@ main(void)
fapl = h5_fileaccess();
ExpressMode = GetTestExpress();
if (ExpressMode > 1)
- HDprintf("***Express test mode on. Some tests may be skipped\n");
+ printf("***Express test mode on. Some tests may be skipped\n");
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename_g, sizeof(filename_g));
@@ -1676,7 +1676,7 @@ main(void)
for (curr_test = FARRAY_TEST_NORMAL; curr_test < FARRAY_TEST_NTESTS; curr_test++) {
/* Initialize the testing parameters */
- HDmemset(&tparam, 0, sizeof(tparam));
+ memset(&tparam, 0, sizeof(tparam));
tparam.nelmts = TEST_NELMTS;
/* Set appropriate testing parameters for each test */
@@ -1792,7 +1792,7 @@ main(void)
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
HDputs("*** TESTS FAILED ***");
@@ -1806,5 +1806,5 @@ error:
if (api_ctx_pushed)
H5CX_pop(FALSE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/fheap.c b/test/fheap.c
index 8709879..759bce3 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -195,7 +195,7 @@ static int
init_small_cparam(H5HF_create_t *cparam)
{
/* Wipe out background */
- HDmemset(cparam, 0, sizeof(H5HF_create_t));
+ memset(cparam, 0, sizeof(H5HF_create_t));
/* General parameters */
cparam->id_len = SMALL_ID_LEN;
@@ -231,7 +231,7 @@ static int
init_large_cparam(H5HF_create_t *cparam)
{
/* Wipe out background */
- HDmemset(cparam, 0, sizeof(H5HF_create_t));
+ memset(cparam, 0, sizeof(H5HF_create_t));
/* General parameters */
cparam->id_len = LARGE_ID_LEN;
@@ -271,45 +271,45 @@ check_stats(const H5HF_t *fh, const fheap_heap_state_t *state)
if (H5HF_stat_info(fh, &heap_stats) < 0)
FAIL_STACK_ERROR;
if (heap_stats.man_nobjs != state->man_nobjs) {
- HDfprintf(stdout, "heap_stats.man_nobjs = %" PRIuHSIZE ", state->man_nobjs = %zu\n",
- heap_stats.man_nobjs, state->man_nobjs);
+ fprintf(stdout, "heap_stats.man_nobjs = %" PRIuHSIZE ", state->man_nobjs = %zu\n",
+ heap_stats.man_nobjs, state->man_nobjs);
TEST_ERROR;
} /* end if */
if (heap_stats.man_size != state->man_size) {
- HDfprintf(stdout, "heap_stats.man_size = %" PRIuHSIZE ", state->man_size = %" PRIuHSIZE "\n",
- heap_stats.man_size, state->man_size);
+ fprintf(stdout, "heap_stats.man_size = %" PRIuHSIZE ", state->man_size = %" PRIuHSIZE "\n",
+ heap_stats.man_size, state->man_size);
TEST_ERROR;
} /* end if */
if (heap_stats.man_alloc_size != state->man_alloc_size) {
- HDfprintf(stdout,
- "heap_stats.man_alloc_size = %" PRIuHSIZE ", state->man_alloc_size = %" PRIuHSIZE "\n",
- heap_stats.man_alloc_size, state->man_alloc_size);
+ fprintf(stdout,
+ "heap_stats.man_alloc_size = %" PRIuHSIZE ", state->man_alloc_size = %" PRIuHSIZE "\n",
+ heap_stats.man_alloc_size, state->man_alloc_size);
TEST_ERROR;
} /* end if */
if (heap_stats.man_free_space != state->man_free_space) {
- HDfprintf(stdout,
- "heap_stats.man_free_space = %" PRIuHSIZE ", state->man_free_space = %" PRIuHSIZE "\n",
- heap_stats.man_free_space, state->man_free_space);
+ fprintf(stdout,
+ "heap_stats.man_free_space = %" PRIuHSIZE ", state->man_free_space = %" PRIuHSIZE "\n",
+ heap_stats.man_free_space, state->man_free_space);
TEST_ERROR;
} /* end if */
if (heap_stats.huge_nobjs != state->huge_nobjs) {
- HDfprintf(stdout, "heap_stats.huge_nobjs = %" PRIuHSIZE ", state->huge_nobjs = %zu\n",
- heap_stats.huge_nobjs, state->huge_nobjs);
+ fprintf(stdout, "heap_stats.huge_nobjs = %" PRIuHSIZE ", state->huge_nobjs = %zu\n",
+ heap_stats.huge_nobjs, state->huge_nobjs);
TEST_ERROR;
} /* end if */
if (heap_stats.huge_size != state->huge_size) {
- HDfprintf(stdout, "heap_stats.huge_size = %" PRIuHSIZE ", state->huge_size = %" PRIuHSIZE "\n",
- heap_stats.huge_size, state->huge_size);
+ fprintf(stdout, "heap_stats.huge_size = %" PRIuHSIZE ", state->huge_size = %" PRIuHSIZE "\n",
+ heap_stats.huge_size, state->huge_size);
TEST_ERROR;
} /* end if */
if (heap_stats.tiny_nobjs != state->tiny_nobjs) {
- HDfprintf(stdout, "heap_stats.tiny_nobjs = %" PRIuHSIZE ", state->tiny_nobjs = %zu\n",
- heap_stats.tiny_nobjs, state->tiny_nobjs);
+ fprintf(stdout, "heap_stats.tiny_nobjs = %" PRIuHSIZE ", state->tiny_nobjs = %zu\n",
+ heap_stats.tiny_nobjs, state->tiny_nobjs);
TEST_ERROR;
} /* end if */
if (heap_stats.tiny_size != state->tiny_size) {
- HDfprintf(stdout, "heap_stats.tiny_size = %" PRIuHSIZE ", state->tiny_size = %" PRIuHSIZE "\n",
- heap_stats.tiny_size, state->tiny_size);
+ fprintf(stdout, "heap_stats.tiny_size = %" PRIuHSIZE ", state->tiny_size = %" PRIuHSIZE "\n",
+ heap_stats.tiny_size, state->tiny_size);
TEST_ERROR;
} /* end if */
@@ -338,7 +338,7 @@ static herr_t
op_memcpy(const void *obj, size_t obj_len, void *op_data)
{
/* Make copy of the object */
- HDmemcpy(op_data, obj, obj_len);
+ memcpy(op_data, obj, obj_len);
return (SUCCEED);
} /* op_memcpy() */
@@ -376,7 +376,7 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state,
size_t robj_size; /* Object size read in */
/* Sanity check */
- HDassert(fh);
+ assert(fh);
/* Initialize object buffer */
obj = &shared_wobj_g[obj_off];
@@ -388,7 +388,7 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state,
TEST_ERROR;
/* Insert object */
- HDmemset(heap_id, 0, id_len);
+ memset(heap_id, 0, id_len);
if (H5HF_insert(fh, obj_size, obj, heap_id) < 0)
FAIL_STACK_ERROR;
@@ -423,7 +423,7 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state,
TEST_ERROR;
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(obj, shared_robj_g, obj_size) != 0)
+ if (memcmp(obj, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* If the heap IDs are to be retained, append them to the list */
@@ -450,7 +450,7 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state,
} /* end if */
/* Append the object info onto the array */
- HDmemcpy(&keep_ids->ids[keep_ids->num_ids * id_len], heap_id, id_len);
+ memcpy(&keep_ids->ids[keep_ids->num_ids * id_len], heap_id, id_len);
keep_ids->lens[keep_ids->num_ids] = obj_size;
keep_ids->offs[keep_ids->num_ids] = obj_off;
@@ -510,7 +510,7 @@ get_fill_size(const fheap_test_param_t *tparam)
case FHEAP_TEST_FILL_N:
default:
- HDassert(0 && "Unknown bulk fill type?!?");
+ assert(0 && "Unknown bulk fill type?!?");
} /* end switch */
return (0);
@@ -547,7 +547,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *
H5MM_xfree(test_desc);
/* Initialize the heap ID structure */
- HDmemset(keep_ids, 0, sizeof(fheap_heap_ids_t));
+ memset(keep_ids, 0, sizeof(fheap_heap_ids_t));
/* Retrieve "bulk" filling object size */
if (fill_size)
@@ -661,7 +661,7 @@ open_heap(char *filename, hid_t fapl, const H5HF_create_t *cparam, const fheap_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(*fh_addr))
TEST_ERROR;
- HDmemset(state, 0, sizeof(fheap_heap_state_t));
+ memset(state, 0, sizeof(fheap_heap_state_t));
if (check_stats(*fh, state))
TEST_ERROR;
@@ -706,7 +706,7 @@ open_heap(char *filename, hid_t fapl, const H5HF_create_t *cparam, const fheap_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(*fh_addr))
TEST_ERROR;
- HDmemset(state, 0, sizeof(fheap_heap_state_t));
+ memset(state, 0, sizeof(fheap_heap_state_t));
if (check_stats(*fh, state))
TEST_ERROR;
} /* end if */
@@ -849,9 +849,9 @@ del_objs_half_refill(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_he
size_t u; /* Local index variable */
/* Sanity check */
- HDassert(fh);
- HDassert(*fh);
- HDassert(keep_ids);
+ assert(fh);
+ assert(*fh);
+ assert(keep_ids);
/* Check for closing & re-opening the heap */
if (tparam->reopen_heap) {
@@ -940,10 +940,10 @@ del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_heap_state_t *
size_t u; /* Local index variable */
/* Sanity check */
- HDassert(fh);
- HDassert(*fh);
- HDassert(state);
- HDassert(keep_ids);
+ assert(fh);
+ assert(*fh);
+ assert(state);
+ assert(keep_ids);
/* Check for first deleting half of objects & then re-inserting them */
if (tparam->drain_half == FHEAP_DEL_DRAIN_HALF)
@@ -984,7 +984,7 @@ del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_heap_state_t *
} /* end for */
/* Heap should be completely empty now, reset our state */
- HDmemset(state, 0, sizeof(fheap_heap_state_t));
+ memset(state, 0, sizeof(fheap_heap_state_t));
/* Check up on heap... */
if (check_stats(*fh, state))
@@ -1037,9 +1037,9 @@ fill_heap(H5HF_t *fh, unsigned block_row, size_t obj_size, fheap_heap_state_t *s
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(fh);
- HDassert(state);
- HDassert(obj_size + 256 < shared_obj_size_g);
+ assert(fh);
+ assert(state);
+ assert(obj_size + 256 < shared_obj_size_g);
/* Initialize starting information */
data_size = (size_t)DBLOCK_FREE(fh, block_row);
@@ -1166,7 +1166,7 @@ fill_heap(H5HF_t *fh, unsigned block_row, size_t obj_size, fheap_heap_state_t *s
/* Check that object is correct */
wobj = &shared_wobj_g[*curr_off_ptr];
- if (HDmemcmp(wobj, shared_robj_g, *curr_len_ptr) != 0)
+ if (memcmp(wobj, shared_robj_g, *curr_len_ptr) != 0)
TEST_ERROR;
/* Adjust object & ID pointers */
@@ -1192,9 +1192,9 @@ fill_heap(H5HF_t *fh, unsigned block_row, size_t obj_size, fheap_heap_state_t *s
} /* end if */
/* Append the IDs onto the array */
- HDmemcpy(&keep_ids->ids[keep_ids->num_ids * id_len], shared_ids_g, (num_ids * id_len));
- HDmemcpy(&keep_ids->lens[keep_ids->num_ids], shared_lens_g, (num_ids * sizeof(size_t)));
- HDmemcpy(&keep_ids->offs[keep_ids->num_ids], shared_offs_g, (num_ids * sizeof(size_t)));
+ memcpy(&keep_ids->ids[keep_ids->num_ids * id_len], shared_ids_g, (num_ids * id_len));
+ memcpy(&keep_ids->lens[keep_ids->num_ids], shared_lens_g, (num_ids * sizeof(size_t)));
+ memcpy(&keep_ids->offs[keep_ids->num_ids], shared_offs_g, (num_ids * sizeof(size_t)));
/* Increment the number of IDs kept */
keep_ids->num_ids += num_ids;
@@ -1236,8 +1236,8 @@ fill_root_row(H5HF_t *fh, unsigned row, size_t obj_size, fheap_heap_state_t *sta
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(fh);
- HDassert(state);
+ assert(fh);
+ assert(state);
/* Get some information for the heap */
block_size = (size_t)DBLOCK_SIZE(fh, row);
@@ -1325,8 +1325,8 @@ fill_partial_row(H5HF_t *fh, unsigned row, unsigned width, size_t obj_size, fhea
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(fh);
- HDassert(state);
+ assert(fh);
+ assert(state);
/* Get some information for the heap */
block_size = (size_t)DBLOCK_SIZE(fh, row);
@@ -1366,8 +1366,8 @@ static int
fill_row(H5HF_t *fh, unsigned row, size_t obj_size, fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
/* Sanity check */
- HDassert(fh);
- HDassert(state);
+ assert(fh);
+ assert(state);
/* Fill the entire row (with the partial row fill routine) */
if (fill_partial_row(fh, row, DTABLE_WIDTH(fh), obj_size, state, keep_ids))
@@ -1405,7 +1405,7 @@ fill_root_direct(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *state, fheap_h
/* Get heap info */
max_dblock_rows = DTABLE_MAX_DROWS(fh);
- HDassert(max_dblock_rows);
+ assert(max_dblock_rows);
/* Loop over rows */
for (row = 0; row < max_dblock_rows; row++)
@@ -1444,7 +1444,7 @@ fill_2nd_indirect(H5HF_t *fh, unsigned pos, size_t obj_size, fheap_heap_state_t
/* Get some information for the heap */
max_dblock_rows = IBLOCK_MAX_DROWS(fh, pos);
- HDassert(max_dblock_rows);
+ assert(max_dblock_rows);
/* Loop over rows */
for (row = 0; row < max_dblock_rows; row++)
@@ -1481,7 +1481,7 @@ fill_all_direct(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *state, fheap_he
/* Get heap info */
max_dblock_rows = DTABLE_MAX_DROWS(fh);
- HDassert(max_dblock_rows);
+ assert(max_dblock_rows);
/* Loop over rows */
for (row = 0; row < max_dblock_rows; row++)
@@ -1859,14 +1859,14 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
TEST_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
PASSED();
/* Query the type of address mapping */
TESTING("query heap creation parameters");
- HDmemset(&test_cparam, 0, sizeof(H5HF_create_t));
+ memset(&test_cparam, 0, sizeof(H5HF_create_t));
if (H5HF_get_cparam_test(fh, &test_cparam) < 0)
FAIL_STACK_ERROR;
if (H5HF_cmp_cparam_test(cparam, &test_cparam))
@@ -1984,7 +1984,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
TEST_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
@@ -2018,7 +2018,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR;
/* Query the creation parameters */
- HDmemset(&test_cparam, 0, sizeof(H5HF_create_t));
+ memset(&test_cparam, 0, sizeof(H5HF_create_t));
if (H5HF_get_cparam_test(fh, &test_cparam) < 0)
FAIL_STACK_ERROR;
if (H5HF_cmp_cparam_test(cparam, &test_cparam))
@@ -2139,7 +2139,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
TEST_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
@@ -2148,7 +2148,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR;
/* Verify the creation parameters */
- HDmemset(&test_cparam, 0, sizeof(H5HF_create_t));
+ memset(&test_cparam, 0, sizeof(H5HF_create_t));
if (H5HF_get_cparam_test(fh2, &test_cparam) < 0)
FAIL_STACK_ERROR;
if (H5HF_cmp_cparam_test(cparam, &test_cparam))
@@ -2180,7 +2180,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR;
/* Verify the creation parameters */
- HDmemset(&test_cparam, 0, sizeof(H5HF_create_t));
+ memset(&test_cparam, 0, sizeof(H5HF_create_t));
if (H5HF_get_cparam_test(fh2, &test_cparam) < 0)
FAIL_STACK_ERROR;
if (H5HF_cmp_cparam_test(cparam, &test_cparam))
@@ -2309,7 +2309,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
TEST_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
@@ -2322,7 +2322,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR;
/* Verify the creation parameters */
- HDmemset(&test_cparam, 0, sizeof(H5HF_create_t));
+ memset(&test_cparam, 0, sizeof(H5HF_create_t));
if (H5HF_get_cparam_test(fh2, &test_cparam) < 0)
FAIL_STACK_ERROR;
if (H5HF_cmp_cparam_test(cparam, &test_cparam))
@@ -2464,7 +2464,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TESTING("limits of heap ID lengths");
/* Copy heap creation properties */
- HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
+ memcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
/* Set the 'default' heap ID length */
tmp_cparam.id_len = 0;
@@ -2800,7 +2800,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TESTING("creating heaps with I/O filters");
/* Copy heap creation properties */
- HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
+ memcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
/* Set an I/O filter for heap data */
deflate_level = 6;
@@ -2843,7 +2843,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
/* Query the heap creation parameters */
- HDmemset(&test_cparam, 0, sizeof(H5HF_create_t));
+ memset(&test_cparam, 0, sizeof(H5HF_create_t));
if (H5HF_get_cparam_test(fh, &test_cparam) < 0)
FAIL_STACK_ERROR;
if (H5HF_cmp_cparam_test(&tmp_cparam, &test_cparam))
@@ -3204,7 +3204,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
TEST_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
@@ -3317,7 +3317,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
TEST_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
@@ -3418,7 +3418,7 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting first (small) object into absolute heap
@@ -3515,7 +3515,7 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) object into absolute heap
@@ -3614,7 +3614,7 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test forcing creation of indirect root block & second direct block
@@ -3720,7 +3720,7 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill second direct block
@@ -3827,7 +3827,7 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to create third direct block
@@ -3938,7 +3938,7 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill first row in root indirect block
@@ -4034,7 +4034,7 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to start second row in root indirect block
@@ -4137,7 +4137,7 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to start second row in root indirect block
@@ -4238,7 +4238,7 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to start third row in root indirect block
@@ -4349,7 +4349,7 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill four rows in root indirect block
@@ -4446,7 +4446,7 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct rows in root indirect block
@@ -4542,7 +4542,7 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to force creation of first recursive indirect block
@@ -4644,7 +4644,7 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to force creation of second direct
@@ -4754,7 +4754,7 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -4857,7 +4857,7 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -4968,7 +4968,7 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -5072,7 +5072,7 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -5174,7 +5174,7 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -5283,7 +5283,7 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -5386,7 +5386,7 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -5496,7 +5496,7 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -5607,7 +5607,7 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -5715,7 +5715,7 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -5824,7 +5824,7 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -5939,7 +5939,7 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -6060,7 +6060,7 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -6172,7 +6172,7 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -6286,7 +6286,7 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
/*
* Test inserting mult. (small) objects to fill all direct
@@ -6418,7 +6418,7 @@ test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
FAIL_STACK_ERROR;
@@ -6438,7 +6438,7 @@ test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
seed = (unsigned long)HDtime(NULL);
#if 0
/* seed = (unsigned long)1155438845; */
-HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+fprintf(stderr, "Random # seed was: %lu\n", seed);
#endif
HDsrandom((unsigned)seed);
@@ -6510,7 +6510,7 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
return (0);
error:
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+ fprintf(stderr, "Random # seed was: %lu\n", seed);
H5E_BEGIN_TRY
{
if (fh)
@@ -6577,7 +6577,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
FAIL_STACK_ERROR;
@@ -6742,7 +6742,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
FAIL_STACK_ERROR;
@@ -6936,7 +6936,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
FAIL_STACK_ERROR;
@@ -7106,7 +7106,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
FAIL_STACK_ERROR;
@@ -7347,7 +7347,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
FAIL_STACK_ERROR;
@@ -7622,9 +7622,9 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
/* Set up data array */
- if (NULL == (heap_id_data = (unsigned char *)HDcalloc(100 * MAX_HEAP_ID_LEN, sizeof(unsigned char))))
+ if (NULL == (heap_id_data = (unsigned char *)calloc(100 * MAX_HEAP_ID_LEN, sizeof(unsigned char))))
TEST_ERROR;
- if (NULL == (heap_id = (unsigned char **)HDcalloc(100, sizeof(heap_id_data))))
+ if (NULL == (heap_id = (unsigned char **)calloc(100, sizeof(heap_id_data))))
TEST_ERROR;
for (i = 0; i < 100; i++)
heap_id[i] = heap_id_data + (i * MAX_HEAP_ID_LEN);
@@ -7652,7 +7652,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
FAIL_STACK_ERROR;
if (!H5F_addr_defined(fh_addr))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
FAIL_STACK_ERROR;
@@ -7661,8 +7661,8 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
*/
TESTING("incremental object insertion and removal");
- HDmemset(&obj1, 0, sizeof(obj1));
- HDmemset(&obj2, 0, sizeof(obj2));
+ memset(&obj1, 0, sizeof(obj1));
+ memset(&obj2, 0, sizeof(obj2));
for (i = 0; i < 100; i++) {
for (j = 0; j < i; j++) {
if (H5HF_remove(fh, heap_id[j]) < 0)
@@ -7678,7 +7678,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
TEST_ERROR;
/* Insert object */
- HDmemset(heap_id[i], 0, id_len);
+ memset(heap_id[i], 0, id_len);
HDsnprintf(obj1.b, sizeof(obj1.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i);
if (H5HF_insert(fh, (sizeof(obj1)), &obj1, heap_id[i]) < 0)
FAIL_STACK_ERROR;
@@ -7695,8 +7695,8 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
/* All tests passed */
PASSED();
- HDfree(heap_id);
- HDfree(heap_id_data);
+ free(heap_id);
+ free(heap_id_data);
return 0;
@@ -7709,8 +7709,8 @@ error:
}
H5E_END_TRY;
- HDfree(heap_id);
- HDfree(heap_id_data);
+ free(heap_id);
+ free(heap_id_data);
return 1;
} /* test_man_incr_insert_remove() */
@@ -12692,10 +12692,10 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -12845,10 +12845,10 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert second object too large for managed heap blocks */
@@ -12875,10 +12875,10 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13078,10 +13078,10 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert second object too large for managed heap blocks */
@@ -13108,10 +13108,10 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert third object too large for managed heap blocks */
@@ -13138,10 +13138,10 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13389,10 +13389,10 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert second object too large for managed heap blocks */
@@ -13419,10 +13419,10 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert third object too large for managed heap blocks */
@@ -13449,10 +13449,10 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert fourth object small enough to fit into 'normal' heap blocks */
@@ -13486,10 +13486,10 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id4, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert fifth object small enough to fit into 'normal' heap blocks */
@@ -13524,10 +13524,10 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id5, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13662,7 +13662,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
} /* end else */
/* Check up on heap... */
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
} /* end if */
@@ -13764,7 +13764,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove";
/* Copy heap creation properties */
- HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
+ memcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
/* Set an I/O filter for heap data */
deflate_level = 6;
@@ -13862,10 +13862,10 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14013,10 +14013,10 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14166,10 +14166,10 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert second object small enough to encode in heap ID */
@@ -14196,10 +14196,10 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14412,17 +14412,17 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Check 'op' functionality on first huge object */
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert second object too large for managed heap blocks */
@@ -14449,17 +14449,17 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Check 'op' functionality on second huge object */
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id2, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert third object too large for managed heap blocks */
@@ -14486,17 +14486,17 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Check 'op' functionality on third huge object */
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id3, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert fourth object small enough to fit into 'normal' heap blocks */
@@ -14530,17 +14530,17 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id4, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Check 'op' functionality on fourth ('normal') object */
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id4, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert fifth object small enough to fit into 'normal' heap blocks */
@@ -14575,17 +14575,17 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id5, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Check 'op' functionality on fifth ('normal') object */
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id5, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert sixth object small enough to encode in heap ID */
@@ -14612,17 +14612,17 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id6, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Check 'op' functionality on sixth ('tiny') object */
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id6, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Insert seventh object small enough to encode in heap ID */
@@ -14649,17 +14649,17 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id7, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Check 'op' functionality on seventh ('tiny') object */
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id7, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14856,7 +14856,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
} /* end else */
/* Check up on heap... */
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
} /* end if */
@@ -14960,7 +14960,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
const char *base_desc = "insert one 'managed' object into heap with I/O filters, then remove";
/* Copy heap creation properties */
- HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
+ memcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
/* Set an I/O filter for heap data */
deflate_level = 6;
@@ -15026,10 +15026,10 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -15045,7 +15045,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
TEST_ERROR;
/* Check up on heap... */
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
} /* end if */
@@ -15134,7 +15134,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
const char *base_desc = "insert two 'managed' objects into heap with I/O filters, then remove";
/* Copy heap creation properties */
- HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
+ memcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
/* Set an I/O filter for heap data */
deflate_level = 6;
@@ -15209,10 +15209,10 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id1, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Read in ('normal') object #2 */
@@ -15220,10 +15220,10 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR;
if (obj_size != robj_size)
TEST_ERROR;
- HDmemset(shared_robj_g, 0, obj_size);
+ memset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
+ if (memcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -15267,7 +15267,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR;
/* Check up on heap... */
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
@@ -15297,7 +15297,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR;
/* Check up on heap... */
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
} /* end if */
@@ -15340,7 +15340,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR;
/* Check up on heap... */
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
@@ -15370,7 +15370,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR;
/* Check up on heap... */
- HDmemset(&state, 0, sizeof(fheap_heap_state_t));
+ memset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR;
} /* end else */
@@ -15460,10 +15460,10 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
size_t u; /* Local index variable */
/* Initialize the heap ID structure */
- HDmemset(&keep_ids, 0, sizeof(fheap_heap_ids_t));
+ memset(&keep_ids, 0, sizeof(fheap_heap_ids_t));
/* Copy heap creation properties */
- HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
+ memcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
/* Check if we are compressing the blocks */
if (tparam->comp == FHEAP_TEST_COMPRESS) {
@@ -15508,7 +15508,7 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
seed = (unsigned long)HDtime(NULL);
#if 0
/* seed = (unsigned long)1156158635; */
-HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+fprintf(stderr, "Random # seed was: %lu\n", seed);
#endif
HDsrandom((unsigned)seed);
@@ -15545,9 +15545,9 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
/* Swap current position with future position */
/* (just swap the heap ID, the len & offset isn't used */
- HDmemcpy(temp_id, &keep_ids.ids[u * id_len], id_len);
- HDmemcpy(&keep_ids.ids[u * id_len], &keep_ids.ids[(u + pos) * id_len], id_len);
- HDmemcpy(&keep_ids.ids[(u + pos) * id_len], temp_id, id_len);
+ memcpy(temp_id, &keep_ids.ids[u * id_len], id_len);
+ memcpy(&keep_ids.ids[u * id_len], &keep_ids.ids[(u + pos) * id_len], id_len);
+ memcpy(&keep_ids.ids[(u + pos) * id_len], temp_id, id_len);
} /* end if */
} /* end for */
@@ -15608,7 +15608,7 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
return (0);
error:
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+ fprintf(stderr, "Random # seed was: %lu\n", seed);
H5E_BEGIN_TRY
{
H5MM_xfree(keep_ids.ids);
@@ -15664,10 +15664,10 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
size_t u; /* Local index variable */
/* Initialize the heap ID structure */
- HDmemset(&keep_ids, 0, sizeof(fheap_heap_ids_t));
+ memset(&keep_ids, 0, sizeof(fheap_heap_ids_t));
/* Copy heap creation properties */
- HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
+ memcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
/* Check if we are compressing the blocks */
if (tparam->comp == FHEAP_TEST_COMPRESS) {
@@ -15714,7 +15714,7 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
seed = (unsigned long)HDtime(NULL);
#if 0
/* seed = (unsigned long)1155181717; */
-HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+fprintf(stderr, "Random # seed was: %lu\n", seed);
#endif
HDsrandom((unsigned)seed);
@@ -15763,9 +15763,9 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
/* Swap current position with future position */
/* (just swap the heap ID, the len & offset isn't used */
- HDmemcpy(temp_id, &keep_ids.ids[u * id_len], id_len);
- HDmemcpy(&keep_ids.ids[u * id_len], &keep_ids.ids[(u + pos) * id_len], id_len);
- HDmemcpy(&keep_ids.ids[(u + pos) * id_len], temp_id, id_len);
+ memcpy(temp_id, &keep_ids.ids[u * id_len], id_len);
+ memcpy(&keep_ids.ids[u * id_len], &keep_ids.ids[(u + pos) * id_len], id_len);
+ memcpy(&keep_ids.ids[(u + pos) * id_len], temp_id, id_len);
} /* end if */
} /* end for */
@@ -15826,7 +15826,7 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
return (0);
error:
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+ fprintf(stderr, "Random # seed was: %lu\n", seed);
H5E_BEGIN_TRY
{
H5MM_xfree(keep_ids.ids);
@@ -15899,10 +15899,10 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TESTING("writing objects in heap");
/* Initialize the heap ID structure */
- HDmemset(&keep_ids, 0, sizeof(fheap_heap_ids_t));
+ memset(&keep_ids, 0, sizeof(fheap_heap_ids_t));
/* Copy heap creation properties */
- HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
+ memcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
/* Check if we are compressing the blocks */
if (tparam->comp == FHEAP_TEST_COMPRESS) {
@@ -15956,7 +15956,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
ret = H5HF_write(fh, huge_heap_id, &id_changed, shared_wobj_g);
}
H5E_END_TRY;
- HDassert(!id_changed);
+ assert(!id_changed);
if (tparam->comp == FHEAP_TEST_COMPRESS) {
if (ret >= 0)
TEST_ERROR;
@@ -15972,7 +15972,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
ret = H5HF_write(fh, tiny_heap_id, &id_changed, shared_wobj_g);
}
H5E_END_TRY;
- HDassert(!id_changed);
+ assert(!id_changed);
if (ret >= 0)
TEST_ERROR;
@@ -16028,14 +16028,14 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
/* Overwrite data just written */
if (H5HF_write(fh, &keep_ids.ids[id_len * u], &id_changed, rewrite_obj) < 0)
FAIL_STACK_ERROR;
- HDassert(!id_changed);
+ assert(!id_changed);
/* Read data back in */
if (H5HF_read(fh, &keep_ids.ids[id_len * u], shared_robj_g) < 0)
FAIL_STACK_ERROR;
/* Compare data read in */
- if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size) != 0)
+ if (memcmp(rewrite_obj, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Change size of data to write */
@@ -16084,7 +16084,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR;
/* Compare data read in */
- if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size) != 0)
+ if (memcmp(rewrite_obj, shared_robj_g, obj_size) != 0)
TEST_ERROR;
/* Change size of data to write */
@@ -16169,7 +16169,7 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TESTING("bug1: inserting several objects & removing one, then re-inserting");
/* Initialize the heap ID structure */
- HDmemset(&keep_ids, 0, sizeof(fheap_heap_ids_t));
+ memset(&keep_ids, 0, sizeof(fheap_heap_ids_t));
/* Perform common file & heap open operations */
if (open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
@@ -16362,7 +16362,7 @@ main(void)
* in the future for parallel build.
*/
if (ExpressMode > 1)
- HDprintf("***Express test mode on. Some tests may be skipped\n");
+ printf("***Express test mode on. Some tests may be skipped\n");
else if (ExpressMode == 0) {
#ifdef H5_HAVE_PARALLEL
num_pb_fs = NUM_PB_FS - 2;
@@ -16477,7 +16477,7 @@ main(void)
/* Iterate over the testing parameters */
for (curr_test = FHEAP_TEST_NORMAL; curr_test < FHEAP_TEST_NTESTS; curr_test++) {
/* Clear the testing parameters */
- HDmemset(&tparam, 0, sizeof(fheap_test_param_t));
+ memset(&tparam, 0, sizeof(fheap_test_param_t));
tparam.actual_id_len = HEAP_ID_LEN;
/* Set to run with different file space setting */
@@ -16580,7 +16580,7 @@ main(void)
* level of complexity gradually. -QAK
*/
if (ExpressMode > 1)
- HDprintf(
+ printf(
"***Express test mode on. test_man_start_5th_recursive_indirect is skipped\n");
else
nerrors += test_man_start_5th_recursive_indirect(fapl, &small_cparam, &tparam);
@@ -16628,7 +16628,7 @@ main(void)
nerrors += test_man_remove_first_two_rows(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_first_four_rows(fapl, &small_cparam, &tparam);
if (ExpressMode > 1)
- HDprintf("***Express test mode on. Some tests skipped\n");
+ printf("***Express test mode on. Some tests skipped\n");
else {
nerrors += test_man_remove_all_root_direct(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_2nd_indirect(fapl, &small_cparam, &tparam);
@@ -16678,7 +16678,7 @@ main(void)
test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(
fapl, &small_cparam, &tparam);
if (ExpressMode > 1)
- HDprintf("***Express test mode on. Some tests skipped\n");
+ printf("***Express test mode on. Some tests skipped\n");
else {
nerrors +=
test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(
@@ -16808,7 +16808,7 @@ main(void)
/* Random object insertion & deletion */
if (ExpressMode > 1)
- HDprintf("***Express test mode on. Some tests skipped\n");
+ printf("***Express test mode on. Some tests skipped\n");
else {
/* Random tests using "small" heap creation parameters */
HDputs("Using 'small' heap creation parameters");
diff --git a/test/file_image.c b/test/file_image.c
index e9f50c3..9d591a6 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -102,7 +102,7 @@ test_properties(void)
* not be the case.
*/
size = (size_t)count * sizeof(char);
- if (NULL == (buffer = (char *)HDmalloc(size)))
+ if (NULL == (buffer = (char *)malloc(size)))
TEST_ERROR;
for (i = 0; i < count - 1; i++)
buffer[i] = (char)(65 + i);
@@ -132,7 +132,7 @@ test_properties(void)
VERIFY(temp != NULL, "temp is null!");
VERIFY(temp_size == size, "Sizes of buffers don't match");
VERIFY(temp != buffer, "Retrieved buffer is the same as original");
- VERIFY(0 == HDmemcmp(temp, buffer, size), "Buffers contain different data");
+ VERIFY(0 == memcmp(temp, buffer, size), "Buffers contain different data");
/* Copy the fapl */
if ((fapl_2 = H5Pcopy(fapl_1)) < 0)
@@ -147,7 +147,7 @@ test_properties(void)
VERIFY(temp2 != NULL, "Received buffer not set");
VERIFY(temp2 != buffer, "Retrieved buffer is the same as original");
VERIFY(temp2 != temp, "Retrieved buffer is the same as previously retrieved buffer");
- VERIFY(0 == HDmemcmp(temp2, buffer, size), "Buffers contain different data");
+ VERIFY(0 == memcmp(temp2, buffer, size), "Buffers contain different data");
retval = 0;
@@ -158,7 +158,7 @@ error:
retval = 1;
if (H5Pclose(fapl_2) < 0)
retval = 1;
- HDfree(buffer);
+ free(buffer);
H5free_memory(temp);
H5free_memory(temp2);
@@ -187,7 +187,7 @@ malloc_cb(size_t size, H5FD_file_image_op_t op, void *udata)
u->used_callbacks |= MALLOC;
u->malloc_src = op;
- return HDmalloc(size);
+ return malloc(size);
}
/******************************************************************************
@@ -209,7 +209,7 @@ memcpy_cb(void *dest, const void *src, size_t size, H5FD_file_image_op_t op, voi
u->used_callbacks |= MEMCPY;
u->memcpy_src = op;
- return HDmemcpy(dest, src, size);
+ return memcpy(dest, src, size);
}
/******************************************************************************
@@ -231,7 +231,7 @@ realloc_cb(void *ptr, size_t size, H5FD_file_image_op_t op, void *udata)
u->used_callbacks |= REALLOC;
u->realloc_src = op;
- return HDrealloc(ptr, size);
+ return realloc(ptr, size);
}
/******************************************************************************
@@ -251,7 +251,7 @@ free_cb(void *ptr, H5FD_file_image_op_t op, void *udata)
u->used_callbacks |= FREE;
u->free_src = op;
- HDfree(ptr);
+ free(ptr);
return (SUCCEED);
}
@@ -349,7 +349,7 @@ test_callbacks(void)
TESTING("Callback use in property list operations");
/* Allocate and initialize udata */
- udata = (udata_t *)HDmalloc(sizeof(udata_t));
+ udata = (udata_t *)malloc(sizeof(udata_t));
VERIFY(udata != NULL, "udata malloc failed");
reset_udata(udata);
@@ -358,7 +358,7 @@ test_callbacks(void)
/* Allocate and initialize file image buffer */
size = (size_t)count * sizeof(char);
- file_image = (char *)HDmalloc(size);
+ file_image = (char *)malloc(size);
VERIFY(file_image != NULL, "file_image malloc failed");
for (i = 0; i < count - 1; i++)
file_image[i] = (char)(65 + i);
@@ -523,16 +523,16 @@ test_callbacks(void)
/* Close stuff */
if (H5Pclose(fapl_1) < 0)
FAIL_STACK_ERROR;
- HDfree(file_image);
- HDfree(temp_file_image);
- HDfree(udata);
+ free(file_image);
+ free(temp_file_image);
+ free(udata);
PASSED();
return 0;
error:
- HDfree(file_image);
- HDfree(udata);
+ free(file_image);
+ free(udata);
return 1;
} /* test_callbacks() */
@@ -592,7 +592,7 @@ test_core(void)
VERIFY(ret >= 0, "h5_make_local_copy");
/* Allocate and initialize udata */
- udata = (udata_t *)HDmalloc(sizeof(udata_t));
+ udata = (udata_t *)malloc(sizeof(udata_t));
VERIFY(udata != NULL, "udata malloc failed");
/* copy the address of the udata into the callbacks structure */
@@ -661,7 +661,7 @@ test_core(void)
ret = HDfstat(fd, &sb);
VERIFY(ret == 0, "fstat failed");
size = (size_t)sb.st_size;
- file_image = (unsigned char *)HDmalloc(size);
+ file_image = (unsigned char *)malloc(size);
if (HDread(fd, file_image, size) < 0)
FAIL_PUTS_ERROR("unable to read from file descriptor");
ret = HDclose(fd);
@@ -679,8 +679,8 @@ test_core(void)
/* Release resources */
h5_clean_files(FILENAME, fapl);
- HDfree(udata);
- HDfree(file_image);
+ free(udata);
+ free(file_image);
HDremove(copied_filename);
PASSED();
@@ -785,8 +785,8 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
VERIFY(image_size > 0, "H5Fget_file_image(1) failed.");
/* allocate a buffer of the appropriate size */
- image_ptr = HDmalloc((size_t)image_size);
- VERIFY(image_ptr != NULL, "HDmalloc(1) failed.");
+ image_ptr = malloc((size_t)image_size);
+ VERIFY(image_ptr != NULL, "malloc(1) failed.");
/* load the image of the file into the buffer */
bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_size);
@@ -835,8 +835,8 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
VERIFY(file_size >= image_size, "file size != image size.");
/* allocate a buffer for the test file image */
- file_image_ptr = HDmalloc((size_t)file_size);
- VERIFY(file_image_ptr != NULL, "HDmalloc(2f) failed.");
+ file_image_ptr = malloc((size_t)file_size);
+ VERIFY(file_image_ptr != NULL, "malloc(2f) failed.");
size_remaining = image_size;
insertion_ptr = file_image_ptr;
@@ -893,8 +893,8 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
VERIFY(file_size == image_size, "file size != image size.");
/* allocate a buffer for the test file image */
- file_image_ptr = HDmalloc((size_t)file_size);
- VERIFY(file_image_ptr != NULL, "HDmalloc(2) failed.");
+ file_image_ptr = malloc((size_t)file_size);
+ VERIFY(file_image_ptr != NULL, "malloc(2) failed.");
/* open the test file using standard I/O calls */
fd = HDopen(file_name, O_RDONLY);
@@ -958,11 +958,11 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
/* discard the image buffer if it exists */
if (image_ptr != NULL)
- HDfree(image_ptr);
+ free(image_ptr);
/* discard the image buffer if it exists */
if (file_image_ptr != NULL)
- HDfree(file_image_ptr);
+ free(file_image_ptr);
PASSED();
@@ -1061,8 +1061,8 @@ test_get_file_image_error_rejection(void)
VERIFY(image_size > 0, "H5Fget_file_image(1 -- test 1) failed.");
/* allocate a buffer of the appropriate size */
- image_ptr = HDmalloc((size_t)image_size);
- VERIFY(image_ptr != NULL, "HDmalloc(1) failed.");
+ image_ptr = malloc((size_t)image_size);
+ VERIFY(image_ptr != NULL, "malloc(1) failed.");
/* load the image of the file into the buffer */
H5E_BEGIN_TRY
@@ -1107,7 +1107,7 @@ test_get_file_image_error_rejection(void)
/* discard the image buffer if it exists */
if (image_ptr != NULL)
- HDfree(image_ptr);
+ free(image_ptr);
/************************** Test #2 **********************************/
/* set up a multi file driver test file, and try to get its image
@@ -1349,7 +1349,7 @@ main(void)
h5_reset();
- HDprintf("Testing File Image Functionality.\n");
+ printf("Testing File Image Functionality.\n");
errors += test_properties();
errors += test_callbacks();
@@ -1412,10 +1412,10 @@ main(void)
h5_restore_err();
if (errors) {
- HDprintf("***** %d File Image TEST%s FAILED! *****\n", errors, errors > 1 ? "S" : "");
+ printf("***** %d File Image TEST%s FAILED! *****\n", errors, errors > 1 ? "S" : "");
return 1;
}
- HDprintf("All File Image tests passed.\n");
+ printf("All File Image tests passed.\n");
return 0;
}
diff --git a/test/filenotclosed.c b/test/filenotclosed.c
index 7f4d5d7..a2b0bdb 100644
--- a/test/filenotclosed.c
+++ b/test/filenotclosed.c
@@ -34,7 +34,7 @@
static void
catch_signal(int H5_ATTR_UNUSED signo)
{
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* catch_signal() */
/*-------------------------------------------------------------------------
@@ -80,7 +80,7 @@ main(void)
if (!contig_addr_vfd) {
SKIPPED();
HDputs(" Temporary skipped for a spilt/multi driver");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
h5_reset();
@@ -136,9 +136,9 @@ main(void)
/* The file is not closed. */
/* The library will call H5_term_library to shut down the library. */
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
HDputs("*** TEST FAILED ***");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
diff --git a/test/fillval.c b/test/fillval.c
index 489aa76..8254ba3 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -323,7 +323,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR;
/* Release the fill value retrieved */
- HDfree(f2);
+ free(f2);
/* Open file. */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -365,7 +365,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR;
/* Release the fill value retrieved */
- HDfree(f2);
+ free(f2);
/* Close IDs */
if (H5Dclose(datasetid) < 0)
@@ -610,8 +610,8 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (rd_s != fill_s) {
H5_FAILED();
- HDprintf(" %d: Got a different fill value than what was set.", __LINE__);
- HDprintf(" Got %d, set %d\n", rd_s, fill_s);
+ printf(" %d: Got a different fill value than what was set.", __LINE__);
+ printf(" Got %d, set %d\n", rd_s, fill_s);
goto error;
}
#endif
@@ -630,8 +630,8 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (rd_l != fill_l) {
H5_FAILED();
- HDprintf(" %d: Got a different fill value than what was set.", __LINE__);
- HDprintf(" Got %ld, set %ld\n", rd_l, fill_l);
+ printf(" %d: Got a different fill value than what was set.", __LINE__);
+ printf(" Got %ld, set %ld\n", rd_l, fill_l);
goto error;
}
#endif
@@ -650,8 +650,8 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (rd_l != fill_l) {
H5_FAILED();
- HDprintf(" %d: Got a different fill value than what was set.", __LINE__);
- HDprintf(" Got %ld, set %ld\n", rd_l, fill_l);
+ printf(" %d: Got a different fill value than what was set.", __LINE__);
+ printf(" Got %ld, set %ld\n", rd_l, fill_l);
goto error;
}
#endif
@@ -662,12 +662,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
- HDprintf(" Got %d\n", alloc_time);
+ printf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
- HDprintf(" Got %d\n", fill_time);
+ printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset3) < 0)
goto error;
@@ -682,7 +682,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) {
H5_FAILED();
HDputs(" Got allocated space instead of unallocated.");
- HDprintf(" Got %d\n", allocation);
+ printf(" Got %d\n", allocation);
goto error;
}
if ((dcpl = H5Dget_create_plist(dset4)) < 0)
@@ -694,12 +694,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
- HDprintf(" Got %d\n", alloc_time);
+ printf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
- HDprintf(" Got %d\n", fill_time);
+ printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset4) < 0)
goto error;
@@ -717,8 +717,8 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
rd_c.z != '\0') {
H5_FAILED();
HDputs(" Got wrong fill value");
- HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y,
- rd_c.x, rd_c.z);
+ printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
+ rd_c.z);
}
if (H5Dclose(dset9) < 0)
goto error;
@@ -737,8 +737,8 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_ALLOCATED) {
H5_FAILED();
- HDprintf(" %d: Got unallocated space instead of allocated.\n", __LINE__);
- HDprintf(" Got %d\n", allocation);
+ printf(" %d: Got unallocated space instead of allocated.\n", __LINE__);
+ printf(" Got %d\n", allocation);
goto error;
}
if (H5Pget_alloc_time(dcpl, &alloc_time) < 0)
@@ -746,14 +746,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
- HDprintf(" Got %d\n", alloc_time);
+ printf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
- HDprintf(" Got %d\n", fill_time);
+ printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset5) < 0)
goto error;
@@ -769,16 +769,16 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_ALLOCATED) {
H5_FAILED();
- HDprintf(" %d: Got unallocated space instead of allocated.\n", __LINE__);
- HDprintf(" Got %d\n", allocation);
+ printf(" %d: Got unallocated space instead of allocated.\n", __LINE__);
+ printf(" Got %d\n", allocation);
goto error;
}
if (H5Pget_fill_value(dcpl, H5T_NATIVE_LONG, &rd_l) < 0)
goto error;
if (rd_l != fill_l) {
H5_FAILED();
- HDprintf(" %d: Got a different fill value than what was set.", __LINE__);
- HDprintf(" Got %ld, set %ld\n", rd_l, fill_l);
+ printf(" %d: Got a different fill value than what was set.", __LINE__);
+ printf(" Got %ld, set %ld\n", rd_l, fill_l);
goto error;
}
if (H5Pget_alloc_time(dcpl, &alloc_time) < 0)
@@ -786,14 +786,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
- HDprintf(" Got %d\n", alloc_time);
+ printf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
- HDprintf(" Got %d\n", fill_time);
+ printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset6) < 0)
goto error;
@@ -811,8 +811,8 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
rd_c.z != '\0') {
H5_FAILED();
HDputs(" Got wrong fill value");
- HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
- rd_c.z);
+ printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
+ rd_c.z);
}
if (H5Dclose(dset8) < 0)
goto error;
@@ -920,13 +920,13 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
goto error;
if (fill_time != H5D_FILL_TIME_NEVER && val_rd != fillval) {
H5_FAILED();
- HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
- HDfprintf(stdout,
- " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE
- "}, read: %u, "
- "Fill value: %u\n",
- hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], val_rd,
- fillval);
+ fprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
+ fprintf(stdout,
+ " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE
+ "}, read: %u, "
+ "Fill value: %u\n",
+ hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], val_rd,
+ fillval);
goto error;
}
/* case for compound datatype */
@@ -938,14 +938,13 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
(!H5_FLT_ABS_EQUAL(rd_c.a, fill_c.a) || rd_c.x != fill_c.x ||
!H5_DBL_ABS_EQUAL(rd_c.y, fill_c.y) || rd_c.z != fill_c.z)) {
H5_FAILED();
- HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
- HDfprintf(stdout,
- " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE
- "}, read: %f, %d, %f, %c"
- "Fill value: %f, %d, %f, %c\n",
- hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4],
- (double)rd_c.a, rd_c.x, rd_c.y, rd_c.z, (double)fill_c.a, fill_c.x, fill_c.y,
- fill_c.z);
+ fprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
+ fprintf(stdout,
+ " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE
+ "}, read: %f, %d, %f, %c"
+ "Fill value: %f, %d, %f, %c\n",
+ hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], (double)rd_c.a,
+ rd_c.x, rd_c.y, rd_c.z, (double)fill_c.a, fill_c.x, fill_c.y, fill_c.z);
goto error;
}
}
@@ -970,8 +969,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
/* case for atomic datatype */
if (datatype == H5T_INTEGER) {
/*check for overflow*/
- HDassert((nelmts * sizeof(int)) == (hsize_t)((size_t)(nelmts * sizeof(int))));
- buf = (int *)HDmalloc((size_t)(nelmts * sizeof(int)));
+ assert((nelmts * sizeof(int)) == (hsize_t)((size_t)(nelmts * sizeof(int))));
+ buf = (int *)malloc((size_t)(nelmts * sizeof(int)));
if (H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, buf) < 0)
goto error;
@@ -981,13 +980,13 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
for (u = 0; u < nelmts; u++) {
if (buf[u] != fillval) {
H5_FAILED();
- HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
- HDfprintf(stdout,
- " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- ", %" PRIuHSIZE "}, read: %u, "
- "Fill value: %u\n",
- hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], buf[u],
- fillval);
+ fprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
+ fprintf(stdout,
+ " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ ", %" PRIuHSIZE "}, read: %u, "
+ "Fill value: %u\n",
+ hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], buf[u],
+ fillval);
goto error;
} /* end if */
} /* end for */
@@ -996,8 +995,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
/* case for compound datatype */
else if (datatype == H5T_COMPOUND) {
/*check for overflow*/
- HDassert((nelmts * sizeof(comp_datatype)) == (hsize_t)((size_t)(nelmts * sizeof(comp_datatype))));
- buf_c = (comp_datatype *)HDmalloc((size_t)nelmts * sizeof(comp_datatype));
+ assert((nelmts * sizeof(comp_datatype)) == (hsize_t)((size_t)(nelmts * sizeof(comp_datatype))));
+ buf_c = (comp_datatype *)malloc((size_t)nelmts * sizeof(comp_datatype));
if (H5Dread(dset2, ctype_id, mspace, fspace, H5P_DEFAULT, buf_c) < 0)
goto error;
@@ -1008,14 +1007,14 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
if (!H5_FLT_ABS_EQUAL(buf_c[u].a, fill_c.a) || buf_c[u].x != fill_c.x ||
!H5_DBL_ABS_EQUAL(buf_c[u].y, fill_c.y) || buf_c[u].z != fill_c.z) {
H5_FAILED();
- HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
- HDfprintf(stdout,
- " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- ", %" PRIuHSIZE "}, read: %f, %d, %f, %c"
- "Fill value: %f, %d, %f, %c\n",
- hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4],
- (double)buf_c[u].a, buf_c[u].x, buf_c[u].y, buf_c[u].z, (double)fill_c.a,
- fill_c.x, fill_c.y, fill_c.z);
+ fprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
+ fprintf(stdout,
+ " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ ", %" PRIuHSIZE "}, read: %f, %d, %f, %c"
+ "Fill value: %f, %d, %f, %c\n",
+ hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4],
+ (double)buf_c[u].a, buf_c[u].x, buf_c[u].y, buf_c[u].z, (double)fill_c.a,
+ fill_c.x, fill_c.y, fill_c.z);
goto error;
} /* end if */
} /* end for */
@@ -1033,7 +1032,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
}
/* case for compound datatype */
else if (datatype == H5T_COMPOUND) {
- HDmemset(buf_c, 0, ((size_t)nelmts * sizeof(comp_datatype)));
+ memset(buf_c, 0, ((size_t)nelmts * sizeof(comp_datatype)));
for (u = 0; u < nelmts; u++) {
buf_c[u].a = 1111.11F;
buf_c[u].x = 2222;
@@ -1051,11 +1050,11 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
goto error;
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_ALLOCATED) {
H5_FAILED();
- HDprintf(" %d: Got unallocated space instead of allocated.\n", __LINE__);
- HDprintf(" Got %d\n", allocation);
+ printf(" %d: Got unallocated space instead of allocated.\n", __LINE__);
+ printf(" Got %d\n", allocation);
goto error;
}
- HDfree(buf);
+ free(buf);
buf = NULL;
H5Sclose(mspace);
@@ -1078,11 +1077,11 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
should_be = odd ? fillval : 9999;
if (val_rd != should_be) {
H5_FAILED();
- HDfprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__);
- HDprintf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, "
- "should be: %u\n",
- (long)hs_offset[0], (long)hs_offset[1], (long)hs_offset[2], (long)hs_offset[3],
- (long)hs_offset[4], val_rd, should_be);
+ fprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__);
+ printf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, "
+ "should be: %u\n",
+ (long)hs_offset[0], (long)hs_offset[1], (long)hs_offset[2], (long)hs_offset[3],
+ (long)hs_offset[4], val_rd, should_be);
goto error;
}
}
@@ -1090,11 +1089,11 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
should_be = 9999;
if (val_rd != should_be) {
H5_FAILED();
- HDfprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__);
- HDprintf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, "
- "should be: %u\n",
- (long)hs_offset[0], (long)hs_offset[1], (long)hs_offset[2], (long)hs_offset[3],
- (long)hs_offset[4], val_rd, should_be);
+ fprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__);
+ printf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, "
+ "should be: %u\n",
+ (long)hs_offset[0], (long)hs_offset[1], (long)hs_offset[2], (long)hs_offset[3],
+ (long)hs_offset[4], val_rd, should_be);
goto error;
}
}
@@ -1122,12 +1121,12 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
if (!H5_FLT_ABS_EQUAL(rd_c.a, should_be_c.a) || rd_c.x != should_be_c.x ||
!H5_DBL_ABS_EQUAL(rd_c.y, should_be_c.y) || rd_c.z != should_be_c.z) {
H5_FAILED();
- HDfprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__);
- HDprintf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %f,%d,%f,%c "
- "should be: %f,%d,%f,%c\n",
- (long)hs_offset[0], (long)hs_offset[1], (long)hs_offset[2], (long)hs_offset[3],
- (long)hs_offset[4], (double)rd_c.a, rd_c.x, rd_c.y, rd_c.z,
- (double)should_be_c.a, should_be_c.x, should_be_c.y, should_be_c.z);
+ fprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__);
+ printf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %f,%d,%f,%c "
+ "should be: %f,%d,%f,%c\n",
+ (long)hs_offset[0], (long)hs_offset[1], (long)hs_offset[2], (long)hs_offset[3],
+ (long)hs_offset[4], (double)rd_c.a, rd_c.x, rd_c.y, rd_c.z, (double)should_be_c.a,
+ should_be_c.x, should_be_c.y, should_be_c.z);
goto error;
}
} /* end for fill_time == H5D_FILL_TIME_ALLOC */
@@ -1139,12 +1138,12 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
if (!H5_FLT_ABS_EQUAL(rd_c.a, should_be_c.a) || rd_c.x != should_be_c.x ||
!H5_DBL_ABS_EQUAL(rd_c.y, should_be_c.y) || rd_c.z != should_be_c.z) {
H5_FAILED();
- HDfprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__);
- HDprintf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %f,%d,%f,%c "
- "should be: %f,%d,%f,%c\n",
- (long)hs_offset[0], (long)hs_offset[1], (long)hs_offset[2], (long)hs_offset[3],
- (long)hs_offset[4], (double)rd_c.a, rd_c.x, rd_c.y, rd_c.z,
- (double)should_be_c.a, should_be_c.x, should_be_c.y, should_be_c.z);
+ fprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__);
+ printf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %f,%d,%f,%c "
+ "should be: %f,%d,%f,%c\n",
+ (long)hs_offset[0], (long)hs_offset[1], (long)hs_offset[2], (long)hs_offset[3],
+ (long)hs_offset[4], (double)rd_c.a, rd_c.x, rd_c.y, rd_c.z, (double)should_be_c.a,
+ should_be_c.x, should_be_c.y, should_be_c.z);
goto error;
}
} /* end for fill_time == H5D_FILL_TIME_NEVER */
@@ -1154,7 +1153,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
} /* end for datatype==H5T_COMPOUND */
}
if (datatype == H5T_COMPOUND) {
- HDfree(buf_c);
+ free(buf_c);
buf_c = NULL;
} /* end if */
@@ -1286,7 +1285,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
* as compound type */
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
goto error;
- HDmemset(&fill_ctype, 0, sizeof(fill_ctype));
+ memset(&fill_ctype, 0, sizeof(fill_ctype));
fill_ctype.y = 4444.4444;
if (H5Pset_fill_value(dcpl, ctype_id, &fill_ctype) < 0)
goto error;
@@ -1352,7 +1351,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
* as compound type */
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
goto error;
- HDmemset(&fill_ctype, 0, sizeof(fill_ctype));
+ memset(&fill_ctype, 0, sizeof(fill_ctype));
fill_ctype.y = 4444.4444;
if (H5Pset_fill_value(dcpl, ctype_id, &fill_ctype) < 0)
goto error;
@@ -1430,12 +1429,12 @@ test_extend_verify_integer(unsigned lineno, const hsize_t *offset, const void *_
/* Verify value */
if (*test_val != *compare_val) {
- HDfprintf(stdout, "%u: Value read was not expected.\n", lineno);
- HDfprintf(stdout,
- " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- "}, read: %d, "
- "expected: %d\n",
- offset[0], offset[1], offset[2], offset[3], offset[4], *test_val, *compare_val);
+ fprintf(stdout, "%u: Value read was not expected.\n", lineno);
+ fprintf(stdout,
+ " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ "}, read: %d, "
+ "expected: %d\n",
+ offset[0], offset[1], offset[2], offset[3], offset[4], *test_val, *compare_val);
goto error;
} /* end if */
@@ -1522,13 +1521,13 @@ test_extend_verify_cmpd_vl(unsigned lineno, const hsize_t *offset, const void *_
/* Verify value */
if ((test_val->x != compare_val->x) || HDstrcmp(test_val->a, compare_val->a) != 0 ||
HDstrcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) {
- HDfprintf(stdout, "%u: Value read was not expected.\n", lineno);
- HDfprintf(stdout,
- " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- "}, read: {%d, '%s', '%s', %d} "
- "expected: {%d, '%s', '%s', %d}\n",
- offset[0], offset[1], offset[2], offset[3], offset[4], test_val->x, test_val->a,
- test_val->b, test_val->y, compare_val->x, compare_val->a, compare_val->b, compare_val->y);
+ fprintf(stdout, "%u: Value read was not expected.\n", lineno);
+ fprintf(stdout,
+ " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ "}, read: {%d, '%s', '%s', %d} "
+ "expected: {%d, '%s', '%s', %d}\n",
+ offset[0], offset[1], offset[2], offset[3], offset[4], test_val->x, test_val->a, test_val->b,
+ test_val->y, compare_val->x, compare_val->a, compare_val->b, compare_val->y);
goto error;
} /* end if */
@@ -1557,8 +1556,8 @@ test_extend_release_cmpd_vl(void *_elmt)
comp_vl_datatype *elmt = (comp_vl_datatype *)_elmt; /* Element to free */
/* Free memory for string fields */
- HDfree(elmt->a);
- HDfree(elmt->b);
+ free(elmt->a);
+ free(elmt->b);
return 0;
} /* end test_extend_release_integer() */
@@ -1640,7 +1639,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
} /* end if */
else {
/* Sanity check */
- HDassert(dtype_class == H5T_COMPOUND);
+ assert(dtype_class == H5T_COMPOUND);
/* Initialize specific values for this datatype */
val_size = sizeof(comp_vl_datatype);
@@ -1678,7 +1677,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
TEST_ERROR;
/* Clear the read buffer */
- HDmemset(val_rd, 0, val_size);
+ memset(val_rd, 0, val_size);
} /* end for */
if (H5Sclose(mspace) < 0)
TEST_ERROR;
@@ -1692,10 +1691,10 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
} /* end for */
/* Check for overflow */
- HDassert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size)));
+ assert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size)));
/* Allocate & initialize buffer */
- buf = HDmalloc((size_t)(nelmts * val_size));
+ buf = malloc((size_t)(nelmts * val_size));
init_rtn(buf, nelmts, init_val);
/* Create dataspace describing memory buffer */
@@ -1742,7 +1741,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
TEST_ERROR;
/* Clear the read buffer */
- HDmemset(val_rd, 0, val_size);
+ memset(val_rd, 0, val_size);
} /* end for */
if (H5Sclose(mspace) < 0)
TEST_ERROR;
@@ -1790,7 +1789,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
TEST_ERROR;
/* Clear the read buffer */
- HDmemset(val_rd, 0, val_size);
+ memset(val_rd, 0, val_size);
} /* end for */
if (H5Sclose(mspace) < 0)
TEST_ERROR;
@@ -1836,7 +1835,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
TEST_ERROR;
/* Clear the read buffer */
- HDmemset(val_rd, 0, val_size);
+ memset(val_rd, 0, val_size);
} /* end for */
if (H5Sclose(mspace) < 0)
TEST_ERROR;
@@ -1884,7 +1883,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
TEST_ERROR;
/* Clear the read buffer */
- HDmemset(val_rd, 0, val_size);
+ memset(val_rd, 0, val_size);
} /* end for */
if (H5Sclose(mspace) < 0)
TEST_ERROR;
@@ -1939,7 +1938,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
TEST_ERROR;
/* Clear the read buffer */
- HDmemset(val_rd, 0, val_size);
+ memset(val_rd, 0, val_size);
/* Set location for another element initialized by H5Dset_extent() */
hs_offset[3] -= 1;
@@ -1961,7 +1960,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
TEST_ERROR;
/* Clear the read buffer */
- HDmemset(val_rd, 0, val_size);
+ memset(val_rd, 0, val_size);
/* Read some data and make sure it's the right value */
for (i = 0; i < 1000; i++) {
@@ -1992,7 +1991,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
TEST_ERROR;
/* Clear the read buffer */
- HDmemset(val_rd, 0, val_size);
+ memset(val_rd, 0, val_size);
} /* end for */
if (H5Sclose(mspace) < 0)
TEST_ERROR;
@@ -2001,9 +2000,9 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
for (i = 0; i < nelmts; i++)
release_rtn((void *)((char *)buf + (val_size * i)));
- HDfree(init_val_c.a);
- HDfree(init_val_c.b);
- HDfree(buf);
+ free(init_val_c.a);
+ free(init_val_c.b);
+ free(buf);
/* Cleanup IDs */
if (H5Pclose(dcpl) < 0)
@@ -2016,9 +2015,9 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
return 0;
error:
- HDfree(init_val_c.a);
- HDfree(init_val_c.b);
- HDfree(buf);
+ free(init_val_c.a);
+ free(init_val_c.b);
+ free(buf);
H5E_BEGIN_TRY
{
@@ -2160,16 +2159,16 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (H5Fclose(file) < 0)
TEST_ERROR;
- HDfree(fillval_c.a);
- HDfree(fillval_c.b);
+ free(fillval_c.a);
+ free(fillval_c.b);
PASSED();
return 0;
error:
- HDfree(fillval_c.a);
- HDfree(fillval_c.b);
+ free(fillval_c.a);
+ free(fillval_c.b);
H5E_BEGIN_TRY
{
@@ -2181,8 +2180,8 @@ error:
return 1;
skip:
- HDfree(fillval_c.a);
- HDfree(fillval_c.b);
+ free(fillval_c.a);
+ free(fillval_c.b);
H5E_BEGIN_TRY
{
@@ -2222,9 +2221,9 @@ test_compatible(void)
TESTING("contiguous dataset compatibility with v. 1.4");
if ((file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
- HDprintf(" Could not open file %s. Try set $srcdir to point at the "
- "source directory of test\n",
- testfile);
+ printf(" Could not open file %s. Try set $srcdir to point at the "
+ "source directory of test\n",
+ testfile);
goto error;
}
@@ -2236,8 +2235,8 @@ test_compatible(void)
goto error;
if (status != H5D_FILL_VALUE_UNDEFINED) {
H5_FAILED();
- HDprintf(" %d: Got a different fill value than what was set.", __LINE__);
- HDprintf(" Got status=%ld, suppose to be H5D_FILL_VALUE_UNDEFINED\n", (long)status);
+ printf(" %d: Got a different fill value than what was set.", __LINE__);
+ printf(" Got status=%ld, suppose to be H5D_FILL_VALUE_UNDEFINED\n", (long)status);
goto error;
}
if ((fspace = H5Dget_space(dset1)) < 0)
@@ -2247,7 +2246,7 @@ test_compatible(void)
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
HDputs(" Got a different dimension size than what was set.");
- HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
+ printf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
if ((mspace = H5Screate_simple(2, one, NULL)) < 0)
@@ -2259,7 +2258,7 @@ test_compatible(void)
if (val_rd != 0) {
H5_FAILED();
HDputs(" Got a different value than what was set.");
- HDprintf(" Got %ld, set 0\n", (long)val_rd);
+ printf(" Got %ld, set 0\n", (long)val_rd);
goto error;
}
if (H5Pclose(dcpl1) < 0)
@@ -2279,16 +2278,16 @@ test_compatible(void)
goto error;
if (status != H5D_FILL_VALUE_USER_DEFINED) {
H5_FAILED();
- HDprintf(" %d: Got a different fill value than what was set.", __LINE__);
- HDprintf(" Got status=%ld, suppose to be H5D_FILL_VALUE_USER_DEFINED\n", (long)status);
+ printf(" %d: Got a different fill value than what was set.", __LINE__);
+ printf(" Got status=%ld, suppose to be H5D_FILL_VALUE_USER_DEFINED\n", (long)status);
goto error;
}
if (H5Pget_fill_value(dcpl2, H5T_NATIVE_INT, &rd_fill) < 0)
goto error;
if (rd_fill != fill_val) {
H5_FAILED();
- HDprintf(" %d: Got a different fill value than what was set.", __LINE__);
- HDprintf(" Got %ld, set %ld\n", (long)rd_fill, (long)fill_val);
+ printf(" %d: Got a different fill value than what was set.", __LINE__);
+ printf(" Got %ld, set %ld\n", (long)rd_fill, (long)fill_val);
goto error;
}
fspace = -1;
@@ -2300,7 +2299,7 @@ test_compatible(void)
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
HDputs(" Got a different dimension size than what was set.");
- HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
+ printf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
if ((mspace = H5Screate_simple(2, one, NULL)) < 0)
@@ -2312,7 +2311,7 @@ test_compatible(void)
if (val_rd != fill_val) {
H5_FAILED();
HDputs(" Got a different value than what was set.");
- HDprintf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val);
+ printf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val);
goto error;
}
if (H5Pclose(dcpl2) < 0)
@@ -2430,20 +2429,20 @@ test_partalloc_cases(hid_t file, hid_t dcpl, const char *dname, H5D_fill_time_t
if ((r_values[0] != w_values[0]) || (r_values[1] != fillval) || (r_values[2] != fillval) ||
(r_values[3] != fillval)) {
H5_FAILED();
- HDfprintf(stdout, "%u: Allocated chunk value read was not correct.\n", (unsigned)__LINE__);
- HDprintf(" {%ld,%ld,%ld,%ld} should be {%ld,%ld,%ld,%ld}\n", (long)r_values[0],
- (long)r_values[1], (long)r_values[2], (long)r_values[3], (long)w_values[0],
- (long)fillval, (long)fillval, (long)fillval);
+ fprintf(stdout, "%u: Allocated chunk value read was not correct.\n", (unsigned)__LINE__);
+ printf(" {%ld,%ld,%ld,%ld} should be {%ld,%ld,%ld,%ld}\n", (long)r_values[0],
+ (long)r_values[1], (long)r_values[2], (long)r_values[3], (long)w_values[0], (long)fillval,
+ (long)fillval, (long)fillval);
goto error;
}
/* check unallocated chunk */
if ((f_values[0] != fillval) || (f_values[1] != fillval) || (f_values[2] != fillval) ||
(f_values[3] != fillval)) {
H5_FAILED();
- HDfprintf(stdout, "%u: Unallocated chunk value read was not correct.\n", (unsigned)__LINE__);
- HDprintf(" {%ld,%ld,%ld,%ld} should be {%ld,%ld,%ld,%ld}\n", (long)f_values[0],
- (long)f_values[1], (long)f_values[2], (long)f_values[3], (long)fillval, (long)fillval,
- (long)fillval, (long)fillval);
+ fprintf(stdout, "%u: Unallocated chunk value read was not correct.\n", (unsigned)__LINE__);
+ printf(" {%ld,%ld,%ld,%ld} should be {%ld,%ld,%ld,%ld}\n", (long)f_values[0],
+ (long)f_values[1], (long)f_values[2], (long)f_values[3], (long)fillval, (long)fillval,
+ (long)fillval, (long)fillval);
goto error;
}
/* for the "never fill" case expect to get trash values, so skip */
@@ -2509,14 +2508,14 @@ test_partalloc(hid_t fapl, const char *base_name)
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, "\nALLOC_TIME_LATE\n");
+ fprintf(stdout, "\nALLOC_TIME_LATE\n");
#endif
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value to be default */
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, " FILL_TIME_ALLOC\n");
+ fprintf(stdout, " FILL_TIME_ALLOC\n");
#endif
nerrors += test_partalloc_cases(file, dcpl, "dset1", H5D_FILL_TIME_ALLOC);
@@ -2524,7 +2523,7 @@ test_partalloc(hid_t fapl, const char *base_name)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, " FILL_TIME_NEVER\n");
+ fprintf(stdout, " FILL_TIME_NEVER\n");
#endif
nerrors += test_partalloc_cases(file, dcpl, "dset2", H5D_FILL_TIME_NEVER);
@@ -2532,7 +2531,7 @@ test_partalloc(hid_t fapl, const char *base_name)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, " FILL_TIME_IFSET\n");
+ fprintf(stdout, " FILL_TIME_IFSET\n");
#endif
nerrors += test_partalloc_cases(file, dcpl, "dset3", H5D_FILL_TIME_IFSET);
@@ -2540,14 +2539,14 @@ test_partalloc(hid_t fapl, const char *base_name)
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, "\nALLOC_TIME_INCR\n");
+ fprintf(stdout, "\nALLOC_TIME_INCR\n");
#endif
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value to be default */
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, " FILL_TIME_ALLOC\n");
+ fprintf(stdout, " FILL_TIME_ALLOC\n");
#endif
nerrors += test_partalloc_cases(file, dcpl, "dset4", H5D_FILL_TIME_ALLOC);
@@ -2555,7 +2554,7 @@ test_partalloc(hid_t fapl, const char *base_name)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, " FILL_TIME_NEVER\n");
+ fprintf(stdout, " FILL_TIME_NEVER\n");
#endif
nerrors += test_partalloc_cases(file, dcpl, "dset5", H5D_FILL_TIME_NEVER);
@@ -2563,7 +2562,7 @@ test_partalloc(hid_t fapl, const char *base_name)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, " FILL_TIME_IFSET\n");
+ fprintf(stdout, " FILL_TIME_IFSET\n");
#endif
nerrors += test_partalloc_cases(file, dcpl, "dset6", H5D_FILL_TIME_IFSET);
@@ -2571,14 +2570,14 @@ test_partalloc(hid_t fapl, const char *base_name)
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, "\nALLOC_TIME_EARLY\n");
+ fprintf(stdout, "\nALLOC_TIME_EARLY\n");
#endif
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value to be default */
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, " FILL_TIME_ALLOC\n");
+ fprintf(stdout, " FILL_TIME_ALLOC\n");
#endif
nerrors += test_partalloc_cases(file, dcpl, "dset7", H5D_FILL_TIME_ALLOC);
@@ -2586,7 +2585,7 @@ test_partalloc(hid_t fapl, const char *base_name)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, " FILL_TIME_NEVER\n");
+ fprintf(stdout, " FILL_TIME_NEVER\n");
#endif
nerrors += test_partalloc_cases(file, dcpl, "dset8", H5D_FILL_TIME_NEVER);
@@ -2594,7 +2593,7 @@ test_partalloc(hid_t fapl, const char *base_name)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0)
goto error;
#ifdef DEBUG
- HDfprintf(stdout, " FILL_TIME_IFSET\n");
+ fprintf(stdout, " FILL_TIME_IFSET\n");
#endif
nerrors += test_partalloc_cases(file, dcpl, "dset9", H5D_FILL_TIME_IFSET);
@@ -2649,8 +2648,8 @@ main(int argc, char *argv[])
else if (!HDstrcmp(argv[argno], "compact"))
test_compact = 1;
else {
- HDfprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
+ exit(EXIT_FAILURE);
}
} /* end for */
} /* end if */
@@ -2726,9 +2725,9 @@ main(int argc, char *argv[])
if (h5_cleanup(FILENAME, fapl))
HDremove(FILE_NAME_RAW);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
HDputs("***** FILL VALUE TESTS FAILED *****");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
diff --git a/test/filter_fail.c b/test/filter_fail.c
index 172027c..e5d3144 100644
--- a/test/filter_fail.c
+++ b/test/filter_fail.c
@@ -269,7 +269,7 @@ test_filter_read(char *file_name, hid_t my_fapl)
TEST_ERROR;
/* Read the chunks */
- HDmemset(rbuf, 0, DIM * sizeof(int));
+ memset(rbuf, 0, DIM * sizeof(int));
if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
@@ -278,16 +278,16 @@ test_filter_read(char *file_name, hid_t my_fapl)
for (i = 0; i < DIM; i++) {
if (i < DIM - 2 && rbuf[i] != i) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
- HDprintf(" rbuf[%d]=%d\n", i, rbuf[i]);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
+ printf(" rbuf[%d]=%d\n", i, rbuf[i]);
TEST_ERROR;
}
else if (i >= DIM - 2 && rbuf[i] != 0) {
H5_FAILED();
- HDprintf(" No value should be read.\n");
- HDprintf(" At index %d\n", i);
- HDprintf(" rbuf[%d]=%d\n", i, rbuf[i]);
+ printf(" No value should be read.\n");
+ printf(" At index %d\n", i);
+ printf(" rbuf[%d]=%d\n", i, rbuf[i]);
TEST_ERROR;
}
}
@@ -296,8 +296,8 @@ test_filter_read(char *file_name, hid_t my_fapl)
if ((sid = H5Dget_space(dataset)) < 0)
TEST_ERROR;
- HDmemset(hs_offset, 0, sizeof(hs_offset));
- HDmemset(hs_size, 0, sizeof(hs_size));
+ memset(hs_offset, 0, sizeof(hs_offset));
+ memset(hs_size, 0, sizeof(hs_size));
hs_size[0] = DIM / 2;
if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, stride, hs_size, NULL) < 0)
@@ -307,12 +307,12 @@ test_filter_read(char *file_name, hid_t my_fapl)
if ((mspace = H5Screate_simple(1, dims, NULL)) < 0)
TEST_ERROR;
- HDmemset(zero, 0, sizeof zero);
+ memset(zero, 0, sizeof zero);
if (H5Sselect_hyperslab(mspace, H5S_SELECT_SET, zero, stride, &nelmts, NULL) < 0)
TEST_ERROR;
- HDmemset(rbuf, 0, DIM * sizeof(int));
+ memset(rbuf, 0, DIM * sizeof(int));
if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
@@ -321,16 +321,16 @@ test_filter_read(char *file_name, hid_t my_fapl)
for (i = 0; i < DIM; i += 2) {
if (i < DIM - 2 && rbuf[i] != i) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
- HDprintf(" rbuf[%d]=%d\n", i, rbuf[i]);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
+ printf(" rbuf[%d]=%d\n", i, rbuf[i]);
TEST_ERROR;
}
else if (i >= DIM - 2 && rbuf[i] != 0) {
H5_FAILED();
- HDprintf(" No value should be read.\n");
- HDprintf(" At index %d\n", i);
- HDprintf(" rbuf[%d]=%d\n", i, rbuf[i]);
+ printf(" No value should be read.\n");
+ printf(" At index %d\n", i);
+ printf(" rbuf[%d]=%d\n", i, rbuf[i]);
TEST_ERROR;
}
}
@@ -416,11 +416,11 @@ main(void)
if (nerrors)
TEST_ERROR;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
if (nerrors) {
- HDprintf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
}
} /* end main() */
diff --git a/test/filter_plugin.c b/test/filter_plugin.c
index 96e114a..3bedc57 100644
--- a/test/filter_plugin.c
+++ b/test/filter_plugin.c
@@ -84,9 +84,9 @@ free_2D_array(int ***arr)
{
if (arr && *arr && (*arr)[0])
- HDfree((*arr)[0]);
+ free((*arr)[0]);
if (arr && *arr)
- HDfree(*arr);
+ free(*arr);
*arr = NULL;
return SUCCEED;
@@ -114,9 +114,9 @@ allocate_and_init_2D_array(int ***arr, const hsize_t *sizes, int **initial_value
c = (size_t)sizes[1];
/* Allocate and set up pseudo-2D array */
- if (NULL == (*arr = (int **)HDcalloc(r, sizeof(int *))))
+ if (NULL == (*arr = (int **)calloc(r, sizeof(int *))))
TEST_ERROR;
- if (NULL == ((*arr)[0] = (int *)HDcalloc(r * c, sizeof(int))))
+ if (NULL == ((*arr)[0] = (int *)calloc(r * c, sizeof(int))))
TEST_ERROR;
for (i = 0; i < r; i++)
(*arr)[i] = (**arr + c * i);
@@ -124,7 +124,7 @@ allocate_and_init_2D_array(int ***arr, const hsize_t *sizes, int **initial_value
/* Copy over the data elements */
if (initial_values) {
n_bytes = r * c * sizeof(int);
- HDmemcpy((*arr)[0], initial_values[0], n_bytes);
+ memcpy((*arr)[0], initial_values[0], n_bytes);
}
return SUCCEED;
@@ -212,7 +212,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
*/
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
- if (NULL == (tconv_buf = HDcalloc((size_t)1000, sizeof(char))))
+ if (NULL == (tconv_buf = calloc((size_t)1000, sizeof(char))))
TEST_ERROR;
if (H5Pset_buffer(dxpl_id, (size_t)1000, tconv_buf, NULL) < 0)
TEST_ERROR;
@@ -400,7 +400,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
free_2D_array(&orig);
free_2D_array(&read);
- HDfree(tconv_buf);
+ free(tconv_buf);
return SUCCEED;
@@ -420,7 +420,7 @@ error:
free_2D_array(&read);
if (tconv_buf)
- HDfree(tconv_buf);
+ free(tconv_buf);
return FAIL;
} /* end ensure_filter_works() */
@@ -984,7 +984,7 @@ test_path_api_calls(void)
/* Remove all existing paths */
for (u = n_paths; u > 0; u--)
if (H5PLremove(u - 1) < 0) {
- HDfprintf(stderr, " at %u: %s\n", u, path);
+ fprintf(stderr, " at %u: %s\n", u, path);
TEST_ERROR;
}
@@ -1019,7 +1019,7 @@ test_path_api_calls(void)
for (u = 0; u < n_starting_paths; u++) {
HDsnprintf(path, sizeof(path), "a_path_%u", u);
if (H5PLappend(path) < 0) {
- HDfprintf(stderr, " at %u: %s\n", u, path);
+ fprintf(stderr, " at %u: %s\n", u, path);
TEST_ERROR;
}
}
@@ -1052,7 +1052,7 @@ test_path_api_calls(void)
/* Get the path length by passing in NULL */
if ((path_len = H5PLget(0, NULL, 0)) <= 0) {
- HDfprintf(stderr, " get path 0 length failed\n");
+ fprintf(stderr, " get path 0 length failed\n");
TEST_ERROR;
}
if (path_len != 8)
@@ -1060,11 +1060,11 @@ test_path_api_calls(void)
/* Get the path */
if ((path_len = H5PLget(0, path, 256)) <= 0) {
- HDfprintf(stderr, " get 0 len: %zd : %s\n", path_len, path);
+ fprintf(stderr, " get 0 len: %zd : %s\n", path_len, path);
TEST_ERROR;
}
if (HDstrcmp(path, "a_path_0") != 0) {
- HDfprintf(stderr, " get 0: %s\n", path);
+ fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1076,7 +1076,7 @@ test_path_api_calls(void)
if ((path_len = H5PLget(1, path, 256)) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_1") != 0) {
- HDfprintf(stderr, " get 1: %s\n", path);
+ fprintf(stderr, " get 1: %s\n", path);
TEST_ERROR;
}
@@ -1085,7 +1085,7 @@ test_path_api_calls(void)
TEST_ERROR;
HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths - 1);
if (HDstrcmp(path, temp_name) != 0) {
- HDfprintf(stderr, " get %u: %s\n", n_starting_paths - 1, path);
+ fprintf(stderr, " get %u: %s\n", n_starting_paths - 1, path);
TEST_ERROR;
}
@@ -1122,7 +1122,7 @@ test_path_api_calls(void)
if ((path_len = H5PLget(8, path, 256)) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_9") != 0) {
- HDfprintf(stderr, " get 8: %s\n", path);
+ fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1139,7 +1139,7 @@ test_path_api_calls(void)
/* Prepend one path */
HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 1);
if (H5PLprepend(path) < 0) {
- HDfprintf(stderr, " prepend %u: %s\n", n_starting_paths + 1, path);
+ fprintf(stderr, " prepend %u: %s\n", n_starting_paths + 1, path);
TEST_ERROR;
}
@@ -1153,7 +1153,7 @@ test_path_api_calls(void)
if (H5PLget(8, path, 256) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_7") != 0) {
- HDfprintf(stderr, " get 8: %s\n", path);
+ fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1162,7 +1162,7 @@ test_path_api_calls(void)
TEST_ERROR;
HDsnprintf(temp_name, sizeof(temp_name), "a_path_%d", n_starting_paths + 1);
if (HDstrcmp(path, temp_name) != 0) {
- HDfprintf(stderr, " get 0: %s\n", path);
+ fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1177,7 +1177,7 @@ test_path_api_calls(void)
/* Replace one path at index 1 */
HDsnprintf(path, sizeof(path), "a_path_%u", n_starting_paths + 4);
if (H5PLreplace(path, 1) < 0) {
- HDfprintf(stderr, " replace 1: %s\n", path);
+ fprintf(stderr, " replace 1: %s\n", path);
TEST_ERROR;
}
@@ -1196,7 +1196,7 @@ test_path_api_calls(void)
TEST_ERROR;
HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths + 1);
if (HDstrcmp(path, temp_name) != 0) {
- HDfprintf(stderr, " get 0: %s\n", path);
+ fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1204,7 +1204,7 @@ test_path_api_calls(void)
if (H5PLget(2, path, 256) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_1") != 0) {
- HDfprintf(stderr, " get 2: %s\n", path);
+ fprintf(stderr, " get 2: %s\n", path);
TEST_ERROR;
}
@@ -1228,7 +1228,7 @@ test_path_api_calls(void)
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_4") != 0) {
- HDfprintf(stderr, " get 4: %s\n", path);
+ fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1244,7 +1244,7 @@ test_path_api_calls(void)
/* Insert one path at index 3*/
HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 5);
if (H5PLinsert(path, 3) < 0) {
- HDfprintf(stderr, " insert 3: %s\n", path);
+ fprintf(stderr, " insert 3: %s\n", path);
TEST_ERROR;
}
@@ -1252,7 +1252,7 @@ test_path_api_calls(void)
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_2") != 0) {
- HDfprintf(stderr, " get 4: %s\n", path);
+ fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1278,7 +1278,7 @@ test_path_api_calls(void)
/* Remove all existing paths */
for (u = n_paths; u > 0; u--)
if (H5PLremove(u - 1) < 0) {
- HDfprintf(stderr, " at %u: %s\n", u, path);
+ fprintf(stderr, " at %u: %s\n", u, path);
TEST_ERROR;
}
@@ -1617,9 +1617,9 @@ main(void)
if (nerrors)
TEST_ERROR;
- HDprintf("All plugin tests passed.\n");
+ printf("All plugin tests passed.\n");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
H5E_BEGIN_TRY
@@ -1637,6 +1637,6 @@ error:
free_2D_array(&orig_dynlib4_g);
nerrors = MAX(1, nerrors);
- HDprintf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/flush1.c b/test/flush1.c
index f0f1093..92f39ca 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -138,7 +138,7 @@ add_dset_to_file(hid_t fid, const char *dset_name)
STACK_ERROR;
/* Write some data */
- if (NULL == (data = (int *)HDcalloc((size_t)NELEMENTS, sizeof(int))))
+ if (NULL == (data = (int *)calloc((size_t)NELEMENTS, sizeof(int))))
STACK_ERROR;
for (i = 0; i < NELEMENTS; i++)
data[i] = i;
@@ -152,7 +152,7 @@ add_dset_to_file(hid_t fid, const char *dset_name)
if (H5Dclose(did) < 0)
STACK_ERROR;
- HDfree(data);
+ free(data);
return SUCCEED;
@@ -165,7 +165,7 @@ error:
}
H5E_END_TRY;
- HDfree(data);
+ free(data);
return FAIL;
} /* end add_dset_to_file() */
@@ -312,18 +312,18 @@ main(void)
SKIPPED();
if (!vfd_supports_swmr)
- HDprintf("NOTE: Some tests were skipped since the current VFD lacks SWMR support\n");
+ printf("NOTE: Some tests were skipped since the current VFD lacks SWMR support\n");
/* Flush console output streams */
- HDfflush(stdout);
- HDfflush(stderr);
+ fflush(stdout);
+ fflush(stderr);
/* DO NOT CLOSE FILE ID! */
if (H5Pclose(fapl_id) < 0)
STACK_ERROR;
/* _exit() is necessary since we want a hard close of the library */
- HD_exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
error:
H5E_BEGIN_TRY
@@ -332,5 +332,5 @@ error:
}
H5E_END_TRY;
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/flush2.c b/test/flush2.c
index d5461d6..65662d5 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -77,7 +77,7 @@ dset_ok(hid_t fid, const char *dset_name)
goto error;
/* Read the data */
- if (NULL == (data = (int *)HDcalloc((size_t)NELEMENTS, sizeof(int))))
+ if (NULL == (data = (int *)calloc((size_t)NELEMENTS, sizeof(int))))
goto error;
if (H5Dread(did, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data) < 0)
goto error;
@@ -90,7 +90,7 @@ dset_ok(hid_t fid, const char *dset_name)
if (H5Dclose(did) < 0)
goto error;
- HDfree(data);
+ free(data);
return TRUE;
@@ -102,7 +102,7 @@ error:
}
H5E_END_TRY;
- HDfree(data);
+ free(data);
return FALSE;
} /* end dset_ok() */
@@ -255,13 +255,13 @@ main(void)
vfd_supports_swmr = H5FD__supports_swmr_test(driver);
if (h5_driver_is_default_vfd_compatible(fapl_id, &driver_is_default_vfd_compatible) < 0) {
- HDprintf("Can't check if VFD is compatible with default VFD\n");
- HDexit(EXIT_FAILURE);
+ printf("Can't check if VFD is compatible with default VFD\n");
+ exit(EXIT_FAILURE);
}
if (!driver_is_default_vfd_compatible) {
- HDprintf("Skipping SWMR tests for VFD incompatible with default VFD\n");
- HDexit(EXIT_SUCCESS);
+ printf("Skipping SWMR tests for VFD incompatible with default VFD\n");
+ exit(EXIT_SUCCESS);
}
/* TEST 1 */
@@ -433,12 +433,12 @@ main(void)
SKIPPED();
if (!vfd_supports_swmr)
- HDprintf("NOTE: Some tests were skipped since the current VFD lacks SWMR support\n");
+ printf("NOTE: Some tests were skipped since the current VFD lacks SWMR support\n");
h5_cleanup(FILENAME, fapl_id);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index 28d4638..9522414 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -70,9 +70,9 @@ FILE *errorfile;
#define ERRFILE "flushrefresh_ERROR"
#define PROCESS_ERROR \
{ \
- errorfile = HDfopen(ERRFILE, "w+"); \
- HDfprintf(errorfile, "Error occurred in flushrefresh.\n"); \
- HDfflush(errorfile); \
+ errorfile = fopen(ERRFILE, "w+"); \
+ fprintf(errorfile, "Error occurred in flushrefresh.\n"); \
+ fflush(errorfile); \
HDfclose(errorfile); \
TEST_ERROR; \
}
@@ -161,8 +161,7 @@ main(int argc, char *argv[])
TEST_ERROR;
} /* end if */
else {
- HDfprintf(stdout,
- "Skipping all flush/refresh tests (only run with SWMR-enabled file drivers).\n");
+ fprintf(stdout, "Skipping all flush/refresh tests (only run with SWMR-enabled file drivers).\n");
/* Test script is expecting some signals, so send them out to end it. */
if (end_verification() < 0)
@@ -183,7 +182,7 @@ main(int argc, char *argv[])
}
else {
/* Illegal number of arguments supplied. Error. */
- HDfprintf(stderr, "Error. %d is an Invalid number of arguments to main().\n", argc);
+ fprintf(stderr, "Error. %d is an Invalid number of arguments to main().\n", argc);
PROCESS_ERROR
} /* end if */
@@ -267,7 +266,7 @@ test_flush(void)
hsize_t dims[2] = {3, 5};
/* Testing Message */
- HDfprintf(stdout, "Testing individual object flush behavior:\n");
+ fprintf(stdout, "Testing individual object flush behavior:\n");
/* Cleanup any old error or signal files */
CLEANUP_FILES;
@@ -739,7 +738,7 @@ test_refresh(void)
int fillval = 2;
/* Testing Message */
- HDfprintf(stdout, "Testing individual object refresh behavior:\n");
+ fprintf(stdout, "Testing individual object refresh behavior:\n");
/* Cleanup any old error or signal files */
CLEANUP_FILES;
@@ -1089,20 +1088,19 @@ flush_verification(const char *obj_pathname, const char *expected)
/* Compare to expected result */
if (HDstrcmp(expected, FLUSHED) == 0) {
if ((oid < 0) || (status < 0)) {
- HDfprintf(stderr, "Error! %s should be on disk, but was NOT!\n", obj_pathname);
+ fprintf(stderr, "Error! %s should be on disk, but was NOT!\n", obj_pathname);
PROCESS_ERROR;
} /* end if */
}
else if (HDstrcmp(expected, NOT_FLUSHED) == 0) {
if ((oid > 0) || (status > 0)) {
- HDfprintf(stderr, "Error! %s not expected to be flushed, but it was found on disk!\n",
- obj_pathname);
+ fprintf(stderr, "Error! %s not expected to be flushed, but it was found on disk!\n",
+ obj_pathname);
PROCESS_ERROR;
} /* end if */
}
else {
- HDfprintf(stderr, "Error! Bad verification parameters. %s is an invalid expected outcome.\n",
- expected);
+ fprintf(stderr, "Error! Bad verification parameters. %s is an invalid expected outcome.\n", expected);
PROCESS_ERROR;
} /* end if */
@@ -1312,7 +1310,7 @@ refresh_verification(const char *obj_pathname)
PROCESS_ERROR;
} /* end if */
else {
- HDfprintf(stdout, "Error. %s is an unrecognized object.\n", obj_pathname);
+ fprintf(stdout, "Error. %s is an unrecognized object.\n", obj_pathname);
PROCESS_ERROR;
} /* end else */
@@ -1343,12 +1341,12 @@ refresh_verification(const char *obj_pathname)
} while (--tries);
if (!ok) {
- HDprintf("FLUSHED: num_attrs=%d, nmesgs=%d, nchunks=%d, total=%d\n", (int)flushed_oinfo.num_attrs,
- (int)flushed_ninfo.hdr.nmesgs, (int)flushed_ninfo.hdr.nchunks,
- (int)flushed_ninfo.hdr.space.total);
- HDprintf("REFRESHED: num_attrs=%d, nmesgs=%d, nchunks=%d, total=%d\n", (int)refreshed_oinfo.num_attrs,
- (int)refreshed_ninfo.hdr.nmesgs, (int)refreshed_ninfo.hdr.nchunks,
- (int)refreshed_ninfo.hdr.space.total);
+ printf("FLUSHED: num_attrs=%d, nmesgs=%d, nchunks=%d, total=%d\n", (int)flushed_oinfo.num_attrs,
+ (int)flushed_ninfo.hdr.nmesgs, (int)flushed_ninfo.hdr.nchunks,
+ (int)flushed_ninfo.hdr.space.total);
+ printf("REFRESHED: num_attrs=%d, nmesgs=%d, nchunks=%d, total=%d\n", (int)refreshed_oinfo.num_attrs,
+ (int)refreshed_ninfo.hdr.nmesgs, (int)refreshed_ninfo.hdr.nchunks,
+ (int)refreshed_ninfo.hdr.space.total);
PROCESS_ERROR;
}
@@ -1387,7 +1385,7 @@ check_for_errors(void)
{
FILE *file;
- if ((file = HDfopen(ERRFILE, "r"))) {
+ if ((file = fopen(ERRFILE, "r"))) {
HDfclose(file);
HDremove(ERRFILE);
return FAIL;
diff --git a/test/freespace.c b/test/freespace.c
index bc41044..9c9a2f2 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -198,8 +198,8 @@ TEST_sect_init_cls(H5FS_section_class_t *cls, void *_udata)
unsigned *init_flags;
/* Check arguments. */
- HDassert(cls);
- HDassert(_udata);
+ assert(cls);
+ assert(_udata);
init_flags = (unsigned *)_udata;
cls->flags |= *init_flags;
@@ -220,10 +220,10 @@ TEST_sect_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_info_t
htri_t ret_value; /* Return value */
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
@@ -242,15 +242,15 @@ TEST_sect_merging(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, voi
herr_t ret_value = SUCCEED; /* Return value */
/* Check arguments. */
- HDassert(sect1);
- HDassert(((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE) ||
- ((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE_NEW) ||
- ((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE_NONE));
- HDassert(sect2);
- HDassert((sect2->sect_info.type == TEST_FSPACE_SECT_TYPE) ||
- (sect2->sect_info.type == TEST_FSPACE_SECT_TYPE_NEW) ||
- (sect2->sect_info.type == TEST_FSPACE_SECT_TYPE_NONE));
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ assert(sect1);
+ assert(((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE) ||
+ ((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE_NEW) ||
+ ((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE_NONE));
+ assert(sect2);
+ assert((sect2->sect_info.type == TEST_FSPACE_SECT_TYPE) ||
+ (sect2->sect_info.type == TEST_FSPACE_SECT_TYPE_NEW) ||
+ (sect2->sect_info.type == TEST_FSPACE_SECT_TYPE_NONE));
+ assert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -269,7 +269,7 @@ static herr_t
TEST_sect_free(H5FS_section_info_t *sect)
{
/* Release the section */
- HDfree(sect);
+ free(sect);
return 0;
} /* TEST_sect_free() */
@@ -334,8 +334,8 @@ TEST_sects_cb(H5FS_section_info_t *_sect, void *_udata)
TEST_iter_ud_t *udata = (TEST_iter_ud_t *)_udata;
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(sect);
- HDassert(udata);
+ assert(sect);
+ assert(udata);
udata->tot_size += sect->sect_info.size;
udata->tot_sect_count += 1;
@@ -363,7 +363,7 @@ TEST_set_eoa(haddr_t val)
static void
init_cparam(H5FS_create_t *cparam)
{
- HDmemset(cparam, 0, sizeof(H5FS_create_t));
+ memset(cparam, 0, sizeof(H5FS_create_t));
/* Set the free space creation parameters */
cparam->shrink_percent = TEST_FSPACE_SHRINK;
@@ -399,28 +399,27 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, frspace_state_t *state)
FAIL_STACK_ERROR;
if (frspace_stats.tot_space != state->tot_space) {
- HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
- frspace_stats.tot_space, state->tot_space);
+ fprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
+ frspace_stats.tot_space, state->tot_space);
TEST_ERROR;
} /* end if */
if (frspace_stats.tot_sect_count != state->tot_sect_count) {
- HDfprintf(stdout,
- "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
- frspace_stats.tot_sect_count, state->tot_sect_count);
+ fprintf(stdout,
+ "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
+ frspace_stats.tot_sect_count, state->tot_sect_count);
TEST_ERROR;
} /* end if */
if (frspace_stats.serial_sect_count != state->serial_sect_count) {
- HDfprintf(stdout,
- "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE
- "\n",
- frspace_stats.serial_sect_count, state->serial_sect_count);
+ fprintf(stdout,
+ "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE
+ "\n",
+ frspace_stats.serial_sect_count, state->serial_sect_count);
TEST_ERROR;
} /* end if */
if (frspace_stats.ghost_sect_count != state->ghost_sect_count) {
- HDfprintf(stdout,
- "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE
- "\n",
- frspace_stats.ghost_sect_count, state->ghost_sect_count);
+ fprintf(stdout,
+ "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE "\n",
+ frspace_stats.ghost_sect_count, state->ghost_sect_count);
TEST_ERROR;
} /* end if */
@@ -493,11 +492,11 @@ test_fs_create(hid_t fapl)
if (frsp->nclasses != nclasses)
TEST_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
TEST_ERROR;
- HDmemset(&test_cparam, 0, sizeof(H5FS_create_t));
+ memset(&test_cparam, 0, sizeof(H5FS_create_t));
if (H5FS__get_cparam_test(frsp, &test_cparam) < 0)
FAIL_STACK_ERROR;
if (H5FS__cmp_cparam_test(&cparam, &test_cparam))
@@ -633,7 +632,7 @@ test_fs_sect_add(hid_t fapl)
if (!H5F_addr_defined(fs_addr))
TEST_ERROR;
- if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, TEST_FSPACE_SECT_TYPE,
@@ -642,7 +641,7 @@ test_fs_sect_add(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -699,7 +698,7 @@ test_fs_sect_add(hid_t fapl)
TEST_ERROR;
/* Create free list section node */
- if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, TEST_FSPACE_SECT_TYPE,
@@ -708,7 +707,7 @@ test_fs_sect_add(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node, 0, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node->sect_info.size;
state.tot_sect_count += 1;
state.ghost_sect_count += 1;
@@ -773,7 +772,7 @@ test_fs_sect_add(hid_t fapl)
if (!H5F_addr_defined(fs_addr))
TEST_ERROR;
- if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
/*
@@ -786,7 +785,7 @@ test_fs_sect_add(hid_t fapl)
FAIL_STACK_ERROR;
/* nothing in free-space */
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
TEST_ERROR;
@@ -843,7 +842,7 @@ test_fs_sect_add(hid_t fapl)
if (!H5F_addr_defined(fs_addr))
TEST_ERROR;
- if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
/*
@@ -855,7 +854,7 @@ test_fs_sect_add(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node, H5FS_ADD_DESERIALIZING, &can_shrink) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -966,7 +965,7 @@ test_fs_sect_find(hid_t fapl)
if (!H5F_addr_defined(fs_addr))
TEST_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
TEST_ERROR;
@@ -1002,7 +1001,7 @@ test_fs_sect_find(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE,
@@ -1011,7 +1010,7 @@ test_fs_sect_find(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1022,7 +1021,7 @@ test_fs_sect_find(hid_t fapl)
/*
* Add section C
*/
- if (NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node3 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node3, (haddr_t)(TEST_SECT_ADDR200), (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE,
@@ -1041,7 +1040,7 @@ test_fs_sect_find(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE,
@@ -1060,7 +1059,7 @@ test_fs_sect_find(hid_t fapl)
/*
* Add section D
*/
- if (NULL == (sect_node4 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node4 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node4, (haddr_t)TEST_SECT_ADDR300, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE,
@@ -1129,7 +1128,7 @@ test_fs_sect_find(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE,
@@ -1138,7 +1137,7 @@ test_fs_sect_find(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1149,7 +1148,7 @@ test_fs_sect_find(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR200, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE,
@@ -1208,7 +1207,7 @@ test_fs_sect_find(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE,
@@ -1217,7 +1216,7 @@ test_fs_sect_find(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1356,7 +1355,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section C
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE,
@@ -1365,7 +1364,7 @@ test_fs_sect_merge(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += TEST_SECT_SIZE50;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1376,7 +1375,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE,
@@ -1394,7 +1393,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node3 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node3, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE10, TEST_FSPACE_SECT_TYPE,
@@ -1412,7 +1411,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section D
*/
- if (NULL == (sect_node4 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node4 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node4, (haddr_t)TEST_SECT_ADDR150, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE,
@@ -1485,7 +1484,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE,
@@ -1494,7 +1493,7 @@ test_fs_sect_merge(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += TEST_SECT_SIZE30;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1505,7 +1504,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE,
@@ -1588,7 +1587,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE10, TEST_FSPACE_SECT_TYPE,
@@ -1597,7 +1596,7 @@ test_fs_sect_merge(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += TEST_SECT_SIZE10;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1608,7 +1607,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30,
@@ -1628,7 +1627,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section C
*/
- if (NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node3 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node3, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50,
@@ -1646,7 +1645,7 @@ test_fs_sect_merge(hid_t fapl)
/*
* Add section D
*/
- if (NULL == (sect_node4 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node4 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node4, (haddr_t)TEST_SECT_ADDR150, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE,
@@ -1834,7 +1833,7 @@ test_fs_sect_shrink(hid_t fapl)
/*
* Add section A that allow shrinking but its section class type does not define "can_shrink"
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50,
@@ -1844,7 +1843,7 @@ test_fs_sect_shrink(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1869,7 +1868,7 @@ test_fs_sect_shrink(hid_t fapl)
/*
* Re-add section A that allow shrinking and its section class type defines "can_shrink"
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE,
@@ -1880,7 +1879,7 @@ test_fs_sect_shrink(hid_t fapl)
FAIL_STACK_ERROR;
/* should have nothing in free-space */
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
TEST_ERROR;
@@ -1936,7 +1935,7 @@ test_fs_sect_shrink(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, TEST_FSPACE_SECT_TYPE,
@@ -1945,7 +1944,7 @@ test_fs_sect_shrink(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1956,7 +1955,7 @@ test_fs_sect_shrink(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE,
@@ -2036,7 +2035,7 @@ test_fs_sect_shrink(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE,
@@ -2045,7 +2044,7 @@ test_fs_sect_shrink(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -2056,7 +2055,7 @@ test_fs_sect_shrink(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE,
@@ -2066,7 +2065,7 @@ test_fs_sect_shrink(hid_t fapl)
FAIL_STACK_ERROR;
/* section A & B are merged and then strunk, so there is nothing in free-space */
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
TEST_ERROR;
@@ -2178,7 +2177,7 @@ test_fs_sect_change_class(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE,
@@ -2187,7 +2186,7 @@ test_fs_sect_change_class(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += TEST_SECT_SIZE30;
state.tot_sect_count += 1;
state.ghost_sect_count += 1;
@@ -2198,7 +2197,7 @@ test_fs_sect_change_class(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50,
@@ -2282,7 +2281,7 @@ test_fs_sect_change_class(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE,
@@ -2294,7 +2293,7 @@ test_fs_sect_change_class(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50,
@@ -2306,7 +2305,7 @@ test_fs_sect_change_class(hid_t fapl)
/*
* Add section C
*/
- if (NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node3 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node3, (haddr_t)TEST_SECT_ADDR200, (hsize_t)TEST_SECT_SIZE80,
@@ -2466,7 +2465,7 @@ test_fs_sect_extend(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE,
@@ -2475,7 +2474,7 @@ test_fs_sect_extend(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -2486,7 +2485,7 @@ test_fs_sect_extend(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE,
@@ -2543,7 +2542,7 @@ test_fs_sect_extend(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE,
@@ -2552,7 +2551,7 @@ test_fs_sect_extend(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -2563,7 +2562,7 @@ test_fs_sect_extend(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE,
@@ -2617,7 +2616,7 @@ test_fs_sect_extend(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE,
@@ -2626,7 +2625,7 @@ test_fs_sect_extend(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -2637,7 +2636,7 @@ test_fs_sect_extend(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE,
@@ -2692,7 +2691,7 @@ test_fs_sect_extend(hid_t fapl)
/*
* Add section A
*/
- if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node1 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE,
@@ -2701,7 +2700,7 @@ test_fs_sect_extend(hid_t fapl)
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(frspace_state_t));
+ memset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -2712,7 +2711,7 @@ test_fs_sect_extend(hid_t fapl)
/*
* Add section B
*/
- if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node2 = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE,
@@ -2823,7 +2822,7 @@ test_fs_sect_iterate(hid_t fapl)
TEST_ERROR;
for (i = 1; i <= NUM_SECTIONS; i++) {
- if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
+ if (NULL == (sect_node = (TEST_free_section_t *)malloc(sizeof(TEST_free_section_t))))
FAIL_STACK_ERROR;
sect_size = (unsigned)((i - 1) % 9) + 1;
@@ -2919,7 +2918,7 @@ main(void)
api_ctx_pushed = FALSE;
h5_cleanup(FILENAME, fapl);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
HDputs("*** TESTS FAILED ***");
@@ -2932,5 +2931,5 @@ error:
if (api_ctx_pushed)
H5CX_pop(FALSE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* main() */
diff --git a/test/gen_bounds.c b/test/gen_bounds.c
index fb765f7..57b8026 100644
--- a/test/gen_bounds.c
+++ b/test/gen_bounds.c
@@ -148,7 +148,7 @@ gen_earliest_latest(void)
/*
* Add a chunked dataset with layout version 3 (default)
*/
- buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ buf = (float *)malloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
if (buf == NULL)
TEST_ERROR;
@@ -210,7 +210,7 @@ gen_earliest_latest(void)
TEST_ERROR;
/* Release allocated buffer */
- HDfree(buf);
+ free(buf);
bufp = buf = NULL;
/* Close everything */
@@ -234,7 +234,7 @@ error:
H5Pclose(fcpl);
H5Pclose(fapl);
H5Fclose(fid);
- HDfree(buf);
+ free(buf);
}
H5E_END_TRY;
return FAIL;
@@ -293,7 +293,7 @@ gen_earliest_v18(void)
* Add a chunked dataset with layout version 3 (default)
*/
- buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ buf = (float *)malloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
if (buf == NULL)
TEST_ERROR;
@@ -325,7 +325,7 @@ gen_earliest_v18(void)
TEST_ERROR;
/* Release allocated buffer */
- HDfree(buf);
+ free(buf);
bufp = buf = NULL;
/* Close everything */
@@ -349,7 +349,7 @@ error:
H5Pclose(fcpl);
H5Pclose(fapl);
H5Fclose(fid);
- HDfree(buf);
+ free(buf);
}
H5E_END_TRY;
return FAIL;
@@ -402,7 +402,7 @@ gen_latest_latest(void)
* Add a chunked dataset with layout version 4 (H5Pset_chunk_opts)
*/
- buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ buf = (float *)malloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
if (buf == NULL)
TEST_ERROR;
@@ -437,7 +437,7 @@ gen_latest_latest(void)
TEST_ERROR;
/* Release allocated buffer */
- HDfree(buf);
+ free(buf);
bufp = buf = NULL;
/* Close everything */
@@ -459,7 +459,7 @@ error:
H5Sclose(space);
H5Pclose(dcpl);
H5Fclose(fid);
- HDfree(buf);
+ free(buf);
}
H5E_END_TRY;
return FAIL;
@@ -520,7 +520,7 @@ gen_v18_latest(void)
* Add a chunked dataset with layout version 3 (default)
*/
- buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ buf = (float *)malloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
if (buf == NULL)
TEST_ERROR;
@@ -551,7 +551,7 @@ gen_v18_latest(void)
TEST_ERROR;
/* Release allocated buffer */
- HDfree(buf);
+ free(buf);
bufp = buf = NULL;
/* Close property list and dataset, will reuse dataspace */
@@ -575,7 +575,7 @@ error:
H5Pclose(fcpl);
H5Pclose(fapl);
H5Fclose(fid);
- HDfree(buf);
+ free(buf);
}
H5E_END_TRY;
return FAIL;
@@ -635,7 +635,7 @@ gen_v18_v18(void)
* Add a chunked dataset with layout version 3 (default)
*/
- buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ buf = (float *)malloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
if (buf == NULL)
TEST_ERROR;
@@ -712,7 +712,7 @@ gen_v18_v18(void)
TEST_ERROR;
/* Release allocated buffer */
- HDfree(buf);
+ free(buf);
bufp = buf = NULL;
/* Close everything */
@@ -737,7 +737,7 @@ error:
H5Pclose(fcpl);
H5Pclose(fapl);
H5Fclose(fid);
- HDfree(buf);
+ free(buf);
}
H5E_END_TRY;
return FAIL;
@@ -1018,7 +1018,7 @@ gen_ref_files(const char *filename, H5F_libver_t low_bound, H5F_libver_t high_bo
* Create test file, attribute, group and dataset
*/
- if ((dwbuf = HDcalloc(sizeof(unsigned), 100)) == NULL)
+ if ((dwbuf = calloc(sizeof(unsigned), 100)) == NULL)
TEST_ERROR;
/* Create the test file */
@@ -1068,7 +1068,7 @@ gen_ref_files(const char *filename, H5F_libver_t low_bound, H5F_libver_t high_bo
TEST_ERROR;
if (dwbuf) {
- HDfree(dwbuf);
+ free(dwbuf);
dwbuf = NULL;
}
@@ -1201,7 +1201,7 @@ error:
H5Sclose(sid);
H5Pclose(fapl);
H5Fclose(fid);
- HDfree(dwbuf);
+ free(dwbuf);
}
H5E_END_TRY;
diff --git a/test/gen_cross.c b/test/gen_cross.c
index c468039..d72f4cb 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -1258,8 +1258,8 @@ main(void)
/* Create memory space. This does not include the extra row for fill
* values. */
- HDassert(dimsf[0] == NX);
- HDassert(dimsf[1] == NY);
+ assert(dimsf[0] == NX);
+ assert(dimsf[1] == NY);
if ((memspace = H5Screate_simple(RANK, dimsf, NULL)) < 0)
TEST_ERROR;
@@ -1325,8 +1325,8 @@ main(void)
if (H5Fclose(file) < 0)
TEST_ERROR;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/gen_deflate.c b/test/gen_deflate.c
index b103559..da5cc75 100644
--- a/test/gen_deflate.c
+++ b/test/gen_deflate.c
@@ -54,7 +54,7 @@ main(void)
/* Initialize the data */
/* (Try for something easily compressible) */
- if (NULL == (data = (int *)HDmalloc(SPACE_DIM1 * SPACE_DIM2 * sizeof(int))))
+ if (NULL == (data = (int *)malloc(SPACE_DIM1 * SPACE_DIM2 * sizeof(int))))
TEST_ERROR;
for (i = 0; i < SPACE_DIM1; i++)
@@ -97,13 +97,13 @@ main(void)
if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR;
- HDfree(data);
+ free(data);
return EXIT_SUCCESS;
error:
if (data)
- HDfree(data);
+ free(data);
H5E_BEGIN_TRY
{
H5Pclose(dcpl_id);
diff --git a/test/gen_file_image.c b/test/gen_file_image.c
index 03065c6..978810a 100644
--- a/test/gen_file_image.c
+++ b/test/gen_file_image.c
@@ -45,7 +45,7 @@ main(void)
int *data = NULL; /* Dataset data */
/* Initialize the data */
- if (NULL == (data = (int *)HDmalloc(SPACE_DIM1 * SPACE_DIM2 * sizeof(int))))
+ if (NULL == (data = (int *)malloc(SPACE_DIM1 * SPACE_DIM2 * sizeof(int))))
TEST_ERROR;
for (i = 0; i < SPACE_DIM1; i++)
@@ -80,7 +80,7 @@ main(void)
error:
if (data)
- HDfree(data);
+ free(data);
H5E_BEGIN_TRY
{
H5Dclose(did);
diff --git a/test/gen_filters.c b/test/gen_filters.c
index c171538..d2d7713 100644
--- a/test/gen_filters.c
+++ b/test/gen_filters.c
@@ -240,12 +240,12 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All tests passed.\n");
+ printf("All tests passed.\n");
return 0;
error:
nerrors = MAX(1, nerrors);
- HDprintf("***** %d GEN_FILTERS FAILURES *****\n", nerrors);
+ printf("***** %d GEN_FILTERS FAILURES *****\n", nerrors);
return 1;
}
diff --git a/test/gen_new_super.c b/test/gen_new_super.c
index 47d6d47..46855e7 100644
--- a/test/gen_new_super.c
+++ b/test/gen_new_super.c
@@ -48,10 +48,10 @@ main(void)
/* Create a file creation property list */
fcpl = H5Pcreate(H5P_FILE_CREATE);
- HDassert(fcpl >= 0);
+ assert(fcpl >= 0);
ret = H5Pset_istore_k(fcpl, ISTORE_IK);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Creating a file with the non-default file creation property list should
* create a version 1 superblock
@@ -59,15 +59,15 @@ main(void)
/* Create file with custom file creation property list */
file = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT);
- HDassert(file >= 0);
+ assert(file >= 0);
/* Close FCPL */
ret = H5Pclose(fcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close file */
ret = H5Fclose(file);
- HDassert(ret >= 0);
+ assert(ret >= 0);
return EXIT_SUCCESS;
}
diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c
index 12e00d4..84e7398 100644
--- a/test/gen_nullspace.c
+++ b/test/gen_nullspace.c
@@ -41,42 +41,42 @@ main(void)
/* Create the file */
fid = H5Fcreate(NULLFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid > 0);
+ assert(fid > 0);
sid = H5Screate(H5S_NULL);
- HDassert(sid > 0);
+ assert(sid > 0);
/* Create dataset */
did = H5Dcreate2(fid, NULLDATASET, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(did > 0);
+ assert(did > 0);
/* Close the dataset */
ret = H5Dclose(did);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Open the root group */
gid = H5Gopen2(fid, "/", H5P_DEFAULT);
- HDassert(gid > 0);
+ assert(gid > 0);
/* Create an attribute for the group */
attr = H5Acreate2(gid, NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(attr > 0);
+ assert(attr > 0);
/* Close attribute */
ret = H5Aclose(attr);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close the group */
ret = H5Gclose(gid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close the dataspace */
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close the file */
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
return EXIT_SUCCESS;
}
diff --git a/test/gen_plist.c b/test/gen_plist.c
index 5302dc7..bd94e9c 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -457,27 +457,27 @@ encode_plist(hid_t plist_id, int little_endian, int word_length, const char *fil
/* Generate filename */
if ((ret = HDsnprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length,
little_endian ? "le" : "be")) < 0)
- HDassert(ret > 0);
+ assert(ret > 0);
/* first call to encode returns only the size of the buffer needed */
if ((ret = H5Pencode2(plist_id, NULL, &temp_size, H5P_DEFAULT)) < 0)
- HDassert(ret > 0);
+ assert(ret > 0);
- temp_buf = (void *)HDmalloc(temp_size);
- HDassert(temp_buf);
+ temp_buf = (void *)malloc(temp_size);
+ assert(temp_buf);
if ((ret = H5Pencode2(plist_id, temp_buf, &temp_size, H5P_DEFAULT)) < 0)
- HDassert(ret > 0);
+ assert(ret > 0);
fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW);
- HDassert(fd >= 0);
+ assert(fd >= 0);
write_size = HDwrite(fd, temp_buf, temp_size);
- HDassert(write_size == (ssize_t)temp_size);
+ assert(write_size == (ssize_t)temp_size);
HDclose(fd);
- HDfree(temp_buf);
+ free(temp_buf);
return 1;
}
diff --git a/test/genall5.c b/test/genall5.c
index ea96d32..e8b7228 100644
--- a/test/genall5.c
+++ b/test/genall5.c
@@ -59,7 +59,7 @@ ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "ns_grp_0: H5Pcreate() failed";
}
- HDassert(gcpl > 0);
+ assert(gcpl > 0);
}
if (pass) {
@@ -69,7 +69,7 @@ ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "ns_grp_0: H5Pset_link_creation_order() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -79,7 +79,7 @@ ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "ns_grp_0: H5Gcreate2() failed";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
if (pass) {
@@ -89,7 +89,7 @@ ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "ns_grp_0: H5Pclose(gcpl) failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -99,7 +99,7 @@ ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "ns_grp_0: H5Gclose(gid) failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* ns_grp_0 */
@@ -139,7 +139,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_0: H5Gopen2() failed";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
if (pass) {
@@ -149,7 +149,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_0: H5Gget_create_plist() failed";
}
- HDassert(gcpl > 0);
+ assert(gcpl > 0);
}
if (pass) {
@@ -163,8 +163,8 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_0: H5P_CRT_ORDER_TRACKED != crt_order_flags";
}
- HDassert(ret >= 0);
- HDassert(H5P_CRT_ORDER_TRACKED == crt_order_flags);
+ assert(ret >= 0);
+ assert(H5P_CRT_ORDER_TRACKED == crt_order_flags);
}
if (pass) {
@@ -174,11 +174,11 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_0: H5Pclose() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
- HDmemset(&grp_info, 0, sizeof(grp_info));
+ memset(&grp_info, 0, sizeof(grp_info));
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
@@ -202,11 +202,11 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
failure_mssg = "vrfy_ns_grp_0: FALSE != grp_info.mounted";
}
- HDassert(ret >= 0);
- HDassert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type);
- HDassert(0 == grp_info.nlinks);
- HDassert(0 == grp_info.max_corder);
- HDassert(FALSE == grp_info.mounted);
+ assert(ret >= 0);
+ assert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type);
+ assert(0 == grp_info.nlinks);
+ assert(0 == grp_info.max_corder);
+ assert(FALSE == grp_info.mounted);
}
if (pass) {
@@ -216,7 +216,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_0: H5Gclose() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* vrfy_ns_grp_0() */
@@ -256,7 +256,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_c: H5Pcreate(H5P_GROUP_CREATE) failed";
}
- HDassert(gcpl > 0);
+ assert(gcpl > 0);
}
if (pass) {
@@ -266,7 +266,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_c: H5Pset_link_creation_order() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -276,7 +276,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_c: H5Gcreate2() failed";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
if (pass) {
@@ -296,9 +296,9 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
failure_mssg = "ns_grp_c: nlinks >= max_compact";
}
- HDassert(ret >= 0);
- HDassert(nlinks > 0);
- HDassert(nlinks < max_compact);
+ assert(ret >= 0);
+ assert(nlinks > 0);
+ assert(nlinks < max_compact);
}
u = 0;
@@ -314,7 +314,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_c: H5Lcreate_soft() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
} /* end if */
else if (1 == (u % 3)) {
ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
@@ -323,17 +323,17 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_c: H5Lcreate_hard() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
} /* end else-if */
else {
- HDassert(2 == (u % 3));
+ assert(2 == (u % 3));
ret = H5Lcreate_external("external.h5", "/ext", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
pass = FALSE;
failure_mssg = "ns_grp_c: H5Lcreate_external() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
} /* end else */
u++;
@@ -346,7 +346,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_c: H5Pclose(gcpl) failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -356,7 +356,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_c: H5Gclose(gid) failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* ns_grp_c() */
@@ -397,7 +397,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5Gopen2() failed";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
if (pass) {
@@ -407,7 +407,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5Gget_create_plist(gid) failed";
}
- HDassert(gcpl > 0);
+ assert(gcpl > 0);
}
if (pass) {
@@ -421,8 +421,8 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5P_CRT_ORDER_TRACKED != crt_order_flags";
}
- HDassert(ret >= 0);
- HDassert(H5P_CRT_ORDER_TRACKED == crt_order_flags);
+ assert(ret >= 0);
+ assert(H5P_CRT_ORDER_TRACKED == crt_order_flags);
}
if (pass) {
@@ -432,11 +432,11 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5Pclose() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
- HDmemset(&grp_info, 0, sizeof(grp_info));
+ memset(&grp_info, 0, sizeof(grp_info));
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
@@ -460,11 +460,11 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
failure_mssg = "vrfy_ns_grp_c: FALSE != grp_info.mounted";
}
- HDassert(ret >= 0);
- HDassert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type);
- HDassert(nlinks == grp_info.nlinks);
- HDassert(nlinks == grp_info.max_corder);
- HDassert(FALSE == grp_info.mounted);
+ assert(ret >= 0);
+ assert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type);
+ assert(nlinks == grp_info.nlinks);
+ assert(nlinks == grp_info.max_corder);
+ assert(FALSE == grp_info.mounted);
}
u = 0;
@@ -480,9 +480,9 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5Lexists() failed";
}
- HDassert(link_exists >= 0);
+ assert(link_exists >= 0);
- HDmemset(&lnk_info, 0, sizeof(grp_info));
+ memset(&lnk_info, 0, sizeof(grp_info));
ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT);
if (ret < 0) {
@@ -501,10 +501,10 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5T_CSET_ASCII != lnk_info.cset";
}
- HDassert(ret >= 0);
- HDassert(TRUE == lnk_info.corder_valid);
- HDassert(u == lnk_info.corder);
- HDassert(H5T_CSET_ASCII == lnk_info.cset);
+ assert(ret >= 0);
+ assert(TRUE == lnk_info.corder_valid);
+ assert(u == lnk_info.corder);
+ assert(H5T_CSET_ASCII == lnk_info.cset);
if (0 == (u % 3)) {
char *slinkval;
@@ -517,16 +517,16 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: (HDstrlen(group_name) + 1) != lnk_info.u.val_size";
}
- HDassert(H5L_TYPE_SOFT == lnk_info.type);
- HDassert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert(H5L_TYPE_SOFT == lnk_info.type);
+ assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
- slinkval = (char *)HDmalloc(lnk_info.u.val_size);
+ slinkval = (char *)malloc(lnk_info.u.val_size);
if (!slinkval) {
pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: HDmalloc of slinkval failed";
+ failure_mssg = "vrfy_ns_grp_c: malloc of slinkval failed";
}
- HDassert(slinkval);
+ assert(slinkval);
ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
@@ -537,10 +537,10 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(slinkval, group_name)";
}
- HDassert(ret >= 0);
- HDassert(0 == HDstrcmp(slinkval, group_name));
+ assert(ret >= 0);
+ assert(0 == HDstrcmp(slinkval, group_name));
- HDfree(slinkval);
+ free(slinkval);
} /* end if */
else if (1 == (u % 3)) {
H5O_info2_t root_oinfo;
@@ -550,9 +550,9 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_HARD != lnk_info.type";
}
- HDassert(H5L_TYPE_HARD == lnk_info.type);
+ assert(H5L_TYPE_HARD == lnk_info.type);
- HDmemset(&root_oinfo, 0, sizeof(root_oinfo));
+ memset(&root_oinfo, 0, sizeof(root_oinfo));
ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC);
if (ret < 0) {
@@ -570,36 +570,36 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
failure_mssg = "vrfy_ns_grp_c: root_oinfo.token != lnk_info.u.token";
}
}
- HDassert(ret >= 0);
- HDassert(!token_cmp);
+ assert(ret >= 0);
+ assert(!token_cmp);
} /* end else-if */
else {
void *elinkval;
const char *file = NULL;
const char *path = NULL;
- HDassert(2 == (u % 3));
+ assert(2 == (u % 3));
if (H5L_TYPE_EXTERNAL != lnk_info.type) {
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_EXTERNAL != lnk_info.type";
}
- HDassert(H5L_TYPE_EXTERNAL == lnk_info.type);
+ assert(H5L_TYPE_EXTERNAL == lnk_info.type);
- elinkval = HDmalloc(lnk_info.u.val_size);
+ elinkval = malloc(lnk_info.u.val_size);
if (!elinkval) {
pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: HDmalloc of elinkval failed.";
+ failure_mssg = "vrfy_ns_grp_c: malloc of elinkval failed.";
}
- HDassert(elinkval);
+ assert(elinkval);
ret = H5Lget_val(gid, linkname, elinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5Lget_val() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Lunpack_elink_val(elinkval, lnk_info.u.val_size, NULL, &file, &path);
if (ret < 0) {
@@ -614,11 +614,11 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(path, \"/ext\")";
}
- HDassert(ret >= 0);
- HDassert(0 == HDstrcmp(file, "external.h5"));
- HDassert(0 == HDstrcmp(path, "/ext"));
+ assert(ret >= 0);
+ assert(0 == HDstrcmp(file, "external.h5"));
+ assert(0 == HDstrcmp(path, "/ext"));
- HDfree(elinkval);
+ free(elinkval);
} /* end else */
u++;
@@ -631,7 +631,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_c: H5Gclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* vrfy_ns_grp_c() */
@@ -671,7 +671,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_d: H5Pcreate() failed.";
}
- HDassert(gcpl > 0);
+ assert(gcpl > 0);
}
if (pass) {
@@ -681,7 +681,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_d: H5Pset_link_creation_order() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -691,7 +691,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_d: H5Gcreate2() failed.";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
if (pass) {
@@ -706,8 +706,8 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_d: nlinks <= max_compact";
}
- HDassert(ret >= 0);
- HDassert(nlinks > max_compact);
+ assert(ret >= 0);
+ assert(nlinks > max_compact);
}
u = 0;
@@ -723,7 +723,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_d: H5Lcreate_soft() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
} /* end if */
else if (1 == (u % 3)) {
ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
@@ -732,10 +732,10 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_d: H5Lcreate_hard() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
} /* end else-if */
else {
- HDassert(2 == (u % 3));
+ assert(2 == (u % 3));
ret = H5Lcreate_external("external.h5", "/ext", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
@@ -743,7 +743,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_d: H5Lcreate_external() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
} /* end else */
u++;
@@ -756,7 +756,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_d: H5Pclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -766,7 +766,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "ns_grp_d: H5Gclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* ns_grp_d() */
@@ -807,7 +807,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5Gopen2() failed.";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
if (pass) {
@@ -817,7 +817,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5Gget_create_plist() failed.";
}
- HDassert(gcpl > 0);
+ assert(gcpl > 0);
}
if (pass) {
@@ -831,8 +831,8 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5P_CRT_ORDER_TRACKED != crt_order_flags";
}
- HDassert(ret >= 0);
- HDassert(H5P_CRT_ORDER_TRACKED == crt_order_flags);
+ assert(ret >= 0);
+ assert(H5P_CRT_ORDER_TRACKED == crt_order_flags);
}
if (pass) {
@@ -842,11 +842,11 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5Pclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
- HDmemset(&grp_info, 0, sizeof(grp_info));
+ memset(&grp_info, 0, sizeof(grp_info));
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
@@ -869,11 +869,11 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: FALSE != grp_info.mounted";
}
- HDassert(ret >= 0);
- HDassert(H5G_STORAGE_TYPE_DENSE == grp_info.storage_type);
- HDassert(nlinks == grp_info.nlinks);
- HDassert(nlinks == grp_info.max_corder);
- HDassert(FALSE == grp_info.mounted);
+ assert(ret >= 0);
+ assert(H5G_STORAGE_TYPE_DENSE == grp_info.storage_type);
+ assert(nlinks == grp_info.nlinks);
+ assert(nlinks == grp_info.max_corder);
+ assert(FALSE == grp_info.mounted);
}
u = 0;
@@ -889,9 +889,9 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5Lexists() failed.";
}
- HDassert(link_exists >= 0);
+ assert(link_exists >= 0);
- HDmemset(&lnk_info, 0, sizeof(grp_info));
+ memset(&lnk_info, 0, sizeof(grp_info));
ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT);
if (ret < 0) {
@@ -910,10 +910,10 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5T_CSET_ASCII != lnk_info.cset";
}
- HDassert(ret >= 0);
- HDassert(TRUE == lnk_info.corder_valid);
- HDassert(u == lnk_info.corder);
- HDassert(H5T_CSET_ASCII == lnk_info.cset);
+ assert(ret >= 0);
+ assert(TRUE == lnk_info.corder_valid);
+ assert(u == lnk_info.corder);
+ assert(H5T_CSET_ASCII == lnk_info.cset);
if (0 == (u % 3)) {
char *slinkval;
@@ -926,16 +926,16 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_SOFT != lnk_info.type";
}
- HDassert(H5L_TYPE_SOFT == lnk_info.type);
- HDassert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert(H5L_TYPE_SOFT == lnk_info.type);
+ assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
- slinkval = (char *)HDmalloc(lnk_info.u.val_size);
+ slinkval = (char *)malloc(lnk_info.u.val_size);
if (!slinkval) {
pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: HDmalloc of slinkval failed";
+ failure_mssg = "vrfy_ns_grp_d: malloc of slinkval failed";
}
- HDassert(slinkval);
+ assert(slinkval);
ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
@@ -946,10 +946,10 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(slinkval, group_name)";
}
- HDassert(ret >= 0);
- HDassert(0 == HDstrcmp(slinkval, group_name));
+ assert(ret >= 0);
+ assert(0 == HDstrcmp(slinkval, group_name));
- HDfree(slinkval);
+ free(slinkval);
} /* end if */
else if (1 == (u % 3)) {
H5O_info2_t root_oinfo;
@@ -959,9 +959,9 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_HARD != lnk_info.type";
}
- HDassert(H5L_TYPE_HARD == lnk_info.type);
+ assert(H5L_TYPE_HARD == lnk_info.type);
- HDmemset(&root_oinfo, 0, sizeof(root_oinfo));
+ memset(&root_oinfo, 0, sizeof(root_oinfo));
ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC);
if (ret < 0) {
pass = FALSE;
@@ -978,36 +978,36 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
failure_mssg = "vrfy_ns_grp_d: root_oinfo.token != lnk_info.u.token";
}
}
- HDassert(ret >= 0);
- HDassert(!token_cmp);
+ assert(ret >= 0);
+ assert(!token_cmp);
} /* end else-if */
else {
void *elinkval;
const char *file = NULL;
const char *path = NULL;
- HDassert(2 == (u % 3));
+ assert(2 == (u % 3));
if (H5L_TYPE_EXTERNAL != lnk_info.type) {
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_EXTERNAL != lnk_info.type";
}
- HDassert(H5L_TYPE_EXTERNAL == lnk_info.type);
+ assert(H5L_TYPE_EXTERNAL == lnk_info.type);
- elinkval = HDmalloc(lnk_info.u.val_size);
+ elinkval = malloc(lnk_info.u.val_size);
if (!elinkval) {
pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: HDmalloc of elinkval failed.";
+ failure_mssg = "vrfy_ns_grp_d: malloc of elinkval failed.";
}
- HDassert(elinkval);
+ assert(elinkval);
ret = H5Lget_val(gid, linkname, elinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5Lget_val failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Lunpack_elink_val(elinkval, lnk_info.u.val_size, NULL, &file, &path);
if (ret < 0) {
@@ -1022,11 +1022,11 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(path, \"/ext\")";
}
- HDassert(ret >= 0);
- HDassert(0 == HDstrcmp(file, "external.h5"));
- HDassert(0 == HDstrcmp(path, "/ext"));
+ assert(ret >= 0);
+ assert(0 == HDstrcmp(file, "external.h5"));
+ assert(0 == HDstrcmp(path, "/ext"));
- HDfree(elinkval);
+ free(elinkval);
} /* end else */
u++;
@@ -1039,7 +1039,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_ns_grp_d: H5Gclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* vrfy_ns_grp_d() */
@@ -1077,7 +1077,7 @@ os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "os_grp_0: H5Fget_access_plist() failed.";
}
- HDassert(fapl > 0);
+ assert(fapl > 0);
}
if (pass) { /* get low and high bounds from fapl */
@@ -1086,7 +1086,7 @@ os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1).";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) { /* turn file format latest off */
@@ -1096,7 +1096,7 @@ os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
}
@@ -1106,7 +1106,7 @@ os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "os_grp_0: H5Gcreate2() failed.";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
if (pass) {
@@ -1116,7 +1116,7 @@ os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "os_grp_0: H5Gclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) { /* restore low and high bounds */
@@ -1126,7 +1126,7 @@ os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
}
@@ -1166,7 +1166,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_os_grp_0: H5Gopen2() failed.";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
if (pass) {
@@ -1176,7 +1176,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_os_grp_0: H5Gget_create_plist() failed.";
}
- HDassert(gcpl > 0);
+ assert(gcpl > 0);
}
if (pass) {
@@ -1191,8 +1191,8 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_os_grp_0: 0 != crt_order_flags";
}
- HDassert(ret >= 0);
- HDassert(0 == crt_order_flags);
+ assert(ret >= 0);
+ assert(0 == crt_order_flags);
}
if (pass) {
@@ -1202,11 +1202,11 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_os_grp_0: H5Pclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
- HDmemset(&grp_info, 0, sizeof(grp_info));
+ memset(&grp_info, 0, sizeof(grp_info));
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
@@ -1229,11 +1229,11 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_os_grp_0: FALSE != grp_info.mounted";
}
- HDassert(ret >= 0);
- HDassert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type);
- HDassert(0 == grp_info.nlinks);
- HDassert(0 == grp_info.max_corder);
- HDassert(FALSE == grp_info.mounted);
+ assert(ret >= 0);
+ assert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type);
+ assert(0 == grp_info.nlinks);
+ assert(0 == grp_info.max_corder);
+ assert(FALSE == grp_info.mounted);
}
if (pass) {
@@ -1243,7 +1243,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
pass = FALSE;
failure_mssg = "vrfy_os_grp_0: H5Gclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* vrfy_os_grp_0() */
@@ -1282,7 +1282,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "os_grp_n: H5Fget_access_plist() failed.";
}
- HDassert(fapl > 0);
+ assert(fapl > 0);
}
if (pass) { /* get low and high bounds from fapl */
@@ -1291,7 +1291,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1).";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) { /* turn file format latest off */
@@ -1301,7 +1301,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
}
@@ -1311,10 +1311,10 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "os_grp_n: H5Gcreate2() failed.";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
- HDassert(nlinks > 0);
+ assert(nlinks > 0);
u = 0;
while ((pass) && (u < nlinks)) {
@@ -1328,17 +1328,17 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "os_grp_n: H5Lcreate_soft() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
} /* end if */
else {
- HDassert(1 == (u % 2));
+ assert(1 == (u % 2));
ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
pass = FALSE;
failure_mssg = "os_grp_n: H5Lcreate_hard() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
} /* end else */
u++;
@@ -1351,7 +1351,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "os_grp_n: H5Gclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) { /* restore low and high bounds */
@@ -1361,7 +1361,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "os_grp_n: H5Fset_libver_bounds() failed(2).";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
}
@@ -1402,7 +1402,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: H5Gopen2() failed";
}
- HDassert(gid > 0);
+ assert(gid > 0);
}
if (pass) {
@@ -1412,7 +1412,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: H5Gget_create_plist() failed";
}
- HDassert(gcpl > 0);
+ assert(gcpl > 0);
}
if (pass) {
@@ -1426,8 +1426,8 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: 0 != crt_order_flags";
}
- HDassert(ret >= 0);
- HDassert(0 == crt_order_flags);
+ assert(ret >= 0);
+ assert(0 == crt_order_flags);
}
if (pass) {
@@ -1437,11 +1437,11 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: H5Pclose() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
- HDmemset(&grp_info, 0, sizeof(grp_info));
+ memset(&grp_info, 0, sizeof(grp_info));
ret = H5Gget_info(gid, &grp_info);
@@ -1465,11 +1465,11 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: FALSE != grp_info.mounted";
}
- HDassert(ret >= 0);
- HDassert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type);
- HDassert(nlinks == grp_info.nlinks);
- HDassert(0 == grp_info.max_corder);
- HDassert(FALSE == grp_info.mounted);
+ assert(ret >= 0);
+ assert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type);
+ assert(nlinks == grp_info.nlinks);
+ assert(0 == grp_info.max_corder);
+ assert(FALSE == grp_info.mounted);
}
u = 0;
@@ -1485,9 +1485,9 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: H5Lexists() failed";
}
- HDassert(link_exists >= 0);
+ assert(link_exists >= 0);
- HDmemset(&lnk_info, 0, sizeof(grp_info));
+ memset(&lnk_info, 0, sizeof(grp_info));
ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT);
if (ret < 0) {
@@ -1502,9 +1502,9 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: H5T_CSET_ASCII != lnk_info.cset";
}
- HDassert(ret >= 0);
- HDassert(FALSE == lnk_info.corder_valid);
- HDassert(H5T_CSET_ASCII == lnk_info.cset);
+ assert(ret >= 0);
+ assert(FALSE == lnk_info.corder_valid);
+ assert(H5T_CSET_ASCII == lnk_info.cset);
if (0 == (u % 2)) {
char *slinkval;
@@ -1517,16 +1517,16 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: (HDstrlen(group_name) + 1) != lnk_info.u.val_size";
}
- HDassert(H5L_TYPE_SOFT == lnk_info.type);
- HDassert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert(H5L_TYPE_SOFT == lnk_info.type);
+ assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
- slinkval = (char *)HDmalloc(lnk_info.u.val_size);
+ slinkval = (char *)malloc(lnk_info.u.val_size);
if (!slinkval) {
pass = FALSE;
- failure_mssg = "vrfy_os_grp_n: HDmalloc of slinkval failed";
+ failure_mssg = "vrfy_os_grp_n: malloc of slinkval failed";
}
- HDassert(slinkval);
+ assert(slinkval);
ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT);
@@ -1538,24 +1538,24 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: 0 != HDstrcmp(slinkval, group_name)";
}
- HDassert(ret >= 0);
- HDassert(0 == HDstrcmp(slinkval, group_name));
+ assert(ret >= 0);
+ assert(0 == HDstrcmp(slinkval, group_name));
- HDfree(slinkval);
+ free(slinkval);
} /* end if */
else {
H5O_info2_t root_oinfo;
int token_cmp = 0;
- HDassert(1 == (u % 2));
+ assert(1 == (u % 2));
if (H5L_TYPE_HARD != lnk_info.type) {
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: H5L_TYPE_HARD != lnk_info.type";
}
- HDassert(H5L_TYPE_HARD == lnk_info.type);
+ assert(H5L_TYPE_HARD == lnk_info.type);
- HDmemset(&root_oinfo, 0, sizeof(root_oinfo));
+ memset(&root_oinfo, 0, sizeof(root_oinfo));
ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC);
if (ret < 0) {
@@ -1573,8 +1573,8 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
failure_mssg = "vrfy_os_grp_n: root_oinfo.token != lnk_info.u.token";
}
}
- HDassert(ret >= 0);
- HDassert(!token_cmp);
+ assert(ret >= 0);
+ assert(!token_cmp);
} /* end else */
u++;
@@ -1587,7 +1587,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = FALSE;
failure_mssg = "vrfy_os_grp_n: H5Gclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* vrfy_os_grp_n() */
@@ -1628,7 +1628,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_i: H5Screate_simple() failed";
}
- HDassert(sid > 0);
+ assert(sid > 0);
}
if (pass) {
@@ -1638,7 +1638,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_i: H5Dcreate2() failed";
}
- HDassert(dsid > 0);
+ assert(dsid > 0);
}
if (pass) {
@@ -1648,17 +1648,17 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_i: H5Sclose() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
- wdata = (int *)HDmalloc(sizeof(int) * DSET_DIMS);
+ wdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!wdata) {
pass = FALSE;
- failure_mssg = "ds_ctg_i: HDmalloc of wdata failed.";
+ failure_mssg = "ds_ctg_i: malloc of wdata failed.";
}
- HDassert(wdata);
+ assert(wdata);
}
if ((pass) && (write_data)) {
@@ -1671,10 +1671,10 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_i: H5Dwrite() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
- HDfree(wdata);
+ free(wdata);
if (pass) {
ret = H5Dclose(dsid);
@@ -1683,7 +1683,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_i: H5Dclose() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* ds_ctg_i */
@@ -1729,7 +1729,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5Dopen2() failed.";
}
- HDassert(dsid > 0);
+ assert(dsid > 0);
}
if (pass) {
@@ -1739,7 +1739,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_space() failed.";
}
- HDassert(sid > 0);
+ assert(sid > 0);
}
if (pass) {
@@ -1749,7 +1749,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: 1 != ndims";
}
- HDassert(1 == ndims);
+ assert(1 == ndims);
}
if (pass) {
@@ -1767,9 +1767,9 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: DSET_DIMS != max_dims[0]";
}
- HDassert(ret >= 0);
- HDassert(DSET_DIMS == dims[0]);
- HDassert(DSET_DIMS == max_dims[0]);
+ assert(ret >= 0);
+ assert(DSET_DIMS == dims[0]);
+ assert(DSET_DIMS == max_dims[0]);
}
if (pass) {
@@ -1779,7 +1779,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5Sclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -1789,7 +1789,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_type() failed.";
}
- HDassert(tid > 0);
+ assert(tid > 0);
}
if (pass) {
@@ -1799,7 +1799,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: type not H5T_NATIVE_INT";
}
- HDassert(1 == type_equal);
+ assert(1 == type_equal);
}
if (pass) {
@@ -1809,7 +1809,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5Tclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -1827,9 +1827,9 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED";
}
- HDassert(ret >= 0);
- HDassert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) ||
- (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED));
+ assert(ret >= 0);
+ assert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) ||
+ (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED));
}
if (pass) {
@@ -1839,7 +1839,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_create_plist() failed.";
}
- HDassert(dcpl > 0);
+ assert(dcpl > 0);
}
if (pass) {
@@ -1849,7 +1849,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5D_CONTIGUOUS != layout";
}
- HDassert(H5D_CONTIGUOUS == layout);
+ assert(H5D_CONTIGUOUS == layout);
}
if (pass) {
@@ -1859,17 +1859,17 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5Pclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
- rdata = (int *)HDmalloc(sizeof(int) * DSET_DIMS);
+ rdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!rdata) {
pass = FALSE;
- failure_mssg = "vrfy_ds_ctg_i: HDmalloc of rdata failed.";
+ failure_mssg = "vrfy_ds_ctg_i: malloc of rdata failed.";
}
- HDassert(rdata);
+ assert(rdata);
}
if ((pass) && (write_data)) {
@@ -1878,7 +1878,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5Dread() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
@@ -1888,11 +1888,11 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
failure_mssg = "vrfy_ds_ctg_i: u != rdata[u].";
break;
}
- HDassert((int)u == rdata[u]);
+ assert((int)u == rdata[u]);
}
} /* end if */
- HDfree(rdata);
+ free(rdata);
if (pass) {
ret = H5Dclose(dsid);
@@ -1901,7 +1901,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_i: H5Dclose() failed";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* vrfy_ds_ctg_i() */
@@ -1944,7 +1944,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_chk_i: H5Screate_simple() failed.";
}
- HDassert(sid > 0);
+ assert(sid > 0);
}
if (pass) {
@@ -1954,7 +1954,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_chk_i: H5Pcreate() failed.";
}
- HDassert(dcpl > 0);
+ assert(dcpl > 0);
}
if (pass) {
@@ -1964,7 +1964,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_chk_i: H5Pset_chunk() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -1974,7 +1974,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_chk_i: H5Dcreate2() failed";
}
- HDassert(dsid > 0);
+ assert(dsid > 0);
}
if (pass) {
@@ -1984,7 +1984,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_chk_i: H5Pclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -1994,17 +1994,17 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_chk_i: H5Sclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
- wdata = (int *)HDmalloc(sizeof(int) * DSET_DIMS);
+ wdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!wdata) {
pass = FALSE;
- failure_mssg = "ds_chk_i: HDmalloc of wdata failed.";
+ failure_mssg = "ds_chk_i: malloc of wdata failed.";
}
- HDassert(wdata);
+ assert(wdata);
}
if ((pass) && (write_data)) {
@@ -2016,8 +2016,8 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_chk_i: H5Dwrite() failed.";
}
- HDassert(ret >= 0);
- HDfree(wdata);
+ assert(ret >= 0);
+ free(wdata);
} /* end if */
if (pass) {
@@ -2027,7 +2027,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_chk_i: H5Dclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* ds_chk_i */
@@ -2073,7 +2073,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5Dopen2() failed.";
}
- HDassert(dsid > 0);
+ assert(dsid > 0);
}
if (pass) {
@@ -2083,7 +2083,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5Dget_space() failed.";
}
- HDassert(sid > 0);
+ assert(sid > 0);
}
if (pass) {
@@ -2093,7 +2093,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: 1 != ndims";
}
- HDassert(1 == ndims);
+ assert(1 == ndims);
}
if (pass) {
@@ -2111,9 +2111,9 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: DSET_DIMS != max_dims[0]";
}
- HDassert(ret >= 0);
- HDassert(DSET_DIMS == dims[0]);
- HDassert(DSET_DIMS == max_dims[0]);
+ assert(ret >= 0);
+ assert(DSET_DIMS == dims[0]);
+ assert(DSET_DIMS == max_dims[0]);
}
if (pass) {
@@ -2123,7 +2123,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5Sclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -2133,7 +2133,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5Dget_type() failed.";
}
- HDassert(tid > 0);
+ assert(tid > 0);
}
if (pass) {
@@ -2143,7 +2143,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: tid != H5T_NATIVE_INT";
}
- HDassert(1 == type_equal);
+ assert(1 == type_equal);
}
if (pass) {
@@ -2153,7 +2153,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5Tclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -2171,9 +2171,9 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED";
}
- HDassert(ret >= 0);
- HDassert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) ||
- (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED));
+ assert(ret >= 0);
+ assert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) ||
+ (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED));
}
if (pass) {
@@ -2183,7 +2183,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5Dget_create_plist() failed.";
}
- HDassert(dcpl > 0);
+ assert(dcpl > 0);
}
if (pass) {
@@ -2193,7 +2193,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5D_CHUNKED != layout";
}
- HDassert(H5D_CHUNKED == layout);
+ assert(H5D_CHUNKED == layout);
}
if (pass) {
@@ -2207,8 +2207,8 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: ";
}
- HDassert(ret >= 0);
- HDassert(DSET_CHUNK_DIMS == chunk_dims[0]);
+ assert(ret >= 0);
+ assert(DSET_CHUNK_DIMS == chunk_dims[0]);
}
if (pass) {
@@ -2218,17 +2218,17 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5Pclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
- rdata = (int *)HDmalloc(sizeof(int) * DSET_DIMS);
+ rdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!rdata) {
pass = FALSE;
- failure_mssg = "vrfy_ds_chk_i: HDmalloc of rdata failed.";
+ failure_mssg = "vrfy_ds_chk_i: malloc of rdata failed.";
}
- HDassert(rdata);
+ assert(rdata);
}
if ((pass) && (write_data)) {
@@ -2237,7 +2237,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5Dread() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
@@ -2247,11 +2247,11 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
failure_mssg = "vrfy_ds_chk_i: u != rdata[u]";
break;
}
- HDassert((int)u == rdata[u]);
+ assert((int)u == rdata[u]);
}
} /* end if */
- HDfree(rdata);
+ free(rdata);
if (pass) {
ret = H5Dclose(dsid);
@@ -2260,7 +2260,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_chk_i: H5Dclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* vrfy_ds_chk_i() */
@@ -2302,7 +2302,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_cpt_i: H5Screate_simple() failed.";
}
- HDassert(sid > 0);
+ assert(sid > 0);
}
if (pass) {
@@ -2312,7 +2312,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_cpt_i: H5Pcreate() failed.";
}
- HDassert(dcpl > 0);
+ assert(dcpl > 0);
}
if (pass) {
@@ -2322,7 +2322,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_cpt_i: H5Pset_layout() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -2332,7 +2332,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_cpt_i: H5Dcreate2() failed.";
}
- HDassert(dsid > 0);
+ assert(dsid > 0);
}
if (pass) {
@@ -2342,7 +2342,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_cpt_i: H5Pclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -2352,17 +2352,17 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_cpt_i: H5Sclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
- wdata = (int *)HDmalloc(sizeof(int) * DSET_COMPACT_DIMS);
+ wdata = (int *)malloc(sizeof(int) * DSET_COMPACT_DIMS);
if (!wdata) {
pass = FALSE;
- failure_mssg = "ds_cpt_i: HDmalloc of wdata failed.";
+ failure_mssg = "ds_cpt_i: malloc of wdata failed.";
}
- HDassert(wdata);
+ assert(wdata);
}
if ((pass) && (write_data)) {
@@ -2375,9 +2375,9 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_cpt_i: H5Dwrite() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
- HDfree(wdata);
+ free(wdata);
} /* end if */
if (pass) {
@@ -2387,7 +2387,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_cpt_i: H5Dclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* ds_cpt_i() */
@@ -2433,7 +2433,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5Dopen2() failed.";
}
- HDassert(dsid > 0);
+ assert(dsid > 0);
}
if (pass) {
@@ -2443,7 +2443,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_space() failed.";
}
- HDassert(sid > 0);
+ assert(sid > 0);
}
if (pass) {
@@ -2453,7 +2453,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: 1 != ndims";
}
- HDassert(1 == ndims);
+ assert(1 == ndims);
}
if (pass) {
@@ -2471,9 +2471,9 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: DSET_COMPACT_DIMS != max_dims[0]";
}
- HDassert(ret >= 0);
- HDassert(DSET_COMPACT_DIMS == dims[0]);
- HDassert(DSET_COMPACT_DIMS == max_dims[0]);
+ assert(ret >= 0);
+ assert(DSET_COMPACT_DIMS == dims[0]);
+ assert(DSET_COMPACT_DIMS == max_dims[0]);
}
if (pass) {
@@ -2483,7 +2483,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5Sclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -2493,7 +2493,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_type() failed.";
}
- HDassert(tid > 0);
+ assert(tid > 0);
}
if (pass) {
@@ -2503,7 +2503,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: type != H5T_NATIVE_INT";
}
- HDassert(1 == type_equal);
+ assert(1 == type_equal);
}
if (pass) {
@@ -2513,7 +2513,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5Tclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -2527,8 +2527,8 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5D_SPACE_STATUS_ALLOCATED != allocation";
}
- HDassert(ret >= 0);
- HDassert(H5D_SPACE_STATUS_ALLOCATED == allocation);
+ assert(ret >= 0);
+ assert(H5D_SPACE_STATUS_ALLOCATED == allocation);
}
if (pass) {
@@ -2538,7 +2538,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_create_plist() failed.";
}
- HDassert(dcpl > 0);
+ assert(dcpl > 0);
}
if (pass) {
@@ -2548,7 +2548,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5D_COMPACT != layout";
}
- HDassert(H5D_COMPACT == layout);
+ assert(H5D_COMPACT == layout);
}
if (pass) {
@@ -2558,17 +2558,17 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5Pclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
- rdata = (int *)HDmalloc(sizeof(int) * DSET_COMPACT_DIMS);
+ rdata = (int *)malloc(sizeof(int) * DSET_COMPACT_DIMS);
if (!rdata) {
pass = FALSE;
- failure_mssg = "vrfy_ds_cpt_i: HDmalloc of rdata failed.";
+ failure_mssg = "vrfy_ds_cpt_i: malloc of rdata failed.";
}
- HDassert(rdata);
+ assert(rdata);
}
if ((pass) && (write_data)) {
@@ -2577,7 +2577,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5Dread() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
@@ -2587,11 +2587,11 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
failure_mssg = "vrfy_ds_cpt_i: (int)u != rdata[u]";
break;
}
- HDassert((int)u == rdata[u]);
+ assert((int)u == rdata[u]);
}
} /* end if */
- HDfree(rdata);
+ free(rdata);
if (pass) {
ret = H5Dclose(dsid);
@@ -2600,7 +2600,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_cpt_i: H5Dclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* vrfy_ds_cpt_i() */
@@ -2642,7 +2642,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_v: H5Screate_simple";
}
- HDassert(sid > 0);
+ assert(sid > 0);
}
if (pass) {
@@ -2652,7 +2652,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_v: H5Tvlen_create() failed.";
}
- HDassert(tid > 0);
+ assert(tid > 0);
}
if (pass) {
@@ -2662,17 +2662,17 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_v: H5Dcreate2() failed.";
}
- HDassert(dsid > 0);
+ assert(dsid > 0);
}
if ((pass) && (write_data)) {
- wdata = (hvl_t *)HDmalloc(sizeof(hvl_t) * DSET_SMALL_DIMS);
+ wdata = (hvl_t *)malloc(sizeof(hvl_t) * DSET_SMALL_DIMS);
if (!wdata) {
pass = FALSE;
- failure_mssg = "ds_ctg_v: HDmalloc of wdata failed.";
+ failure_mssg = "ds_ctg_v: malloc of wdata failed.";
}
- HDassert(wdata);
+ assert(wdata);
}
if ((pass) && (write_data)) {
@@ -2682,14 +2682,14 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
unsigned v;
len = (u % 10) + 1;
- tdata = (int *)HDmalloc(sizeof(int) * len);
+ tdata = (int *)malloc(sizeof(int) * len);
if (!tdata) {
pass = FALSE;
- failure_mssg = "ds_ctg_v: HDmalloc of tdata failed.";
+ failure_mssg = "ds_ctg_v: malloc of tdata failed.";
break;
}
- HDassert(tdata);
+ assert(tdata);
for (v = 0; v < len; v++)
tdata[v] = (int)(u + v);
@@ -2706,7 +2706,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_v: H5Dwrite() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
@@ -2716,9 +2716,9 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_v: H5Treclaim() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
- HDfree(wdata);
+ free(wdata);
} /* end if */
if (pass) {
@@ -2728,7 +2728,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_v: H5Sclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -2738,7 +2738,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_v: H5Tclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -2748,7 +2748,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "ds_ctg_v: H5Dclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* ds_ctg_v() */
@@ -2795,7 +2795,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Dopen2() failed.";
}
- HDassert(dsid > 0);
+ assert(dsid > 0);
}
if (pass) {
@@ -2805,7 +2805,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_space() failed";
}
- HDassert(sid > 0);
+ assert(sid > 0);
}
if (pass) {
@@ -2815,7 +2815,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: 1 != ndims";
}
- HDassert(1 == ndims);
+ assert(1 == ndims);
}
if (pass) {
@@ -2833,9 +2833,9 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: DSET_SMALL_DIMS != max_dims[0]";
}
- HDassert(ret >= 0);
- HDassert(DSET_SMALL_DIMS == dims[0]);
- HDassert(DSET_SMALL_DIMS == max_dims[0]);
+ assert(ret >= 0);
+ assert(DSET_SMALL_DIMS == dims[0]);
+ assert(DSET_SMALL_DIMS == max_dims[0]);
}
if (pass) {
@@ -2845,7 +2845,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_type() failed.";
}
- HDassert(tid > 0);
+ assert(tid > 0);
}
if (pass) {
@@ -2855,7 +2855,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Tvlen_create() failed.";
}
- HDassert(tmp_tid > 0);
+ assert(tmp_tid > 0);
}
if (pass) {
@@ -2865,7 +2865,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: type != vlen H5T_NATIVE_INT";
}
- HDassert(1 == type_equal);
+ assert(1 == type_equal);
}
if (pass) {
@@ -2875,7 +2875,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Tclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -2893,9 +2893,9 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED";
}
- HDassert(ret >= 0);
- HDassert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) ||
- (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED));
+ assert(ret >= 0);
+ assert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) ||
+ (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED));
}
if (pass) {
@@ -2905,7 +2905,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_create_plist() failed.";
}
- HDassert(dcpl > 0);
+ assert(dcpl > 0);
}
if (pass) {
@@ -2915,7 +2915,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5D_CONTIGUOUS != layout";
}
- HDassert(H5D_CONTIGUOUS == layout);
+ assert(H5D_CONTIGUOUS == layout);
}
if (pass) {
@@ -2925,17 +2925,17 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Pclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
- rdata = (hvl_t *)HDmalloc(sizeof(hvl_t) * DSET_SMALL_DIMS);
+ rdata = (hvl_t *)malloc(sizeof(hvl_t) * DSET_SMALL_DIMS);
if (!rdata) {
pass = FALSE;
- failure_mssg = "vrfy_ds_ctg_v: HDmalloc of rdata failed.";
+ failure_mssg = "vrfy_ds_ctg_v: malloc of rdata failed.";
}
- HDassert(rdata);
+ assert(rdata);
}
if ((pass) && (write_data)) {
@@ -2945,7 +2945,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Dread() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if ((pass) && (write_data)) {
@@ -2967,8 +2967,8 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
failure_mssg = "vrfy_ds_ctg_v: (int)(u + v) != tdata[v]";
break;
}
- HDassert(tdata);
- HDassert((int)(u + v) == tdata[v]);
+ assert(tdata);
+ assert((int)(u + v) == tdata[v]);
} /* end for */
} /* end for */
}
@@ -2980,10 +2980,10 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Treclaim() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
} /* end if */
- HDfree(rdata);
+ free(rdata);
if (pass) {
ret = H5Sclose(sid);
@@ -2992,7 +2992,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Sclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -3002,7 +3002,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Tclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
if (pass) {
@@ -3012,7 +3012,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
pass = FALSE;
failure_mssg = "vrfy_ds_ctg_v: H5Dclose() failed.";
}
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
} /* vrfy_ds_ctg_v() */
@@ -3051,31 +3051,31 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
{
char full_path[1024];
- HDassert(base_path);
+ assert(base_path);
/* Add & verify an empty "new style" group */
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ns_grp_0(fid, full_path);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ns_grp_0(fid, full_path);
}
/* Add & verify a compact "new style" group (3 link messages) */
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ns_grp_c(fid, full_path, 3);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ns_grp_c(fid, full_path, 3);
}
@@ -3084,26 +3084,26 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ns_grp_d(fid, full_path, 300);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ns_grp_d(fid, full_path, 300);
}
/* Add & verify an empty "old style" group to file */
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
os_grp_0(fid, full_path);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_os_grp_0(fid, full_path);
}
@@ -3112,13 +3112,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
os_grp_n(fid, full_path, proc_num, 300);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_os_grp_n(fid, full_path, proc_num, 300);
}
@@ -3127,13 +3127,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ds_ctg_i(fid, full_path, FALSE);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_ctg_i(fid, full_path, FALSE);
}
@@ -3142,13 +3142,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ds_ctg_i(fid, full_path, TRUE);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_ctg_i(fid, full_path, TRUE);
}
@@ -3157,13 +3157,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ds_chk_i(fid, full_path, FALSE);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_chk_i(fid, full_path, FALSE);
}
@@ -3172,13 +3172,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ds_chk_i(fid, full_path, TRUE);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_chk_i(fid, full_path, TRUE);
}
@@ -3187,13 +3187,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ds_cpt_i(fid, full_path, FALSE);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_cpt_i(fid, full_path, FALSE);
}
@@ -3202,13 +3202,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ds_cpt_i(fid, full_path, TRUE);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_cpt_i(fid, full_path, TRUE);
}
@@ -3217,13 +3217,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ds_ctg_v(fid, full_path, FALSE);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_ctg_v(fid, full_path, FALSE);
}
@@ -3232,13 +3232,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
ds_ctg_v(fid, full_path, TRUE);
}
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_ctg_v(fid, full_path, TRUE);
}
@@ -3276,19 +3276,19 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
{
char full_path[1024];
- HDassert(base_path);
+ assert(base_path);
/* validate an empty "new style" group */
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ns_grp_0(fid, full_path);
}
/* validate a compact "new style" group (3 link messages) */
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ns_grp_c(fid, full_path, 3);
}
@@ -3297,14 +3297,14 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ns_grp_d(fid, full_path, 300);
}
/* validate an empty "old style" group in file */
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_os_grp_0(fid, full_path);
}
@@ -3313,7 +3313,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_os_grp_n(fid, full_path, proc_num, 300);
}
@@ -3322,7 +3322,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_ctg_i(fid, full_path, FALSE);
}
@@ -3331,7 +3331,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_ctg_i(fid, full_path, TRUE);
}
@@ -3340,7 +3340,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_chk_i(fid, full_path, FALSE);
}
@@ -3349,7 +3349,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_chk_i(fid, full_path, TRUE);
}
@@ -3358,7 +3358,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_cpt_i(fid, full_path, FALSE);
}
@@ -3367,7 +3367,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_cpt_i(fid, full_path, TRUE);
}
@@ -3376,7 +3376,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_ctg_v(fid, full_path, FALSE);
}
@@ -3385,7 +3385,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
*/
if (pass) {
HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- HDassert(HDstrlen(full_path) < 1024);
+ assert(HDstrlen(full_path) < 1024);
vrfy_ds_ctg_v(fid, full_path, TRUE);
}
diff --git a/test/getname.c b/test/getname.c
index f1d43ea..ffca62f 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -1470,7 +1470,7 @@ test_main(hid_t file_id, hid_t fapl)
char *name3;
/* Include the extra null character */
- name3 = (char *)HDmalloc(name_len + 1);
+ name3 = (char *)malloc(name_len + 1);
if (!name3)
TEST_ERROR;
@@ -1493,7 +1493,7 @@ test_main(hid_t file_id, hid_t fapl)
if (HDstrcmp(name3, "/g") != 0)
TEST_ERROR;
- HDfree(name3);
+ free(name3);
}
/* Close */
@@ -3327,7 +3327,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
PASSED();
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
TESTING("getting path to dataset in /Group1");
if ((dataset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[1])) < 0)
FAIL_STACK_ERROR;
@@ -3343,7 +3343,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
PASSED();
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
TESTING("getting path to /Group1");
if ((group = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[2])) < 0)
FAIL_STACK_ERROR;
@@ -3359,7 +3359,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
PASSED();
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
TESTING("getting path to datatype in /Group1");
if ((tid1 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[3])) < 0)
FAIL_STACK_ERROR;
@@ -3375,7 +3375,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
PASSED();
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
TESTING("getting path to dataset in nested group");
if ((dataset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[4])) < 0)
FAIL_STACK_ERROR;
@@ -3391,7 +3391,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
PASSED();
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
TESTING("getting path to nested group");
if ((group = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[5])) < 0)
FAIL_STACK_ERROR;
@@ -3407,7 +3407,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
PASSED();
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
TESTING("getting path to dataset created via hard link");
if ((dataset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[6])) < 0)
FAIL_STACK_ERROR;
@@ -3423,7 +3423,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
PASSED();
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
TESTING("getting path to root group");
if ((group = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[7])) < 0)
FAIL_STACK_ERROR;
diff --git a/test/gheap.c b/test/gheap.c
index 4369b1b..28f05a6 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -81,7 +81,7 @@ test_1(hid_t fapl)
TESTING("monotonically increasing lengths");
/* Allocate buffer for H5HG_t */
- if (NULL == (obj = (H5HG_t *)HDmalloc(sizeof(H5HG_t) * GHEAP_TEST_NOBJS)))
+ if (NULL == (obj = (H5HG_t *)malloc(sizeof(H5HG_t) * GHEAP_TEST_NOBJS)))
goto error;
/* Open a clean file */
@@ -101,7 +101,7 @@ test_1(hid_t fapl)
*/
for (u = 0; u < GHEAP_TEST_NOBJS; u++) {
size = u + 1;
- HDmemset(out, (int)('A' + u % 26), size);
+ memset(out, (int)('A' + u % 26), size);
H5Eclear2(H5E_DEFAULT);
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
@@ -121,14 +121,14 @@ test_1(hid_t fapl)
*/
for (u = 0; u < GHEAP_TEST_NOBJS; u++) {
size = u + 1;
- HDmemset(out, (int)('A' + u % 26), size);
+ memset(out, (int)('A' + u % 26), size);
H5Eclear2(H5E_DEFAULT);
if (NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
HDputs(" Unable to read object");
nerrors++;
}
- else if (HDmemcmp(in, out, size) != 0) {
+ else if (memcmp(in, out, size) != 0) {
H5_FAILED();
HDputs(" Value read doesn't match value written");
nerrors++;
@@ -136,7 +136,7 @@ test_1(hid_t fapl)
}
/* Release buffer */
- HDfree(obj);
+ free(obj);
obj = NULL;
if (H5Fclose(file) < 0)
@@ -154,7 +154,7 @@ error:
}
H5E_END_TRY;
if (obj)
- HDfree(obj);
+ free(obj);
return MAX(1, nerrors);
}
@@ -189,7 +189,7 @@ test_2(hid_t fapl)
TESTING("monotonically decreasing lengths");
/* Allocate buffer for H5HG_t */
- if (NULL == (obj = (H5HG_t *)HDmalloc(sizeof(H5HG_t) * GHEAP_TEST_NOBJS)))
+ if (NULL == (obj = (H5HG_t *)malloc(sizeof(H5HG_t) * GHEAP_TEST_NOBJS)))
goto error;
/* Open a clean file */
@@ -207,7 +207,7 @@ test_2(hid_t fapl)
*/
for (u = 0; u < GHEAP_TEST_NOBJS; u++) {
size = GHEAP_TEST_NOBJS - u;
- HDmemset(out, (int)('A' + u % 26), size);
+ memset(out, (int)('A' + u % 26), size);
H5Eclear2(H5E_DEFAULT);
if (H5HG_insert(f, size, out, obj + u) < 0) {
H5_FAILED();
@@ -221,14 +221,14 @@ test_2(hid_t fapl)
*/
for (u = 0; u < GHEAP_TEST_NOBJS; u++) {
size = GHEAP_TEST_NOBJS - u;
- HDmemset(out, (int)('A' + u % 26), size);
+ memset(out, (int)('A' + u % 26), size);
H5Eclear2(H5E_DEFAULT);
if (NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
HDputs(" Unable to read object");
nerrors++;
}
- else if (HDmemcmp(in, out, size) != 0) {
+ else if (memcmp(in, out, size) != 0) {
H5_FAILED();
HDputs(" Value read doesn't match value written");
nerrors++;
@@ -236,7 +236,7 @@ test_2(hid_t fapl)
}
/* Release buffer */
- HDfree(obj);
+ free(obj);
obj = NULL;
if (H5Fclose(file) < 0)
@@ -254,7 +254,7 @@ error:
}
H5E_END_TRY;
if (obj)
- HDfree(obj);
+ free(obj);
return MAX(1, nerrors);
}
@@ -289,7 +289,7 @@ test_3(hid_t fapl)
TESTING("complete object removal");
/* Allocate buffer for H5HG_t */
- if (NULL == (obj = (H5HG_t *)HDmalloc(sizeof(H5HG_t) * GHEAP_TEST_NOBJS)))
+ if (NULL == (obj = (H5HG_t *)malloc(sizeof(H5HG_t) * GHEAP_TEST_NOBJS)))
goto error;
/* Open a clean file */
@@ -305,7 +305,7 @@ test_3(hid_t fapl)
/* Create some stuff */
for (u = 0; u < GHEAP_TEST_NOBJS; u++) {
size = u % 30 + 100;
- HDmemset(out, (int)('A' + u % 26), size);
+ memset(out, (int)('A' + u % 26), size);
H5Eclear2(H5E_DEFAULT);
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
@@ -326,7 +326,7 @@ test_3(hid_t fapl)
}
/* Release buffer */
- HDfree(obj);
+ free(obj);
obj = NULL;
if (H5Fclose(file) < 0)
@@ -344,7 +344,7 @@ error:
}
H5E_END_TRY;
if (obj)
- HDfree(obj);
+ free(obj);
return MAX(1, nerrors);
}
@@ -380,7 +380,7 @@ test_4(hid_t fapl)
TESTING("partial object removal");
/* Allocate buffer for H5HG_t */
- if (NULL == (obj = (H5HG_t *)HDmalloc(sizeof(H5HG_t) * GHEAP_TEST_NOBJS)))
+ if (NULL == (obj = (H5HG_t *)malloc(sizeof(H5HG_t) * GHEAP_TEST_NOBJS)))
goto error;
/* Open a clean file */
@@ -396,7 +396,7 @@ test_4(hid_t fapl)
for (u = 0; u < GHEAP_TEST_NOBJS; u++) {
/* Insert */
size = u % 30 + 100;
- HDmemset(out, (int)('A' + u % 26), size);
+ memset(out, (int)('A' + u % 26), size);
H5Eclear2(H5E_DEFAULT);
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
@@ -417,12 +417,12 @@ test_4(hid_t fapl)
HDputs(" Unable to remove object");
nerrors++;
}
- HDmemset(obj + u - 1, 0, sizeof *obj);
+ memset(obj + u - 1, 0, sizeof *obj);
}
}
/* Release buffer */
- HDfree(obj);
+ free(obj);
obj = NULL;
if (H5Fclose(file) < 0)
@@ -440,7 +440,7 @@ error:
}
H5E_END_TRY;
if (obj)
- HDfree(obj);
+ free(obj);
return MAX(1, nerrors);
}
@@ -474,7 +474,7 @@ test_ooo_indices(hid_t fapl)
TESTING("out of order indices");
- if (NULL == (obj = (H5HG_t *)HDmalloc(2000 * sizeof(*obj))))
+ if (NULL == (obj = (H5HG_t *)malloc(2000 * sizeof(*obj))))
goto error;
/* Open a clean file */
@@ -517,8 +517,8 @@ test_ooo_indices(hid_t fapl)
}
/* The indices should have "wrapped around" on the last iteration */
- HDassert(obj[534].idx == 65535);
- HDassert(obj[535].idx == 1);
+ assert(obj[534].idx == 65535);
+ assert(obj[535].idx == 1);
/* Reopen the file */
if (H5Fclose(file) < 0)
@@ -546,7 +546,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (nerrors)
goto error;
- HDfree(obj);
+ free(obj);
obj = NULL;
PASSED();
@@ -559,7 +559,7 @@ error:
}
H5E_END_TRY;
if (obj)
- HDfree(obj);
+ free(obj);
return MAX(1, nerrors);
} /* end test_ooo_indices */
@@ -608,7 +608,7 @@ main(void)
api_ctx_pushed = FALSE;
h5_cleanup(FILENAME, fapl_id);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
H5E_BEGIN_TRY
@@ -621,5 +621,5 @@ error:
H5CX_pop(FALSE);
HDputs("*** TESTS FAILED ***");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/h5test.c b/test/h5test.c
index e3a3fb0..c3ea52f 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -310,7 +310,7 @@ void
h5_restore_err(void)
{
/* Restore the original error reporting routine */
- HDassert(err_func != NULL);
+ assert(err_func != NULL);
H5Eset_auto2(H5E_DEFAULT, err_func, NULL);
err_func = NULL;
}
@@ -330,12 +330,12 @@ h5_restore_err(void)
void
h5_reset(void)
{
- HDfflush(stdout);
- HDfflush(stderr);
+ fflush(stdout);
+ fflush(stderr);
H5close();
/* Save current error stack reporting routine and redirect to our local one */
- HDassert(err_func == NULL);
+ assert(err_func == NULL);
H5Eget_auto2(H5E_DEFAULT, &err_func, NULL);
H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL);
@@ -390,12 +390,12 @@ h5_reset(void)
void
h5_test_init(void)
{
- HDfflush(stdout);
- HDfflush(stderr);
+ fflush(stdout);
+ fflush(stderr);
H5close();
/* Save current error stack reporting routine and redirect to our local one */
- HDassert(err_func == NULL);
+ assert(err_func == NULL);
H5Eget_auto2(H5E_DEFAULT, &err_func, NULL);
H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL);
} /* end h5_test_init() */
@@ -534,7 +534,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!base_name || !fullname || size < 1)
return NULL;
- HDmemset(fullname, 0, size);
+ memset(fullname, 0, size);
/* Determine if driver is set by environment variable. If it is,
* only generate a suffix if fixing the filename for the superblock
@@ -626,13 +626,13 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (mpi_rank == 0)
- HDprintf("*** Hint ***\n"
- "You can use environment variable HDF5_PARAPREFIX to "
- "run parallel test files in a\n"
- "different directory or to add file type prefix. e.g.,\n"
- " HDF5_PARAPREFIX=pfs:/PFS/user/me\n"
- " export HDF5_PARAPREFIX\n"
- "*** End of Hint ***\n");
+ printf("*** Hint ***\n"
+ "You can use environment variable HDF5_PARAPREFIX to "
+ "run parallel test files in a\n"
+ "different directory or to add file type prefix. e.g.,\n"
+ " HDF5_PARAPREFIX=pfs:/PFS/user/me\n"
+ " export HDF5_PARAPREFIX\n"
+ "*** End of Hint ***\n");
explained = TRUE;
#ifdef HDF5_PARAPREFIX
@@ -958,13 +958,13 @@ h5_show_hostname(void)
if (mpi_initialized && !mpi_finalized) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDprintf("MPI-process %d.", mpi_rank);
+ printf("MPI-process %d.", mpi_rank);
}
else
- HDprintf("thread 0.");
+ printf("thread 0.");
}
#else
- HDprintf("thread %" PRIu64 ".", H5TS_thread_id());
+ printf("thread %" PRIu64 ".", H5TS_thread_id());
#endif
#ifdef H5_HAVE_WIN32_API
@@ -989,11 +989,11 @@ h5_show_hostname(void)
#endif
#ifdef H5_HAVE_GETHOSTNAME
if (HDgethostname(hostname, (size_t)80) < 0)
- HDprintf(" gethostname failed\n");
+ printf(" gethostname failed\n");
else
- HDprintf(" hostname=%s\n", hostname);
+ printf(" hostname=%s\n", hostname);
#else
- HDprintf(" gethostname not supported\n");
+ printf(" gethostname not supported\n");
#endif
#ifdef H5_HAVE_WIN32_API
WSACleanup();
@@ -1037,7 +1037,7 @@ h5_set_info_object(void)
/* copy key/value pair into temporary buffer */
len = HDstrcspn(valp, ";");
next = &valp[len];
- if (NULL == (key_val = (char *)HDcalloc(1, len + 1)))
+ if (NULL == (key_val = (char *)calloc(1, len + 1)))
return -1;
/* increment the next pointer past the terminating semicolon */
@@ -1080,16 +1080,16 @@ h5_set_info_object(void)
/* actually set the darned thing */
if (MPI_SUCCESS != MPI_Info_set(h5_io_info_g, namep, valp)) {
- HDprintf("MPI_Info_set failed\n");
+ printf("MPI_Info_set failed\n");
ret_value = -1;
}
}
valp = next;
- HDfree(key_val);
+ free(key_val);
} while (next && *next);
- HDfree(envp);
+ free(envp);
}
return ret_value;
@@ -1109,17 +1109,17 @@ h5_dump_info_object(MPI_Info info)
int flag;
int i, nkeys;
- HDprintf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
+ printf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
if (info == MPI_INFO_NULL) {
- HDprintf("object is MPI_INFO_NULL\n");
+ printf("object is MPI_INFO_NULL\n");
}
else {
MPI_Info_get_nkeys(info, &nkeys);
- HDprintf("object has %d items\n", nkeys);
+ printf("object has %d items\n", nkeys);
for (i = 0; i < nkeys; i++) {
MPI_Info_get_nthkey(info, i, key);
MPI_Info_get(info, key, MPI_MAX_INFO_VAL, value, &flag);
- HDprintf("%s=%s\n", key, value);
+ printf("%s=%s\n", key, value);
}
}
}
@@ -1208,7 +1208,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
} /* end for */
}
else {
- HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
/* Create the filename to query */
HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
@@ -1309,9 +1309,9 @@ print_func(const char *format, ...)
va_list arglist;
int ret_value;
- HDva_start(arglist, format);
+ va_start(arglist, format);
ret_value = HDvprintf(format, arglist);
- HDva_end(arglist);
+ va_end(arglist);
return ret_value;
}
@@ -1388,7 +1388,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
int len;
static char *env = NULL;
- HDassert(name);
+ assert(name);
MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
@@ -1396,7 +1396,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (mpi_initialized && !mpi_finalized) {
MPI_Comm_rank(comm, &mpi_rank);
MPI_Comm_size(comm, &mpi_size);
- HDassert(root < mpi_size);
+ assert(root < mpi_size);
/* The root task does the getenv call
* and sends the result to the other tasks */
@@ -1417,16 +1417,16 @@ getenv_all(MPI_Comm comm, int root, const char *name)
MPI_Bcast(&len, 1, MPI_INT, root, comm);
if (len >= 0) {
if (env == NULL)
- env = (char *)HDmalloc((size_t)len + 1);
+ env = (char *)malloc((size_t)len + 1);
else if (HDstrlen(env) < (size_t)len)
- env = (char *)HDrealloc(env, (size_t)len + 1);
+ env = (char *)realloc(env, (size_t)len + 1);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
env[len] = '\0';
}
else {
if (env)
- HDfree(env);
+ free(env);
env = NULL;
}
}
@@ -1437,7 +1437,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
else {
/* use original getenv */
if (env)
- HDfree(env);
+ free(env);
env = HDgetenv(name);
} /* end if */
@@ -1476,7 +1476,7 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name)
goto error;
/* Allocate copy buffer */
- if (NULL == (buf = HDcalloc((size_t)1, (size_t)READ_BUF_SIZE)))
+ if (NULL == (buf = calloc((size_t)1, (size_t)READ_BUF_SIZE)))
goto error;
/* Copy old file into temporary file */
@@ -1497,7 +1497,7 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name)
goto error;
/* Release memory */
- HDfree(buf);
+ free(buf);
return 0;
@@ -1507,7 +1507,7 @@ error:
HDclose(fd_old);
if (fd_new > 0)
HDclose(fd_new);
- HDfree(buf);
+ free(buf);
return -1;
} /* end h5_make_local_copy() */
@@ -1625,20 +1625,20 @@ h5_send_message(const char *send, const char *arg1, const char *arg2)
FILE *signalfile = NULL;
/* Create signal file (which will send signal to some other process) */
- signalfile = HDfopen(TMP_SIGNAL_FILE, "w+");
+ signalfile = fopen(TMP_SIGNAL_FILE, "w+");
/* Write messages to signal file, if provided */
if (arg2 != NULL) {
- HDassert(arg1);
- HDfprintf(signalfile, "%s\n%s\n", arg1, arg2);
+ assert(arg1);
+ fprintf(signalfile, "%s\n%s\n", arg1, arg2);
} /* end if */
else if (arg1 != NULL) {
- HDassert(arg2 == NULL);
- HDfprintf(signalfile, "%s\n", arg1);
+ assert(arg2 == NULL);
+ fprintf(signalfile, "%s\n", arg1);
} /* end if */
else {
- HDassert(arg1 == NULL);
- HDassert(arg2 == NULL);
+ assert(arg1 == NULL);
+ assert(arg2 == NULL);
} /* end else */
HDfclose(signalfile);
@@ -1685,7 +1685,7 @@ h5_wait_message(const char *waitfor)
HDtime(&t0);
/* Wait for return signal from some other process */
- while ((returnfile = HDfopen(waitfor, "r")) == NULL) {
+ while ((returnfile = fopen(waitfor, "r")) == NULL) {
/* make note of current time. */
HDtime(&t1);
@@ -1694,7 +1694,7 @@ h5_wait_message(const char *waitfor)
it was likely never sent and we should fail rather
than loop infinitely */
if (HDdifftime(t1, t0) > MESSAGE_TIMEOUT) {
- HDfprintf(stdout, "Error communicating between processes. Make sure test script is running.\n");
+ fprintf(stdout, "Error communicating between processes. Make sure test script is running.\n");
TEST_ERROR;
} /* end if */
} /* end while */
@@ -1838,17 +1838,17 @@ h5_get_dummy_vfd_class(void)
H5FD_class_t *vfd_class = NULL; /* Dummy VFD that will be returned */
/* Create the class and initialize everything to zero/NULL */
- if (NULL == (vfd_class = (H5FD_class_t *)HDmalloc(sizeof(H5FD_class_t))))
+ if (NULL == (vfd_class = (H5FD_class_t *)malloc(sizeof(H5FD_class_t))))
TEST_ERROR;
/* Copy the dummy VFD */
- HDmemcpy(vfd_class, &H5FD_dummy_g, sizeof(H5FD_class_t));
+ memcpy(vfd_class, &H5FD_dummy_g, sizeof(H5FD_class_t));
return vfd_class;
error:
if (vfd_class)
- HDfree(vfd_class);
+ free(vfd_class);
return NULL;
} /* h5_get_dummy_vfd_class */
@@ -1878,7 +1878,7 @@ h5_get_dummy_vol_class(void)
H5VL_class_t *vol_class = NULL; /* Dummy VOL class that will be returned */
/* Create the class and initialize everything to zero/NULL */
- if (NULL == (vol_class = (H5VL_class_t *)HDcalloc((size_t)1, sizeof(H5VL_class_t))))
+ if (NULL == (vol_class = (H5VL_class_t *)calloc((size_t)1, sizeof(H5VL_class_t))))
TEST_ERROR;
/* Fill in the minimum parameters to make a VOL connector class that
@@ -1891,7 +1891,7 @@ h5_get_dummy_vol_class(void)
error:
if (vol_class)
- HDfree(vol_class);
+ free(vol_class);
return NULL;
} /* h5_get_dummy_vol_class */
@@ -1935,15 +1935,15 @@ h5_compare_file_bytes(char *f1name, char *f2name)
int ret_value = 0; /* for error handling */
/* Open files for reading */
- f1ptr = HDfopen(f1name, "rb");
+ f1ptr = fopen(f1name, "rb");
if (f1ptr == NULL) {
- HDfprintf(stderr, "Unable to fopen() %s\n", f1name);
+ fprintf(stderr, "Unable to fopen() %s\n", f1name);
ret_value = -1;
goto done;
}
- f2ptr = HDfopen(f2name, "rb");
+ f2ptr = fopen(f2name, "rb");
if (f2ptr == NULL) {
- HDfprintf(stderr, "Unable to fopen() %s\n", f2name);
+ fprintf(stderr, "Unable to fopen() %s\n", f2name);
ret_value = -1;
goto done;
}
@@ -1956,8 +1956,8 @@ h5_compare_file_bytes(char *f1name, char *f2name)
f2size = HDftell(f2ptr);
if (f1size != f2size) {
- HDfprintf(stderr, "Files differ in size, %" PRIuHSIZE " vs. %" PRIuHSIZE "\n", (hsize_t)f1size,
- (hsize_t)f2size);
+ fprintf(stderr, "Files differ in size, %" PRIuHSIZE " vs. %" PRIuHSIZE "\n", (hsize_t)f1size,
+ (hsize_t)f2size);
ret_value = -1;
goto done;
}
@@ -1975,7 +1975,7 @@ h5_compare_file_bytes(char *f1name, char *f2name)
goto done;
}
if (f1char != f2char) {
- HDfprintf(stderr, "Mismatch @ 0x%" PRIXHSIZE ": 0x%X != 0x%X\n", (hsize_t)ii, f1char, f2char);
+ fprintf(stderr, "Mismatch @ 0x%" PRIXHSIZE ": 0x%X != 0x%X\n", (hsize_t)ii, f1char, f2char);
ret_value = -1;
goto done;
}
@@ -2075,7 +2075,7 @@ h5_duplicate_file_by_bytes(const char *orig, const char *dest)
max_buf = 4096 * sizeof(char);
- orig_ptr = HDfopen(orig, "rb");
+ orig_ptr = fopen(orig, "rb");
if (NULL == orig_ptr) {
ret_value = -1;
goto done;
@@ -2085,14 +2085,14 @@ h5_duplicate_file_by_bytes(const char *orig, const char *dest)
fsize = (hsize_t)HDftell(orig_ptr);
HDrewind(orig_ptr);
- dest_ptr = HDfopen(dest, "wb");
+ dest_ptr = fopen(dest, "wb");
if (NULL == dest_ptr) {
ret_value = -1;
goto done;
}
read_size = MIN(fsize, max_buf);
- dup_buf = HDmalloc(read_size);
+ dup_buf = malloc(read_size);
if (NULL == dup_buf) {
ret_value = -1;
goto done;
@@ -2114,7 +2114,7 @@ done:
if (dest_ptr != NULL)
HDfclose(dest_ptr);
if (dup_buf != NULL)
- HDfree(dup_buf);
+ free(dup_buf);
return ret_value;
} /* end h5_duplicate_file_by_bytes() */
@@ -2192,7 +2192,7 @@ h5_using_default_driver(const char *drv_name)
{
hbool_t ret_val = TRUE;
- HDassert(H5_DEFAULT_VFD == H5FD_SEC2);
+ assert(H5_DEFAULT_VFD == H5FD_SEC2);
if (!drv_name)
drv_name = HDgetenv(HDF5_DRIVER);
@@ -2224,8 +2224,8 @@ h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel)
hid_t driver_id = H5I_INVALID_HID;
herr_t ret_value = SUCCEED;
- HDassert(fapl_id >= 0);
- HDassert(driver_is_parallel);
+ assert(fapl_id >= 0);
+ assert(driver_is_parallel);
if (fapl_id == H5P_DEFAULT)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
@@ -2267,8 +2267,8 @@ h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatib
hid_t driver_id = H5I_INVALID_HID;
herr_t ret_value = SUCCEED;
- HDassert(fapl_id >= 0);
- HDassert(default_vfd_compatible);
+ assert(fapl_id >= 0);
+ assert(default_vfd_compatible);
if (fapl_id == H5P_DEFAULT)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
diff --git a/test/hdfs.c b/test/hdfs.c
index bf8e840..a2b2444 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -102,7 +102,7 @@
*/
#define JSFAILED_AT() \
{ \
- HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
+ printf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
}
/*----------------------------------------------------------------------------
@@ -193,10 +193,10 @@
{ \
JSFAILED_AT() \
if (reason != NULL) { \
- HDprintf("%s\n", (reason)); \
+ printf("%s\n", (reason)); \
} \
else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
+ printf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
} \
}
@@ -233,10 +233,10 @@
const char *_reason = reason; \
JSFAILED_AT() \
if (_reason != NULL) { \
- HDprintf("%s\n", _reason); \
+ printf("%s\n", _reason); \
} \
else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
+ printf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
} \
}
@@ -413,7 +413,7 @@ test_fapl_config_validation(void)
TESTING("HDFS fapl configuration validation");
SKIPPED();
HDputs(" HDFS VFD is not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
@@ -621,7 +621,7 @@ test_hdfs_fapl(void)
TESTING("HDFS fapl ");
SKIPPED();
HDputs(" HDFS VFD is not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
@@ -707,7 +707,7 @@ test_vfd_open(void)
TESTING("HDFS VFD-level open");
SKIPPED();
HDputs(" HDFS VFD is not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
@@ -855,7 +855,7 @@ test_vfd_open(void)
}
#if HDFS_TEST_DEBUG
- HDfprintf(stderr, "testing: %s\n", T.message);
+ fprintf(stderr, "testing: %s\n", T.message);
#endif /* HDFS_TEST_DEBUG */
H5E_BEGIN_TRY
@@ -865,9 +865,9 @@ test_vfd_open(void)
H5E_END_TRY;
if (NULL != fd) {
if (TRUE == T.might_use_other_driver && H5FD_HDFS != fd->driver_id) {
- HDfprintf(stderr, "\n!!!!! WARNING !!!!!\n"
- " Successful open of file on local system "
- "with non-HDFS VFD.\n");
+ fprintf(stderr, "\n!!!!! WARNING !!!!!\n"
+ " Successful open of file on local system "
+ "with non-HDFS VFD.\n");
JSVERIFY(SUCCEED, H5FDclose(fd), "unable to close errant open");
fd = NULL;
}
@@ -880,7 +880,7 @@ test_vfd_open(void)
FAIL_IF(NULL != fd) /* sanity check */
#if HDFS_TEST_DEBUG
- HDfprintf(stderr, "nominal open\n");
+ fprintf(stderr, "nominal open\n");
#endif /* HDFS_TEST_DEBUG */
/* finally, show that a file can be opened
@@ -893,7 +893,7 @@ test_vfd_open(void)
************/
#if HDFS_TEST_DEBUG
- HDfprintf(stderr, "teardown...\n");
+ fprintf(stderr, "teardown...\n");
#endif /* HDFS_TEST_DEBUG */
FAIL_IF(FAIL == H5FDclose(fd))
@@ -963,7 +963,7 @@ test_eof_eoa(void)
TESTING("HDFS eof/eoa gets and sets");
SKIPPED();
HDputs(" HDFS VFD is not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
@@ -1076,7 +1076,7 @@ test_H5FDread_without_eoa_set_fails(void)
TESTING("HDFS VFD read-eoa temporal coupling library limitation");
SKIPPED();
HDputs(" HDFS VFD is not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
@@ -1178,7 +1178,7 @@ test_read(void)
TESTING("HDFS VFD read/range-gets");
SKIPPED();
HDputs(" HDFS VFD is not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
@@ -1388,7 +1388,7 @@ test_noops_and_autofails(void)
TESTING("HDFS VFD always-fail and no-op routines");
SKIPPED();
HDputs(" HDFS VFD is not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
@@ -1499,7 +1499,7 @@ test_cmp(void)
{
TESTING("HDFS cmp (comparison)");
SKIPPED();
- HDfprintf(stderr, " TODO: Distinct valid fapls to open the same file.\n");
+ fprintf(stderr, " TODO: Distinct valid fapls to open the same file.\n");
return 0;
@@ -1530,7 +1530,7 @@ test_H5F_integration(void)
TESTING("HDFS file access through HD5F library (H5F API)");
SKIPPED();
HDputs(" HDFS VFD is not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
@@ -1597,8 +1597,8 @@ error:
***********/
#if HDFS_TEST_DEBUG
- HDprintf("\nerror!");
- HDfflush(stdout);
+ printf("\nerror!");
+ fflush(stdout);
#endif /* HDFS_TEST_DEBUG */
if (fapl_id >= 0) {
@@ -1657,7 +1657,7 @@ main(void)
h5_reset();
- HDprintf("Testing hdfs VFD functionality.\n");
+ printf("Testing hdfs VFD functionality.\n");
nerrors += test_fapl_config_validation();
nerrors += test_hdfs_fapl();
@@ -1670,11 +1670,11 @@ main(void)
nerrors += test_H5F_integration();
if (nerrors > 0) {
- HDprintf("***** %d hdfs TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("***** %d hdfs TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
nerrors = 1;
}
else {
- HDprintf("All hdfs tests passed.\n");
+ printf("All hdfs tests passed.\n");
}
return nerrors; /* 0 if no errors, 1 if any errors */
diff --git a/test/hyperslab.c b/test/hyperslab.c
index b17293f..5203b7c 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -82,19 +82,19 @@ print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
for (i = 0; i < nx; i++) {
if (nz > 1)
- HDprintf("i=%lu:\n", (unsigned long)i);
+ printf("i=%lu:\n", (unsigned long)i);
else
- HDprintf("%03lu:", (unsigned long)i);
+ printf("%03lu:", (unsigned long)i);
for (j = 0; j < ny; j++) {
if (nz > 1)
- HDprintf("%03lu:", (unsigned long)j);
+ printf("%03lu:", (unsigned long)j);
for (k = 0; k < nz; k++)
- HDprintf(" %3d", *array++);
+ printf(" %3d", *array++);
if (nz > 1)
- HDprintf("\n");
+ printf("\n");
} /* end for */
- HDprintf("\n");
+ printf("\n");
} /* end for */
} /* end print_array() */
@@ -117,11 +117,11 @@ print_ref(size_t nx, size_t ny, size_t nz)
{
uint8_t *array;
- if (NULL != (array = (uint8_t *)HDmalloc(nx * ny * nz))) {
- HDprintf("Reference array:\n");
+ if (NULL != (array = (uint8_t *)malloc(nx * ny * nz))) {
+ printf("Reference array:\n");
init_full(array, nx, ny, nz);
print_array(array, nx, ny, nz);
- HDfree(array);
+ free(array);
} /* end if */
} /* end print_ref() */
@@ -175,11 +175,11 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size
HDsnprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
} /* end else */
HDsnprintf(s, sizeof(s), "Testing hyperslab fill %-11s variable hyperslab", dim);
- HDprintf("%-70s", s);
- HDfflush(stdout);
+ printf("%-70s", s);
+ fflush(stdout);
/* Allocate array */
- if (NULL == (dst = (uint8_t *)HDcalloc((size_t)1, nx * ny * nz)))
+ if (NULL == (dst = (uint8_t *)calloc((size_t)1, nx * ny * nz)))
TEST_ERROR;
init_full(dst, nx, ny, nz);
@@ -235,15 +235,15 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size
* is going directly to a terminal.
*/
AT();
- HDprintf(" acc != ref_value\n");
- HDprintf(" i=%lu, j=%lu, k=%lu, "
- "dx=%lu, dy=%lu, dz=%lu, "
- "fill=%d\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)k,
- (unsigned long)dx, (unsigned long)dy, (unsigned long)dz,
- fill_value);
+ printf(" acc != ref_value\n");
+ printf(" i=%lu, j=%lu, k=%lu, "
+ "dx=%lu, dy=%lu, dz=%lu, "
+ "fill=%d\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)k,
+ (unsigned long)dx, (unsigned long)dy, (unsigned long)dz,
+ fill_value);
print_ref(nx, ny, nz);
- HDprintf("\n Result is:\n");
+ printf("\n Result is:\n");
print_array(dst, nx, ny, nz);
} /* end if */
goto error;
@@ -258,13 +258,13 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size
PASSED();
- HDfree(dst);
+ free(dst);
return SUCCEED;
error:
if (dst)
- HDfree(dst);
+ free(dst);
return FAIL;
} /* end test_fill() */
@@ -364,15 +364,15 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
} /* end switch */
HDsnprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub);
- HDprintf("%-70s", s);
- HDfflush(stdout);
+ printf("%-70s", s);
+ fflush(stdout);
/*
* Allocate arrays
*/
- if (NULL == (src = (uint8_t *)HDcalloc((size_t)1, nx * ny * nz)))
+ if (NULL == (src = (uint8_t *)calloc((size_t)1, nx * ny * nz)))
TEST_ERROR;
- if (NULL == (dst = (uint8_t *)HDcalloc((size_t)1, nx * ny * nz)))
+ if (NULL == (dst = (uint8_t *)calloc((size_t)1, nx * ny * nz)))
TEST_ERROR;
init_full(src, nx, ny, nz);
@@ -469,13 +469,13 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
* going directly to a terminal.
*/
AT();
- HDprintf(" acc != ref_value\n");
- HDprintf(" i=%lu, j=%lu, k=%lu, "
- "dx=%lu, dy=%lu, dz=%lu\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)k,
- (unsigned long)dx, (unsigned long)dy, (unsigned long)dz);
+ printf(" acc != ref_value\n");
+ printf(" i=%lu, j=%lu, k=%lu, "
+ "dx=%lu, dy=%lu, dz=%lu\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)k,
+ (unsigned long)dx, (unsigned long)dy, (unsigned long)dz);
print_ref(nx, ny, nz);
- HDprintf("\n Destination array is:\n");
+ printf("\n Destination array is:\n");
print_array(dst, nx, ny, nz);
} /* end if */
goto error;
@@ -506,14 +506,14 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
* going directly to a terminal.
*/
AT();
- HDprintf(" acc != ref_value + nx*ny*nz - "
- "dx*dy*dz\n");
- HDprintf(" i=%lu, j=%lu, k=%lu, "
- "dx=%lu, dy=%lu, dz=%lu\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)k,
- (unsigned long)dx, (unsigned long)dy, (unsigned long)dz);
+ printf(" acc != ref_value + nx*ny*nz - "
+ "dx*dy*dz\n");
+ printf(" i=%lu, j=%lu, k=%lu, "
+ "dx=%lu, dy=%lu, dz=%lu\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)k,
+ (unsigned long)dx, (unsigned long)dy, (unsigned long)dz);
print_ref(nx, ny, nz);
- HDprintf("\n Destination array is:\n");
+ printf("\n Destination array is:\n");
print_array(dst, nx, ny, nz);
} /* end if */
goto error;
@@ -527,16 +527,16 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
PASSED();
- HDfree(src);
- HDfree(dst);
+ free(src);
+ free(dst);
return SUCCEED;
error:
if (src)
- HDfree(src);
+ free(src);
if (dst)
- HDfree(dst);
+ free(dst);
return FAIL;
} /* end test_copy() */
@@ -573,13 +573,13 @@ test_multifill(size_t nx)
} fill, *src = NULL, *dst = NULL;
hsize_t i, j;
- HDprintf("%-70s", "Testing multi-byte fill value");
- HDfflush(stdout);
+ printf("%-70s", "Testing multi-byte fill value");
+ fflush(stdout);
/* Initialize the source and destination */
- if (NULL == (src = (struct a_struct *)HDmalloc(nx * sizeof(*src))))
+ if (NULL == (src = (struct a_struct *)malloc(nx * sizeof(*src))))
TEST_ERROR;
- if (NULL == (dst = (struct a_struct *)HDmalloc(nx * sizeof(*dst))))
+ if (NULL == (dst = (struct a_struct *)malloc(nx * sizeof(*dst))))
TEST_ERROR;
for (i = 0; i < nx; i++) {
@@ -630,14 +630,14 @@ test_multifill(size_t nx)
H5_FAILED();
if (!HDisatty(1)) {
AT();
- HDprintf(" fill={%d,%g,%d}\n ", fill.left, fill.mid, fill.right);
+ printf(" fill={%d,%g,%d}\n ", fill.left, fill.mid, fill.right);
for (j = 0; j < sizeof(fill); j++)
- HDprintf(" %02x", ((uint8_t *)&fill)[j]);
- HDprintf("\n dst[%lu]={%d,%g,%d}\n ", (unsigned long)i, dst[i].left, dst[i].mid,
- dst[i].right);
+ printf(" %02x", ((uint8_t *)&fill)[j]);
+ printf("\n dst[%lu]={%d,%g,%d}\n ", (unsigned long)i, dst[i].left, dst[i].mid,
+ dst[i].right);
for (j = 0; j < sizeof(dst[i]); j++)
- HDprintf(" %02x", ((uint8_t *)(dst + i))[j]);
- HDprintf("\n");
+ printf(" %02x", ((uint8_t *)(dst + i))[j]);
+ printf("\n");
} /* end if */
goto error;
} /* end if */
@@ -645,16 +645,16 @@ test_multifill(size_t nx)
PASSED();
- HDfree(src);
- HDfree(dst);
+ free(src);
+ free(dst);
return SUCCEED;
error:
if (src)
- HDfree(src);
+ free(src);
if (dst)
- HDfree(dst);
+ free(dst);
return FAIL;
} /* end test_multifill() */
@@ -685,13 +685,13 @@ test_endian(size_t nx)
hsize_t size[2]; /*size vector */
hsize_t i, j;
- HDprintf("%-70s", "Testing endian conversion by stride");
- HDfflush(stdout);
+ printf("%-70s", "Testing endian conversion by stride");
+ fflush(stdout);
/* Initialize arrays */
- if (NULL == (src = (uint8_t *)HDmalloc(nx * 4)))
+ if (NULL == (src = (uint8_t *)malloc(nx * 4)))
TEST_ERROR;
- if (NULL == (dst = (uint8_t *)HDcalloc(nx, (size_t)4)))
+ if (NULL == (dst = (uint8_t *)calloc(nx, (size_t)4)))
TEST_ERROR;
init_full(src, nx, (size_t)4, (size_t)1);
@@ -718,10 +718,10 @@ test_endian(size_t nx)
* to a terminal.
*/
AT();
- HDprintf(" i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j);
- HDprintf(" Source array is:\n");
+ printf(" i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Source array is:\n");
print_array(src, nx, (size_t)4, (size_t)1);
- HDprintf("\n Result is:\n");
+ printf("\n Result is:\n");
print_array(dst, nx, (size_t)4, (size_t)1);
} /* end if */
goto error;
@@ -731,16 +731,16 @@ test_endian(size_t nx)
PASSED();
- HDfree(src);
- HDfree(dst);
+ free(src);
+ free(dst);
return SUCCEED;
error:
if (src)
- HDfree(src);
+ free(src);
if (dst)
- HDfree(dst);
+ free(dst);
return FAIL;
} /* end test_endian() */
@@ -772,13 +772,13 @@ test_transpose(size_t nx, size_t ny)
HDsnprintf(s, sizeof(s), "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx,
(unsigned long)ny);
- HDprintf("%-70s", s);
- HDfflush(stdout);
+ printf("%-70s", s);
+ fflush(stdout);
/* Initialize */
- if (NULL == (src = (int *)HDmalloc(nx * ny * sizeof(*src))))
+ if (NULL == (src = (int *)malloc(nx * ny * sizeof(*src))))
TEST_ERROR;
- if (NULL == (dst = (int *)HDcalloc(nx * ny, sizeof(*dst))))
+ if (NULL == (dst = (int *)calloc(nx * ny, sizeof(*dst))))
TEST_ERROR;
for (i = 0; i < nx; i++)
@@ -803,20 +803,20 @@ test_transpose(size_t nx, size_t ny)
H5_FAILED();
if (!HDisatty(1)) {
AT();
- HDprintf(" diff at i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j);
- HDprintf(" Source is:\n");
+ printf(" diff at i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j);
+ printf(" Source is:\n");
for (i = 0; i < nx; i++) {
- HDprintf("%3lu:", (unsigned long)i);
+ printf("%3lu:", (unsigned long)i);
for (j = 0; j < ny; j++)
- HDprintf(" %6d", src[i * ny + j]);
- HDprintf("\n");
+ printf(" %6d", src[i * ny + j]);
+ printf("\n");
} /* end for */
- HDprintf("\n Destination is:\n");
+ printf("\n Destination is:\n");
for (i = 0; i < ny; i++) {
- HDprintf("%3lu:", (unsigned long)i);
+ printf("%3lu:", (unsigned long)i);
for (j = 0; j < nx; j++)
- HDprintf(" %6d", dst[i * nx + j]);
- HDprintf("\n");
+ printf(" %6d", dst[i * nx + j]);
+ printf("\n");
} /* end for */
} /* end if */
goto error;
@@ -826,16 +826,16 @@ test_transpose(size_t nx, size_t ny)
PASSED();
- HDfree(src);
- HDfree(dst);
+ free(src);
+ free(dst);
return SUCCEED;
error:
if (src)
- HDfree(src);
+ free(src);
if (dst)
- HDfree(dst);
+ free(dst);
return FAIL;
} /* end test_transpose() */
@@ -871,15 +871,15 @@ test_sub_super(size_t nx, size_t ny)
HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx),
(unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny);
- HDprintf("%-70s", s);
- HDfflush(stdout);
+ printf("%-70s", s);
+ fflush(stdout);
/* Initialize */
- if (NULL == (full = (uint8_t *)HDmalloc(4 * nx * ny)))
+ if (NULL == (full = (uint8_t *)malloc(4 * nx * ny)))
TEST_ERROR;
- if (NULL == (half = (uint8_t *)HDcalloc((size_t)1, nx * ny)))
+ if (NULL == (half = (uint8_t *)calloc((size_t)1, nx * ny)))
TEST_ERROR;
- if (NULL == (twice = (uint8_t *)HDcalloc((size_t)4, nx * ny)))
+ if (NULL == (twice = (uint8_t *)calloc((size_t)4, nx * ny)))
TEST_ERROR;
init_full(full, 2 * nx, 2 * ny, (size_t)1);
@@ -902,11 +902,11 @@ test_sub_super(size_t nx, size_t ny)
H5_FAILED();
if (!HDisatty(1)) {
AT();
- HDprintf(" full[%lu][%lu] != half[%lu][%lu]\n", (unsigned long)i * 2,
- (unsigned long)j * 2, (unsigned long)i, (unsigned long)j);
- HDprintf(" full is:\n");
+ printf(" full[%lu][%lu] != half[%lu][%lu]\n", (unsigned long)i * 2,
+ (unsigned long)j * 2, (unsigned long)i, (unsigned long)j);
+ printf(" full is:\n");
print_array(full, 2 * nx, 2 * ny, (size_t)1);
- HDprintf("\n half is:\n");
+ printf("\n half is:\n");
print_array(half, nx, ny, (size_t)1);
} /* end if */
goto error;
@@ -921,8 +921,8 @@ test_sub_super(size_t nx, size_t ny)
*/
HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx,
(unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny));
- HDprintf("%-70s", s);
- HDfflush(stdout);
+ printf("%-70s", s);
+ fflush(stdout);
/* Setup stride */
size[0] = nx;
@@ -961,9 +961,9 @@ test_sub_super(size_t nx, size_t ny)
H5_FAILED();
if (!HDisatty(1)) {
AT();
- HDprintf(" %s\n Half is:\n", s);
+ printf(" %s\n Half is:\n", s);
print_array(half, nx, ny, (size_t)1);
- HDprintf("\n Twice is:\n");
+ printf("\n Twice is:\n");
print_array(twice, 2 * nx, 2 * ny, (size_t)1);
} /* end if */
goto error;
@@ -973,19 +973,19 @@ test_sub_super(size_t nx, size_t ny)
PASSED();
- HDfree(full);
- HDfree(half);
- HDfree(twice);
+ free(full);
+ free(half);
+ free(twice);
return SUCCEED;
error:
if (full)
- HDfree(full);
+ free(full);
if (half)
- HDfree(half);
+ free(half);
if (twice)
- HDfree(twice);
+ free(twice);
return FAIL;
} /* test_sub_super() */
@@ -1018,7 +1018,7 @@ test_array_fill(size_t lo, size_t hi)
TESTING(s);
/* Initialize */
- if (NULL == (dst = (int *)HDcalloc(sizeof(int), ARRAY_FILL_SIZE * hi)))
+ if (NULL == (dst = (int *)calloc(sizeof(int), ARRAY_FILL_SIZE * hi)))
TEST_ERROR;
/* Setup */
@@ -1035,18 +1035,18 @@ test_array_fill(size_t lo, size_t hi)
if (dst[(u * ARRAY_FILL_SIZE) + v] != src[v])
TEST_ERROR;
- HDmemset(dst, 0, sizeof(int) * ARRAY_FILL_SIZE * w);
+ memset(dst, 0, sizeof(int) * ARRAY_FILL_SIZE * w);
} /* end for */
PASSED();
- HDfree(dst);
+ free(dst);
return SUCCEED;
error:
if (dst)
- HDfree(dst);
+ free(dst);
return FAIL;
} /* end test_array_fill() */
@@ -1083,7 +1083,7 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
TESTING(s);
/* Initialize */
- if (NULL == (a = (hsize_t *)HDmalloc(sizeof(hsize_t) * x * y * z)))
+ if (NULL == (a = (hsize_t *)malloc(sizeof(hsize_t) * x * y * z)))
TEST_ERROR;
dims[0] = z;
@@ -1117,21 +1117,21 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
/* Check computed coordinates */
for (v = 0; v < ARRAY_OFFSET_NDIMS; v++)
if (coords[v] != new_coords[v]) {
- HDfprintf(stderr, "coords[%zu]=%" PRIuHSIZE ", new_coords[%zu]=%" PRIuHSIZE "\n", v,
- coords[v], v, new_coords[v]);
+ fprintf(stderr, "coords[%zu]=%" PRIuHSIZE ", new_coords[%zu]=%" PRIuHSIZE "\n", v, coords[v],
+ v, new_coords[v]);
TEST_ERROR;
} /* end if */
} /* end for */
PASSED();
- HDfree(a);
+ free(a);
return SUCCEED;
error:
if (a)
- HDfree(a);
+ free(a);
return FAIL;
} /* end test_array_offset_n_calc() */
@@ -1169,18 +1169,18 @@ main(int argc, char *argv[])
else if (!HDstrcmp(argv[i], "medium"))
size_of_test |= TEST_MEDIUM;
else {
- HDprintf("unrecognized argument: %s\n", argv[i]);
- HDexit(EXIT_FAILURE);
+ printf("unrecognized argument: %s\n", argv[i]);
+ exit(EXIT_FAILURE);
} /* end else */
} /* end for */
} /* end else */
- HDprintf("Test sizes: ");
+ printf("Test sizes: ");
if (size_of_test & TEST_SMALL)
- HDprintf(" SMALL");
+ printf(" SMALL");
if (size_of_test & TEST_MEDIUM)
- HDprintf(" MEDIUM");
- HDprintf("\n");
+ printf(" MEDIUM");
+ printf("\n");
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -1384,17 +1384,17 @@ main(int argc, char *argv[])
/*--- END OF TESTS ---*/
if (nerrors) {
- HDprintf("***** %d HYPERSLAB TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d HYPERSLAB TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
if (HDisatty(1))
- HDprintf("(Redirect output to a pager or a file to see debug output)\n");
- HDexit(EXIT_FAILURE);
+ printf("(Redirect output to a pager or a file to see debug output)\n");
+ exit(EXIT_FAILURE);
} /* end if */
- HDprintf("All hyperslab tests passed.\n");
+ printf("All hyperslab tests passed.\n");
#ifdef H5_HAVE_THREADSAFE
H5close();
#endif /* H5_HAVE_THREADSAFE */
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
diff --git a/test/istore.c b/test/istore.c
index b688acd..b2d8a69 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -103,22 +103,22 @@ print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
for (i = 0; i < nx; i++) {
if (nz > 1) {
- HDfprintf(stderr, "i=%lu:\n", (unsigned long)i);
+ fprintf(stderr, "i=%lu:\n", (unsigned long)i);
}
else {
- HDfprintf(stderr, "%03lu:", (unsigned long)i);
+ fprintf(stderr, "%03lu:", (unsigned long)i);
}
for (j = 0; j < ny; j++) {
if (nz > 1)
- HDfprintf(stderr, "%03lu:", (unsigned long)j);
+ fprintf(stderr, "%03lu:", (unsigned long)j);
for (k = 0; k < nz; k++) {
- HDfprintf(stderr, " %3d", *array++);
+ fprintf(stderr, " %3d", *array++);
}
if (nz > 1)
- HDfprintf(stderr, "\n");
+ fprintf(stderr, "\n");
}
- HDfprintf(stderr, "\n");
+ fprintf(stderr, "\n");
}
}
@@ -273,9 +273,9 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
HDsnprintf(s, sizeof(s), "istore extend: %s", dims);
TESTING(s);
- buf = (uint8_t *)HDmalloc(nx * ny * nz);
- check = (uint8_t *)HDmalloc(nx * ny * nz);
- whole = (uint8_t *)HDcalloc((size_t)1, nx * ny * nz);
+ buf = (uint8_t *)malloc(nx * ny * nz);
+ check = (uint8_t *)malloc(nx * ny * nz);
+ whole = (uint8_t *)calloc((size_t)1, nx * ny * nz);
whole_size[0] = nx;
whole_size[1] = ny;
@@ -287,7 +287,7 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
/* Build the new empty object */
HDsnprintf(name, sizeof(name), "%s_%s", prefix, dims);
if ((dataset = new_object(f, name, ndims, whole_size, whole_size)) < 0) {
- HDfprintf(stderr, " Cannot create %u-d object `%s'\n", ndims, name);
+ fprintf(stderr, " Cannot create %u-d object `%s'\n", ndims, name);
goto error;
}
@@ -320,7 +320,7 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
/* Fill the source array */
if (0 == nelmts)
continue;
- HDmemset(buf, (signed)(128 + ctr), (size_t)nelmts);
+ memset(buf, (signed)(128 + ctr), (size_t)nelmts);
/* Create dataspace for selection in memory */
if ((mspace = H5Screate_simple(1, &nelmts, NULL)) < 0)
@@ -333,23 +333,23 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
/* Write to disk */
if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) {
H5_FAILED();
- HDfprintf(stderr, " Write failed: ctr=%lu\n", (unsigned long)ctr);
+ fprintf(stderr, " Write failed: ctr=%lu\n", (unsigned long)ctr);
goto error;
}
/* Read from disk */
- HDmemset(check, 0xff, (size_t)nelmts);
+ memset(check, 0xff, (size_t)nelmts);
if (H5Dread(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, check) < 0) {
H5_FAILED();
- HDfprintf(stderr, " Read failed: ctr=%lu\n", (unsigned long)ctr);
+ fprintf(stderr, " Read failed: ctr=%lu\n", (unsigned long)ctr);
goto error;
}
- if (HDmemcmp(buf, check, (size_t)nelmts) != 0) {
+ if (memcmp(buf, check, (size_t)nelmts) != 0) {
H5_FAILED();
- HDfprintf(stderr, " Read check failed: ctr=%lu\n", (unsigned long)ctr);
- HDfprintf(stderr, " Wrote:\n");
+ fprintf(stderr, " Read check failed: ctr=%lu\n", (unsigned long)ctr);
+ fprintf(stderr, " Wrote:\n");
print_array(buf, (size_t)size[0], (size_t)size[1], (size_t)size[2]);
- HDfprintf(stderr, " Read:\n");
+ fprintf(stderr, " Read:\n");
print_array(check, (size_t)size[0], (size_t)size[1], (size_t)size[2]);
goto error;
}
@@ -368,10 +368,10 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
}
/* Now read the entire array back out and check it */
- HDmemset(buf, 0xff, nx * ny * nz);
+ memset(buf, 0xff, nx * ny * nz);
if (H5Dread(dataset, TEST_DATATYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
H5_FAILED();
- HDfprintf(stderr, " Read failed for whole array.\n");
+ fprintf(stderr, " Read failed for whole array.\n");
goto error;
}
for (i = 0; i < nx; i++) {
@@ -379,16 +379,16 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
for (k = 0; k < nz; k++) {
if (whole[i * ny * nz + j * nz + k] != buf[i * ny * nz + j * nz + k]) {
H5_FAILED();
- HDfprintf(stderr, " Check failed at i=%lu", (unsigned long)i);
+ fprintf(stderr, " Check failed at i=%lu", (unsigned long)i);
if (ndims > 1) {
- HDfprintf(stderr, ", j=%lu", (unsigned long)j);
+ fprintf(stderr, ", j=%lu", (unsigned long)j);
}
if (ndims > 2) {
- HDfprintf(stderr, ", k=%lu", (unsigned long)k);
+ fprintf(stderr, ", k=%lu", (unsigned long)k);
}
- HDfprintf(stderr, "\n Check array is:\n");
+ fprintf(stderr, "\n Check array is:\n");
print_array(whole, nx, ny, nz);
- HDfprintf(stderr, " Value read is:\n");
+ fprintf(stderr, " Value read is:\n");
print_array(buf, nx, ny, nz);
goto error;
}
@@ -405,17 +405,17 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
TEST_ERROR;
/* Free memory used */
- HDfree(buf);
- HDfree(check);
- HDfree(whole);
+ free(buf);
+ free(check);
+ free(whole);
PASSED();
return SUCCEED;
error:
- HDfree(buf);
- HDfree(check);
- HDfree(whole);
+ free(buf);
+ free(check);
+ free(whole);
return FAIL;
}
@@ -473,8 +473,8 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
SKIPPED();
return SUCCEED;
}
- buf = (uint8_t *)HDmalloc(nx * ny * nz);
- HDmemset(buf, 128, nx * ny * nz);
+ buf = (uint8_t *)malloc(nx * ny * nz);
+ memset(buf, 128, nx * ny * nz);
/* Set dimensions of dataset */
for (u = 0; u < (size_t)ndims; u++)
@@ -488,7 +488,7 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
/* Build the new empty object */
HDsnprintf(name, sizeof(name), "%s_%s", prefix, dims);
if ((dataset = new_object(f, name, ndims, whole_size, chunk_dims)) < 0) {
- HDprintf(" Cannot create %u-d object `%s'\n", ndims, name);
+ printf(" Cannot create %u-d object `%s'\n", ndims, name);
goto error;
}
@@ -512,18 +512,18 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
/* write to disk */
if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) {
H5_FAILED();
- HDprintf(" Write failed: ctr=%lu\n", (unsigned long)ctr);
- HDprintf(" offset=(%lu", (unsigned long)(offset[0]));
+ printf(" Write failed: ctr=%lu\n", (unsigned long)ctr);
+ printf(" offset=(%lu", (unsigned long)(offset[0]));
if (ndims > 1)
- HDprintf(",%lu", (unsigned long)(offset[1]));
+ printf(",%lu", (unsigned long)(offset[1]));
if (ndims > 2)
- HDprintf(",%lu", (unsigned long)(offset[2]));
- HDprintf("), size=(%lu", (unsigned long)(size[0]));
+ printf(",%lu", (unsigned long)(offset[2]));
+ printf("), size=(%lu", (unsigned long)(size[0]));
if (ndims > 1)
- HDprintf(",%lu", (unsigned long)(size[1]));
+ printf(",%lu", (unsigned long)(size[1]));
if (ndims > 2)
- HDprintf(",%lu", (unsigned long)(size[2]));
- HDprintf(")\n");
+ printf(",%lu", (unsigned long)(size[2]));
+ printf(")\n");
goto error;
}
@@ -542,12 +542,12 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
if (H5Dclose(dataset) < 0)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
PASSED();
return SUCCEED;
error:
- HDfree(buf);
+ free(buf);
return FAIL;
}
@@ -592,18 +592,18 @@ main(int argc, char *argv[])
size_of_test |= TEST_LARGE;
}
else {
- HDprintf("unrecognized argument: %s\n", argv[i]);
+ printf("unrecognized argument: %s\n", argv[i]);
}
}
}
- HDprintf("Test sizes: ");
+ printf("Test sizes: ");
if (size_of_test & TEST_SMALL)
- HDprintf(" SMALL");
+ printf(" SMALL");
if (size_of_test & TEST_MEDIUM)
- HDprintf(" MEDIUM");
+ printf(" MEDIUM");
if (size_of_test & TEST_LARGE)
- HDprintf(" LARGE");
- HDprintf("\n");
+ printf(" LARGE");
+ printf("\n");
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -625,8 +625,8 @@ main(int argc, char *argv[])
/* Create the test file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
- HDprintf("Cannot create file %s; test aborted\n", filename);
- HDexit(EXIT_FAILURE);
+ printf("Cannot create file %s; test aborted\n", filename);
+ exit(EXIT_FAILURE);
}
/* Initialize chunk dimensions */
@@ -680,7 +680,7 @@ main(int argc, char *argv[])
*/
status = test_sparse(file, "sparse", (size_t)800, (size_t)50, (size_t)50, (size_t)50, skip_test);
if (skip_test)
- HDprintf(" The current VFD does not support sparse files on this platform.\n");
+ printf(" The current VFD does not support sparse files on this platform.\n");
nerrors += status < 0 ? 1 : 0;
}
@@ -692,13 +692,13 @@ main(int argc, char *argv[])
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
if (nerrors) {
- HDprintf("***** %d I-STORE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %d I-STORE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
}
- HDprintf("All i-store tests passed.\n");
+ printf("All i-store tests passed.\n");
h5_cleanup(FILENAME, fapl);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
diff --git a/test/lheap.c b/test/lheap.c
index 7db032e..f79e1b5 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -157,9 +157,9 @@ main(void)
if (HDstrcmp(s, buf) != 0) {
H5_FAILED();
- HDprintf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
- HDprintf(" got: \"%s\"\n", s);
- HDprintf(" ans: \"%s\"\n", buf);
+ printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
+ printf(" got: \"%s\"\n", s);
+ printf(" ans: \"%s\"\n", buf);
goto error;
}
@@ -194,7 +194,7 @@ main(void)
}
else {
H5_FAILED();
- HDprintf("***cannot open the pre-created non-default sizes test file (%s)\n", testfile);
+ printf("***cannot open the pre-created non-default sizes test file (%s)\n", testfile);
goto error;
} /* end else */
}
diff --git a/test/links.c b/test/links.c
index 9e4d2e3..bfc3252 100644
--- a/test/links.c
+++ b/test/links.c
@@ -639,7 +639,7 @@ cklinks(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_DATASET != oinfo2.type) {
H5_FAILED();
- HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
+ printf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
TEST_ERROR;
} /* end if */
@@ -689,7 +689,7 @@ cklinks(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_DATASET != oinfo2.type) {
H5_FAILED();
- HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
+ printf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
TEST_ERROR;
} /* end if */
if (H5Otoken_cmp(file, &oinfo1.token, &oinfo2.token, &token_cmp) < 0)
@@ -725,12 +725,12 @@ cklinks(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5L_TYPE_SOFT != linfo.type) {
H5_FAILED();
- HDprintf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__);
+ printf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__);
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/dangle", linkval, sizeof linkval, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" %d: Can't retrieve link value\n", __LINE__);
+ printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
if (HDstrcmp(linkval, "foobar") != 0) {
@@ -756,12 +756,12 @@ cklinks(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5L_TYPE_SOFT != linfo.type) {
H5_FAILED();
- HDprintf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__);
+ printf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__);
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/recursive", linkval, sizeof linkval, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" %d: Can't retrieve link value\n", __LINE__);
+ printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
@@ -824,7 +824,7 @@ ck_new_links(hid_t fapl, hbool_t new_format)
/* Check hard links */
if (H5O_TYPE_DATASET != oi_hard1.type || H5O_TYPE_DATASET != oi_hard2.type) {
H5_FAILED();
- HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
+ printf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
TEST_ERROR;
}
@@ -884,7 +884,7 @@ long_links(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Construct very long file name */
- if ((objname = (char *)HDmalloc((size_t)(MAX_NAME_LEN + 1))) == NULL)
+ if ((objname = (char *)malloc((size_t)(MAX_NAME_LEN + 1))) == NULL)
TEST_ERROR;
for (u = 0; u < MAX_NAME_LEN; u++)
objname[u] = 'a';
@@ -912,7 +912,7 @@ long_links(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Release memory */
- HDfree(objname);
+ free(objname);
PASSED();
return SUCCEED;
@@ -925,7 +925,7 @@ error:
H5Fclose(fid);
}
H5E_END_TRY;
- HDfree(objname);
+ free(objname);
return FAIL;
}
@@ -955,7 +955,7 @@ toomany(hid_t fapl, hbool_t new_format)
/* XXX: should probably make a "generic" test that creates the proper
* # of links based on this value - QAK
*/
- HDassert(H5L_NUM_LINKS == 16);
+ assert(H5L_NUM_LINKS == 16);
/* Create file */
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -2019,7 +2019,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_objinfo(file_id, "/group1/link_to_group2", TRUE, &sb_hard2) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
+ if (memcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
HDputs(" Hard link test failed. Link seems not to point to the ");
HDputs(" expected file location.");
@@ -2032,7 +2032,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_objinfo(file_id, "/group2/link_to_group1", TRUE, &sb_hard2) < 0)
FAIL_STACK_ERROR;
- if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
+ if (memcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
HDputs(" Hard link test failed. Link seems not to point to the ");
HDputs(" expected file location.");
@@ -2162,7 +2162,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_DATASET != oinfo2.type) {
H5_FAILED();
- HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
+ printf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
TEST_ERROR;
} /* end if */
if (H5F_addr_ne(oinfo1.addr, oinfo2.addr)) {
@@ -2207,7 +2207,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_DATASET != oinfo2.type) {
H5_FAILED();
- HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
+ printf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
TEST_ERROR;
} /* end if */
if (H5F_addr_ne(oinfo1.addr, oinfo2.addr)) {
@@ -2241,12 +2241,12 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5L_TYPE_SOFT != linfo.type) {
H5_FAILED();
- HDprintf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__);
+ printf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__);
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/dangle", linkval, sizeof linkval, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" %d: Can't retrieve link value\n", __LINE__);
+ printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
if (HDstrcmp(linkval, "foobar") != 0) {
@@ -2272,12 +2272,12 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5L_TYPE_SOFT != linfo.type) {
H5_FAILED();
- HDprintf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__);
+ printf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__);
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/recursive", linkval, sizeof linkval, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" %d: Can't retrieve link value\n", __LINE__);
+ printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
@@ -4148,7 +4148,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
/* XXX: should probably make a "generic" test that creates the proper
* # of links based on this value - QAK
*/
- HDassert(H5L_NUM_LINKS == 16);
+ assert(H5L_NUM_LINKS == 16);
/* Create file */
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -4867,7 +4867,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
HDsnprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
/* Verify the link information for first link, in increasing creation order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -4875,7 +4875,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
TEST_ERROR;
/* Verify the link information for new link, in increasing creation order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != (int64_t)n)
@@ -4883,7 +4883,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
/* Verify value for new soft link, in increasing creation order */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4892,7 +4892,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
} /* end if */
/* Verify the name for new link, in increasing creation order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4905,7 +4905,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
*/
if (use_index) {
/* Verify the link information for first link, in native creation order (which is increasing) */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, (hsize_t)0, &linfo,
H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4913,7 +4913,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
TEST_ERROR;
/* Verify the link information for new link, in native creation order (which is increasing) */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -4922,7 +4922,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
/* Verify value for new soft link, in native creation order (which is increasing) */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4931,7 +4931,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
} /* end if */
/* Verify the name for new link, in native creation order (which is increasing) */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4940,14 +4940,14 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
} /* end if */
/* Verify the link information for first link, in decreasing creation order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, n, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != 0)
TEST_ERROR;
/* Verify the link information for new link, in decreasing creation order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -4956,7 +4956,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
/* Verify value for new soft link, in decreasing creation order */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4965,7 +4965,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
} /* end if */
/* Verify the name for new link, in decreasing creation order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4973,14 +4973,14 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
TEST_ERROR;
/* Verify the link information for first link, in increasing link name order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != 0)
TEST_ERROR;
/* Verify the link information for new link, in increasing link name order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != (int64_t)n)
@@ -4988,7 +4988,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
/* Verify value for new soft link, in increasing link name order */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4997,7 +4997,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
} /* end if */
/* Verify the name for new link, in increasing link name order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -5009,14 +5009,14 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
*/
/* Verify the link information for first link, in decreasing link name order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, n, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != 0)
TEST_ERROR;
/* Verify the link information for new link, in decreasing link name order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != (int64_t)n)
@@ -5024,7 +5024,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
/* Verify value for new soft link, in decreasing link name order */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -5033,7 +5033,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
} /* end if */
/* Verify the name for new link, in decreasing link name order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -5648,7 +5648,7 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", idx_type, order, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -5662,7 +5662,7 @@ delete_by_idx_deprec(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -5722,7 +5722,7 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", idx_type, order, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -5736,7 +5736,7 @@ delete_by_idx_deprec(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -5800,7 +5800,7 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify the link information for current link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", idx_type, order, (hsize_t)u, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -5814,7 +5814,7 @@ delete_by_idx_deprec(hid_t fapl)
} /* end else */
/* Verify the name for current link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -5834,7 +5834,7 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", idx_type, order, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -5848,7 +5848,7 @@ delete_by_idx_deprec(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -6003,7 +6003,7 @@ delete_by_idx_old_deprec(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC) {
@@ -6016,7 +6016,7 @@ delete_by_idx_old_deprec(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -6077,7 +6077,7 @@ delete_by_idx_old_deprec(hid_t fapl)
TEST_ERROR;
/* Verify the link information for current link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC) {
@@ -6090,7 +6090,7 @@ delete_by_idx_old_deprec(hid_t fapl)
} /* end else */
/* Verify the name for current link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -6111,7 +6111,7 @@ delete_by_idx_old_deprec(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx1(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC) {
@@ -6124,7 +6124,7 @@ delete_by_idx_old_deprec(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -6295,7 +6295,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Literate1(group_id, idx_type, order, &skip, link_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6312,7 +6312,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6329,7 +6329,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Literate1(group_id, idx_type, order, &skip, link_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6349,7 +6349,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -6364,7 +6364,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6384,7 +6384,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -6399,7 +6399,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if ((ret = H5Literate1(group_id, idx_type, order, &skip, link_iterate_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6413,7 +6413,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6481,7 +6481,7 @@ link_iterate_deprec(hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- if (NULL == (visited = (hbool_t *)HDmalloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -6510,7 +6510,7 @@ link_iterate_deprec(hid_t fapl)
"creation order index using deprecated routines");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING("iterating over links by creation order index in native order w/creation "
"order index using deprecated routines");
@@ -6537,7 +6537,7 @@ link_iterate_deprec(hid_t fapl)
"order index using deprecated routines");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING("iterating over links by name index in native order w/creation order "
"index using deprecated routines");
@@ -6653,7 +6653,7 @@ link_iterate_deprec(hid_t fapl)
/* Free resources */
if (visited)
- HDfree(visited);
+ free(visited);
return SUCCEED;
@@ -6668,7 +6668,7 @@ error:
H5E_END_TRY;
if (visited)
- HDfree(visited);
+ free(visited);
return FAIL;
} /* end link_iterate_deprec() */
@@ -6778,7 +6778,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Literate1(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6795,7 +6795,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6812,7 +6812,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Literate1(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6832,7 +6832,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -6847,7 +6847,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6867,7 +6867,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -6882,7 +6882,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if ((ret = H5Literate1(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6896,7 +6896,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_old_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6964,7 +6964,7 @@ link_iterate_old_deprec(hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = CORDER_NLINKS;
- if (NULL == (visited = (hbool_t *)HDmalloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -6980,7 +6980,7 @@ link_iterate_old_deprec(hid_t fapl)
"deprecated routines");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
TESTING("iterating over links by name index in native order in old-style group using deprecated "
"routines");
} /* end else */
@@ -7055,7 +7055,7 @@ link_iterate_old_deprec(hid_t fapl)
/* Free resources */
if (visited)
- HDfree(visited);
+ free(visited);
return SUCCEED;
@@ -7069,7 +7069,7 @@ error:
H5E_END_TRY;
if (visited)
- HDfree(visited);
+ free(visited);
return FAIL;
} /* end link_iterate_old_deprec() */
@@ -7986,7 +7986,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format)
/* XXX: should probably make a "generic" test that creates the proper
* # of links based on this value - QAK
*/
- HDassert(H5L_NUM_LINKS == 16);
+ assert(H5L_NUM_LINKS == 16);
/* Set up filenames */
h5_fixname(FILENAME[3], fapl, filename1, sizeof filename1);
@@ -8064,7 +8064,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format)
H5E_END_TRY;
if (gid >= 0) {
H5_FAILED();
- HDprintf("%d: Should have failed for sequence of too many nested links.", __LINE__);
+ printf("%d: Should have failed for sequence of too many nested links.", __LINE__);
goto error;
}
@@ -9041,11 +9041,11 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
h5_fixname(FILENAME[37], fam_fapl, filename2A, sizeof filename2A);
/* settings for multi file */
- HDmemset(memb_map, 0, sizeof memb_map);
- HDmemset(memb_fapl, 0, sizeof memb_fapl);
- HDmemset(memb_name, 0, sizeof memb_name);
- HDmemset(memb_addr, 0, sizeof memb_addr);
- HDmemset(sv, 0, sizeof sv);
+ memset(memb_map, 0, sizeof memb_map);
+ memset(memb_fapl, 0, sizeof memb_fapl);
+ memset(memb_name, 0, sizeof memb_name);
+ memset(memb_addr, 0, sizeof memb_addr);
+ memset(sv, 0, sizeof sv);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_map[mt] = H5FD_MEM_SUPER;
@@ -9242,13 +9242,13 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
TESTING("H5Pset/get_elink_fapl() with same physical layout");
/* Set up file names and paths */
- if (NULL == (filename1 = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename1 = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (filename2 = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename2 = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (tmpname = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (tmpname = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (cwdpath = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (cwdpath = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
if ((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) ||
@@ -9256,9 +9256,9 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Set up data array */
- if (NULL == (points_data = (int *)HDcalloc(NUM40 * NUM40, sizeof(int))))
+ if (NULL == (points_data = (int *)calloc(NUM40 * NUM40, sizeof(int))))
TEST_ERROR;
- if (NULL == (points = (int **)HDcalloc(NUM40, sizeof(points_data))))
+ if (NULL == (points = (int **)calloc(NUM40, sizeof(points_data))))
TEST_ERROR;
for (i = 0; i < NUM40; i++)
points[i] = points_data + (i * NUM40);
@@ -9371,13 +9371,13 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
if (H5Pclose(core_fapl) < 0)
TEST_ERROR;
- HDfree(points);
- HDfree(points_data);
+ free(points);
+ free(points_data);
- HDfree(filename1);
- HDfree(filename2);
- HDfree(tmpname);
- HDfree(cwdpath);
+ free(filename1);
+ free(filename2);
+ free(tmpname);
+ free(cwdpath);
PASSED();
return SUCCEED;
@@ -9396,13 +9396,13 @@ error:
}
H5E_END_TRY;
- HDfree(points);
- HDfree(points_data);
+ free(points);
+ free(points_data);
- HDfree(filename1);
- HDfree(filename2);
- HDfree(tmpname);
- HDfree(cwdpath);
+ free(filename1);
+ free(filename2);
+ free(tmpname);
+ free(cwdpath);
return FAIL;
} /* end external_set_elink_fapl2() */
@@ -12476,27 +12476,27 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
return SUCCEED;
}
- if (NULL == (filename1 = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename1 = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (filename2a = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename2a = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (filename2b = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename2b = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (filename3a = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename3a = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (filename3b = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename3b = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (filename4a = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename4a = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (filename4b = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename4b = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (filename5a = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename5a = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (filename5b = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (filename5b = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (tmpname = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (tmpname = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
- if (NULL == (cwdpath = (char *)HDcalloc(NAME_BUF_SIZE, sizeof(char))))
+ if (NULL == (cwdpath = (char *)calloc(NAME_BUF_SIZE, sizeof(char))))
TEST_ERROR;
/* set up name for main file: "extlinks21A" */
@@ -12666,17 +12666,17 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if (H5Fclose(file1) < 0)
TEST_ERROR;
- HDfree(filename1);
- HDfree(filename2a);
- HDfree(filename2b);
- HDfree(filename3a);
- HDfree(filename3b);
- HDfree(filename4a);
- HDfree(filename4b);
- HDfree(filename5a);
- HDfree(filename5b);
- HDfree(tmpname);
- HDfree(cwdpath);
+ free(filename1);
+ free(filename2a);
+ free(filename2b);
+ free(filename3a);
+ free(filename3b);
+ free(filename4a);
+ free(filename4b);
+ free(filename5a);
+ free(filename5b);
+ free(tmpname);
+ free(cwdpath);
PASSED();
@@ -12697,17 +12697,17 @@ error:
}
H5E_END_TRY;
- HDfree(filename1);
- HDfree(filename2a);
- HDfree(filename2b);
- HDfree(filename3a);
- HDfree(filename3b);
- HDfree(filename4a);
- HDfree(filename4b);
- HDfree(filename5a);
- HDfree(filename5b);
- HDfree(tmpname);
- HDfree(cwdpath);
+ free(filename1);
+ free(filename2a);
+ free(filename2b);
+ free(filename3a);
+ free(filename3b);
+ free(filename4a);
+ free(filename4b);
+ free(filename5a);
+ free(filename5b);
+ free(tmpname);
+ free(cwdpath);
return FAIL;
@@ -13663,7 +13663,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Compare the data read should be the same as wbuf */
- if (HDmemcmp(wbuf, rbuf, sizeof(wbuf)) != 0)
+ if (memcmp(wbuf, rbuf, sizeof(wbuf)) != 0)
FAIL_STACK_ERROR;
/* Close the dataset */
@@ -15244,7 +15244,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* XXX: should probably make a "generic" test that creates the proper
* # of links based on this value - QAK
*/
- HDassert(H5L_NUM_LINKS == 16);
+ assert(H5L_NUM_LINKS == 16);
/* Create file */
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -18004,7 +18004,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
HDsnprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
/* Verify the link information for first link, in increasing creation order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -18012,7 +18012,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
TEST_ERROR;
/* Verify the link information for new link, in increasing creation order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != (int64_t)n)
@@ -18020,7 +18020,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
/* Verify value for new soft link, in increasing creation order */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18029,7 +18029,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
} /* end if */
/* Verify the name for new link, in increasing creation order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18042,7 +18042,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
*/
if (use_index) {
/* Verify the link information for first link, in native creation order (which is increasing) */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, (hsize_t)0, &linfo,
H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18050,7 +18050,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
TEST_ERROR;
/* Verify the link information for new link, in native creation order (which is increasing) */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -18059,7 +18059,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
/* Verify value for new soft link, in native creation order (which is increasing) */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18068,7 +18068,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
} /* end if */
/* Verify the name for new link, in native creation order (which is increasing) */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18077,14 +18077,14 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
} /* end if */
/* Verify the link information for first link, in decreasing creation order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, n, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != 0)
TEST_ERROR;
/* Verify the link information for new link, in decreasing creation order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -18093,7 +18093,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
/* Verify value for new soft link, in decreasing creation order */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18102,7 +18102,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
} /* end if */
/* Verify the name for new link, in decreasing creation order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18110,14 +18110,14 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
TEST_ERROR;
/* Verify the link information for first link, in increasing link name order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != 0)
TEST_ERROR;
/* Verify the link information for new link, in increasing link name order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != (int64_t)n)
@@ -18125,7 +18125,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
/* Verify value for new soft link, in increasing link name order */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18134,7 +18134,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
} /* end if */
/* Verify the name for new link, in increasing link name order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18146,14 +18146,14 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
*/
/* Verify the link information for first link, in decreasing link name order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, n, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != 0)
TEST_ERROR;
/* Verify the link information for new link, in decreasing link name order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (linfo.corder != (int64_t)n)
@@ -18161,7 +18161,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
/* Verify value for new soft link, in decreasing link name order */
if (!hard_link) {
- HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpval, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18170,7 +18170,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
} /* end if */
/* Verify the name for new link, in decreasing link name order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18491,7 +18491,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Oget_info3(group_id2, &oi, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&objtoken[u], &oi.token, sizeof(H5O_token_t));
+ memcpy(&objtoken[u], &oi.token, sizeof(H5O_token_t));
/* Close group */
if (H5Gclose(group_id2) < 0)
@@ -18799,7 +18799,7 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", idx_type, order, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -18813,7 +18813,7 @@ delete_by_idx(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18873,7 +18873,7 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", idx_type, order, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -18887,7 +18887,7 @@ delete_by_idx(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18951,7 +18951,7 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify the link information for current link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", idx_type, order, (hsize_t)u, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -18965,7 +18965,7 @@ delete_by_idx(hid_t fapl)
} /* end else */
/* Verify the name for current link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -18985,7 +18985,7 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", idx_type, order, (hsize_t)0, &linfo, H5P_DEFAULT) <
0)
TEST_ERROR;
@@ -18999,7 +18999,7 @@ delete_by_idx(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -19130,7 +19130,7 @@ delete_by_idx_old(hid_t fapl)
if (H5Oget_info3(group_id2, &oi, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&objtoken[u], &oi.token, sizeof(H5O_token_t));
+ memcpy(&objtoken[u], &oi.token, sizeof(H5O_token_t));
/* Close group */
if (H5Gclose(group_id2) < 0)
@@ -19164,7 +19164,7 @@ delete_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC) {
@@ -19181,7 +19181,7 @@ delete_by_idx_old(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -19227,7 +19227,7 @@ delete_by_idx_old(hid_t fapl)
if (H5Oget_info3(group_id2, &oi, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&objtoken[u], &oi.token, sizeof(H5O_token_t));
+ memcpy(&objtoken[u], &oi.token, sizeof(H5O_token_t));
/* Close group */
if (H5Gclose(group_id2) < 0)
@@ -19243,7 +19243,7 @@ delete_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Verify the link information for current link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC) {
@@ -19260,7 +19260,7 @@ delete_by_idx_old(hid_t fapl)
} /* end else */
/* Verify the name for current link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -19281,7 +19281,7 @@ delete_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Verify the link information for first link in appropriate order */
- HDmemset(&linfo, 0, sizeof(linfo));
+ memset(&linfo, 0, sizeof(linfo));
if (H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC) {
@@ -19298,7 +19298,7 @@ delete_by_idx_old(hid_t fapl)
} /* end else */
/* Verify the name for first link in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -19478,7 +19478,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Literate2(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19496,7 +19496,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19514,7 +19514,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Literate2(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19534,7 +19534,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -19550,7 +19550,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19570,7 +19570,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -19586,7 +19586,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if ((ret = H5Literate2(group_id, idx_type, order, &skip, link_iterate_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -19601,7 +19601,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -19670,7 +19670,7 @@ link_iterate(hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- if (NULL == (visited = (hbool_t *)HDmalloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -19699,7 +19699,7 @@ link_iterate(hid_t fapl)
"creation order index");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING("iterating over links by creation order index in native order w/creation "
"order index");
@@ -19726,7 +19726,7 @@ link_iterate(hid_t fapl)
"order index");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING(
"iterating over links by name index in native order w/creation order index");
@@ -19842,7 +19842,7 @@ link_iterate(hid_t fapl)
/* Free resources */
if (visited)
- HDfree(visited);
+ free(visited);
return SUCCEED;
@@ -19857,7 +19857,7 @@ error:
H5E_END_TRY;
if (visited)
- HDfree(visited);
+ free(visited);
return FAIL;
} /* end link_iterate() */
@@ -19975,7 +19975,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Literate2(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -19993,7 +19993,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -20011,7 +20011,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Literate2(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -20031,7 +20031,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -20047,7 +20047,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -20067,7 +20067,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -20083,7 +20083,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if ((ret = H5Literate2(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -20098,7 +20098,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -20169,7 +20169,7 @@ link_iterate_old(hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = CORDER_NLINKS;
- if (NULL == (visited = (hbool_t *)HDmalloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -20183,7 +20183,7 @@ link_iterate_old(hid_t fapl)
TESTING("iterating over links by name index in decreasing order in old-style group");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
TESTING("iterating over links by name index in native order in old-style group");
} /* end else */
@@ -20257,7 +20257,7 @@ link_iterate_old(hid_t fapl)
/* Free resources */
if (visited)
- HDfree(visited);
+ free(visited);
return SUCCEED;
@@ -20271,7 +20271,7 @@ error:
H5E_END_TRY;
if (visited)
- HDfree(visited);
+ free(visited);
return FAIL;
} /* end link_iterate_old() */
@@ -20346,7 +20346,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id,
/* Get the address of the root group in the file to mount */
if (H5Oget_info3(mount_file_id, &oi, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&mnt_root_token, &oi.token, sizeof(mnt_root_token));
+ memcpy(&mnt_root_token, &oi.token, sizeof(mnt_root_token));
/* Mount a file over a group in main group */
mnt_idx = 2;
@@ -20428,7 +20428,7 @@ open_by_idx(hid_t fapl)
TEST_ERROR;
/* Allocate object token array */
- if (NULL == (objno = (H5O_token_t *)HDmalloc(sizeof(H5O_token_t) * (max_compact * 2))))
+ if (NULL == (objno = (H5O_token_t *)malloc(sizeof(H5O_token_t) * (max_compact * 2))))
TEST_ERROR;
/* Create file to mount */
@@ -20461,7 +20461,7 @@ open_by_idx(hid_t fapl)
"order index");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING(
"open object by creation order index in native order w/creation order index");
@@ -20484,7 +20484,7 @@ open_by_idx(hid_t fapl)
TESTING("open object by name index in decreasing order w/o creation order index");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING("open object by name index in native order w/creation order index");
else
@@ -20635,7 +20635,7 @@ open_by_idx(hid_t fapl)
/* Free resources */
if (objno)
- HDfree(objno);
+ free(objno);
return SUCCEED;
@@ -20652,7 +20652,7 @@ error:
H5E_END_TRY;
if (objno)
- HDfree(objno);
+ free(objno);
return FAIL;
} /* end open_by_idx() */
@@ -20810,7 +20810,7 @@ open_by_idx_old(hid_t fapl)
TESTING("open object by name index in decreasing order in old-style group");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
TESTING("open object by name index in native order in old-style group");
} /* end else */
@@ -21046,7 +21046,7 @@ object_info(hid_t fapl)
TEST_ERROR;
/* Allocate object token array */
- if (NULL == (objno = (H5O_token_t *)HDmalloc(sizeof(H5O_token_t) * (max_compact * 2))))
+ if (NULL == (objno = (H5O_token_t *)malloc(sizeof(H5O_token_t) * (max_compact * 2))))
TEST_ERROR;
/* Create dataspace for attributes */
@@ -21078,7 +21078,7 @@ object_info(hid_t fapl)
"creation order index");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING("query object info by creation order index in native order w/creation "
"order index");
@@ -21105,7 +21105,7 @@ object_info(hid_t fapl)
"index");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING("query object info by name index in native order w/creation order index");
else
@@ -21288,7 +21288,7 @@ object_info(hid_t fapl)
if (H5Sclose(space_id) < 0)
TEST_ERROR;
if (objno)
- HDfree(objno);
+ free(objno);
return SUCCEED;
@@ -21305,7 +21305,7 @@ error:
H5E_END_TRY;
if (objno)
- HDfree(objno);
+ free(objno);
return FAIL;
} /* end object_info() */
@@ -21435,7 +21435,7 @@ object_info_old(hid_t fapl)
TESTING("query object info by name index in decreasing order in old-style group");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
TESTING("query object info by name index in native order in old-style group");
} /* end else */
@@ -21629,7 +21629,7 @@ group_info(hid_t fapl)
"creation order index");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING("query group info by creation order index in native order w/creation "
"order index");
@@ -21656,7 +21656,7 @@ group_info(hid_t fapl)
"index");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
if (use_index)
TESTING("query group info by name index in native order w/creation order index");
else
@@ -22149,7 +22149,7 @@ group_info_old(hid_t fapl)
TESTING("query group info by name index in decreasing order in old-style group");
} /* end else */
else {
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
TESTING("query group info by name index in native order in old-style group");
} /* end else */
@@ -22678,13 +22678,13 @@ main(void)
for (minimize_dset_oh = 0; minimize_dset_oh <= 1; minimize_dset_oh++) {
if (minimize_dset_oh) {
- HDprintf("\n-Testing with minimized dataset object headers-\n");
+ printf("\n-Testing with minimized dataset object headers-\n");
dcpl_g = H5Pcreate(H5P_DATASET_CREATE);
if (0 > dcpl_g)
TEST_ERROR;
}
else {
- HDprintf("\n-Testing with unminimzed dataset object headers-\n");
+ printf("\n-Testing with unminimzed dataset object headers-\n");
dcpl_g = H5P_DEFAULT;
}
@@ -22694,11 +22694,11 @@ main(void)
/* Check for FAPL to use */
if (new_format) {
my_fapl = fapl2;
- HDprintf("\n--Testing with 'new format'--\n");
+ printf("\n--Testing with 'new format'--\n");
}
else {
my_fapl = fapl;
- HDprintf("\n--Testing with 'old format'--\n");
+ printf("\n--Testing with 'old format'--\n");
}
/* always enter tests without external cache */
@@ -22752,12 +22752,12 @@ main(void)
if (efc) {
if (H5Pset_elink_file_cache_size(my_fapl, 8) < 0)
TEST_ERROR;
- HDprintf("\n---Testing with external file cache---\n");
+ printf("\n---Testing with external file cache---\n");
} /* end if */
else {
if (H5Pset_elink_file_cache_size(my_fapl, 0) < 0)
TEST_ERROR;
- HDprintf("\n---Testing without external file cache---\n");
+ printf("\n---Testing without external file cache---\n");
} /* end else */
nerrors += external_link_root(my_fapl, new_format) < 0 ? 1 : 0;
@@ -22941,10 +22941,10 @@ main(void)
/* Results */
if (nerrors) {
- HDprintf("***** %d LINK TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %d LINK TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
}
- HDprintf("All link tests passed.\n");
+ printf("All link tests passed.\n");
/* clean up symlink created by external link tests */
HDremove(SYMLINK1);
@@ -22954,9 +22954,9 @@ main(void)
HDrmdir(TMPDIR);
HDrmdir(TMPDIR2);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
HDputs("*** TESTS FAILED ***");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/links_env.c b/test/links_env.c
index 27e29ea..ca65ef8 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -161,7 +161,7 @@ main(void)
/* Splitter VFD has issues with external links */
if (!HDstrcmp(env_h5_drvr, "splitter")) {
HDputs(" -- SKIPPED for incompatible VFD --");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
h5_reset();
@@ -182,18 +182,18 @@ main(void)
/* Results */
if (nerrors) {
- HDprintf("***** %d External Link (HDF5_EXT_PREFIX) test%s FAILED! *****\n", nerrors,
- 1 == nerrors ? "" : "s");
- HDexit(EXIT_FAILURE);
+ printf("***** %d External Link (HDF5_EXT_PREFIX) test%s FAILED! *****\n", nerrors,
+ 1 == nerrors ? "" : "s");
+ exit(EXIT_FAILURE);
}
- HDprintf("All external Link (HDF5_EXT_PREFIX) tests passed.\n");
+ printf("All external Link (HDF5_EXT_PREFIX) tests passed.\n");
/* clean up tmp_links_env directory created by external link tests */
HDrmdir(TMPDIR);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
HDputs("*** TESTS FAILED ***");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/mdset.c b/test/mdset.c
index 06e7af2..fc022e2 100644
--- a/test/mdset.c
+++ b/test/mdset.c
@@ -83,7 +83,7 @@ test_mdset_location(hid_t fapl_id)
if ((file_id2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
TEST_ERROR;
- if (NULL == (buf = (int *)HDcalloc(2 * MAX_DSET_X * MAX_DSET_Y, sizeof(int))))
+ if (NULL == (buf = (int *)calloc(2 * MAX_DSET_X * MAX_DSET_Y, sizeof(int))))
TEST_ERROR;
/* Generate memory dataspace */
@@ -224,13 +224,13 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
dcpl_id[i] = -1;
/* Allocate buffers */
- if (NULL == (rbuf = (unsigned *)HDmalloc(buf_size)))
+ if (NULL == (rbuf = (unsigned *)malloc(buf_size)))
TEST_ERROR;
- if (NULL == (erbuf = (unsigned *)HDmalloc(buf_size)))
+ if (NULL == (erbuf = (unsigned *)malloc(buf_size)))
TEST_ERROR;
- if (NULL == (wbuf = (unsigned *)HDmalloc(buf_size)))
+ if (NULL == (wbuf = (unsigned *)malloc(buf_size)))
TEST_ERROR;
- if (NULL == (efbuf = (unsigned *)HDmalloc(buf_size)))
+ if (NULL == (efbuf = (unsigned *)malloc(buf_size)))
TEST_ERROR;
/* Initialize buffer indices */
@@ -378,8 +378,8 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
} /* end for */
/* Initialize read buffer and expected read buffer */
- (void)HDmemset(rbuf, 0, buf_size);
- (void)HDmemset(erbuf, 0, buf_size);
+ (void)memset(rbuf, 0, buf_size);
+ (void)memset(erbuf, 0, buf_size);
/* Initialize write buffer */
for (j = 0; j < max_dsets; j++)
@@ -388,7 +388,7 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
wbufi[j][k][l] = (unsigned)((j * MAX_DSET_X * MAX_DSET_Y) + (k * MAX_DSET_Y) + l);
/* Initialize expected file buffer */
- (void)HDmemset(efbuf, 0, buf_size);
+ (void)memset(efbuf, 0, buf_size);
/* Perform read/write operations */
for (j = 0; j < OPS_PER_FILE; j++) {
diff --git a/test/mf.c b/test/mf.c
index aa8a728..ba858a5 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -159,36 +159,35 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *state)
{
H5FS_stat_t frspace_stats; /* Statistics about the heap */
- HDassert(f);
- HDassert(frsp);
+ assert(f);
+ assert(frsp);
/* Get statistics for free-space and verify they are correct */
if (H5FS_stat_info(f, frsp, &frspace_stats) < 0)
FAIL_STACK_ERROR;
if (frspace_stats.tot_space != state->tot_space) {
- HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
- frspace_stats.tot_space, state->tot_space);
+ fprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
+ frspace_stats.tot_space, state->tot_space);
TEST_ERROR;
} /* end if */
if (frspace_stats.tot_sect_count != state->tot_sect_count) {
- HDfprintf(stdout,
- "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
- frspace_stats.tot_sect_count, state->tot_sect_count);
+ fprintf(stdout,
+ "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
+ frspace_stats.tot_sect_count, state->tot_sect_count);
TEST_ERROR;
} /* end if */
if (frspace_stats.serial_sect_count != state->serial_sect_count) {
- HDfprintf(stdout,
- "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE
- "\n",
- frspace_stats.serial_sect_count, state->serial_sect_count);
+ fprintf(stdout,
+ "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE
+ "\n",
+ frspace_stats.serial_sect_count, state->serial_sect_count);
TEST_ERROR;
} /* end if */
if (frspace_stats.ghost_sect_count != state->ghost_sect_count) {
- HDfprintf(stdout,
- "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE
- "\n",
- frspace_stats.ghost_sect_count, state->ghost_sect_count);
+ fprintf(stdout,
+ "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE "\n",
+ frspace_stats.ghost_sect_count, state->ghost_sect_count);
TEST_ERROR;
} /* end if */
@@ -1105,7 +1104,7 @@ test_mf_fs_start(hid_t fapl)
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
TEST_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
TEST_ERROR;
@@ -1226,7 +1225,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1304,7 +1303,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1380,7 +1379,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1412,7 +1411,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if (tmp != TBLOCK_ADDR70)
TEST_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
TEST_ERROR;
@@ -1556,7 +1555,7 @@ test_mf_fs_extend(hid_t fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1666,7 +1665,7 @@ test_mf_fs_extend(hid_t fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1771,7 +1770,7 @@ test_mf_fs_extend(hid_t fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -1877,7 +1876,7 @@ test_mf_fs_extend(hid_t fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += (TBLOCK_SIZE30 - 10);
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -3029,7 +3028,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR;
/* Verify that meta_aggr's unused space of 1968 is freed to free-space */
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50));
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -3219,7 +3218,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR;
/* Verify that meta_aggr's unused space of 1968 is freed to free-space */
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50));
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -3914,7 +3913,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (ma_addr || ma_size)
TEST_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
if (mis_align) {
state.tot_space += mis_align;
state.tot_sect_count += 1;
@@ -4187,7 +4186,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE50;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -4251,7 +4250,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE8000;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -4338,7 +4337,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR;
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE700;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
@@ -4558,7 +4557,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
if (mis_align) {
state.tot_space += mis_align;
state.tot_sect_count += 1;
@@ -4821,7 +4820,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
- HDmemset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
+ memset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
if (mis_align) {
state[type].tot_space += mis_align;
state[type].tot_sect_count += 1;
@@ -5167,7 +5166,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
- HDmemset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
+ memset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
if (mis_align) {
state[type].tot_space += mis_align;
state[type].tot_sect_count += 1;
@@ -5481,7 +5480,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
- HDmemset(&state, 0, sizeof(H5FS_stat_t));
+ memset(&state, 0, sizeof(H5FS_stat_t));
if (mis_align) {
state.tot_space += mis_align;
state.tot_sect_count += 1;
@@ -5705,7 +5704,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
- HDmemset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
+ memset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
if (mis_align) {
state[type].tot_space += mis_align;
state[type].tot_sect_count += 1;
@@ -5971,7 +5970,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR;
/* fragment for alignment of block 30 in meta_aggr is freed to free-space */
- HDmemset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
+ memset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
if (mis_align) {
state[type].tot_space += mis_align;
state[type].tot_sect_count += 1;
@@ -6183,7 +6182,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
H5FD_mem_t mt;
/* Get current multi settings */
- HDmemset(memb_name, 0, sizeof memb_name);
+ memset(memb_name, 0, sizeof memb_name);
if (H5Pget_fapl_multi(copied_fapl, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0)
TEST_ERROR;
@@ -6204,7 +6203,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- HDfree(memb_name[mt]);
+ free(memb_name[mt]);
} /* end else */
} /* end if */
@@ -6315,7 +6314,7 @@ test_mf_fs_persist_split(void)
* with the split file driver.
*/
SKIPPED();
- HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
+ fprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
return 0; /* <========== note return */
/* File creation property list template */
@@ -6325,7 +6324,7 @@ test_mf_fs_persist_split(void)
* with the split file driver.
*/
SKIPPED();
- HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
+ fprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
return 0; /* <========== note return */
/* File creation property list template */
@@ -6571,11 +6570,11 @@ error:
#define MULTI_SETUP(memb_map, memb_fapl, memb_name, memb_addr, sv) \
{ \
H5FD_mem_t mt; \
- HDmemset(memb_map, 0, sizeof memb_map); \
- HDmemset(memb_fapl, 0, sizeof memb_fapl); \
- HDmemset(memb_name, 0, sizeof memb_name); \
- HDmemset(memb_addr, 0, sizeof memb_addr); \
- HDmemset(sv, 0, sizeof sv); \
+ memset(memb_map, 0, sizeof memb_map); \
+ memset(memb_fapl, 0, sizeof memb_fapl); \
+ memset(memb_name, 0, sizeof memb_name); \
+ memset(memb_addr, 0, sizeof memb_addr); \
+ memset(sv, 0, sizeof sv); \
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) { \
memb_map[mt] = H5FD_MEM_SUPER; \
memb_fapl[mt] = H5P_DEFAULT; \
@@ -6638,14 +6637,14 @@ test_mf_fs_persist_multi(void)
* with the multi file driver.
*/
SKIPPED();
- HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
+ fprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
return 0; /* <========== note return */
/* for now, we don't support persistent free space managers
* with the multi file driver.
*/
SKIPPED();
- HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
+ fprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
return 0; /* <========== note return */
/* File creation property list template */
@@ -7415,7 +7414,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
if (nsects) {
/* Allocate storage for the free space section information */
- sect_info = (H5F_sect_info_t *)HDcalloc((size_t)nsects, sizeof(H5F_sect_info_t));
+ sect_info = (H5F_sect_info_t *)calloc((size_t)nsects, sizeof(H5F_sect_info_t));
H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)nsects, sect_info);
@@ -7424,7 +7423,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
if (sect_info[i].size < fs_threshold)
TEST_ERROR;
if (sect_info)
- HDfree(sect_info);
+ free(sect_info);
}
}
else {
@@ -7493,7 +7492,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
- HDmemset(&fs_state_zero, 0, sizeof(H5FS_stat_t));
+ memset(&fs_state_zero, 0, sizeof(H5FS_stat_t));
/* Copy the file access property list */
if ((fapl2 = H5Pcopy(fapl)) < 0)
@@ -7513,7 +7512,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
continue;
/* Clear out free-space statistics */
- HDmemset(&fs_state, 0, sizeof(H5FS_stat_t));
+ memset(&fs_state, 0, sizeof(H5FS_stat_t));
/* Create file-creation template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -7756,9 +7755,9 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split)
hbool_t relax;
H5FD_mem_t mt;
- HDassert(is_multi_or_split);
+ assert(is_multi_or_split);
- HDmemset(memb_name, 0, sizeof memb_name);
+ memset(memb_name, 0, sizeof memb_name);
/* Get current split settings */
if (H5Pget_fapl_multi(fapl, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0)
@@ -7782,7 +7781,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- HDfree(memb_name[mt]);
+ free(memb_name[mt]);
return 0;
@@ -8897,7 +8896,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
if (H5Pset_alignment(memb_fapl, 0, (hsize_t)TEST_ALIGN16) < 0)
TEST_ERROR;
- HDmemset(memb_name, 0, sizeof memb_name);
+ memset(memb_name, 0, sizeof memb_name);
if (split) {
/* Set split driver with new FAPLs */
@@ -8941,7 +8940,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- HDfree(memb_name[mt]);
+ free(memb_name[mt]);
/* Close memb_fapl */
if (H5Pclose(memb_fapl) < 0)
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c
index 489a9c0..0d88a30 100644
--- a/test/mirror_vfd.c
+++ b/test/mirror_vfd.c
@@ -63,8 +63,8 @@ static unsigned int g_verbosity = DEFAULT_VERBOSITY;
#define LOGPRINT(lvl, ...) \
do { \
if ((lvl) <= g_verbosity) { \
- HDfprintf(g_log_stream, __VA_ARGS__); \
- HDfflush(g_log_stream); \
+ fprintf(g_log_stream, __VA_ARGS__); \
+ fflush(g_log_stream); \
} \
} while (0)
@@ -140,7 +140,7 @@ populate_filepath(const char *dirname, const char *basename, hid_t fapl_id, char
if ((basename == NULL) || (*basename == 0) || (dirname == NULL) || (*dirname == 0) || (path_out == NULL))
TEST_ERROR;
- if (NULL == (path = HDcalloc(H5FD_SPLITTER_PATH_MAX, sizeof(char))))
+ if (NULL == (path = calloc(H5FD_SPLITTER_PATH_MAX, sizeof(char))))
TEST_ERROR;
if (HDsnprintf(path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname,
@@ -157,12 +157,12 @@ populate_filepath(const char *dirname, const char *basename, hid_t fapl_id, char
TEST_ERROR;
}
- HDfree(path);
+ free(path);
return SUCCEED;
error:
- HDfree(path);
+ free(path);
return FAIL;
} /* end populate_filepath() */
@@ -181,7 +181,7 @@ build_paths(const char *basename, H5FD_splitter_vfd_config_t *splitter_config,
{
char *baselogname = NULL;
- if (NULL == (baselogname = HDcalloc(H5FD_SPLITTER_PATH_MAX, sizeof(char))))
+ if (NULL == (baselogname = calloc(H5FD_SPLITTER_PATH_MAX, sizeof(char))))
TEST_ERROR;
if (populate_filepath(MIRROR_RW_DIR, basename, splitter_config->rw_fapl_id, names->rw, TRUE) < 0)
@@ -198,12 +198,12 @@ build_paths(const char *basename, H5FD_splitter_vfd_config_t *splitter_config,
if (populate_filepath(MIRROR_WO_DIR, baselogname, splitter_config->wo_fapl_id, names->log, FALSE) < 0)
TEST_ERROR;
- HDfree(baselogname);
+ free(baselogname);
return SUCCEED;
error:
- HDfree(baselogname);
+ free(baselogname);
return FAIL;
} /* end build_paths() */
@@ -274,16 +274,16 @@ error:
} \
if (_x != (len)) { \
size_t _y = 0; \
- HDprintf("First bytes differ at %zu\n", _x); \
- HDprintf("exp "); \
+ printf("First bytes differ at %zu\n", _x); \
+ printf("exp "); \
for (_y = _x; _y < (len); _y++) { \
- HDprintf("%02X", (unsigned char)(exp)[_y]); \
+ printf("%02X", (unsigned char)(exp)[_y]); \
} \
- HDprintf("\nact "); \
+ printf("\nact "); \
for (_y = _x; _y < (len); _y++) { \
- HDprintf("%02X", (unsigned char)(act)[_y]); \
+ printf("%02X", (unsigned char)(act)[_y]); \
} \
- HDprintf("\n"); \
+ printf("\n"); \
} \
} while (0); /* end PRINT_BUFFER_DIFF */
@@ -303,13 +303,13 @@ test_encdec_uint8_t(void)
TESTING("Mirror encode/decode of uint8_t data");
/* Start of buffer uint8_t */
- HDmemset(buf, 0, 8);
- HDmemset(expected, 0, 8);
+ memset(buf, 0, 8);
+ memset(expected, 0, 8);
expected[0] = 200;
out = 0;
if (H5FD__mirror_xmit_encode_uint8(buf, v) != 1)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 8) != 0) {
+ if (memcmp(buf, expected, 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 8);
TEST_ERROR;
}
@@ -319,13 +319,13 @@ test_encdec_uint8_t(void)
TEST_ERROR;
/* Middle of buffer uint8_t */
- HDmemset(buf, 0, 8);
- HDmemset(expected, 0, 8);
+ memset(buf, 0, 8);
+ memset(expected, 0, 8);
expected[3] = v;
out = 0;
if (H5FD__mirror_xmit_encode_uint8((buf + 3), v) != 1)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 8) != 0) {
+ if (memcmp(buf, expected, 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 8);
TEST_ERROR;
}
@@ -335,13 +335,13 @@ test_encdec_uint8_t(void)
TEST_ERROR;
/* End of buffer uint8_t */
- HDmemset(buf, 0, 8);
- HDmemset(expected, 0, 8);
+ memset(buf, 0, 8);
+ memset(expected, 0, 8);
expected[7] = v;
out = 0;
if (H5FD__mirror_xmit_encode_uint8((buf + 7), v) != 1)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 8) != 0) {
+ if (memcmp(buf, expected, 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 8);
TEST_ERROR;
}
@@ -369,14 +369,14 @@ test_encdec_uint16_t(void)
TESTING("Mirror encode/decode of uint16_t data");
/* Start of buffer uint16_t */
- HDmemset(buf, 0, 8);
- HDmemset(expected, 0, 8);
+ memset(buf, 0, 8);
+ memset(expected, 0, 8);
expected[0] = 0x8F;
expected[1] = 0x02;
out = 0;
if (H5FD__mirror_xmit_encode_uint16(buf, v) != 2)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 8) != 0) {
+ if (memcmp(buf, expected, 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 8);
TEST_ERROR;
}
@@ -386,14 +386,14 @@ test_encdec_uint16_t(void)
TEST_ERROR;
/* Middle of buffer uint16_t */
- HDmemset(buf, 0, 8);
- HDmemset(expected, 0, 8);
+ memset(buf, 0, 8);
+ memset(expected, 0, 8);
expected[3] = 0x8F;
expected[4] = 0x02;
out = 0;
if (H5FD__mirror_xmit_encode_uint16((buf + 3), v) != 2)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 8) != 0) {
+ if (memcmp(buf, expected, 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 8);
TEST_ERROR;
}
@@ -409,14 +409,14 @@ test_encdec_uint16_t(void)
TEST_ERROR;
/* End of buffer uint16_t */
- HDmemset(buf, 0, 8);
- HDmemset(expected, 0, 8);
+ memset(buf, 0, 8);
+ memset(expected, 0, 8);
expected[6] = 0x8F;
expected[7] = 0x02;
out = 0;
if (H5FD__mirror_xmit_encode_uint16((buf + 6), v) != 2)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 8) != 0) {
+ if (memcmp(buf, expected, 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 8);
TEST_ERROR;
}
@@ -444,8 +444,8 @@ test_encdec_uint32_t(void)
TESTING("Mirror encode/decode of uint32_t data");
/* Start of buffer uint32_t */
- HDmemset(buf, 0, 8);
- HDmemset(expected, 0, 8);
+ memset(buf, 0, 8);
+ memset(expected, 0, 8);
expected[0] = 0x8F;
expected[1] = 0x02;
expected[2] = 0x00;
@@ -453,7 +453,7 @@ test_encdec_uint32_t(void)
out = 0;
if (H5FD__mirror_xmit_encode_uint32(buf, v) != 4)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 8) != 0) {
+ if (memcmp(buf, expected, 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 8);
TEST_ERROR;
}
@@ -463,8 +463,8 @@ test_encdec_uint32_t(void)
TEST_ERROR;
/* Middle of buffer uint32_t */
- HDmemset(buf, 0, 8);
- HDmemset(expected, 0, 8);
+ memset(buf, 0, 8);
+ memset(expected, 0, 8);
expected[3] = 0x8F;
expected[4] = 0x02;
expected[5] = 0x00;
@@ -472,7 +472,7 @@ test_encdec_uint32_t(void)
out = 0;
if (H5FD__mirror_xmit_encode_uint32((buf + 3), v) != 4)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 8) != 0) {
+ if (memcmp(buf, expected, 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 8);
TEST_ERROR;
}
@@ -487,8 +487,8 @@ test_encdec_uint32_t(void)
TEST_ERROR;
/* End of buffer uint32_t */
- HDmemset(buf, 0, 8);
- HDmemset(expected, 0, 8);
+ memset(buf, 0, 8);
+ memset(expected, 0, 8);
expected[4] = 0x8F;
expected[5] = 0x02;
expected[6] = 0x00;
@@ -496,7 +496,7 @@ test_encdec_uint32_t(void)
out = 0;
if (H5FD__mirror_xmit_encode_uint32((buf + 4), v) != 4)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 8) != 0) {
+ if (memcmp(buf, expected, 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 8);
TEST_ERROR;
}
@@ -524,8 +524,8 @@ test_encdec_uint64_t(void)
TESTING("Mirror encode/decode of uint64_t data");
/* Start of buffer uint64_t */
- HDmemset(buf, 0, 16);
- HDmemset(expected, 0, 16);
+ memset(buf, 0, 16);
+ memset(expected, 0, 16);
expected[0] = 0x90;
expected[1] = 0xDC;
expected[2] = 0xBE;
@@ -537,7 +537,7 @@ test_encdec_uint64_t(void)
out = 0;
if (H5FD__mirror_xmit_encode_uint64(buf, v) != 8)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 16) != 0) {
+ if (memcmp(buf, expected, 16) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 16);
TEST_ERROR;
}
@@ -547,8 +547,8 @@ test_encdec_uint64_t(void)
TEST_ERROR;
/* Middle of buffer uint64_t */
- HDmemset(buf, 0, 16);
- HDmemset(expected, 0, 16);
+ memset(buf, 0, 16);
+ memset(expected, 0, 16);
expected[3] = 0x90;
expected[4] = 0xDC;
expected[5] = 0xBE;
@@ -560,7 +560,7 @@ test_encdec_uint64_t(void)
out = 0;
if (H5FD__mirror_xmit_encode_uint64((buf + 3), v) != 8)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 16) != 0) {
+ if (memcmp(buf, expected, 16) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 16);
TEST_ERROR;
}
@@ -575,8 +575,8 @@ test_encdec_uint64_t(void)
TEST_ERROR;
/* End of buffer uint64_t */
- HDmemset(buf, 0, 16);
- HDmemset(expected, 0, 16);
+ memset(buf, 0, 16);
+ memset(expected, 0, 16);
expected[8] = 0x90;
expected[9] = 0xDC;
expected[10] = 0xBE;
@@ -588,7 +588,7 @@ test_encdec_uint64_t(void)
out = 0;
if (H5FD__mirror_xmit_encode_uint64((buf + 8), v) != 8)
TEST_ERROR;
- if (HDmemcmp(buf, expected, 16) != 0) {
+ if (memcmp(buf, expected, 16) != 0) {
PRINT_BUFFER_DIFF(buf, expected, 16);
TEST_ERROR;
}
@@ -628,7 +628,7 @@ test_encdec_header(H5FD_mirror_xmit_t xmit_mock)
FAIL_PUTS_ERROR("Header size definition does not match test\n");
/* Populate the expected buffer; expect end padding of 0xFF */
- HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8);
+ memset(expected, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8);
for (i = 0; i < H5FD_MIRROR_XMIT_HEADER_SIZE; i++) {
expected[i + 2] = (unsigned char)i;
}
@@ -636,10 +636,10 @@ test_encdec_header(H5FD_mirror_xmit_t xmit_mock)
/* Encode, and compare buffer contents
* Initial buffer is filled with 0xFF to match expected padding
*/
- HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8);
+ memset(buf, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8);
if (H5FD_mirror_xmit_encode_header((buf + 2), &xmit_mock) != H5FD_MIRROR_XMIT_HEADER_SIZE)
TEST_ERROR;
- if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_HEADER_SIZE + 8) != 0) {
+ if (memcmp(buf, expected, H5FD_MIRROR_XMIT_HEADER_SIZE + 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_HEADER_SIZE + 8);
TEST_ERROR;
}
@@ -704,7 +704,7 @@ test_encdec_set_eoa(H5FD_mirror_xmit_t xmit_mock)
FAIL_PUTS_ERROR("shared header structure is not in expected state");
/* Populate the expected buffer; expect end padding of 0xFF */
- HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8);
+ memset(expected, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8);
for (i = 0; i < H5FD_MIRROR_XMIT_EOA_SIZE; i++)
expected[i + 2] = (unsigned char)i;
@@ -716,10 +716,10 @@ test_encdec_set_eoa(H5FD_mirror_xmit_t xmit_mock)
/* Encode, and compare buffer contents
* Initial buffer is filled with 0xFF to match expected padding
*/
- HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8);
+ memset(buf, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8);
if (H5FD_mirror_xmit_encode_set_eoa((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_EOA_SIZE)
TEST_ERROR;
- if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_EOA_SIZE + 8) != 0) {
+ if (memcmp(buf, expected, H5FD_MIRROR_XMIT_EOA_SIZE + 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_EOA_SIZE + 8);
TEST_ERROR;
}
@@ -792,7 +792,7 @@ test_encdec_lock(H5FD_mirror_xmit_t xmit_mock)
FAIL_PUTS_ERROR("shared header structure is not in expected state");
/* Populate the expected buffer; expect end padding of 0xFF */
- HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8);
+ memset(expected, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8);
for (i = 0; i < H5FD_MIRROR_XMIT_LOCK_SIZE; i++)
expected[i + 2] = (unsigned char)i;
@@ -803,10 +803,10 @@ test_encdec_lock(H5FD_mirror_xmit_t xmit_mock)
/* Encode, and compare buffer contents
* Initial buffer is filled with 0xFF to match expected padding
*/
- HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8);
+ memset(buf, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8);
if (H5FD_mirror_xmit_encode_lock((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_LOCK_SIZE)
TEST_ERROR;
- if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_LOCK_SIZE + 8) != 0) {
+ if (memcmp(buf, expected, H5FD_MIRROR_XMIT_LOCK_SIZE + 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_LOCK_SIZE + 8);
TEST_ERROR;
}
@@ -877,17 +877,17 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock)
FAIL_PUTS_ERROR("shared header structure is not in expected state");
/* Allocate memory */
- if (NULL == (buf = HDmalloc((H5FD_MIRROR_XMIT_OPEN_SIZE + 8) * sizeof(unsigned char))))
+ if (NULL == (buf = malloc((H5FD_MIRROR_XMIT_OPEN_SIZE + 8) * sizeof(unsigned char))))
FAIL_PUTS_ERROR("Unable to allocate memory for buf");
- if (NULL == (expected = HDmalloc((H5FD_MIRROR_XMIT_OPEN_SIZE + 8) * sizeof(unsigned char))))
+ if (NULL == (expected = malloc((H5FD_MIRROR_XMIT_OPEN_SIZE + 8) * sizeof(unsigned char))))
FAIL_PUTS_ERROR("Unable to allocate memory for expected");
- if (NULL == (xmit_in = HDmalloc(sizeof(H5FD_mirror_xmit_open_t))))
+ if (NULL == (xmit_in = malloc(sizeof(H5FD_mirror_xmit_open_t))))
FAIL_PUTS_ERROR("Unable to allocate memory for xmit_in");
- if (NULL == (xmit_out = HDmalloc(sizeof(H5FD_mirror_xmit_open_t))))
+ if (NULL == (xmit_out = malloc(sizeof(H5FD_mirror_xmit_open_t))))
FAIL_PUTS_ERROR("Unable to allocate memory for xmit_out");
/* Populate the expected buffer; expect end padding of 0xFF */
- HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8);
+ memset(expected, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8);
for (size_t i = 0; i < H5FD_MIRROR_XMIT_OPEN_SIZE; i++) {
/* 0x100 is "zero" in a byte, so encode will treat it as a NULL-
* terminator in the filepath string. Expect all zeroes following.
@@ -909,10 +909,10 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock)
/* Encode, and compare buffer contents
* Initial buffer is filled with 0xFF to match expected padding
*/
- HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8);
+ memset(buf, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8);
if (H5FD_mirror_xmit_encode_open((buf + 2), xmit_in) != H5FD_MIRROR_XMIT_OPEN_SIZE)
TEST_ERROR;
- if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_OPEN_SIZE + 8) != 0) {
+ if (memcmp(buf, expected, H5FD_MIRROR_XMIT_OPEN_SIZE + 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_OPEN_SIZE + 8);
TEST_ERROR;
}
@@ -970,19 +970,19 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock)
TEST_ERROR;
}
- HDfree(buf);
- HDfree(expected);
- HDfree(xmit_in);
- HDfree(xmit_out);
+ free(buf);
+ free(expected);
+ free(xmit_in);
+ free(xmit_out);
PASSED();
return 0;
error:
- HDfree(buf);
- HDfree(expected);
- HDfree(xmit_in);
- HDfree(xmit_out);
+ free(buf);
+ free(expected);
+ free(xmit_in);
+ free(xmit_out);
return -1;
}
@@ -1013,7 +1013,7 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock)
FAIL_PUTS_ERROR("shared header structure is not in expected state");
/* Populate the expected buffer; expect end padding of 0xFF */
- HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8);
+ memset(expected, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8);
for (i = 0; i < H5FD_MIRROR_XMIT_REPLY_SIZE; i++) {
/* 0x100 is "zero" in a byte, so encode will treat it as a NULL-
* terminator in the filepath string. Expect all zeroes following.
@@ -1033,10 +1033,10 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock)
/* Encode, and compare buffer contents
* Initial buffer is filled with 0xFF to match expected padding
*/
- HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8);
+ memset(buf, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8);
if (H5FD_mirror_xmit_encode_reply((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_REPLY_SIZE)
TEST_ERROR;
- if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_REPLY_SIZE + 8) != 0) {
+ if (memcmp(buf, expected, H5FD_MIRROR_XMIT_REPLY_SIZE + 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_REPLY_SIZE + 8);
TEST_ERROR;
}
@@ -1116,7 +1116,7 @@ test_encdec_write(H5FD_mirror_xmit_t xmit_mock)
FAIL_PUTS_ERROR("shared header structure is not in expected state");
/* Populate the expected buffer; expect end padding of 0xFF */
- HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8);
+ memset(expected, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8);
for (i = 0; i < H5FD_MIRROR_XMIT_WRITE_SIZE; i++)
expected[i + 2] = (unsigned char)i;
@@ -1129,10 +1129,10 @@ test_encdec_write(H5FD_mirror_xmit_t xmit_mock)
/* Encode, and compare buffer contents
* Initial buffer is filled with 0xFF to match expected padding
*/
- HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8);
+ memset(buf, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8);
if (H5FD_mirror_xmit_encode_write((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_WRITE_SIZE)
TEST_ERROR;
- if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_WRITE_SIZE + 8) != 0) {
+ if (memcmp(buf, expected, H5FD_MIRROR_XMIT_WRITE_SIZE + 8) != 0) {
PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_WRITE_SIZE + 8);
TEST_ERROR;
}
@@ -1209,7 +1209,7 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
H5FD_mirror_fapl_t mirror_conf;
hid_t ret_value = H5I_INVALID_HID;
- if (NULL == (splitter_config = HDmalloc(sizeof(H5FD_splitter_vfd_config_t))))
+ if (NULL == (splitter_config = malloc(sizeof(H5FD_splitter_vfd_config_t))))
TEST_ERROR;
/* Initialize the fapls, too, so the library doesn't try to
@@ -1263,7 +1263,7 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
if (H5Pclose(splitter_config->wo_fapl_id) < 0)
TEST_ERROR;
- HDfree(splitter_config);
+ free(splitter_config);
return ret_value;
@@ -1275,7 +1275,7 @@ error:
H5Pclose(ret_value);
}
H5E_END_TRY;
- HDfree(splitter_config);
+ free(splitter_config);
return H5I_INVALID_HID;
} /* end create_mirroring_split_fapl() */
@@ -1302,7 +1302,7 @@ test_create_and_close(const struct mt_opts *opts)
TESTING("File creation and immediate close");
- if (NULL == (names = HDmalloc(sizeof(struct mirrortest_filenames))))
+ if (NULL == (names = malloc(sizeof(struct mirrortest_filenames))))
TEST_ERROR;
/* Create FAPL for splitter[sec2|mirror] */
@@ -1317,13 +1317,13 @@ test_create_and_close(const struct mt_opts *opts)
if (H5Pclose(fapl_id) < 0)
TEST_ERROR;
- HDfree(names);
+ free(names);
PASSED();
return 0;
error:
- HDfree(names);
+ free(names);
H5E_BEGIN_TRY
{
H5Fclose(file_id);
@@ -1359,9 +1359,9 @@ create_datasets(hid_t file_id, unsigned min_dset, unsigned max_dset)
hsize_t chunk_dims[2] = {CHUNK_DIM, CHUNK_DIM};
hsize_t dset_dims[2] = {DSET_DIM, DSET_DIM};
- HDassert(file_id >= 0);
- HDassert(min_dset <= max_dset);
- HDassert(max_dset <= MAX_DSET_COUNT);
+ assert(file_id >= 0);
+ assert(min_dset <= max_dset);
+ assert(max_dset <= MAX_DSET_COUNT);
LOGPRINT(2, "create_dataset()\n");
@@ -1678,9 +1678,9 @@ verify_datasets(hid_t file_id, unsigned min_dset, unsigned max_dset)
hid_t memspace_id = H5I_INVALID_HID;
hsize_t chunk_dims[2] = {CHUNK_DIM, CHUNK_DIM};
- HDassert(file_id >= 0);
- HDassert(min_dset <= max_dset);
- HDassert(max_dset <= MAX_DSET_COUNT);
+ assert(file_id >= 0);
+ assert(min_dset <= max_dset);
+ assert(max_dset <= MAX_DSET_COUNT);
LOGPRINT(2, "verify_datasets()\n");
@@ -1741,7 +1741,7 @@ test_basic_dataset_write(const struct mt_opts *opts)
TESTING("Mirror open and dataset writing");
- if (NULL == (names = HDmalloc(sizeof(struct mirrortest_filenames))))
+ if (NULL == (names = malloc(sizeof(struct mirrortest_filenames))))
TEST_ERROR;
/* Create FAPL for Splitter[sec2|mirror] */
@@ -1749,7 +1749,7 @@ test_basic_dataset_write(const struct mt_opts *opts)
TEST_ERROR;
/* Prepare data to be written */
- if (NULL == (buf = HDmalloc(DATABUFFER_SIZE * DATABUFFER_SIZE * sizeof(int))))
+ if (NULL == (buf = malloc(DATABUFFER_SIZE * DATABUFFER_SIZE * sizeof(int))))
TEST_ERROR;
for (i = 0; i < DATABUFFER_SIZE; i++) {
for (j = 0; j < DATABUFFER_SIZE; j++) {
@@ -1798,15 +1798,15 @@ test_basic_dataset_write(const struct mt_opts *opts)
if (h5_compare_file_bytes(names->rw, names->wo) < 0)
TEST_ERROR;
- HDfree(buf);
- HDfree(names);
+ free(buf);
+ free(names);
PASSED();
return 0;
error:
- HDfree(buf);
- HDfree(names);
+ free(buf);
+ free(names);
H5E_BEGIN_TRY
{
@@ -1841,7 +1841,7 @@ test_chunked_dataset_write(const struct mt_opts *opts)
TESTING("Mirror open and dataset writing (chunked)");
- if (NULL == (names = HDmalloc(sizeof(struct mirrortest_filenames))))
+ if (NULL == (names = malloc(sizeof(struct mirrortest_filenames))))
TEST_ERROR;
/* Create FAPL for Splitter[sec2|mirror] */
@@ -1891,13 +1891,13 @@ test_chunked_dataset_write(const struct mt_opts *opts)
TEST_ERROR;
}
- HDfree(names);
+ free(names);
PASSED();
return 0;
error:
- HDfree(names);
+ free(names);
H5E_BEGIN_TRY
{
H5Fclose(file_id);
@@ -1931,7 +1931,7 @@ test_on_disk_zoo(const struct mt_opts *opts)
TESTING("'Zoo' of on-disk structures");
- if (NULL == (names = HDmalloc(sizeof(struct mirrortest_filenames))))
+ if (NULL == (names = malloc(sizeof(struct mirrortest_filenames))))
TEST_ERROR;
/* Create FAPL for Splitter[sec2|mirror] */
@@ -1963,7 +1963,7 @@ test_on_disk_zoo(const struct mt_opts *opts)
validate_zoo(file_id, grp_name, 0); /* sanity-check */
if (!pass) {
- HDprintf("%s", failure_mssg);
+ printf("%s", failure_mssg);
TEST_ERROR;
}
@@ -1982,13 +1982,13 @@ test_on_disk_zoo(const struct mt_opts *opts)
if (h5_compare_file_bytes(names->rw, names->wo) < 0)
TEST_ERROR;
- HDfree(names);
+ free(names);
PASSED();
return 0;
error:
- HDfree(names);
+ free(names);
H5E_BEGIN_TRY
{
H5Fclose(file_id);
@@ -2035,9 +2035,9 @@ test_vanishing_datasets(const struct mt_opts *opts)
TESTING("Vanishing Datasets");
- if (NULL == (names = HDmalloc(sizeof(struct mirrortest_filenames))))
+ if (NULL == (names = malloc(sizeof(struct mirrortest_filenames))))
TEST_ERROR;
- if (NULL == (buf = HDcalloc(1, sizeof(*buf))))
+ if (NULL == (buf = calloc(1, sizeof(*buf))))
TEST_ERROR;
/* -------------------- */
@@ -2095,7 +2095,7 @@ test_vanishing_datasets(const struct mt_opts *opts)
if (H5Gget_info(file_id, &group_info) < 0)
TEST_ERROR;
if (group_info.nlinks > 0) {
- HDfprintf(stderr, "links in rw file: %" PRIuHSIZE "\n", group_info.nlinks);
+ fprintf(stderr, "links in rw file: %" PRIuHSIZE "\n", group_info.nlinks);
TEST_ERROR;
}
if (H5Fclose(file_id) < 0)
@@ -2105,7 +2105,7 @@ test_vanishing_datasets(const struct mt_opts *opts)
if (H5Gget_info(file_id, &group_info) < 0)
TEST_ERROR;
if (group_info.nlinks > 0) {
- HDfprintf(stderr, "links in wo file: %" PRIuHSIZE "\n", group_info.nlinks);
+ fprintf(stderr, "links in wo file: %" PRIuHSIZE "\n", group_info.nlinks);
TEST_ERROR;
}
if (H5Fclose(file_id) < 0)
@@ -2121,15 +2121,15 @@ test_vanishing_datasets(const struct mt_opts *opts)
if (H5Pclose(fapl_id) < 0)
TEST_ERROR;
- HDfree(names);
- HDfree(buf);
+ free(names);
+ free(buf);
PASSED();
return 0;
error:
- HDfree(names);
- HDfree(buf);
+ free(names);
+ free(buf);
H5E_BEGIN_TRY
{
H5Pclose(fapl_id);
@@ -2173,7 +2173,7 @@ test_concurrent_access(const struct mt_opts *opts)
TESTING("Concurrent opened mirrored files");
- if (NULL == (bundle = HDmalloc(sizeof(struct file_bundle) * CONCURRENT_COUNT)))
+ if (NULL == (bundle = malloc(sizeof(struct file_bundle) * CONCURRENT_COUNT)))
TEST_ERROR;
/* Initialize bundle */
@@ -2198,7 +2198,7 @@ test_concurrent_access(const struct mt_opts *opts)
}
/* Prepare data to be written */
- if (NULL == (buf = HDmalloc(DATABUFFER_SIZE * DATABUFFER_SIZE * sizeof(int))))
+ if (NULL == (buf = malloc(DATABUFFER_SIZE * DATABUFFER_SIZE * sizeof(int))))
TEST_ERROR;
for (i = 0; i < DATABUFFER_SIZE; i++) {
for (j = 0; j < DATABUFFER_SIZE; j++) {
@@ -2258,8 +2258,8 @@ test_concurrent_access(const struct mt_opts *opts)
if (h5_compare_file_bytes(bundle[i].names.rw, bundle[i].names.wo) < 0)
TEST_ERROR;
- HDfree(bundle);
- HDfree(buf);
+ free(bundle);
+ free(buf);
PASSED();
return 0;
@@ -2275,8 +2275,8 @@ error:
}
}
H5E_END_TRY;
- HDfree(bundle);
- HDfree(buf);
+ free(bundle);
+ free(buf);
return -1;
} /* end test_concurrent_access() */
@@ -2302,9 +2302,9 @@ parse_args(int argc, char **argv, struct mt_opts *opts)
if (!HDstrncmp(argv[i], "--ip=", 5))
HDstrncpy(opts->ip, argv[i] + 5, H5FD_MIRROR_MAX_IP_LEN);
else if (!HDstrncmp(argv[i], "--port=", 7))
- opts->portno = HDatoi(argv[i] + 7);
+ opts->portno = atoi(argv[i] + 7);
else {
- HDprintf("Unrecognized option: '%s'\n", argv[i]);
+ printf("Unrecognized option: '%s'\n", argv[i]);
return -1;
}
} /* end for each argument from command line */
@@ -2334,37 +2334,37 @@ confirm_server(struct mt_opts *opts)
live_socket = HDsocket(AF_INET, SOCK_STREAM, 0);
if (live_socket < 0) {
- HDprintf("ERROR socket()\n");
+ printf("ERROR socket()\n");
return -1;
}
target_addr.sin_family = AF_INET;
target_addr.sin_port = HDhtons((uint16_t)opts->portno);
target_addr.sin_addr.s_addr = HDinet_addr(opts->ip);
- HDmemset(target_addr.sin_zero, '\0', sizeof(target_addr.sin_zero));
+ memset(target_addr.sin_zero, '\0', sizeof(target_addr.sin_zero));
while (1) {
if (HDconnect(live_socket, (struct sockaddr *)&target_addr, (socklen_t)sizeof(target_addr)) < 0) {
if (attempt > 10) {
- HDprintf("ERROR connect() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR connect() (%d)\n%s\n", errno, HDstrerror(errno));
return -1;
}
/* Close socket during sleep() */
if (HDclose(live_socket) < 0) {
- HDprintf("ERROR close() can't close socket\n");
+ printf("ERROR close() can't close socket\n");
return -1;
}
live_socket = -1;
attempt++;
HDsleep(1);
- HDprintf("attempt #%u: ERROR connect() (%d)\n%s\n", attempt, errno, HDstrerror(errno));
+ printf("attempt #%u: ERROR connect() (%d)\n%s\n", attempt, errno, HDstrerror(errno));
/* Re-open socket for retry */
live_socket = HDsocket(AF_INET, SOCK_STREAM, 0);
if (live_socket < 0) {
- HDprintf("ERROR socket()\n");
+ printf("ERROR socket()\n");
return -1;
}
}
@@ -2374,22 +2374,22 @@ confirm_server(struct mt_opts *opts)
/* Request confirmation from the server */
if (HDwrite(live_socket, "CONFIRM", 8) == -1) {
- HDprintf("ERROR write() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR write() (%d)\n%s\n", errno, HDstrerror(errno));
return -1;
}
/* Read & verify response from port connection. */
if (HDread(live_socket, &mybuf, sizeof(mybuf)) == -1) {
- HDprintf("ERROR read() can't receive data\n");
+ printf("ERROR read() can't receive data\n");
return -1;
}
if (HDstrncmp("ALIVE", mybuf, 6)) {
- HDprintf("ERROR read() didn't receive data from server\n");
+ printf("ERROR read() didn't receive data from server\n");
return -1;
}
if (HDclose(live_socket) < 0) {
- HDprintf("ERROR close() can't close socket\n");
+ printf("ERROR close() can't close socket\n");
return -1;
}
@@ -2415,7 +2415,7 @@ main(int argc, char **argv)
g_log_stream = stdout; /* default debug/logging output stream */
- HDprintf("Testing Mirror VFD functionality.\n");
+ printf("Testing Mirror VFD functionality.\n");
/* SETUP */
@@ -2430,13 +2430,13 @@ main(int argc, char **argv)
}
if (parse_args(argc, argv, &opts) < 0) {
- HDprintf("Unable to parse arguments\n");
- HDexit(EXIT_FAILURE);
+ printf("Unable to parse arguments\n");
+ exit(EXIT_FAILURE);
}
if (confirm_server(&opts) < 0) {
- HDprintf("Unable to confirm server is running\n");
- HDexit(EXIT_FAILURE);
+ printf("Unable to confirm server is running\n");
+ exit(EXIT_FAILURE);
}
/* TESTS */
@@ -2477,11 +2477,11 @@ main(int argc, char **argv)
}
if (nerrors) {
- HDprintf("***** %d Mirror VFD TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("***** %d Mirror VFD TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
return EXIT_FAILURE;
}
- HDprintf("All Mirror Virtual File Driver tests passed.\n");
+ printf("All Mirror Virtual File Driver tests passed.\n");
return EXIT_SUCCESS;
} /* end main() */
@@ -2490,8 +2490,8 @@ main(int argc, char **argv)
int
main(void)
{
- HDprintf("Testing Mirror VFD functionality.\n");
- HDprintf("SKIPPED - Mirror VFD not built.\n");
+ printf("Testing Mirror VFD functionality.\n");
+ printf("SKIPPED - Mirror VFD not built.\n");
return EXIT_SUCCESS;
}
diff --git a/test/mount.c b/test/mount.c
index 6807f36..fd2d969 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -1015,7 +1015,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY;
if (status >= 0) {
H5_FAILED();
- HDprintf(" %d: Unmount by name should not have been allowed!\n", __LINE__);
+ printf(" %d: Unmount by name should not have been allowed!\n", __LINE__);
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -1025,7 +1025,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY;
if (status >= 0) {
H5_FAILED();
- HDprintf(" %d: Unmount by name should not have been allowed!\n", __LINE__);
+ printf(" %d: Unmount by name should not have been allowed!\n", __LINE__);
TEST_ERROR;
} /* end if */
if (H5Funmount(mnt, ".") < 0)
diff --git a/test/mtime.c b/test/mtime.c
index 882189e..2cebcd6 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -122,7 +122,7 @@ main(void)
HDstrftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
tm = HDlocaltime(&now);
HDstrftime((char *)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
- HDprintf(" got: %s\n ans: %s\n", buf1, buf2);
+ printf(" got: %s\n ans: %s\n", buf1, buf2);
goto error;
}
PASSED();
@@ -152,7 +152,7 @@ main(void)
}
else {
H5_FAILED();
- HDprintf("***cannot open the pre-created old modification test file (%s)\n", testfile);
+ printf("***cannot open the pre-created old modification test file (%s)\n", testfile);
goto error;
} /* end else */
}
@@ -182,7 +182,7 @@ main(void)
}
else {
H5_FAILED();
- HDprintf("***cannot open the pre-created old modification test file (%s)\n", testfile);
+ printf("***cannot open the pre-created old modification test file (%s)\n", testfile);
goto error;
} /* end else */
}
diff --git a/test/ntypes.c b/test/ntypes.c
index 707c71d..e0e0779 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -82,9 +82,9 @@ test_atomic_dtype(hid_t file)
TESTING("atomic datatype");
- if (NULL == (ipoints2 = HDcalloc(1, sizeof(*ipoints2))))
+ if (NULL == (ipoints2 = calloc(1, sizeof(*ipoints2))))
TEST_ERROR;
- if (NULL == (icheck2 = HDcalloc(1, sizeof(*icheck2))))
+ if (NULL == (icheck2 = calloc(1, sizeof(*icheck2))))
TEST_ERROR;
/* Initialize the dataset */
@@ -132,15 +132,15 @@ test_atomic_dtype(hid_t file)
/* Read the dataset back. The temporary buffer is for special platforms
* like Cray. */
- if (NULL == (tmp = HDmalloc((size_t)(DIM0 * DIM1 * H5Tget_size(native_type)))))
+ if (NULL == (tmp = malloc((size_t)(DIM0 * DIM1 * H5Tget_size(native_type)))))
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
/* Copy data from temporary buffer to destination buffer */
- HDmemcpy(icheck2, tmp, (size_t)(DIM0 * DIM1 * H5Tget_size(native_type)));
- HDfree(tmp);
+ memcpy(icheck2, tmp, (size_t)(DIM0 * DIM1 * H5Tget_size(native_type)));
+ free(tmp);
tmp = NULL;
/* Convert to the integer type */
@@ -152,8 +152,8 @@ test_atomic_dtype(hid_t file)
for (j = 0; j < DIM1; j++)
if (ipoints2->arr[i][j] != icheck2->arr[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
} /* end if */
@@ -274,8 +274,8 @@ test_atomic_dtype(hid_t file)
if (H5Sclose(space) < 0)
TEST_ERROR;
- HDfree(ipoints2);
- HDfree(icheck2);
+ free(ipoints2);
+ free(icheck2);
PASSED();
@@ -283,7 +283,7 @@ test_atomic_dtype(hid_t file)
error:
if (tmp)
- HDfree(tmp);
+ free(tmp);
H5E_BEGIN_TRY
{
@@ -294,8 +294,8 @@ error:
}
H5E_END_TRY;
- HDfree(ipoints2);
- HDfree(icheck2);
+ free(ipoints2);
+ free(icheck2);
return -1;
}
@@ -340,9 +340,9 @@ test_compound_dtype2(hid_t file)
TESTING("nested compound datatype");
/* Allocate space for the points & check arrays */
- if (NULL == (points = (s1 *)HDmalloc(sizeof(s1) * DIM0 * DIM1)))
+ if (NULL == (points = (s1 *)malloc(sizeof(s1) * DIM0 * DIM1)))
TEST_ERROR;
- if (NULL == (check = (s1 *)HDcalloc(sizeof(s1), DIM0 * DIM1)))
+ if (NULL == (check = (s1 *)calloc(sizeof(s1), DIM0 * DIM1)))
TEST_ERROR;
/* Initialize the dataset */
@@ -538,22 +538,22 @@ test_compound_dtype2(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
+ if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type))))
TEST_ERROR;
- if (NULL == (bkg = HDcalloc(sizeof(s1), DIM0 * DIM1)))
+ if (NULL == (bkg = calloc(sizeof(s1), DIM0 * DIM1)))
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
- HDmemcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
- HDfree(tmp);
+ memcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
+ free(tmp);
tmp = NULL;
if (H5Tconvert(native_type, tid_m, (DIM0 * DIM1), check, bkg, H5P_DEFAULT) < 0)
TEST_ERROR;
- HDfree(bkg);
+ free(bkg);
bkg = NULL;
/* Check that the values read are the same as the values written */
@@ -563,8 +563,8 @@ test_compound_dtype2(hid_t file)
temp_point->st.c2 != temp_check->st.c2 || temp_point->st.l2 != temp_check->st.l2 ||
temp_point->st.ll2 != temp_check->st.ll2 || temp_point->l != temp_check->l) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
} /* end if */
} /* end for */
@@ -585,21 +585,21 @@ test_compound_dtype2(hid_t file)
H5Tclose(tid_m);
/* Free memory for test data */
- HDfree(points);
- HDfree(check);
+ free(points);
+ free(check);
PASSED();
return 0;
error:
if (tmp)
- HDfree(tmp);
+ free(tmp);
if (bkg)
- HDfree(bkg);
+ free(bkg);
if (points)
- HDfree(points);
+ free(points);
if (check)
- HDfree(check);
+ free(check);
H5E_BEGIN_TRY
{
@@ -655,9 +655,9 @@ test_compound_dtype(hid_t file)
TESTING("compound datatype");
/* Allocate space for the points & check arrays */
- if (NULL == (points = (s1 *)HDmalloc(sizeof(s1) * DIM0 * DIM1)))
+ if (NULL == (points = (s1 *)malloc(sizeof(s1) * DIM0 * DIM1)))
TEST_ERROR;
- if (NULL == (check = (s1 *)HDcalloc(sizeof(s1), DIM0 * DIM1)))
+ if (NULL == (check = (s1 *)calloc(sizeof(s1), DIM0 * DIM1)))
TEST_ERROR;
/* Initialize the dataset */
@@ -759,22 +759,22 @@ test_compound_dtype(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
+ if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type))))
TEST_ERROR;
- if (NULL == (bkg = HDcalloc(sizeof(s1), DIM0 * DIM1)))
+ if (NULL == (bkg = calloc(sizeof(s1), DIM0 * DIM1)))
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
- HDmemcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
- HDfree(tmp);
+ memcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
+ free(tmp);
tmp = NULL;
if (H5Tconvert(native_type, tid2, (DIM0 * DIM1), check, bkg, H5P_DEFAULT) < 0)
TEST_ERROR;
- HDfree(bkg);
+ free(bkg);
bkg = NULL;
/* Check that the values read are the same as the values written */
@@ -783,8 +783,8 @@ test_compound_dtype(hid_t file)
if (temp_point->c != temp_check->c || temp_point->i != temp_check->i ||
temp_point->l != temp_check->l) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
} /* end if */
@@ -798,8 +798,8 @@ test_compound_dtype(hid_t file)
H5Tclose(tid2);
/* Free memory for test data */
- HDfree(points);
- HDfree(check);
+ free(points);
+ free(check);
PASSED();
return 0;
@@ -807,13 +807,13 @@ test_compound_dtype(hid_t file)
error:
/* Free memory for test data */
if (tmp)
- HDfree(tmp);
+ free(tmp);
if (bkg)
- HDfree(bkg);
+ free(bkg);
if (points)
- HDfree(points);
+ free(points);
if (check)
- HDfree(check);
+ free(check);
H5E_BEGIN_TRY
{
@@ -865,9 +865,9 @@ test_compound_dtype3(hid_t file)
TESTING("compound datatype with array as field");
/* Allocate space for the points & check arrays */
- if (NULL == (points = (s1 *)HDmalloc(sizeof(s1) * DIM0 * DIM1)))
+ if (NULL == (points = (s1 *)malloc(sizeof(s1) * DIM0 * DIM1)))
TEST_ERROR;
- if (NULL == (check = (s1 *)HDcalloc(sizeof(s1), DIM0 * DIM1)))
+ if (NULL == (check = (s1 *)calloc(sizeof(s1), DIM0 * DIM1)))
TEST_ERROR;
/* Initialize the dataset */
@@ -989,22 +989,22 @@ test_compound_dtype3(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
+ if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type))))
TEST_ERROR;
- if (NULL == (bkg = HDcalloc(sizeof(s1), DIM0 * DIM1)))
+ if (NULL == (bkg = calloc(sizeof(s1), DIM0 * DIM1)))
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
- HDmemcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
- HDfree(tmp);
+ memcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
+ free(tmp);
tmp = NULL;
if (H5Tconvert(native_type, tid_m, (DIM0 * DIM1), check, bkg, H5P_DEFAULT) < 0)
TEST_ERROR;
- HDfree(bkg);
+ free(bkg);
bkg = NULL;
/* Check that the values read are the same as the values written */
@@ -1012,16 +1012,16 @@ test_compound_dtype3(hid_t file)
for (j = 0; j < DIM1; j++, temp_point++, temp_check++) {
if (temp_point->c != temp_check->c || temp_point->l != temp_check->l) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
} /* end if */
for (k = 0; k < 5; k++) {
if (temp_point->a[k] != temp_check->a[k]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d,%d\n", i, j, k);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d,%d\n", i, j, k);
goto error;
} /* end if */
} /* end for */
@@ -1034,8 +1034,8 @@ test_compound_dtype3(hid_t file)
H5Tclose(tid_m2);
/* Free memory for test data */
- HDfree(points);
- HDfree(check);
+ free(points);
+ free(check);
PASSED();
return 0;
@@ -1043,13 +1043,13 @@ test_compound_dtype3(hid_t file)
error:
/* Free memory for test data */
if (tmp)
- HDfree(tmp);
+ free(tmp);
if (bkg)
- HDfree(bkg);
+ free(bkg);
if (points)
- HDfree(points);
+ free(points);
if (check)
- HDfree(check);
+ free(check);
H5E_BEGIN_TRY
{
@@ -1102,9 +1102,9 @@ test_compound_opaque(hid_t file)
TESTING("compound datatype with opaque field");
/* Allocate space for the points & check arrays */
- if (NULL == (points = (s1 *)HDmalloc(sizeof(s1) * DIM0 * DIM1)))
+ if (NULL == (points = (s1 *)malloc(sizeof(s1) * DIM0 * DIM1)))
TEST_ERROR;
- if (NULL == (check = (s1 *)HDcalloc(sizeof(s1), DIM0 * DIM1)))
+ if (NULL == (check = (s1 *)calloc(sizeof(s1), DIM0 * DIM1)))
TEST_ERROR;
/* Initialize the dataset */
@@ -1217,22 +1217,22 @@ test_compound_opaque(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
+ if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type))))
TEST_ERROR;
- if (NULL == (bkg = HDcalloc(sizeof(s1), DIM0 * DIM1)))
+ if (NULL == (bkg = calloc(sizeof(s1), DIM0 * DIM1)))
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
- HDmemcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
- HDfree(tmp);
+ memcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
+ free(tmp);
tmp = NULL;
if (H5Tconvert(native_type, tid_m, (DIM0 * DIM1), check, bkg, H5P_DEFAULT) < 0)
TEST_ERROR;
- HDfree(bkg);
+ free(bkg);
bkg = NULL;
/* Check that the values read are the same as the values written */
@@ -1240,16 +1240,16 @@ test_compound_opaque(hid_t file)
for (j = 0; j < DIM1; j++, temp_point++, temp_check++) {
if (temp_point->c != temp_check->c || temp_point->l != temp_check->l) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
} /* end if */
for (k = 0; k < 5; k++) {
if (temp_point->o[k] != temp_check->o[k]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d,%d\n", i, j, k);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d,%d\n", i, j, k);
goto error;
} /* end if */
} /* end for */
@@ -1261,8 +1261,8 @@ test_compound_opaque(hid_t file)
H5Tclose(tid_m);
/* Free memory for test data */
- HDfree(points);
- HDfree(check);
+ free(points);
+ free(check);
PASSED();
return 0;
@@ -1270,13 +1270,13 @@ test_compound_opaque(hid_t file)
error:
/* Free memory for test data */
if (tmp)
- HDfree(tmp);
+ free(tmp);
if (bkg)
- HDfree(bkg);
+ free(bkg);
if (points)
- HDfree(points);
+ free(points);
if (check)
- HDfree(check);
+ free(check);
H5E_BEGIN_TRY
{
@@ -1328,9 +1328,9 @@ test_enum_dtype(hid_t file)
TESTING("enum datatype");
- if (NULL == (spoints2 = HDcalloc(1, sizeof(*spoints2))))
+ if (NULL == (spoints2 = calloc(1, sizeof(*spoints2))))
TEST_ERROR;
- if (NULL == (scheck2 = HDcalloc(1, sizeof(*scheck2))))
+ if (NULL == (scheck2 = calloc(1, sizeof(*scheck2))))
TEST_ERROR;
/* Initialize the dataset */
@@ -1397,13 +1397,13 @@ test_enum_dtype(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
+ if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type))))
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
- HDmemcpy(scheck2, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
+ memcpy(scheck2, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
if (H5Tconvert(native_type, tid_m, (DIM0 * DIM1), scheck2, NULL, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -1413,9 +1413,9 @@ test_enum_dtype(hid_t file)
for (j = 0; j < DIM1; j++)
if (spoints2->arr[i][j] != scheck2->arr[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" spoints2[i][j]=%hd, scheck2[i][j]=%hd\n", spoints2->arr[i][j], scheck2->arr[i][j]);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
+ printf(" spoints2[i][j]=%hd, scheck2[i][j]=%hd\n", spoints2->arr[i][j], scheck2->arr[i][j]);
goto error;
} /* end if */
@@ -1424,18 +1424,18 @@ test_enum_dtype(hid_t file)
H5Tclose(native_type);
H5Tclose(tid_m);
- HDfree(tmp);
- HDfree(spoints2);
- HDfree(scheck2);
+ free(tmp);
+ free(spoints2);
+ free(scheck2);
PASSED();
return 0;
error:
/* Free memory for test data */
- HDfree(tmp);
- HDfree(spoints2);
- HDfree(scheck2);
+ free(tmp);
+ free(spoints2);
+ free(scheck2);
H5E_BEGIN_TRY
{
@@ -1484,9 +1484,9 @@ test_array_dtype(hid_t file)
TESTING("array of compound datatype");
/* Allocate space for the points & check arrays */
- if (NULL == (points = (s1 *)HDmalloc(sizeof(s1) * DIM0 * DIM1 * 5)))
+ if (NULL == (points = (s1 *)malloc(sizeof(s1) * DIM0 * DIM1 * 5)))
TEST_ERROR;
- if (NULL == (check = (s1 *)HDcalloc(sizeof(s1), DIM0 * DIM1 * 5)))
+ if (NULL == (check = (s1 *)calloc(sizeof(s1), DIM0 * DIM1 * 5)))
TEST_ERROR;
/* Initialize the dataset */
@@ -1568,14 +1568,14 @@ test_array_dtype(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
+ if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type))))
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
- HDmemcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
- HDfree(tmp);
+ memcpy(check, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
+ free(tmp);
tmp = NULL;
if (H5Tconvert(native_type, tid_m, (DIM0 * DIM1), check, NULL, H5P_DEFAULT) < 0)
@@ -1588,8 +1588,8 @@ test_array_dtype(hid_t file)
if (temp_point->c != temp_check->c || temp_point->i != temp_check->i ||
temp_point->l != temp_check->l) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
} /* end if */
@@ -1606,8 +1606,8 @@ test_array_dtype(hid_t file)
TEST_ERROR;
/* Free memory for test data */
- HDfree(points);
- HDfree(check);
+ free(points);
+ free(check);
PASSED();
return 0;
@@ -1615,11 +1615,11 @@ test_array_dtype(hid_t file)
error:
/* Free memory for test data */
if (tmp)
- HDfree(tmp);
+ free(tmp);
if (points)
- HDfree(points);
+ free(points);
if (check)
- HDfree(check);
+ free(check);
H5E_BEGIN_TRY
{
@@ -1668,9 +1668,9 @@ test_array_dtype2(hid_t file)
TESTING("array of atomic datatype");
- if (NULL == (ipoints3 = HDcalloc(1, sizeof(*ipoints3))))
+ if (NULL == (ipoints3 = calloc(1, sizeof(*ipoints3))))
goto error;
- if (NULL == (icheck3 = HDcalloc(1, sizeof(*icheck3))))
+ if (NULL == (icheck3 = calloc(1, sizeof(*icheck3))))
goto error;
/* Initialize the dataset */
@@ -1725,14 +1725,14 @@ test_array_dtype2(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
+ if (NULL == (tmp = malloc(DIM0 * DIM1 * H5Tget_size(native_type))))
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
- HDmemcpy(icheck3, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
- HDfree(tmp);
+ memcpy(icheck3, tmp, DIM0 * DIM1 * H5Tget_size(native_type));
+ free(tmp);
tmp = NULL;
if (H5Tconvert(native_type, tid_m, (DIM0 * DIM1), icheck3, NULL, H5P_DEFAULT) < 0)
@@ -1744,8 +1744,8 @@ test_array_dtype2(hid_t file)
for (k = 0; k < 5; k++)
if (icheck3->arr[i][j][k] != ipoints3->arr[i][j][k]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
goto error;
} /* end if */
@@ -1759,8 +1759,8 @@ test_array_dtype2(hid_t file)
if (H5Tclose(tid_m) < 0)
TEST_ERROR;
- HDfree(ipoints3);
- HDfree(icheck3);
+ free(ipoints3);
+ free(icheck3);
PASSED();
return 0;
@@ -1768,7 +1768,7 @@ test_array_dtype2(hid_t file)
error:
/* Free memory for test data */
if (tmp)
- HDfree(tmp);
+ free(tmp);
H5E_BEGIN_TRY
{
@@ -1781,8 +1781,8 @@ error:
}
H5E_END_TRY;
- HDfree(ipoints3);
- HDfree(icheck3);
+ free(ipoints3);
+ free(icheck3);
return -1;
}
@@ -1817,18 +1817,18 @@ test_vl_dtype(hid_t file)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + 1) * sizeof(hvl_t));
if (NULL == wdata[i].p) {
H5_FAILED();
- HDprintf(" Cannot allocate memory for VL data! i=%u\n", (unsigned)i);
+ printf(" Cannot allocate memory for VL data! i=%u\n", (unsigned)i);
goto error;
} /* end if */
wdata[i].len = i + 1;
for (t1 = (hvl_t *)wdata[i].p, j = 0; j < (i + 1); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (NULL == t1->p) {
H5_FAILED();
- HDprintf(" Cannot allocate memory for VL data! i=%u, j=%u\n", (unsigned)i, (unsigned)j);
+ printf(" Cannot allocate memory for VL data! i=%u, j=%u\n", (unsigned)i, (unsigned)j);
goto error;
} /* end if */
t1->len = j + 1;
@@ -1900,23 +1900,23 @@ test_vl_dtype(hid_t file)
for (i = 0; i < SPACE1_DIM1; i++) {
if (wdata[i].len != rdata[i].len) {
H5_FAILED();
- HDprintf(" VL data length don't match!, wdata[%d].len=%d, rdata[%d].len=%d\n", (int)i,
- (int)wdata[i].len, (int)i, (int)rdata[i].len);
+ printf(" VL data length don't match!, wdata[%d].len=%d, rdata[%d].len=%d\n", (int)i,
+ (int)wdata[i].len, (int)i, (int)rdata[i].len);
goto error;
} /* end if */
for (t1 = (hvl_t *)wdata[i].p, t2 = (hvl_t *)rdata[i].p, j = 0; j < rdata[i].len; j++, t1++, t2++) {
if (t1->len != t2->len) {
H5_FAILED();
- HDprintf(" VL data length don't match!, wdata[%d].len=%d, rdata[%d].len=%d\n", (int)i,
- (int)wdata[i].len, (int)i, (int)rdata[i].len);
+ printf(" VL data length don't match!, wdata[%d].len=%d, rdata[%d].len=%d\n", (int)i,
+ (int)wdata[i].len, (int)i, (int)rdata[i].len);
goto error;
} /* end if */
/* use temporary buffer to convert datatype. This is for special
* platforms like Cray */
- if (NULL == (tmp = (void **)HDmalloc(t2->len * sizeof(unsigned int))))
+ if (NULL == (tmp = (void **)malloc(t2->len * sizeof(unsigned int))))
TEST_ERROR;
- HDmemcpy(tmp, t2->p, t2->len * H5Tget_size(nat_super_type));
+ memcpy(tmp, t2->p, t2->len * H5Tget_size(nat_super_type));
if (H5Tconvert(nat_super_type, H5T_NATIVE_UINT, t2->len, tmp, NULL, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -1924,13 +1924,13 @@ test_vl_dtype(hid_t file)
for (k = 0; k < t2->len; k++) {
if (((unsigned int *)t1->p)[k] != ((unsigned int *)tmp)[k]) {
H5_FAILED();
- HDprintf(" VL data don't match!, wdata[%u].p=%d, rdata[%u].p=%u\n", (unsigned)i,
- ((unsigned int *)t1->p)[k], (unsigned)i, ((unsigned int *)tmp)[k]);
+ printf(" VL data don't match!, wdata[%u].p=%d, rdata[%u].p=%u\n", (unsigned)i,
+ ((unsigned int *)t1->p)[k], (unsigned)i, ((unsigned int *)tmp)[k]);
goto error;
} /* end if */
} /* end for */
- HDfree(tmp);
+ free(tmp);
tmp = NULL;
} /* end for */
} /* end for */
@@ -1968,7 +1968,7 @@ test_vl_dtype(hid_t file)
error:
/* Free memory for test data */
if (tmp)
- HDfree(tmp);
+ free(tmp);
H5E_BEGIN_TRY
{
@@ -2075,14 +2075,14 @@ test_vlstr_dtype(hid_t file)
for (i = 0; i < SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
H5_FAILED();
- HDprintf(" VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ printf(" VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
+ (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
goto error;
} /* end if */
if (HDstrcmp(wdata[i], rdata[i]) != 0) {
H5_FAILED();
- HDprintf(" VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
- (int)i, rdata[i]);
+ printf(" VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i,
+ rdata[i]);
goto error;
} /* end if */
} /* end for */
@@ -2103,7 +2103,7 @@ test_vlstr_dtype(hid_t file)
/* Free memory for rdata */
for (i = 0; i < SPACE1_DIM1; i++)
- HDfree(rdata[i]);
+ free(rdata[i]);
rdata_alloc = FALSE;
PASSED();
@@ -2113,7 +2113,7 @@ error:
if (rdata_alloc) {
/* Free memory for rdata */
for (i = 0; i < SPACE1_DIM1; i++)
- HDfree(rdata[i]);
+ free(rdata[i]);
} /* end if */
H5E_BEGIN_TRY
@@ -2206,14 +2206,14 @@ test_str_dtype(hid_t file)
for (i = 0; i < SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
H5_FAILED();
- HDprintf(" data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ printf(" data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
+ (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
goto error;
} /* end if */
if (HDstrcmp(wdata[i], rdata[i]) != 0) {
H5_FAILED();
- HDprintf(" data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i,
- rdata[i]);
+ printf(" data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i,
+ rdata[i]);
goto error;
} /* end if */
} /* end for */
@@ -2286,9 +2286,9 @@ test_refer_dtype(hid_t file)
TESTING("reference datatype");
/* Allocate write & read buffers */
- if (NULL == (wbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)))))
+ if (NULL == (wbuf = (hobj_ref_t *)malloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)))))
TEST_ERROR;
- if (NULL == (rbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)))))
+ if (NULL == (rbuf = (hobj_ref_t *)malloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)))))
TEST_ERROR;
/* Create dataspace for datasets */
@@ -2393,8 +2393,8 @@ test_refer_dtype(hid_t file)
TEST_ERROR;
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
PASSED();
@@ -2402,9 +2402,9 @@ test_refer_dtype(hid_t file)
error:
if (wbuf)
- HDfree(wbuf);
+ free(wbuf);
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
H5E_BEGIN_TRY
{
@@ -2459,9 +2459,9 @@ test_refer_dtype2(hid_t file)
TESTING("dataset region reference");
/* Allocate write & read buffers */
- if (NULL == (dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2)))
+ if (NULL == (dwbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2)))
TEST_ERROR;
- if (NULL == (drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2)))
+ if (NULL == (drbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2)))
TEST_ERROR;
/* Create dataspace for datasets */
@@ -2605,8 +2605,8 @@ test_refer_dtype2(hid_t file)
TEST_ERROR;
/* Free memory buffers */
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(dwbuf);
+ free(drbuf);
PASSED();
return 0;
@@ -2614,9 +2614,9 @@ test_refer_dtype2(hid_t file)
error:
/* Free memory buffers */
if (dwbuf)
- HDfree(dwbuf);
+ free(dwbuf);
if (drbuf)
- HDfree(drbuf);
+ free(drbuf);
H5E_BEGIN_TRY
{
@@ -2697,8 +2697,8 @@ test_opaque_dtype(hid_t file)
for (i = 0; i < sizeof(rbuf); i++)
if (rbuf[i] != wbuf[i]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %u\n", (unsigned)i);
+ printf(" Read different values than written.\n");
+ printf(" At index %u\n", (unsigned)i);
goto error;
} /* end if */
@@ -2807,7 +2807,7 @@ test_bitfield_dtype(hid_t file)
if ((ntype_size = H5Tget_size(native_type)) == 0)
TEST_ERROR;
- rbuf = HDmalloc((size_t)nelmts * ntype_size);
+ rbuf = malloc((size_t)nelmts * ntype_size);
/* Read the data and compare them */
if (H5Dread(dataset1, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0)
@@ -2817,8 +2817,8 @@ test_bitfield_dtype(hid_t file)
for (i = 0; i < BITFIELD_ENUMB * 4; i++) {
if (*p != wbuf[i]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %zu\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %zu\n", i);
TEST_ERROR;
}
p++;
@@ -2831,7 +2831,7 @@ test_bitfield_dtype(hid_t file)
if (H5Dclose(dataset1) < 0)
TEST_ERROR;
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
/* Open dataset2 again to check H5Tget_native_type */
if ((dataset2 = H5Dopen2(file, DSET2_BITFIELD_NAME, H5P_DEFAULT)) < 0)
@@ -2850,8 +2850,8 @@ test_bitfield_dtype(hid_t file)
for (i = 0; i < BITFIELD_ENUMB; i++) {
if (intr[i] != intw[i]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %zu\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %zu\n", i);
TEST_ERROR;
}
}
@@ -2991,7 +2991,7 @@ test_ninteger(void)
/* get rank */
if ((rank = H5Sget_simple_extent_ndims(sid1)) < 0)
FAIL_STACK_ERROR;
- HDmemset(dims, 0, sizeof dims);
+ memset(dims, 0, sizeof dims);
/* get dimension */
if (H5Sget_simple_extent_dims(sid1, dims, NULL) < 0)
@@ -3027,13 +3027,13 @@ test_ninteger(void)
/* check */
if (H5Tget_precision(nid1) != H5Tget_precision(nid2)) {
- HDprintf(" Precision differ.\n");
+ printf(" Precision differ.\n");
TEST_ERROR;
} /* end if */
/* compare dataset creation property lists */
if (H5Pequal(dcpl1, dcpl2) <= 0) {
- HDprintf(" Property lists differ.\n");
+ printf(" Property lists differ.\n");
TEST_ERROR;
} /* end if */
@@ -3041,8 +3041,8 @@ test_ninteger(void)
for (i = 0; i < DIM3; i++)
if (buf[i] != chk[i]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
} /* end if */
@@ -3155,7 +3155,7 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All native datatype tests passed.\n");
+ printf("All native datatype tests passed.\n");
h5_cleanup(FILENAME, fapl);
return 0;
@@ -3169,7 +3169,7 @@ error:
H5E_END_TRY;
nerrors = MAX(1, nerrors);
- HDprintf("***** %d DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return 1;
}
diff --git a/test/objcopy.c b/test/objcopy.c
index eac99e0..459eff2 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -197,7 +197,7 @@ token_insert(H5O_info2_t *oi)
/* Extend the table */
if (idtab_g.nobjs >= idtab_g.nalloc) {
idtab_g.nalloc = MAX(256, 2 * idtab_g.nalloc);
- idtab_g.obj = (H5O_token_t *)HDrealloc(idtab_g.obj, idtab_g.nalloc * sizeof(idtab_g.obj[0]));
+ idtab_g.obj = (H5O_token_t *)realloc(idtab_g.obj, idtab_g.nalloc * sizeof(idtab_g.obj[0]));
} /* end if */
/* Insert the entry */
@@ -253,7 +253,7 @@ static void
token_reset(void)
{
if (idtab_g.obj)
- HDfree(idtab_g.obj);
+ free(idtab_g.obj);
idtab_g.obj = NULL;
idtab_g.nalloc = idtab_g.nobjs = 0;
} /* end token_reset() */
@@ -585,7 +585,7 @@ test_copy_attach_attribute_vl(hid_t loc_id)
for (i = 0; i < 4; i++) {
buf[i].len = i * 3 + 1;
- buf[i].p = (int *)HDmalloc(buf[i].len * sizeof(int));
+ buf[i].p = (int *)malloc(buf[i].len * sizeof(int));
for (j = 0; j < buf[i].len; j++)
((int *)buf[i].p)[j] = (int)(j + 1);
} /* end for */
@@ -851,9 +851,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
/* Check the raw data is equal */
/* Allocate & initialize space for the raw data buffers */
- if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
- if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf2 = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
/* Read data from the source attribute */
@@ -884,9 +884,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Release raw data buffers */
- HDfree(rbuf);
+ free(rbuf);
rbuf = NULL;
- HDfree(rbuf2);
+ free(rbuf2);
rbuf2 = NULL;
/* close the source dataspace */
@@ -909,9 +909,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
error:
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
if (rbuf2)
- HDfree(rbuf2);
+ free(rbuf2);
H5E_BEGIN_TRY
{
H5Sclose(sid2);
@@ -1098,11 +1098,11 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else {
/* vlens cannot currently be nested below the top layer of a
* compound */
- HDassert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE);
+ assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE);
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
- if (HDmemcmp(memb1, memb2, memb_size) != 0)
+ if (memcmp(memb1, memb2, memb_size) != 0)
TEST_ERROR;
/* Update member pointers */
@@ -1324,7 +1324,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else
TEST_ERROR;
} /* end else */
- else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0)
+ else if (memcmp(buf1, buf2, (elmt_size * nelmts)) != 0)
TEST_ERROR;
/* Data should be the same. :-) */
@@ -1460,9 +1460,9 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
/* Check the raw data is equal */
/* Allocate & initialize space for the raw data buffers */
- if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
- if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf2 = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
/* Read data from datasets */
@@ -1491,9 +1491,9 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Release raw data buffers */
- HDfree(rbuf);
+ free(rbuf);
rbuf = NULL;
- HDfree(rbuf2);
+ free(rbuf2);
rbuf2 = NULL;
/* close the source dataspace */
@@ -1523,9 +1523,9 @@ error:
H5E_BEGIN_TRY
{
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
if (rbuf2)
- HDfree(rbuf2);
+ free(rbuf2);
H5Pclose(dcpl2);
H5Pclose(dcpl);
H5Sclose(sid2);
@@ -1675,7 +1675,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
break;
case H5O_TYPE_MAP:
- HDassert(0 && "maps not supported in native VOL connector");
+ assert(0 && "maps not supported in native VOL connector");
/* clang complains about implicit fallthrough here and
* our usual attributes and fall-through comments don't
@@ -1685,7 +1685,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
- HDassert(0 && "Unknown type of object");
+ assert(0 && "Unknown type of object");
break;
H5_CLANG_DIAG_ON("implicit-fallthrough")
} /* end switch */
@@ -1708,18 +1708,18 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
char linkval2[NAME_BUF_SIZE]; /* Link value */
/* Get link values */
- HDassert(linfo.u.val_size <= NAME_BUF_SIZE);
+ assert(linfo.u.val_size <= NAME_BUF_SIZE);
if (H5Lget_val(gid, objname, linkval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lget_val(gid2, objname2, linkval2, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Compare link data */
- if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0)
+ if (memcmp(linkval, linkval2, linfo.u.val_size) != 0)
TEST_ERROR;
} /* end else-if */
else {
- HDassert(0 && "Unknown type of link");
+ assert(0 && "Unknown type of link");
} /* end else */
} /* end else */
} /* end for */
@@ -2938,7 +2938,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TESTING("H5Ocopy(): compound dataset");
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].a = i;
buf[i].d = 1.0 / (double)(i + 1);
@@ -5271,7 +5271,7 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
buf[i] = i;
/* create an empty external file */
- HDfclose(HDfopen(FILE_EXT, "w"));
+ HDfclose(fopen(FILE_EXT, "w"));
/* Initialize the filenames */
h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
@@ -6248,7 +6248,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].len = i + 1;
- buf[i].p = (int *)HDmalloc(buf[i].len * sizeof(int));
+ buf[i].p = (int *)malloc(buf[i].len * sizeof(int));
for (j = 0; j < buf[i].len; j++)
((int *)buf[i].p)[j] = (int)(i * 10 + j);
} /* end for */
@@ -6410,7 +6410,7 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].len = i + 1;
- buf[i].p = (int *)HDmalloc(buf[i].len * sizeof(int));
+ buf[i].p = (int *)malloc(buf[i].len * sizeof(int));
for (j = 0; j < buf[i].len; j++)
((int *)buf[i].p)[j] = (int)(i * 10 + j);
} /* end for */
@@ -6626,7 +6626,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].len = i + 1;
- buf[i].p = (int *)HDmalloc(buf[i].len * sizeof(int));
+ buf[i].p = (int *)malloc(buf[i].len * sizeof(int));
for (j = 0; j < buf[i].len; j++)
((int *)buf[i].p)[j] = (int)(i * 10 + j);
} /* end for */
@@ -6961,7 +6961,7 @@ attach_attribute_compound_vlstr(hid_t loc_id)
/* Write to the attribute */
len = HDstrlen(ATTR_CMPD_STRING) + 1;
buf.i = 9;
- if (NULL == (buf.v = (char *)HDcalloc(len, sizeof(char))))
+ if (NULL == (buf.v = (char *)calloc(len, sizeof(char))))
goto done;
HDstrncpy(buf.v, ATTR_CMPD_STRING, len);
if (H5Awrite(aid, cmpd_tid, &buf) < 0)
@@ -6981,7 +6981,7 @@ done:
if (aid > 0)
H5Aclose(aid);
- HDfree(buf.v);
+ free(buf.v);
return ret_value;
} /* attach_attribute_compound_vlstr */
@@ -7043,7 +7043,7 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
FAIL_STACK_ERROR;
if (HDstrlen(rbuf.v) != HDstrlen(rbuf2.v))
FAIL_STACK_ERROR;
- if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0)
+ if (memcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0)
FAIL_STACK_ERROR;
/* Reclaim vlen buffer */
@@ -7301,7 +7301,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
for (i = 0; i < DIM_SIZE_1; i++) {
for (j = 0; j < DIM_SIZE_2; j++) {
buf[i][j].len = (size_t)(j + 1);
- buf[i][j].p = (int *)HDmalloc(buf[i][j].len * sizeof(int));
+ buf[i][j].p = (int *)malloc(buf[i][j].len * sizeof(int));
for (k = 0; k < (int)buf[i][j].len; k++)
((int *)buf[i][j].p)[k] = i * 10000 + j * 100 + k;
}
@@ -9500,7 +9500,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].len = i + 1;
- buf[i].p = (int *)HDmalloc(buf[i].len * sizeof(int));
+ buf[i].p = (int *)malloc(buf[i].len * sizeof(int));
for (j = 0; j < buf[i].len; j++)
((int *)buf[i].p)[j] = (int)(i * 10 + j);
} /* end for */
@@ -9684,7 +9684,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].len = i + 1;
- buf[i].p = (int *)HDmalloc(buf[i].len * sizeof(int));
+ buf[i].p = (int *)malloc(buf[i].len * sizeof(int));
for (j = 0; j < buf[i].len; j++)
((int *)buf[i].p)[j] = (int)(i * 10 + j);
} /* end for */
@@ -9868,7 +9868,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].len = i + 1;
- buf[i].p = (int *)HDmalloc(buf[i].len * sizeof(int));
+ buf[i].p = (int *)malloc(buf[i].len * sizeof(int));
for (j = 0; j < buf[i].len; j++)
((int *)buf[i].p)[j] = (int)(i * 10 + j);
} /* end for */
@@ -10059,7 +10059,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].len = i + 1;
- buf[i].p = (int *)HDmalloc(buf[i].len * sizeof(int));
+ buf[i].p = (int *)malloc(buf[i].len * sizeof(int));
for (j = 0; j < buf[i].len; j++)
((int *)buf[i].p)[j] = (int)(i * 10 + j);
} /* end for */
@@ -10246,14 +10246,14 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
- buf[i].p = HDmalloc((i + 1) * sizeof(hvl_t));
+ buf[i].p = malloc((i + 1) * sizeof(hvl_t));
if (buf[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return 1;
} /* end if */
buf[i].len = i + 1;
for (tvl = (hvl_t *)buf[i].p, j = 0; j < (i + 1); j++, tvl++) {
- tvl->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ tvl->p = malloc((j + 1) * sizeof(unsigned int));
if (tvl->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return 1;
@@ -10447,14 +10447,14 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
- buf[i].p = HDmalloc((i + 1) * sizeof(hvl_t));
+ buf[i].p = malloc((i + 1) * sizeof(hvl_t));
if (buf[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
TEST_ERROR;
} /* end if */
buf[i].len = i + 1;
for (tvl = (hvl_t *)buf[i].p, j = 0; j < (i + 1); j++, tvl++) {
- tvl->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ tvl->p = malloc((j + 1) * sizeof(unsigned int));
if (tvl->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
TEST_ERROR;
@@ -10642,14 +10642,14 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
- buf[i].p = HDmalloc((i + 1) * sizeof(hvl_t));
+ buf[i].p = malloc((i + 1) * sizeof(hvl_t));
if (buf[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
TEST_ERROR;
} /* end if */
buf[i].len = i + 1;
for (tvl = (hvl_t *)buf[i].p, j = 0; j < (i + 1); j++, tvl++) {
- tvl->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ tvl->p = malloc((j + 1) * sizeof(unsigned int));
if (tvl->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
TEST_ERROR;
@@ -10886,14 +10886,14 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
- buf[i].p = HDmalloc((i + 1) * sizeof(hvl_t));
+ buf[i].p = malloc((i + 1) * sizeof(hvl_t));
if (buf[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
TEST_ERROR;
} /* end if */
buf[i].len = i + 1;
for (tvl = (hvl_t *)buf[i].p, j = 0; j < (i + 1); j++, tvl++) {
- tvl->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ tvl->p = malloc((j + 1) * sizeof(unsigned int));
if (tvl->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
TEST_ERROR;
@@ -11094,7 +11094,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].a = (int)(i * (i - 1));
buf[i].b.len = i + 1;
- buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int));
+ buf[i].b.p = (int *)malloc(buf[i].b.len * sizeof(int));
for (j = 0; j < buf[i].b.len; j++)
((int *)buf[i].b.p)[j] = (int)(i * 10 + j);
buf[i].c = 1.0 / ((double)i + 1.0);
@@ -11270,7 +11270,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].a = (int)(i * (i - 1));
buf[i].b.len = i + 1;
- buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int));
+ buf[i].b.p = (int *)malloc(buf[i].b.len * sizeof(int));
for (j = 0; j < buf[i].b.len; j++)
((int *)buf[i].b.p)[j] = (int)(i * 10 + j);
buf[i].c = 1.0 / ((double)i + 1.0);
@@ -11455,7 +11455,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].a = (int)(i * (i - 1));
buf[i].b.len = i + 1;
- buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int));
+ buf[i].b.p = (int *)malloc(buf[i].b.len * sizeof(int));
for (j = 0; j < buf[i].b.len; j++)
((int *)buf[i].b.p)[j] = (int)(i * 10 + j);
buf[i].c = 1.0 / ((double)i + 1.0);
@@ -11641,7 +11641,7 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TESTING("H5Ocopy(): NULL references");
/* Initialize "zeros" array */
- HDmemset(zeros, 0, sizeof(zeros));
+ memset(zeros, 0, sizeof(zeros));
/* Initialize the filenames */
h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
@@ -11717,9 +11717,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR;
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
+ if (memcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR;
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
+ if (memcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR;
/* Close datasets */
@@ -11762,9 +11762,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR;
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
+ if (memcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR;
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
+ if (memcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR;
/* Close */
@@ -11839,7 +11839,7 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TESTING("H5Ocopy(): NULL references for opened datasets");
/* Initialize "zeros" array */
- HDmemset(zeros, 0, sizeof(zeros));
+ memset(zeros, 0, sizeof(zeros));
/* Initialize the filenames */
h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
@@ -11924,9 +11924,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR;
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
+ if (memcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR;
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
+ if (memcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR;
/* Create destination file */
@@ -11969,9 +11969,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR;
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
+ if (memcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR;
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
+ if (memcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR;
/* Close */
@@ -12320,7 +12320,7 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -12408,7 +12408,7 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
if (H5Dclose(did) < 0)
@@ -12636,7 +12636,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -12694,7 +12694,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
TEST_ERROR;
if (!token_cmp)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -12777,7 +12777,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
if (H5Dclose(did) < 0)
@@ -12811,7 +12811,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
TEST_ERROR;
if (!token_cmp)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
if (H5Dclose(did) < 0)
@@ -13026,7 +13026,7 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -13081,7 +13081,7 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -13106,7 +13106,7 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -13332,7 +13332,7 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
if (H5Aclose(aid) < 0)
@@ -13648,7 +13648,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token_int, &oinfo.token, sizeof(exp_token_int));
+ memcpy(&exp_token_int, &oinfo.token, sizeof(exp_token_int));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -13657,7 +13657,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token_short, &oinfo.token, sizeof(exp_token_short));
+ memcpy(&exp_token_short, &oinfo.token, sizeof(exp_token_short));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14106,7 +14106,7 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14127,7 +14127,7 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14148,7 +14148,7 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14169,7 +14169,7 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14341,7 +14341,7 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14389,7 +14389,7 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14444,7 +14444,7 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14494,7 +14494,7 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14687,7 +14687,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -14741,7 +14741,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
if (H5Dclose(did) < 0)
@@ -14804,7 +14804,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
if (H5Dclose(did) < 0)
@@ -14862,7 +14862,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
if (H5Dclose(did) < 0)
@@ -15724,7 +15724,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -15791,7 +15791,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -15846,7 +15846,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -15871,7 +15871,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -15935,7 +15935,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -15960,7 +15960,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token));
+ memcpy(&exp_token, &oinfo.token, sizeof(exp_token));
if (H5Tclose(tid) < 0)
TEST_ERROR;
@@ -17395,7 +17395,7 @@ main(void)
ExpressMode = GetTestExpress();
if (ExpressMode > 1)
- HDprintf("***Express test mode on. Some tests may be skipped\n");
+ printf("***Express test mode on. Some tests may be skipped\n");
/* Copy the file access property list */
if ((fapl2 = H5Pcopy(fapl)) < 0)
@@ -17657,8 +17657,8 @@ main(void)
/* Results */
if (nerrors) {
- HDprintf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S"));
- HDexit(EXIT_FAILURE);
+ printf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S"));
+ exit(EXIT_FAILURE);
} /* end if */
HDputs("All object copying tests passed.");
@@ -17688,8 +17688,8 @@ main(void)
h5_cleanup(FILENAME, fapl);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* main */
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index ebce96b..98098a8 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -105,7 +105,7 @@ token_insert(H5O_info2_t *oinfo)
/* Extend the table */
if (idtab_g.nobjs >= idtab_g.nalloc) {
idtab_g.nalloc = MAX(256, 2 * idtab_g.nalloc);
- idtab_g.obj = (H5O_token_t *)HDrealloc(idtab_g.obj, idtab_g.nalloc * sizeof(idtab_g.obj[0]));
+ idtab_g.obj = (H5O_token_t *)realloc(idtab_g.obj, idtab_g.nalloc * sizeof(idtab_g.obj[0]));
}
/* Insert the entry */
@@ -161,7 +161,7 @@ static void
token_reset(void)
{
if (idtab_g.obj)
- HDfree(idtab_g.obj);
+ free(idtab_g.obj);
idtab_g.obj = NULL;
idtab_g.nalloc = idtab_g.nobjs = 0;
} /* end token_reset() */
@@ -635,9 +635,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
/* Check the raw data is equal */
/* Allocate & initialize space for the raw data buffers */
- if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
- if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf2 = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
/* Read data from the source attribute */
@@ -668,9 +668,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Release raw data buffers */
- HDfree(rbuf);
+ free(rbuf);
rbuf = NULL;
- HDfree(rbuf2);
+ free(rbuf2);
rbuf2 = NULL;
/* close the source dataspace */
@@ -693,9 +693,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
error:
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
if (rbuf2)
- HDfree(rbuf2);
+ free(rbuf2);
H5E_BEGIN_TRY
{
H5Sclose(sid2);
@@ -882,11 +882,11 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else {
/* vlens cannot currently be nested below the top layer of a
* compound */
- HDassert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE);
+ assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE);
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
- if (HDmemcmp(memb1, memb2, memb_size) != 0)
+ if (memcmp(memb1, memb2, memb_size) != 0)
TEST_ERROR;
/* Update member pointers */
@@ -1036,7 +1036,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else
TEST_ERROR;
} /* end else */
- else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0)
+ else if (memcmp(buf1, buf2, (elmt_size * nelmts)) != 0)
TEST_ERROR;
/* Data should be the same. :-) */
@@ -1172,9 +1172,9 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
/* Check the raw data is equal */
/* Allocate & initialize space for the raw data buffers */
- if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
- if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf2 = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
/* Read data from datasets */
@@ -1203,9 +1203,9 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Release raw data buffers */
- HDfree(rbuf);
+ free(rbuf);
rbuf = NULL;
- HDfree(rbuf2);
+ free(rbuf2);
rbuf2 = NULL;
/* close the source dataspace */
@@ -1235,9 +1235,9 @@ error:
H5E_BEGIN_TRY
{
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
if (rbuf2)
- HDfree(rbuf2);
+ free(rbuf2);
H5Pclose(dcpl2);
H5Pclose(dcpl);
H5Sclose(sid2);
@@ -1387,7 +1387,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
break;
case H5O_TYPE_MAP:
- HDassert(0 && "maps not supported in native VOL connector");
+ assert(0 && "maps not supported in native VOL connector");
/* clang complains about implicit fallthrough here and
* our usual attributes and fall-through comments don't
@@ -1397,7 +1397,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
- HDassert(0 && "Unknown type of object");
+ assert(0 && "Unknown type of object");
break;
H5_CLANG_DIAG_ON("implicit-fallthrough")
} /* end switch */
@@ -1420,18 +1420,18 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
char linkval2[NAME_BUF_SIZE]; /* Link value */
/* Get link values */
- HDassert(linfo.u.val_size <= NAME_BUF_SIZE);
+ assert(linfo.u.val_size <= NAME_BUF_SIZE);
if (H5Lget_val(gid, objname, linkval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lget_val(gid2, objname2, linkval2, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Compare link data */
- if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0)
+ if (memcmp(linkval, linkval2, linfo.u.val_size) != 0)
TEST_ERROR;
} /* end else-if */
else {
- HDassert(0 && "Unknown type of link");
+ assert(0 && "Unknown type of link");
} /* end else */
} /* end else */
} /* end for */
@@ -1867,7 +1867,7 @@ main(void)
ExpressMode = GetTestExpress();
if (ExpressMode > 1)
- HDprintf("***Express test mode on. Some tests may be skipped\n");
+ printf("***Express test mode on. Some tests may be skipped\n");
/* Copy the file access property list */
if ((fapl2 = H5Pcopy(fapl)) < 0)
@@ -1971,8 +1971,8 @@ main(void)
/* Results */
if (nerrors) {
- HDprintf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S"));
- HDexit(EXIT_FAILURE);
+ printf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S"));
+ exit(EXIT_FAILURE);
} /* end if */
HDputs("All object copying tests passed.");
@@ -2002,8 +2002,8 @@ main(void)
h5_cleanup(FILENAME, fapl);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* main */
diff --git a/test/ohdr.c b/test/ohdr.c
index 85e10a2..8277e83 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -82,8 +82,8 @@ test_cont(char *filename, hid_t fapl)
TESTING("object header continuation block");
- HDmemset(&oh_locA, 0, sizeof(oh_locA));
- HDmemset(&oh_locB, 0, sizeof(oh_locB));
+ memset(&oh_locA, 0, sizeof(oh_locA));
+ memset(&oh_locB, 0, sizeof(oh_locB));
/* Create the file to operate on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
@@ -230,7 +230,7 @@ test_ohdr_cache(char *filename, hid_t fapl)
FAIL_STACK_ERROR;
/* Create an object header */
- HDmemset(&oh_loc, 0, sizeof(oh_loc));
+ memset(&oh_loc, 0, sizeof(oh_loc));
if (H5O_create(f, (size_t)2048, (size_t)1, H5P_GROUP_CREATE_DEFAULT, &oh_loc /*out*/) < 0)
FAIL_STACK_ERROR;
@@ -360,7 +360,7 @@ test_ohdr_swmr(hbool_t new_format)
} /* end else */
/* Initialize data */
- wbuf = (int *)HDcalloc(compact_size, sizeof(int));
+ wbuf = (int *)calloc(compact_size, sizeof(int));
n = 0;
for (u = 0; u < compact_size; u++)
wbuf[u] = n++;
@@ -440,7 +440,7 @@ test_ohdr_swmr(hbool_t new_format)
FAIL_STACK_ERROR;
/* Free the buffer */
- HDfree(wbuf);
+ free(wbuf);
PASSED();
@@ -455,7 +455,7 @@ error:
H5Pclose(plist);
H5Pclose(fapl);
HDremove(FILE_OHDR_SWMR);
- HDfree(wbuf);
+ free(wbuf);
}
H5E_END_TRY;
@@ -949,9 +949,9 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
**********************************************/
buf_size = HDstrlen(ATTR_LONG) + 1;
- if (NULL == (in_buf = (char *)HDcalloc(buf_size, sizeof(char))))
+ if (NULL == (in_buf = (char *)calloc(buf_size, sizeof(char))))
TEST_ERROR;
- if (NULL == (out_buf = (char *)HDcalloc(buf_size, sizeof(char))))
+ if (NULL == (out_buf = (char *)calloc(buf_size, sizeof(char))))
TEST_ERROR;
/* Create a string attribute on the dataset
@@ -982,7 +982,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
TEST_ERROR;
/* modify the string attribute */
- HDmemset(in_buf, 0, buf_size);
+ memset(in_buf, 0, buf_size);
HDstrcpy(in_buf, ATTR_LONG);
if (H5Awrite(aid, H5T_NATIVE_CHAR, in_buf) < 0)
TEST_ERROR;
@@ -1052,8 +1052,8 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
TEST_ERROR;
/* Free memory */
- HDfree(in_buf);
- HDfree(out_buf);
+ free(in_buf);
+ free(out_buf);
PASSED();
return SUCCEED;
@@ -1069,8 +1069,8 @@ error:
}
H5E_END_TRY;
- HDfree(in_buf);
- HDfree(out_buf);
+ free(in_buf);
+ free(out_buf);
return FAIL;
} /* test_minimized_dset_ohdr_attribute_addition */
@@ -1905,7 +1905,7 @@ main(void)
* (using default group creation property list only because it's convenient)
*/
TESTING("object header creation");
- HDmemset(&oh_loc, 0, sizeof(oh_loc));
+ memset(&oh_loc, 0, sizeof(oh_loc));
if (H5O_create(f, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc /*out*/) < 0)
FAIL_STACK_ERROR;
PASSED();
diff --git a/test/onion.c b/test/onion.c
index 1063b67..88faf2b 100644
--- a/test/onion.c
+++ b/test/onion.c
@@ -111,21 +111,21 @@ onion_filepaths_init(const char *basename)
{
struct onion_filepaths *paths = NULL;
- if (NULL == (paths = HDmalloc(sizeof(struct onion_filepaths))))
+ if (NULL == (paths = malloc(sizeof(struct onion_filepaths))))
TEST_ERROR;
paths->canon = NULL;
paths->onion = NULL;
paths->recovery = NULL;
- if (NULL == (paths->canon = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
+ if (NULL == (paths->canon = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
HDsnprintf(paths->canon, ONION_TEST_FIXNAME_SIZE, "%s", basename);
- if (NULL == (paths->onion = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
+ if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
- if (NULL == (paths->recovery = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
+ if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
@@ -133,11 +133,11 @@ onion_filepaths_init(const char *basename)
error:
if (paths != NULL) {
- HDfree(paths->canon);
- HDfree(paths->onion);
- HDfree(paths->recovery);
+ free(paths->canon);
+ free(paths->onion);
+ free(paths->recovery);
}
- HDfree(paths);
+ free(paths);
return NULL;
}
@@ -146,10 +146,10 @@ error:
static void
onion_filepaths_destroy(struct onion_filepaths *paths)
{
- HDfree(paths->canon);
- HDfree(paths->onion);
- HDfree(paths->recovery);
- HDfree(paths);
+ free(paths->canon);
+ free(paths->onion);
+ free(paths->recovery);
+ free(paths);
}
/*-----------------------------------------------------------------------------
@@ -925,7 +925,7 @@ test_header_encode_decode(void)
for (i = 0; i < H5FD_ONION_ENCODED_SIZE_HEADER; i++) {
if (exp[i] != buf[i]) {
- HDprintf("first mismatched byte at %zu: %02x %02x\n", i, exp[i], buf[i]);
+ printf("first mismatched byte at %zu: %02x %02x\n", i, exp[i], buf[i]);
TEST_ERROR;
}
}
@@ -1043,7 +1043,7 @@ test_history_encode_decode_empty(void)
TEST_ERROR;
for (i = 0; i < 20; i++) {
if (exp[i] != buf[i]) {
- HDprintf("first mismatched byte at %zu: %02x %02x\n", i, exp[i], buf[i]);
+ printf("first mismatched byte at %zu: %02x %02x\n", i, exp[i], buf[i]);
TEST_ERROR;
}
}
@@ -1154,7 +1154,7 @@ test_history_encode_decode(void)
if (80 != exp_size)
TEST_ERROR;
- history.record_locs = HDcalloc(history.n_revisions, sizeof(H5FD_onion_record_loc_t));
+ history.record_locs = calloc(history.n_revisions, sizeof(H5FD_onion_record_loc_t));
if (NULL == history.record_locs)
TEST_ERROR;
@@ -1183,7 +1183,7 @@ test_history_encode_decode(void)
buf_p = exp + exp_size - 4;
UINT32ENCODE(buf_p, history.checksum);
- if (NULL == (buf = HDmalloc(exp_size)))
+ if (NULL == (buf = malloc(exp_size)))
TEST_ERROR;
if (H5FD__onion_history_encode(&history, buf, &checksum_out) != exp_size)
@@ -1210,7 +1210,7 @@ test_history_encode_decode(void)
/* True decode requires allocating space for record pointers */
- history_out.record_locs = HDcalloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t));
+ history_out.record_locs = calloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t));
if (NULL == history_out.record_locs)
TEST_ERROR;
@@ -1236,17 +1236,17 @@ test_history_encode_decode(void)
TEST_ERROR;
}
- HDfree(history_out.record_locs);
- HDfree(buf);
- HDfree(history.record_locs);
+ free(history_out.record_locs);
+ free(buf);
+ free(history.record_locs);
PASSED();
return 0;
error:
- HDfree(history_out.record_locs);
- HDfree(buf);
- HDfree(history.record_locs);
+ free(history_out.record_locs);
+ free(buf);
+ free(history.record_locs);
return -1;
} /* end test_history_encode_decode() */
@@ -1334,8 +1334,8 @@ test_revision_record_encode_decode(void)
TESTING("encode/decode revision record");
- HDmemcpy(record.time_of_creation, "19411207T190643Z", 16);
- record.archival_index.list = HDcalloc(record.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t));
+ memcpy(record.time_of_creation, "19411207T190643Z", 16);
+ record.archival_index.list = calloc(record.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t));
if (NULL == record.archival_index.list)
TEST_ERROR;
@@ -1375,7 +1375,7 @@ test_revision_record_encode_decode(void)
r_out.archival_index.n_entries = 0;
r_out.archival_index.list = NULL;
- if (NULL == (buf = HDmalloc(sizeof(unsigned char) * exp_size)))
+ if (NULL == (buf = malloc(sizeof(unsigned char) * exp_size)))
TEST_ERROR;
/* Test encode */
@@ -1386,26 +1386,26 @@ test_revision_record_encode_decode(void)
for (i = 0; i < exp_size; i++) {
if (exp[i] != buf[i]) {
badness = TRUE;
- HDprintf("Bad encoded record - Index %zu: expected 0x%02X but got 0x%02X\n", i,
- (unsigned int)exp[i], (unsigned int)buf[i]);
+ printf("Bad encoded record - Index %zu: expected 0x%02X but got 0x%02X\n", i,
+ (unsigned int)exp[i], (unsigned int)buf[i]);
}
}
if (badness) {
/* If this fragile test breaks, this information is helpful... */
- HDprintf("INDEX\n");
+ printf("INDEX\n");
for (i = 0; i < exp_size; i++)
- HDprintf("%4zu ", i);
- HDprintf("\n");
+ printf("%4zu ", i);
+ printf("\n");
- HDprintf("EXPECTED\n");
+ printf("EXPECTED\n");
for (i = 0; i < exp_size; i++)
- HDprintf("0x%02X ", (unsigned int)exp[i]);
- HDprintf("\n");
+ printf("0x%02X ", (unsigned int)exp[i]);
+ printf("\n");
- HDprintf("ACTUAL\n");
+ printf("ACTUAL\n");
for (i = 0; i < exp_size; i++)
- HDprintf("0x%02X ", (unsigned int)buf[i]);
- HDprintf("\n");
+ printf("0x%02X ", (unsigned int)buf[i]);
+ printf("\n");
}
if (badness)
TEST_ERROR;
@@ -1457,10 +1457,10 @@ test_revision_record_encode_decode(void)
TEST_ERROR;
/* Allocate variable-length components */
- r_out.comment = HDcalloc(r_out.comment_size, sizeof(char));
+ r_out.comment = calloc(r_out.comment_size, sizeof(char));
if (NULL == r_out.comment)
TEST_ERROR;
- r_out.archival_index.list = HDcalloc(r_out.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t));
+ r_out.archival_index.list = calloc(r_out.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t));
if (NULL == r_out.archival_index.list)
TEST_ERROR;
@@ -1506,19 +1506,19 @@ test_revision_record_encode_decode(void)
/* Cleanup */
- HDfree(r_out.archival_index.list);
- HDfree(r_out.comment);
- HDfree(buf);
- HDfree(record.archival_index.list);
+ free(r_out.archival_index.list);
+ free(r_out.comment);
+ free(buf);
+ free(record.archival_index.list);
PASSED();
return 0;
error:
- HDfree(r_out.archival_index.list);
- HDfree(r_out.comment);
- HDfree(buf);
- HDfree(record.archival_index.list);
+ free(r_out.archival_index.list);
+ free(r_out.comment);
+ free(buf);
+ free(record.archival_index.list);
return -1;
} /* end test_revision_record_encode_decode() */
@@ -1543,11 +1543,11 @@ compare_file_bytes_exactly(const char *filepath, hid_t fapl_id, size_t nbytes, c
/* filesize is wrong w/ stdio - it's zero instead of 40 or whatnot */
filesize = (uint64_t)H5FDget_eof(raw_vfile, H5FD_MEM_DRAW);
if ((uint64_t)nbytes != filesize) {
- HDfprintf(stderr, "\nSizes not the same - nbytes: %zu, filesize: %" PRIu64 "\n", nbytes, filesize);
+ fprintf(stderr, "\nSizes not the same - nbytes: %zu, filesize: %" PRIu64 "\n", nbytes, filesize);
TEST_ERROR;
}
- if (NULL == (act_buf = HDmalloc(nbytes)))
+ if (NULL == (act_buf = malloc(nbytes)))
TEST_ERROR;
/* Fill buffer with bogus UCHAR_MAX values */
for (size_t i = 0; i < nbytes; i++)
@@ -1560,21 +1560,21 @@ compare_file_bytes_exactly(const char *filepath, hid_t fapl_id, size_t nbytes, c
/* Compare raw bytes data */
for (size_t i = 0; i < nbytes; i++) {
if (exp[i] != act_buf[i]) {
- HDprintf("first mismatched byte %zu: expected 0x%02X was 0x%02X\n", i, exp[i], act_buf[i]);
+ printf("first mismatched byte %zu: expected 0x%02X was 0x%02X\n", i, exp[i], act_buf[i]);
TEST_ERROR;
}
}
if (H5FDclose(raw_vfile) < 0)
TEST_ERROR;
- HDfree(act_buf);
+ free(act_buf);
return 0;
error:
if (raw_vfile != NULL)
H5FDclose(raw_vfile);
- HDfree(act_buf);
+ free(act_buf);
return -1;
} /* end compare_file_bytes_exactly() */
@@ -1600,8 +1600,8 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
uint32_t buf_checksum = 0;
/* memset to avoid bad frees on errors */
- HDmemset(&rev_out, 0, sizeof(H5FD_onion_revision_record_t));
- HDmemset(&history_out, 0, sizeof(H5FD_onion_history_t));
+ memset(&rev_out, 0, sizeof(H5FD_onion_revision_record_t));
+ memset(&history_out, 0, sizeof(H5FD_onion_history_t));
hdr_out.version = H5FD_ONION_HEADER_VERSION_CURR;
@@ -1619,7 +1619,7 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
/* Ingest onion header */
readsize = MIN(filesize, H5FD_ONION_ENCODED_SIZE_HEADER);
- if (NULL == (buf = HDmalloc(readsize * sizeof(unsigned char))))
+ if (NULL == (buf = malloc(readsize * sizeof(unsigned char))))
TEST_ERROR;
if (H5FDread(raw_file, H5FD_MEM_DRAW, H5P_DEFAULT, 0, readsize, buf) < 0)
TEST_ERROR;
@@ -1643,13 +1643,13 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
if (filter->origin_eof != hdr_out.origin_eof)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
/* Ingest history */
readsize = hdr_out.history_size;
- if (NULL == (buf = HDmalloc(readsize * sizeof(unsigned char))))
+ if (NULL == (buf = malloc(readsize * sizeof(unsigned char))))
TEST_ERROR;
if (H5FDread(raw_file, H5FD_MEM_DRAW, H5P_DEFAULT, hdr_out.history_addr, readsize, buf) < 0)
TEST_ERROR;
@@ -1671,14 +1671,14 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
TEST_ERROR;
/* Final read, populate pointers to revision records */
- history_out.record_locs = HDcalloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t));
+ history_out.record_locs = calloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t));
if (NULL == history_out.record_locs)
TEST_ERROR;
if (H5FD__onion_history_decode(buf, &history_out) != readsize)
TEST_ERROR;
/* Re-use buffer space to sanity-check checksum for record pointer(s). */
- HDassert(readsize >= sizeof(H5FD_onion_record_loc_t));
+ assert(readsize >= sizeof(H5FD_onion_record_loc_t));
for (size_t i = 0; i < history_out.n_revisions; i++) {
uint64_t phys_addr;
@@ -1704,7 +1704,7 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
TEST_ERROR;
}
- HDfree(buf);
+ free(buf);
buf = NULL;
/* Ingest revision(s) */
@@ -1720,7 +1720,7 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
rev_out.comment = NULL;
readsize = rpp->record_size;
- if (NULL == (buf = HDmalloc((size_t)rpp->record_size)))
+ if (NULL == (buf = malloc((size_t)rpp->record_size)))
TEST_ERROR;
if (H5FDread(raw_file, H5FD_MEM_DRAW, H5P_DEFAULT, rpp->phys_addr, rpp->record_size, buf) < 0)
TEST_ERROR;
@@ -1748,10 +1748,10 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
TEST_ERROR;
/* Final read, get variable-length data */
- if (NULL == (rev_out.comment = HDmalloc((size_t)rev_out.comment_size)))
+ if (NULL == (rev_out.comment = malloc((size_t)rev_out.comment_size)))
TEST_ERROR;
rev_out.archival_index.list =
- HDcalloc(rev_out.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t));
+ calloc(rev_out.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t));
if (NULL == rev_out.archival_index.list)
TEST_ERROR;
@@ -1774,21 +1774,21 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
erp->n_index_entries != rev_out.archival_index.n_entries)
TEST_ERROR;
- HDfree(buf);
- HDfree(rev_out.comment);
- HDfree(rev_out.archival_index.list);
+ free(buf);
+ free(rev_out.comment);
+ free(rev_out.archival_index.list);
}
- HDfree(history_out.record_locs);
+ free(history_out.record_locs);
history_out.record_locs = NULL;
return 0;
error:
- HDfree(buf);
- HDfree(rev_out.comment);
- HDfree(rev_out.archival_index.list);
- HDfree(history_out.record_locs);
+ free(buf);
+ free(rev_out.comment);
+ free(rev_out.archival_index.list);
+ free(history_out.record_locs);
return -1;
@@ -1849,7 +1849,7 @@ verify_stored_onion_create_0_open(struct onion_filepaths *paths, H5FD_onion_fapl
TEST_ERROR;
/* Size here is arbitrary */
- if (NULL == (act_buf = HDcalloc(1, 8)))
+ if (NULL == (act_buf = calloc(1, 8)))
TEST_ERROR;
/* Should fail when reading from an empty file */
@@ -1861,7 +1861,7 @@ verify_stored_onion_create_0_open(struct onion_filepaths *paths, H5FD_onion_fapl
if (err_ret != FAIL)
TEST_ERROR;
- HDfree(act_buf);
+ free(act_buf);
act_buf = NULL;
if (H5FDclose(file) < 0)
@@ -1885,7 +1885,7 @@ verify_stored_onion_create_0_open(struct onion_filepaths *paths, H5FD_onion_fapl
error:
if (file != NULL)
(void)H5FDclose(file);
- HDfree(act_buf);
+ free(act_buf);
return -1;
} /* end verify_stored_onion_create_0_open() */
@@ -2030,13 +2030,13 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
}
/* Verify logical file contents. */
- if (NULL == (buf = HDmalloc(4 * sizeof(char))))
+ if (NULL == (buf = malloc(4 * sizeof(char))))
TEST_ERROR;
if (H5FDread(vfile_rw, H5FD_MEM_DRAW, H5P_DEFAULT, 0, 4, buf) < 0)
TEST_ERROR;
- if (HDmemcmp(a_list_s, buf, 4) != 0)
+ if (memcmp(a_list_s, buf, 4) != 0)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
/* Write the latter half of buffer at addr 0 (more than one page) */
@@ -2050,13 +2050,13 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
TEST_ERROR;
/* Verify logical file contents. */
- if (NULL == (buf = HDmalloc(buf_size * sizeof(char))))
+ if (NULL == (buf = malloc(buf_size * sizeof(char))))
TEST_ERROR;
if (H5FDread(vfile_rw, H5FD_MEM_DRAW, H5P_DEFAULT, 0, buf_size, buf) < 0)
TEST_ERROR;
- if (HDmemcmp(a_list_s + half_size, buf, buf_size) != 0)
+ if (memcmp(a_list_s + half_size, buf, buf_size) != 0)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
/* Overwrite existing data with entire buffer at addr 0 */
@@ -2066,13 +2066,13 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
TEST_ERROR;
/* Verify logical file contents. */
- if (NULL == (buf = HDmalloc(a_list_size_s * sizeof(char))))
+ if (NULL == (buf = malloc(a_list_size_s * sizeof(char))))
TEST_ERROR;
if (H5FDread(vfile_rw, H5FD_MEM_DRAW, H5P_DEFAULT, 0, a_list_size_s, buf) < 0)
TEST_ERROR;
- if (HDmemcmp(a_list_s, buf, a_list_size_s) != 0)
+ if (memcmp(a_list_s, buf, a_list_size_s) != 0)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
} /* end if writing data to logical file */
@@ -2133,13 +2133,13 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
TEST_ERROR;
if (H5FDset_eoa(vfile_ro, H5FD_MEM_DRAW, a_list_size_s) < 0)
TEST_ERROR;
- if (NULL == (buf = HDmalloc(a_list_size_s * 64 * sizeof(char))))
+ if (NULL == (buf = malloc(a_list_size_s * 64 * sizeof(char))))
TEST_ERROR;
if (H5FDread(vfile_ro, H5FD_MEM_DRAW, H5P_DEFAULT, 0, a_list_size_s, buf) < 0)
TEST_ERROR;
- if (HDmemcmp(a_list_s, buf, a_list_size_s) != 0)
+ if (memcmp(a_list_s, buf, a_list_size_s) != 0)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
}
else {
@@ -2178,7 +2178,7 @@ error:
onion_filepaths_destroy(paths);
}
- HDfree(buf);
+ free(buf);
if (vfile_raw != NULL)
(void)H5FDclose(vfile_raw);
@@ -2307,7 +2307,7 @@ test_several_revisions_with_logical_gaps(void)
if (NULL == file)
TEST_ERROR;
if (8 != H5FDget_eof(file, H5FD_MEM_DRAW)) {
- HDprintf("\nEOF is not zero, it is: %" PRIuHADDR "\n", H5FDget_eof(file, H5FD_MEM_DRAW));
+ printf("\nEOF is not zero, it is: %" PRIuHADDR "\n", H5FDget_eof(file, H5FD_MEM_DRAW));
TEST_ERROR;
}
if (H5FDclose(file) < 0)
@@ -2328,7 +2328,7 @@ test_several_revisions_with_logical_gaps(void)
if (NULL == file)
TEST_ERROR;
if (0 != H5FDget_eof(file, H5FD_MEM_DRAW)) {
- HDprintf("\nEOF is not zero, it is: %" PRIuHADDR "\n", H5FDget_eof(file, H5FD_MEM_DRAW));
+ printf("\nEOF is not zero, it is: %" PRIuHADDR "\n", H5FDget_eof(file, H5FD_MEM_DRAW));
TEST_ERROR;
}
if (H5FDclose(file) < 0)
@@ -2350,11 +2350,11 @@ test_several_revisions_with_logical_gaps(void)
TEST_ERROR;
size = a_off + a_list_size_s;
if (size != H5FDget_eof(file, H5FD_MEM_DRAW)) {
- HDprintf("\nEOF is not %" PRIuHADDR ", it is: %" PRIuHADDR "\n", size,
- H5FDget_eof(file, H5FD_MEM_DRAW));
+ printf("\nEOF is not %" PRIuHADDR ", it is: %" PRIuHADDR "\n", size,
+ H5FDget_eof(file, H5FD_MEM_DRAW));
TEST_ERROR;
}
- if (NULL == (buf = HDmalloc(size * sizeof(unsigned char))))
+ if (NULL == (buf = malloc(size * sizeof(unsigned char))))
TEST_ERROR;
if (H5FDset_eoa(file, H5FD_MEM_DRAW, size) < 0)
TEST_ERROR;
@@ -2364,12 +2364,12 @@ test_several_revisions_with_logical_gaps(void)
if (0 != buf[i])
TEST_ERROR;
}
- if (HDmemcmp(buf + a_off, a_list_s, a_list_size_s) != 0)
+ if (memcmp(buf + a_off, a_list_s, a_list_size_s) != 0)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
/* Repeat read at page offset; test possible read offset error */
- if (NULL == (buf = HDmalloc(ONION_TEST_PAGE_SIZE_5 * sizeof(unsigned char))))
+ if (NULL == (buf = malloc(ONION_TEST_PAGE_SIZE_5 * sizeof(unsigned char))))
TEST_ERROR;
if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, ONION_TEST_PAGE_SIZE_5, ONION_TEST_PAGE_SIZE_5, buf) < 0)
TEST_ERROR;
@@ -2378,9 +2378,9 @@ test_several_revisions_with_logical_gaps(void)
if (0 != buf[i])
TEST_ERROR;
}
- if (HDmemcmp(buf + size, a_list_s, ONION_TEST_PAGE_SIZE_5 - size) != 0)
+ if (memcmp(buf + size, a_list_s, ONION_TEST_PAGE_SIZE_5 - size) != 0)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
if (H5FDclose(file) < 0)
TEST_ERROR;
@@ -2402,7 +2402,7 @@ test_several_revisions_with_logical_gaps(void)
size = b_off + b_list_size_s;
if (size != H5FDget_eof(file, H5FD_MEM_DRAW))
TEST_ERROR;
- if (NULL == (buf = HDmalloc(size * sizeof(unsigned char))))
+ if (NULL == (buf = malloc(size * sizeof(unsigned char))))
TEST_ERROR;
if (H5FDset_eoa(file, H5FD_MEM_DRAW, size) < 0)
TEST_ERROR;
@@ -2412,15 +2412,15 @@ test_several_revisions_with_logical_gaps(void)
if (0 != buf[i])
TEST_ERROR;
}
- if (HDmemcmp(buf + a_off, a_list_s, a_list_size_s) != 0)
+ if (memcmp(buf + a_off, a_list_s, a_list_size_s) != 0)
TEST_ERROR;
for (i = a_off + a_list_size_s; i < b_off; i++) {
if (0 != buf[i])
TEST_ERROR;
}
- if (HDmemcmp(buf + b_off, b_list_s, b_list_size_s) != 0)
+ if (memcmp(buf + b_off, b_list_s, b_list_size_s) != 0)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
if (H5FDclose(file) < 0)
TEST_ERROR;
@@ -2442,24 +2442,24 @@ test_several_revisions_with_logical_gaps(void)
size = b_off + b_list_size_s;
if (size != H5FDget_eof(file, H5FD_MEM_DRAW))
TEST_ERROR;
- buf = (unsigned char *)HDmalloc(sizeof(unsigned char) * size);
+ buf = (unsigned char *)malloc(sizeof(unsigned char) * size);
if (NULL == buf)
TEST_ERROR;
if (H5FDset_eoa(file, H5FD_MEM_DRAW, size) < 0)
TEST_ERROR;
if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, 0, size, buf) < 0)
TEST_ERROR;
- if (HDmemcmp(buf, a_list_s, a_list_size_s) != 0)
+ if (memcmp(buf, a_list_s, a_list_size_s) != 0)
TEST_ERROR;
- if (HDmemcmp(buf + a_list_size_s, a_list_s + a_list_size_s - a_off, a_off) != 0)
+ if (memcmp(buf + a_list_size_s, a_list_s + a_list_size_s - a_off, a_off) != 0)
TEST_ERROR;
for (i = a_off + a_list_size_s; i < b_off; i++) {
if (0 != buf[i])
TEST_ERROR;
}
- if (HDmemcmp(buf + b_off, b_list_s, b_list_size_s) != 0)
+ if (memcmp(buf + b_off, b_list_s, b_list_size_s) != 0)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
if (H5FDclose(file) < 0)
TEST_ERROR;
@@ -2534,8 +2534,8 @@ error:
onion_filepaths_destroy(paths);
}
- HDfree(history_out.record_locs);
- HDfree(buf);
+ free(history_out.record_locs);
+ free(buf);
if (file != NULL)
(void)H5FDclose(file);
@@ -2585,7 +2585,7 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf
onion_info_p->revision_num = about[i].revision_num;
if (about[i].comment != NULL) {
j = MIN(HDstrlen(about[i].comment), H5FD_ONION_FAPL_INFO_COMMENT_MAX_LEN);
- HDmemcpy(onion_info_p->comment, about[i].comment, j);
+ memcpy(onion_info_p->comment, about[i].comment, j);
}
onion_info_p->comment[j] = '\0';
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -2607,20 +2607,20 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf
if (H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, wi->offset, wi->size, wi->buf) < 0)
TEST_ERROR;
/* Verify write as expected */
- if (NULL == (buf_vfy = HDmalloc(wi->size * sizeof(unsigned char))))
+ if (NULL == (buf_vfy = malloc(wi->size * sizeof(unsigned char))))
TEST_ERROR;
if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, wi->offset, wi->size, buf_vfy) < 0)
TEST_ERROR;
- if (HDmemcmp(buf_vfy, wi->buf, wi->size) != 0) {
+ if (memcmp(buf_vfy, wi->buf, wi->size) != 0) {
const unsigned char *_buf = wi->buf;
size_t z = 0;
HDputs("i exp act");
for (z = 0; z < wi->size; z++)
- HDprintf("%02zx %c %c\n", z, _buf[z], buf_vfy[z]);
- HDfflush(stdout);
+ printf("%02zx %c %c\n", z, _buf[z], buf_vfy[z]);
+ fflush(stdout);
TEST_ERROR;
}
- HDfree(buf_vfy);
+ free(buf_vfy);
buf_vfy = NULL;
} /* end for each write */
@@ -2644,7 +2644,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf_vfy);
+ free(buf_vfy);
return -1;
} /* end do_onion_open_and_writes() */
@@ -2731,7 +2731,7 @@ test_page_aligned_history_create(void)
TEST_ERROR;
/* Inspect logical file */
- if (NULL == (buf = HDmalloc(b_list_size_s * sizeof(unsigned char))))
+ if (NULL == (buf = malloc(b_list_size_s * sizeof(unsigned char))))
TEST_ERROR;
file = H5FDopen(paths->canon, H5F_ACC_RDONLY, fapl_id, HADDR_UNDEF);
if (NULL == file)
@@ -2742,30 +2742,30 @@ test_page_aligned_history_create(void)
TEST_ERROR;
if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, 0, b_list_size_s, buf) < 0)
TEST_ERROR;
- if (HDmemcmp(a_list_s, buf + a_off, a_list_size_s) != 0) {
+ if (memcmp(a_list_s, buf + a_off, a_list_size_s) != 0) {
size_t k;
- HDprintf("aoff: %" PRIu64 "\n", a_off);
+ printf("aoff: %" PRIu64 "\n", a_off);
HDputs("i exp act");
for (k = 0; k < b_list_size_s; k++) {
- HDprintf("%3zu:: %c : %c\n", k, (k < a_off) ? ' ' : a_list_s[k - a_off], buf[k]);
+ printf("%3zu:: %c : %c\n", k, (k < a_off) ? ' ' : a_list_s[k - a_off], buf[k]);
}
- HDfflush(stdout);
+ fflush(stdout);
TEST_ERROR;
}
- if (HDmemcmp(b_list_s, buf, a_off) != 0) {
+ if (memcmp(b_list_s, buf, a_off) != 0) {
size_t k;
- HDprintf("aoff: %" PRIu64 "\n", a_off);
+ printf("aoff: %" PRIu64 "\n", a_off);
HDputs("i exp act");
for (k = 0; k < b_list_size_s; k++) {
- HDprintf("%3zu:: %c : %c\n", k, (k < a_off) ? b_list_s[k] : ' ', buf[k]);
+ printf("%3zu:: %c : %c\n", k, (k < a_off) ? b_list_s[k] : ' ', buf[k]);
}
- HDfflush(stdout);
+ fflush(stdout);
TEST_ERROR;
}
if (H5FDclose(file) < 0)
TEST_ERROR;
file = NULL;
- HDfree(buf);
+ free(buf);
buf = NULL;
/* Inspect history construction */
@@ -2775,7 +2775,7 @@ test_page_aligned_history_create(void)
if (H5FDset_eoa(file, H5FD_MEM_DRAW, H5FDget_eof(file, H5FD_MEM_DRAW)) < 0)
TEST_ERROR;
- if (NULL == (buf = HDmalloc(H5FD_ONION_ENCODED_SIZE_HEADER)))
+ if (NULL == (buf = malloc(H5FD_ONION_ENCODED_SIZE_HEADER)))
TEST_ERROR;
if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, 0, H5FD_ONION_ENCODED_SIZE_HEADER, buf) < 0)
TEST_ERROR;
@@ -2783,10 +2783,10 @@ test_page_aligned_history_create(void)
TEST_ERROR;
if (hdr_out.history_addr & ((1 << 5) - 1)) /* 5::PAGE_SIZE_5 */
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
- if (NULL == (buf = HDmalloc(hdr_out.history_size)))
+ if (NULL == (buf = malloc(hdr_out.history_size)))
TEST_ERROR;
if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, hdr_out.history_addr, hdr_out.history_size, buf) < 0)
TEST_ERROR;
@@ -2794,12 +2794,12 @@ test_page_aligned_history_create(void)
TEST_ERROR;
if (history_out.n_revisions != 2)
TEST_ERROR;
- history_out.record_locs = HDcalloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t));
+ history_out.record_locs = calloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t));
if (NULL == history_out.record_locs)
TEST_ERROR;
if (H5FD__onion_history_decode(buf, &history_out) != hdr_out.history_size)
TEST_ERROR;
- HDfree(buf);
+ free(buf);
buf = NULL;
for (i = 0; i < history_out.n_revisions; i++) {
@@ -2809,7 +2809,7 @@ test_page_aligned_history_create(void)
/* TODO: check phys_addr of each page entry? */
}
- HDfree(history_out.record_locs);
+ free(history_out.record_locs);
history_out.record_locs = NULL;
if (H5FDclose(file) < 0)
@@ -2828,7 +2828,7 @@ test_page_aligned_history_create(void)
HDremove(paths->recovery);
onion_filepaths_destroy(paths);
- HDfree(buf);
+ free(buf);
PASSED();
return 0;
@@ -2842,8 +2842,8 @@ error:
onion_filepaths_destroy(paths);
}
- HDfree(history_out.record_locs);
- HDfree(buf);
+ free(history_out.record_locs);
+ free(buf);
if (file != NULL)
(void)H5FDclose(file);
@@ -2906,11 +2906,11 @@ test_integration_create(void)
/* SETUP */
- if (NULL == (wdata = HDcalloc(1, sizeof(*wdata))))
+ if (NULL == (wdata = calloc(1, sizeof(*wdata))))
TEST_ERROR;
- if (NULL == (rdata = HDcalloc(1, sizeof(*rdata))))
+ if (NULL == (rdata = calloc(1, sizeof(*rdata))))
TEST_ERROR;
- if (NULL == (dset_data = HDcalloc(1, sizeof(*dset_data))))
+ if (NULL == (dset_data = calloc(1, sizeof(*dset_data))))
TEST_ERROR;
if ((onion_info.backing_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -3064,8 +3064,8 @@ test_integration_create(void)
for (int j = 0; j < 256; j++) {
int expected = i * j - j;
if (rdata->arr[i][j] != expected) {
- HDprintf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i][j]);
- HDfflush(stdout);
+ printf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i][j]);
+ fflush(stdout);
TEST_ERROR;
}
}
@@ -3102,8 +3102,8 @@ test_integration_create(void)
for (int j = 0; j < 256; j++) {
int expected = i * 6 + j + 1;
if (rdata->arr[i][j] != expected) {
- HDprintf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i][j]);
- HDfflush(stdout);
+ printf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i][j]);
+ fflush(stdout);
TEST_ERROR;
}
}
@@ -3141,12 +3141,12 @@ test_integration_create(void)
for (int j = 0; j < 256; j++) {
int expected = i * 3 + j + 5;
if (rdata->arr[i][j] != expected) {
- HDprintf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i][j]);
- HDfflush(stdout);
+ printf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i][j]);
+ fflush(stdout);
TEST_ERROR;
}
else {
- HDfflush(stdout);
+ fflush(stdout);
}
}
}
@@ -3166,9 +3166,9 @@ test_integration_create(void)
HDremove(paths->recovery);
onion_filepaths_destroy(paths);
- HDfree(wdata);
- HDfree(rdata);
- HDfree(dset_data);
+ free(wdata);
+ free(rdata);
+ free(dset_data);
PASSED();
return 0;
@@ -3191,9 +3191,9 @@ error:
}
H5E_END_TRY;
- HDfree(wdata);
- HDfree(rdata);
- HDfree(dset_data);
+ free(wdata);
+ free(rdata);
+ free(dset_data);
return -1;
} /* end test_integration_create() */
@@ -3235,11 +3235,11 @@ test_integration_create_simple(void)
TESTING("onion-created one-dimensional HDF5 file with revisions");
/* Setup */
- if (NULL == (wdata = HDcalloc(1, sizeof(*wdata))))
+ if (NULL == (wdata = calloc(1, sizeof(*wdata))))
TEST_ERROR;
- if (NULL == (rdata = HDcalloc(1, sizeof(*rdata))))
+ if (NULL == (rdata = calloc(1, sizeof(*rdata))))
TEST_ERROR;
- if (NULL == (dset_data = HDcalloc(1, sizeof(*dset_data))))
+ if (NULL == (dset_data = calloc(1, sizeof(*dset_data))))
TEST_ERROR;
if ((onion_info.backing_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -3405,7 +3405,7 @@ test_integration_create_simple(void)
for (int i = 0; i < ONE_DIM_SIZE; i += 20) {
int expected = i + 2048;
if (rdata->arr[i] != expected) {
- HDprintf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i]);
+ printf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i]);
TEST_ERROR;
}
}
@@ -3425,9 +3425,9 @@ test_integration_create_simple(void)
HDremove(paths->recovery);
onion_filepaths_destroy(paths);
- HDfree(wdata);
- HDfree(rdata);
- HDfree(dset_data);
+ free(wdata);
+ free(rdata);
+ free(dset_data);
PASSED();
return 0;
@@ -3450,9 +3450,9 @@ error:
}
H5E_END_TRY;
- HDfree(wdata);
- HDfree(rdata);
- HDfree(dset_data);
+ free(wdata);
+ free(rdata);
+ free(dset_data);
return -1;
} /* end test_integration_create_simple() */
@@ -4437,7 +4437,7 @@ test_integration_reference(void)
/* Verify the number of selection */
if ((nelmts = H5Sget_select_npoints(space)) != 8) {
- HDprintf("Number of selected elements is supposed to be 8, but got %" PRIuHSIZE "\n", nelmts);
+ printf("Number of selected elements is supposed to be 8, but got %" PRIuHSIZE "\n", nelmts);
TEST_ERROR;
}
@@ -4524,7 +4524,7 @@ test_integration_reference(void)
for (int j = 0; j < 4; j++) {
int expected = i + j;
if (rdata[i][j] != expected) {
- HDprintf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata[i][j]);
+ printf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata[i][j]);
TEST_ERROR;
}
}
@@ -4580,7 +4580,7 @@ test_integration_reference(void)
TEST_ERROR;
if ((nelmts = H5Sget_select_npoints(space2)) != 8) {
- HDprintf("Number of selected elements is supposed to be 8, but got %" PRIuHSIZE "\n", nelmts);
+ printf("Number of selected elements is supposed to be 8, but got %" PRIuHSIZE "\n", nelmts);
TEST_ERROR;
}
@@ -4593,7 +4593,7 @@ test_integration_reference(void)
TEST_ERROR;
if ((nelmts = H5Sget_select_npoints(space2)) != 4) {
- HDprintf("Number of selected elements is supposed to be 4, but got %" PRIuHSIZE "\n", nelmts);
+ printf("Number of selected elements is supposed to be 4, but got %" PRIuHSIZE "\n", nelmts);
TEST_ERROR;
}
@@ -4679,11 +4679,11 @@ test_integration_create_by_name(void)
TESTING("H5Pset_driver_by_name");
/* Setup */
- if (NULL == (wdata = HDcalloc(1, sizeof(*wdata))))
+ if (NULL == (wdata = calloc(1, sizeof(*wdata))))
TEST_ERROR;
- if (NULL == (rdata = HDcalloc(1, sizeof(*rdata))))
+ if (NULL == (rdata = calloc(1, sizeof(*rdata))))
TEST_ERROR;
- if (NULL == (dset_data = HDcalloc(1, sizeof(*dset_data))))
+ if (NULL == (dset_data = calloc(1, sizeof(*dset_data))))
TEST_ERROR;
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -4847,7 +4847,7 @@ test_integration_create_by_name(void)
for (int i = 0; i < ONE_DIM_SIZE; i += 20) {
int expected = i + 2048;
if (rdata->arr[i] != expected) {
- HDprintf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i]);
+ printf("ERROR!!! Expected: %d, Got: %d\n", expected, rdata->arr[i]);
TEST_ERROR;
}
}
@@ -4865,9 +4865,9 @@ test_integration_create_by_name(void)
HDremove(paths->recovery);
onion_filepaths_destroy(paths);
- HDfree(wdata);
- HDfree(rdata);
- HDfree(dset_data);
+ free(wdata);
+ free(rdata);
+ free(dset_data);
PASSED();
return 0;
@@ -4889,9 +4889,9 @@ error:
}
H5E_END_TRY;
- HDfree(wdata);
- HDfree(rdata);
- HDfree(dset_data);
+ free(wdata);
+ free(rdata);
+ free(dset_data);
return -1;
} /* end test_integration_create_simple() */
@@ -4910,7 +4910,7 @@ main(void)
const char *env_h5_drvr = NULL; /* VFD value from environment */
int nerrors = 0;
- HDprintf("Testing Onion VFD functionality.\n");
+ printf("Testing Onion VFD functionality.\n");
h5_reset();
@@ -4923,7 +4923,7 @@ main(void)
if ((0 != HDstrcmp(env_h5_drvr, "nomatch")) && (0 != HDstrcmp(env_h5_drvr, "sec2"))) {
SKIPPED();
HDputs("Onion VFD test skipped due to non-sec2 default VFD");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* Initialize */
@@ -4955,11 +4955,11 @@ main(void)
nerrors -= test_integration_create_by_name();
if (nerrors > 0) {
- HDprintf("***** %d Onion TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("***** %d Onion TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
return EXIT_FAILURE;
}
- HDprintf("All Onion tests passed.\n");
+ printf("All Onion tests passed.\n");
return EXIT_SUCCESS;
} /* end main() */
diff --git a/test/page_buffer.c b/test/page_buffer.c
index a6f7f0a..aed35ef 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -104,7 +104,7 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
FAIL_STACK_ERROR;
num_elements = NX * NY;
- if ((data = (int *)HDcalloc((size_t)num_elements, sizeof(int))) == NULL)
+ if ((data = (int *)calloc((size_t)num_elements, sizeof(int))) == NULL)
TEST_ERROR;
for (i = 0; i < (int)num_elements; i++)
data[i] = i;
@@ -150,7 +150,7 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDmemset(data, 0, (size_t)num_elements * sizeof(int));
+ memset(data, 0, (size_t)num_elements * sizeof(int));
if ((dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
@@ -160,7 +160,7 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
for (j = 0; j < num_elements; j++) {
if (data[j] != j) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
FAIL_STACK_ERROR;
}
}
@@ -185,7 +185,7 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
if (H5Sclose(filespace) < 0)
FAIL_STACK_ERROR;
- HDfree(data);
+ free(data);
return 0;
error:
@@ -196,7 +196,7 @@ error:
H5Gclose(grp_id);
H5Fclose(file_id);
if (data)
- HDfree(data);
+ free(data);
}
H5E_END_TRY;
return (1);
@@ -253,7 +253,7 @@ open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size
FAIL_STACK_ERROR;
num_elements = NX * NY;
- if ((data = (int *)HDcalloc((size_t)num_elements, sizeof(int))) == NULL)
+ if ((data = (int *)calloc((size_t)num_elements, sizeof(int))) == NULL)
TEST_ERROR;
for (i = 0; i < NUM_DSETS; i++) {
@@ -270,7 +270,7 @@ open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size
for (j = 0; j < num_elements; j++) {
if (data[j] != j) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
FAIL_STACK_ERROR;
}
}
@@ -280,7 +280,7 @@ open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size
FAIL_STACK_ERROR;
if (H5Fclose(file_id) < 0)
FAIL_STACK_ERROR;
- HDfree(data);
+ free(data);
return 0;
@@ -290,7 +290,7 @@ error:
H5Gclose(grp_id);
H5Fclose(file_id);
if (data)
- HDfree(data);
+ free(data);
}
H5E_END_TRY;
return 1;
@@ -324,7 +324,7 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize)
if (split || multi) {
- HDmemset(memb_name, 0, sizeof memb_name);
+ memset(memb_name, 0, sizeof memb_name);
/* Get current split settings */
if (H5Pget_fapl_multi(fapl, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0)
@@ -348,7 +348,7 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- HDfree(memb_name[mt]);
+ free(memb_name[mt]);
} /* end if */
@@ -580,7 +580,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
if (set_multi_split(env_h5_drvr, fapl, sizeof(int) * 200) != 0)
TEST_ERROR;
- if ((data = (int *)HDcalloc((size_t)num_elements, sizeof(int))) == NULL)
+ if ((data = (int *)calloc((size_t)num_elements, sizeof(int))) == NULL)
TEST_ERROR;
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -673,7 +673,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
for (i = 0; i < 400; i++) {
if (data[i] != -1) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
FAIL_STACK_ERROR;
}
}
@@ -687,7 +687,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
for (i = 0; i < 1; i++) {
if (data[i] != -1) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
TEST_ERROR;
}
}
@@ -702,7 +702,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
for (i = 0; i < 100; i++) {
if (data[i] != i + 350) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
TEST_ERROR;
}
}
@@ -717,13 +717,13 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
while (i < 800) {
if ((i >= 100 && i < 300) || (i >= 600)) {
if (data[i] != i) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
TEST_ERROR;
}
}
else {
if (data[i] != -1) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
TEST_ERROR;
}
}
@@ -739,7 +739,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
for (i = 0; i < 800; i++) {
if (data[i] != i) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
TEST_ERROR;
}
}
@@ -765,13 +765,13 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
while (i < 1000) {
if (i < 400) {
if (data[i] != i) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
TEST_ERROR;
}
}
else {
if (data[i] != 0) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
TEST_ERROR;
}
}
@@ -786,7 +786,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
if (H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- HDfree(data);
+ free(data);
PASSED();
return 0;
@@ -798,7 +798,7 @@ error:
H5Pclose(fcpl);
H5Fclose(file_id);
if (data)
- HDfree(data);
+ free(data);
}
H5E_END_TRY;
return 1;
@@ -848,7 +848,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
if (set_multi_split(env_h5_drvr, fapl, sizeof(int) * 200) != 0)
TEST_ERROR;
- if ((data = (int *)HDcalloc((size_t)num_elements, sizeof(int))) == NULL)
+ if ((data = (int *)calloc((size_t)num_elements, sizeof(int))) == NULL)
TEST_ERROR;
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -952,7 +952,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
for (i = 0; i < 1; i++) {
if (data[i] != -1) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
TEST_ERROR;
} /* end if */
} /* end for */
@@ -979,7 +979,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
for (i = 0; i < 100; i++) {
if (data[i] != i + 350) {
- HDfprintf(stderr, "Read different values than written\n");
+ fprintf(stderr, "Read different values than written\n");
TEST_ERROR;
} /* end if */
} /* end for */
@@ -1028,7 +1028,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
if (H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- HDfree(data);
+ free(data);
PASSED();
return 0;
@@ -1040,7 +1040,7 @@ error:
H5Pclose(fcpl);
H5Fclose(file_id);
if (data)
- HDfree(data);
+ free(data);
}
H5E_END_TRY;
return 1;
@@ -1083,7 +1083,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
H5F_t *f = NULL;
TESTING("Minimum Metadata threshold Processing");
- HDprintf("\n");
+ printf("\n");
h5_fixname(FILENAME[0], orig_fapl, filename, sizeof(filename));
if ((fapl = H5Pcopy(orig_fapl)) < 0)
@@ -1092,7 +1092,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if (set_multi_split(env_h5_drvr, fapl, sizeof(int) * 200) != 0)
TEST_ERROR;
- if ((data = (int *)HDcalloc((size_t)num_elements, sizeof(int))) == NULL)
+ if ((data = (int *)calloc((size_t)num_elements, sizeof(int))) == NULL)
TEST_ERROR;
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -1104,7 +1104,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if (H5Pset_file_space_page_size(fcpl, sizeof(int) * 200) < 0)
FAIL_STACK_ERROR;
- HDprintf("\tMinimum metadata threshold = 100%%\n");
+ printf("\tMinimum metadata threshold = 100%%\n");
/* keep 5 pages at max in the page buffer and 5 meta page minimum */
if (H5Pset_page_buffer_size(fapl, sizeof(int) * 1000, 100, 0) < 0)
@@ -1121,9 +1121,9 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
/* opening the file inserts one or more pages into the page buffer.
* Get the raw and meta counts now, so we can adjust tests accordingly.
*/
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->page_buf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->page_buf);
base_raw_cnt = f->shared->page_buf->raw_count;
base_meta_cnt = f->shared->page_buf->meta_count;
@@ -1235,7 +1235,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if (H5Fclose(file_id) < 0)
FAIL_STACK_ERROR;
- HDprintf("\tMinimum raw data threshold = 100%%\n");
+ printf("\tMinimum raw data threshold = 100%%\n");
page_count = 0;
@@ -1255,9 +1255,9 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
/* opening the file inserts one or more pages into the page buffer.
* Get the raw and meta counts now, so we can adjust tests accordingly.
*/
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->page_buf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->page_buf);
base_raw_cnt = f->shared->page_buf->raw_count;
base_meta_cnt = f->shared->page_buf->meta_count;
@@ -1365,7 +1365,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if (H5Fclose(file_id) < 0)
FAIL_STACK_ERROR;
- HDprintf("\tMinimum metadata threshold = 40%%, Minimum rawdata threshold = 40%%\n");
+ printf("\tMinimum metadata threshold = 40%%, Minimum rawdata threshold = 40%%\n");
page_count = 0;
/* keep 5 pages at max in the page buffer 2 meta pages, 2 raw pages
* minimum
@@ -1510,7 +1510,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if (H5Fclose(file_id) < 0)
FAIL_STACK_ERROR;
- HDprintf("\tMinimum metadata threshold = 20%%\n");
+ printf("\tMinimum metadata threshold = 20%%\n");
page_count = 0;
/* keep 5 pages at max in the page buffer and 1 meta page minimum */
if (H5Pset_page_buffer_size(fapl, sizeof(int) * 1000, 39, 0) < 0)
@@ -1646,7 +1646,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if (H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- HDfree(data);
+ free(data);
PASSED();
@@ -1660,7 +1660,7 @@ error:
H5Pclose(fcpl);
H5Fclose(file_id);
if (data)
- HDfree(data);
+ free(data);
}
H5E_END_TRY;
@@ -1711,7 +1711,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
if (set_multi_split(env_h5_drvr, fapl, sizeof(int) * 200) != 0)
TEST_ERROR;
- if ((data = (int *)HDcalloc((size_t)num_elements, sizeof(int))) == NULL)
+ if ((data = (int *)calloc((size_t)num_elements, sizeof(int))) == NULL)
TEST_ERROR;
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -1738,9 +1738,9 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
* Get the raw and meta counts now, so we can adjust the expected
* statistics accordingly.
*/
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->page_buf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->page_buf);
base_raw_cnt = f->shared->page_buf->raw_count;
base_meta_cnt = f->shared->page_buf->meta_count;
@@ -1938,7 +1938,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
if (H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- HDfree(data);
+ free(data);
PASSED();
return 0;
@@ -1950,7 +1950,7 @@ error:
H5Pclose(fcpl);
H5Fclose(file_id);
if (data)
- HDfree(data);
+ free(data);
}
H5E_END_TRY;
@@ -2111,7 +2111,7 @@ main(void)
SKIPPED();
HDputs("Skip page buffering test because paged aggregation is disabled for multi/split drivers");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end if */
if ((fapl = h5_fileaccess()) < 0) {
@@ -2151,10 +2151,10 @@ main(void)
HDputs("All Page Buffering tests passed.");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDprintf("***** %d Page Buffering TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("***** %d Page Buffering TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
H5E_BEGIN_TRY
{
@@ -2165,5 +2165,5 @@ error:
if (api_ctx_pushed)
H5CX_pop(FALSE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* main() */
diff --git a/test/reserved.c b/test/reserved.c
index a820344..2e2b431 100644
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -491,7 +491,7 @@ main(void)
num_errs += rsrv_vlen();
if (num_errs > 0)
- HDprintf("**** %d FAILURE%s! ****\n", num_errs, num_errs == 1 ? "" : "S");
+ printf("**** %d FAILURE%s! ****\n", num_errs, num_errs == 1 ? "" : "S");
else
HDputs("All address space reservation tests passed.");
diff --git a/test/ros3.c b/test/ros3.c
index bc9eb86..99f9f52 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -106,7 +106,7 @@
*/
#define JSFAILED_AT() \
{ \
- HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
+ printf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
}
/*----------------------------------------------------------------------------
@@ -197,10 +197,10 @@ static inline void
jserr_long(long expected, long actual, const char *reason)
{
if (reason != NULL) {
- HDprintf("%s\n", reason);
+ printf("%s\n", reason);
}
else {
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
+ printf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
}
}
@@ -242,10 +242,10 @@ static inline void
jserr_str(const char *expected, const char *actual, const char *reason)
{
if (reason != NULL) {
- HDprintf("%s\n", reason);
+ printf("%s\n", reason);
}
else {
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
+ printf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
}
}
@@ -561,7 +561,7 @@ test_fapl_config_validation(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -842,7 +842,7 @@ test_vfd_open(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -985,14 +985,14 @@ test_eof_eoa(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
HDputs(" s3 credentials are not loaded");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -1096,14 +1096,14 @@ test_H5FDread_without_eoa_set_fails(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
HDputs(" s3 credentials are not loaded");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -1270,14 +1270,14 @@ test_read(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
HDputs(" s3 credentials are not loaded");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -1414,7 +1414,7 @@ test_noops_and_autofails(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -1534,14 +1534,14 @@ test_cmp(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
HDputs(" s3 credentials are not loaded");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -1658,14 +1658,14 @@ test_H5F_integration(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
HDputs(" s3 credentials are not loaded");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -1711,8 +1711,8 @@ error:
/***********
* CLEANUP *
***********/
- HDprintf("\nerror!");
- HDfflush(stdout);
+ printf("\nerror!");
+ fflush(stdout);
if (fapl_id >= 0) {
H5E_BEGIN_TRY
@@ -1753,7 +1753,7 @@ main(void)
#endif /* H5_HAVE_ROS3_VFD */
- HDprintf("Testing ros3 VFD functionality.\n");
+ printf("Testing ros3 VFD functionality.\n");
#ifdef H5_HAVE_ROS3_VFD
@@ -1763,8 +1763,8 @@ main(void)
bucket_url_env = HDgetenv("HDF5_ROS3_TEST_BUCKET_URL");
if (bucket_url_env == NULL || bucket_url_env[0] == '\0') {
- HDprintf("WARNING: S3 bucket url is not defined in environment "
- "variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
+ printf("WARNING: S3 bucket url is not defined in environment "
+ "variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
}
else {
HDstrncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
@@ -1774,25 +1774,25 @@ main(void)
if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_text_restricted, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
(const char *)s3_test_bucket_url,
(const char *)S3_TEST_RESOURCE_TEXT_RESTRICTED)) {
- HDprintf("* ros3 setup failed (text_restricted) ! *\n");
+ printf("* ros3 setup failed (text_restricted) ! *\n");
return 1;
}
if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_text_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
(const char *)s3_test_bucket_url,
(const char *)S3_TEST_RESOURCE_TEXT_PUBLIC)) {
- HDprintf("* ros3 setup failed (text_public) ! *\n");
+ printf("* ros3 setup failed (text_public) ! *\n");
return 1;
}
if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_h5_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
(const char *)s3_test_bucket_url,
(const char *)S3_TEST_RESOURCE_H5_PUBLIC)) {
- HDprintf("* ros3 setup failed (h5_public) ! *\n");
+ printf("* ros3 setup failed (h5_public) ! *\n");
return 1;
}
if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s",
(const char *)s3_test_bucket_url,
(const char *)S3_TEST_RESOURCE_MISSING)) {
- HDprintf("* ros3 setup failed (missing) ! *\n");
+ printf("* ros3 setup failed (missing) ! *\n");
return 1;
}
@@ -1836,17 +1836,17 @@ main(void)
nerrors += test_H5F_integration();
if (nerrors > 0) {
- HDprintf("***** %d ros3 TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("***** %d ros3 TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
nerrors = 1;
}
else {
- HDprintf("All ros3 tests passed.\n");
+ printf("All ros3 tests passed.\n");
}
return nerrors; /* 0 if no errors, 1 if any errors */
#else
- HDprintf("SKIPPED - read-only S3 VFD not built\n");
+ printf("SKIPPED - read-only S3 VFD not built\n");
return EXIT_SUCCESS;
#endif /* H5_HAVE_ROS3_VFD */
diff --git a/test/s3comms.c b/test/s3comms.c
index 45978fb..f3181db 100644
--- a/test/s3comms.c
+++ b/test/s3comms.c
@@ -96,7 +96,7 @@
*/
#define JSFAILED_AT() \
{ \
- HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
+ printf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
}
/*----------------------------------------------------------------------------
@@ -185,10 +185,10 @@ static inline void
jserr_long(long expected, long actual, const char *reason)
{
if (reason != NULL) {
- HDprintf("%s\n", reason);
+ printf("%s\n", reason);
}
else {
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
+ printf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
}
}
@@ -230,10 +230,10 @@ static inline void
jserr_str(const char *expected, const char *actual, const char *reason)
{
if (reason != NULL) {
- HDprintf("%s\n", reason);
+ printf("%s\n", reason);
}
else {
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
+ printf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
}
}
@@ -535,7 +535,7 @@ test_aws_canonical_request(void)
/* create HTTP request object with given verb, resource/path
*/
hrb = H5FD_s3comms_hrb_init_request(C->verb, C->resource, "HTTP/1.1");
- HDassert(hrb->body == NULL);
+ assert(hrb->body == NULL);
/* Create headers list from test case input
*/
@@ -557,9 +557,9 @@ test_aws_canonical_request(void)
while (node != NULL) {
FAIL_IF(FAIL == H5FD_s3comms_hrb_node_set(&node, node->name, NULL));
}
- HDassert(NULL == node);
+ assert(NULL == node);
FAIL_IF(FAIL == H5FD_s3comms_hrb_destroy(&hrb));
- HDassert(NULL == hrb);
+ assert(NULL == hrb);
} /* for each test case */
@@ -580,7 +580,7 @@ test_aws_canonical_request(void)
"signed headers destination cannot be null")
FAIL_IF(FAIL == H5FD_s3comms_hrb_destroy(&hrb))
- HDassert(NULL == hrb);
+ assert(NULL == hrb);
PASSED();
return 0;
@@ -590,7 +590,7 @@ error:
if (node != NULL) {
while (node != NULL)
(void)H5FD_s3comms_hrb_node_set(&node, node->name, NULL);
- HDassert(node == NULL);
+ assert(node == NULL);
}
if (hrb != NULL) {
(void)H5FD_s3comms_hrb_destroy(&hrb);
@@ -1271,8 +1271,8 @@ test_HMAC_SHA256(void)
dest = NULL;
}
else {
- dest = (char *)HDmalloc(sizeof(char) * cases[i].dest_size);
- HDassert(dest != NULL);
+ dest = (char *)malloc(sizeof(char) * cases[i].dest_size);
+ assert(dest != NULL);
}
JSVERIFY(
@@ -1284,10 +1284,10 @@ test_HMAC_SHA256(void)
if (0 != HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) {
/* print out how wrong things are, and then fail
*/
- dest = (char *)HDrealloc(dest, cases[i].dest_size + 1);
- HDassert(dest != NULL);
+ dest = (char *)realloc(dest, cases[i].dest_size + 1);
+ assert(dest != NULL);
dest[cases[i].dest_size] = 0;
- HDfprintf(stdout, "ERROR:\n!!! \"%s\"\n != \"%s\"\n", cases[i].exp, dest);
+ fprintf(stdout, "ERROR:\n!!! \"%s\"\n != \"%s\"\n", cases[i].exp, dest);
TEST_ERROR;
}
#else /* VERBOSE not defined */
@@ -1296,14 +1296,14 @@ test_HMAC_SHA256(void)
JSVERIFY(0, HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL);
#endif /* VERBOSE */
}
- HDfree(dest);
+ free(dest);
}
PASSED();
return 0;
error:
- HDfree(dest);
+ free(dest);
return -1;
} /* end test_HMAC_SHA256() */
@@ -1365,13 +1365,13 @@ test_nlowercase(void)
TESTING("nlowercase");
for (i = 0; i < n_cases; i++) {
- dest = (char *)HDmalloc(sizeof(char) * 16);
+ dest = (char *)malloc(sizeof(char) * 16);
JSVERIFY(SUCCEED, H5FD_s3comms_nlowercase(dest, cases[i].in, cases[i].len), cases[i].in)
if (cases[i].len > 0) {
JSVERIFY(0, HDstrncmp(dest, cases[i].exp, cases[i].len), NULL)
}
- HDfree(dest);
+ free(dest);
} /* end for each testcase */
JSVERIFY(FAIL, H5FD_s3comms_nlowercase(NULL, cases[0].in, cases[0].len), "null destination should fail")
@@ -1380,7 +1380,7 @@ test_nlowercase(void)
return 0;
error:
- HDfree(dest);
+ free(dest);
return -1;
} /* end test_nlowercase() */
@@ -1606,7 +1606,7 @@ test_parse_url(void)
*********/
for (i = 0; i < ncases; i++) {
- HDassert(purl == NULL);
+ assert(purl == NULL);
JSVERIFY(cases[i].exp_ret, H5FD_s3comms_parse_url(cases[i].url, &purl), cases[i].msg)
@@ -1779,7 +1779,7 @@ test_s3r_get_filesize(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -1837,13 +1837,13 @@ test_s3r_open(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
HDputs(" s3 credentials are not loaded");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -1913,7 +1913,7 @@ test_s3r_open(void)
*************************/
#if S3_TEST_RUN_TIMEOUT
- HDprintf("Opening on inactive port may hang for a minute; waiting for timeout\n");
+ printf("Opening on inactive port may hang for a minute; waiting for timeout\n");
handle = H5FD_s3comms_s3r_open(url_raven_badport, NULL, NULL, NULL);
FAIL_IF(handle != NULL);
#endif
@@ -2041,7 +2041,7 @@ test_s3r_read(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
}
@@ -2219,8 +2219,8 @@ test_signing_key(void)
TESTING("signing_key");
for (i = 0; i < ncases; i++) {
- key = (unsigned char *)HDmalloc(sizeof(unsigned char) * SHA256_DIGEST_LENGTH);
- HDassert(key != NULL);
+ key = (unsigned char *)malloc(sizeof(unsigned char) * SHA256_DIGEST_LENGTH);
+ assert(key != NULL);
JSVERIFY(SUCCEED, H5FD_s3comms_signing_key(key, cases[i].secret_key, cases[i].region, cases[i].when),
NULL)
@@ -2228,7 +2228,7 @@ test_signing_key(void)
JSVERIFY(0, HDstrncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
(const char *)cases[i].exp)
- HDfree(key);
+ free(key);
key = NULL;
}
@@ -2236,8 +2236,8 @@ test_signing_key(void)
* ERROR CASES *
***************/
- key = (unsigned char *)HDmalloc(sizeof(unsigned char) * SHA256_DIGEST_LENGTH);
- HDassert(key != NULL);
+ key = (unsigned char *)malloc(sizeof(unsigned char) * SHA256_DIGEST_LENGTH);
+ assert(key != NULL);
JSVERIFY(FAIL, H5FD_s3comms_signing_key(NULL, cases[0].secret_key, cases[0].region, cases[0].when),
"destination cannot be NULL")
@@ -2251,7 +2251,7 @@ test_signing_key(void)
JSVERIFY(FAIL, H5FD_s3comms_signing_key(key, cases[0].secret_key, cases[0].region, NULL),
"time string cannot be NULL")
- HDfree(key);
+ free(key);
key = NULL;
PASSED();
@@ -2259,7 +2259,7 @@ test_signing_key(void)
error:
if (key != NULL) {
- HDfree(key);
+ free(key);
}
return -1;
@@ -2399,9 +2399,9 @@ test_trim(void)
TESTING("s3comms trim");
for (i = 0; i < n_cases; i++) {
- HDassert(str == NULL);
- str = (char *)HDmalloc(sizeof(char) * cases[i].in_len);
- HDassert(str != NULL);
+ assert(str == NULL);
+ str = (char *)malloc(sizeof(char) * cases[i].in_len);
+ assert(str != NULL);
HDstrncpy(str, cases[i].in, cases[i].in_len);
JSVERIFY(SUCCEED, H5FD_s3comms_trim(dest, str, cases[i].in_len, &dest_len), NULL)
@@ -2409,7 +2409,7 @@ test_trim(void)
if (dest_len > 0) {
JSVERIFY(0, HDstrncmp(cases[i].exp, dest, dest_len), cases[i].exp)
}
- HDfree(str);
+ free(str);
str = NULL;
} /* end for each testcase */
@@ -2417,12 +2417,12 @@ test_trim(void)
"should not fail when trimming a null string");
JSVERIFY(0, dest_len, "trimming NULL string writes 0 characters")
- HDassert(str == NULL);
- str = (char *)HDmalloc(sizeof(char *) * 11);
- HDassert(str != NULL);
- HDmemcpy(str, "some text ", 11); /* string with null terminator */
+ assert(str == NULL);
+ str = (char *)malloc(sizeof(char *) * 11);
+ assert(str != NULL);
+ memcpy(str, "some text ", 11); /* string with null terminator */
JSVERIFY(FAIL, H5FD_s3comms_trim(NULL, str, 10, &dest_len), "destination for trim cannot be NULL");
- HDfree(str);
+ free(str);
str = NULL;
PASSED();
@@ -2430,7 +2430,7 @@ test_trim(void)
error:
if (str != NULL) {
- HDfree(str);
+ free(str);
}
return -1;
@@ -2514,7 +2514,7 @@ test_uriencode(void)
for (i = 0; i < ncases; i++) {
str_len = cases[i].s_len;
- dest = (char *)HDmalloc(sizeof(char) * str_len * 3 + 1);
+ dest = (char *)malloc(sizeof(char) * str_len * 3 + 1);
FAIL_IF(dest == NULL)
JSVERIFY(SUCCEED,
@@ -2523,7 +2523,7 @@ test_uriencode(void)
JSVERIFY(HDstrlen(cases[i].expected), dest_written, NULL)
JSVERIFY(0, HDstrncmp(dest, cases[i].expected, dest_written), cases[i].expected);
- HDfree(dest);
+ free(dest);
dest = NULL;
} /* end for each testcase */
@@ -2531,15 +2531,15 @@ test_uriencode(void)
* ERROR CASES *
***************/
- dest = (char *)HDmalloc(sizeof(char) * 15);
- HDassert(dest != NULL);
+ dest = (char *)malloc(sizeof(char) * 15);
+ assert(dest != NULL);
JSVERIFY(FAIL, H5FD_s3comms_uriencode(NULL, "word$", 5, FALSE, &dest_written),
"destination cannot be NULL");
JSVERIFY(FAIL, H5FD_s3comms_uriencode(dest, NULL, 5, FALSE, &dest_written),
"source string cannot be NULL");
- HDfree(dest);
+ free(dest);
dest = NULL;
PASSED();
@@ -2547,7 +2547,7 @@ test_uriencode(void)
error:
if (dest != NULL) {
- HDfree(dest);
+ free(dest);
}
return -1;
@@ -2583,7 +2583,7 @@ main(void)
#endif /* H5_HAVE_ROS3_VFD */
- HDprintf("Testing S3Communications functionality.\n");
+ printf("Testing S3Communications functionality.\n");
#ifdef H5_HAVE_ROS3_VFD
@@ -2606,8 +2606,8 @@ main(void)
bucket_url_env = HDgetenv("HDF5_ROS3_TEST_BUCKET_URL");
if (bucket_url_env == NULL || bucket_url_env[0] == '\0') {
- HDprintf("WARNING: S3 bucket url is not defined in environment "
- "variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
+ printf("WARNING: S3 bucket url is not defined in environment "
+ "variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
}
else {
HDstrncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
@@ -2633,17 +2633,17 @@ main(void)
nerrors += test_s3r_read() < 0 ? 1 : 0;
if (nerrors) {
- HDprintf("***** %d S3comms TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("***** %d S3comms TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
return 1;
}
- HDprintf("All S3comms tests passed.\n");
+ printf("All S3comms tests passed.\n");
return 0;
#else
- HDprintf("SKIPPED - read-only S3 VFD not built\n");
+ printf("SKIPPED - read-only S3 VFD not built\n");
return EXIT_SUCCESS;
#endif /* H5_HAVE_ROS3_VFD */
diff --git a/test/select_io_dset.c b/test/select_io_dset.c
index 0724365..29e6987 100644
--- a/test/select_io_dset.c
+++ b/test/select_io_dset.c
@@ -178,7 +178,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf));
+ memcpy(wbuf_bak, wbuf, sizeof(wbuf));
/* Write data to the dataset with/without data transform */
if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, wbuf) < 0)
@@ -186,7 +186,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf));
+ memcpy(wbuf, wbuf_bak, sizeof(wbuf));
/* Read data from the dataset without data transform set in dxpl */
if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, ntrans_dxpl, rbuf) < 0)
@@ -196,8 +196,8 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
for (i = 0; i < DSET_SELECT_DIM; i++)
if (rbuf[i] != (dtrans ? trans_wbuf[i] : wbuf[i])) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
@@ -211,8 +211,8 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
for (i = 0; i < DSET_SELECT_DIM; i++)
if (rbuf[i] != (2 * trans_wbuf[i])) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
}
@@ -268,11 +268,11 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
char *rbuf = NULL;
char dset_name[DSET_NAME_LEN];
- if ((wbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
+ if ((wbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
FAIL_STACK_ERROR;
- if (mwbuf && (wbuf_bak = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
+ if (mwbuf && (wbuf_bak = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
FAIL_STACK_ERROR;
- if ((rbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
+ if ((rbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
FAIL_STACK_ERROR;
/* Create dataset transfer property list */
@@ -318,7 +318,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, (size_t)(4 * DSET_SELECT_DIM));
+ memcpy(wbuf_bak, wbuf, (size_t)(4 * DSET_SELECT_DIM));
/* Write the data to the dataset with little endian */
if (H5Dwrite(did, H5T_STD_I32LE, H5S_ALL, H5S_ALL, dxpl, wbuf) < 0)
@@ -326,7 +326,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, (size_t)(4 * DSET_SELECT_DIM));
+ memcpy(wbuf, wbuf_bak, (size_t)(4 * DSET_SELECT_DIM));
/* Read the data from the dataset with little endian */
if (H5Dread(did, H5T_STD_I32LE, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
@@ -337,8 +337,8 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (rbuf[4 * i + 0] != wbuf[4 * i + 0] || rbuf[4 * i + 1] != wbuf[4 * i + 1] ||
rbuf[4 * i + 2] != wbuf[4 * i + 2] || rbuf[4 * i + 3] != wbuf[4 * i + 3]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
@@ -351,8 +351,8 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (rbuf[4 * i + 0] != wbuf[4 * i + 3] || rbuf[4 * i + 1] != wbuf[4 * i + 2] ||
rbuf[4 * i + 2] != wbuf[4 * i + 1] || rbuf[4 * i + 3] != wbuf[4 * i + 0]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
@@ -365,9 +365,9 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (H5Pclose(dxpl) < 0)
FAIL_STACK_ERROR;
- HDfree(wbuf);
- HDfree(wbuf_bak);
- HDfree(rbuf);
+ free(wbuf);
+ free(wbuf_bak);
+ free(rbuf);
PASSED();
@@ -384,11 +384,11 @@ error:
H5E_END_TRY;
if (wbuf)
- HDfree(wbuf);
+ free(wbuf);
if (wbuf_bak)
- HDfree(wbuf_bak);
+ free(wbuf_bak);
if (wbuf)
- HDfree(rbuf);
+ free(rbuf);
return FAIL;
@@ -468,7 +468,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf));
+ memcpy(wbuf_bak, wbuf, sizeof(wbuf));
/* Write data to the dataset with/without data transform set in dxpl */
if (H5Dwrite(did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, dxpl, wbuf) < 0)
@@ -476,7 +476,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf));
+ memcpy(wbuf, wbuf_bak, sizeof(wbuf));
/* Read the data from the dataset without data transform in dxpl */
if (H5Dread(did, H5T_NATIVE_LLONG, H5S_ALL, H5S_ALL, ntrans_dxpl, rbuf) < 0)
@@ -486,8 +486,8 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
for (i = 0; i < DSET_SELECT_DIM; i++)
if (rbuf[i] != (long long)(dtrans ? trans_wbuf[i] : wbuf[i])) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
@@ -501,8 +501,8 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
for (i = 0; i < DSET_SELECT_DIM; i++)
if (rbuf[i] != (long long)(5 * (10 - trans_wbuf[i]))) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
}
@@ -611,7 +611,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf));
+ memcpy(wbuf_bak, wbuf, sizeof(wbuf));
/* Write data to the dataset with/without data transform in dxpl */
if (H5Dwrite(did, H5T_NATIVE_SHORT, H5S_ALL, H5S_ALL, dxpl, wbuf) < 0)
@@ -619,7 +619,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf));
+ memcpy(wbuf, wbuf_bak, sizeof(wbuf));
/* Read data from the dataset without data transform in dxpl */
if (H5Dread(did, H5T_NATIVE_SHORT, H5S_ALL, H5S_ALL, ntrans_dxpl, rbuf) < 0)
@@ -629,8 +629,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
for (i = 0; i < DSET_SELECT_DIM; i++)
if (rbuf[i] != (dtrans ? trans_wbuf[i] : wbuf[i])) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
@@ -644,8 +644,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
for (i = 0; i < DSET_SELECT_DIM; i++)
if (rbuf[i] != (2 * (10 + trans_wbuf[i]))) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
}
@@ -737,17 +737,17 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
/* Allocate buffers for datasets */
- if (NULL == (s1_wbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM)))
+ if (NULL == (s1_wbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM)))
FAIL_STACK_ERROR;
- if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM)))
+ if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM)))
FAIL_STACK_ERROR;
- if (NULL == (s1_rbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM)))
+ if (NULL == (s1_rbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM)))
FAIL_STACK_ERROR;
- if (NULL == (s2_wbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM)))
+ if (NULL == (s2_wbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM)))
FAIL_STACK_ERROR;
- if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM)))
+ if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM)))
FAIL_STACK_ERROR;
- if (NULL == (s2_rbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM)))
+ if (NULL == (s2_rbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM)))
FAIL_STACK_ERROR;
/* Create the memory data type */
@@ -793,7 +793,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
/* Write all the data to the dataset */
if (H5Dwrite(did, s1_tid, H5S_ALL, H5S_ALL, dxpl, s1_wbuf) < 0)
@@ -801,7 +801,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
/* Read all the data from the dataset */
if (H5Dread(did, s1_tid, H5S_ALL, H5S_ALL, dxpl, s1_rbuf) < 0)
@@ -812,8 +812,8 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (s1_wbuf[i].a != s1_rbuf[i].a || s1_wbuf[i].b != s1_rbuf[i].b || s1_wbuf[i].c != s1_rbuf[i].c ||
s1_wbuf[i].d != s1_rbuf[i].d) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
}
@@ -839,7 +839,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
/* Write s1_wbuf to the dataset with only subset members in ss_tid */
if (H5Dwrite(did, ss_ac_tid, H5S_ALL, H5S_ALL, dxpl, s1_wbuf) < 0)
@@ -847,7 +847,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
/* Read the whole compound back */
if (H5Dread(did, ss_ac_tid, H5S_ALL, H5S_ALL, dxpl, s1_rbuf) < 0)
@@ -858,8 +858,8 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (s1_rbuf[i].a != s1_wbuf[i].a || s1_rbuf[i].b != ((4 * i) + 1) || s1_rbuf[i].c != s1_wbuf[i].c ||
s1_rbuf[i].d != ((4 * i) + 3)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
}
@@ -893,8 +893,8 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
s1_rbuf[i].c != ((4 * i) + DSET_SELECT_DIM + 2) ||
s1_rbuf[i].d != ((4 * i) + (2 * DSET_SELECT_DIM) + 3)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
}
@@ -925,14 +925,14 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s2_wbuf_bak, s2_wbuf, sizeof(s2_t) * DSET_SELECT_DIM);
+ memcpy(s2_wbuf_bak, s2_wbuf, sizeof(s2_t) * DSET_SELECT_DIM);
if (H5Dwrite(did, s2_tid, H5S_ALL, H5S_ALL, dxpl, s2_wbuf) < 0)
FAIL_STACK_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s2_wbuf, s2_wbuf_bak, sizeof(s2_t) * DSET_SELECT_DIM);
+ memcpy(s2_wbuf, s2_wbuf_bak, sizeof(s2_t) * DSET_SELECT_DIM);
/* Read it back */
if (H5Dread(did, s2_tid, H5S_ALL, H5S_ALL, dxpl, s2_rbuf) < 0) {
@@ -944,8 +944,8 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (s2_wbuf[i].a != s2_rbuf[i].a || s2_wbuf[i].b != s2_rbuf[i].b || s2_wbuf[i].c != s2_rbuf[i].c ||
s2_wbuf[i].d != s2_rbuf[i].d) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
}
}
@@ -968,12 +968,12 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
/* Release buffers */
- HDfree(s1_wbuf);
- HDfree(s1_wbuf_bak);
- HDfree(s1_rbuf);
- HDfree(s2_wbuf);
- HDfree(s2_wbuf_bak);
- HDfree(s2_rbuf);
+ free(s1_wbuf);
+ free(s1_wbuf_bak);
+ free(s1_rbuf);
+ free(s2_wbuf);
+ free(s2_wbuf_bak);
+ free(s2_rbuf);
PASSED();
@@ -994,17 +994,17 @@ error:
H5E_END_TRY;
if (s1_wbuf)
- HDfree(s1_wbuf);
+ free(s1_wbuf);
if (s1_wbuf_bak)
- HDfree(s1_wbuf_bak);
+ free(s1_wbuf_bak);
if (s1_rbuf)
- HDfree(s1_rbuf);
+ free(s1_rbuf);
if (s2_wbuf)
- HDfree(s2_wbuf);
+ free(s2_wbuf);
if (s2_wbuf_bak)
- HDfree(s2_wbuf_bak);
+ free(s2_wbuf_bak);
if (s2_rbuf)
- HDfree(s2_rbuf);
+ free(s2_rbuf);
return FAIL;
} /* test_cmpd_with_bkg() */
@@ -1116,24 +1116,24 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
buf_size = ndsets * DSET_SELECT_DIM * sizeof(int);
/* Allocate buffers for all datasets */
- if (NULL == (total_wbuf = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf = (int *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (mwbuf && NULL == (total_wbuf_bak = (int *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (total_wbuf_bak = (int *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_trans_wbuf = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_trans_wbuf = (int *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_rbuf = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_rbuf = (int *)malloc(buf_size)))
FAIL_STACK_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(long);
- if (NULL == (total_lwbuf = (long *)HDmalloc(buf_size)))
+ if (NULL == (total_lwbuf = (long *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (mwbuf && NULL == (total_lwbuf_bak = (long *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (total_lwbuf_bak = (long *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_trans_lwbuf = (long *)HDmalloc(buf_size)))
+ if (NULL == (total_trans_lwbuf = (long *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_lrbuf = (long *)HDmalloc(buf_size)))
+ if (NULL == (total_lrbuf = (long *)malloc(buf_size)))
FAIL_STACK_ERROR;
/* Initialize buffer indices */
@@ -1161,7 +1161,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(total_wbuf_bak, total_wbuf, ndsets * DSET_SELECT_DIM * sizeof(int));
/* Write data to the dataset with/without data transform */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1169,7 +1169,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(total_wbuf, total_wbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
/* Read data from the dataset (if dtrans, without data transform set in dxpl) */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, ntrans_dxpl, rbufs) < 0)
@@ -1180,8 +1180,8 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
for (j = 0; j < DSET_SELECT_DIM; j++)
if (rbufi[i][j] != (dtrans ? trans_wbufi[i][j] : wbufi[i][j])) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
@@ -1196,8 +1196,8 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
for (j = 0; j < DSET_SELECT_DIM; j++)
if (rbufi[i][j] != (2 * trans_wbufi[i][j])) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
}
@@ -1226,7 +1226,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_lwbuf_bak, total_lwbuf, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(total_lwbuf_bak, total_lwbuf, ndsets * DSET_SELECT_DIM * sizeof(long));
/* Write data to the dataset with/without data transform */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1234,7 +1234,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_lwbuf, total_lwbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(total_lwbuf, total_lwbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
/* Read data from the dataset (if dtrans, with data transform again in dxpl) */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -1244,8 +1244,8 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
for (j = 0; j < DSET_SELECT_DIM; j++) {
if (lrbufi[i][j] != (dtrans ? (2 * trans_lwbufi[i][j]) : lwbufi[i][j])) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
}
@@ -1267,14 +1267,14 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
FAIL_STACK_ERROR;
}
- HDfree(total_wbuf);
- HDfree(total_wbuf_bak);
- HDfree(total_rbuf);
- HDfree(total_trans_wbuf);
- HDfree(total_lwbuf);
- HDfree(total_lwbuf_bak);
- HDfree(total_lrbuf);
- HDfree(total_trans_lwbuf);
+ free(total_wbuf);
+ free(total_wbuf_bak);
+ free(total_rbuf);
+ free(total_trans_wbuf);
+ free(total_lwbuf);
+ free(total_lwbuf_bak);
+ free(total_lrbuf);
+ free(total_trans_lwbuf);
PASSED();
@@ -1293,21 +1293,21 @@ error:
H5E_END_TRY;
if (total_wbuf)
- HDfree(total_wbuf);
+ free(total_wbuf);
if (total_wbuf_bak)
- HDfree(total_wbuf_bak);
+ free(total_wbuf_bak);
if (total_trans_wbuf)
- HDfree(total_trans_wbuf);
+ free(total_trans_wbuf);
if (total_rbuf)
- HDfree(total_rbuf);
+ free(total_rbuf);
if (total_lwbuf)
- HDfree(total_lwbuf);
+ free(total_lwbuf);
if (total_lwbuf_bak)
- HDfree(total_lwbuf_bak);
+ free(total_lwbuf_bak);
if (total_lrbuf)
- HDfree(total_lrbuf);
+ free(total_lrbuf);
if (total_trans_lwbuf)
- HDfree(total_lrbuf);
+ free(total_lrbuf);
return FAIL;
@@ -1446,18 +1446,18 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
s2_buf_size = ndsets * DSET_SELECT_DIM * sizeof(s2_t);
/* Allocate buffers */
- if (NULL == (total_wbuf = (s1_t *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf = (s1_t *)malloc(buf_size)))
TEST_ERROR;
- if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)malloc(buf_size)))
TEST_ERROR;
- if (NULL == (total_rbuf = (s1_t *)HDmalloc(buf_size)))
+ if (NULL == (total_rbuf = (s1_t *)malloc(buf_size)))
TEST_ERROR;
- if (NULL == (s2_total_wbuf = (s2_t *)HDmalloc(s2_buf_size)))
+ if (NULL == (s2_total_wbuf = (s2_t *)malloc(s2_buf_size)))
TEST_ERROR;
- if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)HDmalloc(s2_buf_size)))
+ if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)malloc(s2_buf_size)))
TEST_ERROR;
- if (NULL == (s2_total_rbuf = (s2_t *)HDmalloc(s2_buf_size)))
+ if (NULL == (s2_total_rbuf = (s2_t *)malloc(s2_buf_size)))
TEST_ERROR;
/* Initialize buffer indices */
@@ -1486,14 +1486,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
TEST_ERROR;
@@ -1504,8 +1504,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (wbufi[i][j].a != rbufi[i][j].a || wbufi[i][j].b != rbufi[i][j].b ||
wbufi[i][j].c != rbufi[i][j].c || wbufi[i][j].d != rbufi[i][j].d) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
}
@@ -1545,14 +1545,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
TEST_ERROR;
@@ -1564,8 +1564,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (wbufi[i][j].a != rbufi[i][j].a || ((4 * (int)j) + 1) != rbufi[i][j].b ||
wbufi[i][j].c != rbufi[i][j].c || ((4 * (int)j) + 3) != rbufi[i][j].d) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
}
@@ -1574,8 +1574,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if ((4 * (int)j) != rbufi[i][j].a || ((4 * (int)j) + 1) != rbufi[i][j].b ||
((4 * (int)j) + 2) != rbufi[i][j].c || ((4 * (int)j) + 3) != rbufi[i][j].d) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
}
@@ -1630,8 +1630,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (wbufi[0][j].a != rbufi[0][j].a || ((4 * (int)j) + 1) != rbufi[0][j].b ||
wbufi[0][j].c != rbufi[0][j].c || ((4 * (int)j) + 3) != rbufi[0][j].d) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset0 at index %d\n", j);
+ printf(" Read different values than written.\n");
+ printf(" For dset0 at index %d\n", j);
TEST_ERROR;
}
@@ -1641,8 +1641,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
rbufi[mm][j].b != ((4 * (int)j) + 1) || rbufi[mm][j].c != ((4 * (int)j) + 2) ||
rbufi[mm][j].d != ((4 * (int)j) + (2 * DSET_SELECT_DIM) + 3)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset1 at index %d\n", j);
+ printf(" Read different values than written.\n");
+ printf(" For dset1 at index %d\n", j);
TEST_ERROR;
}
@@ -1655,8 +1655,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (rbufi[i][j].a != (4 * (int)j) || rbufi[i][j].b != ((4 * (int)j) + 1) ||
rbufi[i][j].c != ((4 * (int)j) + 2) || rbufi[i][j].d != ((4 * (int)j) + 3)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
}
@@ -1703,14 +1703,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s2_total_wbuf_bak, s2_total_wbuf, s2_buf_size);
+ memcpy(s2_total_wbuf_bak, s2_total_wbuf, s2_buf_size);
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s2_total_wbuf, s2_total_wbuf_bak, s2_buf_size);
+ memcpy(s2_total_wbuf, s2_total_wbuf_bak, s2_buf_size);
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
TEST_ERROR;
@@ -1721,8 +1721,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (s2_wbufi[i][j].a != s2_rbufi[i][j].a || s2_wbufi[i][j].b != s2_rbufi[i][j].b ||
s2_wbufi[i][j].c != s2_rbufi[i][j].c || s2_wbufi[i][j].d != s2_rbufi[i][j].d) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
@@ -1740,12 +1740,12 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
}
- HDfree(total_wbuf);
- HDfree(total_wbuf_bak);
- HDfree(total_rbuf);
- HDfree(s2_total_wbuf);
- HDfree(s2_total_wbuf_bak);
- HDfree(s2_total_rbuf);
+ free(total_wbuf);
+ free(total_wbuf_bak);
+ free(total_rbuf);
+ free(s2_total_wbuf);
+ free(s2_total_wbuf_bak);
+ free(s2_total_rbuf);
PASSED();
@@ -1763,17 +1763,17 @@ error:
H5E_END_TRY;
if (total_wbuf)
- HDfree(total_wbuf);
+ free(total_wbuf);
if (total_wbuf_bak)
- HDfree(total_wbuf_bak);
+ free(total_wbuf_bak);
if (total_rbuf)
- HDfree(total_rbuf);
+ free(total_rbuf);
if (s2_total_wbuf)
- HDfree(s2_total_wbuf);
+ free(s2_total_wbuf);
if (s2_total_wbuf_bak)
- HDfree(s2_total_wbuf_bak);
+ free(s2_total_wbuf_bak);
if (s2_total_rbuf)
- HDfree(s2_total_rbuf);
+ free(s2_total_rbuf);
return FAIL;
@@ -1882,11 +1882,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
buf_size = ndsets * ss * DSET_SELECT_DIM;
/* Allocate buffers for all datasets */
- if (NULL == (total_wbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf = (uint8_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_wbuf_bak = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf_bak = (uint8_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_rbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_rbuf = (uint8_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
/* Initialize buffer indices */
@@ -1913,7 +1913,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
/* Write data to the dataset */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1921,7 +1921,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
/* Read data from the dataset */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -1937,8 +1937,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
rbufi[i][(int)ss * j + 2] != wbufi[i][(int)ss * j + 2] ||
rbufi[i][(int)ss * j + 3] != wbufi[i][(int)ss * j + 3]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
}
@@ -1949,11 +1949,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
buf_size = ndsets * (ss * DSET_SELECT_DIM);
/* Allocate buffers for all datasets */
- if (NULL == (total_lwbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_lwbuf = (uint8_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_lwbuf_bak = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_lwbuf_bak = (uint8_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_lrbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_lrbuf = (uint8_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
/* Initialize buffer indices */
@@ -1984,7 +1984,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_lwbuf_bak, total_lwbuf, buf_size);
+ memcpy(total_lwbuf_bak, total_lwbuf, buf_size);
/* Write data to the dataset */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1992,7 +1992,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_lwbuf, total_lwbuf_bak, buf_size);
+ memcpy(total_lwbuf, total_lwbuf_bak, buf_size);
/* Read data from the dataset */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -2012,8 +2012,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
lrbufi[i][(int)ss * j + 6] != lwbufi[i][(int)ss * j + 6] ||
lrbufi[i][(int)ss * j + 7] != lwbufi[i][(int)ss * j + 7]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
}
@@ -2024,11 +2024,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
buf_size = ndsets * (ss * DSET_SELECT_DIM);
/* Allocate buffers for all datasets */
- if (NULL == (total_swbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_swbuf = (uint8_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_swbuf_bak = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_swbuf_bak = (uint8_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_srbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_srbuf = (uint8_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
/* Initialize buffer indices */
@@ -2053,7 +2053,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_swbuf_bak, total_swbuf, buf_size);
+ memcpy(total_swbuf_bak, total_swbuf, buf_size);
/* Write data to the dataset */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -2061,7 +2061,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_swbuf, total_swbuf_bak, buf_size);
+ memcpy(total_swbuf, total_swbuf_bak, buf_size);
/* Read data from the dataset */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -2074,8 +2074,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (srbufi[i][(int)ss * j + 0] != swbufi[i][(int)ss * j + 0] ||
srbufi[i][(int)ss * j + 1] != swbufi[i][(int)ss * j + 1]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
@@ -2093,15 +2093,15 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
}
- HDfree(total_wbuf);
- HDfree(total_wbuf_bak);
- HDfree(total_rbuf);
- HDfree(total_lwbuf);
- HDfree(total_lwbuf_bak);
- HDfree(total_lrbuf);
- HDfree(total_swbuf);
- HDfree(total_swbuf_bak);
- HDfree(total_srbuf);
+ free(total_wbuf);
+ free(total_wbuf_bak);
+ free(total_rbuf);
+ free(total_lwbuf);
+ free(total_lwbuf_bak);
+ free(total_lrbuf);
+ free(total_swbuf);
+ free(total_swbuf_bak);
+ free(total_srbuf);
PASSED();
@@ -2119,23 +2119,23 @@ error:
H5E_END_TRY;
if (total_wbuf)
- HDfree(total_wbuf);
+ free(total_wbuf);
if (total_wbuf_bak)
- HDfree(total_wbuf_bak);
+ free(total_wbuf_bak);
if (total_rbuf)
- HDfree(total_rbuf);
+ free(total_rbuf);
if (total_lwbuf)
- HDfree(total_lwbuf);
+ free(total_lwbuf);
if (total_lwbuf_bak)
- HDfree(total_lwbuf_bak);
+ free(total_lwbuf_bak);
if (total_lrbuf)
- HDfree(total_lrbuf);
+ free(total_lrbuf);
if (total_swbuf)
- HDfree(total_swbuf);
+ free(total_swbuf);
if (total_swbuf_bak)
- HDfree(total_swbuf_bak);
+ free(total_swbuf_bak);
if (total_srbuf)
- HDfree(total_srbuf);
+ free(total_srbuf);
return FAIL;
@@ -2363,49 +2363,49 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* DSET_WITH_NO_CONV */
buf_size = ndsets * DSET_SELECT_DIM * sizeof(int);
- if (NULL == (total_wbuf1 = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf1 = (int *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (mwbuf && NULL == (total_wbuf1_bak = (int *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (total_wbuf1_bak = (int *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (NULL == (total_rbuf1 = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_rbuf1 = (int *)malloc(buf_size)))
FAIL_STACK_ERROR;
/* DSET_WITH_CONV_AND_NO_BKG */
buf_size = ndsets * DSET_SELECT_DIM * sizeof(unsigned long);
- if (NULL == (ul_total_wbuf2 = (unsigned long *)HDmalloc(buf_size)))
+ if (NULL == (ul_total_wbuf2 = (unsigned long *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)malloc(buf_size)))
FAIL_STACK_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(long);
- if (NULL == (l_total_rbuf2 = (long *)HDmalloc(buf_size)))
+ if (NULL == (l_total_rbuf2 = (long *)malloc(buf_size)))
FAIL_STACK_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(long);
- if (NULL == (l_total_wbuf2 = (long *)HDmalloc(buf_size)))
+ if (NULL == (l_total_wbuf2 = (long *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)malloc(buf_size)))
FAIL_STACK_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(short);
- if (NULL == (s_total_rbuf2 = (short *)HDmalloc(buf_size)))
+ if (NULL == (s_total_rbuf2 = (short *)malloc(buf_size)))
FAIL_STACK_ERROR;
/* DSET_WITH_CONV_AND_BKG */
buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t);
- if (NULL == (s1_total_wbuf3 = (s1_t *)HDmalloc(buf_size)))
+ if (NULL == (s1_total_wbuf3 = (s1_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(s3_t);
- if (NULL == (s3_total_rbuf3 = (s3_t *)HDmalloc(buf_size)))
+ if (NULL == (s3_total_rbuf3 = (s3_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(s4_t);
- if (NULL == (s4_total_wbuf3 = (s4_t *)HDmalloc(buf_size)))
+ if (NULL == (s4_total_wbuf3 = (s4_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
- if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t);
- if (NULL == (s1_total_rbuf3 = (s1_t *)HDmalloc(buf_size)))
+ if (NULL == (s1_total_rbuf3 = (s1_t *)malloc(buf_size)))
FAIL_STACK_ERROR;
/* Test with s settings for ndsets */
@@ -2517,12 +2517,11 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbufs if the library will be modifying them */
if (mwbuf) {
- HDmemcpy(total_wbuf1_bak, total_wbuf1, ndsets * DSET_SELECT_DIM * sizeof(int));
- HDmemcpy(ul_total_wbuf2_bak, ul_total_wbuf2,
- ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
- HDmemcpy(l_total_wbuf2_bak, l_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(long));
- HDmemcpy(s1_total_wbuf3_bak, s1_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
- HDmemcpy(s4_total_wbuf3_bak, s4_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
+ memcpy(total_wbuf1_bak, total_wbuf1, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(ul_total_wbuf2_bak, ul_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
+ memcpy(l_total_wbuf2_bak, l_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(s1_total_wbuf3_bak, s1_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
+ memcpy(s4_total_wbuf3_bak, s4_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
}
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -2530,12 +2529,11 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbufs from backup if the library modified them */
if (mwbuf) {
- HDmemcpy(total_wbuf1, total_wbuf1_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
- HDmemcpy(ul_total_wbuf2, ul_total_wbuf2_bak,
- ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
- HDmemcpy(l_total_wbuf2, l_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
- HDmemcpy(s1_total_wbuf3, s1_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
- HDmemcpy(s4_total_wbuf3, s4_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
+ memcpy(total_wbuf1, total_wbuf1_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(ul_total_wbuf2, ul_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
+ memcpy(l_total_wbuf2, l_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(s1_total_wbuf3, s1_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
+ memcpy(s4_total_wbuf3, s4_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
}
if (H5Dread_multi(ndsets, dset_dids, r_mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -2550,8 +2548,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
for (j = 0; j < DSET_SELECT_DIM; j++)
if (rbufi1[i][j] != wbufi1[i][j]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
@@ -2562,8 +2560,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
for (j = 0; j < DSET_SELECT_DIM; j++)
if (l_rbufi2[i][j] != LONG_MAX) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
TEST_ERROR;
}
}
@@ -2571,8 +2569,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
for (j = 0; j < DSET_SELECT_DIM; j++)
if (s_rbufi2[i][j] != SHRT_MAX) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
}
}
@@ -2586,8 +2584,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
s3_rbufi3[i][j].c != s1_wbufi3[i][j].c ||
s3_rbufi3[i][j].d != s1_wbufi3[i][j].d) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
}
}
else if (s == SETTING_B) {
@@ -2597,8 +2595,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
s1_rbufi3[i][j].c != s1_wbufi3[i][j].c ||
s1_rbufi3[i][j].d != (DSET_SELECT_DIM + j)) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j);
}
}
@@ -2639,37 +2637,37 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
}
/* Freeing */
- HDfree(total_wbuf1);
+ free(total_wbuf1);
total_wbuf1 = NULL;
- HDfree(total_wbuf1_bak);
+ free(total_wbuf1_bak);
total_wbuf1_bak = NULL;
- HDfree(total_rbuf1);
+ free(total_rbuf1);
total_rbuf1 = NULL;
- HDfree(ul_total_wbuf2);
+ free(ul_total_wbuf2);
ul_total_wbuf2 = NULL;
- HDfree(ul_total_wbuf2_bak);
+ free(ul_total_wbuf2_bak);
ul_total_wbuf2_bak = NULL;
- HDfree(l_total_rbuf2);
+ free(l_total_rbuf2);
l_total_rbuf2 = NULL;
- HDfree(l_total_wbuf2);
+ free(l_total_wbuf2);
l_total_wbuf2 = NULL;
- HDfree(l_total_wbuf2_bak);
+ free(l_total_wbuf2_bak);
l_total_wbuf2_bak = NULL;
- HDfree(s_total_rbuf2);
+ free(s_total_rbuf2);
s_total_rbuf2 = NULL;
- HDfree(s1_total_wbuf3);
+ free(s1_total_wbuf3);
s1_total_wbuf3 = NULL;
- HDfree(s1_total_wbuf3_bak);
+ free(s1_total_wbuf3_bak);
s1_total_wbuf3_bak = NULL;
- HDfree(s3_total_rbuf3);
+ free(s3_total_rbuf3);
s3_total_rbuf3 = NULL;
- HDfree(s4_total_wbuf3);
+ free(s4_total_wbuf3);
s4_total_wbuf3 = NULL;
- HDfree(s4_total_wbuf3_bak);
+ free(s4_total_wbuf3_bak);
s4_total_wbuf3_bak = NULL;
- HDfree(s1_total_rbuf3);
+ free(s1_total_rbuf3);
s1_total_rbuf3 = NULL;
} /* end for n niter */
@@ -2693,37 +2691,37 @@ error:
H5E_END_TRY;
if (total_wbuf1)
- HDfree(total_wbuf1);
+ free(total_wbuf1);
if (total_wbuf1_bak)
- HDfree(total_wbuf1_bak);
+ free(total_wbuf1_bak);
if (total_rbuf1)
- HDfree(total_rbuf1);
+ free(total_rbuf1);
if (ul_total_wbuf2)
- HDfree(ul_total_wbuf2);
+ free(ul_total_wbuf2);
if (ul_total_wbuf2_bak)
- HDfree(ul_total_wbuf2_bak);
+ free(ul_total_wbuf2_bak);
if (l_total_rbuf2)
- HDfree(l_total_rbuf2);
+ free(l_total_rbuf2);
if (l_total_wbuf2)
- HDfree(l_total_wbuf2);
+ free(l_total_wbuf2);
if (l_total_wbuf2_bak)
- HDfree(l_total_wbuf2_bak);
+ free(l_total_wbuf2_bak);
if (s_total_rbuf2)
- HDfree(s_total_rbuf2);
+ free(s_total_rbuf2);
if (s1_total_wbuf3)
- HDfree(s1_total_wbuf3);
+ free(s1_total_wbuf3);
if (s1_total_wbuf3_bak)
- HDfree(s1_total_wbuf3_bak);
+ free(s1_total_wbuf3_bak);
if (s3_total_rbuf3)
- HDfree(s3_total_rbuf3);
+ free(s3_total_rbuf3);
if (s4_total_wbuf3)
- HDfree(s4_total_wbuf3);
+ free(s4_total_wbuf3);
if (s4_total_wbuf3_bak)
- HDfree(s4_total_wbuf3_bak);
+ free(s4_total_wbuf3_bak);
if (s1_total_rbuf3)
- HDfree(s1_total_rbuf3);
+ free(s1_total_rbuf3);
return FAIL;
@@ -2745,7 +2743,7 @@ test_set_get_select_io_mode(hid_t fid)
long wbuf[DSET_SELECT_DIM];
H5D_selection_io_mode_t selection_io_mode;
- HDprintf("\n");
+ printf("\n");
TESTING("H5Pget/set_selection_io_mode()");
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -3069,7 +3067,7 @@ test_get_no_selection_io_cause(const char *filename, hid_t fapl)
int errs = 0;
- HDprintf("\n");
+ printf("\n");
TESTING("H5Pget_no_selection_io_cause()");
errs += test_no_selection_io_cause_mode(filename, fapl, TEST_DISABLE_BY_API);
@@ -3088,7 +3086,7 @@ test_get_no_selection_io_cause(const char *filename, hid_t fapl)
#endif
if (errs) {
- HDprintf(" FAILED\n");
+ printf(" FAILED\n");
return FAIL;
}
else {
@@ -3265,16 +3263,16 @@ main(void)
goto error;
printf("\n===================================\n");
- HDprintf("All selection I/O dataset tests passed.\n");
+ printf("All selection I/O dataset tests passed.\n");
printf("===================================\n");
h5_cleanup(FILENAME, fapl);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
nerrors = MAX(1, nerrors);
- HDprintf("***** %d SELECTION I/O DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %d SELECTION I/O DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/set_extent.c b/test/set_extent.c
index f3281d0..910f07c 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -41,12 +41,12 @@ const char *FILENAME[] = {"set_extent1", "set_extent2", "set_extent3", "set_exte
#define FILL_VALUE (-1)
#define DO_RANKS_PRINT_CONFIG(TEST) \
{ \
- HDprintf(" Config:\n"); \
- HDprintf(" Test: %s\n", TEST); \
- HDprintf(" Compression: %s\n", (config & CONFIG_COMPRESS ? "yes" : "no")); \
- HDprintf(" Fill value: %s\n", (do_fillvalue ? "yes" : "no")); \
- HDprintf(" Early allocation: %s\n", (config & CONFIG_EARLY_ALLOC ? "yes" : "no")); \
- HDprintf(" Edge chunk filters: %s\n", (config & CONFIG_UNFILT_EDGE ? "disabled" : "enabled")); \
+ printf(" Config:\n"); \
+ printf(" Test: %s\n", TEST); \
+ printf(" Compression: %s\n", (config & CONFIG_COMPRESS ? "yes" : "no")); \
+ printf(" Fill value: %s\n", (do_fillvalue ? "yes" : "no")); \
+ printf(" Early allocation: %s\n", (config & CONFIG_EARLY_ALLOC ? "yes" : "no")); \
+ printf(" Edge chunk filters: %s\n", (config & CONFIG_UNFILT_EDGE ? "disabled" : "enabled")); \
} /* end DO_RANKS_PRINT_CONFIG */
#define RANK1 1
@@ -152,9 +152,9 @@ main(void)
for (chunk_cache = FALSE; chunk_cache <= TRUE; chunk_cache++) {
/* Output message about the type of format */
if (new_format)
- HDprintf("Testing with new file format");
+ printf("Testing with new file format");
else
- HDprintf("Testing with old file format");
+ printf("Testing with old file format");
/* Set the FAPL for the chunk cache settings */
if (chunk_cache) {
@@ -211,7 +211,7 @@ main(void)
error:
nerrors = MAX(1, nerrors);
- HDprintf("***** %d H5Dset_extent TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d H5Dset_extent TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return 1;
}
@@ -285,22 +285,22 @@ do_ranks(hid_t fapl, hbool_t new_format)
if (test_rank1(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 1")
- HDprintf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
+ printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
if (test_rank2(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2")
- HDprintf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
+ printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
if (test_rank3(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 3")
- HDprintf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
+ printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
if (test_rank2(fapl, dcpl, do_fillvalue, disable_edge_filters, TRUE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree")
- HDprintf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
+ printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
} /* end for */
@@ -340,9 +340,9 @@ do_ranks(hid_t fapl, hbool_t new_format)
/* Standard test */
if (test_random_rank4(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE, index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4")
- HDprintf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
- ? "btree"
- : (index_type == RANK4_INDEX_FARRAY ? "farray" : "earray"));
+ printf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
+ ? "btree"
+ : (index_type == RANK4_INDEX_FARRAY ? "farray" : "earray"));
goto error;
} /* end if */
@@ -351,10 +351,9 @@ do_ranks(hid_t fapl, hbool_t new_format)
if (test_random_rank4_vl(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE, index_type) <
0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 variable length")
- HDprintf(" Index: %s\n",
- index_type == RANK4_INDEX_BTREE
- ? "btree"
- : (index_type == RANK4_INDEX_FARRAY ? "farray" : "earray"));
+ printf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
+ ? "btree"
+ : (index_type == RANK4_INDEX_FARRAY ? "farray" : "earray"));
goto error;
} /* end if */
}
@@ -363,10 +362,9 @@ do_ranks(hid_t fapl, hbool_t new_format)
if (!(config & CONFIG_EARLY_ALLOC)) {
if (test_random_rank4(fapl, dcpl, do_fillvalue, disable_edge_filters, TRUE, index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 with sparse allocation")
- HDprintf(" Index: %s\n",
- index_type == RANK4_INDEX_BTREE
- ? "btree"
- : (index_type == RANK4_INDEX_FARRAY ? "farray" : "earray"));
+ printf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
+ ? "btree"
+ : (index_type == RANK4_INDEX_FARRAY ? "farray" : "earray"));
goto error;
} /* end if */
@@ -374,10 +372,10 @@ do_ranks(hid_t fapl, hbool_t new_format)
if (test_random_rank4_vl(fapl, dcpl, do_fillvalue, disable_edge_filters, TRUE,
index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 variable length with sparse allocation")
- HDprintf(" Index: %s\n",
- index_type == RANK4_INDEX_BTREE
- ? "btree"
- : (index_type == RANK4_INDEX_FARRAY ? "farray" : "earray"));
+ printf(" Index: %s\n",
+ index_type == RANK4_INDEX_BTREE
+ ? "btree"
+ : (index_type == RANK4_INDEX_FARRAY ? "farray" : "earray"));
goto error;
} /* end if */
}
@@ -545,10 +543,10 @@ test_rank1(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
TEST_ERROR;
#if defined(H5_SET_EXTENT_DEBUG)
- HDprintf("\n buf_o: ");
+ printf("\n buf_o: ");
for (i = 0; i < (int)dims_o[0]; i++)
- HDprintf("%d ", buf_o[i]);
- HDprintf("\n");
+ printf("%d ", buf_o[i]);
+ printf("\n");
#endif
if (H5Sclose(sid) < 0)
@@ -584,18 +582,18 @@ test_rank1(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
TEST_ERROR;
#if defined(H5_SET_EXTENT_DEBUG)
- HDprintf("\n buf_e: ");
+ printf("\n buf_e: ");
for (i = 0; i < (int)dims_r[0]; i++)
- HDprintf("%d ", buf_e[i]);
- HDprintf("\n");
+ printf("%d ", buf_e[i]);
+ printf("\n");
#endif
/* compare the read array with the expanded array */
for (i = 0; i < (int)dims_r[0]; i++)
if (i >= DIM0) {
if (buf_e[i] != comp_value) {
- HDprintf("buf_e[%d] = %d\n", i, buf_e[i]);
- HDprintf("expected = %d\n", comp_value);
+ printf("buf_e[%d] = %d\n", i, buf_e[i]);
+ printf("expected = %d\n", comp_value);
TEST_ERROR;
} /* end if */
} /* end if */
@@ -653,17 +651,17 @@ test_rank1(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
TEST_ERROR;
#if defined(H5_SET_EXTENT_DEBUG)
- HDprintf("\n dims_r: ");
+ printf("\n dims_r: ");
for (i = 0; i < (int)dims_r[0]; i++)
- HDprintf("%d ", buf_s[i]);
- HDprintf("\n");
+ printf("%d ", buf_s[i]);
+ printf("\n");
#endif
/* compare the read array with the shrunk array */
for (i = 0; i < (int)dims_r[0]; i++)
if (buf_s[i] != buf_o[i]) {
- HDprintf("buf_s[%d] = %d\n", i, buf_s[i]);
- HDprintf("buf_o[%d] = %d\n", i, buf_o[i]);
+ printf("buf_s[%d] = %d\n", i, buf_s[i]);
+ printf("buf_o[%d] = %d\n", i, buf_o[i]);
TEST_ERROR;
} /* end if */
@@ -697,18 +695,18 @@ test_rank1(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
TEST_ERROR;
#if defined(H5_SET_EXTENT_DEBUG)
- HDprintf("\n dims_r: ");
+ printf("\n dims_r: ");
for (i = 0; i < (int)dims_r[0]; i++)
- HDprintf("%d ", buf_r[i]);
- HDprintf("\n");
+ printf("%d ", buf_r[i]);
+ printf("\n");
#endif
/* compare the read array with the original array */
for (i = 0; i < (int)dims_r[0]; i++)
if (i >= DIMS0) {
if (buf_r[i] != comp_value) {
- HDprintf("buf_r[%d] = %d\n", i, buf_r[i]);
- HDprintf("expected = %d\n", comp_value);
+ printf("buf_r[%d] = %d\n", i, buf_r[i]);
+ printf("expected = %d\n", comp_value);
TEST_ERROR;
} /* end if */
} /* end if */
@@ -901,12 +899,12 @@ test_rank2(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
}
#if defined(H5_SET_EXTENT_DEBUG2)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_o[0]; i++) {
for (j = 0; j < (int)dims_o[1]; j++) {
- HDprintf("%d ", buf_o[i][j]);
+ printf("%d ", buf_o[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -959,12 +957,12 @@ test_rank2(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
TEST_ERROR;
#if defined(H5_SET_EXTENT_DEBUG2)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
- HDprintf("%d ", buf_e[i][j]);
+ printf("%d ", buf_e[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -973,8 +971,8 @@ test_rank2(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
for (j = 0; j < (int)dims_r[1]; j++) {
if (i >= DIM0 || j >= DIM1) {
if (buf_e[i][j] != comp_value) {
- HDprintf("buf_e[%d][%d] = %d\n", i, j, buf_e[i][j]);
- HDprintf("value = %d\n", comp_value);
+ printf("buf_e[%d][%d] = %d\n", i, j, buf_e[i][j]);
+ printf("value = %d\n", comp_value);
TEST_ERROR;
}
}
@@ -1056,12 +1054,12 @@ test_rank2(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
}
#if defined(H5_SET_EXTENT_DEBUG2)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
- HDprintf("%d ", buf_s[i][j]);
+ printf("%d ", buf_s[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -1069,8 +1067,8 @@ test_rank2(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
if (buf_s[i][j] != buf_o[i][j]) {
- HDprintf("buf_s[%d][%d] = %d\n", i, j, buf_s[i][j]);
- HDprintf("buf_o[%d][%d] = %d\n", i, j, buf_o[i][j]);
+ printf("buf_s[%d][%d] = %d\n", i, j, buf_s[i][j]);
+ printf("buf_o[%d][%d] = %d\n", i, j, buf_o[i][j]);
TEST_ERROR;
}
}
@@ -1123,12 +1121,12 @@ test_rank2(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
TEST_ERROR;
#if defined(H5_SET_EXTENT_DEBUG2)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
- HDprintf("%d ", buf_r[i][j]);
+ printf("%d ", buf_r[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -1137,8 +1135,8 @@ test_rank2(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
for (j = 0; j < (int)dims_r[1]; j++) {
if (i >= DIMS0 || j >= DIMS1) {
if (buf_r[i][j] != comp_value) {
- HDprintf("buf_r[%d][%d] = %d\n", i, j, buf_r[i][j]);
- HDprintf("value = %d\n", comp_value);
+ printf("buf_r[%d][%d] = %d\n", i, j, buf_r[i][j]);
+ printf("value = %d\n", comp_value);
TEST_ERROR;
}
}
@@ -1388,17 +1386,17 @@ test_rank3(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
}
#if defined(H5_SET_EXTENT_DEBUG3)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_o[0]; i++) {
for (j = 0; j < (int)dims_o[1]; j++) {
for (k = 0; k < (int)dims_o[2]; k++) {
- HDprintf("%d ", buf_o[i][j][k]);
+ printf("%d ", buf_o[i][j][k]);
}
- HDprintf("[%d] ", j);
+ printf("[%d] ", j);
}
- HDprintf("\n");
+ printf("\n");
}
- HDprintf("\n");
+ printf("\n");
#endif
if (H5Sclose(sid) < 0) {
@@ -1441,17 +1439,17 @@ test_rank3(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
TEST_ERROR;
#if defined(H5_SET_EXTENT_DEBUG3)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
for (k = 0; k < (int)dims_r[2]; k++) {
- HDprintf("%d ", buf_e[i][j][k]);
+ printf("%d ", buf_e[i][j][k]);
}
- HDprintf("[%d] ", j);
+ printf("[%d] ", j);
}
- HDprintf("\n");
+ printf("\n");
}
- HDprintf("\n");
+ printf("\n");
#endif
/* compare the read array with the expanded array */
@@ -1460,8 +1458,8 @@ test_rank3(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
for (k = 0; k < (int)dims_r[2]; k++) {
if (i >= DIM0 || j >= DIM1 || k >= DIM2) {
if (buf_e[i][j][k] != comp_value) {
- HDprintf("buf_e[%d][%d][%d] = %d\n", i, j, k, buf_e[i][j][k]);
- HDprintf("value = %d\n", comp_value);
+ printf("buf_e[%d][%d][%d] = %d\n", i, j, k, buf_e[i][j][k]);
+ printf("value = %d\n", comp_value);
TEST_ERROR;
}
}
@@ -1533,17 +1531,17 @@ test_rank3(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
}
#if defined(H5_SET_EXTENT_DEBUG3)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
for (k = 0; k < (int)dims_r[2]; k++) {
- HDprintf("%d ", buf_s[i][j][k]);
+ printf("%d ", buf_s[i][j][k]);
}
- HDprintf("[%d] ", j);
+ printf("[%d] ", j);
}
- HDprintf("\n");
+ printf("\n");
}
- HDprintf("\n");
+ printf("\n");
#endif
/* compare the read array with the shrunk array */
@@ -1551,8 +1549,8 @@ test_rank3(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
for (j = 0; j < (int)dims_r[1]; j++) {
for (k = 0; k < (int)dims_r[2]; k++) {
if (buf_s[i][j][k] != buf_o[i][j][k]) {
- HDprintf("buf_s[%d][%d][%d] = %d\n", i, j, k, buf_s[i][j][k]);
- HDprintf("buf_o[%d][%d][%d] = %d\n", i, j, k, buf_o[i][j][k]);
+ printf("buf_s[%d][%d][%d] = %d\n", i, j, k, buf_s[i][j][k]);
+ printf("buf_o[%d][%d][%d] = %d\n", i, j, k, buf_o[i][j][k]);
TEST_ERROR;
}
}
@@ -1594,18 +1592,18 @@ test_rank3(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
TEST_ERROR;
#if defined(H5_SET_EXTENT_DEBUG3)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
for (k = 0; k < (int)dims_r[2]; k++) {
- HDprintf("%d ", buf_r[i][j][k]);
+ printf("%d ", buf_r[i][j][k]);
}
- HDprintf("[%d] ", j);
+ printf("[%d] ", j);
}
- HDprintf("\n");
+ printf("\n");
}
- HDprintf("\n");
+ printf("\n");
#endif
/* compare the read array with the original array */
@@ -1614,8 +1612,8 @@ test_rank3(hid_t fapl, hid_t dcpl, hbool_t do_fill_value, hbool_t disable_edge_f
for (k = 0; k < (int)dims_r[2]; k++) {
if (i >= DIMS0 || j >= DIMS1 || k >= DIMS2) {
if (buf_r[i][j][k] != comp_value) {
- HDprintf("buf_r[%d][%d][%d] = %d\n", i, j, k, buf_r[i][j][k]);
- HDprintf("value = %d\n", comp_value);
+ printf("buf_r[%d][%d][%d] = %d\n", i, j, k, buf_r[i][j][k]);
+ printf("value = %d\n", comp_value);
TEST_ERROR;
}
}
@@ -1824,12 +1822,12 @@ test_external(hid_t fapl)
FAIL_STACK_ERROR;
#if defined(H5_SET_EXTENT_DEBUG)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_o[0]; i++) {
for (j = 0; j < (int)dims_o[1]; j++) {
- HDprintf("%d ", buf_ro[i][j]);
+ printf("%d ", buf_ro[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -1879,12 +1877,12 @@ test_external(hid_t fapl)
FAIL_STACK_ERROR;
#if defined(H5_SET_EXTENT_DEBUG)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
- HDprintf("%d ", buf_e[i][j]);
+ printf("%d ", buf_e[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -1893,8 +1891,8 @@ test_external(hid_t fapl)
for (j = 0; j < (int)dims_r[1]; j++) {
if (i >= DIM0 || j >= DIM1) {
if (buf_e[i][j] != comp_value) {
- HDprintf("buf_e[%d][%d] = %d\n", i, j, buf_e[i][j]);
- HDprintf("value = %d\n", comp_value);
+ printf("buf_e[%d][%d] = %d\n", i, j, buf_e[i][j]);
+ printf("value = %d\n", comp_value);
TEST_ERROR;
}
}
@@ -1947,12 +1945,12 @@ test_external(hid_t fapl)
FAIL_STACK_ERROR;
#if defined(H5_SET_EXTENT_DEBUG)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
- HDprintf("%d ", buf_s[i][j]);
+ printf("%d ", buf_s[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -1960,8 +1958,8 @@ test_external(hid_t fapl)
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
if (buf_s[i][j] != buf_o[i][j]) {
- HDprintf("buf_s[%d][%d] = %d\n", i, j, buf_s[i][j]);
- HDprintf("buf_o[%d][%d] = %d\n", i, j, buf_o[i][j]);
+ printf("buf_s[%d][%d] = %d\n", i, j, buf_s[i][j]);
+ printf("buf_o[%d][%d] = %d\n", i, j, buf_o[i][j]);
TEST_ERROR;
}
}
@@ -2075,12 +2073,12 @@ test_layouts(H5D_layout_t layout, hid_t fapl)
}
#if defined(H5_SET_EXTENT_DEBUG4)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_o[0]; i++) {
for (j = 0; j < (int)dims_o[1]; j++) {
- HDprintf("%d ", buf_o[i][j]);
+ printf("%d ", buf_o[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -2128,12 +2126,12 @@ test_layouts(H5D_layout_t layout, hid_t fapl)
TEST_ERROR;
#if defined(H5_SET_EXTENT_DEBUG4)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
- HDprintf("%d ", buf_r[i][j]);
+ printf("%d ", buf_r[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -2183,12 +2181,12 @@ test_layouts(H5D_layout_t layout, hid_t fapl)
}
#if defined(H5_SET_EXTENT_DEBUG4)
- HDprintf("\n");
+ printf("\n");
for (i = 0; i < (int)dims_r[0]; i++) {
for (j = 0; j < (int)dims_r[1]; j++) {
- HDprintf("%d ", buf_r[i][j]);
+ printf("%d ", buf_r[i][j]);
}
- HDprintf("\n");
+ printf("\n");
}
#endif
@@ -2272,11 +2270,11 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_
char filename[NAME_BUF_SIZE];
/* Initialize large arrays */
- if (NULL == (rbuf = HDcalloc(1, sizeof(*rbuf))))
+ if (NULL == (rbuf = calloc(1, sizeof(*rbuf))))
TEST_ERROR;
- if (NULL == (wbuf = HDcalloc(1, sizeof(*wbuf))))
+ if (NULL == (wbuf = calloc(1, sizeof(*wbuf))))
TEST_ERROR;
- if (NULL == (dim_log = HDcalloc(1, sizeof(*dim_log))))
+ if (NULL == (dim_log = calloc(1, sizeof(*dim_log))))
TEST_ERROR;
/* Create a new file */
@@ -2419,9 +2417,9 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_
if (H5Fclose(file) < 0)
TEST_ERROR;
- HDfree(rbuf);
- HDfree(wbuf);
- HDfree(dim_log);
+ free(rbuf);
+ free(wbuf);
+ free(dim_log);
return 0;
@@ -2436,9 +2434,9 @@ error:
}
H5E_END_TRY;
- HDfree(rbuf);
- HDfree(wbuf);
- HDfree(dim_log);
+ free(rbuf);
+ free(wbuf);
+ free(dim_log);
return -1;
} /* end test_random_rank4 */
@@ -2494,11 +2492,11 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
char filename[NAME_BUF_SIZE];
/* Initialize large arrays */
- if (NULL == (rbuf = HDcalloc(1, sizeof(*rbuf))))
+ if (NULL == (rbuf = calloc(1, sizeof(*rbuf))))
TEST_ERROR;
- if (NULL == (wbuf = HDcalloc(1, sizeof(*wbuf))))
+ if (NULL == (wbuf = calloc(1, sizeof(*wbuf))))
TEST_ERROR;
- if (NULL == (dim_log = HDcalloc(1, sizeof(*dim_log))))
+ if (NULL == (dim_log = calloc(1, sizeof(*dim_log))))
TEST_ERROR;
/* Initialize fill value buffers so they aren't freed in case of an error */
@@ -2521,7 +2519,7 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
for (k = 0; k < dims[2]; k++)
for (l = 0; l < dims[3]; l++) {
wbuf->arr[i][j][k][l].len = 2;
- if (NULL == (wbuf->arr[i][j][k][l].p = HDmalloc(2 * sizeof(int))))
+ if (NULL == (wbuf->arr[i][j][k][l].p = malloc(2 * sizeof(int))))
TEST_ERROR;
} /* end for */
@@ -2564,7 +2562,7 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
/* Create VL fill value, if requested */
if (do_fillvalue) {
fill_value.len = 2;
- if (NULL == (fill_value.p = HDmalloc(2 * sizeof(int))))
+ if (NULL == (fill_value.p = malloc(2 * sizeof(int))))
TEST_ERROR;
((int *)fill_value.p)[0] = 1;
((int *)fill_value.p)[1] = 2;
@@ -2690,7 +2688,7 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
TEST_ERROR;
if (H5Treclaim(type, mspace, H5P_DEFAULT, wbuf) < 0)
TEST_ERROR;
- HDfree(fill_value.p);
+ free(fill_value.p);
if (H5Sclose(mspace) < 0)
TEST_ERROR;
if (H5Pclose(my_dcpl) < 0)
@@ -2702,9 +2700,9 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
if (H5Fclose(file) < 0)
TEST_ERROR;
- HDfree(rbuf);
- HDfree(wbuf);
- HDfree(dim_log);
+ free(rbuf);
+ free(wbuf);
+ free(dim_log);
return 0;
@@ -2716,12 +2714,12 @@ error:
for (k = 0; k < dims[2]; k++)
for (l = 0; l < dims[3]; l++) {
if (rbuf->arr[i][j][k][l].p)
- HDfree(rbuf->arr[i][j][k][l].p);
+ free(rbuf->arr[i][j][k][l].p);
if (wbuf->arr[i][j][k][l].p)
- HDfree(wbuf->arr[i][j][k][l].p);
+ free(wbuf->arr[i][j][k][l].p);
} /* end for */
if (fill_value.p)
- HDfree(fill_value.p);
+ free(fill_value.p);
H5Sclose(fspace);
H5Sclose(mspace);
H5Pclose(dcpl);
@@ -2731,9 +2729,9 @@ error:
}
H5E_END_TRY;
- HDfree(rbuf);
- HDfree(wbuf);
- HDfree(dim_log);
+ free(rbuf);
+ free(wbuf);
+ free(dim_log);
return -1;
} /* end test_random_rank4_vl */
@@ -2747,12 +2745,12 @@ test_random_rank4_dump(unsigned ndim_sets, hsize_t dim_log[][4], hsize_t cdims[4
{
unsigned i;
- HDprintf(" Chunk dimensions: ( %u, %u, %u, %u )\n", (unsigned)cdims[0], (unsigned)cdims[1],
- (unsigned)cdims[2], (unsigned)cdims[3]);
- HDprintf(" Log of dataset dimensions (oldest first):\n");
+ printf(" Chunk dimensions: ( %u, %u, %u, %u )\n", (unsigned)cdims[0], (unsigned)cdims[1],
+ (unsigned)cdims[2], (unsigned)cdims[3]);
+ printf(" Log of dataset dimensions (oldest first):\n");
for (i = 0; i < ndim_sets; i++)
- HDprintf(" Iteration %-3u: ( %2u, %2u, %2u, %2u )\n", i, (unsigned)dim_log[i][0],
- (unsigned)dim_log[i][1], (unsigned)dim_log[i][2], (unsigned)dim_log[i][3]);
+ printf(" Iteration %-3u: ( %2u, %2u, %2u, %2u )\n", i, (unsigned)dim_log[i][0],
+ (unsigned)dim_log[i][1], (unsigned)dim_log[i][2], (unsigned)dim_log[i][3]);
if (j >= 0)
- HDprintf(" First incorrect value read: ( %d, %d, %d, %d )\n", j, k, l, m);
+ printf(" First incorrect value read: ( %d, %d, %d, %d )\n", j, k, l, m);
} /* end test_random_rank4_dump */
diff --git a/test/stab.c b/test/stab.c
index 8daf9cc..9e0b1a4 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -136,7 +136,7 @@ test_misc(hid_t fcpl, hid_t fapl, hbool_t new_format)
if (HDstrcmp(comment, "hello world") != 0) {
H5_FAILED();
HDputs(" Read the wrong comment string from the group.");
- HDprintf(" got: \"%s\"\n ans: \"hello world\"\n", comment);
+ printf(" got: \"%s\"\n ans: \"hello world\"\n", comment);
TEST_ERROR;
}
if (H5Gclose(g1) < 0)
@@ -214,7 +214,7 @@ test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Group names */
- name1 = (char *)HDmalloc((size_t)LONG_NAME_LEN);
+ name1 = (char *)malloc((size_t)LONG_NAME_LEN);
for (i = 0; i < LONG_NAME_LEN; i++)
name1[i] = (char)('A' + i % 26);
name1[LONG_NAME_LEN - 1] = '\0';
@@ -247,8 +247,8 @@ test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Release name buffers */
- HDfree(name2);
- HDfree(name1);
+ free(name2);
+ free(name1);
PASSED();
return 0;
@@ -259,8 +259,8 @@ error:
H5Gclose(g1);
H5Gclose(g2);
H5Fclose(fid);
- HDfree(name2);
- HDfree(name1);
+ free(name2);
+ free(name1);
}
H5E_END_TRY;
return 1;
@@ -669,9 +669,9 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Construct very long object name template */
- if (NULL == (objname = (char *)HDmalloc((size_t)(LONG_COMPACT_LENGTH + 1))))
+ if (NULL == (objname = (char *)malloc((size_t)(LONG_COMPACT_LENGTH + 1))))
TEST_ERROR;
- HDmemset(objname, 'a', (size_t)LONG_COMPACT_LENGTH);
+ memset(objname, 'a', (size_t)LONG_COMPACT_LENGTH);
objname[LONG_COMPACT_LENGTH] = '\0';
/* Re-open file */
@@ -753,7 +753,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Free object name */
- HDfree(objname);
+ free(objname);
objname = NULL;
/* Close top group */
@@ -789,7 +789,7 @@ error:
H5E_END_TRY;
if (objname)
- HDfree(objname);
+ free(objname);
return 1;
} /* end long_compact() */
diff --git a/test/swmr.c b/test/swmr.c
index d3a0d13..54afb9d 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -2509,12 +2509,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Should fail */
@@ -2525,13 +2525,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (fid >= 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* close unused read end for out_pdf */
@@ -2591,84 +2591,84 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* close unused read end for in_pdf */
if (HDclose(in_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Should succeed in opening the test file 2 times */
if ((child_fid1 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if ((child_fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* open "dataset" 2 times */
if ((child_did1 = H5Dopen2(child_fid1, "dataset", H5P_DEFAULT)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if ((child_did2 = H5Dopen2(child_fid2, "dataset", H5P_DEFAULT)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Read from "dataset" via child_did1 */
rdata = 0;
if (H5Dread(child_did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (rdata != 88)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Notify parent process */
child_notify = 2;
if (HDwrite(in_pdf[1], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 3) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Refresh "dataset" via child_did2 */
if (H5Drefresh(child_did2) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Read from "dataset" child_did2 */
rdata = 0;
if (H5Dread(child_did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (rdata != 99)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Read from "dataset" child_did1 */
rdata = 0;
if (H5Dread(child_did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (rdata != 99)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the dataset */
if (H5Dclose(child_did1))
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (H5Dclose(child_did2))
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the file */
if (H5Fclose(child_fid1) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (H5Fclose(child_fid2) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (HDclose(in_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* close unused read end for out_pdf */
@@ -2780,12 +2780,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Should fail in opening the test file */
@@ -2795,9 +2795,9 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (fid >= 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end if */
/* close unused read end for out_pdf */
@@ -2856,12 +2856,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Should fail in opening the test file */
@@ -2871,13 +2871,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (fid >= 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end if */
/* close unused read end for out_pdf */
@@ -2936,12 +2936,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Should fail in opening the test file */
@@ -2951,13 +2951,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (fid >= 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* close unused read end for out_pdf */
@@ -3048,8 +3048,8 @@ test_start_swmr_write_stress_ohdr(hid_t in_fapl)
TESTING("H5Fstart_swmr_write()--stress object header messages");
/* Initialize buffers */
- HDmemset(fill, 0, sizeof(fill));
- HDmemset(attr_data, 0, sizeof(attr_data));
+ memset(fill, 0, sizeof(fill));
+ memset(attr_data, 0, sizeof(attr_data));
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR;
@@ -3992,7 +3992,7 @@ test_append_flush_generic(void)
TEST_ERROR;
/* Verify expected values: with boundary rank < set boundary rank */
- HDmemset(ret_boundary, 0, sizeof(ret_boundary));
+ memset(ret_boundary, 0, sizeof(ret_boundary));
if (H5Pget_append_flush(dapl, 1, ret_boundary, NULL, NULL) < 0)
TEST_ERROR;
if (ret_boundary[0] != 1 || ret_boundary[1] != 0 || boundary[2] != 0)
@@ -4123,7 +4123,7 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
FAIL_STACK_ERROR;
/* Set boundary dimension rank > the rank of dataset to be created */
- HDmemset(boundary, 0, sizeof(boundary));
+ memset(boundary, 0, sizeof(boundary));
if (H5Pset_append_flush(dapl, 3, boundary, NULL, NULL) < 0)
FAIL_STACK_ERROR;
@@ -4185,7 +4185,7 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
if ((ddapl = H5Dget_access_plist(did2)) < 0)
FAIL_STACK_ERROR;
- HDmemset(ret_boundary, 0, sizeof(ret_boundary));
+ memset(ret_boundary, 0, sizeof(ret_boundary));
ret_cb = NULL;
ret_count = NULL;
/* Retrieve the append flush property values */
@@ -4198,7 +4198,7 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
if (ret_boundary[0] != 0 || ret_boundary[1] != 1 || ret_boundary[2] != 0)
TEST_ERROR;
- HDmemset(ret_boundary, 0, sizeof(ret_boundary));
+ memset(ret_boundary, 0, sizeof(ret_boundary));
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 1, ret_boundary, NULL, NULL) < 0)
TEST_ERROR;
@@ -4396,7 +4396,7 @@ test_append_flush_dataset_fixed(hid_t in_fapl)
* zero boundary, null callback function, null user data
*/
- HDmemset(boundary, 0, sizeof(boundary));
+ memset(boundary, 0, sizeof(boundary));
if (H5Pset_append_flush(dapl, 1, boundary, append_cb, &count) < 0)
FAIL_STACK_ERROR;
if ((did2 = H5Dopen2(fid, "dataset2", dapl)) < 0)
@@ -5245,12 +5245,12 @@ test_file_lock_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -5262,13 +5262,13 @@ test_file_lock_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -5322,12 +5322,12 @@ test_file_lock_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Opens the test file */
@@ -5339,13 +5339,13 @@ test_file_lock_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -5400,12 +5400,12 @@ test_file_lock_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Opens the test file */
@@ -5417,13 +5417,13 @@ test_file_lock_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
/* close unused read end for out_pdf */
@@ -5478,12 +5478,12 @@ test_file_lock_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Opens the test file */
@@ -5497,16 +5497,16 @@ test_file_lock_concur(hid_t in_fapl)
if (child_fid >= 0) {
/* Close the file */
if (H5Fclose(child_fid) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end if */
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
/* close unused read end for out_pdf */
@@ -5642,12 +5642,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -5659,13 +5659,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -5720,12 +5720,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -5737,13 +5737,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -5798,12 +5798,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -5815,13 +5815,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -5875,12 +5875,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -5892,13 +5892,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -5952,12 +5952,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -5971,14 +5971,14 @@ test_file_lock_swmr_concur(hid_t in_fapl)
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
FAIL_STACK_ERROR;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -6032,12 +6032,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -6049,13 +6049,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -6110,12 +6110,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -6127,13 +6127,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -6188,12 +6188,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -6205,13 +6205,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -6266,12 +6266,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -6285,14 +6285,14 @@ test_file_lock_swmr_concur(hid_t in_fapl)
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
FAIL_STACK_ERROR;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -6347,12 +6347,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -6363,14 +6363,14 @@ test_file_lock_swmr_concur(hid_t in_fapl)
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
FAIL_STACK_ERROR;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -6425,12 +6425,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -6442,13 +6442,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Close unused read end for out_pdf */
@@ -6503,12 +6503,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open the test file */
@@ -6522,14 +6522,14 @@ test_file_lock_swmr_concur(hid_t in_fapl)
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
FAIL_STACK_ERROR;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@@ -6685,12 +6685,12 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Open and close the test file */
@@ -6703,12 +6703,12 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (H5I_INVALID_HID == child_fid || FAIL == ret)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
else
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end child process work */
/* close unused read end for out_pdf */
@@ -7186,96 +7186,96 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* close unused read end for in_pdf */
if (HDclose(in_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1)
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Open the file 2 times */
if ((child_fid1 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if ((child_fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Open the dataset 2 times */
if ((child_did1 = H5Dopen2(child_fid1, "dataset", H5P_DEFAULT)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if ((child_did2 = H5Dopen2(child_fid2, "dataset", H5P_DEFAULT)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Get the dataset's dataspace via did1 */
if ((child_sid = H5Dget_space(child_did1)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (H5Sget_simple_extent_dims(child_sid, tdims, NULL) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (tdims[0] != 1)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Read from the dataset via did2 */
if (H5Dread(child_did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Verify the data is correct */
if (rbuf[0] != 99)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Notify parent process */
child_notify = 2;
if (HDwrite(in_pdf[1], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 3)
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Refresh dataset via did1 */
if (H5Drefresh(child_did1) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Get the dataset's dataspace and verify */
if ((child_sid = H5Dget_space(child_did1)) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (H5Sget_simple_extent_dims(child_sid, tdims, NULL) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (tdims[0] != 2)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Read from the dataset */
if (H5Dread(child_did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Verify the data is correct */
if (rbuf[0] != 100 || rbuf[1] != 100)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the 2 datasets */
if (H5Dclose(child_did1) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (H5Dclose(child_did2) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the 2 files */
if (H5Fclose(child_fid1) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (H5Fclose(child_fid2) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
/* Close the pipes */
if (HDclose(out_pdf[0]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if (HDclose(in_pdf[1]) < 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* Close unused read end for out_pdf */
@@ -7740,7 +7740,7 @@ main(void)
*/
driver = HDgetenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver)) {
- HDprintf("This VFD does not support SWMR I/O\n");
+ printf("This VFD does not support SWMR I/O\n");
return EXIT_SUCCESS;
} /* end if */
@@ -7757,7 +7757,7 @@ main(void)
/* Check if file locking is enabled on this file system */
if (use_file_locking)
if (h5_check_if_file_locking_enabled(&file_locking_enabled) < 0) {
- HDprintf("Error when determining if file locks are enabled\n");
+ printf("Error when determining if file locks are enabled\n");
return EXIT_FAILURE;
}
@@ -7847,7 +7847,7 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All tests passed.\n");
+ printf("All tests passed.\n");
h5_cleanup(FILENAME, fapl);
@@ -7855,7 +7855,7 @@ main(void)
error:
nerrors = MAX(1, nerrors);
- HDprintf("***** %d SWMR TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d SWMR TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c
index 07f2cb1..1b21a70 100644
--- a/test/swmr_addrem_writer.c
+++ b/test/swmr_addrem_writer.c
@@ -75,7 +75,7 @@ open_skeleton(const char *filename, unsigned verbose)
hsize_t dim[2]; /* Dataspace dimension */
unsigned u, v; /* Local index variable */
- HDassert(filename);
+ assert(filename);
/* Create file access property list */
if ((fapl = h5_fileaccess()) < 0)
@@ -95,7 +95,7 @@ open_skeleton(const char *filename, unsigned verbose)
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Opening datasets\n");
+ fprintf(stderr, "Opening datasets\n");
/* Open the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -148,10 +148,10 @@ addrem_records(hid_t fid, unsigned verbose, unsigned long nops, unsigned long fl
unsigned long op_to_flush; /* # of operations before flush */
unsigned long u, v; /* Local index variables */
- HDassert(fid > 0);
+ assert(fid > 0);
/* Reset the buffer */
- HDmemset(&buf, 0, sizeof(buf));
+ memset(&buf, 0, sizeof(buf));
/* Create a dataspace for the record to add */
if ((mem_sid = H5Screate_simple(2, count, NULL)) < 0)
@@ -250,7 +250,7 @@ addrem_records(hid_t fid, unsigned verbose, unsigned long nops, unsigned long fl
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing datasets\n");
+ fprintf(stderr, "Closing datasets\n");
/* Close the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -264,21 +264,21 @@ addrem_records(hid_t fid, unsigned verbose, unsigned long nops, unsigned long fl
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_addrem_writer [-q] [-f <# of operations between flushing\n");
- HDprintf(" file contents>] [-r <random seed>] <# of operations>\n");
- HDprintf("\n");
- HDprintf("<# of operations between flushing file contents> should be 0 (for\n");
- HDprintf("no flushing) or between 1 and (<# of operations> - 1).\n");
- HDprintf("\n");
- HDprintf("<# of operations> must be specified.\n");
- HDprintf("\n");
- HDprintf("Defaults to verbose (no '-q' given), flushing every 1000 operations\n");
- HDprintf("('-f 1000'), and will generate a random seed (no -r given).\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_addrem_writer [-q] [-f <# of operations between flushing\n");
+ printf(" file contents>] [-r <random seed>] <# of operations>\n");
+ printf("\n");
+ printf("<# of operations between flushing file contents> should be 0 (for\n");
+ printf("no flushing) or between 1 and (<# of operations> - 1).\n");
+ printf("\n");
+ printf("<# of operations> must be specified.\n");
+ printf("\n");
+ printf("Defaults to verbose (no '-q' given), flushing every 1000 operations\n");
+ printf("('-f 1000'), and will generate a random seed (no -r given).\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
}
int
@@ -318,7 +318,7 @@ main(int argc, char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = HDatoi(argv[u + 1]);
+ temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
else
@@ -348,9 +348,9 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose) {
- HDfprintf(stderr, "Parameters:\n");
- HDfprintf(stderr, "\t# of operations between flushes = %ld\n", flush_count);
- HDfprintf(stderr, "\t# of operations = %ld\n", nops);
+ fprintf(stderr, "Parameters:\n");
+ fprintf(stderr, "\t# of operations between flushes = %ld\n", flush_count);
+ fprintf(stderr, "\t# of operations = %ld\n", nops);
} /* end if */
/* Set the random seed */
@@ -361,11 +361,11 @@ main(int argc, char *argv[])
} /* end if */
HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- HDfprintf(stderr, "Using writer random seed: %u\n", random_seed);
+ fprintf(stderr, "Using writer random seed: %u\n", random_seed);
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Generating symbol names\n");
+ fprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if (generate_symbols() < 0)
@@ -373,12 +373,12 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
+ fprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
/* Open file skeleton */
if ((fid = open_skeleton(FILENAME, verbose)) < 0) {
- HDfprintf(stderr, "Error opening skeleton file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error opening skeleton file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -386,32 +386,32 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Adding and removing records\n");
+ fprintf(stderr, "Adding and removing records\n");
/* Grow and shrink datasets */
if (addrem_records(fid, verbose, (unsigned long)nops, (unsigned long)flush_count) < 0) {
- HDfprintf(stderr, "Error adding and removing records from datasets!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error adding and removing records from datasets!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Releasing symbols\n");
+ fprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
- HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error releasing symbols!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing objects\n");
+ fprintf(stderr, "Closing objects\n");
/* Close objects opened */
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Error closing file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error closing file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
return 0;
diff --git a/test/swmr_common.c b/test/swmr_common.c
index 0c869f1..ef4c550 100644
--- a/test/swmr_common.c
+++ b/test/swmr_common.c
@@ -179,7 +179,7 @@ create_symbol_datatype(void)
int
generate_name(char *name_buf, size_t name_buf_length, unsigned level, unsigned count)
{
- HDassert(name_buf);
+ assert(name_buf);
HDsnprintf(name_buf, name_buf_length, "%u-%04u", level, count);
@@ -204,7 +204,7 @@ generate_symbols(void)
unsigned u, v; /* Local index variables */
for (u = 0; u < NLEVELS; u++) {
- symbol_info[u] = HDmalloc(symbol_count[u] * sizeof(symbol_info_t));
+ symbol_info[u] = malloc(symbol_count[u] * sizeof(symbol_info_t));
for (v = 0; v < symbol_count[u]; v++) {
char name_buf[64];
@@ -238,8 +238,8 @@ shutdown_symbols(void)
/* Clean up the symbols */
for (u = 0; u < NLEVELS; u++) {
for (v = 0; v < symbol_count[u]; v++)
- HDfree(symbol_info[u][v].name);
- HDfree(symbol_info[u]);
+ free(symbol_info[u][v].name);
+ free(symbol_info[u]);
} /* end for */
return 0;
@@ -275,12 +275,12 @@ print_metadata_retries_info(hid_t fid)
if (NULL == info.retries[i])
continue;
- HDfprintf(stderr, "Metadata read retries for item %u:\n", i);
+ fprintf(stderr, "Metadata read retries for item %u:\n", i);
power = 1;
for (j = 0; j < info.nbins; j++) {
if (info.retries[i][j])
- HDfprintf(stderr, "\t# of retries for %u - %u retries: %u\n", power, (power * 10) - 1,
- info.retries[i][j]);
+ fprintf(stderr, "\t# of retries for %u - %u retries: %u\n", power, (power * 10) - 1,
+ info.retries[i][j]);
power *= 10;
} /* end for */
} /* end for */
diff --git a/test/swmr_generator.c b/test/swmr_generator.c
index 53a619b..75e392d 100644
--- a/test/swmr_generator.c
+++ b/test/swmr_generator.c
@@ -97,8 +97,8 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
#endif /* FILLVAL_WORKS */
unsigned u, v; /* Local index variable */
- HDassert(filename);
- HDassert(index_type);
+ assert(filename);
+ assert(index_type);
/* Create file access property list */
if ((fapl = h5_fileaccess()) < 0)
@@ -124,7 +124,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Creating file\n");
+ fprintf(stderr, "Creating file\n");
/* Create the file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC | (swmr_write ? H5F_ACC_SWMR_WRITE : 0), fcpl, fapl)) < 0)
@@ -169,7 +169,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
/* Currently fill values do not work because they can bump the dataspace
* message to the second object header chunk. We should enable the fillval
* here when this is fixed. -NAF 8/11/11 */
- HDmemset(&fillval, 0, sizeof(fillval));
+ memset(&fillval, 0, sizeof(fillval));
fillval.rec_id = (uint64_t)ULLONG_MAX;
if (H5Pset_fill_value(dcpl, tid, &fillval) < 0)
return -1;
@@ -177,7 +177,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Creating datasets\n");
+ fprintf(stderr, "Creating datasets\n");
/* Create the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -218,7 +218,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing objects\n");
+ fprintf(stderr, "Closing objects\n");
/* Close everything */
if (H5Pclose(dcpl) < 0)
@@ -236,24 +236,24 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_generator [-q] [-s] [-c <deflate compression level>]\n");
- HDprintf(" [-i <index type>] [-r <random seed>]\n");
- HDprintf("\n");
- HDprintf("NOTE: The random seed option is only used by the sparse test. Other\n");
- HDprintf(" tests specify the random seed as a reader/writer option.\n");
- HDprintf("\n");
- HDprintf("<deflate compression level> should be -1 (for no compression) or 0-9\n");
- HDprintf("\n");
- HDprintf("<index type> should be b2 or ea\n");
- HDprintf("\n");
- HDprintf("Defaults to verbose (no '-q' given), no SWMR_WRITE mode (no '-s' given) no\n");
- HDprintf("compression ('-c -1'), v1 b-tree indexing (-i b1), and will generate a random\n");
- HDprintf("seed (no -r given).\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_generator [-q] [-s] [-c <deflate compression level>]\n");
+ printf(" [-i <index type>] [-r <random seed>]\n");
+ printf("\n");
+ printf("NOTE: The random seed option is only used by the sparse test. Other\n");
+ printf(" tests specify the random seed as a reader/writer option.\n");
+ printf("\n");
+ printf("<deflate compression level> should be -1 (for no compression) or 0-9\n");
+ printf("\n");
+ printf("<index type> should be b2 or ea\n");
+ printf("\n");
+ printf("Defaults to verbose (no '-q' given), no SWMR_WRITE mode (no '-s' given) no\n");
+ printf("compression ('-c -1'), v1 b-tree indexing (-i b1), and will generate a random\n");
+ printf("seed (no -r given).\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
} /* end usage() */
int
@@ -276,7 +276,7 @@ main(int argc, char *argv[])
switch (argv[u][1]) {
/* Compress dataset chunks */
case 'c':
- comp_level = HDatoi(argv[u + 1]);
+ comp_level = atoi(argv[u + 1]);
if (comp_level < -1 || comp_level > 9)
usage();
u += 2;
@@ -293,7 +293,7 @@ main(int argc, char *argv[])
/* Random # seed */
case 'r':
use_seed = TRUE;
- temp = HDatoi(argv[u + 1]);
+ temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
else
@@ -323,10 +323,10 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose) {
- HDfprintf(stderr, "Parameters:\n");
- HDfprintf(stderr, "\tswmr writes %s\n", swmr_write ? "on" : "off");
- HDfprintf(stderr, "\tcompression level = %d\n", comp_level);
- HDfprintf(stderr, "\tindex type = %s\n", index_type);
+ fprintf(stderr, "Parameters:\n");
+ fprintf(stderr, "\tswmr writes %s\n", swmr_write ? "on" : "off");
+ fprintf(stderr, "\tcompression level = %d\n", comp_level);
+ fprintf(stderr, "\tindex type = %s\n", index_type);
} /* end if */
/* Set the random seed */
@@ -338,16 +338,16 @@ main(int argc, char *argv[])
} /* end if */
HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- HDfprintf(stderr, "Using generator random seed (used in sparse test only): %u\n", random_seed);
+ fprintf(stderr, "Using generator random seed (used in sparse test only): %u\n", random_seed);
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Generating skeleton file: %s\n", FILENAME);
+ fprintf(stderr, "Generating skeleton file: %s\n", FILENAME);
/* Generate file skeleton */
if (gen_skeleton(FILENAME, verbose, swmr_write, comp_level, index_type, random_seed) < 0) {
- HDfprintf(stderr, "Error generating skeleton file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error generating skeleton file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
return 0;
diff --git a/test/swmr_reader.c b/test/swmr_reader.c
index 4c3770b..9e4e322 100644
--- a/test/swmr_reader.c
+++ b/test/swmr_reader.c
@@ -86,10 +86,10 @@ check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_na
hssize_t snpoints; /* Number of elements in dataset */
hsize_t start[2] = {0, 0}, count[2] = {1, 1}; /* Hyperslab selection values */
- HDassert(fid >= 0);
- HDassert(sym_name);
- HDassert(record);
- HDassert(rec_sid >= 0);
+ assert(fid >= 0);
+ assert(sym_name);
+ assert(record);
+ assert(rec_sid >= 0);
/* Open dataset for symbol */
if ((dsid = H5Dopen2(fid, sym_name, H5P_DEFAULT)) < 0)
@@ -105,7 +105,7 @@ check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_na
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Symbol = '%s', # of records = %lld\n", sym_name, (long long)snpoints);
+ fprintf(verbose_file, "Symbol = '%s', # of records = %lld\n", sym_name, (long long)snpoints);
/* Check if there are records for symbol */
if (snpoints > 0) {
@@ -126,12 +126,12 @@ check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_na
HDgettimeofday(&tv, NULL);
if (verbose) {
- HDfprintf(verbose_file, "*** ERROR ***\n");
- HDfprintf(verbose_file, "Incorrect record value!\n");
- HDfprintf(verbose_file,
- "Time = %llu.%llu, Symbol = '%s', # of records = %lld, record->rec_id = %llu\n",
- (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec, sym_name,
- (long long)snpoints, (unsigned long long)record->rec_id);
+ fprintf(verbose_file, "*** ERROR ***\n");
+ fprintf(verbose_file, "Incorrect record value!\n");
+ fprintf(verbose_file,
+ "Time = %llu.%llu, Symbol = '%s', # of records = %lld, record->rec_id = %llu\n",
+ (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec, sym_name,
+ (long long)snpoints, (unsigned long long)record->rec_id);
} /* end if */
return -1;
} /* end if */
@@ -204,22 +204,22 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
unsigned v; /* Local index variable */
hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */
- HDassert(filename);
- HDassert(nseconds != 0);
- HDassert(poll_time != 0);
+ assert(filename);
+ assert(nseconds != 0);
+ assert(poll_time != 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record read, also) */
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Choosing datasets\n");
+ fprintf(verbose_file, "Choosing datasets\n");
/* Allocate space for 'common' datasets, if any */
if (ncommon > 0) {
/* Allocate array to hold pointers to symbols for common datasets */
- if (NULL == (sym_com = (symbol_info_t **)HDmalloc(sizeof(symbol_info_t *) * ncommon)))
+ if (NULL == (sym_com = (symbol_info_t **)malloc(sizeof(symbol_info_t *) * ncommon)))
return -1;
/* Open the common datasets */
@@ -233,14 +233,14 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Common symbol #%u = '%s'\n", v, symbol_info[0][offset].name);
+ fprintf(verbose_file, "Common symbol #%u = '%s'\n", v, symbol_info[0][offset].name);
} /* end for */
} /* end if */
/* Allocate space for 'random' datasets, if any */
if (nrandom > 0) {
/* Allocate array to hold pointers to symbols for random datasets */
- if (NULL == (sym_rand = (symbol_info_t **)HDmalloc(sizeof(symbol_info_t *) * nrandom)))
+ if (NULL == (sym_rand = (symbol_info_t **)malloc(sizeof(symbol_info_t *) * nrandom)))
return -1;
/* Determine the random datasets */
@@ -254,7 +254,7 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Random symbol #%u = '%s'\n", v, sym->name);
+ fprintf(verbose_file, "Random symbol #%u = '%s'\n", v, sym->name);
} /* end for */
} /* end if */
@@ -264,7 +264,7 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Reading records\n");
+ fprintf(verbose_file, "Reading records\n");
/* Get the starting time */
start_time = HDtime(NULL);
@@ -288,7 +288,7 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Opening file: %s\n", filename);
+ fprintf(verbose_file, "Opening file: %s\n", filename);
/* Open the file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
@@ -298,14 +298,14 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
if (ncommon > 0) {
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Checking common symbols\n");
+ fprintf(verbose_file, "Checking common symbols\n");
/* Iterate over common datasets */
for (v = 0; v < ncommon; v++) {
/* Check common dataset */
if (check_dataset(fid, verbose, verbose_file, sym_com[v]->name, &record, mem_sid) < 0)
return -1;
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
} /* end for */
} /* end if */
@@ -313,20 +313,20 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
if (nrandom > 0) {
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Checking random symbols\n");
+ fprintf(verbose_file, "Checking random symbols\n");
/* Iterate over random datasets */
for (v = 0; v < nrandom; v++) {
/* Check random dataset */
if (check_dataset(fid, verbose, verbose_file, sym_rand[v]->name, &record, mem_sid) < 0)
return -1;
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
} /* end for */
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Closing file\n");
+ fprintf(verbose_file, "Closing file\n");
/* Close the file */
if (H5Fclose(fid) < 0)
@@ -349,18 +349,18 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Closing datasets\n");
+ fprintf(verbose_file, "Closing datasets\n");
/* Close 'random' datasets, if any */
if (nrandom > 0) {
/* Release array holding dataset ID's for random datasets */
- HDfree(sym_rand);
+ free(sym_rand);
} /* end if */
/* Close 'common' datasets, if any */
if (ncommon > 0) {
/* Release array holding dataset ID's for common datasets */
- HDfree(sym_com);
+ free(sym_com);
} /* end if */
return 0;
@@ -369,20 +369,20 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_reader [-q] [-s <# of seconds to sleep between polling>]\n");
- HDprintf(" [-h <# of common symbols to poll>] [-l <# of random symbols to poll>]\n");
- HDprintf(" [-r <random seed>] <# of seconds to test>\n");
- HDprintf("\n");
- HDprintf("<# of seconds to test> must be specified.\n");
- HDprintf("\n");
- HDprintf("Defaults to verbose (no '-q' given), 1 second between polling ('-s 1'),\n");
- HDprintf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n");
- HDprintf("and will generate a random seed (no -r given).\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_reader [-q] [-s <# of seconds to sleep between polling>]\n");
+ printf(" [-h <# of common symbols to poll>] [-l <# of random symbols to poll>]\n");
+ printf(" [-r <random seed>] <# of seconds to test>\n");
+ printf("\n");
+ printf("<# of seconds to test> must be specified.\n");
+ printf("\n");
+ printf("Defaults to verbose (no '-q' given), 1 second between polling ('-s 1'),\n");
+ printf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n");
+ printf("and will generate a random seed (no -r given).\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
}
int
@@ -409,7 +409,7 @@ main(int argc, char *argv[])
switch (argv[u][1]) {
/* # of common symbols to poll */
case 'h':
- ncommon = HDatoi(argv[u + 1]);
+ ncommon = atoi(argv[u + 1]);
if (ncommon < 0)
usage();
u += 2;
@@ -417,7 +417,7 @@ main(int argc, char *argv[])
/* # of random symbols to poll */
case 'l':
- nrandom = HDatoi(argv[u + 1]);
+ nrandom = atoi(argv[u + 1]);
if (nrandom < 0)
usage();
u += 2;
@@ -432,7 +432,7 @@ main(int argc, char *argv[])
/* Random # seed */
case 'r':
use_seed = TRUE;
- temp = HDatoi(argv[u + 1]);
+ temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
else
@@ -442,7 +442,7 @@ main(int argc, char *argv[])
/* # of seconds between polling */
case 's':
- poll_time = HDatoi(argv[u + 1]);
+ poll_time = atoi(argv[u + 1]);
if (poll_time < 0)
usage();
u += 2;
@@ -482,32 +482,32 @@ main(int argc, char *argv[])
char verbose_name[1024];
HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed);
- if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) {
- HDfprintf(stderr, "Can't open verbose output file!\n");
- HDexit(EXIT_FAILURE);
+ if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
+ fprintf(stderr, "Can't open verbose output file!\n");
+ exit(EXIT_FAILURE);
}
} /* end if */
/* Emit informational message */
if (verbose) {
- HDfprintf(verbose_file, "Parameters:\n");
- HDfprintf(verbose_file, "\t# of seconds between polling = %d\n", poll_time);
- HDfprintf(verbose_file, "\t# of common symbols to poll = %d\n", ncommon);
- HDfprintf(verbose_file, "\t# of random symbols to poll = %d\n", nrandom);
- HDfprintf(verbose_file, "\t# of seconds to test = %ld\n", nseconds);
+ fprintf(verbose_file, "Parameters:\n");
+ fprintf(verbose_file, "\t# of seconds between polling = %d\n", poll_time);
+ fprintf(verbose_file, "\t# of common symbols to poll = %d\n", ncommon);
+ fprintf(verbose_file, "\t# of random symbols to poll = %d\n", nrandom);
+ fprintf(verbose_file, "\t# of seconds to test = %ld\n", nseconds);
} /* end if */
/* ALWAYS emit the random seed for possible debugging */
- HDfprintf(stdout, "Using reader random seed: %u\n", random_seed);
+ fprintf(stdout, "Using reader random seed: %u\n", random_seed);
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Generating symbol names\n");
+ fprintf(verbose_file, "Generating symbol names\n");
/* Generate dataset names */
if (generate_symbols() < 0) {
- HDfprintf(stderr, "Error generating symbol names!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error generating symbol names!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Create datatype for creating datasets */
@@ -517,28 +517,28 @@ main(int argc, char *argv[])
/* Reading records from datasets */
if (read_records(FILENAME, verbose, verbose_file, random_seed, (unsigned long)nseconds,
(unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) {
- HDfprintf(stderr, "Error reading records from datasets (random_seed = %u)!\n", random_seed);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error reading records from datasets (random_seed = %u)!\n", random_seed);
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Releasing symbols\n");
+ fprintf(verbose_file, "Releasing symbols\n");
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
- HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error releasing symbols!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Closing objects\n");
+ fprintf(verbose_file, "Closing objects\n");
/* Close objects created */
if (H5Tclose(symbol_tid) < 0) {
- HDfprintf(stderr, "Error closing symbol datatype!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error closing symbol datatype!\n");
+ exit(EXIT_FAILURE);
} /* end if */
return 0;
diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c
index 82c6af6..5a4eccd 100644
--- a/test/swmr_remove_reader.c
+++ b/test/swmr_remove_reader.c
@@ -83,10 +83,10 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor
hssize_t snpoints; /* Number of elements in dataset */
hsize_t start[2] = {0, 0}, count[2] = {1, 1}; /* Hyperslab selection values */
- HDassert(fid >= 0);
- HDassert(sym_name);
- HDassert(record);
- HDassert(rec_sid >= 0);
+ assert(fid >= 0);
+ assert(sym_name);
+ assert(record);
+ assert(rec_sid >= 0);
/* Open dataset for symbol */
if ((dsid = H5Dopen2(fid, sym_name, H5P_DEFAULT)) < 0)
@@ -102,7 +102,7 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Symbol = '%s', # of records = %lld\n", sym_name, (long long)snpoints);
+ fprintf(stderr, "Symbol = '%s', # of records = %lld\n", sym_name, (long long)snpoints);
/* Check if there are records for symbol */
if (snpoints > 0) {
@@ -131,10 +131,10 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor
* chunk may be deleted before the object header has the updated
* dimensions */
if (record->rec_id != start[1] && record->rec_id != (uint64_t)0) {
- HDfprintf(stderr, "*** ERROR ***\n");
- HDfprintf(stderr, "Incorrect record value!\n");
- HDfprintf(stderr, "Symbol = '%s', # of records = %lld, record->rec_id = %llx\n", sym_name,
- (long long)snpoints, (unsigned long long)record->rec_id);
+ fprintf(stderr, "*** ERROR ***\n");
+ fprintf(stderr, "Incorrect record value!\n");
+ fprintf(stderr, "Symbol = '%s', # of records = %lld, record->rec_id = %llx\n", sym_name,
+ (long long)snpoints, (unsigned long long)record->rec_id);
return -1;
} /* end if */
} /* end if */
@@ -199,22 +199,22 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
symbol_t record; /* The record to add to the dataset */
unsigned v; /* Local index variable */
- HDassert(filename);
- HDassert(nseconds != 0);
- HDassert(poll_time != 0);
+ assert(filename);
+ assert(nseconds != 0);
+ assert(poll_time != 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Choosing datasets\n");
+ fprintf(stderr, "Choosing datasets\n");
/* Allocate space for 'common' datasets, if any */
if (ncommon > 0) {
/* Allocate array to hold pointers to symbols for common datasets */
- if (NULL == (sym_com = (symbol_info_t **)HDmalloc(sizeof(symbol_info_t *) * ncommon)))
+ if (NULL == (sym_com = (symbol_info_t **)malloc(sizeof(symbol_info_t *) * ncommon)))
return -1;
/* Open the common datasets */
@@ -228,14 +228,14 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Common symbol #%u = '%s'\n", v, symbol_info[0][offset].name);
+ fprintf(stderr, "Common symbol #%u = '%s'\n", v, symbol_info[0][offset].name);
} /* end for */
} /* end if */
/* Allocate space for 'random' datasets, if any */
if (nrandom > 0) {
/* Allocate array to hold pointers to symbols for random datasets */
- if (NULL == (sym_rand = (symbol_info_t **)HDmalloc(sizeof(symbol_info_t *) * nrandom)))
+ if (NULL == (sym_rand = (symbol_info_t **)malloc(sizeof(symbol_info_t *) * nrandom)))
return -1;
/* Determine the random datasets */
@@ -249,7 +249,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Random symbol #%u = '%s'\n", v, sym->name);
+ fprintf(stderr, "Random symbol #%u = '%s'\n", v, sym->name);
} /* end for */
} /* end if */
@@ -259,7 +259,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Reading records\n");
+ fprintf(stderr, "Reading records\n");
/* Get the starting time */
start_time = HDtime(NULL);
@@ -274,7 +274,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Opening file: %s\n", filename);
+ fprintf(stderr, "Opening file: %s\n", filename);
/* Open the file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
@@ -284,14 +284,14 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
if (ncommon > 0) {
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Checking common symbols\n");
+ fprintf(stderr, "Checking common symbols\n");
/* Iterate over common datasets */
for (v = 0; v < ncommon; v++) {
/* Check common dataset */
if (check_dataset(fid, verbose, sym_com[v]->name, &record, mem_sid) < 0)
return -1;
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
} /* end for */
} /* end if */
@@ -299,20 +299,20 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
if (nrandom > 0) {
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Checking random symbols\n");
+ fprintf(stderr, "Checking random symbols\n");
/* Iterate over random datasets */
for (v = 0; v < nrandom; v++) {
/* Check random dataset */
if (check_dataset(fid, verbose, sym_rand[v]->name, &record, mem_sid) < 0)
return -1;
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
} /* end for */
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing file\n");
+ fprintf(stderr, "Closing file\n");
/* Close the file */
if (H5Fclose(fid) < 0)
@@ -335,18 +335,18 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing datasets\n");
+ fprintf(stderr, "Closing datasets\n");
/* Close 'random' datasets, if any */
if (nrandom > 0) {
/* Release array holding dataset ID's for random datasets */
- HDfree(sym_rand);
+ free(sym_rand);
} /* end if */
/* Close 'common' datasets, if any */
if (ncommon > 0) {
/* Release array holding dataset ID's for common datasets */
- HDfree(sym_com);
+ free(sym_com);
} /* end if */
return 0;
@@ -355,18 +355,18 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_remove_reader [-q] [-s <# of seconds to sleep between\n");
- HDprintf(" polling>] [-h <# of common symbols to poll>] [-l <# of random symbols\n");
- HDprintf(" to poll>] [-r <random seed>] <# of seconds to test>\n");
- HDprintf("\n");
- HDprintf("Defaults to verbose (no '-q' given), 1 second between polling ('-s 1'),\n");
- HDprintf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n");
- HDprintf("and will generate a random seed (no -r given).\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_remove_reader [-q] [-s <# of seconds to sleep between\n");
+ printf(" polling>] [-h <# of common symbols to poll>] [-l <# of random symbols\n");
+ printf(" to poll>] [-r <random seed>] <# of seconds to test>\n");
+ printf("\n");
+ printf("Defaults to verbose (no '-q' given), 1 second between polling ('-s 1'),\n");
+ printf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n");
+ printf("and will generate a random seed (no -r given).\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
}
int
@@ -392,7 +392,7 @@ main(int argc, char *argv[])
switch (argv[u][1]) {
/* # of common symbols to poll */
case 'h':
- ncommon = HDatoi(argv[u + 1]);
+ ncommon = atoi(argv[u + 1]);
if (ncommon < 0)
usage();
u += 2;
@@ -400,7 +400,7 @@ main(int argc, char *argv[])
/* # of random symbols to poll */
case 'l':
- nrandom = HDatoi(argv[u + 1]);
+ nrandom = atoi(argv[u + 1]);
if (nrandom < 0)
usage();
u += 2;
@@ -415,7 +415,7 @@ main(int argc, char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = HDatoi(argv[u + 1]);
+ temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
else
@@ -425,7 +425,7 @@ main(int argc, char *argv[])
/* # of seconds between polling */
case 's':
- poll_time = HDatoi(argv[u + 1]);
+ poll_time = atoi(argv[u + 1]);
if (poll_time < 0)
usage();
u += 2;
@@ -453,11 +453,11 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose) {
- HDfprintf(stderr, "Parameters:\n");
- HDfprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
- HDfprintf(stderr, "\t# of common symbols to poll = %d\n", ncommon);
- HDfprintf(stderr, "\t# of random symbols to poll = %d\n", nrandom);
- HDfprintf(stderr, "\t# of seconds to test = %ld\n", nseconds);
+ fprintf(stderr, "Parameters:\n");
+ fprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
+ fprintf(stderr, "\t# of common symbols to poll = %d\n", ncommon);
+ fprintf(stderr, "\t# of random symbols to poll = %d\n", nrandom);
+ fprintf(stderr, "\t# of seconds to test = %ld\n", nseconds);
} /* end if */
/* Set the random seed */
@@ -468,16 +468,16 @@ main(int argc, char *argv[])
} /* end if */
HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- HDfprintf(stderr, "Using reader random seed: %u\n", random_seed);
+ fprintf(stderr, "Using reader random seed: %u\n", random_seed);
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Generating symbol names\n");
+ fprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if (generate_symbols() < 0) {
- HDfprintf(stderr, "Error generating symbol names!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error generating symbol names!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Create datatype for creating datasets */
@@ -487,28 +487,28 @@ main(int argc, char *argv[])
/* Reading records from datasets */
if (read_records(FILENAME, verbose, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon,
(unsigned)nrandom) < 0) {
- HDfprintf(stderr, "Error reading records from datasets!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error reading records from datasets!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Releasing symbols\n");
+ fprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
- HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error releasing symbols!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing objects\n");
+ fprintf(stderr, "Closing objects\n");
/* Close objects created */
if (H5Tclose(symbol_tid) < 0) {
- HDfprintf(stderr, "Error closing symbol datatype!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error closing symbol datatype!\n");
+ exit(EXIT_FAILURE);
} /* end if */
return 0;
diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c
index da09b2b..9e29d71 100644
--- a/test/swmr_remove_writer.c
+++ b/test/swmr_remove_writer.c
@@ -75,7 +75,7 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
hsize_t dim[2]; /* Dataspace dimensions */
unsigned u, v; /* Local index variable */
- HDassert(filename);
+ assert(filename);
/* Create file access property list */
if ((fapl = h5_fileaccess()) < 0)
@@ -97,7 +97,7 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Opening datasets\n");
+ fprintf(stderr, "Opening datasets\n");
/* Open the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -146,7 +146,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */
unsigned long u, v; /* Local index variables */
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Remove records from random datasets, according to frequency distribution */
shrink_to_flush = flush_count;
@@ -186,7 +186,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing datasets\n");
+ fprintf(stderr, "Closing datasets\n");
/* Close the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -200,19 +200,19 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_remove_writer [-q] [-o] [-f <# of shrinks between flushing\n");
- HDprintf(" file contents>] [-r <random seed>] <# of shrinks>\n");
- HDprintf("\n");
- HDprintf("<# of shrinks between flushing file contents> should be 0 (for no\n");
- HDprintf("flushing) or between 1 and (<# of shrinks> - 1)\n");
- HDprintf("\n");
- HDprintf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
- HDprintf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_remove_writer [-q] [-o] [-f <# of shrinks between flushing\n");
+ printf(" file contents>] [-r <random seed>] <# of shrinks>\n");
+ printf("\n");
+ printf("<# of shrinks between flushing file contents> should be 0 (for no\n");
+ printf("flushing) or between 1 and (<# of shrinks> - 1)\n");
+ printf("\n");
+ printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
+ printf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
}
int
@@ -253,7 +253,7 @@ main(int argc, char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = HDatoi(argv[u + 1]);
+ temp = atoi(argv[u + 1]);
random_seed = (unsigned)temp;
u += 2;
break;
@@ -286,9 +286,9 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose) {
- HDfprintf(stderr, "Parameters:\n");
- HDfprintf(stderr, "\t# of shrinks between flushes = %ld\n", flush_count);
- HDfprintf(stderr, "\t# of shrinks = %ld\n", nshrinks);
+ fprintf(stderr, "Parameters:\n");
+ fprintf(stderr, "\t# of shrinks between flushes = %ld\n", flush_count);
+ fprintf(stderr, "\t# of shrinks = %ld\n", nshrinks);
} /* end if */
/* Set the random seed */
@@ -299,11 +299,11 @@ main(int argc, char *argv[])
} /* end if */
HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- HDfprintf(stderr, "Using writer random seed: %u\n", random_seed);
+ fprintf(stderr, "Using writer random seed: %u\n", random_seed);
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Generating symbol names\n");
+ fprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if (generate_symbols() < 0)
@@ -311,12 +311,12 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
+ fprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
/* Open file skeleton */
if ((fid = open_skeleton(FILENAME, verbose, old)) < 0) {
- HDfprintf(stderr, "Error opening skeleton file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error opening skeleton file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -324,32 +324,32 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Removing records\n");
+ fprintf(stderr, "Removing records\n");
/* Remove records from datasets */
if (remove_records(fid, verbose, (unsigned long)nshrinks, (unsigned long)flush_count) < 0) {
- HDfprintf(stderr, "Error removing records from datasets!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error removing records from datasets!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Releasing symbols\n");
+ fprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
- HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error releasing symbols!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing objects\n");
+ fprintf(stderr, "Closing objects\n");
/* Close objects opened */
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Error closing file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error closing file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
return 0;
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c
index cc38fb8..0205db3 100644
--- a/test/swmr_sparse_reader.c
+++ b/test/swmr_sparse_reader.c
@@ -91,10 +91,10 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
hsize_t start[2] = {0, 0}; /* Hyperslab selection values */
hsize_t count[2] = {1, 1}; /* Hyperslab selection values */
- HDassert(fid >= 0);
- HDassert(symbol);
- HDassert(record);
- HDassert(rec_sid >= 0);
+ assert(fid >= 0);
+ assert(symbol);
+ assert(record);
+ assert(rec_sid >= 0);
/* Open dataset for symbol */
if ((dsid = H5Dopen2(fid, symbol->name, H5P_DEFAULT)) < 0)
@@ -112,8 +112,8 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Symbol = '%s', location = %" PRIuMAX ",%" PRIuMAX "\n", symbol->name,
- (uintmax_t)start[0], (uintmax_t)start[1]);
+ fprintf(stderr, "Symbol = '%s', location = %" PRIuMAX ",%" PRIuMAX "\n", symbol->name,
+ (uintmax_t)start[0], (uintmax_t)start[1]);
/* Read record from dataset */
record->rec_id = UINT64_MAX;
@@ -122,11 +122,10 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
/* Verify record value */
if (record->rec_id != start[1]) {
- HDfprintf(stderr, "*** ERROR ***\n");
- HDfprintf(stderr, "Incorrect record value!\n");
- HDfprintf(stderr,
- "Symbol = '%s', location = %" PRIuMAX ",%" PRIuMAX ", record->rec_id = %" PRIu64 "\n",
- symbol->name, (uintmax_t)start[0], (uintmax_t)start[1], record->rec_id);
+ fprintf(stderr, "*** ERROR ***\n");
+ fprintf(stderr, "Incorrect record value!\n");
+ fprintf(stderr, "Symbol = '%s', location = %" PRIuMAX ",%" PRIuMAX ", record->rec_id = %" PRIu64 "\n",
+ symbol->name, (uintmax_t)start[0], (uintmax_t)start[1], record->rec_id);
return -1;
} /* end if */
@@ -182,8 +181,8 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
unsigned long u; /* Local index variable */
hid_t fapl;
- HDassert(filename);
- HDassert(poll_time != 0);
+ assert(filename);
+ assert(poll_time != 0);
/* Create file access property list */
if ((fapl = h5_fileaccess()) < 0)
@@ -193,7 +192,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Opening file: %s\n", filename);
+ fprintf(stderr, "Opening file: %s\n", filename);
/* Open the file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
@@ -210,7 +209,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
/* Create a dataspace for the record to read */
if ((mem_sid = H5Screate(H5S_SCALAR)) < 0)
@@ -218,7 +217,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Reading records\n");
+ fprintf(stderr, "Reading records\n");
/* Get the starting time */
start_time = HDtime(NULL);
@@ -259,7 +258,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
/* Check for timeout */
if (HDtime(NULL) >= (time_t)(start_time + (time_t)TIMEOUT)) {
- HDfprintf(stderr, "Reader timed out\n");
+ fprintf(stderr, "Reader timed out\n");
return -1;
} /* end if */
@@ -268,7 +267,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
/* Retrieve and print the collection of metadata read retries */
if (print_metadata_retries_info(fid) < 0)
- HDfprintf(stderr, "Warning: could not obtain metadata retries info\n");
+ fprintf(stderr, "Warning: could not obtain metadata retries info\n");
/* Reopen the file */
if (H5Fclose(fid) < 0)
@@ -280,23 +279,23 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Checking dataset %lu\n", u);
+ fprintf(stderr, "Checking dataset %lu\n", u);
/* Check dataset */
if (check_dataset(fid, verbose, symbol, &record, mem_sid) < 0)
return -1;
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
/* Check for reopen */
iter_to_reopen--;
if (iter_to_reopen == 0) {
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Reopening file: %s\n", filename);
+ fprintf(stderr, "Reopening file: %s\n", filename);
/* Retrieve and print the collection of metadata read retries */
if (print_metadata_retries_info(fid) < 0)
- HDfprintf(stderr, "Warning: could not obtain metadata retries info\n");
+ fprintf(stderr, "Warning: could not obtain metadata retries info\n");
/* Reopen the file */
if (H5Fclose(fid) < 0)
@@ -309,7 +308,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
/* Retrieve and print the collection of metadata read retries */
if (print_metadata_retries_info(fid) < 0)
- HDfprintf(stderr, "Warning: could not obtain metadata retries info\n");
+ fprintf(stderr, "Warning: could not obtain metadata retries info\n");
/* Close file */
if (H5Fclose(fid) < 0)
@@ -325,19 +324,19 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_sparse_reader [-q] [-s <# of seconds to wait for writer>]\n");
- HDprintf(" [-n <# of reads between reopens>] <# of records>\n");
- HDprintf("\n");
- HDprintf("Defaults to verbose (no '-q' given), 1 second wait ('-s 1') and 1 read\n");
- HDprintf("between reopens ('-r 1')\n");
- HDprintf("\n");
- HDprintf("Note that the # of records *must* be the same as that supplied to\n");
- HDprintf("swmr_sparse_writer\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_sparse_reader [-q] [-s <# of seconds to wait for writer>]\n");
+ printf(" [-n <# of reads between reopens>] <# of records>\n");
+ printf("\n");
+ printf("Defaults to verbose (no '-q' given), 1 second wait ('-s 1') and 1 read\n");
+ printf("between reopens ('-r 1')\n");
+ printf("\n");
+ printf("Note that the # of records *must* be the same as that supplied to\n");
+ printf("swmr_sparse_writer\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
} /* end usage() */
int
@@ -359,7 +358,7 @@ main(int argc, char *argv[])
switch (argv[u][1]) {
/* # of reads between reopens */
case 'n':
- reopen_count = HDatoi(argv[u + 1]);
+ reopen_count = atoi(argv[u + 1]);
if (reopen_count < 0)
usage();
u += 2;
@@ -373,7 +372,7 @@ main(int argc, char *argv[])
/* # of seconds between polling */
case 's':
- poll_time = HDatoi(argv[u + 1]);
+ poll_time = atoi(argv[u + 1]);
if (poll_time < 0)
usage();
u += 2;
@@ -397,20 +396,20 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose) {
- HDfprintf(stderr, "Parameters:\n");
- HDfprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
- HDfprintf(stderr, "\t# of reads between reopens = %d\n", reopen_count);
- HDfprintf(stderr, "\t# of records to read = %ld\n", nrecords);
+ fprintf(stderr, "Parameters:\n");
+ fprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
+ fprintf(stderr, "\t# of reads between reopens = %d\n", reopen_count);
+ fprintf(stderr, "\t# of records to read = %ld\n", nrecords);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Generating symbol names\n");
+ fprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if (generate_symbols() < 0) {
- HDfprintf(stderr, "Error generating symbol names!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error generating symbol names!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Create datatype for creating datasets */
@@ -420,28 +419,28 @@ main(int argc, char *argv[])
/* Reading records from datasets */
if (read_records(FILENAME, verbose, (unsigned long)nrecords, (unsigned)poll_time,
(unsigned)reopen_count) < 0) {
- HDfprintf(stderr, "Error reading records from datasets!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error reading records from datasets!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Releasing symbols\n");
+ fprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
- HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error releasing symbols!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing objects\n");
+ fprintf(stderr, "Closing objects\n");
/* Close objects created */
if (H5Tclose(symbol_tid) < 0) {
- HDfprintf(stderr, "Error closing symbol datatype!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error closing symbol datatype!\n");
+ exit(EXIT_FAILURE);
} /* end if */
return 0;
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c
index 3644d89..79889b1 100644
--- a/test/swmr_sparse_writer.c
+++ b/test/swmr_sparse_writer.c
@@ -73,7 +73,7 @@ open_skeleton(const char *filename, unsigned verbose)
unsigned seed; /* Seed for random number generator */
unsigned u, v; /* Local index variable */
- HDassert(filename);
+ assert(filename);
/* Create file access property list */
if ((fapl = h5_fileaccess()) < 0)
@@ -93,7 +93,7 @@ open_skeleton(const char *filename, unsigned verbose)
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Opening datasets\n");
+ fprintf(stderr, "Opening datasets\n");
/* Seed the random number generator with the attribute in the file */
if ((aid = H5Aopen(fid, "seed", H5P_DEFAULT)) < 0)
@@ -153,11 +153,11 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */
unsigned long u, v; /* Local index variables */
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
/* Create a dataspace for the record to add */
if ((mem_sid = H5Screate(H5S_SCALAR)) < 0)
@@ -287,7 +287,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing datasets\n");
+ fprintf(stderr, "Closing datasets\n");
/* Close the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -301,19 +301,19 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_sparse_writer [-q] [-f <# of records to write between\n");
- HDprintf(" flushing file contents>] <# of records>\n");
- HDprintf("\n");
- HDprintf("<# of records to write between flushing file contents> should be 0\n");
- HDprintf("(for no flushing) or between 1 and (<# of records> - 1)\n");
- HDprintf("\n");
- HDprintf("Defaults to verbose (no '-q' given) and flushing every 1000 records\n");
- HDprintf("('-f 1000')\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_sparse_writer [-q] [-f <# of records to write between\n");
+ printf(" flushing file contents>] <# of records>\n");
+ printf("\n");
+ printf("<# of records to write between flushing file contents> should be 0\n");
+ printf("(for no flushing) or between 1 and (<# of records> - 1)\n");
+ printf("\n");
+ printf("Defaults to verbose (no '-q' given) and flushing every 1000 records\n");
+ printf("('-f 1000')\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
}
int
@@ -369,14 +369,14 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose) {
- HDfprintf(stderr, "Parameters:\n");
- HDfprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
- HDfprintf(stderr, "\t# of records to write = %ld\n", nrecords);
+ fprintf(stderr, "Parameters:\n");
+ fprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
+ fprintf(stderr, "\t# of records to write = %ld\n", nrecords);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Generating symbol names\n");
+ fprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if (generate_symbols() < 0)
@@ -384,12 +384,12 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
+ fprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
/* Open file skeleton */
if ((fid = open_skeleton(FILENAME, verbose)) < 0) {
- HDfprintf(stderr, "Error opening skeleton file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error opening skeleton file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -397,32 +397,32 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Adding records\n");
+ fprintf(stderr, "Adding records\n");
/* Append records to datasets */
if (add_records(fid, verbose, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
- HDfprintf(stderr, "Error appending records to datasets!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error appending records to datasets!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Releasing symbols\n");
+ fprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
- HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error releasing symbols!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing objects\n");
+ fprintf(stderr, "Closing objects\n");
/* Close objects opened */
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Error closing file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error closing file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
return 0;
diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c
index cd02457..78953d8 100644
--- a/test/swmr_start_write.c
+++ b/test/swmr_start_write.c
@@ -71,7 +71,7 @@ create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
hid_t sid; /* Dataspace ID */
hid_t aid; /* Attribute ID */
- HDassert(filename);
+ assert(filename);
/* Create file access property list */
if ((fapl = h5_fileaccess()) < 0)
@@ -87,7 +87,7 @@ create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Creating file without SWMR access\n");
+ fprintf(verbose_file, "Creating file without SWMR access\n");
/* Create the file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
@@ -145,7 +145,7 @@ create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file,
hsize_t chunk_dims[2] = {1, CHUNK_SIZE}; /* Chunk dimensions */
unsigned u, v; /* Local index variable */
- HDassert(index_type);
+ assert(index_type);
/* Create datatype for creating datasets */
if ((tid = create_symbol_datatype()) < 0)
@@ -174,7 +174,7 @@ create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file,
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Creating datasets\n");
+ fprintf(verbose_file, "Creating datasets\n");
/* Create the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -219,11 +219,11 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecor
unsigned long rec_to_flush; /* # of records left to write before flush */
unsigned long u, v; /* Local index variables */
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
/* Create a dataspace for the record to add */
if ((mem_sid = H5Screate(H5S_SCALAR)) < 0)
@@ -306,7 +306,7 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecor
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Closing datasets\n");
+ fprintf(verbose_file, "Closing datasets\n");
/* Close the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -320,27 +320,27 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecor
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_start_write [-f <# of records to write between flushing file contents>]\n");
- HDprintf(" [-i <index type>] [-c <deflate compression level>]\n");
- HDprintf(" [-r <random seed>] [-q] <# of records>\n");
- HDprintf("\n");
- HDprintf("<# of records to write between flushing file contents> should be 0\n");
- HDprintf("(for no flushing) or between 1 and (<# of records> - 1).\n");
- HDprintf("\n");
- HDprintf("<index type> should be b2 or ea\n");
- HDprintf("\n");
- HDprintf("<deflate compression level> should be -1 (for no compression) or 0-9\n");
- HDprintf("\n");
- HDprintf("<# of records> must be specified.\n");
- HDprintf("\n");
- HDprintf("Defaults to flushing every 10000 records ('-f 10000'),\n");
- HDprintf("v1 b-tree indexing (-i b1), compression ('-c -1'),\n");
- HDprintf("will generate a random seed (no -r given), and verbose (no '-q' given)\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_start_write [-f <# of records to write between flushing file contents>]\n");
+ printf(" [-i <index type>] [-c <deflate compression level>]\n");
+ printf(" [-r <random seed>] [-q] <# of records>\n");
+ printf("\n");
+ printf("<# of records to write between flushing file contents> should be 0\n");
+ printf("(for no flushing) or between 1 and (<# of records> - 1).\n");
+ printf("\n");
+ printf("<index type> should be b2 or ea\n");
+ printf("\n");
+ printf("<deflate compression level> should be -1 (for no compression) or 0-9\n");
+ printf("\n");
+ printf("<# of records> must be specified.\n");
+ printf("\n");
+ printf("Defaults to flushing every 10000 records ('-f 10000'),\n");
+ printf("v1 b-tree indexing (-i b1), compression ('-c -1'),\n");
+ printf("will generate a random seed (no -r given), and verbose (no '-q' given)\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
} /* usage() */
/*
@@ -375,7 +375,7 @@ main(int argc, char *argv[])
switch (argv[u][1]) {
/* Compress dataset chunks */
case 'c':
- comp_level = HDatoi(argv[u + 1]);
+ comp_level = atoi(argv[u + 1]);
if (comp_level < -1 || comp_level > 9)
usage();
u += 2;
@@ -406,7 +406,7 @@ main(int argc, char *argv[])
/* Random # seed */
case 'r':
use_seed = TRUE;
- temp = HDatoi(argv[u + 1]);
+ temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
else
@@ -449,33 +449,33 @@ main(int argc, char *argv[])
char verbose_name[1024];
HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
- if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) {
- HDfprintf(stderr, "Can't open verbose output file!\n");
- HDexit(EXIT_FAILURE);
+ if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
+ fprintf(stderr, "Can't open verbose output file!\n");
+ exit(EXIT_FAILURE);
}
} /* end if */
/* Emit informational message */
if (verbose) {
- HDfprintf(verbose_file, "Parameters:\n");
- HDfprintf(verbose_file, "\tindex type = %s\n", index_type);
- HDfprintf(verbose_file, "\tcompression level = %d\n", comp_level);
- HDfprintf(verbose_file, "\t# of records between flushes = %ld\n", flush_count);
- HDfprintf(verbose_file, "\t# of records to write = %ld\n", nrecords);
+ fprintf(verbose_file, "Parameters:\n");
+ fprintf(verbose_file, "\tindex type = %s\n", index_type);
+ fprintf(verbose_file, "\tcompression level = %d\n", comp_level);
+ fprintf(verbose_file, "\t# of records between flushes = %ld\n", flush_count);
+ fprintf(verbose_file, "\t# of records to write = %ld\n", nrecords);
} /* end if */
/* ALWAYS emit the random seed for possible debugging */
- HDfprintf(stdout, "Using writer random seed: %u\n", random_seed);
+ fprintf(stdout, "Using writer random seed: %u\n", random_seed);
/* Create the test file */
if ((fid = create_file(FILENAME, verbose, verbose_file, random_seed)) < 0) {
- HDfprintf(stderr, "Error creating the file...\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error creating the file...\n");
+ exit(EXIT_FAILURE);
}
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Generating symbol names\n");
+ fprintf(verbose_file, "Generating symbol names\n");
/* Generate dataset names */
if (generate_symbols() < 0)
@@ -483,14 +483,14 @@ main(int argc, char *argv[])
/* Create the datasets in the file */
if (create_datasets(fid, comp_level, verbose, verbose_file, index_type) < 0) {
- HDfprintf(stderr, "Error creating datasets...\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error creating datasets...\n");
+ exit(EXIT_FAILURE);
}
/* Enable SWMR writing mode */
if (H5Fstart_swmr_write(fid) < 0) {
- HDfprintf(stderr, "Error starting SWMR writing mode...\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error starting SWMR writing mode...\n");
+ exit(EXIT_FAILURE);
}
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -498,32 +498,32 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Adding records\n");
+ fprintf(verbose_file, "Adding records\n");
/* Append records to datasets */
if (add_records(fid, verbose, verbose_file, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
- HDfprintf(stderr, "Error appending records to datasets!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error appending records to datasets!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Releasing symbols\n");
+ fprintf(verbose_file, "Releasing symbols\n");
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
- HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error releasing symbols!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Closing the file\n");
+ fprintf(verbose_file, "Closing the file\n");
/* Close objects opened */
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Error closing file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error closing file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
return 0;
diff --git a/test/swmr_writer.c b/test/swmr_writer.c
index 5f41215..2fd559d 100644
--- a/test/swmr_writer.c
+++ b/test/swmr_writer.c
@@ -75,7 +75,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
unsigned u, v; /* Local index variable */
hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */
- HDassert(filename);
+ assert(filename);
/* Create file access property list */
if ((fapl = h5_fileaccess()) < 0)
@@ -105,7 +105,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Opening datasets\n");
+ fprintf(verbose_file, "Opening datasets\n");
/* Open the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -155,11 +155,11 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecor
unsigned long rec_to_flush; /* # of records left to write before flush */
unsigned long u, v; /* Local index variables */
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
/* Create a dataspace for the record to add */
if ((mem_sid = H5Screate(H5S_SCALAR)) < 0)
@@ -242,7 +242,7 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecor
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Closing datasets\n");
+ fprintf(verbose_file, "Closing datasets\n");
/* Close the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -256,21 +256,21 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecor
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_writer [-q] [-o] [-f <# of records to write between flushing\n");
- HDprintf(" file contents>] [-r <random seed>] <# of records>\n");
- HDprintf("\n");
- HDprintf("<# of records to write between flushing file contents> should be 0\n");
- HDprintf("(for no flushing) or between 1 and (<# of records> - 1).\n");
- HDprintf("\n");
- HDprintf("<# of records> must be specified.\n");
- HDprintf("\n");
- HDprintf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
- HDprintf("flushing every 10000 records ('-f 10000'), and will generate a random seed (no -r given).\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_writer [-q] [-o] [-f <# of records to write between flushing\n");
+ printf(" file contents>] [-r <random seed>] <# of records>\n");
+ printf("\n");
+ printf("<# of records to write between flushing file contents> should be 0\n");
+ printf("(for no flushing) or between 1 and (<# of records> - 1).\n");
+ printf("\n");
+ printf("<# of records> must be specified.\n");
+ printf("\n");
+ printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
+ printf("flushing every 10000 records ('-f 10000'), and will generate a random seed (no -r given).\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
}
int
@@ -312,7 +312,7 @@ main(int argc, char *argv[])
/* Random # seed */
case 'r':
use_seed = TRUE;
- temp = HDatoi(argv[u + 1]);
+ temp = atoi(argv[u + 1]);
random_seed = (unsigned)temp;
u += 2;
break;
@@ -357,25 +357,25 @@ main(int argc, char *argv[])
char verbose_name[1024];
HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
- if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) {
- HDfprintf(stderr, "Can't open verbose output file!\n");
- HDexit(EXIT_FAILURE);
+ if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
+ fprintf(stderr, "Can't open verbose output file!\n");
+ exit(EXIT_FAILURE);
}
} /* end if */
/* Emit informational message */
if (verbose) {
- HDfprintf(verbose_file, "Parameters:\n");
- HDfprintf(verbose_file, "\t# of records between flushes = %ld\n", flush_count);
- HDfprintf(verbose_file, "\t# of records to write = %ld\n", nrecords);
+ fprintf(verbose_file, "Parameters:\n");
+ fprintf(verbose_file, "\t# of records between flushes = %ld\n", flush_count);
+ fprintf(verbose_file, "\t# of records to write = %ld\n", nrecords);
} /* end if */
/* ALWAYS emit the random seed for possible debugging */
- HDfprintf(stdout, "Using writer random seed: %u\n", random_seed);
+ fprintf(stdout, "Using writer random seed: %u\n", random_seed);
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Generating symbol names\n");
+ fprintf(verbose_file, "Generating symbol names\n");
/* Generate dataset names */
if (generate_symbols() < 0)
@@ -383,12 +383,12 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Opening skeleton file: %s\n", FILENAME);
+ fprintf(verbose_file, "Opening skeleton file: %s\n", FILENAME);
/* Open file skeleton */
if ((fid = open_skeleton(FILENAME, verbose, verbose_file, random_seed, old)) < 0) {
- HDfprintf(stderr, "Error opening skeleton file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error opening skeleton file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -396,32 +396,32 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Adding records\n");
+ fprintf(verbose_file, "Adding records\n");
/* Append records to datasets */
if (add_records(fid, verbose, verbose_file, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
- HDfprintf(stderr, "Error appending records to datasets!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error appending records to datasets!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Releasing symbols\n");
+ fprintf(verbose_file, "Releasing symbols\n");
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
- HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error releasing symbols!\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(verbose_file, "Closing objects\n");
+ fprintf(verbose_file, "Closing objects\n");
/* Close objects opened */
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Error closing file!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error closing file!\n");
+ exit(EXIT_FAILURE);
} /* end if */
return 0;
diff --git a/test/tarray.c b/test/tarray.c
index 06eac90..96023fc 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -1055,7 +1055,7 @@ test_array_alloc_custom(size_t size, void *info)
*/
extra = MAX(sizeof(void *), sizeof(size_t));
- if ((ret_value = HDmalloc(extra + size)) != NULL) {
+ if ((ret_value = malloc(extra + size)) != NULL) {
*(size_t *)ret_value = size;
*mem_used += size;
} /* end if */
@@ -1093,7 +1093,7 @@ test_array_free_custom(void *_mem, void *info)
if (_mem != NULL) {
mem = ((unsigned char *)_mem) - extra;
*mem_used -= *(size_t *)((void *)mem);
- HDfree(mem);
+ free(mem);
} /* end if */
} /* end test_array_free_custom() */
@@ -1136,7 +1136,7 @@ test_array_vlen_atomic(void)
/* Initialize array data to write */
for (i = 0; i < SPACE1_DIM1; i++)
for (j = 0; j < ARRAY1_DIM1; j++) {
- wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int));
+ wdata[i][j].p = malloc((size_t)(i + j + 1) * sizeof(unsigned int));
wdata[i][j].len = (size_t)(i + j + 1);
for (k = 0; k < (i + j + 1); k++)
((unsigned int *)wdata[i][j].p)[k] = (unsigned int)(i * 100 + j * 10 + k);
@@ -1357,7 +1357,7 @@ test_array_vlen_array(void)
/* Initialize array data to write */
for (i = 0; i < SPACE1_DIM1; i++)
for (j = 0; j < ARRAY1_DIM1; j++) {
- wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int) * (size_t)ARRAY1_DIM1);
+ wdata[i][j].p = malloc((size_t)(i + j + 1) * sizeof(unsigned int) * (size_t)ARRAY1_DIM1);
wdata[i][j].len = (size_t)(i + j + 1);
for (k = 0; k < (i + j + 1); k++)
for (l = 0; l < ARRAY1_DIM1; l++)
@@ -1632,9 +1632,9 @@ test_array_bkg(void)
/* Initialize the data */
/* ------------------- */
- dtsinfo = (CmpDTSinfo *)HDmalloc(sizeof(CmpDTSinfo));
- CHECK_PTR(dtsinfo, "HDmalloc");
- HDmemset(dtsinfo, 0, sizeof(CmpDTSinfo));
+ dtsinfo = (CmpDTSinfo *)malloc(sizeof(CmpDTSinfo));
+ CHECK_PTR(dtsinfo, "malloc");
+ memset(dtsinfo, 0, sizeof(CmpDTSinfo));
for (i = 0; i < LENGTH; i++) {
for (j = 0; j < ALEN; j++) {
cf[i].a[j] = 100 * (i + 1) + j;
@@ -1662,7 +1662,7 @@ test_array_bkg(void)
/* Initialize the names of data members */
/* ------------------------------------ */
for (i = 0; i < dtsinfo->nsubfields; i++)
- dtsinfo->name[i] = (char *)HDcalloc((size_t)20, sizeof(char));
+ dtsinfo->name[i] = (char *)calloc((size_t)20, sizeof(char));
HDstrcpy(dtsinfo->name[0], "One");
HDstrcpy(dtsinfo->name[1], "Two");
@@ -1734,7 +1734,7 @@ test_array_bkg(void)
/* Release memory resources */
/* ------------------------ */
for (i = 0; i < dtsinfo->nsubfields; i++)
- HDfree(dtsinfo->name[i]);
+ free(dtsinfo->name[i]);
/* Release IDs */
/* ----------- */
@@ -1849,7 +1849,7 @@ test_array_bkg(void)
/* Reset the data to read in */
/* ------------------------- */
- HDmemset(cfr, 0, sizeof(CmpField) * LENGTH);
+ memset(cfr, 0, sizeof(CmpField) * LENGTH);
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfr);
CHECK(status, FAIL, "H5Dread");
@@ -1885,7 +1885,7 @@ test_array_bkg(void)
status = H5Fclose(fid);
CHECK(status, FAIL, "H5Fclose");
- HDfree(dtsinfo);
+ free(dtsinfo);
} /* end test_array_bkg() */
/*-------------------------------------------------------------------------
@@ -1937,7 +1937,7 @@ test_compat(void)
if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0)
TestErrPrintf("can't check if VFD is default VFD compatible\n");
if (!driver_is_default_compatible) {
- HDprintf(" -- SKIPPED --\n");
+ printf(" -- SKIPPED --\n");
return;
}
@@ -2193,7 +2193,7 @@ test_compat(void)
CHECK_I(ret, "H5Fclose");
} /* end if */
else
- HDprintf("***cannot open the pre-created compound datatype test file (%s)\n", testfile);
+ printf("***cannot open the pre-created compound datatype test file (%s)\n", testfile);
} /* end test_compat() */
diff --git a/test/tattr.c b/test/tattr.c
index 5dd5736..ab69699 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -301,8 +301,8 @@ test_attr_basic_write(hid_t fapl)
CHECK(attr_name_size, FAIL, "H5Aget_name");
if (attr_name_size > 0) {
- attr_name = (char *)HDcalloc((size_t)(attr_name_size + 1), sizeof(char));
- CHECK_PTR(attr_name, "HDcalloc");
+ attr_name = (char *)calloc((size_t)(attr_name_size + 1), sizeof(char));
+ CHECK_PTR(attr_name, "calloc");
if (attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
@@ -310,7 +310,7 @@ test_attr_basic_write(hid_t fapl)
ret = HDstrcmp(attr_name, ATTR_TMP_NAME);
VERIFY(ret, 0, "HDstrcmp");
- HDfree(attr_name);
+ free(attr_name);
attr_name = NULL;
} /* end if */
} /* end if */
@@ -338,8 +338,8 @@ test_attr_basic_write(hid_t fapl)
CHECK(attr_name_size, FAIL, "H5Aget_name");
if (attr_name_size > 0) {
- attr_name = (char *)HDcalloc((size_t)(attr_name_size + 1), sizeof(char));
- CHECK_PTR(attr_name, "HDcalloc");
+ attr_name = (char *)calloc((size_t)(attr_name_size + 1), sizeof(char));
+ CHECK_PTR(attr_name, "calloc");
if (attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
@@ -347,7 +347,7 @@ test_attr_basic_write(hid_t fapl)
ret = HDstrcmp(attr_name, ATTR1A_NAME);
VERIFY(ret, 0, "HDstrcmp");
- HDfree(attr_name);
+ free(attr_name);
attr_name = NULL;
} /* end if */
} /* end if */
@@ -917,11 +917,11 @@ test_attr_compound_read(hid_t fapl)
/* Verify values read in */
for (i = 0; i < ATTR4_DIM1; i++)
for (j = 0; j < ATTR4_DIM2; j++)
- if (HDmemcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct)) != 0) {
- HDprintf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n",
- __LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i);
- HDprintf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n",
- __LINE__, i, j, attr_data4[i][j].d, i, j, read_data4[i][j].d);
+ if (memcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct)) != 0) {
+ printf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n",
+ __LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i);
+ printf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n",
+ __LINE__, i, j, attr_data4[i][j].d, i, j, read_data4[i][j].d);
TestErrPrintf(
"%d: attribute data different: attr_data4[%d][%d].c=%c, read_data4[%d][%d].c=%c\n",
__LINE__, i, j, attr_data4[i][j].c, i, j, read_data4[i][j].c);
@@ -1062,8 +1062,8 @@ test_attr_scalar_read(hid_t fapl)
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_FLT_ABS_EQUAL(rdata, attr_data5))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Aread",
- (double)attr_data5, (double)rdata, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Aread",
+ (double)attr_data5, (double)rdata, (int)__LINE__, __FILE__);
/* Get the attribute's dataspace */
sid = H5Aget_space(attr);
@@ -4609,7 +4609,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -4692,7 +4692,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -4813,7 +4813,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -4923,7 +4923,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -5154,7 +5154,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -5208,7 +5208,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create several attributes, but keep storage in compact form */
@@ -5369,7 +5369,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -5563,7 +5563,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -5684,19 +5684,19 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
old_nerrs = GetTestNumErrs();
/* Verify the information for first attribute, in increasing creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in increasing creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing creation order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -5709,20 +5709,20 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
*/
if (use_index) {
/* Verify the information for first attribute, in native creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, (hsize_t)0, &ainfo,
H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in native creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing native order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -5731,19 +5731,19 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
} /* end if */
/* Verify the information for first attribute, in decreasing creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, n, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in increasing creation order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing creation order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -5751,19 +5751,19 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in increasing name order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing name order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -5775,19 +5775,19 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
*/
/* Verify the information for first attribute, in decreasing name order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, n, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, 0, "H5Aget_info_by_idx");
/* Verify the information for new attribute, in increasing name order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_idx");
VERIFY(ainfo.corder, n, "H5Aget_info_by_idx");
/* Verify the name for new link, in increasing name order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
@@ -5892,7 +5892,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -6414,7 +6414,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -6486,7 +6486,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Delete attributes from compact storage */
@@ -6496,7 +6496,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify the attribute information for first attribute in appropriate order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, &ainfo,
H5P_DEFAULT);
if (new_format) {
@@ -6509,7 +6509,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Verify the name for first attribute in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
@@ -6545,7 +6545,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -6618,7 +6618,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Delete attributes from dense storage */
@@ -6628,7 +6628,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify the attribute information for first attribute in appropriate order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, &ainfo,
H5P_DEFAULT);
if (new_format) {
@@ -6641,7 +6641,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Verify the name for first attribute in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
@@ -6688,7 +6688,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create attributes, to push into dense form */
@@ -6735,7 +6735,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Delete every other attribute from dense storage, in appropriate order */
@@ -6745,7 +6745,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify the attribute information for first attribute in appropriate order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, &ainfo,
H5P_DEFAULT);
if (new_format) {
@@ -6759,7 +6759,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Verify the name for first attribute in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
@@ -6788,7 +6788,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Delete remaining attributes from dense storage, in appropriate order */
@@ -6798,7 +6798,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify the attribute information for first attribute in appropriate order */
- HDmemset(&ainfo, 0, sizeof(ainfo));
+ memset(&ainfo, 0, sizeof(ainfo));
ret = H5Aget_info_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, &ainfo,
H5P_DEFAULT);
if (new_format) {
@@ -6812,7 +6812,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Verify the name for first attribute in appropriate order */
- HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
+ memset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
@@ -6998,7 +6998,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
@@ -7013,7 +7013,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7028,7 +7028,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7044,7 +7044,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
@@ -7060,7 +7060,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
@@ -7077,7 +7077,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -7091,7 +7091,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7108,7 +7108,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -7122,7 +7122,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7139,7 +7139,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -7154,7 +7154,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)oskip : ((max_attrs - 1) - oskip);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
@@ -7171,7 +7171,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
else {
unsigned nvisit = 0; /* # of links visited */
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
if (iter_info->visited[v] == TRUE)
nvisit++;
@@ -7186,7 +7186,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate2");
@@ -7198,7 +7198,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7210,7 +7210,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7223,7 +7223,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate1");
@@ -7318,8 +7318,8 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- visited = (hbool_t *)HDmalloc(sizeof(hbool_t) * iter_info.max_visit);
- CHECK_PTR(visited, "HDmalloc");
+ visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit);
+ CHECK_PTR(visited, "malloc");
iter_info.visited = visited;
/* Loop over operating on different indices on link fields */
@@ -7404,7 +7404,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -7506,7 +7506,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -7610,7 +7610,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Free the "visited link" array */
- HDfree(visited);
+ free(visited);
} /* test_attr_iterate2() */
/*-------------------------------------------------------------------------
@@ -7799,7 +7799,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -7877,7 +7877,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -8139,7 +8139,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -8245,7 +8245,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -8434,7 +8434,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Check on dataset's attribute storage status */
@@ -8497,7 +8497,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
break;
default:
- HDassert(0 && "Too many datasets!");
+ assert(0 && "Too many datasets!");
} /* end switch */
/* Create more attributes, to push into dense form */
@@ -8608,9 +8608,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Writing Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
- HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
+ memset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
sid = H5Screate(H5S_SCALAR);
@@ -8905,7 +8905,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_write() */
/****************************************************************
@@ -8945,9 +8945,9 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Renaming Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
- HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
+ memset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
sid = H5Screate(H5S_SCALAR);
@@ -9353,7 +9353,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_rename() */
/****************************************************************
@@ -9392,9 +9392,9 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Deleting Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
- HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
+ memset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
sid = H5Screate(H5S_SCALAR);
@@ -9725,7 +9725,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_delete() */
/****************************************************************
@@ -9764,9 +9764,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Unlinking Object with Shared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
- HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
+ memset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
sid = H5Screate(H5S_SCALAR);
@@ -10084,7 +10084,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_unlink() */
/****************************************************************
@@ -11374,8 +11374,8 @@ test_attr_delete_last_dense(hid_t fcpl, hid_t fapl)
CHECK(aid, FAIL, "H5Acreate2");
/* Allocate the data buffer */
- data = (double *)HDmalloc((size_t)(DIM0 * DIM1) * sizeof(double));
- CHECK_PTR(data, "HDmalloc");
+ data = (double *)malloc((size_t)(DIM0 * DIM1) * sizeof(double));
+ CHECK_PTR(data, "malloc");
/* Initialize the data */
for (i = 0; i < DIM0; i++)
@@ -11416,7 +11416,7 @@ test_attr_delete_last_dense(hid_t fcpl, hid_t fapl)
/* Free the data buffer */
if (data)
- HDfree(data);
+ free(data);
} /* test_attr_delete_last_dense() */
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index 2d5c239..0065c06 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -45,13 +45,13 @@ unsigned release = H5_VERS_RELEASE;
void
showhelp(void)
{
- HDprintf("Usage: " progname " [-h] [-t<vers>]\n");
- HDprintf("\t-h\tShow this page and version information\n");
- HDprintf("\t-t<vers>: Test by changing (adding 1 to) the <vers> to trigger\n");
- HDprintf("\t\t the warning. <vers> can be:\n");
- HDprintf("\t\t\tM for Major version number (%d)\n", H5_VERS_MAJOR);
- HDprintf("\t\t\tm for Minor version number (%d)\n", H5_VERS_MINOR);
- HDprintf("\t\t\tr for Release number (%d)\n", H5_VERS_RELEASE);
+ printf("Usage: " progname " [-h] [-t<vers>]\n");
+ printf("\t-h\tShow this page and version information\n");
+ printf("\t-t<vers>: Test by changing (adding 1 to) the <vers> to trigger\n");
+ printf("\t\t the warning. <vers> can be:\n");
+ printf("\t\t\tM for Major version number (%d)\n", H5_VERS_MAJOR);
+ printf("\t\t\tm for Minor version number (%d)\n", H5_VERS_MINOR);
+ printf("\t\t\tr for Release number (%d)\n", H5_VERS_RELEASE);
}
void
@@ -62,8 +62,8 @@ parse(int ac, char **av)
while (--ac > 0) {
pt = *(++av);
if (*pt != '-') {
- HDfprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
+ exit(EXIT_FAILURE);
}
else {
switch (*(++pt)) {
@@ -79,16 +79,16 @@ parse(int ac, char **av)
release++;
break;
default:
- HDfprintf(stderr, "Unknown -v parameter (%s). Aborted.\n", *av);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Unknown -v parameter (%s). Aborted.\n", *av);
+ exit(EXIT_FAILURE);
}
break;
case 'h': /* help page */
showhelp();
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
default:
- HDfprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
+ exit(EXIT_FAILURE);
}
}
}
@@ -106,7 +106,7 @@ parse(int ac, char **av)
H5_ATTR_NORETURN void
abort_intercept(int H5_ATTR_UNUSED sig)
{
- HDexit(6);
+ exit(6);
}
#ifdef H5_HAVE_WIN32_API
diff --git a/test/tchecksum.c b/test/tchecksum.c
index a77ffcd..e1c2a1a 100644
--- a/test/tchecksum.c
+++ b/test/tchecksum.c
@@ -57,7 +57,7 @@ test_chksum_size_one(void)
VERIFY(chksum, 0xa209c931, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
chksum = H5_checksum_fletcher32(buf, sizeof(buf));
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -90,7 +90,7 @@ test_chksum_size_two(void)
VERIFY(chksum, 0x8ba7a6c9, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
chksum = H5_checksum_fletcher32(buf, sizeof(buf));
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -123,7 +123,7 @@ test_chksum_size_three(void)
VERIFY(chksum, 0xcebdf4f0, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
chksum = H5_checksum_fletcher32(buf, sizeof(buf));
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -156,7 +156,7 @@ test_chksum_size_four(void)
VERIFY(chksum, 0x2c88bb51, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
chksum = H5_checksum_fletcher32(buf, sizeof(buf));
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -180,8 +180,8 @@ test_chksum_large(void)
size_t u; /* Local index variable */
/* Allocate the buffer */
- large_buf = (uint8_t *)HDmalloc((size_t)BUF_LEN);
- CHECK_PTR(large_buf, "HDmalloc");
+ large_buf = (uint8_t *)malloc((size_t)BUF_LEN);
+ CHECK_PTR(large_buf, "malloc");
/* Initialize buffer w/known data */
for (u = 0; u < BUF_LEN; u++)
@@ -198,7 +198,7 @@ test_chksum_large(void)
VERIFY(chksum, 0x1bd2ee7b, "H5_checksum_lookup3");
/* Buffer w/zero(s) for data */
- HDmemset(large_buf, 0, (size_t)BUF_LEN);
+ memset(large_buf, 0, (size_t)BUF_LEN);
chksum = H5_checksum_fletcher32(large_buf, (size_t)BUF_LEN);
VERIFY(chksum, 0, "H5_checksum_fletcher32");
@@ -209,7 +209,7 @@ test_chksum_large(void)
VERIFY(chksum, 0x930c7afc, "H5_checksum_lookup3");
/* Release memory for buffer */
- HDfree(large_buf);
+ free(large_buf);
} /* test_chksum_large() */
/****************************************************************
diff --git a/test/tcoords.c b/test/tcoords.c
index 230db60..88931fc 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -86,7 +86,7 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
}
/* Construct dataset's name */
- HDmemset(dset_name, 0, (size_t)NAME_LEN);
+ memset(dset_name, 0, (size_t)NAME_LEN);
HDstrcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
HDstrcat(dset_name, "_chunked");
@@ -258,7 +258,7 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
hsize_t mem3_block[4] = {1, 3, 6, 1};
/* Construct dataset's name */
- HDmemset(dset_name, 0, NAME_LEN);
+ memset(dset_name, 0, NAME_LEN);
HDstrcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
HDstrcat(dset_name, "_chunked");
@@ -435,18 +435,18 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
hsize_t mem5_block[8] = {4, 5, 1, 4, 2, 1, 6, 2};
/* Initialize dynamic arrays */
- data_buf = HDcalloc(1, sizeof(*data_buf));
- CHECK_PTR(data_buf, "HDcalloc");
- mem1_buffer = HDcalloc(1, sizeof(*mem1_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem2_buffer = HDcalloc(1, sizeof(*mem2_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem3_buffer = HDcalloc(1, sizeof(*mem3_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem4_buffer = HDcalloc(1, sizeof(*mem4_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem5_buffer = HDcalloc(1, sizeof(*mem5_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
+ data_buf = calloc(1, sizeof(*data_buf));
+ CHECK_PTR(data_buf, "calloc");
+ mem1_buffer = calloc(1, sizeof(*mem1_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem2_buffer = calloc(1, sizeof(*mem2_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem3_buffer = calloc(1, sizeof(*mem3_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem4_buffer = calloc(1, sizeof(*mem4_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem5_buffer = calloc(1, sizeof(*mem5_buffer));
+ CHECK_PTR(data_buf, "calloc");
/* Create and write the dataset */
sid = H5Screate_simple(8, da_dims, da_dims);
@@ -461,7 +461,7 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
}
/* Construct dataset's name */
- HDmemset(dset_name, 0, NAME_LEN);
+ memset(dset_name, 0, NAME_LEN);
HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
HDstrcat(dset_name, "_chunked");
@@ -664,12 +664,12 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
ret = H5Pclose(plid);
CHECK(ret, FAIL, "H5Pclose");
- HDfree(data_buf);
- HDfree(mem1_buffer);
- HDfree(mem2_buffer);
- HDfree(mem3_buffer);
- HDfree(mem4_buffer);
- HDfree(mem5_buffer);
+ free(data_buf);
+ free(mem1_buffer);
+ free(mem2_buffer);
+ free(mem3_buffer);
+ free(mem4_buffer);
+ free(mem5_buffer);
}
/****************************************************************
diff --git a/test/testframe.c b/test/testframe.c
index f3cf781..1583c60 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -72,12 +72,12 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
{
/* Sanity checking */
if (HDstrlen(TheDescr) >= MAXTESTDESC) {
- HDprintf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC);
- HDexit(EXIT_FAILURE);
+ printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC);
+ exit(EXIT_FAILURE);
} /* end if */
if (HDstrlen(TheName) >= MAXTESTNAME) {
- HDprintf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME);
- HDexit(EXIT_FAILURE);
+ printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME);
+ exit(EXIT_FAILURE);
} /* end if */
/* Check for increasing the Test array size */
@@ -86,10 +86,10 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
unsigned newAlloc = MAX(1, TestAlloc * 2); /* New array size */
/* Reallocate array */
- if (NULL == (newTest = (TestStruct *)HDrealloc(Test, newAlloc * sizeof(TestStruct)))) {
- HDprintf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc,
- newAlloc);
- HDexit(EXIT_FAILURE);
+ if (NULL == (newTest = (TestStruct *)realloc(Test, newAlloc * sizeof(TestStruct)))) {
+ printf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc,
+ newAlloc);
+ exit(EXIT_FAILURE);
} /* end if */
/* Update info */
@@ -230,7 +230,7 @@ TestParseCmdLine(int argc, char *argv[])
}
else {
TestUsage();
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else if (((HDstrcmp(*argv, "-exclude") == 0) || (HDstrcmp(*argv, "-x") == 0))) {
@@ -241,7 +241,7 @@ TestParseCmdLine(int argc, char *argv[])
}
else {
TestUsage();
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else if (((HDstrcmp(*argv, "-begin") == 0) || (HDstrcmp(*argv, "-b") == 0))) {
@@ -252,7 +252,7 @@ TestParseCmdLine(int argc, char *argv[])
}
else {
TestUsage();
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else if (((HDstrcmp(*argv, "-only") == 0) || (HDstrcmp(*argv, "-o") == 0))) {
@@ -272,7 +272,7 @@ TestParseCmdLine(int argc, char *argv[])
}
else {
TestUsage();
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
@@ -281,7 +281,7 @@ TestParseCmdLine(int argc, char *argv[])
enable_error_stack = 1;
else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
TestUsage();
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
SetTestNoCleanup();
@@ -295,7 +295,7 @@ TestParseCmdLine(int argc, char *argv[])
if (NULL != TestPrivateParser) {
ret_code = TestPrivateParser(argc + 1, argv - 1);
if (ret_code != 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
@@ -378,7 +378,7 @@ void
TestShutdown(void)
{
if (Test)
- HDfree(Test);
+ free(Test);
}
/*
@@ -530,7 +530,7 @@ ParseTestVerbosity(char *argv)
else if (*argv == 'h')
SetTestVerbosity(VERBO_HI);
else
- SetTestVerbosity(HDatoi(argv));
+ SetTestVerbosity(atoi(argv));
}
/*
@@ -574,9 +574,9 @@ TestErrPrintf(const char *format, ...)
num_errs++;
/* Print the requested information */
- HDva_start(arglist, format);
+ va_start(arglist, format);
ret_value = HDvprintf(format, arglist);
- HDva_end(arglist);
+ va_end(arglist);
/* Return the length of the string produced (like printf() does) */
return ret_value;
@@ -624,7 +624,7 @@ SetTest(const char *testname, int action)
break;
default:
/* error */
- HDprintf("*** ERROR: Unknown action (%d) for SetTest\n", action);
+ printf("*** ERROR: Unknown action (%d) for SetTest\n", action);
break;
}
}
@@ -646,7 +646,7 @@ TestAlarmOn(void)
alarm_sec = (unsigned)HDstrtoul(env_val, (char **)NULL, 10);
/* Set the number of seconds before alarm goes off */
- HDalarm((unsigned)alarm_sec);
+ alarm((unsigned)alarm_sec);
#endif
}
@@ -656,6 +656,6 @@ TestAlarmOff(void)
{
#ifdef H5_HAVE_ALARM
/* Set the number of seconds to zero */
- HDalarm(0);
+ alarm(0);
#endif
}
diff --git a/test/testhdf5.c b/test/testhdf5.c
index 711c9dc..82bc2b6 100644
--- a/test/testhdf5.c
+++ b/test/testhdf5.c
@@ -89,7 +89,7 @@ main(int argc, char *argv[])
/* Exit failure if errors encountered; else exit success. */
/* No need to print anything since PerformTests() already does. */
if (GetTestNumErrs() > 0)
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
else
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end main() */
diff --git a/test/testmeta.c b/test/testmeta.c
index d844c2e..048e3a6 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -101,8 +101,8 @@ main(void)
for (j = 0; j < NDATAOBJECTS; j++) {
/* Removed print statement as it would lock system resources on Windows */
/*
- * HDprintf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS);
- * HDfflush(stdout);
+ * printf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS);
+ * fflush(stdout);
*/
floatval = (float)j;
@@ -110,7 +110,7 @@ main(void)
HDsnprintf(name, sizeof(name), "/DataArray/%06d", j);
group_id = H5Gcreate2(file_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (group_id < 0) {
- HDfprintf(stderr, "Failed to create DataArray group.\n");
+ fprintf(stderr, "Failed to create DataArray group.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -127,7 +127,7 @@ main(void)
dataset_id = H5Dcreate2(group_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
if (dataset_id < 0) {
- HDfprintf(stderr, "Failed to create DataArray dataset.\n");
+ fprintf(stderr, "Failed to create DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -135,7 +135,7 @@ main(void)
/* Write the data array data */
status = H5Dwrite(dataset_id, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0) {
- HDfprintf(stderr, "Failed to write DataArray dataset.\n");
+ fprintf(stderr, "Failed to write DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -148,7 +148,7 @@ main(void)
/* Open NumDataObj dataset */
dataset_id = H5Dopen2(file_id, "/NumDataObj", H5P_DEFAULT);
if (dataset_id < 0) {
- HDfprintf(stderr, "Failed to open NumDataObj dataset.\n");
+ fprintf(stderr, "Failed to open NumDataObj dataset.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -157,7 +157,7 @@ main(void)
numdataobj = j + 1;
status = H5Dwrite(dataset_id, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &numdataobj);
if (status < 0) {
- HDfprintf(stderr, "Failed to write NumDataObj dataset.\n");
+ fprintf(stderr, "Failed to write NumDataObj dataset.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -172,7 +172,7 @@ main(void)
HDsnprintf(name, sizeof(name), "/ExtArray%06d", i);
dataset_id = H5Dopen2(file_id, name, H5P_DEFAULT);
if (dataset_id < 0) {
- HDfprintf(stderr, "Failed to open ExtArray dataset.\n");
+ fprintf(stderr, "Failed to open ExtArray dataset.\n");
status = H5Fclose(file_id);
return -1;
} /* end if */
@@ -181,7 +181,7 @@ main(void)
dims[0] = (hsize_t)j + 1;
status = H5Dset_extent(dataset_id, dims);
if (status < 0) {
- HDfprintf(stderr, "Failed to extend DataArray dataset.\n");
+ fprintf(stderr, "Failed to extend DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
} /* end if */
@@ -198,7 +198,7 @@ main(void)
status = H5Sselect_hyperslab(dataspace_id, H5S_SELECT_SET, start, stride, count, NULL);
status = H5Dwrite(dataset_id, type_id, memspace_id, dataspace_id, H5P_DEFAULT, &floatval);
if (status < 0) {
- HDfprintf(stderr, "Failed to write DataArray dataset.\n");
+ fprintf(stderr, "Failed to write DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -214,7 +214,7 @@ main(void)
/* Close the file */
status = H5Fclose(file_id);
- HDprintf("\n");
+ printf("\n");
return 0;
}
diff --git a/test/tfile.c b/test/tfile.c
index 0556b81..66ae7d7 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -1205,8 +1205,8 @@ test_get_obj_ids(void)
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, (NGROUPS + NDSETS + 1), "H5Fget_obj_count");
- oid_list = (hid_t *)HDcalloc((size_t)oid_list_size, sizeof(hid_t));
- CHECK_PTR(oid_list, "HDcalloc");
+ oid_list = (hid_t *)calloc((size_t)oid_list_size, sizeof(hid_t));
+ CHECK_PTR(oid_list, "calloc");
/* Call the public function H5F_get_obj_ids to use H5F__get_objects. User reported having problem here.
* that the returned size (ret_count) from H5Fget_obj_ids is one greater than the size passed in
@@ -1246,7 +1246,7 @@ test_get_obj_ids(void)
H5Sclose(filespace);
H5Fclose(fid);
- HDfree(oid_list);
+ free(oid_list);
/* Reopen the file to check whether H5Fget_obj_count and H5Fget_obj_ids still works
* when the file is closed first */
@@ -1268,8 +1268,8 @@ test_get_obj_ids(void)
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, NDSETS, "H5Fget_obj_count");
- oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t));
- CHECK_PTR(oid_list, "HDcalloc");
+ oid_list = (hid_t *)calloc((size_t)oid_count, sizeof(hid_t));
+ CHECK_PTR(oid_list, "calloc");
/* Get the list of all opened objects */
ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list);
@@ -1284,7 +1284,7 @@ test_get_obj_ids(void)
}
H5E_END_TRY;
- HDfree(oid_list);
+ free(oid_list);
}
/****************************************************************
@@ -1503,7 +1503,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, hid_t gid2,
if (oid_count > 0) {
hid_t *oid_list;
- oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t));
+ oid_list = (hid_t *)calloc((size_t)oid_count, sizeof(hid_t));
if (oid_list != NULL) {
int i;
@@ -1553,7 +1553,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, hid_t gid2,
} /* end switch */
} /* end for */
- HDfree(oid_list);
+ free(oid_list);
} /* end if */
} /* end if */
@@ -2795,7 +2795,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
CHECK(tid1, FAIL, "H5Tcopy");
/* Second file's dataset read */
- HDmemset(buffer, 0, sizeof(char *) * 5);
+ memset(buffer, 0, sizeof(char *) * 5);
ret = H5Dread(did2, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
CHECK(ret, FAIL, "H5Dread");
ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, buffer);
@@ -2810,7 +2810,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
CHECK(ret, FAIL, "H5Fclose");
/* First file's dataset read */
- HDmemset(buffer, 0, sizeof(char *) * 5);
+ memset(buffer, 0, sizeof(char *) * 5);
ret = H5Dread(did1, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
CHECK(ret, FAIL, "H5Dread");
ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, buffer);
@@ -3181,19 +3181,19 @@ cal_chksum(const char *file, uint32_t *chksum)
CHECK(fdes, FAIL, "HDfstat");
/* Allocate space for the file data */
- file_data = HDmalloc((size_t)sb.st_size);
- CHECK_PTR(file_data, "HDmalloc");
+ file_data = malloc((size_t)sb.st_size);
+ CHECK_PTR(file_data, "malloc");
if (file_data) {
/* Read file's data into memory */
bytes_read = HDread(fdes, file_data, (size_t)sb.st_size);
- CHECK(bytes_read == sb.st_size, FALSE, "HDmalloc");
+ CHECK(bytes_read == sb.st_size, FALSE, "malloc");
/* Calculate checksum */
*chksum = H5_checksum_lookup3(file_data, sizeof(file_data), 0);
/* Free memory */
- HDfree(file_data);
+ free(file_data);
}
/* Close the file */
@@ -4406,9 +4406,9 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
hbool_t relax;
H5FD_mem_t mt;
- HDassert(split);
+ assert(split);
- HDmemset(memb_name, 0, sizeof memb_name);
+ memset(memb_name, 0, sizeof memb_name);
/* Get current split settings */
if (H5Pget_fapl_multi(fapl, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0)
@@ -4432,7 +4432,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- HDfree(memb_name[mt]);
+ free(memb_name[mt]);
return 0;
@@ -4756,7 +4756,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
VERIFY(nsects, FAIL, "H5Fget_free_sections");
/* Retrieve and verify free space info for all the sections */
- HDmemset(all_sect_info, 0, sizeof(all_sect_info));
+ memset(all_sect_info, 0, sizeof(all_sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)nall, all_sect_info);
VERIFY(nsects, nall, "H5Fget_free_sections");
@@ -4769,7 +4769,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
last_size = all_sect_info[nall - 1].size;
/* Retrieve and verify free space info for -1 sections */
- HDmemset(sect_info, 0, sizeof(sect_info));
+ memset(sect_info, 0, sizeof(sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)(nall - 1), sect_info);
VERIFY(nsects, nall, "H5Fget_free_sections");
@@ -4783,7 +4783,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
VERIFY(((hsize_t)free_space - last_size), total, "H5Fget_free_sections");
/* Retrieve and verify free-space info for +1 sections */
- HDmemset(sect_info, 0, sizeof(sect_info));
+ memset(sect_info, 0, sizeof(sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)(nall + 1), sect_info);
VERIFY(nsects, nall, "H5Fget_free_sections");
@@ -4798,7 +4798,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
VERIFY(sect_info[nall].size, 0, "H5Fget_free_sections");
VERIFY(free_space, total, "H5Fget_free_sections");
- HDmemset(meta_sect_info, 0, sizeof(meta_sect_info));
+ memset(meta_sect_info, 0, sizeof(meta_sect_info));
if (multi_vfd) {
hssize_t ntmp;
@@ -4831,7 +4831,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
CHECK(nraw, FAIL, "H5Fget_free_sections");
/* Retrieve and verify free-space sections for raw data */
- HDmemset(raw_sect_info, 0, sizeof(raw_sect_info));
+ memset(raw_sect_info, 0, sizeof(raw_sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DRAW, (size_t)nraw, raw_sect_info);
VERIFY(nsects, nraw, "H5Fget_free_sections");
@@ -5631,7 +5631,7 @@ test_libver_bounds_copy(void)
CHECK_I(ret, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 5751ce7..51ca79a 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -703,8 +703,8 @@ test_genprop_basic_list(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_FLT_ABS_EQUAL(prop2_value, *PROP2_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
/* Close list */
ret = H5Pclose(lid1);
@@ -796,20 +796,20 @@ test_genprop_basic_list_prop(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_FLT_ABS_EQUAL(prop2_value, *PROP2_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
/* Check values of temporary properties (set with regular values) */
ret = H5Pget(lid1, PROP3_NAME, &prop3_value);
CHECK_I(ret, "H5Pget");
- if (HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE) != 0)
+ if (memcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE) != 0)
TestErrPrintf("Property #3 doesn't match!, line=%d\n", __LINE__);
ret = H5Pget(lid1, PROP4_NAME, &prop4_value);
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Delete permanent property */
ret = H5Premove(lid1, PROP2_NAME);
@@ -845,8 +845,8 @@ test_genprop_basic_list_prop(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Close list */
ret = H5Pclose(lid1);
@@ -1027,8 +1027,8 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
/* Set the information from the creation call */
prop1_cb_info.crt_count++;
prop1_cb_info.crt_name = HDstrdup(name);
- prop1_cb_info.crt_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.crt_value, def_value, size);
+ prop1_cb_info.crt_value = malloc(size);
+ memcpy(prop1_cb_info.crt_value, def_value, size);
return (SUCCEED);
}
@@ -1047,8 +1047,8 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
if (prop1_cb_info.set_name == NULL)
prop1_cb_info.set_name = HDstrdup(name);
if (prop1_cb_info.set_value == NULL)
- prop1_cb_info.set_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.set_value, value, size);
+ prop1_cb_info.set_value = malloc(size);
+ memcpy(prop1_cb_info.set_value, value, size);
return (SUCCEED);
}
@@ -1067,8 +1067,8 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
if (prop1_cb_info.get_name == NULL)
prop1_cb_info.get_name = HDstrdup(name);
if (prop1_cb_info.get_value == NULL)
- prop1_cb_info.get_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.get_value, value, size);
+ prop1_cb_info.get_value = malloc(size);
+ memcpy(prop1_cb_info.get_value, value, size);
return (SUCCEED);
}
@@ -1086,8 +1086,8 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
if (prop1_cb_info.cop_name == NULL)
prop1_cb_info.cop_name = HDstrdup(name);
if (prop1_cb_info.cop_value == NULL)
- prop1_cb_info.cop_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.cop_value, value, size);
+ prop1_cb_info.cop_value = malloc(size);
+ memcpy(prop1_cb_info.cop_value, value, size);
return (SUCCEED);
}
@@ -1103,7 +1103,7 @@ test_genprop_prop_cmp_cb1(const void *value1, const void *value2, size_t size)
/* Set the information from the comparison call */
prop1_cb_info.cmp_count++;
- return (HDmemcmp(value1, value2, size));
+ return (memcmp(value1, value2, size));
}
/****************************************************************
@@ -1117,7 +1117,7 @@ test_genprop_prop_cmp_cb3(const void *value1, const void *value2, size_t size)
/* Set the information from the comparison call */
prop3_cb_info.cmp_count++;
- return (HDmemcmp(value1, value2, size));
+ return (memcmp(value1, value2, size));
}
/****************************************************************
@@ -1133,8 +1133,8 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
if (prop1_cb_info.cls_name == NULL)
prop1_cb_info.cls_name = HDstrdup(name);
if (prop1_cb_info.cls_value == NULL)
- prop1_cb_info.cls_value = HDmalloc(size);
- HDmemcpy(prop1_cb_info.cls_value, value, size);
+ prop1_cb_info.cls_value = malloc(size);
+ memcpy(prop1_cb_info.cls_value, value, size);
return (SUCCEED);
}
@@ -1151,8 +1151,8 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
prop2_cb_info.del_count++;
prop2_cb_info.del_plist_id = plist_id;
prop2_cb_info.del_name = HDstrdup(name);
- prop2_cb_info.del_value = HDmalloc(size);
- HDmemcpy(prop2_cb_info.del_value, value, size);
+ prop2_cb_info.del_value = malloc(size);
+ memcpy(prop2_cb_info.del_value, value, size);
return (SUCCEED);
}
@@ -1221,9 +1221,9 @@ test_genprop_list_callback(void)
cop_cb_struct.id = (-1);
/* Initialize callback information for properties tracked */
- HDmemset(&prop1_cb_info, 0, sizeof(prop_cb_info));
- HDmemset(&prop2_cb_info, 0, sizeof(prop_cb_info));
- HDmemset(&prop3_cb_info, 0, sizeof(prop_cb_info));
+ memset(&prop1_cb_info, 0, sizeof(prop_cb_info));
+ memset(&prop2_cb_info, 0, sizeof(prop_cb_info));
+ memset(&prop3_cb_info, 0, sizeof(prop_cb_info));
/* Create a property list from the class */
lid1 = H5Pcreate(cid1);
@@ -1240,7 +1240,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
if (HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Check values of permanent properties (set with default values) */
@@ -1253,13 +1253,13 @@ test_genprop_list_callback(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_FLT_ABS_EQUAL(prop2_value, *PROP2_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
/* Check values of temporary properties (set with regular values) */
ret = H5Pget(lid1, PROP3_NAME, &prop3_value);
CHECK_I(ret, "H5Pget");
- if (HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE) != 0)
+ if (memcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE) != 0)
TestErrPrintf("Property #3 doesn't match!, line=%d\n", __LINE__);
/* The compare callback should not have been called, as there is no get
* callback for this property */
@@ -1268,15 +1268,15 @@ test_genprop_list_callback(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if (!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
- HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
- *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Pget",
+ *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Set value of property #1 to different value */
@@ -1288,7 +1288,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
if (HDstrcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* The compare callback should not have been called */
@@ -1311,7 +1311,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Delete property #2 */
@@ -1323,7 +1323,7 @@ test_genprop_list_callback(void)
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
if (HDstrcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
TestErrPrintf("Property #2 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
+ if (memcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
TestErrPrintf("Property #2 value doesn't match!, line=%d\n", __LINE__);
/* Copy first list */
@@ -1334,7 +1334,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
if (HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Verify that the class creation callback occurred */
@@ -1357,7 +1357,7 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
if (HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
- if (HDmemcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
+ if (memcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
/* Close second list */
@@ -1368,18 +1368,18 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.cls_count, 2, "H5Pclose");
/* Free memory allocated for tracking properties */
- HDfree(prop1_cb_info.crt_name);
- HDfree(prop1_cb_info.crt_value);
- HDfree(prop1_cb_info.get_name);
- HDfree(prop1_cb_info.get_value);
- HDfree(prop1_cb_info.set_name);
- HDfree(prop1_cb_info.set_value);
- HDfree(prop1_cb_info.cop_name);
- HDfree(prop1_cb_info.cop_value);
- HDfree(prop1_cb_info.cls_name);
- HDfree(prop1_cb_info.cls_value);
- HDfree(prop2_cb_info.del_name);
- HDfree(prop2_cb_info.del_value);
+ free(prop1_cb_info.crt_name);
+ free(prop1_cb_info.crt_value);
+ free(prop1_cb_info.get_name);
+ free(prop1_cb_info.get_value);
+ free(prop1_cb_info.set_name);
+ free(prop1_cb_info.set_value);
+ free(prop1_cb_info.cop_name);
+ free(prop1_cb_info.cop_value);
+ free(prop1_cb_info.cls_name);
+ free(prop1_cb_info.cls_value);
+ free(prop2_cb_info.del_name);
+ free(prop2_cb_info.del_value);
/* Close class */
ret = H5Pclose_class(cid1);
diff --git a/test/th5_system.c b/test/th5_system.c
index 4c652c1..7d500bd 100644
--- a/test/th5_system.c
+++ b/test/th5_system.c
@@ -33,8 +33,8 @@ test_h5_dirname(void)
MESSAGE(5, ("Testing H5_dirname\n"));
- path = HDmalloc(H5_SYSTEM_TEST_PATH_MAX);
- CHECK_PTR(path, "HDmalloc");
+ path = malloc(H5_SYSTEM_TEST_PATH_MAX);
+ CHECK_PTR(path, "malloc");
if (!path)
return;
@@ -225,7 +225,7 @@ test_h5_dirname(void)
"comparing H5_dirname with contrived path to proper dirname");
H5MM_free(dirname);
- HDfree(path);
+ free(path);
}
static void
@@ -237,8 +237,8 @@ test_h5_basename(void)
MESSAGE(5, ("Testing H5_basename\n"));
- path = HDmalloc(H5_SYSTEM_TEST_PATH_MAX);
- CHECK_PTR(path, "HDmalloc");
+ path = malloc(H5_SYSTEM_TEST_PATH_MAX);
+ CHECK_PTR(path, "malloc");
if (!path)
return;
@@ -434,7 +434,7 @@ test_h5_basename(void)
VERIFY_STR(basename, "finaldir", "comparing H5_basename with contrived path to proper basename");
H5MM_free(basename);
- HDfree(path);
+ free(path);
}
static void
diff --git a/test/th5o.c b/test/th5o.c
index 027445e..9568a4c 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -957,10 +957,10 @@ test_h5o_link(void)
/* Allocate memory buffers */
/* (These are treated as 2-D buffers) */
- wdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
- CHECK_PTR(wdata, "HDmalloc");
- rdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
- CHECK_PTR(rdata, "HDmalloc");
+ wdata = (int *)malloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
+ CHECK_PTR(wdata, "malloc");
+ rdata = (int *)malloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
+ CHECK_PTR(rdata, "malloc");
/* Initialize the raw data */
for (i = n = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
@@ -1083,8 +1083,8 @@ test_h5o_link(void)
CHECK(ret, FAIL, "H5Pclose");
/* Release buffers */
- HDfree(wdata);
- HDfree(rdata);
+ free(wdata);
+ free(rdata);
} /* end test_h5o_link() */
/****************************************************************
@@ -1456,8 +1456,8 @@ test_h5o_getinfo_same_file(void)
CHECK(gid2, FAIL, "H5Gcreate2");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, through group IDs */
ret = H5Oget_info3(gid1, &oinfo1, H5O_INFO_BASIC);
@@ -1468,8 +1468,8 @@ test_h5o_getinfo_same_file(void)
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info3");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, by name */
ret = H5Oget_info_by_name3(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT);
@@ -1500,8 +1500,8 @@ test_h5o_getinfo_same_file(void)
CHECK(gid2, FAIL, "H5Gopen2");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, through group IDs */
ret = H5Oget_info3(gid1, &oinfo1, H5O_INFO_BASIC);
@@ -1512,8 +1512,8 @@ test_h5o_getinfo_same_file(void)
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info3");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, by name */
ret = H5Oget_info_by_name3(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT);
@@ -1775,8 +1775,8 @@ test_h5o_getinfo_visit(void)
CHECK(gid2, FAIL, "H5Gcreate2");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for "group1" via H5Oget_info1 and H5Oget_info2 */
ret = H5Oget_info1(gid1, &oinfo1);
@@ -1789,8 +1789,8 @@ test_h5o_getinfo_visit(void)
VERIFY(oinfo1.num_attrs, oinfo2.num_attrs, "obj info from H5Oget_info1/2");
/* Reset object info */
- HDmemset(&oinfo1, 0, sizeof(oinfo1));
- HDmemset(&oinfo2, 0, sizeof(oinfo2));
+ memset(&oinfo1, 0, sizeof(oinfo1));
+ memset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for "group2" via H5Oget_info1 and H5Oget_info2 */
ret = H5Oget_info_by_name1(fid, "group2", &oinfo1, H5P_DEFAULT);
diff --git a/test/th5s.c b/test/th5s.c
index 40d8b06..60aeb2c 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -144,7 +144,7 @@ test_h5s_basic(void)
rank = H5Sget_simple_extent_dims(sid1, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
sid2 = H5Screate_simple(SPACE2_RANK, dims2, max2);
CHECK(sid2, FAIL, "H5Screate_simple");
@@ -159,16 +159,16 @@ test_h5s_basic(void)
rank = H5Sget_simple_extent_dims(sid2, tdims, tmax);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims2, SPACE2_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tmax, max2, SPACE2_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
/* Change max dims to be equal to the dimensions */
ret = H5Sset_extent_simple(sid1, SPACE1_RANK, dims1, NULL);
CHECK(ret, FAIL, "H5Sset_extent_simple");
rank = H5Sget_simple_extent_dims(sid1, tdims, tmax);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tmax, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tmax, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -209,7 +209,7 @@ test_h5s_basic(void)
CHECK_I(ret, "H5Fclose");
}
else
- HDprintf("***cannot open the pre-created H5S_MAX_RANK test file (%s)\n", testfile);
+ printf("***cannot open the pre-created H5S_MAX_RANK test file (%s)\n", testfile);
}
/* Verify that incorrect dimensions don't work */
@@ -710,7 +710,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
}
@@ -731,7 +731,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata_short[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
}
}
}
@@ -804,7 +804,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
@@ -829,8 +829,8 @@ test_h5s_zero_dim(void)
for (k = 0; k < SPACE1_DIM3; k++) {
if (rdata_real[i][j][k] != wdata_real[i][j][k]) {
H5_FAILED();
- HDprintf("element [%d][%d][%d] is %d but should have been %d\n", i, j, k,
- rdata_real[i][j][k], wdata_real[i][j][k]);
+ printf("element [%d][%d][%d] is %d but should have been %d\n", i, j, k,
+ rdata_real[i][j][k], wdata_real[i][j][k]);
}
}
}
@@ -853,7 +853,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
@@ -901,7 +901,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
@@ -944,7 +944,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
}
@@ -975,7 +975,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
}
@@ -996,7 +996,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata_short[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
}
}
}
@@ -1025,7 +1025,7 @@ test_h5s_zero_dim(void)
rank = H5Sget_simple_extent_dims(sid_chunk, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
/* Set it to chunked dataset */
plist_id = H5Pcreate(H5P_DATASET_CREATE);
@@ -1056,8 +1056,8 @@ test_h5s_zero_dim(void)
for (k = 0; k < SPACE1_DIM3; k++) {
if (rdata_real[i][j][k] != wdata_real[i][j][k]) {
H5_FAILED();
- HDprintf("element [%d][%d][%d] is %d but should have been %d\n", i, j, k,
- rdata_real[i][j][k], wdata_real[i][j][k]);
+ printf("element [%d][%d][%d] is %d but should have been %d\n", i, j, k,
+ rdata_real[i][j][k], wdata_real[i][j][k]);
}
}
}
@@ -1143,7 +1143,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]);
}
}
}
@@ -1180,7 +1180,7 @@ test_h5s_zero_dim(void)
for (j = 0; j < SPACE1_DIM3; j++) {
if (rdata_short[i][j] != 7) {
H5_FAILED();
- HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
+ printf("element [%d][%d] is %d but should have been 7\n", i, j, rdata_short[i][j]);
}
}
}
@@ -1256,8 +1256,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
CHECK(ret, FAIL, "H5Sencode2");
if (sbuf_size > 0) {
- sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
- CHECK_PTR(sbuf, "HDcalloc");
+ sbuf = (unsigned char *)calloc((size_t)1, sbuf_size);
+ CHECK_PTR(sbuf, "calloc");
}
/* Try decoding bogus buffer */
@@ -1289,7 +1289,7 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
/* Retrieve and verify the dataspace dimensions */
rank = H5Sget_simple_extent_dims(decoded_sid1, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
/* Verify the type of dataspace selection */
sel_type = H5Sget_select_type(decoded_sid1);
@@ -1318,8 +1318,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
CHECK(ret, FAIL, "H5Sencode");
if (null_size > 0) {
- null_sbuf = (unsigned char *)HDcalloc((size_t)1, null_size);
- CHECK_PTR(null_sbuf, "HDcalloc");
+ null_sbuf = (unsigned char *)calloc((size_t)1, null_size);
+ CHECK_PTR(null_sbuf, "calloc");
}
/* Encode the null dataspace in the buffer */
@@ -1354,8 +1354,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
CHECK(ret, FAIL, "H5Sencode");
if (scalar_size > 0) {
- scalar_buf = (unsigned char *)HDcalloc((size_t)1, scalar_size);
- CHECK_PTR(scalar_buf, "HDcalloc");
+ scalar_buf = (unsigned char *)calloc((size_t)1, scalar_size);
+ CHECK_PTR(scalar_buf, "calloc");
}
/* Encode the scalar dataspace in the buffer */
@@ -1393,11 +1393,11 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
/* Release resources */
if (sbuf)
- HDfree(sbuf);
+ free(sbuf);
if (null_sbuf)
- HDfree(null_sbuf);
+ free(null_sbuf);
if (scalar_buf)
- HDfree(scalar_buf);
+ free(scalar_buf);
} /* test_h5s_encode() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -1448,8 +1448,8 @@ test_h5s_encode1(void)
CHECK(ret, FAIL, "H5Sencode2");
if (sbuf_size > 0) {
- sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
- CHECK_PTR(sbuf, "HDcalloc");
+ sbuf = (unsigned char *)calloc((size_t)1, sbuf_size);
+ CHECK_PTR(sbuf, "calloc");
}
/* Try decoding bogus buffer */
@@ -1481,7 +1481,7 @@ test_h5s_encode1(void)
/* Retrieve and verify the dataspace dimensions */
rank = H5Sget_simple_extent_dims(decoded_sid1, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
+ VERIFY(memcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims");
/* Verify the type of dataspace selection */
sel_type = H5Sget_select_type(decoded_sid1);
@@ -1510,8 +1510,8 @@ test_h5s_encode1(void)
CHECK(ret, FAIL, "H5Sencode");
if (null_size > 0) {
- null_sbuf = (unsigned char *)HDcalloc((size_t)1, null_size);
- CHECK_PTR(null_sbuf, "HDcalloc");
+ null_sbuf = (unsigned char *)calloc((size_t)1, null_size);
+ CHECK_PTR(null_sbuf, "calloc");
}
/* Encode the null dataspace in the buffer */
@@ -1546,8 +1546,8 @@ test_h5s_encode1(void)
CHECK(ret, FAIL, "H5Sencode");
if (scalar_size > 0) {
- scalar_buf = (unsigned char *)HDcalloc((size_t)1, scalar_size);
- CHECK_PTR(scalar_buf, "HDcalloc");
+ scalar_buf = (unsigned char *)calloc((size_t)1, scalar_size);
+ CHECK_PTR(scalar_buf, "calloc");
}
/* Encode the scalar dataspace in the buffer */
@@ -1581,11 +1581,11 @@ test_h5s_encode1(void)
/* Release resources */
if (sbuf)
- HDfree(sbuf);
+ free(sbuf);
if (null_sbuf)
- HDfree(null_sbuf);
+ free(null_sbuf);
if (scalar_buf)
- HDfree(scalar_buf);
+ free(scalar_buf);
} /* test_h5s_encode1() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -1633,8 +1633,8 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
CHECK(ret, FAIL, "H5Sencode2");
/* Allocate the buffer for encoding */
- buf = (char *)HDmalloc(buf_size);
- CHECK_PTR(buf, "HDmalloc");
+ buf = (char *)malloc(buf_size);
+ CHECK_PTR(buf, "malloc");
/* Encode according to the setting in in_fapl */
ret = H5Sencode2(in_sid, buf, &buf_size, in_fapl);
@@ -1693,7 +1693,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
ret = H5Sclose(d_sid);
CHECK(ret, FAIL, "H5Sclose");
if (buf)
- HDfree(buf);
+ free(buf);
}
return (0);
@@ -1772,7 +1772,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
break;
default:
- HDassert(0);
+ assert(0);
break;
} /* end switch */
@@ -1797,7 +1797,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
expected_enc_size = (uint8_t)(expected_version == 3 ? 4 : 8);
break;
default:
- HDassert(0);
+ assert(0);
break;
} /* end switch */
@@ -1822,7 +1822,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
expected_enc_size = 8;
break;
default:
- HDassert(0);
+ assert(0);
break;
}
@@ -1847,7 +1847,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
expected_enc_size = 8;
break;
default:
- HDassert(0);
+ assert(0);
break;
} /* end switch */
@@ -1872,7 +1872,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
expected_enc_size = 8;
break;
default:
- HDassert(0);
+ assert(0);
break;
}
@@ -1966,7 +1966,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
break;
default:
- HDassert(0);
+ assert(0);
break;
}
@@ -1995,7 +1995,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
break;
default:
- HDassert(0);
+ assert(0);
break;
}
@@ -2008,7 +2008,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
/* Verify the version and encoded size expected for the configuration */
- HDassert(expected_enc_size <= 255);
+ assert(expected_enc_size <= 255);
ret = test_h5s_check_encoding(fapl, sid, expected_version, (uint8_t)expected_enc_size,
expected_to_fail);
CHECK(ret, FAIL, "test_h5s_check_encoding");
@@ -2159,7 +2159,7 @@ test_h5s_encode_length(void)
/* Allocate the buffer */
if (sbuf_size > 0) {
- sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
+ sbuf = (unsigned char *)calloc((size_t)1, sbuf_size);
CHECK_PTR(sbuf, "H5Sencode2");
}
@@ -2184,7 +2184,7 @@ test_h5s_encode_length(void)
/* Free the buffer */
if (sbuf)
- HDfree(sbuf);
+ free(sbuf);
/* Close the original dataspace */
ret = H5Sclose(sid);
@@ -2460,11 +2460,11 @@ test_h5s_compound_scalar_read(void)
ret = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata);
CHECK(ret, FAIL, "H5Dread");
- if (HDmemcmp(&space4_data, &rdata, sizeof(struct space4_struct)) != 0) {
- HDprintf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n", space4_data.c1, rdata.c1);
- HDprintf("scalar data different: space4_data.u=%u, read_data4.u=%u\n", space4_data.u, rdata.u);
- HDprintf("scalar data different: space4_data.f=%f, read_data4.f=%f\n", (double)space4_data.f,
- (double)rdata.f);
+ if (memcmp(&space4_data, &rdata, sizeof(struct space4_struct)) != 0) {
+ printf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n", space4_data.c1, rdata.c1);
+ printf("scalar data different: space4_data.u=%u, read_data4.u=%u\n", space4_data.u, rdata.u);
+ printf("scalar data different: space4_data.f=%f, read_data4.f=%f\n", (double)space4_data.f,
+ (double)rdata.f);
TestErrPrintf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n", space4_data.c1,
rdata.c2);
} /* end if */
@@ -2513,17 +2513,17 @@ test_h5s_chunk(void)
int i, j;
/* Allocate memory */
- chunk_data_dbl_data = (double *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(double));
- CHECK_PTR(chunk_data_dbl_data, "HDcalloc");
- chunk_data_dbl = (double **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_dbl_data));
- CHECK_PTR(chunk_data_dbl, "HDcalloc");
+ chunk_data_dbl_data = (double *)calloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(double));
+ CHECK_PTR(chunk_data_dbl_data, "calloc");
+ chunk_data_dbl = (double **)calloc(CHUNK_DATA_NX, sizeof(chunk_data_dbl_data));
+ CHECK_PTR(chunk_data_dbl, "calloc");
for (i = 0; i < CHUNK_DATA_NX; i++)
chunk_data_dbl[i] = chunk_data_dbl_data + (i * CHUNK_DATA_NY);
- chunk_data_flt_data = (float *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(float));
- CHECK_PTR(chunk_data_flt_data, "HDcalloc");
- chunk_data_flt = (float **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_flt_data));
- CHECK_PTR(chunk_data_flt, "HDcalloc");
+ chunk_data_flt_data = (float *)calloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(float));
+ CHECK_PTR(chunk_data_flt_data, "calloc");
+ chunk_data_flt = (float **)calloc(CHUNK_DATA_NX, sizeof(chunk_data_flt_data));
+ CHECK_PTR(chunk_data_flt, "calloc");
for (i = 0; i < CHUNK_DATA_NX; i++)
chunk_data_flt[i] = chunk_data_flt_data + (i * CHUNK_DATA_NY);
@@ -2565,8 +2565,8 @@ test_h5s_chunk(void)
CHECK(status, FAIL, "H5Fclose");
/* Reset/initialize the data arrays to read in */
- HDmemset(chunk_data_dbl_data, 0, sizeof(double) * CHUNK_DATA_NX * CHUNK_DATA_NY);
- HDmemset(chunk_data_flt_data, 0, sizeof(float) * CHUNK_DATA_NX * CHUNK_DATA_NY);
+ memset(chunk_data_dbl_data, 0, sizeof(double) * CHUNK_DATA_NX * CHUNK_DATA_NY);
+ memset(chunk_data_flt_data, 0, sizeof(float) * CHUNK_DATA_NX * CHUNK_DATA_NY);
fileID = H5Fopen(DATAFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fileID, FAIL, "H5Fopen");
@@ -2593,10 +2593,10 @@ test_h5s_chunk(void)
} /* end for */
} /* end for */
- HDfree(chunk_data_dbl);
- HDfree(chunk_data_dbl_data);
- HDfree(chunk_data_flt);
- HDfree(chunk_data_flt_data);
+ free(chunk_data_dbl);
+ free(chunk_data_dbl_data);
+ free(chunk_data_flt);
+ free(chunk_data_flt_data);
} /* test_h5s_chunk() */
/****************************************************************
diff --git a/test/thread_id.c b/test/thread_id.c
index c7b2b44..d42a483 100644
--- a/test/thread_id.c
+++ b/test/thread_id.c
@@ -34,12 +34,12 @@ my_errx(int code, const char *fmt, ...)
{
va_list ap;
- (void)HDfprintf(stderr, "thread_id: ");
- HDva_start(ap, fmt);
+ (void)fprintf(stderr, "thread_id: ");
+ va_start(ap, fmt);
(void)HDvfprintf(stderr, fmt, ap);
- HDva_end(ap);
+ va_end(ap);
(void)HDfputc('\n', stderr);
- HDexit(code);
+ exit(code);
}
#if defined(H5_HAVE_DARWIN)
@@ -73,7 +73,7 @@ pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *at
if (attr != NULL)
return EINVAL;
- HDmemset(barrier, 0, sizeof(*barrier));
+ memset(barrier, 0, sizeof(*barrier));
barrier->count = count;
@@ -176,12 +176,12 @@ my_err(int code, const char *fmt, ...)
va_list ap;
int errno_copy = errno;
- (void)HDfprintf(stderr, "thread_id: ");
- HDva_start(ap, fmt);
+ (void)fprintf(stderr, "thread_id: ");
+ va_start(ap, fmt);
(void)HDvfprintf(stderr, fmt, ap);
- HDva_end(ap);
- (void)HDfprintf(stderr, ": %s\n", HDstrerror(errno_copy));
- HDexit(code);
+ va_end(ap);
+ (void)fprintf(stderr, ": %s\n", HDstrerror(errno_copy));
+ exit(code);
}
#define threads_failure(_call, _result) \
@@ -203,9 +203,9 @@ atomic_printf(const char *fmt, ...)
va_list ap;
ssize_t nprinted, nwritten;
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap);
- HDva_end(ap);
+ va_end(ap);
if (nprinted == -1)
my_err(EXIT_FAILURE, "%s.%d: vsnprintf", __func__, __LINE__);
@@ -318,7 +318,7 @@ main(void)
int
main(void)
{
- HDfprintf(stderr, "not implemented in this configuration.\n");
+ fprintf(stderr, "not implemented in this configuration.\n");
return EXIT_SUCCESS;
}
#endif /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/
diff --git a/test/tid.c b/test/tid.c
index ef1e201..c70ca5b 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -21,7 +21,7 @@
static herr_t
free_wrapper(void *p, void H5_ATTR_UNUSED **_ctx)
{
- HDfree(p);
+ free(p);
return SUCCEED;
}
@@ -85,12 +85,12 @@ basic_id_test(void)
* Once the ID has been registered, testObj will be freed when
* its ID type is destroyed.
*/
- testObj = HDmalloc(7 * sizeof(int));
+ testObj = malloc(7 * sizeof(int));
arrayID = H5Iregister(myType, testObj);
CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
if (arrayID == H5I_INVALID_HID) {
- HDfree(testObj);
+ free(testObj);
goto out;
}
@@ -179,12 +179,12 @@ basic_id_test(void)
* freed when the previous type was destroyed. Allocate new
* memory for it.
*/
- testObj = HDmalloc(7 * sizeof(int));
+ testObj = malloc(7 * sizeof(int));
arrayID = H5Iregister(myType, testObj);
CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
if (arrayID == H5I_INVALID_HID) {
- HDfree(testObj);
+ free(testObj);
goto out;
}
@@ -259,7 +259,7 @@ id_predefined_test(void)
void *testPtr;
herr_t testErr;
- testObj = HDmalloc(sizeof(int));
+ testObj = malloc(sizeof(int));
/*
* Attempt to perform public functions on various library types
@@ -350,14 +350,14 @@ id_predefined_test(void)
/* testObj was never registered as an atom, so it will not be
* automatically freed. */
- HDfree(testObj);
+ free(testObj);
return 0;
out:
if (typeID != H5I_INVALID_HID)
H5Tclose(typeID);
if (testObj != NULL)
- HDfree(testObj);
+ free(testObj);
return -1;
}
@@ -703,8 +703,8 @@ test_remove_clear_type(void)
/* Create an array to hold the objects in the master list */
list_size = RCT_MAX_NOBJS * sizeof(rct_obj_t);
- obj_list.objects = HDmalloc(list_size);
- CHECK_PTR(obj_list.objects, "HDcalloc");
+ obj_list.objects = malloc(list_size);
+ CHECK_PTR(obj_list.objects, "calloc");
if (NULL == obj_list.objects)
goto error;
@@ -723,7 +723,7 @@ test_remove_clear_type(void)
* Build object list *
*********************/
- HDmemset(obj_list.objects, 0, list_size);
+ memset(obj_list.objects, 0, list_size);
/* The number of objects used is a random number between the min and max */
obj_list.count = obj_list.remaining =
@@ -849,7 +849,7 @@ test_remove_clear_type(void)
goto error;
/* Free the object array */
- HDfree(obj_list.objects);
+ free(obj_list.objects);
return 0;
@@ -861,7 +861,7 @@ error:
}
H5E_END_TRY
- HDfree(obj_list.objects);
+ free(obj_list.objects);
return -1;
} /* end test_remove_clear_type() */
@@ -883,7 +883,7 @@ free_actual_object(void *_p, void H5_ATTR_UNUSED **_ctx)
if (7 != *p)
return FAIL;
- HDfree(p);
+ free(p);
return SUCCEED;
}
@@ -916,7 +916,7 @@ realize_future_cb(void *_future_obj, hid_t *actual_id)
}
else {
/* Create a new object (the 'actual object') of the correct type */
- if (NULL == (actual_obj = HDmalloc(sizeof(int))))
+ if (NULL == (actual_obj = malloc(sizeof(int))))
return FAIL;
*actual_obj = 7;
@@ -937,7 +937,7 @@ discard_future_cb(void *future_obj)
if (NULL == future_obj)
return FAIL;
- HDfree(future_obj);
+ free(future_obj);
return SUCCEED;
}
@@ -952,7 +952,7 @@ realize_future_generate_cb(void *_future_obj, hid_t *actual_id)
if (NULL != future_obj)
return FAIL;
/* Create a new object (the 'actual object') of the correct type */
- if (NULL == (actual_obj = HDmalloc(sizeof(int))))
+ if (NULL == (actual_obj = malloc(sizeof(int))))
return FAIL;
*actual_obj = 7;
@@ -1036,7 +1036,7 @@ test_future_ids(void)
/* Test base use-case: create a future object and destroy type without
* realizing the future object.
*/
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = obj_type;
future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1056,7 +1056,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object and realize the actual object. */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = obj_type;
future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1142,7 +1142,7 @@ test_future_ids(void)
/* Test base use-case: create a future object for a pre-defined type */
/* (DATASPACE) */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATASPACE;
future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1160,7 +1160,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATASPACE;
future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1183,7 +1183,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATASPACE;
future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1214,7 +1214,7 @@ test_future_ids(void)
/* Test base use-case: create a future object for a pre-defined type */
/* (DATATYPE) */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATATYPE;
future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1232,7 +1232,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATATYPE;
future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1255,7 +1255,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATATYPE;
future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1286,7 +1286,7 @@ test_future_ids(void)
/* Test base use-case: create a future object for a pre-defined type */
/* (PROPERTY LIST) */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_GENPROP_LST;
future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1304,7 +1304,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_GENPROP_LST;
future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1327,7 +1327,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_GENPROP_LST;
future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
diff --git a/test/timer.c b/test/timer.c
index 9254596..7231534 100644
--- a/test/timer.c
+++ b/test/timer.c
@@ -43,62 +43,62 @@ test_time_formatting(void)
s = H5_timer_get_time_string(-1.0);
if (NULL == s || HDstrcmp(s, "N/A") != 0)
TEST_ERROR;
- HDfree(s);
+ free(s);
/* 0 0 */
s = H5_timer_get_time_string(0.0);
if (NULL == s || HDstrcmp(s, "0.0 s") != 0)
TEST_ERROR;
- HDfree(s);
+ free(s);
/* < 1 us nanoseconds */
s = H5_timer_get_time_string(123.0E-9);
if (NULL == s || HDstrcmp(s, "123 ns") != 0)
TEST_ERROR;
- HDfree(s);
+ free(s);
/* < 1 ms microseconds */
s = H5_timer_get_time_string(23.456E-6);
if (NULL == s || HDstrcmp(s, "23.5 us") != 0)
TEST_ERROR;
- HDfree(s);
+ free(s);
/* < 1 s milliseconds */
s = H5_timer_get_time_string(4.56789E-3);
if (NULL == s || HDstrcmp(s, "4.6 ms") != 0)
TEST_ERROR;
- HDfree(s);
+ free(s);
/* < 1 min seconds */
s = H5_timer_get_time_string(3.14);
if (NULL == s || HDstrcmp(s, "3.14 s") != 0)
TEST_ERROR;
- HDfree(s);
+ free(s);
/* < 1 hr mins, secs */
s = H5_timer_get_time_string(2521.0);
if (NULL == s || HDstrcmp(s, "42 m 1 s") != 0)
TEST_ERROR;
- HDfree(s);
+ free(s);
/* < 1 d hrs, mins, secs */
s = H5_timer_get_time_string(9756.0);
if (NULL == s || HDstrcmp(s, "2 h 42 m 36 s") != 0)
TEST_ERROR;
- HDfree(s);
+ free(s);
/* > 1 d days, hrs, mins, secs */
s = H5_timer_get_time_string(280802.0);
if (NULL == s || HDstrcmp(s, "3 d 6 h 0 m 2 s") != 0)
TEST_ERROR;
- HDfree(s);
+ free(s);
PASSED();
return 0;
error:
if (s)
- HDfree(s);
+ free(s);
return -1;
}
@@ -143,14 +143,14 @@ test_timer_system_user(void)
*/
if (timer.initial.system < 0.0 || timer.initial.user < 0.0) {
SKIPPED();
- HDprintf("NOTE: No suitable way to get system/user times on this platform.\n");
+ printf("NOTE: No suitable way to get system/user times on this platform.\n");
return 0;
}
/* Do some fake work */
for (i = 0; i < 1024; i++) {
- buf = (char *)HDmalloc(1024 * (size_t)i);
- HDfree(buf);
+ buf = (char *)malloc(1024 * (size_t)i);
+ free(buf);
}
err = H5_timer_stop(&timer);
@@ -208,8 +208,8 @@ test_timer_elapsed(void)
/* Do some fake work */
for (i = 0; i < 1024; i++) {
- buf = (char *)HDmalloc(1024 * (size_t)i);
- HDfree(buf);
+ buf = (char *)malloc(1024 * (size_t)i);
+ free(buf);
}
err = H5_timer_stop(&timer);
@@ -275,8 +275,8 @@ test_timer_functionality(void)
/* Do some fake work */
for (i = 0; i < 1024; i++) {
- buf = (char *)HDmalloc(1024 * (size_t)i);
- HDfree(buf);
+ buf = (char *)malloc(1024 * (size_t)i);
+ free(buf);
}
/* Running state should change after stop */
@@ -317,8 +317,8 @@ test_timer_functionality(void)
/* Do some fake work */
for (i = 0; i < 1024; i++) {
- buf = (char *)HDmalloc(1024 * (size_t)i);
- HDfree(buf);
+ buf = (char *)malloc(1024 * (size_t)i);
+ free(buf);
}
/* Times should be non-negative */
@@ -334,8 +334,8 @@ test_timer_functionality(void)
/* Do some fake work */
for (i = 0; i < 1024; i++) {
- buf = (char *)HDmalloc(1024 * (size_t)i);
- HDfree(buf);
+ buf = (char *)malloc(1024 * (size_t)i);
+ free(buf);
}
/* State should flip on stop */
@@ -380,7 +380,7 @@ main(void)
h5_reset();
- HDprintf("Testing platform-independent timer functionality.\n");
+ printf("Testing platform-independent timer functionality.\n");
nerrors += test_time_formatting() < 0 ? 1 : 0;
nerrors += test_timer_system_user() < 0 ? 1 : 0;
@@ -388,12 +388,11 @@ main(void)
nerrors += test_timer_functionality() < 0 ? 1 : 0;
if (nerrors) {
- HDprintf("***** %d platform-independent timer TEST%s FAILED! *****\n", nerrors,
- nerrors > 1 ? "S" : "");
+ printf("***** %d platform-independent timer TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
return 1;
}
else {
- HDprintf("All platform-independent timer tests passed.\n");
+ printf("All platform-independent timer tests passed.\n");
return 0;
}
}
diff --git a/test/titerate.c b/test/titerate.c
index 82d8e9f..5fedef8 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -108,7 +108,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
return (count2 > 10 ? 1 : 0);
default:
- HDprintf("invalid iteration command");
+ printf("invalid iteration command");
return (-1);
} /* end switch */
} /* end liter_cb() */
@@ -364,7 +364,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
/* Free the dataset names */
for (i = 0; i < (NDATASETS + 2); i++)
- HDfree(lnames[i]);
+ free(lnames[i]);
} /* test_iter_group() */
/****************************************************************
@@ -397,7 +397,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
return (count2 > 10 ? 1 : 0);
default:
- HDprintf("invalid iteration command");
+ printf("invalid iteration command");
return (-1);
} /* end switch */
} /* end aiter_cb() */
@@ -557,7 +557,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
/* Free the attribute names */
for (i = 0; i < NATTR; i++)
- HDfree(anames[i]);
+ free(anames[i]);
} /* test_iter_attr() */
@@ -632,8 +632,8 @@ test_iter_group_large(hid_t fapl)
} s1_t;
/* Allocate & initialize array */
- names = (iter_info *)HDcalloc(sizeof(iter_info), (ITER_NGROUPS + 2));
- CHECK_PTR(names, "HDcalloc");
+ names = (iter_info *)calloc(sizeof(iter_info), (ITER_NGROUPS + 2));
+ CHECK_PTR(names, "calloc");
/* Output message about test being performed */
MESSAGE(5, ("Testing Large Group Iteration Functionality\n"));
@@ -725,7 +725,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
/* Release memory */
- HDfree(names);
+ free(names);
} /* test_iterate_group_large() */
/****************************************************************
@@ -877,8 +877,8 @@ test_grp_memb_funcs(hid_t fapl)
/* Free the dataset names */
for (i = 0; i < (NDATASETS + 2); i++) {
- HDfree(dnames[i]);
- HDfree(obj_names[i]);
+ free(dnames[i]);
+ free(obj_names[i]);
} /* end for */
} /* test_grp_memb_funcs() */
@@ -1024,7 +1024,7 @@ test_corrupted_attnamelen(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
diff --git a/test/tmeta.c b/test/tmeta.c
index d55882d..57a9e0d 100644
--- a/test/tmeta.c
+++ b/test/tmeta.c
@@ -76,7 +76,7 @@ test_metadata(void)
UINT32ENCODE(p, eu32); /* Encode the uint32 value */
/* Check if we got what we asked for */
- if (HDmemcmp(encode_buffer, compar_buffer, sizeof(compar_buffer)) != 0) {
+ if (memcmp(encode_buffer, compar_buffer, sizeof(compar_buffer)) != 0) {
unsigned u; /* local counting variable */
for (u = 0; u < sizeof(compar_buffer); u++) {
diff --git a/test/tmisc.c b/test/tmisc.c
index 0b04b2c..0042c65 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -520,8 +520,8 @@ test_misc2_write_attribute(void)
ret = H5Fclose(file2);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(string_att1);
- HDfree(string_att2);
+ free(string_att1);
+ free(string_att2);
}
static void
@@ -734,7 +734,7 @@ create_struct3(void)
misc5_struct3_hndl *str3hndl; /* New 'struct3' created */
herr_t ret; /* For error checking */
- str3hndl = (misc5_struct3_hndl *)HDmalloc(sizeof(misc5_struct3_hndl));
+ str3hndl = (misc5_struct3_hndl *)malloc(sizeof(misc5_struct3_hndl));
CHECK_PTR(str3hndl, "malloc");
str3hndl->st3h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct3));
@@ -760,7 +760,7 @@ delete_struct3(misc5_struct3_hndl *str3hndl)
ret = H5Tclose(str3hndl->st3h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str3hndl);
+ free(str3hndl);
}
static void
@@ -777,8 +777,8 @@ create_struct2(void)
misc5_struct2_hndl *str2hndl; /* New 'struct2' created */
herr_t ret; /* For error checking */
- str2hndl = (misc5_struct2_hndl *)HDmalloc(sizeof(misc5_struct2_hndl));
- CHECK_PTR(str2hndl, "HDmalloc");
+ str2hndl = (misc5_struct2_hndl *)malloc(sizeof(misc5_struct2_hndl));
+ CHECK_PTR(str2hndl, "malloc");
str2hndl->st2h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct2));
CHECK(str2hndl->st2h_base, FAIL, "H5Tcreate");
@@ -812,7 +812,7 @@ delete_struct2(misc5_struct2_hndl *str2hndl)
H5Tclose(str2hndl->st2h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str2hndl);
+ free(str2hndl);
}
static void
@@ -823,8 +823,8 @@ set_struct2(misc5_struct2 *buf)
buf->st2_el1 = MISC5_DBGELVAL2;
buf->st2_el2.len = MISC5_DBGNELM3;
- buf->st2_el2.p = HDmalloc((buf->st2_el2.len) * sizeof(misc5_struct3));
- CHECK_PTR(buf->st2_el2.p, "HDmalloc");
+ buf->st2_el2.p = malloc((buf->st2_el2.len) * sizeof(misc5_struct3));
+ CHECK_PTR(buf->st2_el2.p, "malloc");
for (i = 0; i < (buf->st2_el2.len); i++)
set_struct3(&(((misc5_struct3 *)(buf->st2_el2.p))[i]));
@@ -833,7 +833,7 @@ set_struct2(misc5_struct2 *buf)
static void
clear_struct2(misc5_struct2 *buf)
{
- HDfree(buf->st2_el2.p);
+ free(buf->st2_el2.p);
}
/*********************** struct1 ***********************/
@@ -844,8 +844,8 @@ create_struct1(void)
misc5_struct1_hndl *str1hndl; /* New 'struct1' created */
herr_t ret; /* For error checking */
- str1hndl = (misc5_struct1_hndl *)HDmalloc(sizeof(misc5_struct1_hndl));
- CHECK_PTR(str1hndl, "HDmalloc");
+ str1hndl = (misc5_struct1_hndl *)malloc(sizeof(misc5_struct1_hndl));
+ CHECK_PTR(str1hndl, "malloc");
str1hndl->st1h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct1));
CHECK(str1hndl->st1h_base, FAIL, "H5Tcreate");
@@ -879,7 +879,7 @@ delete_struct1(misc5_struct1_hndl *str1hndl)
ret = H5Tclose(str1hndl->st1h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str1hndl);
+ free(str1hndl);
}
static void
@@ -890,8 +890,8 @@ set_struct1(misc5_struct1 *buf)
buf->st1_el1 = MISC5_DBGELVAL1;
buf->st1_el2.len = MISC5_DBGNELM2;
- buf->st1_el2.p = HDmalloc((buf->st1_el2.len) * sizeof(misc5_struct2));
- CHECK_PTR(buf->st1_el2.p, "HDmalloc");
+ buf->st1_el2.p = malloc((buf->st1_el2.len) * sizeof(misc5_struct2));
+ CHECK_PTR(buf->st1_el2.p, "malloc");
for (i = 0; i < (buf->st1_el2.len); i++)
set_struct2(&(((misc5_struct2 *)(buf->st1_el2.p))[i]));
@@ -904,7 +904,7 @@ clear_struct1(misc5_struct1 *buf)
for (i = 0; i < buf->st1_el2.len; i++)
clear_struct2(&(((misc5_struct2 *)(buf->st1_el2.p))[i]));
- HDfree(buf->st1_el2.p);
+ free(buf->st1_el2.p);
}
static void
@@ -941,8 +941,8 @@ test_misc5(void)
/* Create the variable-length buffer */
buf.len = MISC5_DBGNELM1;
- buf.p = HDmalloc((buf.len) * sizeof(misc5_struct1));
- CHECK_PTR(buf.p, "HDmalloc");
+ buf.p = malloc((buf.len) * sizeof(misc5_struct1));
+ CHECK_PTR(buf.p, "malloc");
/* Create the top-level VL information */
for (i = 0; i < MISC5_DBGNELM1; i++)
@@ -957,7 +957,7 @@ test_misc5(void)
clear_struct1(&(((misc5_struct1 *)(buf.p))[j]));
/* Free the variable-length buffer */
- HDfree(buf.p);
+ free(buf.p);
/* Close dataset */
ret = H5Dclose(dataset_id);
@@ -996,16 +996,16 @@ test_misc5(void)
/* Verify the correct information was read in */
for (i = 0; i < (buf.len); i++) {
- /* HDprintf("[%d]=%d\n",i, ((misc5_struct1 *)(buf.p))[i].st1_el1); */
+ /* printf("[%d]=%d\n",i, ((misc5_struct1 *)(buf.p))[i].st1_el1); */
VERIFY(((misc5_struct1 *)(buf.p))[i].st1_el1, MISC5_DBGELVAL1, "H5Dread");
for (j = 0; j < (((misc5_struct1 *)(buf.p))[i].st1_el2.len); j++) {
- /* HDprintf(" [%d]=%d\n",j, ((misc5_struct2 *)(((misc5_struct1 *)
+ /* printf(" [%d]=%d\n",j, ((misc5_struct2 *)(((misc5_struct1 *)
* (buf.p))[i].st1_el2.p))[j].st2_el1); */
VERIFY(((misc5_struct2 *)(((misc5_struct1 *)(buf.p))[i].st1_el2.p))[j].st2_el1, MISC5_DBGELVAL2,
"H5Dread");
for (k = 0; k < (((misc5_struct2 *)(((misc5_struct1 *)(buf.p))[i].st1_el2.p))[j].st2_el2.len);
k++) {
- /* HDprintf(" [%d]=%d\n",k, ((misc5_struct3 *)(((misc5_struct2 *) (((misc5_struct1
+ /* printf(" [%d]=%d\n",k, ((misc5_struct3 *)(((misc5_struct2 *) (((misc5_struct1
* *)(buf.p))[i]. st1_el2.p))[j].st2_el2.p))[k].st3_el1); */
VERIFY(((misc5_struct3 *)(((misc5_struct2 *)(((misc5_struct1 *)(buf.p))[i].st1_el2.p))[j]
.st2_el2.p))[k]
@@ -1272,11 +1272,11 @@ test_misc8(void)
MESSAGE(5, ("Testing dataset storage sizes\n"));
/* Allocate space for the data to write & read */
- wdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK_PTR(wdata, "HDmalloc");
+ wdata = (int *)malloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
+ CHECK_PTR(wdata, "malloc");
#ifdef VERIFY_DATA
- rdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK_PTR(rdata, "HDmalloc");
+ rdata = (int *)malloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
+ CHECK_PTR(rdata, "malloc");
#endif /* VERIFY_DATA */
/* Initialize values */
@@ -1743,9 +1743,9 @@ test_misc8(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free the read & write buffers */
- HDfree(wdata);
+ free(wdata);
#ifdef VERIFY_DATA
- HDfree(rdata);
+ free(rdata);
#endif /* VERIFY_DATA */
} /* end test_misc8() */
@@ -1810,7 +1810,7 @@ test_misc10(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -2208,8 +2208,8 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
herr_t ret; /* Generic return value */
/* Create a data buffer for the dataset read */
- read_data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
- CHECK_PTR(read_data, "HDcalloc");
+ read_data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(read_data, "calloc");
/* Open the contiguous dataset in the root group */
dsid = H5Dopen2(loc_id, name, H5P_DEFAULT);
@@ -2228,7 +2228,7 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
CHECK(ret, FAIL, "H5Dclose");
/* Free the dataset read buffer */
- HDfree(read_data);
+ free(read_data);
} /* end misc13_verify_dataset() */
@@ -2334,27 +2334,27 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
int ret; /* Generic status value */
/* Allocate space for the user block */
- user_block = HDcalloc(size, (size_t)1);
- CHECK_PTR(user_block, "HDcalloc");
+ user_block = calloc(size, (size_t)1);
+ CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
- HDmemcpy(user_block, str, HDstrlen(str));
+ memcpy(user_block, str, HDstrlen(str));
/* Open the new file */
- new_fp = HDfopen(new_name, "wb");
- CHECK_PTR(new_fp, "HDfopen");
+ new_fp = fopen(new_name, "wb");
+ CHECK_PTR(new_fp, "fopen");
/* Write the user block to the new file */
written = HDfwrite(user_block, (size_t)1, size, new_fp);
VERIFY(written, size, "HDfwrite");
/* Open the old file */
- old_fp = HDfopen(old_name, "rb");
- CHECK_PTR(old_fp, "HDfopen");
+ old_fp = fopen(old_name, "rb");
+ CHECK_PTR(old_fp, "fopen");
/* Allocate space for the copy buffer */
- copy_buf = HDmalloc((size_t)MISC13_COPY_BUF_SIZE);
- CHECK_PTR(copy_buf, "HDmalloc");
+ copy_buf = malloc((size_t)MISC13_COPY_BUF_SIZE);
+ CHECK_PTR(copy_buf, "malloc");
/* Copy data from the old file to the new file */
while ((read_in = HDfread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) {
@@ -2372,10 +2372,10 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
VERIFY(ret, 0, "HDfclose");
/* Free the copy buffer */
- HDfree(copy_buf);
+ free(copy_buf);
/* Free the user block */
- HDfree(user_block);
+ free(user_block);
} /* end misc13_insert_user_block() */
@@ -2503,8 +2503,8 @@ test_misc13(void)
hbool_t check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
/* Create a data buffer for the datasets */
- data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
- CHECK_PTR(data, "HDcalloc");
+ data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(data, "calloc");
/* Initialize data to write */
misc13_init_data(data);
@@ -2534,7 +2534,7 @@ test_misc13(void)
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Free the dataset buffer */
- HDfree(data);
+ free(data);
} /* end test_misc13() */
@@ -2833,10 +2833,10 @@ test_misc16(void)
/* Initialize the data */
/* (Note that these are supposed to stress the code, so are a little weird) */
- HDmemcpy(wdata[0], "1234567", MISC16_STR_SIZE);
- HDmemcpy(wdata[1], "1234567\0", MISC16_STR_SIZE);
- HDmemcpy(wdata[2], "12345678", MISC16_STR_SIZE);
- HDmemcpy(wdata[3], "\0\0\0\0\0\0\0\0", MISC16_STR_SIZE);
+ memcpy(wdata[0], "1234567", MISC16_STR_SIZE);
+ memcpy(wdata[1], "1234567\0", MISC16_STR_SIZE);
+ memcpy(wdata[2], "12345678", MISC16_STR_SIZE);
+ memcpy(wdata[3], "\0\0\0\0\0\0\0\0", MISC16_STR_SIZE);
/* Create the file */
file = H5Fcreate(MISC16_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2921,10 +2921,10 @@ test_misc17(void)
/* Initialize the data */
/* (Note that these are supposed to stress the code, so are a little weird) */
- HDmemcpy(wdata[0], "1234567", MISC17_SPACE_DIM2);
- HDmemcpy(wdata[1], "1234567\0", MISC17_SPACE_DIM2);
- HDmemcpy(wdata[2], "12345678", MISC17_SPACE_DIM2);
- HDmemcpy(wdata[3], "\0\0\0\0\0\0\0\0", MISC17_SPACE_DIM2);
+ memcpy(wdata[0], "1234567", MISC17_SPACE_DIM2);
+ memcpy(wdata[1], "1234567\0", MISC17_SPACE_DIM2);
+ memcpy(wdata[2], "12345678", MISC17_SPACE_DIM2);
+ memcpy(wdata[3], "\0\0\0\0\0\0\0\0", MISC17_SPACE_DIM2);
/* Create the file */
file = H5Fcreate(MISC17_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3640,7 +3640,7 @@ test_misc19(void)
H5E_END_TRY;
VERIFY(ret, FAIL, "H5FDunregister");
- HDfree(vfd_cls);
+ free(vfd_cls);
/* Check H5I operations on virtual object connectors */
@@ -3680,7 +3680,7 @@ test_misc19(void)
H5E_END_TRY;
VERIFY(ret, FAIL, "H5VLunregister_connector");
- HDfree(vol_cls);
+ free(vol_cls);
} /* end test_misc19() */
@@ -3713,7 +3713,7 @@ test_misc20(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -3888,8 +3888,8 @@ test_misc21(void)
MESSAGE(5, ("Testing late allocation time w/chunks & filters\n"));
/* Allocate space for the buffer */
- buf = (char *)HDcalloc(MISC21_SPACE_DIM0 * MISC21_SPACE_DIM1, 1);
- CHECK(buf, NULL, "HDcalloc");
+ buf = (char *)calloc(MISC21_SPACE_DIM0 * MISC21_SPACE_DIM1, 1);
+ CHECK(buf, NULL, "calloc");
/* Create the file */
fid = H5Fcreate(MISC21_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3929,7 +3929,7 @@ test_misc21(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc21() */
/****************************************************************
@@ -3973,8 +3973,8 @@ test_misc22(void)
MESSAGE(5, ("Testing datatypes with SZIP filter\n"));
/* Allocate space for the buffer */
- buf = (char *)HDcalloc(MISC22_SPACE_DIM0 * MISC22_SPACE_DIM1, 8);
- CHECK(buf, NULL, "HDcalloc");
+ buf = (char *)calloc(MISC22_SPACE_DIM0 * MISC22_SPACE_DIM1, 8);
+ CHECK(buf, NULL, "calloc");
/* Create the file */
fid = H5Fcreate(MISC22_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -4080,7 +4080,7 @@ test_misc22(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc22() */
#endif /* H5_HAVE_FILTER_SZIP */
@@ -5009,7 +5009,7 @@ test_misc25b(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -5270,7 +5270,7 @@ test_misc27(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -5494,7 +5494,7 @@ test_misc29(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -5785,7 +5785,7 @@ test_misc33(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -6084,7 +6084,7 @@ test_misc37(void)
CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
diff --git a/test/trefer.c b/test/trefer.c
index 2c62234..bc005bd 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -110,10 +110,10 @@ test_reference_params(void)
MESSAGE(5, ("Testing Reference Parameters\n"));
/* Allocate write & read buffers */
- wbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- tbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ tbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -409,10 +409,10 @@ test_reference_params(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(tbuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(tbuf);
+ free(obuf);
} /* test_reference_params() */
/****************************************************************
@@ -443,10 +443,10 @@ test_reference_obj(void)
MESSAGE(5, ("Testing Object Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -643,10 +643,10 @@ test_reference_obj(void)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(ibuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_obj() */
/****************************************************************
@@ -680,9 +680,9 @@ test_reference_vlen_obj(void)
MESSAGE(5, ("Testing Object Reference Functions within VLEN type\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -909,10 +909,10 @@ test_reference_vlen_obj(void)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(ibuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_vlen_obj() */
/****************************************************************
@@ -944,8 +944,8 @@ test_reference_cmpnd_obj(void)
MESSAGE(5, ("Testing Object Reference Functions within compound type\n"));
/* Allocate write & read buffers */
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -1045,7 +1045,7 @@ test_reference_cmpnd_obj(void)
CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Reset buffer for writing */
- HDmemset(&cmpnd_wbuf, 0, sizeof(cmpnd_wbuf));
+ memset(&cmpnd_wbuf, 0, sizeof(cmpnd_wbuf));
/* Create reference to dataset */
ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &cmpnd_wbuf.ref0);
@@ -1200,8 +1200,8 @@ test_reference_cmpnd_obj(void)
CHECK(ret, FAIL, "H5Rdestroy");
/* Free memory buffers */
- HDfree(ibuf);
- HDfree(obuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_cmpnd_obj() */
/****************************************************************
@@ -1253,10 +1253,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
MESSAGE(5, ("Testing Dataset Region Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- dwbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ dwbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
for (tu8 = dwbuf, i = 0; i < (SPACE2_DIM1 * SPACE2_DIM2); i++)
*tu8++ = (uint8_t)(i * 3);
@@ -1527,7 +1527,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 1, "H5Sget_select_hyper_nblocks");
/* allocate space for the hyperslab blocks */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) * 2);
+ coords = (hsize_t *)malloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) * 2);
ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
@@ -1535,7 +1535,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[1], 2, "Hyperslab Coordinates");
VERIFY(coords[2], 7, "Hyperslab Coordinates");
VERIFY(coords[3], 7, "Hyperslab Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid2, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 2, "Selection Bounds");
@@ -1558,7 +1558,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, SPACE2_DIM2, "H5Sget_select_elem_npoints");
/* allocate space for the element points */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t));
ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
@@ -1582,7 +1582,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[17], coord1[8][1], "Element Coordinates");
VERIFY(coords[18], coord1[9][0], "Element Coordinates");
VERIFY(coords[19], coord1[9][1], "Element Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid2, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 0, "Selection Bounds");
@@ -1659,10 +1659,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
} /* test_reference_region() */
@@ -1709,10 +1709,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
- dwbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
+ rbuf = calloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
+ dwbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
for (tu8 = dwbuf, i = 0; i < SPACE3_DIM1; i++)
*tu8++ = (uint8_t)(i * 3);
@@ -1887,7 +1887,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 15, "H5Sget_select_hyper_nblocks");
/* allocate space for the hyperslab blocks */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) * 2);
+ coords = (hsize_t *)malloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) * 2);
ret = H5Sget_select_hyper_blocklist(sid3, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
@@ -1921,7 +1921,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[27], 68, "Hyperslab Coordinates");
VERIFY(coords[28], 72, "Hyperslab Coordinates");
VERIFY(coords[29], 73, "Hyperslab Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid3, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 2, "Selection Bounds");
@@ -1942,7 +1942,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 10, "H5Sget_select_elem_npoints");
/* allocate space for the element points */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t));
ret = H5Sget_select_elem_pointlist(sid3, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
@@ -1956,7 +1956,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[7], coord1[7][0], "Element Coordinates");
VERIFY(coords[8], coord1[8][0], "Element Coordinates");
VERIFY(coords[9], coord1[9][0], "Element Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid3, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 3, "Selection Bounds");
@@ -2000,10 +2000,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
} /* test_reference_region_1D() */
@@ -2855,10 +2855,10 @@ test_reference_compat_conv(void)
MESSAGE(5, ("Testing Deprecated Object Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf_obj = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- rbuf_obj = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg = HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- rbuf_reg = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_obj = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ rbuf_obj = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_reg = calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf_reg = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
/* Create file */
fid1 = H5Fcreate(FILE_REF_COMPAT, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3125,10 +3125,10 @@ test_reference_compat_conv(void)
}
/* Free memory buffers */
- HDfree(wbuf_obj);
- HDfree(rbuf_obj);
- HDfree(wbuf_reg);
- HDfree(rbuf_reg);
+ free(wbuf_obj);
+ free(rbuf_obj);
+ free(wbuf_reg);
+ free(rbuf_reg);
} /* test_reference_compat() */
/****************************************************************
@@ -3167,17 +3167,17 @@ test_reference_perf(void)
MESSAGE(5, ("Testing Object Reference Performance\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- wbuf_deprec = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- rbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf_deprec = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- tbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf_reg = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg_deprec = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- rbuf_reg_deprec = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf_deprec = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ rbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf_deprec = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ tbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_reg = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf_reg = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_reg_deprec = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf_reg_deprec = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -3259,7 +3259,7 @@ test_reference_perf(void)
CHECK(ret, FAIL, "H5Rdestroy");
}
if (VERBOSE_MED)
- HDprintf("--- Object reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ printf("--- Object reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Create reference to dataset */
ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &wbuf[0]);
@@ -3278,7 +3278,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Object reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ printf("--- Object reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3297,7 +3297,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated object reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ printf("--- Deprecated object reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Create reference to dataset */
ret = H5Rcreate(&wbuf_deprec[0], fid1, "/Group1/Dataset1", H5R_OBJECT1, H5I_INVALID_HID);
@@ -3313,7 +3313,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated object reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ printf("--- Deprecated object reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3335,7 +3335,7 @@ test_reference_perf(void)
CHECK(ret, FAIL, "H5Rdestroy");
}
if (VERBOSE_MED)
- HDprintf("--- Region reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ printf("--- Region reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Store first dataset region */
ret = H5Rcreate_region(fid1, "/Group1/Dataset1", sid1, H5P_DEFAULT, &wbuf_reg[0]);
@@ -3351,7 +3351,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Region reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ printf("--- Region reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3371,7 +3371,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated region reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ printf("--- Deprecated region reference create time: %lfs\n", t / MAX_ITER_CREATE);
t = 0;
for (i = 0; i < MAX_ITER_WRITE; i++) {
@@ -3383,7 +3383,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated region reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ printf("--- Deprecated region reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3417,7 +3417,7 @@ test_reference_perf(void)
CHECK(ret, FAIL, "H5Rdestroy");
}
if (VERBOSE_MED)
- HDprintf("--- Object reference read time: %lfs\n", t / MAX_ITER_READ);
+ printf("--- Object reference read time: %lfs\n", t / MAX_ITER_READ);
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
@@ -3463,7 +3463,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated object reference read time: %lfs\n", t / MAX_ITER_READ);
+ printf("--- Deprecated object reference read time: %lfs\n", t / MAX_ITER_READ);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3485,7 +3485,7 @@ test_reference_perf(void)
CHECK(ret, FAIL, "H5Rdestroy");
}
if (VERBOSE_MED)
- HDprintf("--- Region reference read time: %lfs\n", t / MAX_ITER_READ);
+ printf("--- Region reference read time: %lfs\n", t / MAX_ITER_READ);
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_reg);
@@ -3509,7 +3509,7 @@ test_reference_perf(void)
t += t2 - t1;
}
if (VERBOSE_MED)
- HDprintf("--- Deprecated region reference read time: %lfs\n", t / MAX_ITER_READ);
+ printf("--- Deprecated region reference read time: %lfs\n", t / MAX_ITER_READ);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -3536,17 +3536,17 @@ test_reference_perf(void)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(wbuf_reg);
- HDfree(rbuf_reg);
- HDfree(wbuf_deprec);
- HDfree(rbuf_deprec);
- HDfree(wbuf_reg_deprec);
- HDfree(rbuf_reg_deprec);
- HDfree(tbuf);
- HDfree(ibuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(wbuf_reg);
+ free(rbuf_reg);
+ free(wbuf_deprec);
+ free(rbuf_deprec);
+ free(wbuf_reg_deprec);
+ free(rbuf_reg_deprec);
+ free(tbuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_perf() */
/****************************************************************
diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c
index 8d75fed..3bc3ff3 100644
--- a/test/trefer_deprec.c
+++ b/test/trefer_deprec.c
@@ -85,12 +85,12 @@ test_reference_params(void)
MESSAGE(5, ("Testing Reference Parameters\n"));
/* Allocate write & read buffers */
- wbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
- CHECK_PTR(rbuf, "HDmalloc");
- tbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
- CHECK_PTR(tbuf, "HDmalloc");
+ wbuf = (hobj_ref_t *)malloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (hobj_ref_t *)malloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
+ CHECK_PTR(rbuf, "malloc");
+ tbuf = (hobj_ref_t *)malloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
+ CHECK_PTR(tbuf, "malloc");
/* Create file */
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -232,9 +232,9 @@ test_reference_params(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(tbuf);
+ free(wbuf);
+ free(rbuf);
+ free(tbuf);
} /* test_reference_obj() */
/****************************************************************
@@ -270,12 +270,12 @@ test_reference_obj(void)
MESSAGE(5, ("Testing Object Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
- CHECK_PTR(rbuf, "HDmalloc");
- tbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
- CHECK_PTR(tbuf, "HDmalloc");
+ wbuf = (hobj_ref_t *)malloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (hobj_ref_t *)malloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
+ CHECK_PTR(rbuf, "malloc");
+ tbuf = (hobj_ref_t *)malloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)) * SPACE1_DIM1);
+ CHECK_PTR(tbuf, "malloc");
/* Create file */
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -486,9 +486,9 @@ test_reference_obj(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(tbuf);
+ free(wbuf);
+ free(rbuf);
+ free(tbuf);
} /* test_reference_obj() */
/****************************************************************
@@ -542,10 +542,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
MESSAGE(5, ("Testing Dataset Region Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
- rbuf = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
- dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
+ rbuf = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
+ dwbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
/* Create file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -807,15 +807,15 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 36, "H5Sget_select_npoints");
ret = (int)H5Sget_select_hyper_nblocks(sid2);
VERIFY(ret, 1, "H5Sget_select_hyper_nblocks");
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) *
- 2); /* allocate space for the hyperslab blocks */
+ coords = (hsize_t *)malloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) *
+ 2); /* allocate space for the hyperslab blocks */
ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
VERIFY(coords[0], 2, "Hyperslab Coordinates");
VERIFY(coords[1], 2, "Hyperslab Coordinates");
VERIFY(coords[2], 7, "Hyperslab Coordinates");
VERIFY(coords[3], 7, "Hyperslab Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid2, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 2, "Selection Bounds");
@@ -836,8 +836,8 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 10, "H5Sget_select_npoints");
ret = (int)H5Sget_select_elem_npoints(sid2);
VERIFY(ret, 10, "H5Sget_select_elem_npoints");
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK *
- sizeof(hsize_t)); /* allocate space for the element points */
+ coords = (hsize_t *)malloc((size_t)ret * SPACE2_RANK *
+ sizeof(hsize_t)); /* allocate space for the element points */
ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
VERIFY(coords[0], coord1[0][0], "Element Coordinates");
@@ -860,7 +860,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[17], coord1[8][1], "Element Coordinates");
VERIFY(coords[18], coord1[9][0], "Element Coordinates");
VERIFY(coords[19], coord1[9][1], "Element Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid2, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 0, "Selection Bounds");
@@ -930,10 +930,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
} /* test_reference_region() */
/****************************************************************
@@ -978,10 +978,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
- rbuf = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
- dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE3_DIM1);
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
+ wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
+ rbuf = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
+ dwbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE3_DIM1);
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
/* Create the file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -1131,8 +1131,8 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 30, "H5Sget_select_npoints");
ret = (int)H5Sget_select_hyper_nblocks(sid3);
VERIFY(ret, 15, "H5Sget_select_hyper_nblocks");
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) *
- 2); /* allocate space for the hyperslab blocks */
+ coords = (hsize_t *)malloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) *
+ 2); /* allocate space for the hyperslab blocks */
ret = H5Sget_select_hyper_blocklist(sid3, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
VERIFY(coords[0], 2, "Hyperslab Coordinates");
@@ -1165,7 +1165,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[27], 68, "Hyperslab Coordinates");
VERIFY(coords[28], 72, "Hyperslab Coordinates");
VERIFY(coords[29], 73, "Hyperslab Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid3, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 2, "Selection Bounds");
@@ -1184,8 +1184,8 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 10, "H5Sget_select_npoints");
ret = (int)H5Sget_select_elem_npoints(sid3);
VERIFY(ret, 10, "H5Sget_select_elem_npoints");
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK *
- sizeof(hsize_t)); /* allocate space for the element points */
+ coords = (hsize_t *)malloc((size_t)ret * SPACE3_RANK *
+ sizeof(hsize_t)); /* allocate space for the element points */
ret = H5Sget_select_elem_pointlist(sid3, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
VERIFY(coords[0], coord1[0][0], "Element Coordinates");
@@ -1198,7 +1198,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[7], coord1[7][0], "Element Coordinates");
VERIFY(coords[8], coord1[8][0], "Element Coordinates");
VERIFY(coords[9], coord1[9][0], "Element Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid3, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 3, "Selection Bounds");
@@ -1233,10 +1233,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
} /* test_reference_region_1D() */
/****************************************************************
@@ -1317,7 +1317,7 @@ test_reference_obj_deleted(void)
VERIFY(dset2, FAIL, "H5Rdereference2");
/* Read selection from disk */
- HDmemset(&oref, 0, sizeof(hobj_ref_t));
+ memset(&oref, 0, sizeof(hobj_ref_t));
ret = H5Dread(dataset, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, &oref);
CHECK(ret, FAIL, "H5Dread");
@@ -1326,7 +1326,7 @@ test_reference_obj_deleted(void)
VERIFY(dset2, FAIL, "H5Rdereference2");
/* Open nonsense reference */
- HDmemset(&oref, 0, sizeof(hobj_ref_t));
+ memset(&oref, 0, sizeof(hobj_ref_t));
dset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &oref);
VERIFY(dset2, FAIL, "H5Rdereference2");
@@ -1426,9 +1426,9 @@ test_reference_group(void)
/* Create bottom dataset */
did = H5Dcreate2(gid, DSETNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(did > 0);
+ assert(did > 0);
ret = H5Dclose(did);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Gclose(gid);
CHECK(ret, FAIL, "H5Gclose");
@@ -1538,10 +1538,10 @@ test_reference_compat(void)
MESSAGE(5, ("Testing Deprecated Object Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf_obj = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- rbuf_obj = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * SPACE1_DIM1);
- wbuf_reg = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- rbuf_reg = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
+ wbuf_obj = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ rbuf_obj = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * SPACE1_DIM1);
+ wbuf_reg = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf_reg = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
/* Create file */
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1798,10 +1798,10 @@ test_reference_compat(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf_obj);
- HDfree(rbuf_obj);
- HDfree(wbuf_reg);
- HDfree(rbuf_reg);
+ free(wbuf_obj);
+ free(rbuf_obj);
+ free(wbuf_reg);
+ free(rbuf_reg);
} /* test_reference_compat() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/test/trefer_shutdown.c b/test/trefer_shutdown.c
index 50bdb26..118d660 100644
--- a/test/trefer_shutdown.c
+++ b/test/trefer_shutdown.c
@@ -10,39 +10,39 @@ main(int argc, char **argv)
int i;
if ((fid = H5Fcreate("HDFFV-10992.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "H5Fcreate failed\n");
+ fprintf(stderr, "H5Fcreate failed\n");
return 1;
}
if ((sid = H5Screate(H5S_SCALAR)) < 0) {
- HDfprintf(stderr, "H5Screate failed\n");
+ fprintf(stderr, "H5Screate failed\n");
return 1;
}
/* Create a dataset of object references */
if ((did = H5Dcreate2(fid, "dset", H5T_STD_REF, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "H5Dcreate failed\n");
+ fprintf(stderr, "H5Dcreate failed\n");
return 1;
}
for (i = 0; i < 100; i++) {
/* Create reference to the root group */
if (H5Rcreate_object(fid, "/dset", H5P_DEFAULT, &write_ref) < 0) {
- HDfprintf(stderr, "H5Rcreate_object failed\n");
+ fprintf(stderr, "H5Rcreate_object failed\n");
return 1;
}
}
/* Write reference to dataset */
if (H5Dwrite(did, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &write_ref) < 0) {
- HDfprintf(stderr, "H5Dwrite failed\n");
+ fprintf(stderr, "H5Dwrite failed\n");
return 1;
}
for (i = 0; i < 500; i++) {
/* Read reference back into different reference buffer */
if (H5Dread(did, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &read_ref) < 0) {
- HDfprintf(stderr, "H5Dread failed\n");
+ fprintf(stderr, "H5Dread failed\n");
return 1;
}
}
@@ -55,27 +55,27 @@ main(int argc, char **argv)
*/
#if 0
if (H5Rdestroy(&write_ref) < 0) {
- HDfprintf(stderr, "H5Rdestroy on reference write buffer failed\n");
+ fprintf(stderr, "H5Rdestroy on reference write buffer failed\n");
return 1;
}
if (H5Rdestroy(&read_ref) < 0) {
- HDfprintf(stderr, "H5Rdestroy on reference read buffer failed\n");
+ fprintf(stderr, "H5Rdestroy on reference read buffer failed\n");
return 1;
}
#endif
if (H5Sclose(sid) < 0) {
- HDfprintf(stderr, "H5Sclose failed\n");
+ fprintf(stderr, "H5Sclose failed\n");
return 1;
}
if (H5Dclose(did) < 0) {
- HDfprintf(stderr, "H5Dclose failed\n");
+ fprintf(stderr, "H5Dclose failed\n");
return 1;
}
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "H5Fclose failed\n");
+ fprintf(stderr, "H5Fclose failed\n");
return 1;
}
diff --git a/test/trefstr.c b/test/trefstr.c
index 9019ce6..e556c3c 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -375,9 +375,9 @@ test_refstr_acat(void)
VERIFY(cmp, 0, "HDstrcmp");
/* Append a large string to ref-counted string */
- large_str = HDmalloc(1024);
- CHECK_PTR(large_str, "HDmalloc");
- HDmemset(large_str, 'a', 1024);
+ large_str = malloc(1024);
+ CHECK_PTR(large_str, "malloc");
+ memset(large_str, 'a', 1024);
large_str[1023] = '\0';
ret = H5RS_acat(rs, large_str);
CHECK(ret, FAIL, "H5RS_acat");
@@ -386,10 +386,10 @@ test_refstr_acat(void)
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
HDsnprintf(buf, sizeof(buf), "%s", "foobar");
- large_str2 = HDmalloc(1024 + 6);
- CHECK_PTR(large_str2, "HDmalloc");
+ large_str2 = malloc(1024 + 6);
+ CHECK_PTR(large_str2, "malloc");
HDstrcpy(large_str2, "foobar");
- HDmemset(&large_str2[6], 'a', 1024);
+ memset(&large_str2[6], 'a', 1024);
large_str2[1029] = '\0';
cmp = HDstrcmp(s, large_str2);
VERIFY(cmp, 0, "HDstrcmp");
@@ -399,8 +399,8 @@ test_refstr_acat(void)
CHECK(ret, FAIL, "H5RS_decr");
/* Free large strings */
- HDfree(large_str);
- HDfree(large_str2);
+ free(large_str);
+ free(large_str2);
} /* end test_refstr_acat() */
/****************************************************************
diff --git a/test/tselect.c b/test/tselect.c
index d67e5bd..70c9d6a 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -247,10 +247,10 @@ test_select_hyper(hid_t xfer_plist)
MESSAGE(5, ("Testing Hyperslab Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -434,8 +434,8 @@ test_select_hyper(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper() */
struct pnt_iter {
@@ -501,10 +501,10 @@ test_select_point(hid_t xfer_plist)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -648,7 +648,7 @@ test_select_point(hid_t xfer_plist)
/* Save points for later iteration */
/* (these are in the second half of the buffer, because we are prepending */
/* the next list of points to the beginning of the point selection list) */
- HDmemcpy(((char *)pi.coord) + sizeof(coord2), coord2, sizeof(coord2));
+ memcpy(((char *)pi.coord) + sizeof(coord2), coord2, sizeof(coord2));
ret = (int)H5Sget_select_npoints(sid2);
VERIFY(ret, 10, "H5Sget_select_npoints");
@@ -688,7 +688,7 @@ test_select_point(hid_t xfer_plist)
VERIFY(ret, 20, "H5Sget_select_npoints");
/* Save points for later iteration */
- HDmemcpy(pi.coord, coord2, sizeof(coord2));
+ memcpy(pi.coord, coord2, sizeof(coord2));
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -801,8 +801,8 @@ test_select_point(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_point() */
/****************************************************************
@@ -863,10 +863,10 @@ test_select_all(hid_t xfer_plist)
MESSAGE(5, ("Testing 'All' Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++)
@@ -916,8 +916,8 @@ test_select_all(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_all() */
/****************************************************************
@@ -950,10 +950,10 @@ test_select_all_hyper(hid_t xfer_plist)
MESSAGE(5, ("Testing 'All' Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1068,8 +1068,8 @@ test_select_all_hyper(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_all_hyper() */
/****************************************************************
@@ -1104,10 +1104,10 @@ test_select_combo(void)
MESSAGE(5, ("Testing Combination of Hyperslab & Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1229,8 +1229,8 @@ test_select_combo(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_combo() */
static int
@@ -1299,10 +1299,10 @@ test_select_hyper_stride(hid_t xfer_plist)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1389,10 +1389,10 @@ test_select_hyper_stride(hid_t xfer_plist)
tbuf = wbuf + loc1[i];
tbuf2 = rbuf + loc2[i];
if (*tbuf != *tbuf2) {
- HDprintf("%d: hyperslab values don't match!, loc1[%d]=%d, loc2[%d]=%d\n", __LINE__, i,
- (int)loc1[i], i, (int)loc2[i]);
- HDprintf("wbuf=%p, tbuf=%p, rbuf=%p, tbuf2=%p\n", (void *)wbuf, (void *)tbuf, (void *)rbuf,
- (void *)tbuf2);
+ printf("%d: hyperslab values don't match!, loc1[%d]=%d, loc2[%d]=%d\n", __LINE__, i, (int)loc1[i],
+ i, (int)loc2[i]);
+ printf("wbuf=%p, tbuf=%p, rbuf=%p, tbuf2=%p\n", (void *)wbuf, (void *)tbuf, (void *)rbuf,
+ (void *)tbuf2);
TestErrPrintf("*tbuf=%u, *tbuf2=%u\n", (unsigned)*tbuf, (unsigned)*tbuf2);
} /* end if */
} /* end for */
@@ -1414,8 +1414,8 @@ test_select_hyper_stride(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_stride() */
/****************************************************************
@@ -1445,10 +1445,10 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
MESSAGE(5, ("Testing Contiguous Hyperslabs Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1536,7 +1536,7 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 30 * 12) != 0)
+ if (memcmp(rbuf, wbuf, sizeof(uint16_t) * 30 * 12) != 0)
TestErrPrintf("hyperslab values don't match! Line=%d\n", __LINE__);
/* Close memory dataspace */
@@ -1556,8 +1556,8 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_contig() */
/****************************************************************
@@ -1585,11 +1585,11 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
MESSAGE(5, ("Testing More Contiguous Hyperslabs Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t),
- (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf =
+ (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE8_DIM1; i++)
@@ -1679,7 +1679,7 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 2 * SPACE8_DIM3 * SPACE8_DIM2 * SPACE8_DIM1) != 0)
+ if (memcmp(rbuf, wbuf, sizeof(uint16_t) * 2 * SPACE8_DIM3 * SPACE8_DIM2 * SPACE8_DIM1) != 0)
TestErrPrintf("Error: hyperslab values don't match!\n");
/* Close memory dataspace */
@@ -1699,8 +1699,8 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_contig2() */
/****************************************************************
@@ -1731,11 +1731,11 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
MESSAGE(5, ("Testing Yet More Contiguous Hyperslabs Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t),
- (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf =
+ (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE8_DIM4; i++)
@@ -1834,14 +1834,14 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
(k >= start[2] && k < (start[2] + count[2])) &&
(l >= start[3] && l < (start[3] + count[3]))) {
if (*tbuf != *tbuf2) {
- HDprintf("Error: hyperslab values don't match!\n");
+ printf("Error: hyperslab values don't match!\n");
TestErrPrintf("Line: %d, i=%u, j=%u, k=%u, l=%u, *tbuf=%u,*tbuf2=%u\n", __LINE__,
i, j, k, l, (unsigned)*tbuf, (unsigned)*tbuf2);
} /* end if */
} /* end if */
else {
if (*tbuf2 != 0) {
- HDprintf("Error: invalid data in read buffer!\n");
+ printf("Error: invalid data in read buffer!\n");
TestErrPrintf("Line: %d, i=%u, j=%u, k=%u, l=%u, *tbuf=%u,*tbuf2=%u\n", __LINE__,
i, j, k, l, (unsigned)*tbuf, (unsigned)*tbuf2);
} /* end if */
@@ -1864,8 +1864,8 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_contig3() */
/****************************************************************
@@ -1884,8 +1884,8 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR
size_t s; /* Local index variable */
hbool_t mis_match; /* Flag to indicate mismatch in expected value */
- HDassert(cube_buf);
- HDassert(cube_size > 0);
+ assert(cube_buf);
+ assert(cube_size > 0);
expected_value = 0;
mis_match = FALSE;
@@ -1902,7 +1902,7 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR
m = 0;
do {
/* Sanity check */
- HDassert(s < cube_size);
+ assert(s < cube_size);
/* Check for correct value */
if (*cube_ptr != expected_value)
@@ -1976,12 +1976,12 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
MESSAGE(7, ("\tranks = %u/%u, edge_size = %u, chunk_edge_size = %u.\n", small_rank, large_rank, edge_size,
chunk_edge_size));
- HDassert(edge_size >= 6);
- HDassert(edge_size >= chunk_edge_size);
- HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
- HDassert(small_rank > 0);
- HDassert(small_rank < large_rank);
- HDassert(large_rank <= SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(edge_size >= chunk_edge_size);
+ assert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
+ assert(small_rank > 0);
+ assert(small_rank < large_rank);
+ assert(large_rank <= SS_DR_MAX_RANK);
/* Compute cube sizes */
small_cube_size = large_cube_size = (size_t)1;
@@ -1992,7 +1992,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
large_cube_size *= (size_t)edge_size;
} /* end for */
- HDassert(large_cube_size < (size_t)UINT_MAX);
+ assert(large_cube_size < (size_t)UINT_MAX);
/* set up the start, stride, count, and block pointers */
start_ptr = &(start[SS_DR_MAX_RANK - large_rank]);
@@ -2001,10 +2001,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
block_ptr = &(block[SS_DR_MAX_RANK - large_rank]);
/* Allocate buffers */
- small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size);
- CHECK_PTR(small_cube_buf_1, "HDcalloc");
- large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size);
- CHECK_PTR(large_cube_buf_1, "HDcalloc");
+ small_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), small_cube_size);
+ CHECK_PTR(small_cube_buf_1, "calloc");
+ large_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), large_cube_size);
+ CHECK_PTR(large_cube_buf_1, "calloc");
/* Create a dataset transfer property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -2195,7 +2195,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
*/
/* zero out the in-memory large cube */
- HDmemset(large_cube_buf_1, 0, large_cube_size * sizeof(uint16_t));
+ memset(large_cube_buf_1, 0, large_cube_size * sizeof(uint16_t));
u = 0;
do {
@@ -2238,8 +2238,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
(x * edge_size);
stop_index = start_index + small_cube_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= large_cube_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= large_cube_size);
mis_match = FALSE;
ptr_1 = large_cube_buf_1;
@@ -2264,7 +2264,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
TestErrPrintf("large cube read from small cube has bad data! Line=%u\n", __LINE__);
/* Zero out the buffer for the next pass */
- HDmemset(large_cube_buf_1 + start_index, 0, small_cube_size * sizeof(uint16_t));
+ memset(large_cube_buf_1 + start_index, 0, small_cube_size * sizeof(uint16_t));
x++;
} while ((large_rank >= 2) && (small_rank <= 1) && (x < edge_size));
@@ -2432,8 +2432,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
(x * edge_size);
stop_index = start_index + small_cube_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= large_cube_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= large_cube_size);
mis_match = FALSE;
ptr_1 = large_cube_buf_1;
@@ -2489,8 +2489,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(small_cube_buf_1);
- HDfree(large_cube_buf_1);
+ free(small_cube_buf_1);
+ free(large_cube_buf_1);
} /* test_select_hyper_contig_dr__run_test() */
@@ -2528,8 +2528,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
max_cube_size *= (size_t)edge_size;
/* Allocate cube buffer for writing values */
- cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size);
- CHECK_PTR(cube_buf, "HDmalloc");
+ cube_buf = (uint16_t *)malloc(sizeof(uint16_t) * max_cube_size);
+ CHECK_PTR(cube_buf, "malloc");
/* Initialize the cube buffer */
cube_ptr = cube_buf;
@@ -2537,8 +2537,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
*cube_ptr++ = (uint16_t)s;
/* Allocate cube buffer for zeroing values on disk */
- zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size);
- CHECK_PTR(zero_buf, "HDcalloc");
+ zero_buf = (uint16_t *)calloc(sizeof(uint16_t), max_cube_size);
+ CHECK_PTR(zero_buf, "calloc");
for (large_rank = 1; large_rank <= max_rank; large_rank++) {
for (small_rank = 1; small_rank < large_rank; small_rank++) {
@@ -2554,8 +2554,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
} /* for loop on small rank */
} /* for loop on large rank */
- HDfree(cube_buf);
- HDfree(zero_buf);
+ free(cube_buf);
+ free(zero_buf);
} /* test_select_hyper_contig_dr() */
@@ -2597,16 +2597,16 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
unsigned u; /* Local index variables */
herr_t ret; /* Generic return value */
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(0 < sel_rank);
- HDassert(sel_rank <= tgt_n_cube_rank);
- HDassert(tgt_n_cube_rank <= SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(0 < sel_rank);
+ assert(sel_rank <= tgt_n_cube_rank);
+ assert(tgt_n_cube_rank <= SS_DR_MAX_RANK);
sel_offset = SS_DR_MAX_RANK - sel_rank;
n_cube_offset = SS_DR_MAX_RANK - tgt_n_cube_rank;
- HDassert(n_cube_offset <= sel_offset);
+ assert(n_cube_offset <= sel_offset);
/* First, compute the base count (which assumes start == 0
* for the associated offset) and offset_count (which
@@ -2819,13 +2819,13 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank
unsigned v, w, x, y, z; /* to track position in checker */
const unsigned test_max_rank = 5; /* code changes needed if this is increased */
- HDassert(buf_ptr != NULL);
- HDassert(0 < rank);
- HDassert(rank <= test_max_rank);
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(test_max_rank <= SS_DR_MAX_RANK);
+ assert(buf_ptr != NULL);
+ assert(0 < rank);
+ assert(rank <= test_max_rank);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(test_max_rank <= SS_DR_MAX_RANK);
val_ptr = buf_ptr;
expected_value = first_expected_val;
@@ -2956,15 +2956,15 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
MESSAGE(7, ("\tranks = %d/%d, edge_size = %d, checker_edge_size = %d, chunk_edge_size = %d.\n",
small_rank, large_rank, edge_size, checker_edge_size, chunk_edge_size));
- HDassert(edge_size >= 6);
- HDassert(checker_edge_size > 0);
- HDassert(checker_edge_size <= edge_size);
- HDassert(edge_size >= chunk_edge_size);
- HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
- HDassert(small_rank > 0);
- HDassert(small_rank < large_rank);
- HDassert(large_rank <= test_max_rank);
- HDassert(test_max_rank <= SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(checker_edge_size > 0);
+ assert(checker_edge_size <= edge_size);
+ assert(edge_size >= chunk_edge_size);
+ assert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
+ assert(small_rank > 0);
+ assert(small_rank < large_rank);
+ assert(large_rank <= test_max_rank);
+ assert(test_max_rank <= SS_DR_MAX_RANK);
/* Compute cube sizes */
small_cube_size = large_cube_size = (size_t)1;
@@ -2974,22 +2974,22 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
large_cube_size *= (size_t)edge_size;
} /* end for */
- HDassert(large_cube_size < (size_t)(UINT_MAX));
+ assert(large_cube_size < (size_t)(UINT_MAX));
small_rank_offset = test_max_rank - small_rank;
- HDassert(small_rank_offset >= 1);
+ assert(small_rank_offset >= 1);
/* also, at present, we use 16 bit values in this test --
* hence the following assertion. Delete it if we convert
* to 32 bit values.
*/
- HDassert(large_cube_size < (size_t)(64 * 1024));
+ assert(large_cube_size < (size_t)(64 * 1024));
/* Allocate & initialize buffers */
- small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size);
- CHECK_PTR(small_cube_buf_1, "HDcalloc");
- large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size);
- CHECK_PTR(large_cube_buf_1, "HDcalloc");
+ small_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), small_cube_size);
+ CHECK_PTR(small_cube_buf_1, "calloc");
+ large_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), large_cube_size);
+ CHECK_PTR(large_cube_buf_1, "calloc");
/* Create a dataset transfer property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -3150,11 +3150,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* need for another inner loop.
*/
- HDassert((sel_start[0] == 0) || (0 < small_rank_offset));
- HDassert((sel_start[1] == 0) || (1 < small_rank_offset));
- HDassert((sel_start[2] == 0) || (2 < small_rank_offset));
- HDassert((sel_start[3] == 0) || (3 < small_rank_offset));
- HDassert((sel_start[4] == 0) || (4 < small_rank_offset));
+ assert((sel_start[0] == 0) || (0 < small_rank_offset));
+ assert((sel_start[1] == 0) || (1 < small_rank_offset));
+ assert((sel_start[2] == 0) || (2 < small_rank_offset));
+ assert((sel_start[3] == 0) || (3 < small_rank_offset));
+ assert((sel_start[4] == 0) || (4 < small_rank_offset));
test_select_hyper_checker_board_dr__select_checker_board(
file_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start);
@@ -3166,7 +3166,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
VERIFY(check, TRUE, "H5Sselect_shape_same");
/* zero the buffer that we will be using for reading */
- HDmemset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
+ memset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
/* Read selection from disk */
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, mem_small_cube_sid,
@@ -3230,11 +3230,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* need for another inner loop.
*/
- HDassert((sel_start[0] == 0) || (0 < small_rank_offset));
- HDassert((sel_start[1] == 0) || (1 < small_rank_offset));
- HDassert((sel_start[2] == 0) || (2 < small_rank_offset));
- HDassert((sel_start[3] == 0) || (3 < small_rank_offset));
- HDassert((sel_start[4] == 0) || (4 < small_rank_offset));
+ assert((sel_start[0] == 0) || (0 < small_rank_offset));
+ assert((sel_start[1] == 0) || (1 < small_rank_offset));
+ assert((sel_start[2] == 0) || (2 < small_rank_offset));
+ assert((sel_start[3] == 0) || (3 < small_rank_offset));
+ assert((sel_start[4] == 0) || (4 < small_rank_offset));
test_select_hyper_checker_board_dr__select_checker_board(
mem_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start);
@@ -3246,7 +3246,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
VERIFY(check, TRUE, "H5Sselect_shape_same");
/* zero out the in memory large cube */
- HDmemset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
+ memset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
/* Read selection from disk */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
@@ -3264,8 +3264,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
(x * edge_size);
stop_index = start_index + small_cube_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= large_cube_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= large_cube_size);
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
@@ -3273,7 +3273,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = FALSE;
ptr_1++;
} /* end for */
- HDassert(s == start_index);
+ assert(s == start_index);
data_ok &= test_select_hyper_checker_board_dr__verify_data(
ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
@@ -3281,7 +3281,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
ptr_1 += small_cube_size;
s += small_cube_size;
- HDassert(s == stop_index + 1);
+ assert(s == stop_index + 1);
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
@@ -3350,11 +3350,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* need for another inner loop.
*/
- HDassert((sel_start[0] == 0) || (0 < small_rank_offset));
- HDassert((sel_start[1] == 0) || (1 < small_rank_offset));
- HDassert((sel_start[2] == 0) || (2 < small_rank_offset));
- HDassert((sel_start[3] == 0) || (3 < small_rank_offset));
- HDassert((sel_start[4] == 0) || (4 < small_rank_offset));
+ assert((sel_start[0] == 0) || (0 < small_rank_offset));
+ assert((sel_start[1] == 0) || (1 < small_rank_offset));
+ assert((sel_start[2] == 0) || (2 < small_rank_offset));
+ assert((sel_start[3] == 0) || (3 < small_rank_offset));
+ assert((sel_start[4] == 0) || (4 < small_rank_offset));
test_select_hyper_checker_board_dr__select_checker_board(
mem_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start);
@@ -3373,7 +3373,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(ret, FAIL, "H5Dwrite");
/* zero the buffer that we will be using for reading */
- HDmemset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
+ memset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
/* read the on disk small cube into memory */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
@@ -3445,11 +3445,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* need for another inner loop.
*/
- HDassert((sel_start[0] == 0) || (0 < small_rank_offset));
- HDassert((sel_start[1] == 0) || (1 < small_rank_offset));
- HDassert((sel_start[2] == 0) || (2 < small_rank_offset));
- HDassert((sel_start[3] == 0) || (3 < small_rank_offset));
- HDassert((sel_start[4] == 0) || (4 < small_rank_offset));
+ assert((sel_start[0] == 0) || (0 < small_rank_offset));
+ assert((sel_start[1] == 0) || (1 < small_rank_offset));
+ assert((sel_start[2] == 0) || (2 < small_rank_offset));
+ assert((sel_start[3] == 0) || (3 < small_rank_offset));
+ assert((sel_start[4] == 0) || (4 < small_rank_offset));
test_select_hyper_checker_board_dr__select_checker_board(
file_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start);
@@ -3469,7 +3469,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(ret, FAIL, "H5Dwrite");
/* zero out the in memory large cube */
- HDmemset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
+ memset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
/* read the on disk large cube into memory */
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
@@ -3488,8 +3488,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
(x * edge_size);
stop_index = start_index + small_cube_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= large_cube_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= large_cube_size);
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
@@ -3497,7 +3497,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = FALSE;
ptr_1++;
} /* end for */
- HDassert(s == start_index);
+ assert(s == start_index);
/* verify that the slice contains the expected data */
data_ok &= test_select_hyper_checker_board_dr__verify_data(
@@ -3506,7 +3506,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
ptr_1 += small_cube_size;
s += small_cube_size;
- HDassert(s == stop_index + 1);
+ assert(s == stop_index + 1);
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
@@ -3561,8 +3561,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(small_cube_buf_1);
- HDfree(large_cube_buf_1);
+ free(small_cube_buf_1);
+ free(large_cube_buf_1);
} /* test_select_hyper_checker_board_dr__run_test() */
@@ -3604,8 +3604,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
max_cube_size *= (size_t)(edge_size + 1);
/* Allocate cube buffer for writing values */
- cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size);
- CHECK_PTR(cube_buf, "HDmalloc");
+ cube_buf = (uint16_t *)malloc(sizeof(uint16_t) * max_cube_size);
+ CHECK_PTR(cube_buf, "malloc");
/* Initialize the cube buffer */
cube_ptr = cube_buf;
@@ -3613,8 +3613,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
*cube_ptr++ = (uint16_t)s;
/* Allocate cube buffer for zeroing values on disk */
- zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size);
- CHECK_PTR(zero_buf, "HDcalloc");
+ zero_buf = (uint16_t *)calloc(sizeof(uint16_t), max_cube_size);
+ CHECK_PTR(zero_buf, "calloc");
for (large_rank = 1; large_rank <= max_rank; large_rank++) {
for (small_rank = 1; small_rank < large_rank; small_rank++) {
@@ -3642,8 +3642,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
} /* for loop on small rank */
} /* for loop on large rank */
- HDfree(cube_buf);
- HDfree(zero_buf);
+ free(cube_buf);
+ free(zero_buf);
} /* test_select_hyper_checker_board_dr() */
@@ -3677,12 +3677,12 @@ test_select_hyper_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
- rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf2, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
+ rbuf2 = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf2, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -3786,7 +3786,7 @@ test_select_hyper_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
+ if (memcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
TestErrPrintf("hyperslab values don't match! Line=%d\n", __LINE__);
/* Close memory dataspace */
@@ -3814,9 +3814,9 @@ test_select_hyper_copy(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(rbuf2);
+ free(wbuf);
+ free(rbuf);
+ free(rbuf2);
} /* test_select_hyper_copy() */
/****************************************************************
@@ -3848,12 +3848,12 @@ test_select_point_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
- rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf2, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
+ rbuf2 = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf2, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -3999,7 +3999,7 @@ test_select_point_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
+ if (memcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
TestErrPrintf("point values don't match!\n");
/* Close memory dataspace */
@@ -4027,9 +4027,9 @@ test_select_point_copy(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(rbuf2);
+ free(wbuf);
+ free(rbuf);
+ free(rbuf2);
} /* test_select_point_copy() */
/****************************************************************
@@ -4066,10 +4066,10 @@ test_select_hyper_offset(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with Offsets\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -4215,8 +4215,8 @@ test_select_hyper_offset(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_offset() */
/****************************************************************
@@ -4248,10 +4248,10 @@ test_select_hyper_offset2(void)
MESSAGE(5, ("Testing More Hyperslab Selection Functions with Offsets\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE7_DIM1 * SPACE7_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE7_DIM1 * SPACE7_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE7_DIM1; i++)
@@ -4342,8 +4342,8 @@ test_select_hyper_offset2(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_offset2() */
/****************************************************************
@@ -4378,10 +4378,10 @@ test_select_point_offset(void)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -4562,8 +4562,8 @@ test_select_point_offset(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_point_offset() */
/****************************************************************
@@ -4605,10 +4605,10 @@ test_select_hyper_union(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -5188,8 +5188,8 @@ test_select_hyper_union(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_union() */
/****************************************************************
@@ -5260,7 +5260,7 @@ test_select_hyper_union_stagger(void)
CHECK(error, FAIL, "H5Fclose");
/* Initialize input buffer */
- HDmemset(data_out, 0, 7 * 7 * sizeof(int));
+ memset(data_out, 0, 7 * 7 * sizeof(int));
/* Open file */
file_id = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
@@ -5305,10 +5305,10 @@ test_select_hyper_union_stagger(void)
/* Verify input data */
for (i = 0; i < 8; i++) {
if (data[input_loc[i][0]][input_loc[i][1]] != data_out[output_loc[i][0]][output_loc[i][1]]) {
- HDprintf("input data #%d is wrong!\n", i);
- HDprintf("input_loc=[%d][%d]\n", input_loc[i][0], input_loc[i][1]);
- HDprintf("output_loc=[%d][%d]\n", output_loc[i][0], output_loc[i][1]);
- HDprintf("data=%d\n", data[input_loc[i][0]][input_loc[i][1]]);
+ printf("input data #%d is wrong!\n", i);
+ printf("input_loc=[%d][%d]\n", input_loc[i][0], input_loc[i][1]);
+ printf("output_loc=[%d][%d]\n", output_loc[i][0], output_loc[i][1]);
+ printf("data=%d\n", data[input_loc[i][0]][input_loc[i][1]]);
TestErrPrintf("data_out=%d\n", data_out[output_loc[i][0]][output_loc[i][1]]);
} /* end if */
} /* end for */
@@ -5383,10 +5383,10 @@ test_select_hyper_union_3d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of 3-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++)
@@ -5527,8 +5527,8 @@ test_select_hyper_union_3d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_union_3d() */
/****************************************************************
@@ -5558,7 +5558,7 @@ test_select_hyper_valid_combination(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Selection Combination Validity\n"));
- HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ assert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for single point selection */
single_pt_sid = H5Screate_simple(SPACE9_RANK, dims2D, NULL);
@@ -5707,10 +5707,10 @@ test_select_hyper_and_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with intersection of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -5784,14 +5784,14 @@ test_select_hyper_and_2d(void)
for (j = 0; j < SPACE2_DIM2; j++, tbuf++) {
if ((i >= 5 && i <= 9) && (j >= 5 && j <= 9)) {
if (*tbuf != *tbuf2)
- HDprintf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
- i, j, (int)*tbuf, (int)*tbuf2);
+ printf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
+ i, j, (int)*tbuf, (int)*tbuf2);
tbuf2++;
} /* end if */
else {
if (*tbuf != 0)
- HDprintf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
- (int)*tbuf);
+ printf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
+ (int)*tbuf);
} /* end else */
} /* end for */
@@ -5812,8 +5812,8 @@ test_select_hyper_and_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_and_2d() */
/****************************************************************
@@ -5846,10 +5846,10 @@ test_select_hyper_xor_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with XOR of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -5925,14 +5925,14 @@ test_select_hyper_xor_2d(void)
((i >= 5 && i <= 9) && ((j >= 0 && j <= 4) || (j >= 10 && j <= 14))) ||
((i >= 10 && i <= 14) && (j >= 5 && j <= 14))) {
if (*tbuf != *tbuf2)
- HDprintf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
- i, j, (int)*tbuf, (int)*tbuf2);
+ printf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
+ i, j, (int)*tbuf, (int)*tbuf2);
tbuf2++;
} /* end if */
else {
if (*tbuf != 0)
- HDprintf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
- (int)*tbuf);
+ printf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
+ (int)*tbuf);
} /* end else */
} /* end for */
@@ -5953,8 +5953,8 @@ test_select_hyper_xor_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_xor_2d() */
/****************************************************************
@@ -5987,10 +5987,10 @@ test_select_hyper_notb_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTB of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -6064,14 +6064,14 @@ test_select_hyper_notb_2d(void)
for (j = 0; j < SPACE2_DIM2; j++, tbuf++) {
if (((i >= 0 && i <= 4) && (j >= 0 && j <= 9)) || ((i >= 5 && i <= 9) && (j >= 0 && j <= 4))) {
if (*tbuf != *tbuf2)
- HDprintf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
- i, j, (int)*tbuf, (int)*tbuf2);
+ printf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n", __LINE__,
+ i, j, (int)*tbuf, (int)*tbuf2);
tbuf2++;
} /* end if */
else {
if (*tbuf != 0)
- HDprintf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
- (int)*tbuf);
+ printf("%d: hyperslab element has wrong value!, i=%d, j=%d, *tbuf=%d\n", __LINE__, i, j,
+ (int)*tbuf);
} /* end else */
} /* end for */
@@ -6092,8 +6092,8 @@ test_select_hyper_notb_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_notb_2d() */
/****************************************************************
@@ -6126,10 +6126,10 @@ test_select_hyper_nota_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTA of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -6232,8 +6232,8 @@ test_select_hyper_nota_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_nota_2d() */
/****************************************************************
@@ -6251,14 +6251,14 @@ test_select_hyper_iter2(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned ndim
if (*tbuf != **tbuf2) {
TestErrPrintf("Error in hyperslab iteration!\n");
- HDprintf("location: { ");
+ printf("location: { ");
for (u = 0; u < ndim; u++) {
- HDprintf("%2d", (int)point[u]);
+ printf("%2d", (int)point[u]);
if (u < (ndim - 1))
- HDprintf(", ");
+ printf(", ");
} /* end for */
- HDprintf("}\n");
- HDprintf("*tbuf=%d, **tbuf2=%d\n", *tbuf, **tbuf2);
+ printf("}\n");
+ printf("*tbuf=%d, **tbuf2=%d\n", *tbuf, **tbuf2);
return (-1);
} /* end if */
else {
@@ -6297,11 +6297,11 @@ test_select_hyper_union_random_5d(hid_t read_plist)
MESSAGE(5, ("Testing Hyperslab Selection Functions with random unions of 5-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (int *)HDmalloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (int *)HDcalloc(sizeof(int),
- (size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (int *)malloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (int *)calloc(sizeof(int),
+ (size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE5_DIM1; i++)
@@ -6390,7 +6390,7 @@ test_select_hyper_union_random_5d(hid_t read_plist)
} /* end if */
/* Set the read buffer back to all zeroes */
- HDmemset(rbuf, 0, (size_t)SPACE6_DIM1);
+ memset(rbuf, 0, (size_t)SPACE6_DIM1);
} /* end for */
/* Close memory dataspace */
@@ -6410,8 +6410,8 @@ test_select_hyper_union_random_5d(hid_t read_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_union_random_5d() */
/****************************************************************
@@ -6452,10 +6452,10 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
MESSAGE(5, ("Testing Hyperslab I/O on Large Chunks\n"));
/* Allocate the transfer buffers */
- data = (short *)HDmalloc(sizeof(short) * X * Y * Z);
- CHECK_PTR(data, "HDmalloc");
- data_out = (short *)HDcalloc((size_t)(NX * NY * NZ), sizeof(short));
- CHECK_PTR(data_out, "HDcalloc");
+ data = (short *)malloc(sizeof(short) * X * Y * Z);
+ CHECK_PTR(data, "malloc");
+ data_out = (short *)calloc((size_t)(NX * NY * NZ), sizeof(short));
+ CHECK_PTR(data_out, "calloc");
/*
* Data buffer initialization.
@@ -6636,8 +6636,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
CHECK(status, FAIL, "H5Sclose");
status = H5Fclose(file);
CHECK(status, FAIL, "H5Fclose");
- HDfree(data);
- HDfree(data_out);
+ free(data);
+ free(data_out);
} /* test_select_hyper_chunk() */
/****************************************************************
@@ -6678,10 +6678,10 @@ test_select_point_chunk(void)
MESSAGE(5, ("Testing Point Selections on Chunked Datasets\n"));
/* Allocate the transfer buffers */
- data = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(data, "HDmalloc");
- data_out = (unsigned *)HDcalloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(unsigned));
- CHECK_PTR(data_out, "HDcalloc");
+ data = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(data, "malloc");
+ data_out = (unsigned *)calloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(unsigned));
+ CHECK_PTR(data_out, "calloc");
/*
* Data buffer initialization.
@@ -6834,8 +6834,8 @@ test_select_point_chunk(void)
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(data);
- HDfree(data_out);
+ free(data);
+ free(data_out);
} /* test_select_point_chunk() */
/****************************************************************
@@ -7122,7 +7122,7 @@ test_select_combine(void)
VERIFY(nblocks, 1, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7157,7 +7157,7 @@ test_select_combine(void)
VERIFY(nblocks, 2, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7196,7 +7196,7 @@ test_select_combine(void)
VERIFY(nblocks, 2, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7255,7 +7255,7 @@ test_select_combine(void)
VERIFY(nblocks, 1, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7310,7 +7310,7 @@ test_select_combine(void)
VERIFY(nblocks, 1, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7365,7 +7365,7 @@ test_select_combine(void)
VERIFY(nblocks, 1, "H5Sget_select_hyper_nblocks");
/* Retrieve the block defined */
- HDmemset(blocks, -1, sizeof(blocks)); /* Reset block list */
+ memset(blocks, -1, sizeof(blocks)); /* Reset block list */
error = H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks, (hsize_t *)blocks);
CHECK(error, FAIL, "H5Sget_select_hyper_blocklist");
@@ -7457,8 +7457,8 @@ test_select_fill_all(void)
MESSAGE(5, ("Testing Filling 'all' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7505,7 +7505,7 @@ test_select_fill_all(void)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_all() */
/****************************************************************
@@ -7533,8 +7533,8 @@ test_select_fill_point(hssize_t *offset)
MESSAGE(5, ("Testing Filling 'point' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7550,14 +7550,14 @@ test_select_fill_point(hssize_t *offset)
CHECK(ret, FAIL, "H5Sselect_elements");
if (offset != NULL) {
- HDmemcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
+ memcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
/* Set offset, if provided */
ret = H5Soffset_simple(sid1, real_offset);
CHECK(ret, FAIL, "H5Soffset_simple");
} /* end if */
else
- HDmemset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
+ memset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
/* Set fill value */
fill_value = SPACE7_FILL;
@@ -7603,7 +7603,7 @@ test_select_fill_point(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_point() */
/****************************************************************
@@ -7633,8 +7633,8 @@ test_select_fill_hyper_simple(hssize_t *offset)
MESSAGE(5, ("Testing Filling Simple 'hyperslab' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7654,14 +7654,14 @@ test_select_fill_hyper_simple(hssize_t *offset)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
if (offset != NULL) {
- HDmemcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
+ memcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
/* Set offset, if provided */
ret = H5Soffset_simple(sid1, real_offset);
CHECK(ret, FAIL, "H5Soffset_simple");
} /* end if */
else
- HDmemset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
+ memset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
/* Set fill value */
fill_value = SPACE7_FILL;
@@ -7709,7 +7709,7 @@ test_select_fill_hyper_simple(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_hyper_simple() */
/****************************************************************
@@ -7744,8 +7744,8 @@ test_select_fill_hyper_regular(hssize_t *offset)
MESSAGE(5, ("Testing Filling Regular 'hyperslab' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7769,14 +7769,14 @@ test_select_fill_hyper_regular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
if (offset != NULL) {
- HDmemcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
+ memcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
/* Set offset, if provided */
ret = H5Soffset_simple(sid1, real_offset);
CHECK(ret, FAIL, "H5Soffset_simple");
} /* end if */
else
- HDmemset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
+ memset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
/* Set fill value */
fill_value = SPACE7_FILL;
@@ -7822,7 +7822,7 @@ test_select_fill_hyper_regular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_hyper_regular() */
/****************************************************************
@@ -7864,8 +7864,8 @@ test_select_fill_hyper_irregular(hssize_t *offset)
MESSAGE(5, ("Testing Filling Irregular 'hyperslab' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7893,14 +7893,14 @@ test_select_fill_hyper_irregular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
if (offset != NULL) {
- HDmemcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
+ memcpy(real_offset, offset, SPACE7_RANK * sizeof(hssize_t));
/* Set offset, if provided */
ret = H5Soffset_simple(sid1, real_offset);
CHECK(ret, FAIL, "H5Soffset_simple");
} /* end if */
else
- HDmemset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
+ memset(real_offset, 0, SPACE7_RANK * sizeof(hssize_t));
/* Set fill value */
fill_value = SPACE7_FILL;
@@ -7946,7 +7946,7 @@ test_select_fill_hyper_irregular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_hyper_irregular() */
/****************************************************************
@@ -7973,10 +7973,10 @@ test_select_none(void)
MESSAGE(5, ("Testing I/O on 0-sized Selections\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE7_DIM1; i++)
@@ -8043,8 +8043,8 @@ test_select_none(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_none() */
/****************************************************************
@@ -8076,10 +8076,10 @@ test_scalar_select(void)
MESSAGE(5, ("Testing I/O on Selections in Scalar Dataspaces\n"));
/* Allocate write & read buffers */
- wbuf_uint8 = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf_uint8, "HDmalloc");
- wbuf_ushort = (unsigned short *)HDmalloc(sizeof(unsigned short) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf_ushort, "HDmalloc");
+ wbuf_uint8 = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf_uint8, "malloc");
+ wbuf_ushort = (unsigned short *)malloc(sizeof(unsigned short) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf_ushort, "malloc");
/* Initialize write buffers */
for (i = 0, tbuf_uint8 = wbuf_uint8, tbuf_ushort = wbuf_ushort; i < SPACE7_DIM1; i++)
@@ -8202,8 +8202,8 @@ test_scalar_select(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf_uint8);
- HDfree(wbuf_ushort);
+ free(wbuf_uint8);
+ free(wbuf_ushort);
} /* test_scalar_select() */
/****************************************************************
@@ -8448,7 +8448,7 @@ test_shape_same(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Same Shape Comparisons\n"));
- HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ assert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for "all" selection */
all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL);
@@ -10901,13 +10901,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
htri_t check; /* Shape comparison return value */
herr_t ret; /* Generic return value */
- HDassert(0 < small_rank);
- HDassert(small_rank <= large_rank);
- HDassert(large_rank <= SS_DR_MAX_RANK);
- HDassert(0 <= offset);
- HDassert(offset < large_rank);
- HDassert(edge_size > 0);
- HDassert(edge_size <= 1000);
+ assert(0 < small_rank);
+ assert(small_rank <= large_rank);
+ assert(large_rank <= SS_DR_MAX_RANK);
+ assert(0 <= offset);
+ assert(offset < large_rank);
+ assert(edge_size > 0);
+ assert(edge_size <= 1000);
HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n",
test_num);
@@ -10959,7 +10959,7 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
*/
i = SS_DR_MAX_RANK - large_rank;
- HDassert(i >= 0);
+ assert(i >= 0);
start_ptr = &(start[i]);
stride_ptr = &(stride[i]);
@@ -11153,21 +11153,21 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
htri_t check; /* Shape comparison return value */
herr_t ret; /* Generic return value */
- HDassert(0 < small_rank);
- HDassert(small_rank <= large_rank);
- HDassert(large_rank <= SS_DR_MAX_RANK);
- HDassert(0 < checker_size);
- HDassert(checker_size <= edge_size);
- HDassert(edge_size <= 1000);
- HDassert(0 <= offset);
- HDassert(offset < (int)edge_size);
+ assert(0 < small_rank);
+ assert(small_rank <= large_rank);
+ assert(large_rank <= SS_DR_MAX_RANK);
+ assert(0 < checker_size);
+ assert(checker_size <= edge_size);
+ assert(edge_size <= 1000);
+ assert(0 <= offset);
+ assert(offset < (int)edge_size);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
if (dim_selected[i] == TRUE)
dims_selected++;
- HDassert(dims_selected >= 0);
- HDassert(dims_selected <= large_rank);
+ assert(dims_selected >= 0);
+ assert(dims_selected <= large_rank);
HDsnprintf(test_desc_0, sizeof(test_desc_0),
"\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
@@ -11356,7 +11356,7 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
*/
i = SS_DR_MAX_RANK - large_rank;
- HDassert(i >= 0);
+ assert(i >= 0);
start_ptr = &(start[i]);
stride_ptr = &(stride[i]);
@@ -11697,22 +11697,22 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
htri_t check; /* Shape comparison return value */
herr_t ret; /* Generic return value */
- HDassert(0 < small_rank);
- HDassert(small_rank <= large_rank);
- HDassert(large_rank <= SS_DR_MAX_RANK);
- HDassert(9 <= edge_size);
- HDassert(edge_size <= 1000);
- HDassert(0 <= slice_offset);
- HDassert(slice_offset < edge_size);
- HDassert(-2 <= pattern_offset);
- HDassert(pattern_offset <= 2);
+ assert(0 < small_rank);
+ assert(small_rank <= large_rank);
+ assert(large_rank <= SS_DR_MAX_RANK);
+ assert(9 <= edge_size);
+ assert(edge_size <= 1000);
+ assert(0 <= slice_offset);
+ assert(slice_offset < edge_size);
+ assert(-2 <= pattern_offset);
+ assert(pattern_offset <= 2);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
if (dim_selected[i] == TRUE)
dims_selected++;
- HDassert(dims_selected >= 0);
- HDassert(dims_selected <= large_rank);
+ assert(dims_selected >= 0);
+ assert(dims_selected <= large_rank);
HDsnprintf(test_desc_0, sizeof(test_desc_0),
"\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
@@ -11810,7 +11810,7 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
*/
i = SS_DR_MAX_RANK - large_rank;
- HDassert(i >= 0);
+ assert(i >= 0);
start_ptr = &(start[i]);
stride_ptr = &(stride[i]);
@@ -13560,10 +13560,10 @@ test_select_hyper_chunk_offset(void)
MESSAGE(6, ("Testing hyperslab selections using offsets in chunked datasets\n"));
/* Allocate buffers */
- wbuf = (int *)HDmalloc(sizeof(int) * SPACE10_DIM1);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (int *)HDcalloc(sizeof(int), SPACE10_DIM1);
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (int *)malloc(sizeof(int) * SPACE10_DIM1);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (int *)calloc(sizeof(int), SPACE10_DIM1);
+ CHECK_PTR(rbuf, "calloc");
/* Initialize the write buffer */
for (i = 0; i < SPACE10_DIM1; i++)
@@ -13743,8 +13743,8 @@ test_select_hyper_chunk_offset(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free the buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_chunk_offset() */
/****************************************************************
@@ -14294,14 +14294,14 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t endpoints, hssize_t en
hsize_t blocklist[12];
herr_t ret;
- HDassert(enblocks <= 2);
+ assert(enblocks <= 2);
/* Copy sid to lim_sid */
lim_sid = H5Scopy(sid);
CHECK(lim_sid, FAIL, "H5Scopy");
/* "And" lim_sid with dims to create limited selection */
- HDmemset(start, 0, sizeof(start));
+ memset(start, 0, sizeof(start));
ret = H5Sselect_hyperslab(lim_sid, H5S_SELECT_AND, start, NULL, dims, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -14328,18 +14328,18 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t endpoints, hssize_t en
/* Verify blocklist */
if (nblocks == (hssize_t)1) {
- if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0)
+ if (memcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end if */
else {
- HDassert(nblocks == (hssize_t)2);
- if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0) {
- if (HDmemcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])) != 0)
+ assert(nblocks == (hssize_t)2);
+ if (memcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0) {
+ if (memcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
- if (HDmemcmp(&blocklist[6], eblock1, 6 * sizeof(eblock1[0])) != 0)
+ if (memcmp(&blocklist[6], eblock1, 6 * sizeof(eblock1[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end if */
- else if (HDmemcmp(&blocklist[6], eblock2, 6 * sizeof(eblock2[0])) != 0)
+ else if (memcmp(&blocklist[6], eblock2, 6 * sizeof(eblock2[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end else */
} /* end if */
@@ -14760,7 +14760,7 @@ test_internal_consistency(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Consistency of Internal States\n"));
- HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ assert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for "all" selection */
all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL);
@@ -15108,7 +15108,7 @@ test_irreg_io(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* Reset the buffer */
- HDmemset(rbuf, 0, sizeof(rbuf));
+ memset(rbuf, 0, sizeof(rbuf));
/* Read selection from disk */
ret = H5Dread(did, H5T_NATIVE_UCHAR, mem_sid, sid, H5P_DEFAULT, rbuf);
@@ -15326,7 +15326,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
@@ -15374,7 +15374,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
@@ -15445,7 +15445,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
@@ -15493,7 +15493,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
@@ -15531,7 +15531,7 @@ test_sel_iter(void)
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert(0 && "Can't occur");
+ assert(0 && "Can't occur");
break;
} /* end switch */
diff --git a/test/tskiplist.c b/test/tskiplist.c
index 1d01839..0b8c1f6 100644
--- a/test/tskiplist.c
+++ b/test/tskiplist.c
@@ -66,12 +66,12 @@ test_skiplist_init(void)
size_t u, v; /* Local index variables */
/* Allocate arrays */
- rand_num = (int *)HDmalloc(sizeof(int) * NUM_ELEMS);
- CHECK_PTR(rand_num, "HDmalloc");
- sort_rand_num = (int *)HDmalloc(sizeof(int) * NUM_ELEMS);
- CHECK_PTR(sort_rand_num, "HDmalloc");
- rev_sort_rand_num = (int *)HDmalloc(sizeof(int) * NUM_ELEMS);
- CHECK_PTR(rev_sort_rand_num, "HDmalloc");
+ rand_num = (int *)malloc(sizeof(int) * NUM_ELEMS);
+ CHECK_PTR(rand_num, "malloc");
+ sort_rand_num = (int *)malloc(sizeof(int) * NUM_ELEMS);
+ CHECK_PTR(sort_rand_num, "malloc");
+ rev_sort_rand_num = (int *)malloc(sizeof(int) * NUM_ELEMS);
+ CHECK_PTR(rev_sort_rand_num, "malloc");
/* Initialize random number seed */
curr_time = HDtime(NULL);
@@ -97,13 +97,13 @@ test_skiplist_init(void)
} /* end for */
/* Copy random values to sorted array */
- HDmemcpy(sort_rand_num, rand_num, sizeof(int) * NUM_ELEMS);
+ memcpy(sort_rand_num, rand_num, sizeof(int) * NUM_ELEMS);
/* Sort random numbers */
HDqsort(sort_rand_num, (size_t)NUM_ELEMS, sizeof(int), tst_sort);
/* Copy random values to reverse sorted array */
- HDmemcpy(rev_sort_rand_num, rand_num, sizeof(int) * NUM_ELEMS);
+ memcpy(rev_sort_rand_num, rand_num, sizeof(int) * NUM_ELEMS);
/* Sort random numbers */
HDqsort(rev_sort_rand_num, (size_t)NUM_ELEMS, sizeof(int), tst_rev_sort);
@@ -1549,11 +1549,11 @@ test_skiplist_term(void)
{
/* Release arrays */
if (rand_num)
- HDfree(rand_num);
+ free(rand_num);
if (sort_rand_num)
- HDfree(sort_rand_num);
+ free(sort_rand_num);
if (rev_sort_rand_num)
- HDfree(rev_sort_rand_num);
+ free(rev_sort_rand_num);
} /* end test_skiplist_term() */
/****************************************************************
diff --git a/test/tsohm.c b/test/tsohm.c
index 7d9964f..2e82d51 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -610,17 +610,17 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_
*/
#define TSOHM_S1H_VERIFY_DATA(dset_id, dtype_id) \
{ \
- HDmemset(&rdata, 0, sizeof(rdata)); \
+ memset(&rdata, 0, sizeof(rdata)); \
if (0 > H5Dread((dset_id), (dtype_id), H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata)) { \
H5_FAILED(); \
AT(); \
- HDprintf("Can't read data\n"); \
+ printf("Can't read data\n"); \
goto error; \
} \
if ((rdata.i1 != wdata.i1) || (rdata.i2 != wdata.i2) || HDstrcmp(rdata.str, wdata.str) != 0) { \
H5_FAILED(); \
AT(); \
- HDprintf("incorrect read data\n"); \
+ printf("incorrect read data\n"); \
goto error; \
} \
} /* TSOHM_S1H_VERIFY_DATA() definition */
@@ -632,7 +632,7 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_
test_file_closing = FALSE;
/* Initialize wdata */
- HDmemset(&wdata, 0, sizeof(wdata));
+ memset(&wdata, 0, sizeof(wdata));
wdata.i1 = 11;
HDstrcpy(wdata.str, "string");
wdata.i2 = 22;
@@ -645,7 +645,7 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_
wdata.f1 = 0.0F;
/* Initialize rdata */
- HDmemset(&rdata, 0, sizeof(rdata));
+ memset(&rdata, 0, sizeof(rdata));
dtype1_id = make_dtype_1();
if (dtype1_id < 0)
@@ -1169,7 +1169,7 @@ sohm_attr_helper(hid_t fcpl_id)
/* Verify */
attr_read_id = (op_index == 2) ? attr_id2 : attr_id;
- HDmemset(rdata, 0, sizeof(rdata));
+ memset(rdata, 0, sizeof(rdata));
ret = H5Aread(attr_read_id, H5T_NATIVE_INT, rdata);
CHECK_I(ret, "H5Aread");
for (x = 0; x < (size_t)dims; ++x)
@@ -1422,12 +1422,12 @@ size2_verify_plist1(hid_t plist)
/* Check fill value */
dtype1_id = make_dtype_1();
CHECK_I(dtype1_id, "make_dtype_1");
- HDmemset(&fill1_correct, '1', sizeof(fill1_correct));
+ memset(&fill1_correct, '1', sizeof(fill1_correct));
ret = H5Pget_fill_value(plist, dtype1_id, &fill1);
CHECK_I(ret, "H5Pget_fill_value");
- ret = HDmemcmp(&fill1, &fill1_correct, sizeof(fill1_correct));
+ ret = memcmp(&fill1, &fill1_correct, sizeof(fill1_correct));
VERIFY(ret, 0, "memcmp");
ret = H5Tclose(dtype1_id);
@@ -1493,12 +1493,12 @@ size2_verify_plist2(hid_t plist)
/* Check fill value */
dtype2_id = make_dtype_2();
CHECK_I(dtype2_id, "make_dtype_2");
- HDmemset(&fill2_correct, '2', (size_t)DTYPE2_SIZE);
+ memset(&fill2_correct, '2', (size_t)DTYPE2_SIZE);
ret = H5Pget_fill_value(plist, dtype2_id, &fill2);
CHECK_I(ret, "H5Pget_fill_value");
- ret = HDmemcmp(&fill2, &fill2_correct, (size_t)DTYPE2_SIZE);
+ ret = memcmp(&fill2, &fill2_correct, (size_t)DTYPE2_SIZE);
VERIFY(ret, 0, "memcmp");
ret = H5Tclose(dtype2_id);
@@ -1523,21 +1523,21 @@ static void
size2_dump_struct(const char *name, size2_helper_struct *sizes)
{
HDputs(name);
- HDprintf(" empty size: %llu\n", (unsigned long long)sizes->empty_size);
- HDprintf(" first dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->first_dset,
- (unsigned long long)(sizes->first_dset - sizes->empty_size));
- HDprintf("second dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->second_dset,
- (unsigned long long)(sizes->second_dset - sizes->first_dset));
- HDprintf(" dsets 1: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets1,
- (unsigned long long)(sizes->dsets1 - sizes->second_dset));
- HDprintf(" dsets 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets2,
- (unsigned long long)(sizes->dsets2 - sizes->dsets1));
- HDprintf(" interleaved: %llu \tdelta: %llu\n", (unsigned long long)sizes->interleaved,
- (unsigned long long)(sizes->interleaved - sizes->dsets2));
- HDprintf(" attributes: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs1,
- (unsigned long long)(sizes->attrs1 - sizes->interleaved));
- HDprintf(" attributes 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs2,
- (unsigned long long)(sizes->attrs2 - sizes->attrs1));
+ printf(" empty size: %llu\n", (unsigned long long)sizes->empty_size);
+ printf(" first dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->first_dset,
+ (unsigned long long)(sizes->first_dset - sizes->empty_size));
+ printf("second dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->second_dset,
+ (unsigned long long)(sizes->second_dset - sizes->first_dset));
+ printf(" dsets 1: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets1,
+ (unsigned long long)(sizes->dsets1 - sizes->second_dset));
+ printf(" dsets 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets2,
+ (unsigned long long)(sizes->dsets2 - sizes->dsets1));
+ printf(" interleaved: %llu \tdelta: %llu\n", (unsigned long long)sizes->interleaved,
+ (unsigned long long)(sizes->interleaved - sizes->dsets2));
+ printf(" attributes: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs1,
+ (unsigned long long)(sizes->attrs1 - sizes->interleaved));
+ printf(" attributes 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs2,
+ (unsigned long long)(sizes->attrs2 - sizes->attrs1));
} /* size2_dump_struct */
#endif /* NOT_NOW */
@@ -1624,8 +1624,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
/* fill1 and fill2 are fill values for the two datatypes.
* We'll set them in the DCPL.
*/
- HDmemset(&fill1, '1', sizeof(dtype1_struct));
- HDmemset(&fill2, '2', (size_t)DTYPE2_SIZE);
+ memset(&fill1, '1', sizeof(dtype1_struct));
+ memset(&fill2, '2', (size_t)DTYPE2_SIZE);
dcpl1_id = H5Pcreate(H5P_DATASET_CREATE);
CHECK_I(dcpl1_id, "H5Pcreate");
@@ -1668,8 +1668,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
size2_verify_plist2(dcpl2_id);
/* Set up attribute data */
- HDmemset(attr_string1, 0, (size_t)NAME_BUF_SIZE);
- HDmemset(attr_string2, 0, (size_t)NAME_BUF_SIZE);
+ memset(attr_string1, 0, (size_t)NAME_BUF_SIZE);
+ memset(attr_string2, 0, (size_t)NAME_BUF_SIZE);
HDstrcpy(attr_string1, LONG_STRING);
HDstrcpy(attr_string2, LONG_STRING);
attr_string2[1] = '1'; /* The second string starts "01 index..." */
@@ -2078,8 +2078,8 @@ size2_verify(void)
group2_id = H5Gopen2(file_id, "interleaved group", H5P_DEFAULT);
CHECK_I(group2_id, "H5Gopen2");
- HDmemset(attr_string, 0, (size_t)NAME_BUF_SIZE);
- HDmemset(attr_correct_string, 0, (size_t)NAME_BUF_SIZE);
+ memset(attr_string, 0, (size_t)NAME_BUF_SIZE);
+ memset(attr_correct_string, 0, (size_t)NAME_BUF_SIZE);
HDstrcpy(attr_correct_string, LONG_STRING);
HDstrcpy(attr_name, "00 index");
@@ -3278,7 +3278,7 @@ test_sohm_extlink(void)
CHECK_I(ret, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}
@@ -3717,9 +3717,9 @@ test_sohm_external_dtype(void)
CHECK_I(dset1_tid, "H5Dget_type");
/* Allocate space and initialize data */
- orig = (s1_t *)HDmalloc(NX * NY * sizeof(s1_t));
+ orig = (s1_t *)malloc(NX * NY * sizeof(s1_t));
if (orig == NULL)
- CHECK_I(-1, "HDmalloc");
+ CHECK_I(-1, "malloc");
for (i = 0; i < NX * NY; i++) {
s_ptr = (s1_t *)orig + i;
s_ptr->a = (int)(i * 3 + 1);
@@ -3782,7 +3782,7 @@ test_sohm_external_dtype(void)
CHECK_I(ret, "H5Pclose");
ret = H5Fclose(file2);
CHECK_I(ret, "H5Fclose");
- HDfree(orig);
+ free(orig);
} /* test_sohm_external_dtype */
/****************************************************************
diff --git a/test/ttime.c b/test/ttime.c
index 81c5015..bd31873 100644
--- a/test/ttime.c
+++ b/test/ttime.c
@@ -176,13 +176,13 @@ test_time_io(void)
tid = H5Dget_type(dsid);
CHECK(tid, FAIL, "H5Dget_type");
if (H5Tget_class(tid) == H5T_TIME)
- HDfprintf(stderr, "datatype class is H5T_TIME\n");
+ fprintf(stderr, "datatype class is H5T_TIME\n");
status = H5Tclose(tid);
CHECK(status, FAIL, "H5Tclose");
status = H5Dread(dsid, H5T_UNIX_D32LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, &timethen);
CHECK(status, FAIL, "H5Dread");
- HDfprintf(stderr, "time written was: %s\n", HDctime(&timethen));
+ fprintf(stderr, "time written was: %s\n", HDctime(&timethen));
status = H5Dclose(dsid);
CHECK(status, FAIL, "H5Dclose");
diff --git a/test/ttsafe.c b/test/ttsafe.c
index 761a3b3..2f792f5 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -80,7 +80,7 @@ gen_name(int value)
int i;
length = num_digits(MAX_NUM_NAME - 1);
- temp = (char *)HDmalloc(NAME_OFFSET + length + 1);
+ temp = (char *)malloc(NAME_OFFSET + length + 1);
temp = HDstrcpy(temp, "attrib");
temp[NAME_OFFSET + length] = '\0';
@@ -113,7 +113,7 @@ main(int argc, char *argv[])
#else /* H5_HAVE_THREADSAFE */
- HDprintf("Most thread-safety tests skipped because THREADSAFE not enabled\n");
+ printf("Most thread-safety tests skipped because THREADSAFE not enabled\n");
#endif /* H5_HAVE_THREADSAFE */
diff --git a/test/ttsafe_acreate.c b/test/ttsafe_acreate.c
index fb84c6e..84105e8 100644
--- a/test/ttsafe_acreate.c
+++ b/test/ttsafe_acreate.c
@@ -100,7 +100,7 @@ tts_acreate(void)
* with the dataset
*/
for (i = 0; i < NUM_THREADS; i++) {
- attrib_data = (ttsafe_name_data_t *)HDmalloc(sizeof(ttsafe_name_data_t));
+ attrib_data = (ttsafe_name_data_t *)malloc(sizeof(ttsafe_name_data_t));
attrib_data->dataset = dataset;
attrib_data->datatype = datatype;
attrib_data->dataspace = dataspace;
@@ -158,7 +158,7 @@ tts_acreate_thread(void *client_data)
CHECK(attribute, H5I_INVALID_HID, "H5Acreate2");
/* Write data to the attribute */
- attribute_data = (int *)HDmalloc(sizeof(int));
+ attribute_data = (int *)malloc(sizeof(int));
*attribute_data = attrib_data->current_index;
status = H5Awrite(attribute, H5T_NATIVE_INT, attribute_data);
CHECK(status, FAIL, "H5Awrite");
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c
index 0323d5f..22e2cb3 100644
--- a/test/ttsafe_cancel.c
+++ b/test/ttsafe_cancel.c
@@ -64,46 +64,46 @@ tts_cancel(void)
/* make thread scheduling global */
ret = pthread_attr_init(&attribute);
- HDassert(ret == 0);
+ assert(ret == 0);
#ifdef H5_HAVE_SYSTEM_SCOPE_THREADS
ret = pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM);
- HDassert(ret == 0);
+ assert(ret == 0);
#endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */
/* Initialize mutex & condition variables */
ret = pthread_mutex_init(&mutex, NULL);
- HDassert(ret == 0);
+ assert(ret == 0);
ret = pthread_cond_init(&cond, NULL);
- HDassert(ret == 0);
+ assert(ret == 0);
/*
* Create a hdf5 file using H5F_ACC_TRUNC access, default file
* creation plist and default file access plist
*/
cancel_file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(cancel_file >= 0);
+ assert(cancel_file >= 0);
ret = pthread_create(&childthread, &attribute, tts_cancel_thread, NULL);
- HDassert(ret == 0);
+ assert(ret == 0);
tts_cancel_barrier();
ret = pthread_cancel(childthread);
- HDassert(ret == 0);
+ assert(ret == 0);
dataset = H5Dopen2(cancel_file, DATASETNAME, H5P_DEFAULT);
- HDassert(dataset >= 0);
+ assert(dataset >= 0);
ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer);
- HDassert(ret >= 0);
+ assert(ret >= 0);
if (buffer != 11)
TestErrPrintf("operation unsuccessful with value at %d instead of 11\n", buffer);
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(cancel_file);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Destroy the thread attribute */
ret = pthread_attr_destroy(&attribute);
- HDassert(ret == 0);
+ assert(ret == 0);
} /* end tts_cancel() */
void *
@@ -135,7 +135,7 @@ tts_cancel_thread(void H5_ATTR_UNUSED *arg)
CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* If thread is cancelled, make cleanup call */
- cleanup_structure = (cancel_cleanup_t *)HDmalloc(sizeof(cancel_cleanup_t));
+ cleanup_structure = (cancel_cleanup_t *)malloc(sizeof(cancel_cleanup_t));
cleanup_structure->dataset = dataset;
cleanup_structure->datatype = datatype;
cleanup_structure->dataspace = dataspace;
diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c
index 181e582..bff63fc 100644
--- a/test/ttsafe_dcreate.c
+++ b/test/ttsafe_dcreate.c
@@ -139,7 +139,7 @@ tts_dcreate_creator(void *_thread_data)
hsize_t dimsf[1]; /* dataset dimensions */
struct thread_info thread_data;
- HDmemcpy(&thread_data, _thread_data, sizeof(struct thread_info));
+ memcpy(&thread_data, _thread_data, sizeof(struct thread_info));
/* define dataspace for dataset */
dimsf[0] = 1;
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index 8e01c66..5cc408b 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -136,7 +136,7 @@ tts_error(void)
if (error_flag_g) {
TestErrPrintf(
"At least one thread reported a value that was different from the expected value\n");
- HDprintf(
+ printf(
"(Update the expected_g[] array in tts_error for this test if the error stack changed!)\n");
}
@@ -158,7 +158,7 @@ tts_error(void)
CHECK(status, FAIL, "H5Fclose");
} /* end if */
else
- HDprintf("Non-native VOL connector used, skipping test\n");
+ printf("Non-native VOL connector used, skipping test\n");
status = H5Idec_ref(vol_id);
CHECK(status, FAIL, "H5Idec_ref");
@@ -245,15 +245,15 @@ walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSE
}
/* Unexpected error stack entry, print some info and set flag */
- HDfprintf(stderr, "Unexpected error stack entry!\n");
- HDfprintf(stderr, "Stack entry: %d\n", n);
- HDfprintf(stderr,
- "Actual: maj_num = %" PRIxHID ", min_num = %" PRIxHID
- ", line = %u, func = '%s', file = '%s', desc = '%s'\n",
- err_desc->maj_num, err_desc->min_num, err_desc->line, err_desc->func_name, err_desc->file_name,
- err_desc->desc);
- HDfprintf(stderr, "Expected: maj_num = %" PRIxHID ", min_num = %" PRIxHID "\n", expected_g[n].maj_num,
- expected_g[n].min_num);
+ fprintf(stderr, "Unexpected error stack entry!\n");
+ fprintf(stderr, "Stack entry: %d\n", n);
+ fprintf(stderr,
+ "Actual: maj_num = %" PRIxHID ", min_num = %" PRIxHID
+ ", line = %u, func = '%s', file = '%s', desc = '%s'\n",
+ err_desc->maj_num, err_desc->min_num, err_desc->line, err_desc->func_name, err_desc->file_name,
+ err_desc->desc);
+ fprintf(stderr, "Expected: maj_num = %" PRIxHID ", min_num = %" PRIxHID "\n", expected_g[n].maj_num,
+ expected_g[n].min_num);
error_flag_g = -1;
return SUCCEED;
diff --git a/test/tunicode.c b/test/tunicode.c
index 27df42d..29a3cda 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -152,7 +152,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Create a src_type that holds the UTF-8 string and its final NULL */
big_len = length + 1; /* +1 byte for final NULL */
- HDassert((2 * big_len) <= sizeof(cmpbuf));
+ assert((2 * big_len) <= sizeof(cmpbuf));
src_type = mkstr(big_len, H5T_STR_NULLTERM);
CHECK(src_type, FAIL, "mkstr");
/* Create a dst_type that holds half of the UTF-8 string and a final
@@ -180,7 +180,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
cmpbuf[2 * small_len - 1] = '\0';
HDstrcpy(&cmpbuf[2 * small_len], new_string);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
/* Now convert from smaller datatype to bigger datatype. This should
* leave our buffer looking like: "abc\0\0\0\0\0abc\0\0\0\0\0" */
@@ -188,12 +188,12 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
CHECK(ret, FAIL, "H5Tconvert");
/* First fill the buffer with NULLs */
- HDmemset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
+ memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
HDstrncpy(cmpbuf, new_string, small_len - 1);
HDstrncpy(&cmpbuf[big_len], new_string, small_len - 1);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
ret = H5Tclose(src_type);
CHECK(ret, FAIL, "H5Tclose");
@@ -215,7 +215,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Create a src_type that holds the UTF-8 string */
big_len = length;
- HDassert((2 * big_len) <= sizeof(cmpbuf));
+ assert((2 * big_len) <= sizeof(cmpbuf));
src_type = mkstr(big_len, H5T_STR_NULLPAD);
CHECK(src_type, FAIL, "mkstr");
/* Create a dst_type that holds half of the UTF-8 string */
@@ -240,7 +240,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
HDstrncpy(&cmpbuf[small_len], new_string, small_len);
HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
/* Now convert from smaller datatype to bigger datatype. This should
* leave our buffer looking like: "abcd\0\0\0\0abcd\0\0\0\0" */
@@ -248,12 +248,12 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
CHECK(ret, FAIL, "H5Tconvert");
/* First fill the buffer with NULLs */
- HDmemset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
+ memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
HDstrncpy(cmpbuf, new_string, small_len);
HDstrncpy(&cmpbuf[big_len], new_string, small_len);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
ret = H5Tclose(src_type);
CHECK(ret, FAIL, "H5Tclose");
@@ -285,7 +285,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
HDstrncpy(&cmpbuf[small_len], new_string, small_len);
HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
/* Now convert from smaller datatype to bigger datatype. This should
* leave our buffer looking like: "abcd abcd " */
@@ -293,12 +293,12 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
CHECK(ret, FAIL, "H5Tconvert");
/* First fill the buffer with spaces */
- HDmemset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
+ memset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
HDstrncpy(cmpbuf, new_string, small_len);
HDstrncpy(&cmpbuf[big_len], new_string, small_len);
- VERIFY(HDmemcmp(buf, cmpbuf, 2 * big_len), 0, "HDmemcmp");
+ VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
ret = H5Tclose(src_type);
CHECK(ret, FAIL, "H5Tclose");
@@ -585,7 +585,7 @@ test_compound(hid_t fid, const char *string)
herr_t ret;
/* Initialize compound data */
- HDmemset(&s1, 0, sizeof(s1_t)); /* To make purify happy */
+ memset(&s1, 0, sizeof(s1_t)); /* To make purify happy */
s1.a = COMP_INT_VAL;
s1.c = COMP_DOUBLE_VAL;
s1.b = COMP_FLOAT_VAL;
@@ -779,15 +779,15 @@ dump_string(const char *string)
size_t length;
size_t x;
- HDprintf("The string was:\n %s", string);
- HDprintf("Or in hex:\n");
+ printf("The string was:\n %s", string);
+ printf("Or in hex:\n");
length = HDstrlen(string);
for (x = 0; x < length; x++)
- HDprintf("%x ", string[x] & (0x000000FF));
+ printf("%x ", string[x] & (0x000000FF));
- HDprintf("\n");
+ printf("\n");
}
/* Main test.
@@ -810,7 +810,7 @@ test_unicode(void)
/* Create a random string with length NUM_CHARS */
HDsrandom((unsigned)HDtime(NULL));
- HDmemset(test_string, 0, sizeof(test_string));
+ memset(test_string, 0, sizeof(test_string));
for (x = 0; x < NUM_CHARS; x++) {
/* We need to avoid unprintable characters (codes 0-31) and the
* . and / characters, since they aren't allowed in path names.
diff --git a/test/tvlstr.c b/test/tvlstr.c
index 3fcc57d..5b76a63 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -64,7 +64,7 @@ test_vlstr_alloc_custom(size_t size, void *info)
*/
extra = MAX(sizeof(void *), sizeof(size_t));
- if ((ret_value = HDmalloc(extra + size)) != NULL) {
+ if ((ret_value = malloc(extra + size)) != NULL) {
*(size_t *)ret_value = size;
*mem_used += size;
} /* end if */
@@ -96,7 +96,7 @@ test_vlstr_free_custom(void *_mem, void *info)
if (_mem != NULL) {
mem = ((unsigned char *)_mem) - extra;
*mem_used -= *(size_t *)((void *)mem);
- HDfree(mem);
+ free(mem);
} /* end if */
}
@@ -162,15 +162,15 @@ test_vlstrings_basic(void)
dataset2 = H5Dcreate2(fid1, "Dataset2", tid1, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
- wdata2 = (char *)HDcalloc((size_t)65534, sizeof(char));
- HDmemset(wdata2, 'A', (size_t)65533);
+ wdata2 = (char *)calloc((size_t)65534, sizeof(char));
+ memset(wdata2, 'A', (size_t)65533);
ret = H5Dwrite(dataset2, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata2);
CHECK(ret, FAIL, "H5Dwrite");
H5Sclose(dataspace);
H5Dclose(dataset2);
- HDfree(wdata2);
+ free(wdata2);
/* Change to the custom memory allocation routines for reading VL string */
xfer_pid = H5Pcreate(H5P_DATASET_XFER);
@@ -625,8 +625,8 @@ test_write_vl_string_attribute(void)
att = H5Acreate2(root, "test_scalar_large", type, dataspace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(att, FAIL, "H5Acreate2");
- string_att_write = (char *)HDcalloc((size_t)8192, sizeof(char));
- HDmemset(string_att_write, 'A', (size_t)8191);
+ string_att_write = (char *)calloc((size_t)8192, sizeof(char));
+ memset(string_att_write, 'A', (size_t)8191);
ret = H5Awrite(att, type, &string_att_write);
CHECK(ret, FAIL, "H5Awrite");
@@ -642,7 +642,7 @@ test_write_vl_string_attribute(void)
string_att_check = NULL;
/* The attribute string written is freed below, in the test_read_vl_string_attribute() test */
- /* HDfree(string_att_write); */
+ /* free(string_att_write); */
ret = H5Aclose(att);
CHECK(ret, FAIL, "HAclose");
@@ -723,7 +723,7 @@ test_read_vl_string_attribute(void)
/* Free string allocated in test_write_vl_string_attribute */
if (string_att_write)
- HDfree(string_att_write);
+ free(string_att_write);
ret = H5Aclose(att);
CHECK(ret, FAIL, "HAclose");
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 1e0de1c..0a1f872 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -60,7 +60,7 @@ test_vltypes_alloc_custom(size_t size, void *mem_used)
* DEC Alpha to keep the alignment correct - QAK)
*/
- if ((ret_value = HDmalloc(extra + size)) != NULL) {
+ if ((ret_value = malloc(extra + size)) != NULL) {
*(size_t *)ret_value = size;
*(size_t *)mem_used += size;
} /* end if */
@@ -90,7 +90,7 @@ test_vltypes_free_custom(void *_mem, void *mem_used)
unsigned char *mem = ((unsigned char *)_mem) - extra; /* Pointer to actual block allocated */
*(size_t *)mem_used -= *(size_t *)((void *)mem);
- HDfree(mem);
+ free(mem);
} /* end if */
}
@@ -254,7 +254,7 @@ test_vltypes_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(unsigned int));
+ wdata[i].p = malloc((i + 1) * sizeof(unsigned int));
wdata[i].len = i + 1;
for (j = 0; j < (i + 1); j++)
((unsigned int *)wdata[i].p)[j] = i * 10 + j;
@@ -585,7 +585,7 @@ rewrite_vltypes_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(unsigned int));
+ wdata[i].p = malloc((i + increment) * sizeof(unsigned int));
wdata[i].len = i + increment;
for (j = 0; j < (i + increment); j++)
((unsigned int *)wdata[i].p)[j] = i * 20 + j;
@@ -747,7 +747,7 @@ test_vltypes_vlen_compound(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(s1));
+ wdata[i].p = malloc((i + 1) * sizeof(s1));
wdata[i].len = i + 1;
for (j = 0; j < (i + 1); j++) {
((s1 *)wdata[i].p)[j].i = (int)(i * 10 + j);
@@ -899,7 +899,7 @@ rewrite_vltypes_vlen_compound(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(s1));
+ wdata[i].p = malloc((i + increment) * sizeof(s1));
wdata[i].len = i + increment;
for (j = 0; j < (i + increment); j++) {
((s1 *)wdata[i].p)[j].i = (int)(i * 40 + j);
@@ -1048,17 +1048,17 @@ test_vltypes_compound_vlen_vlen(void)
MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n"));
/* Allocate and initialize VL data to write */
- wdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
- CHECK_PTR(wdata, "HDmalloc");
- rdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
- CHECK_PTR(rdata, "HDmalloc");
+ wdata = (s1 *)malloc(sizeof(s1) * SPACE3_DIM1);
+ CHECK_PTR(wdata, "malloc");
+ rdata = (s1 *)malloc(sizeof(s1) * SPACE3_DIM1);
+ CHECK_PTR(rdata, "malloc");
for (i = 0; i < SPACE3_DIM1; i++) {
wdata[i].i = (int)(i * 10);
wdata[i].f = (float)(i * 20) / 3.0F;
- wdata[i].v.p = HDmalloc((i + L1_INCM) * sizeof(hvl_t));
+ wdata[i].v.p = malloc((i + L1_INCM) * sizeof(hvl_t));
wdata[i].v.len = i + L1_INCM;
for (t1 = (hvl_t *)((wdata[i].v).p), j = 0; j < (i + L1_INCM); j++, t1++) {
- t1->p = HDmalloc((j + L2_INCM) * sizeof(unsigned int));
+ t1->p = malloc((j + L2_INCM) * sizeof(unsigned int));
t1->len = j + L2_INCM;
for (k = 0; k < j + L2_INCM; k++)
((unsigned int *)t1->p)[k] = i * 100 + j * 10 + k;
@@ -1190,8 +1190,8 @@ test_vltypes_compound_vlen_vlen(void)
CHECK(ret, FAIL, "H5Fclose");
/* Release buffers */
- HDfree(wdata);
- HDfree(rdata);
+ free(wdata);
+ free(rdata);
} /* end test_vltypes_compound_vlen_vlen() */
/****************************************************************
@@ -1238,11 +1238,11 @@ test_vltypes_compound_vlstr(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].v.p = (s2 *)HDmalloc((i + L3_INCM) * sizeof(s2));
+ wdata[i].v.p = (s2 *)malloc((i + L3_INCM) * sizeof(s2));
wdata[i].v.len = i + L3_INCM;
for (t1 = (s2 *)((wdata[i].v).p), j = 0; j < (i + L3_INCM); j++, t1++) {
HDstrcat(str, "m");
- t1->string = (char *)HDmalloc(HDstrlen(str) * sizeof(char) + 1);
+ t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
HDstrcpy(t1->string, str);
/*t1->color = red;*/
t1->color = blue;
@@ -1408,11 +1408,11 @@ test_vltypes_compound_vlstr(void)
/* Use this part for new data */
HDstrcpy(str, "bbbbbbbb\0");
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata2[i].v.p = (s2 *)HDmalloc((i + 1) * sizeof(s2));
+ wdata2[i].v.p = (s2 *)malloc((i + 1) * sizeof(s2));
wdata2[i].v.len = i + 1;
for (t1 = (s2 *)(wdata2[i].v).p, j = 0; j < i + 1; j++, t1++) {
HDstrcat(str, "pp");
- t1->string = (char *)HDmalloc(HDstrlen(str) * sizeof(char) + 1);
+ t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
HDstrcpy(t1->string, str);
t1->color = green;
}
@@ -1526,7 +1526,7 @@ test_vltypes_compound_vlen_atomic(void)
for (i = 0; i < SPACE1_DIM1; i++) {
wdata[i].i = (int)(i * 10);
wdata[i].f = (float)(i * 20) / 3.0F;
- wdata[i].v.p = HDmalloc((i + 1) * sizeof(unsigned int));
+ wdata[i].v.p = malloc((i + 1) * sizeof(unsigned int));
wdata[i].v.len = i + 1;
for (j = 0; j < (i + 1); j++)
((unsigned int *)wdata[i].v.p)[j] = i * 10 + j;
@@ -1630,7 +1630,7 @@ test_vltypes_compound_vlen_atomic(void)
CHECK(dcpl_pid, FAIL, "H5Pcreate");
/* Set the fill value for the second dataset */
- HDmemset(&fill, 0, sizeof(s1));
+ memset(&fill, 0, sizeof(s1));
ret = H5Pset_fill_value(dcpl_pid, tid2, &fill);
CHECK(ret, FAIL, "H5Pset_fill_value");
@@ -1760,7 +1760,7 @@ rewrite_vltypes_compound_vlen_atomic(void)
for (i = 0; i < SPACE1_DIM1; i++) {
wdata[i].i = (int)(i * 40);
wdata[i].f = (float)(i * 50) / 3.0F;
- wdata[i].v.p = HDmalloc((i + increment) * sizeof(unsigned int));
+ wdata[i].v.p = malloc((i + increment) * sizeof(unsigned int));
wdata[i].v.len = i + increment;
for (j = 0; j < (i + increment); j++)
((unsigned int *)wdata[i].v.p)[j] = i * 60 + j;
@@ -1934,14 +1934,14 @@ test_vltypes_vlen_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + 1) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + 1;
for (t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + 1); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
@@ -2135,14 +2135,14 @@ rewrite_longer_vltypes_vlen_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + increment) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + increment;
for (t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + increment); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
@@ -2315,14 +2315,14 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + increment) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + increment;
for (t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + increment); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
@@ -2591,8 +2591,8 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Tclose");
/* Allocate space for the buffer to read data */
- rbuf = (dtype1_struct *)HDmalloc(SPACE4_DIM_LARGE * sizeof(dtype1_struct));
- CHECK_PTR(rbuf, "HDmalloc");
+ rbuf = (dtype1_struct *)malloc(SPACE4_DIM_LARGE * sizeof(dtype1_struct));
+ CHECK_PTR(rbuf, "malloc");
/* Create the small & large dataspaces to use */
small_dspace_id = H5Screate_simple(SPACE4_RANK, small_dims, NULL);
@@ -2690,13 +2690,13 @@ test_vltypes_fill_value(void)
} break;
case H5D_VIRTUAL:
- HDassert(0 && "Invalid layout type!");
+ assert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -2798,13 +2798,13 @@ test_vltypes_fill_value(void)
break;
case H5D_VIRTUAL:
- HDassert(0 && "Invalid layout type!");
+ assert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -2832,7 +2832,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Clear the read buffer */
- HDmemset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
+ memset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
/* Read in non-contiguous selection from 'empty' dataset of fill value */
ret = H5Dread(dset_id, dtype1_id, dset_select_dspace_id, dset_select_dspace_id, xfer_pid, rbuf);
@@ -2890,7 +2890,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Clear the read buffer */
- HDmemset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
+ memset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
/* Read in non-contiguous selection from 'empty' dataset of fill value */
ret = H5Dread(dset_id, dtype1_id, dset_select_dspace_id, dset_select_dspace_id, xfer_pid, rbuf);
@@ -2985,13 +2985,13 @@ test_vltypes_fill_value(void)
break;
case H5D_VIRTUAL:
- HDassert(0 && "Invalid layout type!");
+ assert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -3045,7 +3045,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Clear the read buffer */
- HDmemset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
+ memset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
/* Read in non-contiguous selection from dataset */
ret = H5Dread(dset_id, dtype1_id, dset_select_dspace_id, dset_select_dspace_id, xfer_pid, rbuf);
@@ -3133,7 +3133,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Clear the read buffer */
- HDmemset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
+ memset(rbuf, 0, dset_elmts * sizeof(dtype1_struct));
/* Read in non-contiguous selection from dataset */
ret = H5Dread(dset_id, dtype1_id, dset_select_dspace_id, dset_select_dspace_id, xfer_pid, rbuf);
@@ -3212,7 +3212,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Tclose");
/* Release buffer */
- HDfree(rbuf);
+ free(rbuf);
} /* end test_vltypes_fill_value() */
/****************************************************************
diff --git a/test/twriteorder.c b/test/twriteorder.c
index 165abcf..2a1f880 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -104,15 +104,15 @@ part_t launch_g;
void
usage(const char *prog)
{
- HDfprintf(stderr, "usage: %s [OPTIONS]\n", prog);
- HDfprintf(stderr, " OPTIONS\n");
- HDfprintf(stderr, " -h Print a usage message and exit\n");
- HDfprintf(stderr, " -l w|r launch writer or reader only. [default: launch both]\n");
- HDfprintf(stderr, " -b N Block size [default: %d]\n", BLOCKSIZE_DFT);
- HDfprintf(stderr, " -p N Partition size [default: %d]\n", PARTITION_DFT);
- HDfprintf(stderr, " -n N Number of linked blocks [default: %d]\n", NLINKEDBLOCKS_DFT);
- HDfprintf(stderr, " where N is an integer value\n");
- HDfprintf(stderr, "\n");
+ fprintf(stderr, "usage: %s [OPTIONS]\n", prog);
+ fprintf(stderr, " OPTIONS\n");
+ fprintf(stderr, " -h Print a usage message and exit\n");
+ fprintf(stderr, " -l w|r launch writer or reader only. [default: launch both]\n");
+ fprintf(stderr, " -b N Block size [default: %d]\n", BLOCKSIZE_DFT);
+ fprintf(stderr, " -p N Partition size [default: %d]\n", PARTITION_DFT);
+ fprintf(stderr, " -n N Number of linked blocks [default: %d]\n", NLINKEDBLOCKS_DFT);
+ fprintf(stderr, " where N is an integer value\n");
+ fprintf(stderr, "\n");
}
/* Setup test parameters by parsing command line options.
@@ -136,25 +136,25 @@ parse_option(int argc, char *const argv[])
switch (c) {
case 'h':
usage(progname_g);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
break;
case 'b': /* number of planes to write/read */
- if ((blocksize_g = HDatoi(optarg)) <= 0) {
- HDfprintf(stderr, "bad blocksize %s, must be a positive integer\n", optarg);
+ if ((blocksize_g = atoi(optarg)) <= 0) {
+ fprintf(stderr, "bad blocksize %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'n': /* number of planes to write/read */
- if ((nlinkedblock_g = HDatoi(optarg)) < 2) {
- HDfprintf(stderr, "bad number of linked blocks %s, must be greater than 1.\n", optarg);
+ if ((nlinkedblock_g = atoi(optarg)) < 2) {
+ fprintf(stderr, "bad number of linked blocks %s, must be greater than 1.\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'p': /* number of planes to write/read */
- if ((part_size_g = HDatoi(optarg)) <= 0) {
- HDfprintf(stderr, "bad partition size %s, must be a positive integer\n", optarg);
+ if ((part_size_g = atoi(optarg)) <= 0) {
+ fprintf(stderr, "bad partition size %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
@@ -168,28 +168,28 @@ parse_option(int argc, char *const argv[])
launch_g = UC_WRITER;
break;
default:
- HDfprintf(stderr, "launch value(%c) should be w or r only.\n", *optarg);
+ fprintf(stderr, "launch value(%c) should be w or r only.\n", *optarg);
usage(progname_g);
Hgoto_error(-1);
break;
} /* end inner switch */
- HDprintf("launch = %d\n", launch_g);
+ printf("launch = %d\n", launch_g);
break;
case '?':
- HDfprintf(stderr, "getopt returned '%c'.\n", c);
+ fprintf(stderr, "getopt returned '%c'.\n", c);
usage(progname_g);
Hgoto_error(-1);
default:
- HDfprintf(stderr, "getopt returned unexpected value.\n");
- HDfprintf(stderr, "Unexpected value is %d\n", c);
+ fprintf(stderr, "getopt returned unexpected value.\n");
+ fprintf(stderr, "Unexpected value is %d\n", c);
Hgoto_error(-1);
} /* end outer switch */
} /* end while */
/* verify partition size must be >= blocksize */
if (part_size_g < blocksize_g) {
- HDfprintf(stderr, "Blocksize %d should not be bigger than partition size %d\n", blocksize_g,
- part_size_g);
+ fprintf(stderr, "Blocksize %d should not be bigger than partition size %d\n", blocksize_g,
+ part_size_g);
Hgoto_error(-1);
}
@@ -216,10 +216,10 @@ setup_parameters(int argc, char *const argv[])
}
/* show parameters and return */
- HDprintf("blocksize = %ld\n", (long)blocksize_g);
- HDprintf("part_size = %ld\n", (long)part_size_g);
- HDprintf("nlinkedblock = %ld\n", (long)nlinkedblock_g);
- HDprintf("launch = %d\n", launch_g);
+ printf("blocksize = %ld\n", (long)blocksize_g);
+ printf("part_size = %ld\n", (long)part_size_g);
+ printf("nlinkedblock = %ld\n", (long)nlinkedblock_g);
+ printf("launch = %d\n", launch_g);
return 0;
}
@@ -237,13 +237,13 @@ create_wo_file(void)
/* Create the data file */
if ((write_fd_g = HDopen(DATAFILE, O_RDWR | O_TRUNC | O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) {
- HDprintf("WRITER: error from open\n");
+ printf("WRITER: error from open\n");
return -1;
}
blkaddr = 0;
/* write it to partition 0 */
if ((bytes_wrote = HDwrite(write_fd_g, &blkaddr, (size_t)SIZE_BLKADDR)) != SIZE_BLKADDR) {
- HDprintf("blkaddr write failed\n");
+ printf("blkaddr write failed\n");
return -1;
}
@@ -267,15 +267,15 @@ write_wo_file(void)
blkaddr = i * part_size_g + i;
/* store old block address in byte 0-3 */
- HDmemcpy(&buffer[0], &blkaddr_old, sizeof(blkaddr_old));
+ memcpy(&buffer[0], &blkaddr_old, sizeof(blkaddr_old));
/* fill the rest with the lowest byte of i */
- HDmemset(&buffer[4], i & 0xff, (size_t)(BLOCKSIZE_DFT - 4));
+ memset(&buffer[4], i & 0xff, (size_t)(BLOCKSIZE_DFT - 4));
/* write the block */
HDlseek(write_fd_g, (HDoff_t)blkaddr, SEEK_SET);
if ((bytes_wrote = HDwrite(write_fd_g, buffer, (size_t)blocksize_g)) != blocksize_g) {
- HDprintf("blkaddr write failed in partition %d\n", i);
+ printf("blkaddr write failed in partition %d\n", i);
return -1;
}
@@ -287,7 +287,7 @@ write_wo_file(void)
HDlseek(write_fd_g, (HDoff_t)0, SEEK_SET);
if ((bytes_wrote = HDwrite(write_fd_g, &blkaddr_old, (size_t)sizeof(blkaddr_old))) !=
sizeof(blkaddr_old)) {
- HDprintf("blkaddr write failed in partition %d\n", 0);
+ printf("blkaddr write failed in partition %d\n", 0);
return -1;
}
@@ -305,7 +305,7 @@ read_wo_file(void)
/* Open the data file */
if ((read_fd = HDopen(DATAFILE, O_RDONLY)) < 0) {
- HDprintf("READER: error from open\n");
+ printf("READER: error from open\n");
return -1;
}
@@ -313,7 +313,7 @@ read_wo_file(void)
while (blkaddr == 0) {
HDlseek(read_fd, (HDoff_t)0, SEEK_SET);
if ((bytes_read = HDread(read_fd, &blkaddr, (size_t)sizeof(blkaddr))) != sizeof(blkaddr)) {
- HDprintf("blkaddr read failed in partition %d\n", 0);
+ printf("blkaddr read failed in partition %d\n", 0);
return -1;
}
}
@@ -322,12 +322,12 @@ read_wo_file(void)
while (blkaddr != 0) {
HDlseek(read_fd, (HDoff_t)blkaddr, SEEK_SET);
if ((bytes_read = HDread(read_fd, buffer, (size_t)blocksize_g)) != blocksize_g) {
- HDprintf("blkaddr read failed in partition %d\n", 0);
+ printf("blkaddr read failed in partition %d\n", 0);
return -1;
}
/* retrieve the block address in byte 0-3 */
- HDmemcpy(&blkaddr, &buffer[0], sizeof(blkaddr));
+ memcpy(&blkaddr, &buffer[0], sizeof(blkaddr));
}
return 0;
@@ -366,16 +366,16 @@ main(int argc, char *argv[])
/* Create file */
/* ============*/
if (launch_g != UC_READER) {
- HDprintf("Creating skeleton data file for test...\n");
+ printf("Creating skeleton data file for test...\n");
if (create_wo_file() < 0) {
- HDfprintf(stderr, "***encounter error\n");
+ fprintf(stderr, "***encounter error\n");
Hgoto_error(1);
}
else
- HDprintf("File created.\n");
+ printf("File created.\n");
}
/* flush output before possible fork */
- HDfflush(stdout);
+ fflush(stdout);
if (launch_g == UC_READWRITE) {
/* fork process */
@@ -392,15 +392,15 @@ main(int argc, char *argv[])
if (launch_g != UC_WRITER) {
/* child process launch the reader */
if (0 == childpid) {
- HDprintf("%d: launch reader process\n", mypid);
+ printf("%d: launch reader process\n", mypid);
if (read_wo_file() < 0) {
- HDfprintf(stderr, "read_wo_file encountered error\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "read_wo_file encountered error\n");
+ exit(EXIT_FAILURE);
}
/* Reader is done. Clean up by removing the data file */
HDremove(DATAFILE);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
}
@@ -409,7 +409,7 @@ main(int argc, char *argv[])
/* ============= */
/* this process continues to launch the writer */
if (write_wo_file() < 0) {
- HDfprintf(stderr, "write_wo_file encountered error\n");
+ fprintf(stderr, "write_wo_file encountered error\n");
Hgoto_error(1);
}
@@ -423,12 +423,12 @@ main(int argc, char *argv[])
}
if (WIFEXITED(child_status)) {
if ((child_ret_value = WEXITSTATUS(child_status)) != 0) {
- HDprintf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
+ printf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
Hgoto_error(2);
}
}
else {
- HDprintf("%d: child process terminated abnormally\n", mypid);
+ printf("%d: child process terminated abnormally\n", mypid);
Hgoto_error(2);
}
}
@@ -436,10 +436,10 @@ main(int argc, char *argv[])
done:
/* Print result and exit */
if (ret_value != 0) {
- HDprintf("Error(s) encountered\n");
+ printf("Error(s) encountered\n");
}
else {
- HDprintf("All passed\n");
+ printf("All passed\n");
}
return ret_value;
@@ -450,7 +450,7 @@ done:
int
main(void)
{
- HDfprintf(stderr, "Non-POSIX platform. Skipping.\n");
+ fprintf(stderr, "Non-POSIX platform. Skipping.\n");
return EXIT_SUCCESS;
} /* end main() */
diff --git a/test/unlink.c b/test/unlink.c
index e18ae73..ceb9024 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -649,7 +649,7 @@ test_filespace(hid_t fapl)
TEST_ERROR;
/* Create buffer for writing dataset */
- if (NULL == (data = (int *)HDmalloc(sizeof(int) * FILESPACE_DIM0 * FILESPACE_DIM1 * FILESPACE_DIM2)))
+ if (NULL == (data = (int *)malloc(sizeof(int) * FILESPACE_DIM0 * FILESPACE_DIM1 * FILESPACE_DIM2)))
TEST_ERROR;
/* Create single dataset (with contiguous storage & late allocation), remove it & verify file size */
@@ -1425,7 +1425,7 @@ test_filespace(hid_t fapl)
/* Cleanup common objects */
/* Release dataset buffer */
- HDfree(data);
+ free(data);
/* Close property lists */
if (H5Pclose(fapl_nocache) < 0)
@@ -1452,7 +1452,7 @@ test_filespace(hid_t fapl)
error:
/* Release dataset buffer */
if (data)
- HDfree(data);
+ free(data);
return 1;
} /* end test_filespace() */
@@ -1490,12 +1490,12 @@ test_create_unlink(const char *msg, hid_t fapl)
HDsnprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, groupname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf("group %s creation failed\n", groupname);
+ printf("group %s creation failed\n", groupname);
goto error;
} /* end if */
if (H5Gclose(group) < 0) {
H5_FAILED();
- HDprintf("closing group %s failed\n", groupname);
+ printf("closing group %s failed\n", groupname);
goto error;
} /* end if */
} /* end for */
@@ -1505,7 +1505,7 @@ test_create_unlink(const char *msg, hid_t fapl)
HDsnprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
if (H5Ldelete(file, groupname, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf("Unlinking group %s failed\n", groupname);
+ printf("Unlinking group %s failed\n", groupname);
goto error;
} /* end if */
} /* end for */
@@ -1736,7 +1736,7 @@ test_unlink_rightleaf(hid_t fid)
TESTING("deleting right-most child in non-leaf B-tree node");
/* Allocate space for the group IDs */
- if (NULL == (gids = (hid_t *)HDcalloc((size_t)ngroups, sizeof(hid_t))))
+ if (NULL == (gids = (hid_t *)calloc((size_t)ngroups, sizeof(hid_t))))
TEST_ERROR;
if ((rootid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
@@ -1770,7 +1770,7 @@ test_unlink_rightleaf(hid_t fid)
TEST_ERROR;
/* Free memory */
- HDfree(gids);
+ free(gids);
PASSED();
return 0;
@@ -1786,7 +1786,7 @@ error:
}
H5E_END_TRY;
} /* end if */
- HDfree(gids);
+ free(gids);
} /* end if */
H5E_BEGIN_TRY
{
@@ -1823,7 +1823,7 @@ test_unlink_rightnode(hid_t fid)
TESTING("deleting right-most child in non-leaf B-tree node");
/* Allocate space for the group IDs */
- if (NULL == (gids = (hid_t *)HDcalloc((size_t)ngroups, sizeof(hid_t))))
+ if (NULL == (gids = (hid_t *)calloc((size_t)ngroups, sizeof(hid_t))))
TEST_ERROR;
if ((rootid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
@@ -1860,7 +1860,7 @@ test_unlink_rightnode(hid_t fid)
FAIL_STACK_ERROR;
/* Free memory */
- HDfree(gids);
+ free(gids);
PASSED();
return 0;
@@ -1876,7 +1876,7 @@ error:
}
H5E_END_TRY;
} /* end if */
- HDfree(gids);
+ free(gids);
} /* end if */
H5E_BEGIN_TRY
{
@@ -1913,7 +1913,7 @@ test_unlink_middlenode(hid_t fid)
TESTING("deleting right-most child in non-leaf B-tree node");
/* Allocate space for the group IDs */
- if (NULL == (gids = (hid_t *)HDcalloc((size_t)ngroups, sizeof(hid_t))))
+ if (NULL == (gids = (hid_t *)calloc((size_t)ngroups, sizeof(hid_t))))
TEST_ERROR;
if ((rootid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
@@ -2236,7 +2236,7 @@ test_unlink_middlenode(hid_t fid)
FAIL_STACK_ERROR;
/* Free memory */
- HDfree(gids);
+ free(gids);
PASSED();
return 0;
@@ -2252,7 +2252,7 @@ error:
}
H5E_END_TRY;
} /* end if */
- HDfree(gids);
+ free(gids);
} /* end if */
H5E_BEGIN_TRY
{
@@ -3022,12 +3022,12 @@ main(void)
/* Get FAPL cache settings */
if (H5Pget_cache(fapl_small_mdc, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0) < 0)
- HDprintf("H5Pget_cache failed\n");
+ printf("H5Pget_cache failed\n");
/* Change FAPL cache settings */
mdc_nelmts = 1;
if (H5Pset_cache(fapl_small_mdc, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0) < 0)
- HDprintf("H5Pset_cache failed\n");
+ printf("H5Pset_cache failed\n");
/* Test creating & unlinking lots of objects with a 1-element metadata cache FAPL */
nerrors += test_create_unlink("create and unlink large number of objects with small cache",
@@ -3075,16 +3075,16 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
if (nerrors) {
- HDprintf("***** %d FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %d FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
}
HDputs("All unlink tests passed.");
h5_cleanup(FILENAME, fapl);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/unregister.c b/test/unregister.c
index 104e638..2d2bc41 100644
--- a/test/unregister.c
+++ b/test/unregister.c
@@ -97,9 +97,9 @@ test_unregister_filters(hid_t fapl_id)
TESTING("Unregistering filter");
/* Set up data array */
- if (NULL == (buf_data = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ if (NULL == (buf_data = (int *)calloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
TEST_ERROR;
- if (NULL == (buf = (int **)HDcalloc(DSET_DIM1, sizeof(buf_data))))
+ if (NULL == (buf = (int **)calloc(DSET_DIM1, sizeof(buf_data))))
TEST_ERROR;
for (i = 0; i < DSET_DIM1; i++)
buf[i] = buf_data + (i * DSET_DIM2);
@@ -155,7 +155,7 @@ test_unregister_filters(hid_t fapl_id)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Should not be able to unregister filter\n", __LINE__);
+ printf(" Line %d: Should not be able to unregister filter\n", __LINE__);
goto error;
}
@@ -206,7 +206,7 @@ test_unregister_filters(hid_t fapl_id)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- HDprintf(" Line %d: Should not be able to unregister filter\n", __LINE__);
+ printf(" Line %d: Should not be able to unregister filter\n", __LINE__);
goto error;
}
@@ -240,8 +240,8 @@ test_unregister_filters(hid_t fapl_id)
if (H5Fclose(fid2) < 0)
goto error;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
PASSED();
return SUCCEED;
@@ -260,8 +260,8 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
return FAIL;
}
@@ -298,21 +298,21 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All filter unregistration tests passed.\n");
+ printf("All filter unregistration tests passed.\n");
/* Pop API context */
if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR;
api_ctx_pushed = FALSE;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
nerrors = MAX(1, nerrors);
- HDprintf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
if (api_ctx_pushed)
H5CX_pop(FALSE);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c
index 185cb26..88cc646 100644
--- a/test/use_append_chunk.c
+++ b/test/use_append_chunk.c
@@ -78,7 +78,7 @@ int
setup_parameters(int argc, char *const argv[], options_t *opts)
{
/* use case defaults */
- HDmemset(opts, 0, sizeof(options_t));
+ memset(opts, 0, sizeof(options_t));
opts->chunksize = Chunksize_DFT;
opts->use_swmr = TRUE; /* use swmr open */
opts->iterations = 1;
@@ -141,25 +141,25 @@ main(int argc, char *argv[])
/* Create file */
/* =========== */
if (UC_opts.launch != UC_READER) {
- HDprintf("Creating skeleton data file for test...\n");
+ printf("Creating skeleton data file for test...\n");
if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
- HDfprintf(stderr, "can't create creation FAPL\n");
+ fprintf(stderr, "can't create creation FAPL\n");
Hgoto_error(1);
}
if (H5Pset_libver_bounds(UC_opts.fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- HDfprintf(stderr, "can't set creation FAPL libver bounds\n");
+ fprintf(stderr, "can't set creation FAPL libver bounds\n");
Hgoto_error(1);
}
if (create_uc_file(&UC_opts) < 0) {
- HDfprintf(stderr, "***encounter error\n");
+ fprintf(stderr, "***encounter error\n");
Hgoto_error(1);
}
else {
- HDprintf("File created.\n");
+ printf("File created.\n");
}
/* Close FAPL to prevent issues with forking later */
if (H5Pclose(UC_opts.fapl_id) < 0) {
- HDfprintf(stderr, "can't close creation FAPL\n");
+ fprintf(stderr, "can't close creation FAPL\n");
Hgoto_error(1);
}
UC_opts.fapl_id = H5I_INVALID_HID;
@@ -182,20 +182,20 @@ main(int argc, char *argv[])
if (UC_opts.launch != UC_WRITER) {
/* child process launch the reader */
if (0 == childpid) {
- HDprintf("%d: launch reader process\n", mypid);
+ printf("%d: launch reader process\n", mypid);
if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
- HDfprintf(stderr, "can't create read FAPL\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "can't create read FAPL\n");
+ exit(EXIT_FAILURE);
}
if (read_uc_file(send_wait, &UC_opts) < 0) {
- HDfprintf(stderr, "read_uc_file encountered error\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "read_uc_file encountered error\n");
+ exit(EXIT_FAILURE);
}
if (H5Pclose(UC_opts.fapl_id) < 0) {
- HDfprintf(stderr, "can't close read FAPL\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "can't close read FAPL\n");
+ exit(EXIT_FAILURE);
}
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
}
@@ -203,38 +203,38 @@ main(int argc, char *argv[])
/* launch writer */
/* ============= */
/* this process continues to launch the writer */
- HDprintf("%d: continue as the writer process\n", mypid);
+ printf("%d: continue as the writer process\n", mypid);
if ((fapl = h5_fileaccess()) < 0) {
- HDfprintf(stderr, "can't create write FAPL\n");
+ fprintf(stderr, "can't create write FAPL\n");
Hgoto_error(1);
}
if (UC_opts.use_swmr) {
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- HDfprintf(stderr, "can't set write FAPL libver bounds\n");
+ fprintf(stderr, "can't set write FAPL libver bounds\n");
Hgoto_error(1);
}
}
if ((fid = H5Fopen(UC_opts.filename, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) <
0) {
- HDfprintf(stderr, "H5Fopen failed\n");
+ fprintf(stderr, "H5Fopen failed\n");
Hgoto_error(1);
}
if (write_uc_file(send_wait, fid, &UC_opts) < 0) {
- HDfprintf(stderr, "write_uc_file encountered error\n");
+ fprintf(stderr, "write_uc_file encountered error\n");
Hgoto_error(1);
}
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Failed to close write\n");
+ fprintf(stderr, "Failed to close write\n");
Hgoto_error(1);
}
if (H5Pclose(fapl) < 0) {
- HDfprintf(stderr, "can't close write FAPL\n");
+ fprintf(stderr, "can't close write FAPL\n");
Hgoto_error(1);
}
@@ -249,22 +249,22 @@ main(int argc, char *argv[])
if (WIFEXITED(child_status)) {
if ((child_ret_value = WEXITSTATUS(child_status)) != 0) {
- HDprintf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
+ printf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
Hgoto_error(2);
}
}
else {
- HDprintf("%d: child process terminated abnormally\n", mypid);
+ printf("%d: child process terminated abnormally\n", mypid);
Hgoto_error(2);
}
}
done:
if (ret_value != 0) {
- HDprintf("Error(s) encountered\n");
+ printf("Error(s) encountered\n");
}
else {
- HDprintf("All passed\n");
+ printf("All passed\n");
}
return (ret_value);
@@ -275,7 +275,7 @@ done:
int
main(void)
{
- HDfprintf(stderr, "Non-POSIX platform. Skipping.\n");
+ fprintf(stderr, "Non-POSIX platform. Skipping.\n");
return EXIT_SUCCESS;
} /* end main() */
diff --git a/test/use_append_chunk_mirror.c b/test/use_append_chunk_mirror.c
index 788cf83..e54e978 100644
--- a/test/use_append_chunk_mirror.c
+++ b/test/use_append_chunk_mirror.c
@@ -118,7 +118,7 @@ int
setup_parameters(int argc, char *const argv[], options_t *opts)
{
/* use case defaults */
- HDmemset(opts, 0, sizeof(options_t));
+ memset(opts, 0, sizeof(options_t));
opts->chunksize = Chunksize_DFT;
opts->use_swmr = TRUE;
opts->iterations = 1;
@@ -173,8 +173,8 @@ main(int argc, char *argv[])
mirr_fa.handshake_port = SERVER_PORT;
HDstrncpy(mirr_fa.remote_ip, SERVER_IP, H5FD_MIRROR_MAX_IP_LEN);
- if (NULL == (split_fa = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
- HDfprintf(stderr, "can't allocate memory for splitter config\n");
+ if (NULL == (split_fa = calloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
+ fprintf(stderr, "can't allocate memory for splitter config\n");
Hgoto_error(1);
}
@@ -201,16 +201,16 @@ main(int argc, char *argv[])
/* Create file */
/* =========== */
if (UC_opts.launch != UC_READER) {
- HDprintf("Creating skeleton data file for test...\n");
+ printf("Creating skeleton data file for test...\n");
/* Prepare mirror child driver */
mirr_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
if (mirr_fapl_id == H5I_INVALID_HID) {
- HDfprintf(stderr, "can't create creation mirror FAPL\n");
+ fprintf(stderr, "can't create creation mirror FAPL\n");
Hgoto_error(1);
}
if (H5Pset_fapl_mirror(mirr_fapl_id, &mirr_fa) < 0) {
- HDfprintf(stderr, "can't set creation mirror FAPL\n");
+ fprintf(stderr, "can't set creation mirror FAPL\n");
H5Eprint2(H5E_DEFAULT, stdout);
Hgoto_error(1);
}
@@ -220,37 +220,37 @@ main(int argc, char *argv[])
split_fa->rw_fapl_id = H5P_DEFAULT;
UC_opts.fapl_id = H5Pcreate(H5P_FILE_ACCESS);
if (UC_opts.fapl_id == H5I_INVALID_HID) {
- HDfprintf(stderr, "can't create creation FAPL\n");
+ fprintf(stderr, "can't create creation FAPL\n");
Hgoto_error(1);
}
if (H5Pset_fapl_splitter(UC_opts.fapl_id, split_fa) < 0) {
- HDfprintf(stderr, "can't set creation FAPL\n");
+ fprintf(stderr, "can't set creation FAPL\n");
H5Eprint2(H5E_DEFAULT, stdout);
Hgoto_error(1);
}
if (H5Pset_libver_bounds(UC_opts.fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- HDfprintf(stderr, "can't set creation FAPL libver bounds\n");
+ fprintf(stderr, "can't set creation FAPL libver bounds\n");
Hgoto_error(1);
}
/* Create file */
if (create_uc_file(&UC_opts) < 0) {
- HDfprintf(stderr, "***encounter error\n");
+ fprintf(stderr, "***encounter error\n");
Hgoto_error(1);
}
else {
- HDprintf("File created.\n");
+ printf("File created.\n");
}
/* Close FAPLs to prevent issues with forking later */
if (H5Pclose(UC_opts.fapl_id) < 0) {
- HDfprintf(stderr, "can't close creation FAPL\n");
+ fprintf(stderr, "can't close creation FAPL\n");
Hgoto_error(1);
}
UC_opts.fapl_id = H5I_INVALID_HID;
if (H5Pclose(mirr_fapl_id) < 0) {
- HDfprintf(stderr, "can't close creation mirror FAPL\n");
+ fprintf(stderr, "can't close creation mirror FAPL\n");
Hgoto_error(1);
}
mirr_fapl_id = H5I_INVALID_HID;
@@ -274,15 +274,15 @@ main(int argc, char *argv[])
/* child process -- launch the reader */
/* reader only opens the one file -- separate reader needed for mirrored file 'shinano.h5' */
if (0 == childpid) {
- HDprintf("%d: launch reader process\n", mypid);
+ printf("%d: launch reader process\n", mypid);
UC_opts.fapl_id = H5P_DEFAULT;
if (read_uc_file(send_wait, &UC_opts) < 0) {
- HDfprintf(stderr, "read_uc_file encountered error (%d)\n", mypid);
- HDexit(1);
+ fprintf(stderr, "read_uc_file encountered error (%d)\n", mypid);
+ exit(1);
}
- HDexit(0);
+ exit(0);
}
}
@@ -290,16 +290,16 @@ main(int argc, char *argv[])
/* launch writer */
/* ============= */
/* this process continues to launch the writer */
- HDprintf("%d: continue as the writer process\n", mypid);
+ printf("%d: continue as the writer process\n", mypid);
/* Prepare mirror child driver */
mirr_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
if (mirr_fapl_id == H5I_INVALID_HID) {
- HDfprintf(stderr, "can't create creation mirror FAPL\n");
+ fprintf(stderr, "can't create creation mirror FAPL\n");
Hgoto_error(1);
}
if (H5Pset_fapl_mirror(mirr_fapl_id, &mirr_fa) < 0) {
- HDfprintf(stderr, "can't set creation mirror FAPL\n");
+ fprintf(stderr, "can't set creation mirror FAPL\n");
H5Eprint2(H5E_DEFAULT, stdout);
Hgoto_error(1);
}
@@ -309,45 +309,45 @@ main(int argc, char *argv[])
split_fa->rw_fapl_id = H5P_DEFAULT;
UC_opts.fapl_id = H5Pcreate(H5P_FILE_ACCESS);
if (UC_opts.fapl_id == H5I_INVALID_HID) {
- HDfprintf(stderr, "can't create creation FAPL\n");
+ fprintf(stderr, "can't create creation FAPL\n");
Hgoto_error(1);
}
if (H5Pset_fapl_splitter(UC_opts.fapl_id, split_fa) < 0) {
- HDfprintf(stderr, "can't set creation FAPL\n");
+ fprintf(stderr, "can't set creation FAPL\n");
H5Eprint2(H5E_DEFAULT, stdout);
Hgoto_error(1);
}
if (UC_opts.use_swmr) {
if (H5Pset_libver_bounds(UC_opts.fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- HDfprintf(stderr, "can't set write FAPL libver bounds\n");
+ fprintf(stderr, "can't set write FAPL libver bounds\n");
Hgoto_error(1);
}
}
if ((fid = H5Fopen(UC_opts.filename, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0),
UC_opts.fapl_id)) < 0) {
- HDfprintf(stderr, "H5Fopen failed\n");
+ fprintf(stderr, "H5Fopen failed\n");
Hgoto_error(1);
}
if (write_uc_file(send_wait, fid, &UC_opts) < 0) {
- HDfprintf(stderr, "write_uc_file encountered error\n");
+ fprintf(stderr, "write_uc_file encountered error\n");
Hgoto_error(1);
}
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Failed to close write\n");
+ fprintf(stderr, "Failed to close write\n");
Hgoto_error(1);
}
if (H5Pclose(UC_opts.fapl_id) < 0) {
- HDfprintf(stderr, "can't close write FAPL\n");
+ fprintf(stderr, "can't close write FAPL\n");
Hgoto_error(1);
}
if (H5Pclose(mirr_fapl_id) < 0) {
- HDfprintf(stderr, "can't close write mirror FAPL\n");
+ fprintf(stderr, "can't close write mirror FAPL\n");
Hgoto_error(1);
}
@@ -362,24 +362,24 @@ main(int argc, char *argv[])
if (WIFEXITED(child_status)) {
if ((child_ret_value = WEXITSTATUS(child_status)) != 0) {
- HDprintf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
+ printf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
Hgoto_error(2);
}
}
else {
- HDprintf("%d: child process terminated abnormally\n", mypid);
+ printf("%d: child process terminated abnormally\n", mypid);
Hgoto_error(2);
}
}
done:
- HDfree(split_fa);
+ free(split_fa);
if (ret_value != 0) {
- HDprintf("Error(s) encountered\n");
+ printf("Error(s) encountered\n");
}
else {
- HDprintf("All passed\n");
+ printf("All passed\n");
}
return ret_value;
@@ -390,7 +390,7 @@ done:
int
main(void)
{
- HDfprintf(stderr, "Mirror VFD is not built. Skipping.\n");
+ fprintf(stderr, "Mirror VFD is not built. Skipping.\n");
return EXIT_SUCCESS;
} /* end main() */
@@ -401,7 +401,7 @@ main(void)
int
main(void)
{
- HDfprintf(stderr, "Non-POSIX platform. Skipping.\n");
+ fprintf(stderr, "Non-POSIX platform. Skipping.\n");
return EXIT_SUCCESS;
} /* end main() */
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index 60f63c0..9f39455 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -70,7 +70,7 @@ int
setup_parameters(int argc, char *const argv[], options_t *opts)
{
/* use case defaults */
- HDmemset(opts, 0, sizeof(options_t));
+ memset(opts, 0, sizeof(options_t));
opts->chunksize = Chunksize_DFT;
opts->use_swmr = 1; /* use swmr open */
opts->iterations = 1;
@@ -135,25 +135,25 @@ main(int argc, char *argv[])
/* Create file */
/* =========== */
if (UC_opts.launch != UC_READER) {
- HDprintf("Creating skeleton data file for test...\n");
+ printf("Creating skeleton data file for test...\n");
if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
- HDfprintf(stderr, "can't create creation FAPL\n");
+ fprintf(stderr, "can't create creation FAPL\n");
Hgoto_error(1);
}
if (H5Pset_libver_bounds(UC_opts.fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- HDfprintf(stderr, "can't set creation FAPL libver bounds\n");
+ fprintf(stderr, "can't set creation FAPL libver bounds\n");
Hgoto_error(1);
}
if (create_uc_file(&UC_opts) < 0) {
- HDfprintf(stderr, "***encounter error\n");
+ fprintf(stderr, "***encounter error\n");
Hgoto_error(1);
}
else {
- HDprintf("File created.\n");
+ printf("File created.\n");
}
/* Close FAPL to prevent issues with forking later */
if (H5Pclose(UC_opts.fapl_id) < 0) {
- HDfprintf(stderr, "can't close creation FAPL\n");
+ fprintf(stderr, "can't close creation FAPL\n");
Hgoto_error(1);
}
UC_opts.fapl_id = H5I_INVALID_HID;
@@ -176,20 +176,20 @@ main(int argc, char *argv[])
if (UC_opts.launch != UC_WRITER) {
/* child process launch the reader */
if (0 == childpid) {
- HDprintf("%d: launch reader process\n", mypid);
+ printf("%d: launch reader process\n", mypid);
if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
- HDfprintf(stderr, "can't create read FAPL\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "can't create read FAPL\n");
+ exit(EXIT_FAILURE);
}
if (read_uc_file(send_wait, &UC_opts) < 0) {
- HDfprintf(stderr, "read_uc_file encountered error\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "read_uc_file encountered error\n");
+ exit(EXIT_FAILURE);
}
if (H5Pclose(UC_opts.fapl_id) < 0) {
- HDfprintf(stderr, "can't close read FAPL\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "can't close read FAPL\n");
+ exit(EXIT_FAILURE);
}
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
}
@@ -197,39 +197,39 @@ main(int argc, char *argv[])
/* launch writer */
/* ============= */
/* this process continues to launch the writer */
- HDprintf("%d: continue as the writer process\n", mypid);
+ printf("%d: continue as the writer process\n", mypid);
/* Set the file access property list */
if ((fapl = h5_fileaccess()) < 0) {
- HDfprintf(stderr, "can't get write FAPL\n");
+ fprintf(stderr, "can't get write FAPL\n");
Hgoto_error(1);
}
if (UC_opts.use_swmr) {
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- HDfprintf(stderr, "can't set write FAPL libver bounds\n");
+ fprintf(stderr, "can't set write FAPL libver bounds\n");
Hgoto_error(1);
}
}
if ((fid = H5Fopen(UC_opts.filename, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) <
0) {
- HDfprintf(stderr, "H5Fopen failed\n");
+ fprintf(stderr, "H5Fopen failed\n");
Hgoto_error(1);
}
if (write_uc_file(send_wait, fid, &UC_opts) < 0) {
- HDfprintf(stderr, "write_uc_file encountered error\n");
+ fprintf(stderr, "write_uc_file encountered error\n");
Hgoto_error(1);
}
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Failed to close file id\n");
+ fprintf(stderr, "Failed to close file id\n");
Hgoto_error(1);
}
if (H5Pclose(fapl) < 0) {
- HDfprintf(stderr, "can't close write FAPL\n");
+ fprintf(stderr, "can't close write FAPL\n");
Hgoto_error(1);
}
@@ -244,22 +244,22 @@ main(int argc, char *argv[])
if (WIFEXITED(child_status)) {
if ((child_ret_value = WEXITSTATUS(child_status)) != 0) {
- HDprintf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
+ printf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
Hgoto_error(1);
}
}
else {
- HDprintf("%d: child process terminated abnormally\n", mypid);
+ printf("%d: child process terminated abnormally\n", mypid);
Hgoto_error(2);
}
}
done:
if (ret_value != 0) {
- HDprintf("Error(s) encountered\n");
+ printf("Error(s) encountered\n");
}
else {
- HDprintf("All passed\n");
+ printf("All passed\n");
}
return (ret_value);
@@ -270,7 +270,7 @@ done:
int
main(void)
{
- HDfprintf(stderr, "Non-POSIX platform. Skipping.\n");
+ fprintf(stderr, "Non-POSIX platform. Skipping.\n");
return EXIT_SUCCESS;
} /* end main() */
diff --git a/test/use_common.c b/test/use_common.c
index 7b5df53..68b7d00 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -27,18 +27,18 @@
void
usage(const char *prog)
{
- HDfprintf(stderr, "usage: %s [OPTIONS]\n", prog);
- HDfprintf(stderr, " OPTIONS\n");
- HDfprintf(stderr, " -h, --help Print a usage message and exit\n");
- HDfprintf(stderr, " -f FN Test file name [default: %s.h5]\n", prog);
- HDfprintf(stderr,
- " -i N, --iteration=N Number of iterations to repeat the whole thing. [default: 1]\n");
- HDfprintf(stderr, " -l w|r launch writer or reader only. [default: launch both]\n");
- HDfprintf(stderr, " -n N, --nplanes=N Number of planes to write/read. [default: 1000]\n");
- HDfprintf(stderr, " -s N, --swmr=N Use SWMR mode (0: no, non-0: yes) default is yes\n");
- HDfprintf(stderr, " -z N, --chunksize=N Chunk size [default: %d]\n", Chunksize_DFT);
- HDfprintf(stderr, " -y N, --chunkplanes=N Number of planes per chunk [default: 1]\n");
- HDfprintf(stderr, "\n");
+ fprintf(stderr, "usage: %s [OPTIONS]\n", prog);
+ fprintf(stderr, " OPTIONS\n");
+ fprintf(stderr, " -h, --help Print a usage message and exit\n");
+ fprintf(stderr, " -f FN Test file name [default: %s.h5]\n", prog);
+ fprintf(stderr,
+ " -i N, --iteration=N Number of iterations to repeat the whole thing. [default: 1]\n");
+ fprintf(stderr, " -l w|r launch writer or reader only. [default: launch both]\n");
+ fprintf(stderr, " -n N, --nplanes=N Number of planes to write/read. [default: 1000]\n");
+ fprintf(stderr, " -s N, --swmr=N Use SWMR mode (0: no, non-0: yes) default is yes\n");
+ fprintf(stderr, " -z N, --chunksize=N Chunk size [default: %d]\n", Chunksize_DFT);
+ fprintf(stderr, " -y N, --chunkplanes=N Number of planes per chunk [default: 1]\n");
+ fprintf(stderr, "\n");
} /* end usage() */
/* ----------------------------------------------------------------------------
@@ -66,14 +66,14 @@ parse_option(int argc, char *const argv[], options_t *opts)
switch (c) {
case 'h':
usage(opts->progname);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
opts->filename = HDstrdup(optarg);
break;
case 'i': /* iterations */
- if ((opts->iterations = HDatoi(optarg)) <= 0) {
- HDfprintf(stderr, "bad iterations number %s, must be a positive integer\n", optarg);
+ if ((opts->iterations = atoi(optarg)) <= 0) {
+ fprintf(stderr, "bad iterations number %s, must be a positive integer\n", optarg);
usage(opts->progname);
Hgoto_error(-1);
}
@@ -87,7 +87,7 @@ parse_option(int argc, char *const argv[], options_t *opts)
opts->launch = UC_WRITER;
break;
default:
- HDfprintf(stderr, "launch value(%c) should be w or r only.\n", *optarg);
+ fprintf(stderr, "launch value(%c) should be w or r only.\n", *optarg);
usage(opts->progname);
Hgoto_error(-1);
break;
@@ -95,15 +95,15 @@ parse_option(int argc, char *const argv[], options_t *opts)
break;
case 'n': /* number of planes to write/read */
if ((opts->nplanes = HDstrtoul(optarg, NULL, 0)) <= 0) {
- HDfprintf(stderr, "bad number of planes %s, must be a positive integer\n", optarg);
+ fprintf(stderr, "bad number of planes %s, must be a positive integer\n", optarg);
usage(opts->progname);
Hgoto_error(-1);
}
break;
case 's': /* use swmr file open mode */
- use_swmr = HDatoi(optarg);
+ use_swmr = atoi(optarg);
if (use_swmr != 0 && use_swmr != 1) {
- HDfprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
+ fprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
usage(opts->progname);
Hgoto_error(-1);
}
@@ -111,25 +111,25 @@ parse_option(int argc, char *const argv[], options_t *opts)
break;
case 'y': /* Number of planes per chunk */
if ((opts->chunkplanes = HDstrtoul(optarg, NULL, 0)) <= 0) {
- HDfprintf(stderr, "bad number of planes per chunk %s, must be a positive integer\n",
- optarg);
+ fprintf(stderr, "bad number of planes per chunk %s, must be a positive integer\n",
+ optarg);
usage(opts->progname);
Hgoto_error(-1);
}
break;
case 'z': /* size of chunk=(z,z) */
if ((opts->chunksize = HDstrtoull(optarg, NULL, 0)) <= 0) {
- HDfprintf(stderr, "bad chunksize %s, must be a positive integer\n", optarg);
+ fprintf(stderr, "bad chunksize %s, must be a positive integer\n", optarg);
usage(opts->progname);
Hgoto_error(-1);
}
break;
case '?':
- HDfprintf(stderr, "getopt returned '%c'.\n", c);
+ fprintf(stderr, "getopt returned '%c'.\n", c);
Hgoto_error(-1);
default:
- HDfprintf(stderr, "getopt returned unexpected value.\n");
- HDfprintf(stderr, "Unexpected value is %d\n", c);
+ fprintf(stderr, "getopt returned unexpected value.\n");
+ fprintf(stderr, "Unexpected value is %d\n", c);
Hgoto_error(-1);
} /* end switch (argument symbol) */
} /* end while (there are still arguments) */
@@ -137,8 +137,8 @@ parse_option(int argc, char *const argv[], options_t *opts)
/* set test file name if not given */
if (!opts->filename) {
/* default data file name is <progname>.h5 */
- if ((opts->filename = (char *)HDmalloc(HDstrlen(opts->progname) + 4)) == NULL) {
- HDfprintf(stderr, "malloc: failed\n");
+ if ((opts->filename = (char *)malloc(HDstrlen(opts->progname) + 4)) == NULL) {
+ fprintf(stderr, "malloc: failed\n");
Hgoto_error(-1);
}
HDstrcpy(opts->filename, opts->progname);
@@ -156,31 +156,31 @@ done:
void
show_parameters(options_t *opts)
{
- HDprintf("===Parameters used:===\n");
- HDprintf("chunk dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->chunkdims[0],
- (unsigned long long)opts->chunkdims[1], (unsigned long long)opts->chunkdims[2]);
- HDprintf("dataset max dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->max_dims[0],
- (unsigned long long)opts->max_dims[1], (unsigned long long)opts->max_dims[2]);
- HDprintf("number of planes to write=%llu\n", (unsigned long long)opts->nplanes);
- HDprintf("using SWMR mode=%s\n", opts->use_swmr ? "yes(1)" : "no(0)");
- HDprintf("data filename=%s\n", opts->filename);
- HDprintf("launch part=");
+ printf("===Parameters used:===\n");
+ printf("chunk dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->chunkdims[0],
+ (unsigned long long)opts->chunkdims[1], (unsigned long long)opts->chunkdims[2]);
+ printf("dataset max dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->max_dims[0],
+ (unsigned long long)opts->max_dims[1], (unsigned long long)opts->max_dims[2]);
+ printf("number of planes to write=%llu\n", (unsigned long long)opts->nplanes);
+ printf("using SWMR mode=%s\n", opts->use_swmr ? "yes(1)" : "no(0)");
+ printf("data filename=%s\n", opts->filename);
+ printf("launch part=");
switch (opts->launch) {
case UC_READWRITE:
- HDprintf("Reader/Writer\n");
+ printf("Reader/Writer\n");
break;
case UC_WRITER:
- HDprintf("Writer\n");
+ printf("Writer\n");
break;
case UC_READER:
- HDprintf("Reader\n");
+ printf("Reader\n");
break;
default:
/* should not happen */
- HDprintf("Illegal part(%d)\n", opts->launch);
+ printf("Illegal part(%d)\n", opts->launch);
}
- HDprintf("number of iterations=%d (not used yet)\n", opts->iterations);
- HDprintf("===Parameters shown===\n");
+ printf("number of iterations=%d (not used yet)\n", opts->iterations);
+ printf("===Parameters shown===\n");
} /* end show_parameters() */
/* ----------------------------------------------------------------------------
@@ -230,7 +230,7 @@ create_uc_file(options_t *opts)
if (H5Dget_chunk_index_type(dsid, &idx_type) < 0)
return -1;
if (idx_type == H5D_CHUNK_IDX_BTREE) {
- HDfprintf(stderr, "ERROR: Chunk index is version 1 B-tree: aborting.\n");
+ fprintf(stderr, "ERROR: Chunk index is version 1 B-tree: aborting.\n");
return -1;
}
@@ -280,29 +280,29 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
/* Open the dataset of the program name */
if ((dsid = H5Dopen2(file_id, opts->progname, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "H5Dopen2 failed\n");
+ fprintf(stderr, "H5Dopen2 failed\n");
return -1;
}
/* Find chunksize used */
if ((dcpl = H5Dget_create_plist(dsid)) < 0) {
- HDfprintf(stderr, "H5Dget_create_plist failed\n");
+ fprintf(stderr, "H5Dget_create_plist failed\n");
return -1;
}
if (H5D_CHUNKED != H5Pget_layout(dcpl)) {
- HDfprintf(stderr, "storage layout is not chunked\n");
+ fprintf(stderr, "storage layout is not chunked\n");
return -1;
}
if ((rank = H5Pget_chunk(dcpl, 3, chunk_dims)) != 3) {
- HDfprintf(stderr, "storage rank is not 3\n");
+ fprintf(stderr, "storage rank is not 3\n");
return -1;
}
/* verify chunk_dims against set parameters */
if (chunk_dims[0] != opts->chunkdims[0] || chunk_dims[1] != cz || chunk_dims[2] != cz) {
- HDfprintf(stderr, "chunk size is not as expected. Got dims=(%llu,%llu,%llu)\n",
- (unsigned long long)chunk_dims[0], (unsigned long long)chunk_dims[1],
- (unsigned long long)chunk_dims[2]);
+ fprintf(stderr, "chunk size is not as expected. Got dims=(%llu,%llu,%llu)\n",
+ (unsigned long long)chunk_dims[0], (unsigned long long)chunk_dims[1],
+ (unsigned long long)chunk_dims[2]);
return -1;
}
@@ -310,8 +310,8 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
memdims[0] = 1;
memdims[1] = opts->dims[1];
memdims[2] = opts->dims[2];
- if ((buffer = (UC_CTYPE *)HDmalloc((size_t)memdims[1] * (size_t)memdims[2] * sizeof(UC_CTYPE))) == NULL) {
- HDfprintf(stderr, "malloc: failed\n");
+ if ((buffer = (UC_CTYPE *)malloc((size_t)memdims[1] * (size_t)memdims[2] * sizeof(UC_CTYPE))) == NULL) {
+ fprintf(stderr, "malloc: failed\n");
return -1;
}
@@ -321,29 +321,29 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
f_sid = H5Dget_space(dsid); /* Get filespace handle first. */
rank = H5Sget_simple_extent_ndims(f_sid);
if (rank != UC_RANK) {
- HDfprintf(stderr, "rank(%d) of dataset does not match\n", rank);
- HDfree(buffer);
+ fprintf(stderr, "rank(%d) of dataset does not match\n", rank);
+ free(buffer);
return -1;
}
if (H5Sget_simple_extent_dims(f_sid, dims, NULL) < 0) {
- HDfprintf(stderr, "H5Sget_simple_extent_dims got error\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Sget_simple_extent_dims got error\n");
+ free(buffer);
return -1;
}
- HDprintf("dataset rank %d, dimensions %llu x %llu x %llu\n", rank, (unsigned long long)(dims[0]),
- (unsigned long long)(dims[1]), (unsigned long long)(dims[2]));
+ printf("dataset rank %d, dimensions %llu x %llu x %llu\n", rank, (unsigned long long)(dims[0]),
+ (unsigned long long)(dims[1]), (unsigned long long)(dims[2]));
/* verify that file space dims are as expected and are consistent with memory space dims */
if (dims[0] != 0 || dims[1] != memdims[1] || dims[2] != memdims[2]) {
- HDfprintf(stderr, "dataset is not empty. Got dims=(%llu,%llu,%llu)\n", (unsigned long long)dims[0],
- (unsigned long long)dims[1], (unsigned long long)dims[2]);
- HDfree(buffer);
+ fprintf(stderr, "dataset is not empty. Got dims=(%llu,%llu,%llu)\n", (unsigned long long)dims[0],
+ (unsigned long long)dims[1], (unsigned long long)dims[2]);
+ free(buffer);
return -1;
}
/* setup mem-space for buffer */
if ((m_sid = H5Screate_simple(rank, memdims, NULL)) < 0) {
- HDfprintf(stderr, "H5Screate_simple for memory failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Screate_simple for memory failed\n");
+ free(buffer);
return -1;
}
@@ -363,8 +363,8 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
/* Cork the dataset's metadata in the cache, if SWMR is enabled */
if (opts->use_swmr) {
if (H5Odisable_mdc_flushes(dsid) < 0) {
- HDfprintf(stderr, "H5Odisable_mdc_flushes failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Odisable_mdc_flushes failed\n");
+ free(buffer);
return -1;
}
}
@@ -372,62 +372,62 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
/* extend the dataset by one for new plane */
dims[0] = i + 1;
if (H5Dset_extent(dsid, dims) < 0) {
- HDfprintf(stderr, "H5Dset_extent failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Dset_extent failed\n");
+ free(buffer);
return -1;
}
/* Get the dataset's dataspace */
if ((f_sid = H5Dget_space(dsid)) < 0) {
- HDfprintf(stderr, "H5Dset_extent failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Dset_extent failed\n");
+ free(buffer);
return -1;
}
start[0] = i;
/* Choose the next plane to write */
if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
- HDfprintf(stderr, "Failed H5Sselect_hyperslab\n");
- HDfree(buffer);
+ fprintf(stderr, "Failed H5Sselect_hyperslab\n");
+ free(buffer);
return -1;
}
/* Write plane to the dataset */
if (H5Dwrite(dsid, UC_DATATYPE, m_sid, f_sid, H5P_DEFAULT, buffer) < 0) {
- HDfprintf(stderr, "Failed H5Dwrite\n");
- HDfree(buffer);
+ fprintf(stderr, "Failed H5Dwrite\n");
+ free(buffer);
return -1;
}
/* Uncork the dataset's metadata from the cache, if SWMR is enabled */
if (opts->use_swmr) {
if (H5Oenable_mdc_flushes(dsid) < 0) {
- HDfprintf(stderr, "H5Oenable_mdc_flushes failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Oenable_mdc_flushes failed\n");
+ free(buffer);
return -1;
}
}
/* flush file to make the just written plane available. */
if (H5Dflush(dsid) < 0) {
- HDfprintf(stderr, "Failed to H5Fflush file\n");
- HDfree(buffer);
+ fprintf(stderr, "Failed to H5Fflush file\n");
+ free(buffer);
return -1;
}
} /* end for each plane to write */
/* Done writing. Free/Close all resources including data file */
- HDfree(buffer);
+ free(buffer);
if (H5Dclose(dsid) < 0) {
- HDfprintf(stderr, "Failed to close datasete\n");
+ fprintf(stderr, "Failed to close datasete\n");
return -1;
}
if (H5Sclose(m_sid) < 0) {
- HDfprintf(stderr, "Failed to close memory space\n");
+ fprintf(stderr, "Failed to close memory space\n");
return -1;
}
if (H5Sclose(f_sid) < 0) {
- HDfprintf(stderr, "Failed to close file space\n");
+ fprintf(stderr, "Failed to close file space\n");
return -1;
}
@@ -466,19 +466,19 @@ read_uc_file(hbool_t towait, options_t *opts)
/* Before reading, wait for the message that H5Fopen is complete--file lock is released */
if (towait && h5_wait_message(WRITER_MESSAGE) < 0) {
- HDfprintf(stderr, "Cannot find writer message file...failed\n");
+ fprintf(stderr, "Cannot find writer message file...failed\n");
return -1;
}
- HDfprintf(stderr, "Opening to read %s\n", opts->filename);
+ fprintf(stderr, "Opening to read %s\n", opts->filename);
if ((fid = H5Fopen(opts->filename, H5F_ACC_RDONLY | (opts->use_swmr ? H5F_ACC_SWMR_READ : 0),
opts->fapl_id)) < 0) {
- HDfprintf(stderr, "H5Fopen failed\n");
+ fprintf(stderr, "H5Fopen failed\n");
return -1;
}
if ((dsid = H5Dopen2(fid, opts->progname, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "H5Dopen2 failed\n");
+ fprintf(stderr, "H5Dopen2 failed\n");
return -1;
}
@@ -486,8 +486,8 @@ read_uc_file(hbool_t towait, options_t *opts)
memdims[0] = 1;
memdims[1] = opts->dims[1];
memdims[2] = opts->dims[2];
- if ((buffer = (UC_CTYPE *)HDmalloc((size_t)memdims[1] * (size_t)memdims[2] * sizeof(UC_CTYPE))) == NULL) {
- HDfprintf(stderr, "malloc: failed\n");
+ if ((buffer = (UC_CTYPE *)malloc((size_t)memdims[1] * (size_t)memdims[2] * sizeof(UC_CTYPE))) == NULL) {
+ fprintf(stderr, "malloc: failed\n");
return -1;
}
@@ -498,31 +498,31 @@ read_uc_file(hbool_t towait, options_t *opts)
f_sid = H5Dget_space(dsid); /* Get filespace handle first. */
rank = H5Sget_simple_extent_ndims(f_sid);
if (rank != UC_RANK) {
- HDfprintf(stderr, "rank(%d) of dataset does not match\n", rank);
- HDfree(buffer);
+ fprintf(stderr, "rank(%d) of dataset does not match\n", rank);
+ free(buffer);
return -1;
}
if (H5Sget_simple_extent_dims(f_sid, dims, NULL) < 0) {
- HDfprintf(stderr, "H5Sget_simple_extent_dims got error\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Sget_simple_extent_dims got error\n");
+ free(buffer);
return -1;
}
- HDprintf("dataset rank %d, dimensions %llu x %llu x %llu\n", rank, (unsigned long long)(dims[0]),
- (unsigned long long)(dims[1]), (unsigned long long)(dims[2]));
+ printf("dataset rank %d, dimensions %llu x %llu x %llu\n", rank, (unsigned long long)(dims[0]),
+ (unsigned long long)(dims[1]), (unsigned long long)(dims[2]));
/* verify that file space dims are as expected and are consistent with memory space dims */
if (dims[1] != memdims[1] || dims[2] != memdims[2]) {
- HDfprintf(stderr, "dataset dimension is not as expected. Got dims=(%llu,%llu,%llu)\n",
- (unsigned long long)dims[0], (unsigned long long)dims[1], (unsigned long long)dims[2]);
- HDfprintf(stderr, "But memdims=(%llu,%llu,%llu)\n", (unsigned long long)memdims[0],
- (unsigned long long)memdims[1], (unsigned long long)memdims[2]);
- HDfree(buffer);
+ fprintf(stderr, "dataset dimension is not as expected. Got dims=(%llu,%llu,%llu)\n",
+ (unsigned long long)dims[0], (unsigned long long)dims[1], (unsigned long long)dims[2]);
+ fprintf(stderr, "But memdims=(%llu,%llu,%llu)\n", (unsigned long long)memdims[0],
+ (unsigned long long)memdims[1], (unsigned long long)memdims[2]);
+ free(buffer);
return -1;
}
/* Setup mem-space for buffer */
if ((m_sid = H5Screate_simple(rank, memdims, NULL)) < 0) {
- HDfprintf(stderr, "H5Screate_simple for memory failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Screate_simple for memory failed\n");
+ free(buffer);
return -1;
}
@@ -537,24 +537,24 @@ read_uc_file(hbool_t towait, options_t *opts)
if (nplanes_seen < dims[0]) {
if (loops_waiting_for_plane) {
/* end the previous message */
- HDprintf("\n");
+ printf("\n");
loops_waiting_for_plane = 0;
}
- HDprintf("reading planes %llu to %llu\n", (unsigned long long)nplanes_seen,
- (unsigned long long)dims[0]);
+ printf("reading planes %llu to %llu\n", (unsigned long long)nplanes_seen,
+ (unsigned long long)dims[0]);
}
else {
if (loops_waiting_for_plane) {
- HDprintf(".");
+ printf(".");
if (loops_waiting_for_plane >= 30) {
- HDfprintf(stderr, "waited too long for new plane, quit.\n");
- HDfree(buffer);
+ fprintf(stderr, "waited too long for new plane, quit.\n");
+ free(buffer);
return -1;
}
}
else {
/* print mesg only the first time; dots still no new plane */
- HDprintf("waiting for new planes to read ");
+ printf("waiting for new planes to read ");
}
loops_waiting_for_plane++;
/* pause for a second */
@@ -565,23 +565,23 @@ read_uc_file(hbool_t towait, options_t *opts)
/* read planes between last old nplanes and current extent */
/* Get the dataset's dataspace */
if ((f_sid = H5Dget_space(dsid)) < 0) {
- HDfprintf(stderr, "H5Dget_space failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Dget_space failed\n");
+ free(buffer);
return -1;
}
start[0] = nplane;
/* Choose the next plane to read */
if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
- HDfprintf(stderr, "H5Sselect_hyperslab failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Sselect_hyperslab failed\n");
+ free(buffer);
return -1;
}
/* Read the plane from the dataset */
if (H5Dread(dsid, UC_DATATYPE, m_sid, f_sid, H5P_DEFAULT, buffer) < 0) {
- HDfprintf(stderr, "H5Dread failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Dread failed\n");
+ free(buffer);
return -1;
}
@@ -592,17 +592,17 @@ read_uc_file(hbool_t towait, options_t *opts)
for (k = 0; k < dims[2]; k++) {
if ((hsize_t)*bufptr++ != nplane) {
if (++nerrs < ErrorReportMax) {
- HDfprintf(stderr, "found error %llu plane(%llu,%llu), expected %llu, got %d\n",
- (unsigned long long)nplane, (unsigned long long)j,
- (unsigned long long)k, (unsigned long long)nplane, (int)*(bufptr - 1));
+ fprintf(stderr, "found error %llu plane(%llu,%llu), expected %llu, got %d\n",
+ (unsigned long long)nplane, (unsigned long long)j, (unsigned long long)k,
+ (unsigned long long)nplane, (int)*(bufptr - 1));
} /* end if should print error */
} /* end if value mismatch */
} /* end for plane second dimension */
} /* end for plane first dimension */
if (nerrs) {
nreadererr++;
- HDfprintf(stderr, "found %d unexpected values in plane %llu\n", nerrs,
- (unsigned long long)nplane);
+ fprintf(stderr, "found %d unexpected values in plane %llu\n", nerrs,
+ (unsigned long long)nplane);
}
} /* end for each plane added since last read */
@@ -612,19 +612,19 @@ read_uc_file(hbool_t towait, options_t *opts)
H5Drefresh(dsid);
f_sid = H5Dget_space(dsid); /* Get filespace handle first. */
if (H5Sget_simple_extent_dims(f_sid, dims, NULL) < 0) {
- HDfprintf(stderr, "H5Sget_simple_extent_dims got error\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Sget_simple_extent_dims got error\n");
+ free(buffer);
return -1;
}
} /* end while (expecting more planes to read) */
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "H5Fclose failed\n");
- HDfree(buffer);
+ fprintf(stderr, "H5Fclose failed\n");
+ free(buffer);
return -1;
}
- HDfree(buffer);
+ free(buffer);
if (nreadererr)
return -1;
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c
index ea674ec..cf60e56 100644
--- a/test/use_disable_mdc_flushes.c
+++ b/test/use_disable_mdc_flushes.c
@@ -70,15 +70,15 @@ static int setup_parameters(int argc, char *const argv[]);
static void
usage(const char *prog)
{
- HDfprintf(stderr, "usage: %s [OPTIONS]\n", prog);
- HDfprintf(stderr, " OPTIONS\n");
- HDfprintf(stderr, " -h Print a usage message and exit\n");
- HDfprintf(stderr, " -f FN Test file name [default: %s.h5]\n", prog);
- HDfprintf(stderr, " -n N Number of planes to write. [default: 1000]\n");
- HDfprintf(stderr, " -s N Use SWMR mode (0: no, non-0: yes) default is yes\n");
- HDfprintf(stderr, " -z N Chunk size [default: %d]\n", Chunksize_DFT);
- HDfprintf(stderr, " -y N Number of planes per chunk [default: 1]\n");
- HDfprintf(stderr, "\n");
+ fprintf(stderr, "usage: %s [OPTIONS]\n", prog);
+ fprintf(stderr, " OPTIONS\n");
+ fprintf(stderr, " -h Print a usage message and exit\n");
+ fprintf(stderr, " -f FN Test file name [default: %s.h5]\n", prog);
+ fprintf(stderr, " -n N Number of planes to write. [default: 1000]\n");
+ fprintf(stderr, " -s N Use SWMR mode (0: no, non-0: yes) default is yes\n");
+ fprintf(stderr, " -z N Chunk size [default: %d]\n", Chunksize_DFT);
+ fprintf(stderr, " -y N Number of planes per chunk [default: 1]\n");
+ fprintf(stderr, "\n");
} /* usage() */
/*
@@ -102,46 +102,46 @@ parse_option(int argc, char *const argv[])
switch (c) {
case 'h':
usage(progname_g);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
filename_g = optarg;
break;
case 'n': /* number of planes to write/read */
- if ((nplanes_g = (hsize_t)HDatoi(optarg)) <= 0) {
- HDfprintf(stderr, "bad number of planes %s, must be a positive integer\n", optarg);
+ if ((nplanes_g = (hsize_t)atoi(optarg)) <= 0) {
+ fprintf(stderr, "bad number of planes %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 's': /* use swmr file open mode */
- if ((use_swmr_g = HDatoi(optarg)) < 0) {
- HDfprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
+ if ((use_swmr_g = atoi(optarg)) < 0) {
+ fprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'y': /* Number of planes per chunk */
- if ((chunkplanes_g = HDatoi(optarg)) <= 0) {
- HDfprintf(stderr, "bad number of planes per chunk %s, must be a positive integer\n",
- optarg);
+ if ((chunkplanes_g = atoi(optarg)) <= 0) {
+ fprintf(stderr, "bad number of planes per chunk %s, must be a positive integer\n",
+ optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'z': /* size of chunk=(z,z) */
- if ((chunksize_g = HDatoi(optarg)) <= 0) {
- HDfprintf(stderr, "bad chunksize %s, must be a positive integer\n", optarg);
+ if ((chunksize_g = atoi(optarg)) <= 0) {
+ fprintf(stderr, "bad chunksize %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case '?':
- HDfprintf(stderr, "getopt returned '%c'.\n", c);
+ fprintf(stderr, "getopt returned '%c'.\n", c);
Hgoto_error(-1);
default:
- HDfprintf(stderr, "getopt returned unexpected value.\n");
- HDfprintf(stderr, "Unexpected value is %d\n", c);
+ fprintf(stderr, "getopt returned unexpected value.\n");
+ fprintf(stderr, "Unexpected value is %d\n", c);
Hgoto_error(-1);
}
}
@@ -149,8 +149,8 @@ parse_option(int argc, char *const argv[])
/* set test file name if not given */
if (!filename_g) {
/* default data file name is <progname>.h5 */
- if ((filename_g = (char *)HDmalloc(HDstrlen(progname_g) + 4)) == NULL) {
- HDfprintf(stderr, "malloc: failed\n");
+ if ((filename_g = (char *)malloc(HDstrlen(progname_g) + 4)) == NULL) {
+ fprintf(stderr, "malloc: failed\n");
Hgoto_error(-1);
};
HDstrcpy(filename_g, progname_g);
@@ -166,15 +166,15 @@ done:
static void
show_parameters(void)
{
- HDprintf("===Parameters used:===\n");
- HDprintf("chunk dims=(%llu, %llu, %llu)\n", (unsigned long long)chunkdims_g[0],
- (unsigned long long)chunkdims_g[1], (unsigned long long)chunkdims_g[2]);
- HDprintf("dataset max dims=(%llu, %llu, %llu)\n", (unsigned long long)max_dims_g[0],
- (unsigned long long)max_dims_g[1], (unsigned long long)max_dims_g[2]);
- HDprintf("number of planes to write=%llu\n", (unsigned long long)nplanes_g);
- HDprintf("using SWMR mode=%s\n", use_swmr_g ? "yes(1)" : "no(0)");
- HDprintf("data filename=%s\n", filename_g);
- HDprintf("===Parameters shown===\n");
+ printf("===Parameters used:===\n");
+ printf("chunk dims=(%llu, %llu, %llu)\n", (unsigned long long)chunkdims_g[0],
+ (unsigned long long)chunkdims_g[1], (unsigned long long)chunkdims_g[2]);
+ printf("dataset max dims=(%llu, %llu, %llu)\n", (unsigned long long)max_dims_g[0],
+ (unsigned long long)max_dims_g[1], (unsigned long long)max_dims_g[2]);
+ printf("number of planes to write=%llu\n", (unsigned long long)nplanes_g);
+ printf("using SWMR mode=%s\n", use_swmr_g ? "yes(1)" : "no(0)");
+ printf("data filename=%s\n", filename_g);
+ printf("===Parameters shown===\n");
} /* show_parameters() */
/*
@@ -263,7 +263,7 @@ create_file(void)
if (H5D__layout_idx_type_test(dsid, &idx_type) < 0)
return -1;
if (idx_type == H5D_CHUNK_IDX_BTREE) {
- HDfprintf(stderr, "ERROR: Chunk index is version 1 B-tree: aborting.\n");
+ fprintf(stderr, "ERROR: Chunk index is version 1 B-tree: aborting.\n");
return -1;
}
@@ -320,51 +320,51 @@ write_file(void)
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
return -1;
if ((fid = H5Fopen(name, H5F_ACC_RDWR | (use_swmr_g ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) {
- HDfprintf(stderr, "H5Fopen failed\n");
+ fprintf(stderr, "H5Fopen failed\n");
return -1;
}
/* Open the dataset of the program name */
if ((dsid = H5Dopen2(fid, progname_g, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "H5Dopen2 failed\n");
+ fprintf(stderr, "H5Dopen2 failed\n");
return -1;
}
/* Disabled mdc flushed for the dataset */
if (H5Odisable_mdc_flushes(dsid) < 0) {
- HDfprintf(stderr, "H5Odisable_mdc_flushes failed\n");
+ fprintf(stderr, "H5Odisable_mdc_flushes failed\n");
return -1;
}
/* Get mdc disabled status of the dataset */
if (H5Oare_mdc_flushes_disabled(dsid, &disabled) < 0) {
- HDfprintf(stderr, "H5Oare_mdc_flushes_disabled failed\n");
+ fprintf(stderr, "H5Oare_mdc_flushes_disabled failed\n");
return -1;
}
else if (disabled)
- HDprintf("Dataset has disabled mdc flushes.\n");
+ printf("Dataset has disabled mdc flushes.\n");
else
- HDprintf("Dataset should have disabled its mdc flushes.\n");
+ printf("Dataset should have disabled its mdc flushes.\n");
/* Find chunksize used */
if ((dcpl = H5Dget_create_plist(dsid)) < 0) {
- HDfprintf(stderr, "H5Dget_create_plist failed\n");
+ fprintf(stderr, "H5Dget_create_plist failed\n");
return -1;
}
if (H5D_CHUNKED != H5Pget_layout(dcpl)) {
- HDfprintf(stderr, "storage layout is not chunked\n");
+ fprintf(stderr, "storage layout is not chunked\n");
return -1;
}
if ((rank = H5Pget_chunk(dcpl, 3, chunk_dims)) != 3) {
- HDfprintf(stderr, "storage rank is not 3\n");
+ fprintf(stderr, "storage rank is not 3\n");
return -1;
}
/* verify chunk_dims against set parameters */
if (chunk_dims[0] != chunkdims_g[0] || chunk_dims[1] != cz || chunk_dims[2] != cz) {
- HDfprintf(stderr, "chunk size is not as expected. Got dims=(%llu,%llu,%llu)\n",
- (unsigned long long)chunk_dims[0], (unsigned long long)chunk_dims[1],
- (unsigned long long)chunk_dims[2]);
+ fprintf(stderr, "chunk size is not as expected. Got dims=(%llu,%llu,%llu)\n",
+ (unsigned long long)chunk_dims[0], (unsigned long long)chunk_dims[1],
+ (unsigned long long)chunk_dims[2]);
return -1;
}
@@ -372,8 +372,8 @@ write_file(void)
memdims[0] = 1;
memdims[1] = dims_g[1];
memdims[2] = dims_g[2];
- if ((buffer = (UC_CTYPE *)HDmalloc((size_t)memdims[1] * (size_t)memdims[2] * sizeof(UC_CTYPE))) == NULL) {
- HDfprintf(stderr, "malloc: failed\n");
+ if ((buffer = (UC_CTYPE *)malloc((size_t)memdims[1] * (size_t)memdims[2] * sizeof(UC_CTYPE))) == NULL) {
+ fprintf(stderr, "malloc: failed\n");
return -1;
};
@@ -383,25 +383,25 @@ write_file(void)
f_sid = H5Dget_space(dsid); /* Get filespace handle first. */
rank = H5Sget_simple_extent_ndims(f_sid);
if (rank != UC_RANK) {
- HDfprintf(stderr, "rank(%d) of dataset does not match\n", rank);
+ fprintf(stderr, "rank(%d) of dataset does not match\n", rank);
return -1;
}
if (H5Sget_simple_extent_dims(f_sid, dims, NULL) < 0) {
- HDfprintf(stderr, "H5Sget_simple_extent_dims got error\n");
+ fprintf(stderr, "H5Sget_simple_extent_dims got error\n");
return -1;
}
- HDprintf("dataset rank %d, dimensions %llu x %llu x %llu\n", rank, (unsigned long long)(dims[0]),
- (unsigned long long)(dims[1]), (unsigned long long)(dims[2]));
+ printf("dataset rank %d, dimensions %llu x %llu x %llu\n", rank, (unsigned long long)(dims[0]),
+ (unsigned long long)(dims[1]), (unsigned long long)(dims[2]));
/* verify that file space dims are as expected and are consistent with memory space dims */
if (dims[0] != 0 || dims[1] != memdims[1] || dims[2] != memdims[2]) {
- HDfprintf(stderr, "dataset is not empty. Got dims=(%llu,%llu,%llu)\n", (unsigned long long)dims[0],
- (unsigned long long)dims[1], (unsigned long long)dims[2]);
+ fprintf(stderr, "dataset is not empty. Got dims=(%llu,%llu,%llu)\n", (unsigned long long)dims[0],
+ (unsigned long long)dims[1], (unsigned long long)dims[2]);
return -1;
}
/* setup mem-space for buffer */
if ((m_sid = H5Screate_simple(rank, memdims, NULL)) < 0) {
- HDfprintf(stderr, "H5Screate_simple for memory failed\n");
+ fprintf(stderr, "H5Screate_simple for memory failed\n");
return -1;
};
@@ -415,7 +415,7 @@ write_file(void)
for (j = 0; j < dims[1]; j++)
for (k = 0; k < dims[2]; k++) {
if (i > SHRT_MAX) {
- HDfprintf(stderr, "rank(%d) of dataset overflow\n", rank);
+ fprintf(stderr, "rank(%d) of dataset overflow\n", rank);
return -1;
}
*bufptr++ = (short)i;
@@ -424,40 +424,40 @@ write_file(void)
/* extend the dataset by one for new plane */
dims[0] = i + 1;
if (H5Dset_extent(dsid, dims) < 0) {
- HDfprintf(stderr, "H5Dset_extent failed\n");
+ fprintf(stderr, "H5Dset_extent failed\n");
return -1;
}
/* Get the dataset's dataspace */
if ((f_sid = H5Dget_space(dsid)) < 0) {
- HDfprintf(stderr, "H5Dset_extent failed\n");
+ fprintf(stderr, "H5Dset_extent failed\n");
return -1;
}
start[0] = i;
/* Choose the next plane to write */
if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
- HDfprintf(stderr, "Failed H5Sselect_hyperslab\n");
+ fprintf(stderr, "Failed H5Sselect_hyperslab\n");
return -1;
}
/* Write plane to the dataset */
if (H5Dwrite(dsid, UC_DATATYPE, m_sid, f_sid, H5P_DEFAULT, buffer) < 0) {
- HDfprintf(stderr, "Failed H5Dwrite\n");
+ fprintf(stderr, "Failed H5Dwrite\n");
return -1;
}
/* Flush the dataset for every "chunkplanes_g" planes */
if (!((i + 1) % (hsize_t)chunkplanes_g)) {
if (H5Dflush(dsid) < 0) {
- HDfprintf(stderr, "Failed to H5Dflush dataset\n");
+ fprintf(stderr, "Failed to H5Dflush dataset\n");
return -1;
}
}
}
if (H5Dflush(dsid) < 0) {
- HDfprintf(stderr, "Failed to H5Dflush dataset\n");
+ fprintf(stderr, "Failed to H5Dflush dataset\n");
return -1;
}
@@ -465,31 +465,31 @@ write_file(void)
/* Closing the dataset later will enable mdc flushes automatically if this is not done */
if (disabled)
if (H5Oenable_mdc_flushes(dsid) < 0) {
- HDfprintf(stderr, "Failed to H5Oenable_mdc_flushes\n");
+ fprintf(stderr, "Failed to H5Oenable_mdc_flushes\n");
return -1;
}
/* Done writing. Free/Close all resources including data file */
- HDfree(buffer);
+ free(buffer);
if (H5Dclose(dsid) < 0) {
- HDfprintf(stderr, "Failed to close datasete\n");
+ fprintf(stderr, "Failed to close datasete\n");
return -1;
}
if (H5Sclose(m_sid) < 0) {
- HDfprintf(stderr, "Failed to close memory space\n");
+ fprintf(stderr, "Failed to close memory space\n");
return -1;
}
if (H5Sclose(f_sid) < 0) {
- HDfprintf(stderr, "Failed to close file space\n");
+ fprintf(stderr, "Failed to close file space\n");
return -1;
}
if (H5Pclose(fapl) < 0) {
- HDfprintf(stderr, "Failed to property list\n");
+ fprintf(stderr, "Failed to property list\n");
return -1;
}
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Failed to close file id\n");
+ fprintf(stderr, "Failed to close file id\n");
return -1;
}
@@ -513,26 +513,26 @@ main(int argc, char *argv[])
/* ============*/
/* Create file */
/* ============*/
- HDprintf("Creating skeleton data file for testing H5Odisable_mdc_flushes()...\n");
+ printf("Creating skeleton data file for testing H5Odisable_mdc_flushes()...\n");
if (create_file() < 0) {
- HDfprintf(stderr, "***encounter error\n");
+ fprintf(stderr, "***encounter error\n");
Hgoto_error(1);
} /* end if */
else
- HDprintf("File created.\n");
+ printf("File created.\n");
- HDprintf("writing to the file\n");
+ printf("writing to the file\n");
if (write_file() < 0) {
- HDfprintf(stderr, "write_file encountered error\n");
+ fprintf(stderr, "write_file encountered error\n");
Hgoto_error(1);
}
done:
/* Print result and exit */
if (ret_value != 0)
- HDprintf("Error(s) encountered\n");
+ printf("Error(s) encountered\n");
else
- HDprintf("All passed\n");
+ printf("All passed\n");
return (ret_value);
}
@@ -542,8 +542,8 @@ done:
int
main(void)
{
- HDfprintf(stderr, "Non-POSIX platform. Skipping.\n");
- HDexit(EXIT_SUCCESS);
+ fprintf(stderr, "Non-POSIX platform. Skipping.\n");
+ exit(EXIT_SUCCESS);
} /* end main() */
#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/vds.c b/test/vds.c
index 987771a..6776976 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -55,7 +55,7 @@ const char *FILENAME[] = {"vds_virt_0", "vds_virt_1", "vds_src_0", "vds_src_1",
/* Print config directly to output */
#define PRINT_CONFIG(...) \
do { \
- HDprintf("Config: " __VA_ARGS__); \
+ printf("Config: " __VA_ARGS__); \
HDputs(""); \
} while (0)
@@ -80,11 +80,11 @@ char vds_test_str_g[128] = "";
/* Replacement for TEST_ERROR for non-verbose output */
#define TEST_ERROR_SUPPRESSED \
do { \
- HDprintf("Failed config: %s\nFailed test: %s\n", vds_config_str_g, vds_test_str_g); \
+ printf("Failed config: %s\nFailed test: %s\n", vds_config_str_g, vds_test_str_g); \
TEST_ERROR; \
} while (0)
-/* Replacement for HDprintf for printing configuration for non-verbose output */
+/* Replacement for printf for printing configuration for non-verbose output */
#define PRINT_CONFIG(...) \
do { \
HDsnprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__); \
@@ -164,9 +164,9 @@ vds_select_equal(hid_t space1, hid_t space2)
/* Allocate point lists. Do not return directly after
* allocating, to make sure buffers are freed. */
- if (NULL == (buf1 = (hsize_t *)HDmalloc((size_t)rank1 * (size_t)npoints1 * sizeof(hsize_t))))
+ if (NULL == (buf1 = (hsize_t *)malloc((size_t)rank1 * (size_t)npoints1 * sizeof(hsize_t))))
TEST_ERROR;
- if (NULL == (buf2 = (hsize_t *)HDmalloc((size_t)rank1 * (size_t)npoints1 * sizeof(hsize_t))))
+ if (NULL == (buf2 = (hsize_t *)malloc((size_t)rank1 * (size_t)npoints1 * sizeof(hsize_t))))
TEST_ERROR;
/* Get and compare point lists */
@@ -181,9 +181,9 @@ vds_select_equal(hid_t space1, hid_t space2)
}
/* Free buffers */
- HDfree(buf1);
+ free(buf1);
buf1 = NULL;
- HDfree(buf2);
+ free(buf2);
buf2 = NULL;
} /* end block */
@@ -214,10 +214,10 @@ vds_select_equal(hid_t space1, hid_t space2)
/* Allocate block lists. Do not return directly after
* allocating, to make sure buffers are freed. */
if (NULL ==
- (buf1 = (hsize_t *)HDmalloc((size_t)2 * (size_t)rank1 * (size_t)nblocks1 * sizeof(*buf1))))
+ (buf1 = (hsize_t *)malloc((size_t)2 * (size_t)rank1 * (size_t)nblocks1 * sizeof(*buf1))))
TEST_ERROR;
if (NULL ==
- (buf2 = (hsize_t *)HDmalloc((size_t)2 * (size_t)rank1 * (size_t)nblocks1 * sizeof(*buf2))))
+ (buf2 = (hsize_t *)malloc((size_t)2 * (size_t)rank1 * (size_t)nblocks1 * sizeof(*buf2))))
TEST_ERROR;
/* Get and compare block lists */
@@ -232,9 +232,9 @@ vds_select_equal(hid_t space1, hid_t space2)
}
/* Free buffers */
- HDfree(buf1);
+ free(buf1);
buf1 = NULL;
- HDfree(buf2);
+ free(buf2);
buf2 = NULL;
} /* end block */
@@ -250,9 +250,9 @@ vds_select_equal(hid_t space1, hid_t space2)
error:
if (buf1)
- HDfree(buf1);
+ free(buf1);
if (buf2)
- HDfree(buf2);
+ free(buf2);
return -1;
} /* end vds_select_equal() */
@@ -277,11 +277,11 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char
htri_t tri_ret;
ssize_t str_len;
- HDassert(dcpl >= 0);
- HDassert(vspace >= 0);
- HDassert(srcspace >= 0);
- HDassert(filename);
- HDassert(dsetname);
+ assert(dcpl >= 0);
+ assert(vspace >= 0);
+ assert(srcspace >= 0);
+ assert(filename);
+ assert(dsetname);
/* Check vspace */
if ((space_out = H5Pget_virtual_vspace(dcpl, i)) < 0)
@@ -314,7 +314,7 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char
TEST_ERROR;
if ((size_t)str_len != HDstrlen(filename))
TEST_ERROR;
- HDassert((size_t)str_len < sizeof(name_out));
+ assert((size_t)str_len < sizeof(name_out));
if ((str_len = H5Pget_virtual_filename(dcpl, i, name_out, sizeof(name_out))) < 0)
TEST_ERROR;
if ((size_t)str_len != HDstrlen(filename))
@@ -327,7 +327,7 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char
TEST_ERROR;
if ((size_t)str_len != HDstrlen(dsetname))
TEST_ERROR;
- HDassert((size_t)str_len < sizeof(name_out));
+ assert((size_t)str_len < sizeof(name_out));
if ((str_len = H5Pget_virtual_dsetname(dcpl, i, name_out, sizeof(name_out))) < 0)
TEST_ERROR;
if ((size_t)str_len != HDstrlen(dsetname))
@@ -368,13 +368,13 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, hid_t *ex
H5O_native_info_t ninfo; /* Object info struct */
htri_t tri_ret;
- HDassert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS));
- HDassert(fapl >= 0);
- HDassert(dcpl >= 0);
- HDassert(ex_dcpl);
- HDassert(*ex_dcpl < 0);
- HDassert(vspace >= 0);
- HDassert(filename);
+ assert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS));
+ assert(fapl >= 0);
+ assert(dcpl >= 0);
+ assert(ex_dcpl);
+ assert(*ex_dcpl < 0);
+ assert(vspace >= 0);
+ assert(filename);
/* Take different action depending on test configuration */
if (config >= TEST_API_CREATE_DSET) {
@@ -426,9 +426,8 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, hid_t *ex
TEST_ERROR;
if (config == TEST_API_REOPEN_FILE) {
if (ninfo.meta_size.obj.heap_size != exp_meta_size) {
- HDprintf("VDS metadata size: %llu Expected: %llu\n",
- (long long unsigned)ninfo.meta_size.obj.heap_size,
- (long long unsigned)exp_meta_size);
+ printf("VDS metadata size: %llu Expected: %llu\n",
+ (long long unsigned)ninfo.meta_size.obj.heap_size, (long long unsigned)exp_meta_size);
TEST_ERROR;
}
}
@@ -471,7 +470,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, hid_t *ex
/* Encode property list to plist_buf */
if (H5Pencode2(dcpl, NULL, &plist_buf_size, fapl) < 0)
TEST_ERROR;
- if (NULL == (plist_buf = HDmalloc(plist_buf_size)))
+ if (NULL == (plist_buf = malloc(plist_buf_size)))
TEST_ERROR;
if (H5Pencode2(dcpl, plist_buf, &plist_buf_size, fapl) < 0)
TEST_ERROR;
@@ -481,7 +480,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, hid_t *ex
TEST_ERROR;
/* Free plist_buf */
- HDfree(plist_buf);
+ free(plist_buf);
plist_buf = NULL;
}
else {
@@ -513,7 +512,7 @@ error:
}
H5E_END_TRY;
if (plist_buf)
- HDfree(plist_buf);
+ free(plist_buf);
return -1;
} /* end test_api_get_ex_dcpl() */
@@ -1208,15 +1207,15 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TESTING_2_SUPPRESSED("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection");
- if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilename = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilename_map = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((vfilename = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilenamepct = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilenamepct_map = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE);
@@ -1335,7 +1334,7 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read data through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -1373,7 +1372,7 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read data directly from source dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -1409,11 +1408,11 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
dcpl = -1;
- HDfree(srcfilename);
- HDfree(srcfilename_map);
- HDfree(vfilename);
- HDfree(srcfilenamepct);
- HDfree(srcfilenamepct_map);
+ free(srcfilename);
+ free(srcfilename_map);
+ free(vfilename);
+ free(srcfilenamepct);
+ free(srcfilenamepct_map);
PASSED_SUPPRESSED();
return 0;
@@ -1440,11 +1439,11 @@ error:
if (HDsetenv("HDF5_VDS_PREFIX", "", 1) < 0)
TEST_ERROR_SUPPRESSED;
- HDfree(srcfilename);
- HDfree(srcfilename_map);
- HDfree(vfilename);
- HDfree(srcfilenamepct);
- HDfree(srcfilenamepct_map);
+ free(srcfilename);
+ free(srcfilename_map);
+ free(vfilename);
+ free(srcfilenamepct);
+ free(srcfilenamepct_map);
return 1;
} /* end test_vds_prefix */
@@ -1495,17 +1494,17 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TESTING_2_SUPPRESSED("basic virtual dataset I/O");
- if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilename = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilename_map = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((vfilename = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((vfilename2 = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((vfilename2 = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilenamepct = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilenamepct_map = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE);
@@ -1606,7 +1605,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read data through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -1635,7 +1634,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read data directly from source dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -1778,7 +1777,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read data through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -1809,7 +1808,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read data directly from source datasets */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
@@ -1872,7 +1871,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Read data through copied virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -1950,7 +1949,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Read data through copied virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -2120,7 +2119,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read data through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -2151,7 +2150,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read data directly from source datasets */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
offset[1] = -3;
if (H5Soffset_simple(vspace[0], offset) < 0)
TEST_ERROR_SUPPRESSED;
@@ -2305,7 +2304,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read first source dataset through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -2316,7 +2315,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Read second source dataset through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[1], vspace[1], H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -2356,7 +2355,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Read data directly from source datasets */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
@@ -2539,7 +2538,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset by hyperslab */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Read first slice */
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
@@ -2619,7 +2618,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data directly from source datasets */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Read first dataset */
if (H5Dread(srcdset[0], H5T_NATIVE_INT, srcspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
@@ -2844,7 +2843,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset by hyperslab */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Read first stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
@@ -2915,7 +2914,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data directly from source datasets */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Read first dataset */
if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
@@ -3170,7 +3169,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -3182,7 +3181,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset by hyperslab */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select stripe */
start[0] = 0;
@@ -3201,7 +3200,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Update erbuf */
- HDmemset(erbuf, 0, sizeof(erbuf));
+ memset(erbuf, 0, sizeof(erbuf));
for (i = 0; i < 9; i++)
for (j = 0; j < 3; j++)
erbuf[i][j] = fill;
@@ -3223,7 +3222,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select stripe */
start[0] = 0;
@@ -3277,7 +3276,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select stripe */
start[0] = 0;
@@ -3402,7 +3401,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Update erbuf */
- HDmemset(erbuf, 0, sizeof(erbuf));
+ memset(erbuf, 0, sizeof(erbuf));
erbuf[0][0] = buf[0][0];
erbuf[0][1] = buf[0][1];
erbuf[0][8] = buf[0][2];
@@ -3553,7 +3552,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Read dataset */
if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
@@ -3686,7 +3685,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Reset erbuf */
- HDmemset(erbuf[0], 0, sizeof(rbuf));
+ memset(erbuf[0], 0, sizeof(rbuf));
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -3786,7 +3785,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Read data through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -3919,7 +3918,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Reset erbuf */
- HDmemset(erbuf[0], 0, sizeof(rbuf));
+ memset(erbuf[0], 0, sizeof(rbuf));
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -4043,7 +4042,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Read data through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -4180,7 +4179,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Initialize erbuf */
- HDmemset(erbuf[0], 0, sizeof(rbuf));
+ memset(erbuf[0], 0, sizeof(rbuf));
for (i = 0; i < 10; i++)
for (j = 0; j < 24; j += 6) {
erbuf[i][j] = -1;
@@ -4295,7 +4294,7 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Read data through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR_SUPPRESSED;
@@ -4341,12 +4340,12 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
dcpl = -1;
- HDfree(srcfilename);
- HDfree(srcfilename_map);
- HDfree(vfilename);
- HDfree(vfilename2);
- HDfree(srcfilenamepct);
- HDfree(srcfilenamepct_map);
+ free(srcfilename);
+ free(srcfilename_map);
+ free(vfilename);
+ free(vfilename2);
+ free(srcfilenamepct);
+ free(srcfilenamepct_map);
PASSED_SUPPRESSED();
return 0;
@@ -4370,12 +4369,12 @@ error:
}
H5E_END_TRY;
- HDfree(srcfilename);
- HDfree(srcfilename_map);
- HDfree(vfilename);
- HDfree(vfilename2);
- HDfree(srcfilenamepct);
- HDfree(srcfilenamepct_map);
+ free(srcfilename);
+ free(srcfilename_map);
+ free(vfilename);
+ free(vfilename2);
+ free(srcfilenamepct);
+ free(srcfilenamepct_map);
return 1;
} /* end test_basic_io() */
@@ -4615,7 +4614,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -4691,7 +4690,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
@@ -4797,7 +4796,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[1] = 0;
@@ -4867,7 +4866,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[1] = 0;
@@ -4981,7 +4980,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[1] = 0;
@@ -4999,7 +4998,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Now just read middle 2 rows */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
start[0] = 4;
count[0] = 2;
count[1] = 20;
@@ -5035,7 +5034,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -5061,7 +5060,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -5091,7 +5090,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -5157,7 +5156,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -5196,7 +5195,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[1] = 0;
@@ -5226,7 +5225,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -5256,7 +5255,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -5483,7 +5482,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -5546,7 +5545,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
@@ -5657,7 +5656,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -5725,7 +5724,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -5838,7 +5837,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -5855,7 +5854,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
/* Now just read middle 2 rows */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
start[0] = 4;
count[0] = 2;
count[1] = 20;
@@ -5924,7 +5923,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -6204,7 +6203,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -6267,7 +6266,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
@@ -6372,7 +6371,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -6443,7 +6442,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -6559,7 +6558,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -6622,7 +6621,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -6736,7 +6735,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -6795,7 +6794,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -6817,7 +6816,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
}
/* Now just read middle 2 rows */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
start[0] = 4;
count[0] = 2;
count[1] = 19;
@@ -7052,7 +7051,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -7117,7 +7116,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
@@ -7222,7 +7221,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -7287,7 +7286,7 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -7436,21 +7435,21 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TESTING_2_SUPPRESSED("virtual dataset I/O with printf source");
- if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilename = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilename_map = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilename2 = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilename2 = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilename2_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilename2_map = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((vfilename = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((printf_srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((printf_srcfilename_map = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilenamepct = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
- if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ if ((srcfilenamepct_map = (char *)calloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
TEST_ERROR_SUPPRESSED;
h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE);
@@ -7679,7 +7678,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -7775,7 +7774,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -7801,7 +7800,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
for (start[1] = (hsize_t)0; start[1] < (hsize_t)5; start[1]++)
for (count[1] = (hsize_t)1; count[1] < (hsize_t)11; count[1]++) {
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
@@ -8187,7 +8186,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -8262,7 +8261,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -8331,7 +8330,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -8400,7 +8399,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -8469,7 +8468,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -8532,7 +8531,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -8755,7 +8754,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -8852,7 +8851,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -9065,7 +9064,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -9162,7 +9161,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -9431,7 +9430,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -9530,7 +9529,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -9594,7 +9593,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -9693,7 +9692,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -9757,7 +9756,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -9821,7 +9820,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10112,7 +10111,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10176,7 +10175,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10279,7 +10278,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10342,7 +10341,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10442,7 +10441,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10479,7 +10478,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10508,7 +10507,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10536,7 +10535,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10600,7 +10599,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10637,7 +10636,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10666,7 +10665,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10694,7 +10693,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10933,7 +10932,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -10996,7 +10995,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
@@ -11059,14 +11058,14 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
TEST_ERROR_SUPPRESSED;
memspace = -1;
- HDfree(srcfilename);
- HDfree(srcfilename_map);
- HDfree(srcfilename2);
- HDfree(srcfilename2_map);
- HDfree(vfilename);
- HDfree(printf_srcfilename_map);
- HDfree(srcfilenamepct);
- HDfree(srcfilenamepct_map);
+ free(srcfilename);
+ free(srcfilename_map);
+ free(srcfilename2);
+ free(srcfilename2_map);
+ free(vfilename);
+ free(printf_srcfilename_map);
+ free(srcfilenamepct);
+ free(srcfilenamepct_map);
PASSED_SUPPRESSED();
return 0;
@@ -11090,14 +11089,14 @@ error:
}
H5E_END_TRY;
- HDfree(srcfilename);
- HDfree(srcfilename_map);
- HDfree(srcfilename2);
- HDfree(srcfilename2_map);
- HDfree(vfilename);
- HDfree(printf_srcfilename_map);
- HDfree(srcfilenamepct);
- HDfree(srcfilenamepct_map);
+ free(srcfilename);
+ free(srcfilename_map);
+ free(srcfilename2);
+ free(srcfilename2_map);
+ free(vfilename);
+ free(printf_srcfilename_map);
+ free(srcfilenamepct);
+ free(srcfilenamepct_map);
return 1;
} /* end test_printf() */
@@ -11387,7 +11386,7 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -11495,7 +11494,7 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -11600,7 +11599,7 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -11717,7 +11716,7 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -11822,7 +11821,7 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -11940,7 +11939,7 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -12045,7 +12044,7 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
/* Read data through virtual dataset */
/* Reset rbuf */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
/* Select hyperslab in memory space */
start[0] = 0;
@@ -12326,7 +12325,7 @@ main(void)
*/
if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
HDputs(" -- SKIPPED for incompatible VFD --");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -12437,13 +12436,13 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All virtual dataset tests passed.\n");
+ printf("All virtual dataset tests passed.\n");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;
error:
nerrors = MAX(1, nerrors);
- HDprintf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/vds_env.c b/test/vds_env.c
index 74b3caa..caf5ffa 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -69,17 +69,17 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
TESTING("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection with ENV prefix");
- if (NULL == (srcfilename = HDmalloc(FILENAME_BUF_SIZE)))
+ if (NULL == (srcfilename = malloc(FILENAME_BUF_SIZE)))
TEST_ERROR;
- if (NULL == (srcfilename_map = HDmalloc(FILENAME_BUF_SIZE)))
+ if (NULL == (srcfilename_map = malloc(FILENAME_BUF_SIZE)))
TEST_ERROR;
- if (NULL == (vfilename = HDmalloc(FILENAME_BUF_SIZE)))
+ if (NULL == (vfilename = malloc(FILENAME_BUF_SIZE)))
TEST_ERROR;
- if (NULL == (vfilename2 = HDmalloc(FILENAME_BUF_SIZE)))
+ if (NULL == (vfilename2 = malloc(FILENAME_BUF_SIZE)))
TEST_ERROR;
- if (NULL == (srcfilenamepct = HDmalloc(FILENAME_BUF_SIZE)))
+ if (NULL == (srcfilenamepct = malloc(FILENAME_BUF_SIZE)))
TEST_ERROR;
- if (NULL == (srcfilenamepct_map = HDmalloc(FILENAME_BUF_SIZE)))
+ if (NULL == (srcfilenamepct_map = malloc(FILENAME_BUF_SIZE)))
TEST_ERROR;
h5_fixname(FILENAME[0], fapl, vfilename, FILENAME_BUF_SIZE);
@@ -199,7 +199,7 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
}
/* Read data through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR;
@@ -237,7 +237,7 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
}
/* Read data directly from source dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
+ memset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR;
@@ -273,23 +273,23 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
TEST_ERROR;
dcpl = -1;
- HDfree(srcfilenamepct_map);
- HDfree(srcfilenamepct);
- HDfree(vfilename2);
- HDfree(vfilename);
- HDfree(srcfilename_map);
- HDfree(srcfilename);
+ free(srcfilenamepct_map);
+ free(srcfilenamepct);
+ free(vfilename2);
+ free(vfilename);
+ free(srcfilename_map);
+ free(srcfilename);
PASSED();
return 0;
error:
- HDfree(srcfilenamepct_map);
- HDfree(srcfilenamepct);
- HDfree(vfilename2);
- HDfree(vfilename);
- HDfree(srcfilename_map);
- HDfree(srcfilename);
+ free(srcfilenamepct_map);
+ free(srcfilenamepct);
+ free(vfilename2);
+ free(vfilename);
+ free(srcfilename_map);
+ free(srcfilename);
H5E_BEGIN_TRY
{
@@ -348,7 +348,7 @@ main(void)
*/
if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
HDputs(" -- SKIPPED for incompatible VFD --");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/* Set to use the latest file format */
@@ -383,9 +383,9 @@ main(void)
HDputs(msg);
for (bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
- HDprintf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
- bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file",
- bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "");
+ printf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
+ bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file",
+ bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "");
nerrors += test_vds_prefix_second(bit_config, fapl);
}
@@ -400,13 +400,13 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All virtual dataset tests passed.\n");
+ printf("All virtual dataset tests passed.\n");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;
error:
nerrors = MAX(1, nerrors);
- HDprintf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index 5752d02..f6e9ddd 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -47,7 +47,7 @@ main(void)
TEST_ERROR;
n_elements = (int)(VDS_PLANE[1] * VDS_PLANE[2]);
size = (size_t)n_elements * sizeof(int);
- if (NULL == (buffer = (int *)HDmalloc(size)))
+ if (NULL == (buffer = (int *)malloc(size)))
TEST_ERROR;
/* Create memory dataspace */
@@ -117,9 +117,9 @@ main(void)
if (H5Fclose(fid) < 0)
TEST_ERROR;
- HDfree(buffer);
+ free(buffer);
- HDfprintf(stderr, "SWMR reader exited successfully\n");
+ fprintf(stderr, "SWMR reader exited successfully\n");
return EXIT_SUCCESS;
error:
@@ -139,9 +139,9 @@ error:
}
H5E_END_TRY
- HDfree(buffer);
+ free(buffer);
- HDfprintf(stderr, "ERROR: SWMR reader exited with errors\n");
+ fprintf(stderr, "ERROR: SWMR reader exited with errors\n");
return EXIT_FAILURE;
} /* end main */
diff --git a/test/vds_swmr_writer.c b/test/vds_swmr_writer.c
index 33f2a86..d5fa74b 100644
--- a/test/vds_swmr_writer.c
+++ b/test/vds_swmr_writer.c
@@ -43,11 +43,11 @@ main(int argc, char *argv[])
* This is an integer index into the FILE_NAMES array.
*/
if (argc != 2) {
- HDfprintf(stderr, "ERROR: Must pass the source file number on the command line.\n");
+ fprintf(stderr, "ERROR: Must pass the source file number on the command line.\n");
return EXIT_FAILURE;
}
- file_number = HDatoi(argv[1]);
+ file_number = atoi(argv[1]);
if (file_number < 0 || file_number >= N_SOURCES)
TEST_ERROR;
@@ -64,7 +64,7 @@ main(int argc, char *argv[])
/* Create a data buffer that represents a plane */
n_elements = PLANES[file_number][1] * PLANES[file_number][2];
- if (NULL == (buffer = (int *)HDmalloc(n_elements * sizeof(int))))
+ if (NULL == (buffer = (int *)malloc(n_elements * sizeof(int))))
TEST_ERROR;
/* Create the memory dataspace */
@@ -132,9 +132,9 @@ main(int argc, char *argv[])
TEST_ERROR;
if (H5Fclose(fid) < 0)
TEST_ERROR;
- HDfree(buffer);
+ free(buffer);
- HDfprintf(stderr, "SWMR writer exited successfully\n");
+ fprintf(stderr, "SWMR writer exited successfully\n");
return EXIT_SUCCESS;
error:
@@ -152,11 +152,11 @@ error:
if (fsid >= 0)
(void)H5Sclose(fsid);
if (buffer != NULL)
- HDfree(buffer);
+ free(buffer);
}
H5E_END_TRY
- HDfprintf(stderr, "ERROR: SWMR writer exited with errors\n");
+ fprintf(stderr, "ERROR: SWMR writer exited with errors\n");
return EXIT_FAILURE;
} /* end main */
diff --git a/test/vfd.c b/test/vfd.c
index 4a5351b..be9c55a 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -80,9 +80,9 @@ static int __k;
#define HEXPRINT(size, buf) \
for (__k = 0; __k < (size); __k++) { \
if (__k % 16 == 0) { \
- HDprintf("\n%04x", __k); \
+ printf("\n%04x", __k); \
} \
- HDprintf((__k % 4 == 0) ? " %02X" : " %02X", (unsigned char)(buf)[__k]); \
+ printf((__k % 4 == 0) ? " %02X" : " %02X", (unsigned char)(buf)[__k]); \
} /* end #define HEXPRINT() */
/* Macro SET_SIZE()
@@ -102,7 +102,7 @@ static int __k;
\
if ((sizes_array)[idx] == 0) { \
\
- HDassert((idx) > 0); \
+ assert((idx) > 0); \
(bool_size_fixed) = TRUE; \
} \
else { \
@@ -129,7 +129,7 @@ static int __k;
\
if ((types_array)[idx] == H5FD_MEM_NOLIST) { \
\
- HDassert((idx) > 0); \
+ assert((idx) > 0); \
(bool_type_fixed) = TRUE; \
} \
else { \
@@ -485,9 +485,9 @@ test_core(void)
TEST_ERROR;
/* Allocate memory for data set. */
- if (NULL == (data_w = (int *)HDmalloc(DSET1_DIM1 * DSET1_DIM2 * sizeof(int))))
+ if (NULL == (data_w = (int *)malloc(DSET1_DIM1 * DSET1_DIM2 * sizeof(int))))
FAIL_PUTS_ERROR("unable to allocate memory for input array");
- if (NULL == (data_r = (int *)HDmalloc(DSET1_DIM1 * DSET1_DIM2 * sizeof(int))))
+ if (NULL == (data_r = (int *)malloc(DSET1_DIM1 * DSET1_DIM2 * sizeof(int))))
FAIL_PUTS_ERROR("unable to allocate memory for output array");
/* Initialize the buffers */
@@ -496,7 +496,7 @@ test_core(void)
for (i = 0; i < CORE_DSET_DIM1; i++)
for (j = 0; j < CORE_DSET_DIM2; j++)
*pw++ = val++;
- HDmemset(data_r, 0, DSET1_DIM1 * DSET1_DIM2 * sizeof(int));
+ memset(data_r, 0, DSET1_DIM1 * DSET1_DIM2 * sizeof(int));
/* Create the dataspace */
dims[0] = CORE_DSET_DIM1;
@@ -530,8 +530,8 @@ test_core(void)
for (j = 0; j < CORE_DSET_DIM2; j++)
if (*pr++ != *pw++) {
H5_FAILED();
- HDprintf(" Read different values than written in data set.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written in data set.\n");
+ printf(" At index %d,%d\n", i, j);
TEST_ERROR;
} /* end if */
@@ -587,7 +587,7 @@ test_core(void)
TEST_ERROR;
/* Read the data back from the dataset */
- HDmemset(data_r, 0, DSET1_DIM1 * DSET1_DIM2 * sizeof(int));
+ memset(data_r, 0, DSET1_DIM1 * DSET1_DIM2 * sizeof(int));
if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data_r) < 0)
TEST_ERROR;
@@ -598,8 +598,8 @@ test_core(void)
for (j = 0; j < CORE_DSET_DIM2; j++)
if (*pw++ != *pr++) {
H5_FAILED();
- HDprintf(" Read different values than written in data set.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written in data set.\n");
+ printf(" At index %d,%d\n", i, j);
TEST_ERROR;
} /* end if */
@@ -620,8 +620,8 @@ test_core(void)
if (H5Dclose(did) < 0)
TEST_ERROR;
- HDfree(data_w);
- HDfree(data_r);
+ free(data_w);
+ free(data_r);
/* Close and delete the file */
if (H5Fclose(fid) < 0)
@@ -679,9 +679,9 @@ error:
H5E_END_TRY;
if (data_w)
- HDfree(data_w);
+ free(data_w);
if (data_r)
- HDfree(data_r);
+ free(data_r);
return -1;
} /* end test_core() */
@@ -751,7 +751,7 @@ test_direct(void)
if (file < 0) {
H5Pclose(fapl);
SKIPPED();
- HDprintf(" Probably the file system doesn't support Direct I/O\n");
+ printf(" Probably the file system doesn't support Direct I/O\n");
return 0;
}
@@ -831,8 +831,8 @@ test_direct(void)
for (j = 0; j < DSET1_DIM2; j++)
if (*p1++ != *p2++) {
H5_FAILED();
- HDprintf(" Read different values than written in data set 1.\n");
- HDprintf(" At index %d,%d\n", i, j);
+ printf(" Read different values than written in data set 1.\n");
+ printf(" At index %d,%d\n", i, j);
TEST_ERROR;
} /* end if */
@@ -864,8 +864,8 @@ test_direct(void)
for (i = 0; i < DSET2_DIM; i++)
if (wdata2[i] != rdata2[i]) {
H5_FAILED();
- HDprintf(" Read different values than written in data set 2.\n");
- HDprintf(" At index %d\n", i);
+ printf(" Read different values than written in data set 2.\n");
+ printf(" At index %d\n", i);
TEST_ERROR;
} /* end if */
@@ -878,8 +878,8 @@ test_direct(void)
if (H5Dclose(dset2) < 0)
TEST_ERROR;
- HDfree(points);
- HDfree(check);
+ free(points);
+ free(check);
/* Close and delete the file */
if (H5Fclose(file) < 0)
@@ -906,9 +906,9 @@ error:
H5E_END_TRY;
if (proto_points)
- HDfree(proto_points);
+ free(proto_points);
if (proto_check)
- HDfree(proto_check);
+ free(proto_check);
return -1;
#endif /*H5_HAVE_DIRECT*/
@@ -1032,9 +1032,9 @@ test_family(void)
TESTING("FAMILY file driver");
/* Set up data array */
- if (NULL == (buf_data = (int *)HDcalloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int))))
+ if (NULL == (buf_data = (int *)calloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int))))
TEST_ERROR;
- if (NULL == (buf = (int **)HDcalloc(FAMILY_NUMBER, sizeof(buf_data))))
+ if (NULL == (buf = (int **)calloc(FAMILY_NUMBER, sizeof(buf_data))))
TEST_ERROR;
for (i = 0; i < FAMILY_NUMBER; i++)
buf[i] = buf_data + (i * FAMILY_SIZE);
@@ -1178,8 +1178,8 @@ test_family(void)
if (H5Pclose(fapl) < 0)
TEST_ERROR;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
PASSED();
return SUCCEED;
@@ -1195,8 +1195,8 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
return FAIL;
} /* end test_family() */
@@ -1344,9 +1344,9 @@ test_family_member_fapl(void)
TESTING("Family member FAPL");
/* Set up data array */
- if (NULL == (buf_data = (int *)HDcalloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int))))
+ if (NULL == (buf_data = (int *)calloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int))))
TEST_ERROR;
- if (NULL == (buf = (int **)HDcalloc(FAMILY_NUMBER, sizeof(buf_data))))
+ if (NULL == (buf = (int **)calloc(FAMILY_NUMBER, sizeof(buf_data))))
TEST_ERROR;
for (i = 0; i < FAMILY_NUMBER; i++)
buf[i] = buf_data + (i * FAMILY_SIZE);
@@ -1409,8 +1409,8 @@ test_family_member_fapl(void)
if (H5Pclose(fapl_id) == FAIL)
TEST_ERROR;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
PASSED();
return SUCCEED;
@@ -1426,8 +1426,8 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
return FAIL;
} /* end test_family_member_fapl() */
@@ -1512,9 +1512,9 @@ test_multi(void)
TESTING("MULTI file driver");
/* Set up data array */
- if (NULL == (buf_data = (int *)HDcalloc(MULTI_SIZE * MULTI_SIZE, sizeof(int))))
+ if (NULL == (buf_data = (int *)calloc(MULTI_SIZE * MULTI_SIZE, sizeof(int))))
TEST_ERROR;
- if (NULL == (buf = (int **)HDcalloc(MULTI_SIZE, sizeof(buf_data))))
+ if (NULL == (buf = (int **)calloc(MULTI_SIZE, sizeof(buf_data))))
TEST_ERROR;
for (i = 0; i < MULTI_SIZE; i++)
buf[i] = buf_data + (i * MULTI_SIZE);
@@ -1523,11 +1523,11 @@ test_multi(void)
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- HDmemset(memb_map, 0, sizeof(memb_map));
- HDmemset(memb_fapl, 0, sizeof(memb_fapl));
- HDmemset(memb_name, 0, sizeof(memb_name));
- HDmemset(memb_addr, 0, sizeof(memb_addr));
- HDmemset(sv, 0, sizeof(sv));
+ memset(memb_map, 0, sizeof(memb_map));
+ memset(memb_fapl, 0, sizeof(memb_fapl));
+ memset(memb_name, 0, sizeof(memb_name));
+ memset(memb_addr, 0, sizeof(memb_addr));
+ memset(sv, 0, sizeof(sv));
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
@@ -1699,8 +1699,8 @@ test_multi(void)
if (H5Pclose(fapl) < 0)
TEST_ERROR;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
PASSED();
@@ -1718,8 +1718,8 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
return FAIL;
} /* end test_multi() */
@@ -1764,9 +1764,9 @@ test_multi_compat(void)
TESTING("MULTI file driver backward compatibility");
/* Set up data array */
- if (NULL == (buf_data = (int *)HDcalloc(MULTI_SIZE * MULTI_SIZE, sizeof(int))))
+ if (NULL == (buf_data = (int *)calloc(MULTI_SIZE * MULTI_SIZE, sizeof(int))))
TEST_ERROR;
- if (NULL == (buf = (int **)HDcalloc(MULTI_SIZE, sizeof(buf_data))))
+ if (NULL == (buf = (int **)calloc(MULTI_SIZE, sizeof(buf_data))))
TEST_ERROR;
for (i = 0; i < MULTI_SIZE; i++)
buf[i] = buf_data + (i * MULTI_SIZE);
@@ -1775,11 +1775,11 @@ test_multi_compat(void)
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- HDmemset(memb_map, 0, sizeof memb_map);
- HDmemset(memb_fapl, 0, sizeof memb_fapl);
- HDmemset(memb_name, 0, sizeof memb_name);
- HDmemset(memb_addr, 0, sizeof memb_addr);
- HDmemset(sv, 0, sizeof sv);
+ memset(memb_map, 0, sizeof memb_map);
+ memset(memb_fapl, 0, sizeof memb_fapl);
+ memset(memb_name, 0, sizeof memb_name);
+ memset(memb_addr, 0, sizeof memb_addr);
+ memset(sv, 0, sizeof sv);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
memb_map[mt] = H5FD_MEM_SUPER;
@@ -1893,8 +1893,8 @@ test_multi_compat(void)
if (H5Pclose(fapl) < 0)
TEST_ERROR;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
PASSED();
@@ -1910,8 +1910,8 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
return FAIL;
} /* end test_multi_compat() */
@@ -2384,9 +2384,9 @@ error:
{ \
H5_FAILED(); \
AT(); \
- HDfprintf(stderr, mesg); \
+ fprintf(stderr, mesg); \
H5Eprint2(H5E_DEFAULT, stderr); \
- HDfflush(stderr); \
+ fflush(stderr); \
ret_value = -1; \
goto done; \
}
@@ -2408,7 +2408,7 @@ compare_splitter_config_info(hid_t fapl_id, H5FD_splitter_vfd_config_t *info)
int ret_value = 0;
H5FD_splitter_vfd_config_t *fetched_info = NULL;
- if (NULL == (fetched_info = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ if (NULL == (fetched_info = calloc(1, sizeof(H5FD_splitter_vfd_config_t))))
SPLITTER_TEST_FAULT("memory allocation for fetched_info struct failed");
fetched_info->magic = H5FD_SPLITTER_MAGIC;
@@ -2441,14 +2441,14 @@ compare_splitter_config_info(hid_t fapl_id, H5FD_splitter_vfd_config_t *info)
}
if ((HDstrlen(info->wo_path) != HDstrlen(fetched_info->wo_path)) ||
HDstrncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX) != 0) {
- HDfprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info->wo_path);
+ fprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, fetched_info->wo_path);
SPLITTER_TEST_FAULT("Write-Only file path mismatch\n");
}
done:
- HDfree(fetched_info);
+ free(fetched_info);
return ret_value;
} /* end compare_splitter_config_info() */
@@ -2485,9 +2485,9 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err
FILE *logfile = NULL;
int ret_value = 0;
- if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ if (NULL == (vfd_config = calloc(1, sizeof(H5FD_splitter_vfd_config_t))))
SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
- if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ if (NULL == (filename_rw = calloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
vfd_config->magic = H5FD_SPLITTER_MAGIC;
@@ -2598,7 +2598,7 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err
}
/* Verify existence of logfile if appropriate */
- logfile = HDfopen(vfd_config->log_file_path, "r");
+ logfile = fopen(vfd_config->log_file_path, "r");
if ((TRUE == provide_logfile_path && NULL == logfile) ||
(FALSE == provide_logfile_path && NULL != logfile)) {
SPLITTER_TEST_FAULT("no logfile when one was expected\n");
@@ -2621,8 +2621,8 @@ done:
if (logfile != NULL)
HDfclose(logfile);
- HDfree(vfd_config);
- HDfree(filename_rw);
+ free(vfd_config);
+ free(filename_rw);
return ret_value;
} /* end run_splitter_test() */
@@ -2650,7 +2650,7 @@ driver_is_splitter_compatible(hid_t fapl_id)
herr_t ret = SUCCEED;
int ret_value = 0;
- if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
+ if (NULL == (vfd_config = calloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
FAIL_PUTS_ERROR("memory allocation for vfd_config struct failed");
}
@@ -2679,7 +2679,7 @@ driver_is_splitter_compatible(hid_t fapl_id)
}
split_fapl_id = H5I_INVALID_HID;
- HDfree(vfd_config);
+ free(vfd_config);
return ret_value;
@@ -2690,7 +2690,7 @@ error:
}
H5E_END_TRY;
- HDfree(vfd_config);
+ free(vfd_config);
return -1;
} /* end driver_is_splitter_compatible() */
@@ -2717,9 +2717,9 @@ splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id)
hid_t file_id = H5I_INVALID_HID;
int ret_value = 0;
- if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ if (NULL == (vfd_config = calloc(1, sizeof(H5FD_splitter_vfd_config_t))))
SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
- if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ if (NULL == (filename_rw = calloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
vfd_config->magic = H5FD_SPLITTER_MAGIC;
@@ -2826,8 +2826,8 @@ done:
H5E_END_TRY;
}
- HDfree(vfd_config);
- HDfree(filename_rw);
+ free(vfd_config);
+ free(filename_rw);
return ret_value;
} /* end splitter_RO_test() */
@@ -2994,7 +2994,7 @@ splitter_compare_expected_data(hid_t file_id, const struct splitter_dataset_def
if (sizeof((void *)buf) != sizeof(data->buf)) {
SPLITTER_TEST_FAULT("invariant size of expected data does not match that received!\n");
}
- HDmemcpy(expected, data->buf, sizeof(expected));
+ memcpy(expected, data->buf, sizeof(expected));
dset_id = H5Dopen2(file_id, data->dset_name, H5P_DEFAULT);
if (dset_id < 0) {
@@ -3066,9 +3066,9 @@ splitter_tentative_open_test(hid_t child_fapl_id)
struct splitter_dataset_def data; /* for comparison */
int ret_value = 0;
- if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ if (NULL == (vfd_config = calloc(1, sizeof(H5FD_splitter_vfd_config_t))))
SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
- if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ if (NULL == (filename_rw = calloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
/* pre-fill data buffer to write */
@@ -3317,8 +3317,8 @@ done:
H5E_END_TRY;
}
- HDfree(vfd_config);
- HDfree(filename_rw);
+ free(vfd_config);
+ free(filename_rw);
return ret_value;
} /* end splitter_tentative_open_test() */
@@ -3415,7 +3415,7 @@ test_splitter(void)
if (!driver_is_splitter_compatible(child_fapl_id)) {
SKIPPED();
- HDprintf(" given driver is not Splitter W/O compatible.\n");
+ printf(" given driver is not Splitter W/O compatible.\n");
return 0;
}
@@ -3500,8 +3500,8 @@ setup_rand(void)
seed = predefined_seed;
- HDfprintf(stdout, "\n%s: predefined_seed = %d.\n\n", __func__, seed);
- HDfflush(stdout);
+ fprintf(stdout, "\n%s: predefined_seed = %d.\n\n", __func__, seed);
+ fflush(stdout);
HDsrand(seed);
}
@@ -3509,15 +3509,15 @@ setup_rand(void)
if (HDgettimeofday(&tv, NULL) != 0) {
- HDfprintf(stdout, "\n%s: gettimeofday() failed -- srand() not called.\n\n", __func__);
- HDfflush(stdout);
+ fprintf(stdout, "\n%s: gettimeofday() failed -- srand() not called.\n\n", __func__);
+ fflush(stdout);
}
else {
seed = (unsigned)tv.tv_usec;
- HDfprintf(stdout, "\n%s: seed = %d.\n\n", __func__, seed);
- HDfflush(stdout);
+ fprintf(stdout, "\n%s: seed = %d.\n\n", __func__, seed);
+ fflush(stdout);
HDsrand(seed);
}
@@ -3534,12 +3534,12 @@ static H5FD_t *
H5FD__ctl_test_vfd_open(const char H5_ATTR_UNUSED *name, unsigned H5_ATTR_UNUSED flags,
hid_t H5_ATTR_UNUSED fapl_id, haddr_t H5_ATTR_UNUSED maxaddr)
{
- return HDcalloc(1, sizeof(H5FD_t));
+ return calloc(1, sizeof(H5FD_t));
}
static herr_t
H5FD__ctl_test_vfd_close(H5FD_t H5_ATTR_UNUSED *_file)
{
- HDfree(_file);
+ free(_file);
return SUCCEED;
}
static haddr_t
@@ -3847,7 +3847,7 @@ test_ctl(void)
PASSED();
/* Set up splitter VFD config */
- if (NULL == (splitter_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ if (NULL == (splitter_config = calloc(1, sizeof(H5FD_splitter_vfd_config_t))))
TEST_ERROR;
splitter_config->magic = H5FD_SPLITTER_MAGIC;
@@ -3999,7 +3999,7 @@ test_ctl(void)
TESTING_2("test cleanup");
- HDfree(splitter_config);
+ free(splitter_config);
if (H5FDunregister(driver_id) < 0)
TEST_ERROR;
@@ -4016,7 +4016,7 @@ error:
H5E_BEGIN_TRY
{
if (splitter_config)
- HDfree(splitter_config);
+ free(splitter_config);
H5FDunregister(driver_id);
H5Pclose(sub_fapl_id);
H5Pclose(fapl_id);
@@ -4074,12 +4074,12 @@ test_vector_io__setup_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], siz
sizes[i] = (size_t)((rand() & 1023) + 1);
- temp_buf = HDmalloc(sizes[i] + 1);
- read_bufs[i] = HDmalloc(sizes[i] + 1);
+ temp_buf = malloc(sizes[i] + 1);
+ read_bufs[i] = malloc(sizes[i] + 1);
if ((NULL == temp_buf) || (NULL == read_bufs[i])) {
- HDfprintf(stderr, "%s: can't malloc read / write bufs.\n", __func__);
+ fprintf(stderr, "%s: can't malloc read / write bufs.\n", __func__);
result = FALSE;
break;
}
@@ -4101,7 +4101,7 @@ test_vector_io__setup_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], siz
if (!result) { /* free buffers */
- HDfree(temp_buf);
+ free(temp_buf);
for (i = 0; i < count; i++) {
@@ -4113,7 +4113,7 @@ test_vector_io__setup_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], siz
if (read_bufs[i]) {
- HDfree(read_bufs[i]);
+ free(read_bufs[i]);
read_bufs[i] = NULL;
}
}
@@ -4182,7 +4182,7 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a
*/
fix_point = ((uint32_t)rand() & (count - 1)) / 2;
- HDassert(fix_point < count / 2);
+ assert(fix_point < count / 2);
for (i = 0; i < count; i++) {
@@ -4194,8 +4194,8 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a
sizes[i] = (size_t)((rand() & 1023) + 1);
- temp_buf = HDmalloc(sizes[i] + 1);
- read_bufs[i] = HDmalloc(sizes[i] + 1);
+ temp_buf = malloc(sizes[i] + 1);
+ read_bufs[i] = malloc(sizes[i] + 1);
}
else {
@@ -4210,13 +4210,13 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a
addrs[i] = HADDR_UNDEF;
- temp_buf = HDmalloc(sizes[fix_point] + 1);
- read_bufs[i] = HDmalloc(sizes[fix_point] + 1);
+ temp_buf = malloc(sizes[fix_point] + 1);
+ read_bufs[i] = malloc(sizes[fix_point] + 1);
}
if ((NULL == temp_buf) || (NULL == read_bufs[i])) {
- HDfprintf(stderr, "%s: can't malloc read / write bufs.\n", __func__);
+ fprintf(stderr, "%s: can't malloc read / write bufs.\n", __func__);
result = FALSE;
break;
}
@@ -4241,7 +4241,7 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a
if (!result) { /* free buffers */
- HDfree(temp_buf);
+ free(temp_buf);
for (i = 0; i < count; i++) {
@@ -4253,7 +4253,7 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a
if (read_bufs[i]) {
- HDfree(read_bufs[i]);
+ free(read_bufs[i]);
read_bufs[i] = NULL;
}
}
@@ -4303,7 +4303,7 @@ test_vector_io__read_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], had
if (verbose) {
- HDfprintf(stdout, "%s: H5FDread() failed on entry %d.\n", __func__, i);
+ fprintf(stdout, "%s: H5FDread() failed on entry %d.\n", __func__, i);
}
result = FALSE;
break;
@@ -4354,7 +4354,7 @@ test_vector_io__write_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], ha
if (verbose) {
- HDfprintf(stdout, "%s: HDwrite() failed on entry %d.\n", __func__, i);
+ fprintf(stdout, "%s: HDwrite() failed on entry %d.\n", __func__, i);
}
result = FALSE;
break;
@@ -4418,10 +4418,10 @@ test_vector_io__verify_v(uint32_t count, H5FD_mem_t types[], size_t sizes[], con
if (verbose) {
- HDfprintf(stdout, "\n\nread/write buf mismatch in vector/entry");
- HDfprintf(stdout, "\"%s\"/%u at offset %llu/%llu w/r = %c/%c type = %s\n\n", name,
- (unsigned)i, (long long unsigned)j, (long long unsigned)size, w_buf[j],
- r_buf[j], mem_type_names[type]);
+ fprintf(stdout, "\n\nread/write buf mismatch in vector/entry");
+ fprintf(stdout, "\"%s\"/%u at offset %llu/%llu w/r = %c/%c type = %s\n\n", name,
+ (unsigned)i, (long long unsigned)j, (long long unsigned)size, w_buf[j], r_buf[j],
+ mem_type_names[type]);
}
}
j++;
@@ -4465,7 +4465,7 @@ test_vector_io__dump_test_vectors(uint32_t count, H5FD_mem_t types[], haddr_t ad
const char *w_buf;
char *r_buf;
- HDfprintf(stdout, "\n\nDumping test vector \"%s\" of length %d\n\n", name, count);
+ fprintf(stdout, "\n\nDumping test vector \"%s\" of length %d\n\n", name, count);
for (i = 0; i < count; i++) {
@@ -4473,7 +4473,7 @@ test_vector_io__dump_test_vectors(uint32_t count, H5FD_mem_t types[], haddr_t ad
SET_TYPE(type_fixed, types, type, i);
- HDassert((H5FD_MEM_DEFAULT <= type) && (type <= H5FD_MEM_OHDR));
+ assert((H5FD_MEM_DEFAULT <= type) && (type <= H5FD_MEM_OHDR));
w_buf = (const char *)(write_bufs[i]);
@@ -4486,12 +4486,12 @@ test_vector_io__dump_test_vectors(uint32_t count, H5FD_mem_t types[], haddr_t ad
r_buf = NULL;
}
- HDfprintf(stdout, "%u: addr/len = %llu/%llu, type = %s, w_buf = \"%s\"\n", (unsigned)i,
- (long long unsigned)(addrs[i]), (long long unsigned)(size), mem_type_names[type], w_buf);
+ fprintf(stdout, "%u: addr/len = %llu/%llu, type = %s, w_buf = \"%s\"\n", (unsigned)i,
+ (long long unsigned)(addrs[i]), (long long unsigned)(size), mem_type_names[type], w_buf);
if (r_buf) {
- HDfprintf(stdout, " r_buf = \"%s\"\n", r_buf);
+ fprintf(stdout, " r_buf = \"%s\"\n", r_buf);
}
}
@@ -4607,7 +4607,7 @@ test_vector_io(const char *vfd_name)
}
else {
- HDfprintf(stdout, "un-supported VFD\n");
+ fprintf(stdout, "un-supported VFD\n");
TEST_ERROR;
}
@@ -4908,13 +4908,13 @@ test_vector_io(const char *vfd_name)
h5_free_const(write_bufs_2[i]);
write_bufs_2[i] = NULL;
- HDfree(read_bufs_0[i]);
+ free(read_bufs_0[i]);
read_bufs_0[i] = NULL;
- HDfree(read_bufs_1[i]);
+ free(read_bufs_1[i]);
read_bufs_1[i] = NULL;
- HDfree(read_bufs_2[i]);
+ free(read_bufs_2[i]);
read_bufs_2[i] = NULL;
h5_free_const(f_write_bufs_0[i]);
@@ -4926,13 +4926,13 @@ test_vector_io(const char *vfd_name)
h5_free_const(f_write_bufs_2[i]);
f_write_bufs_2[i] = NULL;
- HDfree(f_read_bufs_0[i]);
+ free(f_read_bufs_0[i]);
f_read_bufs_0[i] = NULL;
- HDfree(f_read_bufs_1[i]);
+ free(f_read_bufs_1[i]);
f_read_bufs_1[i] = NULL;
- HDfree(f_read_bufs_2[i]);
+ free(f_read_bufs_2[i]);
f_read_bufs_2[i] = NULL;
}
@@ -5042,15 +5042,15 @@ test_selection_io_read_verify(H5FD_t *lf, H5FD_mem_t type, uint32_t count, hid_t
if (rbufs[i][j] != erbufs[i][j]) {
H5_FAILED();
AT();
- HDprintf("data read from file does not match expected values at mapping array location %d\n",
- i);
- HDprintf("expected data: \n");
+ printf("data read from file does not match expected values at mapping array location %d\n",
+ i);
+ printf("expected data: \n");
for (j = 0; j < SEL_IO_DIM0 * SEL_IO_DIM1; j++) {
printf("%6d", erbufs[i][j]);
if (!((j + 1) % SEL_IO_DIM1))
printf("\n");
}
- HDprintf("read data: \n");
+ printf("read data: \n");
for (j = 0; j < SEL_IO_DIM0 * SEL_IO_DIM1; j++) {
printf("%6d", rbufs[i][j]);
if (!((j + 1) % SEL_IO_DIM1))
@@ -5141,7 +5141,7 @@ test_selection_io(const char *vfd_name)
}
else {
- HDfprintf(stdout, "un-supported VFD\n");
+ fprintf(stdout, "un-supported VFD\n");
TEST_ERROR;
}
@@ -5213,7 +5213,7 @@ test_selection_io(const char *vfd_name)
* Test 3: Strided <> Contiguous 1D I/O
*/
/* SEL_IO_DIM1 must be even */
- HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
+ assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
/* Strided selection in memory */
start[0] = 1;
@@ -5262,7 +5262,7 @@ test_selection_io(const char *vfd_name)
* Test 4: Contiguous <> Strided 1D I/O
*/
/* SEL_IO_DIM1 must be even */
- HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
+ assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
/* Contiguous selection in memory */
start[0] = 1;
@@ -5311,7 +5311,7 @@ test_selection_io(const char *vfd_name)
* Test 5: Strided <> Strided 1D I/O
*/
/* SEL_IO_DIM1 must be even */
- HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
+ assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
/* Strided selection in memory */
start[0] = 1;
@@ -5467,8 +5467,8 @@ test_selection_io(const char *vfd_name)
* Test 8: Strided <> Strided 2D I/O
*/
/* SEL_IO_DIM0 and SEL_IO_DIM1 must be even */
- HDassert(SEL_IO_DIM0 / 2 == (SEL_IO_DIM0 + 1) / 2);
- HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
+ assert(SEL_IO_DIM0 / 2 == (SEL_IO_DIM0 + 1) / 2);
+ assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
/* Strided selection (across dim 1) in memory */
start[0] = 0;
@@ -5502,7 +5502,7 @@ test_selection_io(const char *vfd_name)
/* Update file buf */
for (i = 0, i2 = 1, j2 = 0; i < SEL_IO_DIM0; i++)
for (j = 1; j < SEL_IO_DIM1; j += 2) {
- HDassert(i2 < SEL_IO_DIM0);
+ assert(i2 < SEL_IO_DIM0);
fbuf2[i2][j2] = wbuf2[i][j];
if (++j2 == SEL_IO_DIM1) {
i2 += 2;
@@ -5564,7 +5564,7 @@ test_selection_io(const char *vfd_name)
/* Update file buf */
for (i = 1, i2 = 0, j2 = 1; i < (SEL_IO_DIM0 * SEL_IO_DIM1); i += 2) {
- HDassert(i2 < SEL_IO_DIM0);
+ assert(i2 < SEL_IO_DIM0);
fbuf2[i2][j2] = wbuf1[i];
j2 += 2;
if (j2 >= SEL_IO_DIM1) {
@@ -5626,7 +5626,7 @@ test_selection_io(const char *vfd_name)
/* Update file buf */
for (i = 0, i2 = 0; i < SEL_IO_DIM0; i += 2)
for (j = 0; j < SEL_IO_DIM1; j++) {
- HDassert(i2 < (SEL_IO_DIM0 * SEL_IO_DIM1));
+ assert(i2 < (SEL_IO_DIM0 * SEL_IO_DIM1));
fbuf1[i2] = wbuf2[i][j];
i2 += 2;
}
@@ -5661,7 +5661,7 @@ test_selection_io(const char *vfd_name)
* Test 11: Strided <> Strided 1D and 2D I/O
*/
/* SEL_IO_DIM1 must be even */
- HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
+ assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2);
/* Strided selection in memory (1D) */
start[0] = 0;
@@ -5710,7 +5710,7 @@ test_selection_io(const char *vfd_name)
fbuf1[(2 * i) + 1] = wbuf1[2 * i];
for (i = 1, i2 = 0, j2 = 1; i < SEL_IO_DIM0; i += 2)
for (j = 0; j < SEL_IO_DIM1; j++) {
- HDassert(i2 < SEL_IO_DIM0);
+ assert(i2 < SEL_IO_DIM0);
fbuf2[i2][j2] = wbuf2[i][j];
j2 += 2;
if (j2 >= SEL_IO_DIM1) {
@@ -5819,7 +5819,7 @@ test_selection_io(const char *vfd_name)
* find 1D index into 2D array */
for (i = 0, i2 = 0, j2 = 0; i < SEL_IO_DIM0; i += 2)
for (j = 0; j < SEL_IO_DIM1; j++) {
- HDassert(i2 < SEL_IO_DIM0);
+ assert(i2 < SEL_IO_DIM0);
fbuf1[(i2 * SEL_IO_DIM1) + j2] = wbuf2[i][j];
j2 += 2;
if (j2 >= SEL_IO_DIM1) {
@@ -5829,7 +5829,7 @@ test_selection_io(const char *vfd_name)
}
for (i = 1, i2 = 0, j2 = 1; i < SEL_IO_DIM0; i += 2)
for (j = 0; j < SEL_IO_DIM1; j++) {
- HDassert(i2 < SEL_IO_DIM0);
+ assert(i2 < SEL_IO_DIM0);
fbuf2[i2][j2] = wbuf2[i][j];
j2 += 2;
if (j2 >= SEL_IO_DIM1) {
@@ -5946,13 +5946,13 @@ main(void)
*/
env_h5_drvr = HDgetenv(HDF5_DRIVER);
if (env_h5_drvr) {
- HDprintf(" -- SKIPPED VFD tests because %s is set -- \n", HDF5_DRIVER);
- HDexit(EXIT_SUCCESS);
+ printf(" -- SKIPPED VFD tests because %s is set -- \n", HDF5_DRIVER);
+ exit(EXIT_SUCCESS);
}
h5_reset();
- HDprintf("Testing basic Virtual File Driver functionality.\n");
+ printf("Testing basic Virtual File Driver functionality.\n");
setup_rand();
@@ -5976,11 +5976,11 @@ main(void)
nerrors += test_ctl() < 0 ? 1 : 0;
if (nerrors) {
- HDprintf("***** %d Virtual File Driver TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("***** %d Virtual File Driver TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
return EXIT_FAILURE;
}
- HDprintf("All Virtual File Driver tests passed.\n");
+ printf("All Virtual File Driver tests passed.\n");
return EXIT_SUCCESS;
} /* end main() */
diff --git a/test/vfd_plugin.c b/test/vfd_plugin.c
index 182c048..2b7ed38 100644
--- a/test/vfd_plugin.c
+++ b/test/vfd_plugin.c
@@ -291,7 +291,7 @@ test_get_config_str(void)
TEST_ERROR;
/* Try to retrieve length of default configuration string - should be 0 */
- HDmemset(config_str_buf, 0, 128);
+ memset(config_str_buf, 0, 128);
if ((config_str_len = H5Pget_driver_config_str(fapl_id, config_str_buf, 128)) < 0)
TEST_ERROR;
@@ -349,7 +349,7 @@ test_env_var(void)
TESTING("Loading of VFD plugin with HDF5_DRIVER environment variable");
/* Try to retrieve length of default configuration string - should be 0 */
- HDmemset(config_str_buf, 0, 128);
+ memset(config_str_buf, 0, 128);
if ((config_str_len = H5Pget_driver_config_str(H5P_FILE_ACCESS_DEFAULT, config_str_buf, 128)) < 0)
TEST_ERROR;
@@ -379,7 +379,7 @@ test_env_var(void)
TEST_ERROR;
/* Check driver configuration string */
- HDmemset(config_str_buf, 0, 128);
+ memset(config_str_buf, 0, 128);
if ((config_str_len = H5Pget_driver_config_str(H5P_FILE_ACCESS_DEFAULT, config_str_buf, 128)) < 0)
TEST_ERROR;
if (HDstrlen(config_str) != config_str_len)
@@ -429,11 +429,11 @@ main(void)
nerrors += (test_env_var() < 0) ? 1 : 0;
if (nerrors) {
- HDprintf("***** %d VFD plugin TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
- HDexit(EXIT_FAILURE);
+ printf("***** %d VFD plugin TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ exit(EXIT_FAILURE);
}
HDputs("All VFD plugin tests passed.");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
diff --git a/test/vol.c b/test/vol.c
index 1c4f9ca..b2b26da 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -579,12 +579,12 @@ fake_vol_info_to_str(const void *info, char **str)
/* Verify the info is correct before continuing */
if (val != INT_MAX) {
- HDprintf("The value of info (%d) is incorrect\n", val);
+ printf("The value of info (%d) is incorrect\n", val);
return FAIL;
}
/* Allocate the string long enough for the info */
- if (NULL == (*str = (char *)HDcalloc(1, str_size)))
+ if (NULL == (*str = (char *)calloc(1, str_size)))
return FAIL;
HDsnprintf(*str, str_size, "%d", val);
@@ -628,7 +628,7 @@ fake_vol_free_info(void *info)
herr_t ret_value = SUCCEED; /* Return value */
if (info)
- HDfree(info);
+ free(info);
return ret_value;
} /* end fake_vol_free_info() */
@@ -715,9 +715,9 @@ test_vol_registration(void)
TEST_ERROR;
/* Test registering a VOL connector with an incompatible version # */
- if (NULL == (bad_fake_vol_class = HDmalloc(sizeof(H5VL_class_t))))
+ if (NULL == (bad_fake_vol_class = malloc(sizeof(H5VL_class_t))))
TEST_ERROR;
- HDmemcpy(bad_fake_vol_class, &fake_vol_g, sizeof(H5VL_class_t));
+ memcpy(bad_fake_vol_class, &fake_vol_g, sizeof(H5VL_class_t));
bad_fake_vol_class->version = H5VL_VERSION + 1;
H5E_BEGIN_TRY
{
@@ -726,7 +726,7 @@ test_vol_registration(void)
H5E_END_TRY;
if (H5I_INVALID_HID != vol_id)
FAIL_PUTS_ERROR("should not be able to register a connector with an incompatible version #");
- HDfree(bad_fake_vol_class);
+ free(bad_fake_vol_class);
bad_fake_vol_class = NULL;
/* Load a VOL interface
@@ -807,7 +807,7 @@ error:
H5E_END_TRY;
if (bad_fake_vol_class)
- HDfree(bad_fake_vol_class);
+ free(bad_fake_vol_class);
return FAIL;
} /* end test_vol_registration() */
@@ -2192,7 +2192,7 @@ test_async_vol_props(void)
if (conn_env_str) {
if (HDsetenv(HDF5_VOL_CONNECTOR, conn_env_str, TRUE) < 0)
TEST_ERROR;
- HDfree(conn_env_str);
+ free(conn_env_str);
if (H5VL__reparse_def_vol_conn_variable_test() < 0)
TEST_ERROR;
@@ -2209,7 +2209,7 @@ error:
H5VLunregister_connector(vol_id);
}
H5E_END_TRY;
- HDfree(conn_env_str);
+ free(conn_env_str);
return FAIL;
} /* end test_async_vol_props() */
@@ -2345,7 +2345,7 @@ test_get_vol_name(void)
/* Skip the connectors other than the native and pass_through connector */
if (HDstrcmp(conn_env_str, "native") && HDstrcmp(conn_env_str, "pass_through")) {
SKIPPED();
- HDprintf(" only test the native or internal pass_through connector\n");
+ printf(" only test the native or internal pass_through connector\n");
return SUCCEED;
}
@@ -2510,7 +2510,7 @@ test_info_to_str(void)
/* Free the string being returned */
if (ret_str)
- HDfree(ret_str);
+ free(ret_str);
if (H5Pclose(fapl_id) < 0)
TEST_ERROR;
@@ -2655,12 +2655,12 @@ main(void)
nerrors += test_query_optional() < 0 ? 1 : 0;
if (nerrors) {
- HDprintf("***** %d Virtual Object Layer TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
- HDexit(EXIT_FAILURE);
+ printf("***** %d Virtual Object Layer TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ exit(EXIT_FAILURE);
}
HDputs("All Virtual Object Layer (VOL) tests passed.");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end main() */
diff --git a/test/vol_plugin.c b/test/vol_plugin.c
index c7baf5a..b5c0756 100644
--- a/test/vol_plugin.c
+++ b/test/vol_plugin.c
@@ -342,12 +342,12 @@ main(void)
nerrors += test_getters() < 0 ? 1 : 0;
if (nerrors) {
- HDprintf("***** %d VOL connector plugin TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
- HDexit(EXIT_FAILURE);
+ printf("***** %d VOL connector plugin TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ exit(EXIT_FAILURE);
}
HDputs("All VOL connector plugin tests passed.");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end main() */
diff --git a/testpar/API/H5_api_async_test_parallel.c b/testpar/API/H5_api_async_test_parallel.c
index 663e690..d6f55b1 100644
--- a/testpar/API/H5_api_async_test_parallel.c
+++ b/testpar/API/H5_api_async_test_parallel.c
@@ -84,7 +84,7 @@ test_one_dataset_io(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, dataset, or flush aren't supported with this connector\n");
}
@@ -125,15 +125,15 @@ test_one_dataset_io(void)
data_size *= dims[i];
data_size *= sizeof(int);
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
TEST_ERROR;
}
- if (NULL == (read_buf = HDmalloc(data_size))) {
+ if (NULL == (read_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
TEST_ERROR;
}
@@ -154,7 +154,7 @@ test_one_dataset_io(void)
if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
@@ -164,7 +164,7 @@ test_one_dataset_io(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -206,7 +206,7 @@ test_one_dataset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(single_dset_eswait);
} /* end if */
@@ -247,7 +247,7 @@ test_one_dataset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(single_dset_dclose);
} /* end if */
@@ -292,7 +292,7 @@ test_one_dataset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(single_dset_dflush);
} /* end if */
@@ -345,7 +345,7 @@ test_one_dataset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(single_dset_fclose);
} /* end if */
@@ -364,17 +364,17 @@ test_one_dataset_io(void)
TEST_ERROR;
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -395,11 +395,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Sclose(mspace_id);
H5Dclose(dset_id);
@@ -449,7 +449,7 @@ test_multi_dataset_io(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, dataset, or flush aren't supported with this connector\n");
}
@@ -483,15 +483,15 @@ test_multi_dataset_io(void)
data_size *= sizeof(int);
data_size *= MULTI_DATASET_IO_TEST_NDSETS;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
TEST_ERROR;
}
- if (NULL == (read_buf = HDmalloc(data_size))) {
+ if (NULL == (read_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
TEST_ERROR;
}
@@ -512,7 +512,7 @@ test_multi_dataset_io(void)
if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
@@ -522,7 +522,7 @@ test_multi_dataset_io(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -587,7 +587,7 @@ test_multi_dataset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_dset_open);
} /* end if */
@@ -668,7 +668,7 @@ test_multi_dataset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_dset_close);
} /* end if */
@@ -687,17 +687,17 @@ test_multi_dataset_io(void)
TEST_ERROR;
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -718,11 +718,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Sclose(mspace_id);
for (i = 0; i < MULTI_DATASET_IO_TEST_NDSETS; i++)
@@ -775,7 +775,7 @@ test_multi_file_dataset_io(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, dataset, or flush aren't supported with this connector\n");
}
@@ -805,15 +805,15 @@ test_multi_file_dataset_io(void)
data_size *= sizeof(int);
data_size *= MULTI_FILE_DATASET_IO_TEST_NFILES;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
TEST_ERROR;
}
- if (NULL == (read_buf = HDmalloc(data_size))) {
+ if (NULL == (read_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
TEST_ERROR;
}
@@ -834,7 +834,7 @@ test_multi_file_dataset_io(void)
if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
@@ -844,7 +844,7 @@ test_multi_file_dataset_io(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -919,7 +919,7 @@ test_multi_file_dataset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_dset_open);
} /* end if */
@@ -994,7 +994,7 @@ test_multi_file_dataset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_dset_dclose);
} /* end if */
@@ -1092,7 +1092,7 @@ test_multi_file_dataset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_dset_fclose);
} /* end if */
@@ -1111,17 +1111,17 @@ test_multi_file_dataset_io(void)
TEST_ERROR;
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -1142,11 +1142,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Sclose(mspace_id);
for (i = 0; i < MULTI_FILE_DATASET_IO_TEST_NFILES; i++) {
@@ -1198,7 +1198,7 @@ test_multi_file_grp_dset_io(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(
+ printf(
" API functions for basic file, group, or dataset aren't supported with this connector\n");
}
@@ -1228,15 +1228,15 @@ test_multi_file_grp_dset_io(void)
data_size *= sizeof(int);
data_size *= MULTI_FILE_GRP_DSET_IO_TEST_NFILES;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
TEST_ERROR;
}
- if (NULL == (read_buf = HDmalloc(data_size))) {
+ if (NULL == (read_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
TEST_ERROR;
}
@@ -1257,7 +1257,7 @@ test_multi_file_grp_dset_io(void)
if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
@@ -1267,7 +1267,7 @@ test_multi_file_grp_dset_io(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -1382,7 +1382,7 @@ test_multi_file_grp_dset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_grp_dset_no_kick);
} /* end if */
@@ -1508,7 +1508,7 @@ test_multi_file_grp_dset_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
PART_ERROR(multi_file_grp_dset_kick);
} /* end if */
@@ -1527,17 +1527,17 @@ test_multi_file_grp_dset_io(void)
TEST_ERROR;
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -1558,11 +1558,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Sclose(mspace_id);
H5Dclose(dset_id);
@@ -1619,8 +1619,8 @@ test_set_extent(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" API functions for basic file, dataset, dataset more, or flush aren't supported "
- "with this connector\n");
+ printf(" API functions for basic file, dataset, dataset more, or flush aren't supported "
+ "with this connector\n");
}
return 0;
@@ -1633,15 +1633,15 @@ test_set_extent(void)
if (generate_random_parallel_dimensions(SET_EXTENT_TEST_SPACE_RANK, &dims) < 0)
TEST_ERROR;
- if (NULL == (maxdims = HDmalloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) {
+ if (NULL == (maxdims = malloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate max dataspace dimension buffer\n");
+ printf(" couldn't allocate max dataspace dimension buffer\n");
TEST_ERROR;
}
- if (NULL == (cdims = HDmalloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) {
+ if (NULL == (cdims = malloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate chunk dimension buffer\n");
+ printf(" couldn't allocate chunk dimension buffer\n");
TEST_ERROR;
}
@@ -1685,15 +1685,15 @@ test_set_extent(void)
data_size *= sizeof(int);
data_size *= SET_EXTENT_TEST_NUM_EXTENDS;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
TEST_ERROR;
}
- if (NULL == (read_buf = HDmalloc(data_size))) {
+ if (NULL == (read_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
TEST_ERROR;
}
@@ -1714,7 +1714,7 @@ test_set_extent(void)
if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
@@ -1724,7 +1724,7 @@ test_set_extent(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -1766,7 +1766,7 @@ test_set_extent(void)
if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
@@ -1821,7 +1821,7 @@ test_set_extent(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed, expected %d but got %d\n", write_buf[i], read_buf[i]);
+ printf(" data verification failed, expected %d but got %d\n", write_buf[i], read_buf[i]);
goto error;
} /* end if */
@@ -1844,27 +1844,27 @@ test_set_extent(void)
FAIL_PUTS_ERROR(" dataspaces are not equal\n");
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (cdims) {
- HDfree(cdims);
+ free(cdims);
cdims = NULL;
}
if (maxdims) {
- HDfree(maxdims);
+ free(maxdims);
maxdims = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -1897,15 +1897,15 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (cdims)
- HDfree(cdims);
+ free(cdims);
if (maxdims)
- HDfree(maxdims);
+ free(maxdims);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Sclose(mspace_id);
H5Sclose(space_id_out);
@@ -1952,8 +1952,8 @@ test_attribute_exists(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
+ "supported with this connector\n");
}
return 0;
@@ -2045,7 +2045,7 @@ test_attribute_exists(void)
TEST_ERROR;
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -2060,7 +2060,7 @@ error:
H5E_BEGIN_TRY
{
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Dclose(dset_id);
@@ -2105,8 +2105,8 @@ test_attribute_io(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
+ "supported with this connector\n");
}
return 0;
@@ -2150,15 +2150,15 @@ test_attribute_io(void)
data_size *= dims[i];
data_size *= sizeof(int);
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for attribute write\n");
+ printf(" couldn't allocate buffer for attribute write\n");
TEST_ERROR;
}
- if (NULL == (read_buf = HDmalloc(data_size))) {
+ if (NULL == (read_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for attribute read\n");
+ printf(" couldn't allocate buffer for attribute read\n");
TEST_ERROR;
}
@@ -2191,7 +2191,7 @@ test_attribute_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
} /* end if */
@@ -2217,7 +2217,7 @@ test_attribute_io(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
} /* end if */
@@ -2240,17 +2240,17 @@ test_attribute_io(void)
TEST_ERROR;
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -2265,11 +2265,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Dclose(dset_id);
@@ -2312,8 +2312,8 @@ test_attribute_io_tconv(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" API functions for basic file, attribute, or flush aren't supported with this "
- "connector\n");
+ printf(" API functions for basic file, attribute, or flush aren't supported with this "
+ "connector\n");
}
return 0;
@@ -2348,15 +2348,15 @@ test_attribute_io_tconv(void)
data_size *= dims[i];
data_size *= sizeof(int);
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for attribute write\n");
+ printf(" couldn't allocate buffer for attribute write\n");
TEST_ERROR;
}
- if (NULL == (read_buf = HDmalloc(data_size))) {
+ if (NULL == (read_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for attribute read\n");
+ printf(" couldn't allocate buffer for attribute read\n");
TEST_ERROR;
}
@@ -2387,7 +2387,7 @@ test_attribute_io_tconv(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
} /* end if */
@@ -2414,7 +2414,7 @@ test_attribute_io_tconv(void)
for (i = 0; i < data_size / sizeof(int); i++)
if (write_buf[i] != read_buf[i]) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
} /* end if */
@@ -2433,17 +2433,17 @@ test_attribute_io_tconv(void)
TEST_ERROR;
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -2460,11 +2460,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Dclose(dset_id);
@@ -2516,8 +2516,8 @@ test_attribute_io_compound(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't "
+ "supported with this connector\n");
}
return 0;
@@ -2577,21 +2577,21 @@ test_attribute_io_compound(void)
data_size *= dims[i];
data_size *= sizeof(tattr_cmpd_t);
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for attribute write\n");
+ printf(" couldn't allocate buffer for attribute write\n");
TEST_ERROR;
}
- if (NULL == (read_buf = HDmalloc(data_size))) {
+ if (NULL == (read_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for attribute read\n");
+ printf(" couldn't allocate buffer for attribute read\n");
TEST_ERROR;
}
- if (NULL == (fbuf = HDmalloc(data_size))) {
+ if (NULL == (fbuf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for attribute read verification\n");
+ printf(" couldn't allocate buffer for attribute read verification\n");
TEST_ERROR;
}
@@ -2630,12 +2630,12 @@ test_attribute_io_compound(void)
for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) {
if (read_buf[i].a != fbuf[i].a) {
H5_FAILED();
- HDprintf(" data verification failed for field 'a'\n");
+ printf(" data verification failed for field 'a'\n");
goto error;
} /* end if */
if (read_buf[i].b != fbuf[i].b) {
H5_FAILED();
- HDprintf(" data verification failed for field 'b'\n");
+ printf(" data verification failed for field 'b'\n");
goto error;
} /* end if */
}
@@ -2660,12 +2660,12 @@ test_attribute_io_compound(void)
for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) {
if (read_buf[i].a != fbuf[i].a) {
H5_FAILED();
- HDprintf(" data verification failed for field 'a'\n");
+ printf(" data verification failed for field 'a'\n");
goto error;
} /* end if */
if (read_buf[i].b != -2) {
H5_FAILED();
- HDprintf(" data verification failed for field 'b'\n");
+ printf(" data verification failed for field 'b'\n");
goto error;
} /* end if */
}
@@ -2690,19 +2690,19 @@ test_attribute_io_compound(void)
for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) {
if (read_buf[i].a != -2) {
H5_FAILED();
- HDprintf(" data verification failed for field 'a'\n");
+ printf(" data verification failed for field 'a'\n");
goto error;
} /* end if */
if (read_buf[i].b != fbuf[i].b) {
H5_FAILED();
- HDprintf(" data verification failed for field 'b'\n");
+ printf(" data verification failed for field 'b'\n");
goto error;
} /* end if */
}
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
@@ -2746,19 +2746,19 @@ test_attribute_io_compound(void)
for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) {
if (read_buf[i].a != fbuf[i].a) {
H5_FAILED();
- HDprintf(" data verification failed for field 'a'\n");
+ printf(" data verification failed for field 'a'\n");
goto error;
} /* end if */
if (read_buf[i].b != fbuf[i].b) {
H5_FAILED();
- HDprintf(" data verification failed for field 'b'\n");
+ printf(" data verification failed for field 'b'\n");
goto error;
} /* end if */
}
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
@@ -2802,12 +2802,12 @@ test_attribute_io_compound(void)
for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) {
if (read_buf[i].a != fbuf[i].a) {
H5_FAILED();
- HDprintf(" data verification failed for field 'a'\n");
+ printf(" data verification failed for field 'a'\n");
goto error;
} /* end if */
if (read_buf[i].b != fbuf[i].b) {
H5_FAILED();
- HDprintf(" data verification failed for field 'b'\n");
+ printf(" data verification failed for field 'b'\n");
goto error;
} /* end if */
}
@@ -2835,22 +2835,22 @@ test_attribute_io_compound(void)
TEST_ERROR;
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (fbuf) {
- HDfree(fbuf);
+ free(fbuf);
fbuf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -2867,13 +2867,13 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (fbuf)
- HDfree(fbuf);
+ free(fbuf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Tclose(mtype_id);
H5Tclose(ftype_id);
@@ -2916,8 +2916,8 @@ test_group(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" API functions for basic file, group, group more or flush aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, group more or flush aren't "
+ "supported with this connector\n");
}
return 0;
@@ -3098,8 +3098,8 @@ test_link(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" API functions for basic file, link, hard link, soft link, flush, or creation order "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, link, hard link, soft link, flush, or creation order "
+ "aren't supported with this connector\n");
}
return 0;
@@ -3179,7 +3179,7 @@ test_link(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
@@ -3218,7 +3218,7 @@ test_link(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
@@ -3256,7 +3256,7 @@ test_link(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
@@ -3353,8 +3353,8 @@ test_ocopy_orefresh(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, object more, flush, or refresh "
- "aren't supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, object more, flush, or refresh "
+ "aren't supported with this connector\n");
}
return 0;
@@ -3423,7 +3423,7 @@ test_ocopy_orefresh(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
}
@@ -3457,7 +3457,7 @@ test_ocopy_orefresh(void)
TEST_ERROR;
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -3474,7 +3474,7 @@ error:
H5E_BEGIN_TRY
{
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(space_id);
H5Dclose(dset_id);
H5Gclose(parent_group_id);
@@ -3508,7 +3508,7 @@ test_file_reopen(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" API functions for basic file or file more aren't supported with this connector\n");
+ printf(" API functions for basic file or file more aren't supported with this connector\n");
}
return 0;
@@ -3595,17 +3595,17 @@ H5_api_async_test_parallel(void)
int nerrors;
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel Async Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel Async Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ASYNC)) {
if (MAINPROCESS) {
SKIPPED();
- HDprintf(" Async APIs aren't supported with this connector\n");
+ printf(" Async APIs aren't supported with this connector\n");
}
return 0;
@@ -3616,19 +3616,19 @@ H5_api_async_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS) {
- HDprintf("\n");
- HDprintf("Cleaning up testing files\n");
+ printf("\n");
+ printf("Cleaning up testing files\n");
}
cleanup_files();
if (MAINPROCESS) {
- HDprintf("\n * Re-testing with independent metadata reads *\n");
+ printf("\n * Re-testing with independent metadata reads *\n");
}
coll_metadata_read = FALSE;
@@ -3638,13 +3638,13 @@ H5_api_async_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS) {
- HDprintf("\n");
- HDprintf("Cleaning up testing files\n");
+ printf("\n");
+ printf("Cleaning up testing files\n");
}
cleanup_files();
@@ -3658,14 +3658,14 @@ int
H5_api_async_test_parallel(void)
{
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel Async Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel Async Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
- HDprintf("SKIPPED due to no async support in HDF5 library\n");
+ printf("SKIPPED due to no async support in HDF5 library\n");
return 0;
}
diff --git a/testpar/API/H5_api_attribute_test_parallel.c b/testpar/API/H5_api_attribute_test_parallel.c
index cffbfcd..a941b9a 100644
--- a/testpar/API/H5_api_attribute_test_parallel.c
+++ b/testpar/API/H5_api_attribute_test_parallel.c
@@ -24,11 +24,11 @@ H5_api_attribute_test_parallel(void)
int nerrors;
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel Attribute Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel Attribute Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_attribute_tests); i++) {
@@ -36,12 +36,12 @@ H5_api_attribute_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/testpar/API/H5_api_dataset_test_parallel.c b/testpar/API/H5_api_dataset_test_parallel.c
index fd02a7f..6f9bf05 100644
--- a/testpar/API/H5_api_dataset_test_parallel.c
+++ b/testpar/API/H5_api_dataset_test_parallel.c
@@ -115,8 +115,7 @@ test_write_dataset_data_verification(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -127,20 +126,20 @@ test_write_dataset_data_verification(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME);
goto error;
}
@@ -154,7 +153,7 @@ test_write_dataset_data_verification(void)
DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1);
goto error;
}
H5E_BEGIN_TRY
@@ -168,7 +167,7 @@ test_write_dataset_data_verification(void)
DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
goto error;
}
H5E_BEGIN_TRY
@@ -182,7 +181,7 @@ test_write_dataset_data_verification(void)
DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
goto error;
}
H5E_BEGIN_TRY
@@ -204,7 +203,7 @@ test_write_dataset_data_verification(void)
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1);
PART_ERROR(H5Dwrite_all_read);
}
@@ -216,7 +215,7 @@ test_write_dataset_data_verification(void)
data_size *= dims[i];
data_size *= DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE;
- if (NULL != (write_buf = HDmalloc(data_size))) {
+ if (NULL != (write_buf = malloc(data_size))) {
for (i = 0; i < data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE; i++)
((int *)write_buf)[i] = (int)i;
@@ -228,7 +227,7 @@ test_write_dataset_data_verification(void)
op_failed = TRUE;
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
}
@@ -236,13 +235,13 @@ test_write_dataset_data_verification(void)
if (MPI_SUCCESS !=
MPI_Allreduce(MPI_IN_PLACE, &op_failed, 1, MPI_C_BOOL, MPI_LAND, MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" couldn't determine if dataset write on rank 0 succeeded\n");
+ printf(" couldn't determine if dataset write on rank 0 succeeded\n");
PART_ERROR(H5Dwrite_all_read);
}
if (op_failed == TRUE) {
H5_FAILED();
- HDprintf(" dataset write on rank 0 failed!\n");
+ printf(" dataset write on rank 0 failed!\n");
PART_ERROR(H5Dwrite_all_read);
}
@@ -268,78 +267,78 @@ test_write_dataset_data_verification(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
PART_ERROR(H5Dwrite_all_read);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
PART_ERROR(H5Dwrite_all_read);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
PART_ERROR(H5Dwrite_all_read);
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
PART_ERROR(H5Dwrite_all_read);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
PART_ERROR(H5Dwrite_all_read);
}
if ((group_id =
H5Gopen2(container_group, DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME);
PART_ERROR(H5Dwrite_all_read);
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1);
PART_ERROR(H5Dwrite_all_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_all_read);
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
PART_ERROR(H5Dwrite_all_read);
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_all_read);
}
if (H5Dread(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1);
PART_ERROR(H5Dwrite_all_read);
}
for (i = 0; i < (hsize_t)space_npoints; i++)
if (((int *)read_buf)[i] != (int)i) {
H5_FAILED();
- HDprintf(" H5S_ALL selection data verification failed\n");
+ printf(" H5S_ALL selection data verification failed\n");
PART_ERROR(H5Dwrite_all_read);
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -348,11 +347,11 @@ test_write_dataset_data_verification(void)
PART_END(H5Dwrite_all_read);
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (fspace_id >= 0) {
@@ -380,9 +379,9 @@ test_write_dataset_data_verification(void)
data_size *= dims[i];
data_size *= DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -409,19 +408,19 @@ test_write_dataset_data_verification(void)
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -430,7 +429,7 @@ test_write_dataset_data_verification(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
}
@@ -438,12 +437,12 @@ test_write_dataset_data_verification(void)
if (H5Dwrite(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
+ printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -476,66 +475,66 @@ test_write_dataset_data_verification(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((group_id =
H5Gopen2(container_group, DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
if (H5Dread(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2);
PART_ERROR(H5Dwrite_hyperslab_read);
}
@@ -547,14 +546,14 @@ test_write_dataset_data_verification(void)
read_buf)[j + (i * (data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))] !=
(int)i) {
H5_FAILED();
- HDprintf(" hyperslab selection data verification failed\n");
+ printf(" hyperslab selection data verification failed\n");
PART_ERROR(H5Dwrite_hyperslab_read);
}
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -563,11 +562,11 @@ test_write_dataset_data_verification(void)
PART_END(H5Dwrite_hyperslab_read);
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (fspace_id >= 0) {
@@ -603,9 +602,9 @@ test_write_dataset_data_verification(void)
data_size *= dims[i];
data_size *= DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -613,11 +612,11 @@ test_write_dataset_data_verification(void)
for (i = 0; i < data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE; i++)
((int *)write_buf)[i] = mpi_size - mpi_rank;
- if (NULL == (points = HDmalloc(DATASET_WRITE_DATA_VERIFY_TEST_SPACE_RANK *
- (data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE) *
- sizeof(hsize_t)))) {
+ if (NULL == (points = malloc(DATASET_WRITE_DATA_VERIFY_TEST_SPACE_RANK *
+ (data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE) *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for point selection\n");
+ printf(" couldn't allocate buffer for point selection\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -642,20 +641,20 @@ test_write_dataset_data_verification(void)
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if (H5Sselect_elements(fspace_id, H5S_SELECT_SET,
data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE, points) < 0) {
H5_FAILED();
- HDprintf(" couldn't select elements in dataspace\n");
+ printf(" couldn't select elements in dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -664,7 +663,7 @@ test_write_dataset_data_verification(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
}
@@ -672,12 +671,12 @@ test_write_dataset_data_verification(void)
if (H5Dwrite(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
+ printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
PART_ERROR(H5Dwrite_point_sel_read);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -710,66 +709,66 @@ test_write_dataset_data_verification(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((group_id =
H5Gopen2(container_group, DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME);
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
if (H5Dread(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3);
PART_ERROR(H5Dwrite_point_sel_read);
}
@@ -781,14 +780,14 @@ test_write_dataset_data_verification(void)
read_buf)[j + (i * (data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))] !=
(mpi_size - (int)i)) {
H5_FAILED();
- HDprintf(" point selection data verification failed\n");
+ printf(" point selection data verification failed\n");
PART_ERROR(H5Dwrite_point_sel_read);
}
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -797,15 +796,15 @@ test_write_dataset_data_verification(void)
PART_END(H5Dwrite_point_sel_read);
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (points) {
- HDfree(points);
+ free(points);
points = NULL;
}
if (fspace_id >= 0) {
@@ -838,22 +837,22 @@ test_write_dataset_data_verification(void)
TESTING_2("test cleanup");
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (points) {
- HDfree(points);
+ free(points);
points = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -874,13 +873,13 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (points)
- HDfree(points);
+ free(points);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -933,8 +932,7 @@ test_write_dataset_independent(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -943,20 +941,20 @@ test_write_dataset_independent(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME);
goto error;
}
@@ -975,14 +973,14 @@ test_write_dataset_independent(void)
DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create first dataset\n");
+ printf(" failed to create first dataset\n");
goto error;
}
if ((dset_id2 = H5Dcreate2(group_id, DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2,
DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" failed to create second dataset\n");
+ printf(" failed to create second dataset\n");
goto error;
}
@@ -990,9 +988,9 @@ test_write_dataset_independent(void)
data_size *= dims[i];
data_size *= DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
goto error;
}
@@ -1015,7 +1013,7 @@ test_write_dataset_independent(void)
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
@@ -1024,7 +1022,7 @@ test_write_dataset_independent(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -1040,13 +1038,13 @@ test_write_dataset_independent(void)
if (H5Dwrite(dset_id1, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" even ranks failed to write to dataset 1\n");
+ printf(" even ranks failed to write to dataset 1\n");
INDEPENDENT_OP_ERROR(dset_write);
}
if (H5Dwrite(dset_id2, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" even ranks failed to write to dataset 2\n");
+ printf(" even ranks failed to write to dataset 2\n");
INDEPENDENT_OP_ERROR(dset_write);
}
}
@@ -1054,13 +1052,13 @@ test_write_dataset_independent(void)
if (H5Dwrite(dset_id2, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" odd ranks failed to write to dataset 2\n");
+ printf(" odd ranks failed to write to dataset 2\n");
INDEPENDENT_OP_ERROR(dset_write);
}
if (H5Dwrite(dset_id1, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" odd ranks failed to write to dataset 1\n");
+ printf(" odd ranks failed to write to dataset 1\n");
INDEPENDENT_OP_ERROR(dset_write);
}
}
@@ -1068,7 +1066,7 @@ test_write_dataset_independent(void)
END_INDEPENDENT_OP(dset_write);
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -1086,43 +1084,43 @@ test_write_dataset_independent(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
goto error;
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
goto error;
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
goto error;
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME);
goto error;
}
if ((dset_id1 = H5Dopen2(group_id, DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1);
+ printf(" couldn't open dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1);
goto error;
}
if ((dset_id2 = H5Dopen2(group_id, DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2);
+ printf(" couldn't open dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2);
goto error;
}
@@ -1131,26 +1129,26 @@ test_write_dataset_independent(void)
*/
if ((fspace_id = H5Dget_space(dset_id1)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
- if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE))) {
+ if (NULL == (read_buf = malloc((hsize_t)space_npoints * DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id1, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1);
+ printf(" couldn't read from dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1);
goto error;
}
@@ -1161,7 +1159,7 @@ test_write_dataset_independent(void)
if (((int *)read_buf)[j + (i * (data_size / DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE))] !=
(int)i) {
H5_FAILED();
- HDprintf(" dataset 1 data verification failed\n");
+ printf(" dataset 1 data verification failed\n");
goto error;
}
}
@@ -1170,7 +1168,7 @@ test_write_dataset_independent(void)
if (H5Dread(dset_id2, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2);
+ printf(" couldn't read from dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2);
goto error;
}
@@ -1181,19 +1179,19 @@ test_write_dataset_independent(void)
if (((int *)read_buf)[j + (i * (data_size / DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE))] !=
(int)i) {
H5_FAILED();
- HDprintf(" dataset 2 data verification failed\n");
+ printf(" dataset 2 data verification failed\n");
goto error;
}
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -1220,11 +1218,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id1);
@@ -1273,8 +1271,7 @@ test_write_dataset_one_proc_0_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -1283,21 +1280,21 @@ test_write_dataset_one_proc_0_selection(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME);
goto error;
}
@@ -1311,7 +1308,7 @@ test_write_dataset_one_proc_0_selection(void)
DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME);
goto error;
}
@@ -1322,9 +1319,9 @@ test_write_dataset_one_proc_0_selection(void)
BEGIN_INDEPENDENT_OP(write_buf_alloc)
{
if (!MAINPROCESS) {
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(write_buf_alloc);
}
@@ -1350,7 +1347,7 @@ test_write_dataset_one_proc_0_selection(void)
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
@@ -1362,7 +1359,7 @@ test_write_dataset_one_proc_0_selection(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -1372,14 +1369,14 @@ test_write_dataset_one_proc_0_selection(void)
if (H5Dwrite(dset_id, DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT,
write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_write);
}
}
END_INDEPENDENT_OP(dset_write);
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -1412,66 +1409,64 @@ test_write_dataset_one_proc_0_selection(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
goto error;
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
goto error;
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
goto error;
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
- if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_0_SEL_TEST_DTYPE_SIZE))) {
+ if (NULL == (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_0_SEL_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id, DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME);
goto error;
}
@@ -1483,7 +1478,7 @@ test_write_dataset_one_proc_0_selection(void)
if (((int *)read_buf)[j + (i * (data_size / DATASET_WRITE_ONE_PROC_0_SEL_TEST_DTYPE_SIZE))] !=
(int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
@@ -1491,12 +1486,12 @@ test_write_dataset_one_proc_0_selection(void)
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -1521,11 +1516,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -1573,8 +1568,7 @@ test_write_dataset_one_proc_none_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -1583,21 +1577,21 @@ test_write_dataset_one_proc_none_selection(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME);
goto error;
}
@@ -1611,7 +1605,7 @@ test_write_dataset_one_proc_none_selection(void)
DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
goto error;
}
@@ -1622,9 +1616,9 @@ test_write_dataset_one_proc_none_selection(void)
BEGIN_INDEPENDENT_OP(write_buf_alloc)
{
if (!MAINPROCESS) {
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(write_buf_alloc);
}
@@ -1653,14 +1647,14 @@ test_write_dataset_one_proc_none_selection(void)
if (MAINPROCESS) {
if (H5Sselect_none(fspace_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't set 'none' selection for dataset write\n");
+ printf(" couldn't set 'none' selection for dataset write\n");
INDEPENDENT_OP_ERROR(set_space_sel);
}
}
else {
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
INDEPENDENT_OP_ERROR(set_space_sel);
}
}
@@ -1675,7 +1669,7 @@ test_write_dataset_one_proc_none_selection(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -1685,14 +1679,14 @@ test_write_dataset_one_proc_none_selection(void)
if (H5Dwrite(dset_id, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_write);
}
}
END_INDEPENDENT_OP(dset_write);
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -1725,66 +1719,66 @@ test_write_dataset_one_proc_none_selection(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
goto error;
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
goto error;
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
goto error;
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
goto error;
}
@@ -1797,7 +1791,7 @@ test_write_dataset_one_proc_none_selection(void)
read_buf)[j + (i * (data_size / DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE))] !=
(int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
@@ -1805,12 +1799,12 @@ test_write_dataset_one_proc_none_selection(void)
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -1835,11 +1829,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -1884,8 +1878,7 @@ test_write_dataset_one_proc_all_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -1894,21 +1887,21 @@ test_write_dataset_one_proc_all_selection(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME);
goto error;
}
@@ -1922,7 +1915,7 @@ test_write_dataset_one_proc_all_selection(void)
DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
goto error;
}
@@ -1933,9 +1926,9 @@ test_write_dataset_one_proc_all_selection(void)
BEGIN_INDEPENDENT_OP(write_buf_alloc)
{
if (MAINPROCESS) {
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(write_buf_alloc);
}
@@ -1950,14 +1943,14 @@ test_write_dataset_one_proc_all_selection(void)
if (MAINPROCESS) {
if (H5Sselect_all(fspace_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't set 'all' selection for dataset write\n");
+ printf(" couldn't set 'all' selection for dataset write\n");
INDEPENDENT_OP_ERROR(set_space_sel);
}
}
else {
if (H5Sselect_none(fspace_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't set 'none' selection for dataset write\n");
+ printf(" couldn't set 'none' selection for dataset write\n");
INDEPENDENT_OP_ERROR(set_space_sel);
}
}
@@ -1972,7 +1965,7 @@ test_write_dataset_one_proc_all_selection(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -1982,14 +1975,14 @@ test_write_dataset_one_proc_all_selection(void)
if (H5Dwrite(dset_id, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_write);
}
}
END_INDEPENDENT_OP(dset_write);
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -2022,84 +2015,84 @@ test_write_dataset_one_proc_all_selection(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
goto error;
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
goto error;
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
goto error;
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
goto error;
}
for (i = 0; i < data_size / DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE; i++) {
if (((int *)read_buf)[i] != (int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -2124,11 +2117,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -2182,8 +2175,7 @@ test_write_dataset_hyper_file_all_mem(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -2192,21 +2184,21 @@ test_write_dataset_hyper_file_all_mem(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME);
goto error;
}
@@ -2220,7 +2212,7 @@ test_write_dataset_hyper_file_all_mem(void)
DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME);
goto error;
}
@@ -2228,9 +2220,9 @@ test_write_dataset_hyper_file_all_mem(void)
data_size *= dims[i];
data_size *= DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
goto error;
}
@@ -2253,19 +2245,19 @@ test_write_dataset_hyper_file_all_mem(void)
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
if (H5Dwrite(dset_id, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_DTYPE, H5S_ALL, fspace_id, H5P_DEFAULT,
write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME);
goto error;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (fspace_id >= 0) {
@@ -2290,66 +2282,66 @@ test_write_dataset_hyper_file_all_mem(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
goto error;
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
goto error;
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
goto error;
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id =
H5Gopen2(container_group, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME);
goto error;
}
@@ -2360,19 +2352,19 @@ test_write_dataset_hyper_file_all_mem(void)
if (((int *)read_buf)[j + (i * (data_size / DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DTYPE_SIZE))] !=
(int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -2401,11 +2393,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -2451,8 +2443,7 @@ test_write_dataset_all_file_hyper_mem(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -2461,21 +2452,21 @@ test_write_dataset_all_file_hyper_mem(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME);
goto error;
}
@@ -2489,7 +2480,7 @@ test_write_dataset_all_file_hyper_mem(void)
DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
@@ -2505,9 +2496,9 @@ test_write_dataset_all_file_hyper_mem(void)
* buffer in order to prove that the mapping from hyperslab selection <-> all
* selection works correctly.
*/
- if (NULL == (write_buf = HDmalloc(2 * data_size))) {
+ if (NULL == (write_buf = malloc(2 * data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(write_buf_alloc);
}
@@ -2538,21 +2529,21 @@ test_write_dataset_all_file_hyper_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_write);
}
if (H5Sselect_hyperslab(mspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
INDEPENDENT_OP_ERROR(dset_write);
}
if (H5Dwrite(dset_id, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_write);
}
}
@@ -2560,7 +2551,7 @@ test_write_dataset_all_file_hyper_mem(void)
END_INDEPENDENT_OP(dset_write);
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -2593,84 +2584,84 @@ test_write_dataset_all_file_hyper_mem(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
goto error;
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
goto error;
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
goto error;
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id =
H5Gopen2(container_group, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
for (i = 0; i < data_size / DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE; i++) {
if (((int *)read_buf)[i] != (int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -2695,11 +2686,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -2760,8 +2751,7 @@ test_write_dataset_all_file_point_mem(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -2770,21 +2760,21 @@ test_write_dataset_all_file_point_mem(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME);
goto error;
}
@@ -2798,7 +2788,7 @@ test_write_dataset_all_file_point_mem(void)
DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
@@ -2814,9 +2804,9 @@ test_write_dataset_all_file_point_mem(void)
* buffer in order to prove that the mapping from point selection <-> all
* selection works correctly.
*/
- if (NULL == (write_buf = HDmalloc(2 * data_size))) {
+ if (NULL == (write_buf = malloc(2 * data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(write_buf_alloc);
}
@@ -2844,14 +2834,14 @@ test_write_dataset_all_file_point_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_write);
}
- if (NULL == (points = HDmalloc((data_size / DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE) *
- sizeof(hsize_t)))) {
+ if (NULL == (points = malloc((data_size / DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE) *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for point selection\n");
+ printf(" couldn't allocate buffer for point selection\n");
INDEPENDENT_OP_ERROR(dset_write);
}
@@ -2865,15 +2855,15 @@ test_write_dataset_all_file_point_mem(void)
data_size / DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE,
points) < 0) {
H5_FAILED();
- HDprintf(" couldn't set point selection for dataset write\n");
+ printf(" couldn't set point selection for dataset write\n");
INDEPENDENT_OP_ERROR(dset_write);
}
if (H5Dwrite(dset_id, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_write);
}
}
@@ -2881,11 +2871,11 @@ test_write_dataset_all_file_point_mem(void)
END_INDEPENDENT_OP(dset_write);
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (points) {
- HDfree(points);
+ free(points);
points = NULL;
}
if (mspace_id >= 0) {
@@ -2918,84 +2908,84 @@ test_write_dataset_all_file_point_mem(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
goto error;
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
goto error;
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
goto error;
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id =
H5Gopen2(container_group, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
for (i = 0; i < data_size / DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE; i++) {
if (((int *)read_buf)[i] != (int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -3020,13 +3010,13 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (points)
- HDfree(points);
+ free(points);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -3076,8 +3066,7 @@ test_write_dataset_hyper_file_point_mem(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -3086,21 +3075,21 @@ test_write_dataset_hyper_file_point_mem(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME);
goto error;
}
@@ -3114,7 +3103,7 @@ test_write_dataset_hyper_file_point_mem(void)
DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
@@ -3127,9 +3116,9 @@ test_write_dataset_hyper_file_point_mem(void)
* buffer in order to prove that the mapping from point selection <-> hyperslab
* selection works correctly.
*/
- if (NULL == (write_buf = HDmalloc(2 * data_size))) {
+ if (NULL == (write_buf = malloc(2 * data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
goto error;
}
@@ -3157,7 +3146,7 @@ test_write_dataset_hyper_file_point_mem(void)
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset write\n");
+ printf(" couldn't select hyperslab for dataset write\n");
goto error;
}
@@ -3167,14 +3156,14 @@ test_write_dataset_hyper_file_point_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
- if (NULL == (points = HDmalloc((data_size / DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE) *
- sizeof(hsize_t)))) {
+ if (NULL == (points = malloc((data_size / DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE) *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for point selection\n");
+ printf(" couldn't allocate buffer for point selection\n");
goto error;
}
@@ -3187,7 +3176,7 @@ test_write_dataset_hyper_file_point_mem(void)
if (H5Sselect_elements(mspace_id, H5S_SELECT_SET,
data_size / DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE, points) < 0) {
H5_FAILED();
- HDprintf(" couldn't set point selection for dataset write\n");
+ printf(" couldn't set point selection for dataset write\n");
goto error;
}
}
@@ -3195,16 +3184,16 @@ test_write_dataset_hyper_file_point_mem(void)
if (H5Dwrite(dset_id, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (points) {
- HDfree(points);
+ free(points);
points = NULL;
}
if (mspace_id >= 0) {
@@ -3237,66 +3226,66 @@ test_write_dataset_hyper_file_point_mem(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
goto error;
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
goto error;
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
goto error;
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
@@ -3308,19 +3297,19 @@ test_write_dataset_hyper_file_point_mem(void)
read_buf)[j + (i * (data_size / DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE))] !=
(int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -3345,13 +3334,13 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (points)
- HDfree(points);
+ free(points);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -3397,8 +3386,7 @@ test_write_dataset_point_file_hyper_mem(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -3407,21 +3395,21 @@ test_write_dataset_point_file_hyper_mem(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME);
goto error;
}
@@ -3435,7 +3423,7 @@ test_write_dataset_point_file_hyper_mem(void)
DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
@@ -3448,9 +3436,9 @@ test_write_dataset_point_file_hyper_mem(void)
* buffer in order to prove that the mapping from hyperslab selection <-> point
* selection works correctly.
*/
- if (NULL == (write_buf = HDmalloc(2 * data_size))) {
+ if (NULL == (write_buf = malloc(2 * data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
goto error;
}
@@ -3462,10 +3450,10 @@ test_write_dataset_point_file_hyper_mem(void)
((int *)write_buf)[i] = 0;
}
- if (NULL == (points = HDmalloc((data_size / DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE) *
- DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK * sizeof(hsize_t)))) {
+ if (NULL == (points = malloc((data_size / DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE) *
+ DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK * sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for point selection\n");
+ printf(" couldn't allocate buffer for point selection\n");
goto error;
}
@@ -3487,7 +3475,7 @@ test_write_dataset_point_file_hyper_mem(void)
if (H5Sselect_elements(fspace_id, H5S_SELECT_SET,
data_size / DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE, points) < 0) {
H5_FAILED();
- HDprintf(" couldn't set point selection for dataset write\n");
+ printf(" couldn't set point selection for dataset write\n");
goto error;
}
@@ -3500,13 +3488,13 @@ test_write_dataset_point_file_hyper_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
if (H5Sselect_hyperslab(mspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't set hyperslab selection for dataset write\n");
+ printf(" couldn't set hyperslab selection for dataset write\n");
goto error;
}
}
@@ -3514,16 +3502,16 @@ test_write_dataset_point_file_hyper_mem(void)
if (H5Dwrite(dset_id, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (points) {
- HDfree(points);
+ free(points);
points = NULL;
}
if (mspace_id >= 0) {
@@ -3556,66 +3544,66 @@ test_write_dataset_point_file_hyper_mem(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
goto error;
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
goto error;
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
goto error;
}
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
if (H5Dread(dset_id, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
@@ -3627,19 +3615,19 @@ test_write_dataset_point_file_hyper_mem(void)
read_buf)[j + (i * (data_size / DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE))] !=
(int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -3664,13 +3652,13 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (points)
- HDfree(points);
+ free(points);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -3718,8 +3706,7 @@ test_read_dataset_one_proc_0_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -3734,27 +3721,27 @@ test_read_dataset_one_proc_0_selection(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((group_id = H5Gcreate2(container_group, DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id = H5Screate_simple(DATASET_READ_ONE_PROC_0_SEL_TEST_SPACE_RANK, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -3762,7 +3749,7 @@ test_read_dataset_one_proc_0_selection(void)
DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -3770,9 +3757,9 @@ test_read_dataset_one_proc_0_selection(void)
data_size *= dims[i];
data_size *= DATASET_READ_ONE_PROC_0_SEL_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -3792,7 +3779,7 @@ test_read_dataset_one_proc_0_selection(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -3800,12 +3787,12 @@ test_read_dataset_one_proc_0_selection(void)
if (H5Dwrite(dset_id, DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -3838,17 +3825,17 @@ test_read_dataset_one_proc_0_selection(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -3862,36 +3849,36 @@ test_read_dataset_one_proc_0_selection(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
@@ -3901,9 +3888,9 @@ test_read_dataset_one_proc_0_selection(void)
read_buf_size =
((size_t)(space_npoints / mpi_size) * DATASET_READ_ONE_PROC_0_SEL_TEST_DTYPE_SIZE);
- if (NULL == (read_buf = HDmalloc(read_buf_size))) {
+ if (NULL == (read_buf = malloc(read_buf_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
INDEPENDENT_OP_ERROR(read_buf_alloc);
}
}
@@ -3918,7 +3905,7 @@ test_read_dataset_one_proc_0_selection(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -3939,7 +3926,7 @@ test_read_dataset_one_proc_0_selection(void)
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset read\n");
+ printf(" couldn't select hyperslab for dataset read\n");
goto error;
}
@@ -3948,7 +3935,7 @@ test_read_dataset_one_proc_0_selection(void)
if (H5Dread(dset_id, DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_read);
}
}
@@ -3960,7 +3947,7 @@ test_read_dataset_one_proc_0_selection(void)
for (i = 0; i < (size_t)space_npoints / (size_t)mpi_size; i++) {
if (((int *)read_buf)[i] != mpi_rank) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
INDEPENDENT_OP_ERROR(data_verify);
}
}
@@ -3969,12 +3956,12 @@ test_read_dataset_one_proc_0_selection(void)
END_INDEPENDENT_OP(data_verify);
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -4001,11 +3988,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -4053,8 +4040,7 @@ test_read_dataset_one_proc_none_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -4069,28 +4055,28 @@ test_read_dataset_one_proc_none_selection(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((group_id = H5Gcreate2(container_group, DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id = H5Screate_simple(DATASET_READ_ONE_PROC_NONE_SEL_TEST_SPACE_RANK, dims, NULL)) <
0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -4098,7 +4084,7 @@ test_read_dataset_one_proc_none_selection(void)
DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -4106,9 +4092,9 @@ test_read_dataset_one_proc_none_selection(void)
data_size *= dims[i];
data_size *= DATASET_READ_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -4128,7 +4114,7 @@ test_read_dataset_one_proc_none_selection(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -4136,13 +4122,12 @@ test_read_dataset_one_proc_none_selection(void)
if (H5Dwrite(dset_id, DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -4175,17 +4160,17 @@ test_read_dataset_one_proc_none_selection(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -4199,37 +4184,37 @@ test_read_dataset_one_proc_none_selection(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
@@ -4239,9 +4224,9 @@ test_read_dataset_one_proc_none_selection(void)
read_buf_size =
((size_t)(space_npoints / mpi_size) * DATASET_READ_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE);
- if (NULL == (read_buf = HDmalloc(read_buf_size))) {
+ if (NULL == (read_buf = malloc(read_buf_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
INDEPENDENT_OP_ERROR(read_buf_alloc);
}
}
@@ -4256,7 +4241,7 @@ test_read_dataset_one_proc_none_selection(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -4280,14 +4265,14 @@ test_read_dataset_one_proc_none_selection(void)
if (MAINPROCESS) {
if (H5Sselect_none(fspace_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't set 'none' selection for dataset read\n");
+ printf(" couldn't set 'none' selection for dataset read\n");
INDEPENDENT_OP_ERROR(set_space_sel);
}
}
else {
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset read\n");
+ printf(" couldn't select hyperslab for dataset read\n");
INDEPENDENT_OP_ERROR(set_space_sel);
}
}
@@ -4299,7 +4284,7 @@ test_read_dataset_one_proc_none_selection(void)
if (H5Dread(dset_id, DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_read);
}
}
@@ -4311,7 +4296,7 @@ test_read_dataset_one_proc_none_selection(void)
for (i = 0; i < (size_t)space_npoints / (size_t)mpi_size; i++) {
if (((int *)read_buf)[i] != mpi_rank) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
INDEPENDENT_OP_ERROR(data_verify);
}
}
@@ -4320,12 +4305,12 @@ test_read_dataset_one_proc_none_selection(void)
END_INDEPENDENT_OP(data_verify);
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -4352,11 +4337,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -4401,8 +4386,7 @@ test_read_dataset_one_proc_all_selection(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -4417,28 +4401,28 @@ test_read_dataset_one_proc_all_selection(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((group_id = H5Gcreate2(container_group, DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id = H5Screate_simple(DATASET_READ_ONE_PROC_ALL_SEL_TEST_SPACE_RANK, dims, NULL)) <
0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -4446,7 +4430,7 @@ test_read_dataset_one_proc_all_selection(void)
DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -4454,9 +4438,9 @@ test_read_dataset_one_proc_all_selection(void)
data_size *= dims[i];
data_size *= DATASET_READ_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -4476,7 +4460,7 @@ test_read_dataset_one_proc_all_selection(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -4484,13 +4468,12 @@ test_read_dataset_one_proc_all_selection(void)
if (H5Dwrite(dset_id, DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -4523,17 +4506,17 @@ test_read_dataset_one_proc_all_selection(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -4547,37 +4530,36 @@ test_read_dataset_one_proc_all_selection(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
@@ -4586,9 +4568,9 @@ test_read_dataset_one_proc_all_selection(void)
if (MAINPROCESS) {
read_buf_size = (size_t)space_npoints * DATASET_READ_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE;
- if (NULL == (read_buf = HDmalloc(read_buf_size))) {
+ if (NULL == (read_buf = malloc(read_buf_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
INDEPENDENT_OP_ERROR(read_buf_alloc);
}
}
@@ -4603,7 +4585,7 @@ test_read_dataset_one_proc_all_selection(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
}
@@ -4613,14 +4595,14 @@ test_read_dataset_one_proc_all_selection(void)
if (MAINPROCESS) {
if (H5Sselect_all(fspace_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't set 'all' selection for dataset read\n");
+ printf(" couldn't set 'all' selection for dataset read\n");
INDEPENDENT_OP_ERROR(set_space_sel);
}
}
else {
if (H5Sselect_none(fspace_id) < 0) {
H5_FAILED();
- HDprintf(" couldn't set 'none' selection for dataset read\n");
+ printf(" couldn't set 'none' selection for dataset read\n");
INDEPENDENT_OP_ERROR(set_space_sel);
}
}
@@ -4632,7 +4614,7 @@ test_read_dataset_one_proc_all_selection(void)
if (H5Dread(dset_id, DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_read);
}
}
@@ -4650,7 +4632,7 @@ test_read_dataset_one_proc_all_selection(void)
if (((int *)read_buf)[idx] != (int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
INDEPENDENT_OP_ERROR(data_verify);
}
}
@@ -4660,12 +4642,12 @@ test_read_dataset_one_proc_all_selection(void)
END_INDEPENDENT_OP(data_verify);
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -4692,11 +4674,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -4756,8 +4738,7 @@ test_read_dataset_all_file_hyper_mem(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -4772,28 +4753,28 @@ test_read_dataset_all_file_hyper_mem(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((group_id = H5Gcreate2(container_group, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id = H5Screate_simple(DATASET_READ_ALL_FILE_HYPER_MEM_TEST_SPACE_RANK, dims, NULL)) <
0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -4801,8 +4782,7 @@ test_read_dataset_all_file_hyper_mem(void)
DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -4810,9 +4790,9 @@ test_read_dataset_all_file_hyper_mem(void)
data_size *= dims[i];
data_size *= DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -4833,7 +4813,7 @@ test_read_dataset_all_file_hyper_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -4841,13 +4821,13 @@ test_read_dataset_all_file_hyper_mem(void)
if (H5Dwrite(dset_id, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -4880,17 +4860,17 @@ test_read_dataset_all_file_hyper_mem(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -4904,37 +4884,37 @@ test_read_dataset_all_file_hyper_mem(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
@@ -4957,29 +4937,29 @@ test_read_dataset_all_file_hyper_mem(void)
* selection works correctly.
*/
read_buf_size = (size_t)(2 * space_npoints) * DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE;
- if (NULL == (read_buf = HDcalloc(1, read_buf_size))) {
+ if (NULL == (read_buf = calloc(1, read_buf_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
INDEPENDENT_OP_ERROR(dset_read);
}
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_read);
}
if (H5Sselect_hyperslab(mspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset read\n");
+ printf(" couldn't select hyperslab for dataset read\n");
INDEPENDENT_OP_ERROR(dset_read);
}
if (H5Dread(dset_id, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_read);
}
@@ -4993,14 +4973,14 @@ test_read_dataset_all_file_hyper_mem(void)
if (j % 2 == 0) {
if (((int *)read_buf)[idx] != (int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
INDEPENDENT_OP_ERROR(dset_read);
}
}
else {
if (((int *)read_buf)[idx] != 0) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
INDEPENDENT_OP_ERROR(dset_read);
}
}
@@ -5011,12 +4991,12 @@ test_read_dataset_all_file_hyper_mem(void)
END_INDEPENDENT_OP(dset_read);
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -5041,11 +5021,11 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -5106,8 +5086,7 @@ test_read_dataset_all_file_point_mem(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -5122,28 +5101,28 @@ test_read_dataset_all_file_point_mem(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((group_id = H5Gcreate2(container_group, DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id = H5Screate_simple(DATASET_READ_ALL_FILE_POINT_MEM_TEST_SPACE_RANK, dims, NULL)) <
0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -5151,8 +5130,7 @@ test_read_dataset_all_file_point_mem(void)
DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n", DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -5160,9 +5138,9 @@ test_read_dataset_all_file_point_mem(void)
data_size *= dims[i];
data_size *= DATASET_READ_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -5183,7 +5161,7 @@ test_read_dataset_all_file_point_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -5191,13 +5169,13 @@ test_read_dataset_all_file_point_mem(void)
if (H5Dwrite(dset_id, DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -5230,17 +5208,17 @@ test_read_dataset_all_file_point_mem(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -5254,37 +5232,37 @@ test_read_dataset_all_file_point_mem(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) <
0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
@@ -5304,21 +5282,21 @@ test_read_dataset_all_file_point_mem(void)
* selection works correctly.
*/
read_buf_size = (size_t)(2 * space_npoints) * DATASET_READ_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE;
- if (NULL == (read_buf = HDcalloc(1, read_buf_size))) {
+ if (NULL == (read_buf = calloc(1, read_buf_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
INDEPENDENT_OP_ERROR(dset_read);
}
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_read);
}
- if (NULL == (points = HDmalloc((size_t)space_npoints * sizeof(hsize_t)))) {
+ if (NULL == (points = malloc((size_t)space_npoints * sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for point selection\n");
+ printf(" couldn't allocate buffer for point selection\n");
INDEPENDENT_OP_ERROR(dset_read);
}
@@ -5330,15 +5308,15 @@ test_read_dataset_all_file_point_mem(void)
if (H5Sselect_elements(mspace_id, H5S_SELECT_SET, (size_t)space_npoints, points) < 0) {
H5_FAILED();
- HDprintf(" couldn't set point selection for dataset read\n");
+ printf(" couldn't set point selection for dataset read\n");
INDEPENDENT_OP_ERROR(dset_read);
}
if (H5Dread(dset_id, DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_read);
}
@@ -5351,14 +5329,14 @@ test_read_dataset_all_file_point_mem(void)
if (j % 2 == 0) {
if (((int *)read_buf)[idx] != (int)i) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
INDEPENDENT_OP_ERROR(dset_read);
}
}
else {
if (((int *)read_buf)[idx] != 0) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
INDEPENDENT_OP_ERROR(dset_read);
}
}
@@ -5369,17 +5347,17 @@ test_read_dataset_all_file_point_mem(void)
END_INDEPENDENT_OP(dset_read);
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (points) {
- HDfree(points);
+ free(points);
points = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -5404,13 +5382,13 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (points)
- HDfree(points);
+ free(points);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -5460,8 +5438,7 @@ test_read_dataset_hyper_file_point_mem(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -5476,28 +5453,28 @@ test_read_dataset_hyper_file_point_mem(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((group_id = H5Gcreate2(container_group, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id =
H5Screate_simple(DATASET_READ_HYPER_FILE_POINT_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -5505,8 +5482,8 @@ test_read_dataset_hyper_file_point_mem(void)
DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -5514,9 +5491,9 @@ test_read_dataset_hyper_file_point_mem(void)
data_size *= dims[i];
data_size *= DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -5537,7 +5514,7 @@ test_read_dataset_hyper_file_point_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -5545,13 +5522,13 @@ test_read_dataset_hyper_file_point_mem(void)
if (H5Dwrite(dset_id, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -5584,17 +5561,17 @@ test_read_dataset_hyper_file_point_mem(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -5608,37 +5585,37 @@ test_read_dataset_hyper_file_point_mem(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id =
H5Gopen2(container_group, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
@@ -5648,9 +5625,9 @@ test_read_dataset_hyper_file_point_mem(void)
* selection works correctly.
*/
read_buf_size = (2 * (size_t)(space_npoints / mpi_size) * DATASET_READ_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE);
- if (NULL == (read_buf = HDcalloc(1, read_buf_size))) {
+ if (NULL == (read_buf = calloc(1, read_buf_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
@@ -5670,7 +5647,7 @@ test_read_dataset_hyper_file_point_mem(void)
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't select hyperslab for dataset read\n");
+ printf(" couldn't select hyperslab for dataset read\n");
goto error;
}
@@ -5680,13 +5657,13 @@ test_read_dataset_hyper_file_point_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
- if (NULL == (points = HDmalloc((size_t)(space_npoints / mpi_size) * sizeof(hsize_t)))) {
+ if (NULL == (points = malloc((size_t)(space_npoints / mpi_size) * sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for point selection\n");
+ printf(" couldn't allocate buffer for point selection\n");
goto error;
}
@@ -5698,7 +5675,7 @@ test_read_dataset_hyper_file_point_mem(void)
if (H5Sselect_elements(mspace_id, H5S_SELECT_SET, (size_t)(space_npoints / mpi_size), points) < 0) {
H5_FAILED();
- HDprintf(" couldn't set point selection for dataset read\n");
+ printf(" couldn't set point selection for dataset read\n");
goto error;
}
}
@@ -5706,7 +5683,7 @@ test_read_dataset_hyper_file_point_mem(void)
if (H5Dread(dset_id, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME);
goto error;
}
@@ -5714,31 +5691,31 @@ test_read_dataset_hyper_file_point_mem(void)
if (i % 2 == 0) {
if (((int *)read_buf)[i] != (int)mpi_rank) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
else {
if (((int *)read_buf)[i] != 0) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (points) {
- HDfree(points);
+ free(points);
points = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -5763,13 +5740,13 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (points)
- HDfree(points);
+ free(points);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -5815,8 +5792,7 @@ test_read_dataset_point_file_hyper_mem(void)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or dataset aren't supported with this connector\n");
+ printf(" API functions for basic file, group, or dataset aren't supported with this connector\n");
return 0;
}
@@ -5831,28 +5807,28 @@ test_read_dataset_point_file_hyper_mem(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((group_id = H5Gcreate2(container_group, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id =
H5Screate_simple(DATASET_READ_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -5860,8 +5836,8 @@ test_read_dataset_point_file_hyper_mem(void)
DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -5869,9 +5845,9 @@ test_read_dataset_point_file_hyper_mem(void)
data_size *= dims[i];
data_size *= DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -5892,7 +5868,7 @@ test_read_dataset_point_file_hyper_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -5900,13 +5876,13 @@ test_read_dataset_point_file_hyper_mem(void)
if (H5Dwrite(dset_id, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (mspace_id >= 0) {
@@ -5939,17 +5915,17 @@ test_read_dataset_point_file_hyper_mem(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -5963,37 +5939,37 @@ test_read_dataset_point_file_hyper_mem(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id =
H5Gopen2(container_group, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME);
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataspace num points\n");
+ printf(" couldn't get dataspace num points\n");
goto error;
}
@@ -6004,17 +5980,17 @@ test_read_dataset_point_file_hyper_mem(void)
*/
read_buf_size =
(2 * (size_t)(space_npoints / mpi_size) * DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE);
- if (NULL == (read_buf = HDcalloc(1, read_buf_size))) {
+ if (NULL == (read_buf = calloc(1, read_buf_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset read\n");
+ printf(" couldn't allocate buffer for dataset read\n");
goto error;
}
- if (NULL == (points = HDmalloc((size_t)((space_npoints / mpi_size) *
- DATASET_READ_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK) *
- sizeof(hsize_t)))) {
+ if (NULL == (points = malloc((size_t)((space_npoints / mpi_size) *
+ DATASET_READ_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK) *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for point selection\n");
+ printf(" couldn't allocate buffer for point selection\n");
goto error;
}
@@ -6035,7 +6011,7 @@ test_read_dataset_point_file_hyper_mem(void)
if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, (size_t)(space_npoints / mpi_size), points) < 0) {
H5_FAILED();
- HDprintf(" couldn't set point selection for dataset read\n");
+ printf(" couldn't set point selection for dataset read\n");
goto error;
}
@@ -6048,13 +6024,13 @@ test_read_dataset_point_file_hyper_mem(void)
if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create memory dataspace\n");
+ printf(" couldn't create memory dataspace\n");
goto error;
}
if (H5Sselect_hyperslab(mspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) {
H5_FAILED();
- HDprintf(" couldn't set hyperslab selection for dataset write\n");
+ printf(" couldn't set hyperslab selection for dataset write\n");
goto error;
}
}
@@ -6062,7 +6038,7 @@ test_read_dataset_point_file_hyper_mem(void)
if (H5Dread(dset_id, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT,
read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n", DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME);
goto error;
}
@@ -6070,31 +6046,31 @@ test_read_dataset_point_file_hyper_mem(void)
if (i % 2 == 0) {
if (((int *)read_buf)[i] != (int)mpi_rank) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
else {
if (((int *)read_buf)[i] != 0) {
H5_FAILED();
- HDprintf(" data verification failed\n");
+ printf(" data verification failed\n");
goto error;
}
}
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
if (points) {
- HDfree(points);
+ free(points);
points = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -6121,13 +6097,13 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (points)
- HDfree(points);
+ free(points);
if (dims)
- HDfree(dims);
+ free(dims);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -6183,22 +6159,22 @@ test_write_multi_chunk_dataset_same_shape_read(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or getting property list aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, or getting property list aren't "
+ "supported with this connector\n");
return 0;
}
if (NULL ==
- (dims = HDmalloc(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * sizeof(hsize_t)))) {
+ (dims = malloc(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset dimensionality\n");
+ printf(" couldn't allocate buffer for dataset dimensionality\n");
goto error;
}
- if (NULL == (chunk_dims = HDmalloc(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK *
- sizeof(hsize_t)))) {
+ if (NULL == (chunk_dims = malloc(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset dimensionality\n");
+ printf(" couldn't allocate buffer for dataset dimensionality\n");
goto error;
}
@@ -6229,13 +6205,13 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6243,28 +6219,28 @@ test_write_multi_chunk_dataset_same_shape_read(void)
H5Gcreate2(container_group, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK,
dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" failed to create DCPL\n");
+ printf(" failed to create DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK,
chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6272,8 +6248,8 @@ test_write_multi_chunk_dataset_same_shape_read(void)
DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, fspace_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6282,13 +6258,13 @@ test_write_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6296,22 +6272,22 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK,
retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
INDEPENDENT_OP_ERROR(dset_create);
}
for (i = 0; i < DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6377,13 +6353,13 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -6417,17 +6393,17 @@ test_write_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -6441,33 +6417,32 @@ test_write_multi_chunk_dataset_same_shape_read(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
goto error;
}
if ((dset_id =
H5Dopen2(group_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
@@ -6479,7 +6454,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if ((mspace_id = H5Screate_simple(2, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create memory dataspace\n");
+ printf(" failed to create memory dataspace\n");
goto error;
}
}
@@ -6492,18 +6467,18 @@ test_write_multi_chunk_dataset_same_shape_read(void)
* Each rank reads their respective chunks in the dataset, checking the data for each one.
*/
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
for (i = 0, n_chunks_per_rank = (data_size / (size_t)mpi_size) / chunk_size; i < n_chunks_per_rank; i++) {
size_t j, k;
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
if (MAINPROCESS)
- HDprintf("\r All ranks reading chunk %zu", i);
+ printf("\r All ranks reading chunk %zu", i);
for (j = 0; j < DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; j++) {
if (j == 0)
@@ -6520,7 +6495,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to set hyperslab selection\n");
+ printf(" failed to set hyperslab selection\n");
goto error;
}
@@ -6531,8 +6506,8 @@ test_write_multi_chunk_dataset_same_shape_read(void)
if (H5Dread(dset_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -6543,7 +6518,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
((hsize_t)mpi_rank * n_chunks_per_rank); /* Additional value offset for each rank */
if (read_buf[j][k] != (int)val) {
H5_FAILED();
- HDprintf(" data verification failed for chunk %lld\n", (long long)i);
+ printf(" data verification failed for chunk %lld\n", (long long)i);
goto error;
}
}
@@ -6551,12 +6526,12 @@ test_write_multi_chunk_dataset_same_shape_read(void)
}
if (chunk_dims) {
- HDfree(chunk_dims);
+ free(chunk_dims);
chunk_dims = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -6583,11 +6558,11 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (chunk_dims)
- HDfree(chunk_dims);
+ free(chunk_dims);
if (dims)
- HDfree(dims);
+ free(dims);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -6647,22 +6622,22 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or getting property list aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, or getting property list aren't "
+ "supported with this connector\n");
return 0;
}
if (NULL ==
- (dims = HDmalloc(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * sizeof(hsize_t)))) {
+ (dims = malloc(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset dimensionality\n");
+ printf(" couldn't allocate buffer for dataset dimensionality\n");
goto error;
}
- if (NULL == (chunk_dims = HDmalloc(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK *
- sizeof(hsize_t)))) {
+ if (NULL == (chunk_dims = malloc(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset dimensionality\n");
+ printf(" couldn't allocate buffer for dataset dimensionality\n");
goto error;
}
@@ -6693,13 +6668,13 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6707,28 +6682,28 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
H5Gcreate2(container_group, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" failed to create DCPL\n");
+ printf(" failed to create DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6736,8 +6711,8 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, fspace_id,
H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6746,13 +6721,13 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6760,22 +6735,22 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
INDEPENDENT_OP_ERROR(dset_create);
}
for (i = 0; i < DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -6841,13 +6816,13 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -6881,17 +6856,17 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -6905,33 +6880,32 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
goto error;
}
if ((dset_id =
H5Dopen2(group_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n", DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
@@ -6945,7 +6919,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if ((mspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create memory dataspace\n");
+ printf(" failed to create memory dataspace\n");
goto error;
}
}
@@ -6958,18 +6932,18 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
* Each rank reads their respective chunks in the dataset, checking the data for each one.
*/
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
for (i = 0, n_chunks_per_rank = (data_size / (size_t)mpi_size) / chunk_size; i < n_chunks_per_rank; i++) {
size_t j, k;
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
if (MAINPROCESS)
- HDprintf("\r All ranks reading chunk %zu", i);
+ printf("\r All ranks reading chunk %zu", i);
for (j = 0; j < DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; j++) {
if (j == 0)
@@ -6986,7 +6960,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to set hyperslab selection\n");
+ printf(" failed to set hyperslab selection\n");
goto error;
}
@@ -6997,8 +6971,8 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (H5Dread(dset_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, mspace_id, fspace_id,
H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -7009,7 +6983,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
if (read_buf[j][k] != (int)val) {
H5_FAILED();
- HDprintf(" data verification failed for chunk %lld\n", (long long)i);
+ printf(" data verification failed for chunk %lld\n", (long long)i);
goto error;
}
}
@@ -7017,12 +6991,12 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
}
if (chunk_dims) {
- HDfree(chunk_dims);
+ free(chunk_dims);
chunk_dims = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
@@ -7049,11 +7023,11 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (chunk_dims)
- HDfree(chunk_dims);
+ free(chunk_dims);
if (dims)
- HDfree(dims);
+ free(dims);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -7113,22 +7087,22 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or getting property list aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, or getting property list aren't "
+ "supported with this connector\n");
return 0;
}
- if (NULL == (dims = HDmalloc(DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK *
- sizeof(hsize_t)))) {
+ if (NULL == (dims = malloc(DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset dimensionality\n");
+ printf(" couldn't allocate buffer for dataset dimensionality\n");
goto error;
}
- if (NULL == (chunk_dims = HDmalloc(DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK *
- sizeof(hsize_t)))) {
+ if (NULL == (chunk_dims = malloc(DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset dimensionality\n");
+ printf(" couldn't allocate buffer for dataset dimensionality\n");
goto error;
}
@@ -7159,13 +7133,13 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7173,28 +7147,28 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id = H5Screate_simple(
DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" failed to create DCPL\n");
+ printf(" failed to create DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK,
chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7202,7 +7176,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
* all other processes when they open the dataset */
if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY) < 0) {
H5_FAILED();
- HDprintf(" failed to set allocation time on DCPL\n");
+ printf(" failed to set allocation time on DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7210,8 +7184,8 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPE,
fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7220,13 +7194,13 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7234,22 +7208,22 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK,
retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
INDEPENDENT_OP_ERROR(dset_create);
}
for (i = 0; i < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7283,17 +7257,17 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -7307,19 +7281,19 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME);
goto error;
}
@@ -7331,7 +7305,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if ((mspace_id = H5Screate_simple(2, mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create memory dataspace\n");
+ printf(" failed to create memory dataspace\n");
goto error;
}
}
@@ -7341,13 +7315,13 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
}
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
for (niter = 0; niter < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_NITERS; niter++) {
if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -7421,8 +7395,8 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL,
H5S_ALL, H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_write);
}
}
@@ -7440,21 +7414,21 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
@@ -7466,7 +7440,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
size_t j, k;
if (MAINPROCESS)
- HDprintf("\r All ranks reading chunk %zu", i);
+ printf("\r All ranks reading chunk %zu", i);
for (j = 0; j < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; j++) {
if (j == 0)
@@ -7483,7 +7457,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
*/
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to set hyperslab selection\n");
+ printf(" failed to set hyperslab selection\n");
goto error;
}
@@ -7494,8 +7468,8 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (H5Dread(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, mspace_id,
fspace_id, H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -7507,7 +7481,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
+ niter;
if (read_buf[j][k] != (int)val) {
H5_FAILED();
- HDprintf(" data verification failed for chunk %lld\n", (long long)i);
+ printf(" data verification failed for chunk %lld\n", (long long)i);
goto error;
}
}
@@ -7533,23 +7507,23 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
}
if (chunk_dims) {
- HDfree(chunk_dims);
+ free(chunk_dims);
chunk_dims = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -7572,11 +7546,11 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (chunk_dims)
- HDfree(chunk_dims);
+ free(chunk_dims);
if (dims)
- HDfree(dims);
+ free(dims);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -7639,22 +7613,22 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, or getting property list aren't "
- "supported with this connector\n");
+ printf(" API functions for basic file, group, dataset, or getting property list aren't "
+ "supported with this connector\n");
return 0;
}
- if (NULL == (dims = HDmalloc(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK *
- sizeof(hsize_t)))) {
+ if (NULL == (dims = malloc(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset dimensionality\n");
+ printf(" couldn't allocate buffer for dataset dimensionality\n");
goto error;
}
- if (NULL == (chunk_dims = HDmalloc(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK *
- sizeof(hsize_t)))) {
+ if (NULL == (chunk_dims = malloc(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK *
+ sizeof(hsize_t)))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset dimensionality\n");
+ printf(" couldn't allocate buffer for dataset dimensionality\n");
goto error;
}
@@ -7685,13 +7659,13 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (MAINPROCESS) {
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7699,28 +7673,28 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't create container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
if ((fspace_id = H5Screate_simple(
DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create file dataspace for dataset\n");
+ printf(" failed to create file dataspace for dataset\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
H5_FAILED();
- HDprintf(" failed to create DCPL\n");
+ printf(" failed to create DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to set chunking on DCPL\n");
+ printf(" failed to set chunking on DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7728,7 +7702,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
* all other processes when they open the dataset */
if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY) < 0) {
H5_FAILED();
- HDprintf(" failed to set allocation time on DCPL\n");
+ printf(" failed to set allocation time on DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7736,8 +7710,8 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE,
fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't create dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7746,13 +7720,13 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Pclose(dcpl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close DCPL\n");
+ printf(" failed to close DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve copy of DCPL\n");
+ printf(" failed to retrieve copy of DCPL\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7760,22 +7734,22 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
retrieved_chunk_dims) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve chunking info\n");
+ printf(" failed to retrieve chunking info\n");
INDEPENDENT_OP_ERROR(dset_create);
}
for (i = 0; i < DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; i++) {
if (chunk_dims[i] != retrieved_chunk_dims[i]) {
H5_FAILED();
- HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
- "dimensionality\n");
+ printf(" chunk dimensionality retrieved from DCPL didn't match originally specified "
+ "dimensionality\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
- HDprintf(" couldn't allocate buffer for dataset write\n");
+ printf(" couldn't allocate buffer for dataset write\n");
INDEPENDENT_OP_ERROR(dset_create);
}
@@ -7809,17 +7783,17 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Gclose(group_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close test's container group\n");
+ printf(" failed to close test's container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Gclose(container_group) < 0) {
H5_FAILED();
- HDprintf(" failed to close container group\n");
+ printf(" failed to close container group\n");
INDEPENDENT_OP_ERROR(dset_create);
}
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file for data flushing\n");
+ printf(" failed to close file for data flushing\n");
INDEPENDENT_OP_ERROR(dset_create);
}
}
@@ -7833,19 +7807,19 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
+ printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename);
goto error;
}
if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
+ printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME);
goto error;
}
if ((group_id = H5Gopen2(container_group, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open container sub-group '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
+ printf(" couldn't open container sub-group '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME);
goto error;
}
@@ -7859,7 +7833,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if ((mspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK,
mdims, NULL)) < 0) {
H5_FAILED();
- HDprintf(" failed to create memory dataspace\n");
+ printf(" failed to create memory dataspace\n");
goto error;
}
}
@@ -7869,13 +7843,13 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
}
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
for (niter = 0; niter < DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_NITERS; niter++) {
if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -7949,8 +7923,8 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL,
H5S_ALL, H5P_DEFAULT, write_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't write to dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't write to dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
INDEPENDENT_OP_ERROR(dset_write);
}
}
@@ -7968,21 +7942,21 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME,
H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDprintf(" couldn't open dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't open dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
if ((fspace_id = H5Dget_space(dset_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't get dataset dataspace\n");
+ printf(" couldn't get dataset dataspace\n");
goto error;
}
@@ -7994,7 +7968,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
size_t j, k;
if (MAINPROCESS)
- HDprintf("\r All ranks reading chunk %zu", i);
+ printf("\r All ranks reading chunk %zu", i);
for (j = 0; j < DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; j++) {
if (j == 0)
@@ -8011,7 +7985,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
*/
if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) {
H5_FAILED();
- HDprintf(" failed to set hyperslab selection\n");
+ printf(" failed to set hyperslab selection\n");
goto error;
}
@@ -8022,8 +7996,8 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (H5Dread(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, mspace_id,
fspace_id, H5P_DEFAULT, read_buf) < 0) {
H5_FAILED();
- HDprintf(" couldn't read from dataset '%s'\n",
- DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
+ printf(" couldn't read from dataset '%s'\n",
+ DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME);
goto error;
}
@@ -8035,7 +8009,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (read_buf[j][k] != (int)val) {
H5_FAILED();
- HDprintf(" data verification failed for chunk %lld\n", (long long)i);
+ printf(" data verification failed for chunk %lld\n", (long long)i);
goto error;
}
}
@@ -8061,23 +8035,23 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier failed\n");
+ printf(" MPI_Barrier failed\n");
goto error;
}
}
if (chunk_dims) {
- HDfree(chunk_dims);
+ free(chunk_dims);
chunk_dims = NULL;
}
if (dims) {
- HDfree(dims);
+ free(dims);
dims = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -8100,11 +8074,11 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (chunk_dims)
- HDfree(chunk_dims);
+ free(chunk_dims);
if (dims)
- HDfree(dims);
+ free(dims);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -8126,11 +8100,11 @@ H5_api_dataset_test_parallel(void)
int nerrors;
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel Dataset Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel Dataset Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_dataset_tests); i++) {
@@ -8138,12 +8112,12 @@ H5_api_dataset_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/testpar/API/H5_api_datatype_test_parallel.c b/testpar/API/H5_api_datatype_test_parallel.c
index 7d090c0..3d00ad9 100644
--- a/testpar/API/H5_api_datatype_test_parallel.c
+++ b/testpar/API/H5_api_datatype_test_parallel.c
@@ -24,11 +24,11 @@ H5_api_datatype_test_parallel(void)
int nerrors;
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel Datatype Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel Datatype Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_datatype_tests); i++) {
@@ -36,12 +36,12 @@ H5_api_datatype_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/testpar/API/H5_api_file_test_parallel.c b/testpar/API/H5_api_file_test_parallel.c
index 20fb2ba..7a78619 100644
--- a/testpar/API/H5_api_file_test_parallel.c
+++ b/testpar/API/H5_api_file_test_parallel.c
@@ -40,7 +40,7 @@ test_create_file(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
@@ -49,7 +49,7 @@ test_create_file(void)
if ((file_id = H5Fcreate(FILE_CREATE_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", FILE_CREATE_TEST_FILENAME);
+ printf(" couldn't create file '%s'\n", FILE_CREATE_TEST_FILENAME);
goto error;
}
@@ -87,7 +87,7 @@ test_open_file(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
@@ -106,7 +106,7 @@ test_open_file(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDONLY, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" unable to open file '%s' in read-only mode\n", H5_api_test_parallel_filename);
+ printf(" unable to open file '%s' in read-only mode\n", H5_api_test_parallel_filename);
PART_ERROR(H5Fopen_rdonly);
}
@@ -129,7 +129,7 @@ test_open_file(void)
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" unable to open file '%s' in read-write mode\n", H5_api_test_parallel_filename);
+ printf(" unable to open file '%s' in read-write mode\n", H5_api_test_parallel_filename);
PART_ERROR(H5Fopen_rdwrite);
}
@@ -201,7 +201,7 @@ test_split_comm_file_access(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file aren't supported with this connector\n");
+ printf(" API functions for basic file aren't supported with this connector\n");
return 0;
}
@@ -210,7 +210,7 @@ test_split_comm_file_access(void)
is_old = mpi_rank % 2;
if (MPI_SUCCESS != MPI_Comm_split(MPI_COMM_WORLD, is_old, mpi_rank, &comm)) {
H5_FAILED();
- HDprintf(" failed to split communicator!\n");
+ printf(" failed to split communicator!\n");
goto error;
}
MPI_Comm_rank(comm, &newrank);
@@ -237,7 +237,7 @@ test_split_comm_file_access(void)
/* create the file collectively */
if ((file_id = H5Fcreate(SPLIT_FILE_COMM_TEST_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) {
H5_FAILED();
- HDprintf(" couldn't create file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME);
+ printf(" couldn't create file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME);
err_occurred = 1;
goto access_end;
}
@@ -245,7 +245,7 @@ test_split_comm_file_access(void)
/* close the file */
if (H5Fclose(file_id) < 0) {
H5_FAILED();
- HDprintf(" failed to close file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME);
+ printf(" failed to close file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME);
err_occurred = 1;
goto access_end;
}
@@ -253,7 +253,7 @@ test_split_comm_file_access(void)
/* delete the test file */
if (H5Fdelete(SPLIT_FILE_COMM_TEST_FILE_NAME, fapl_id) < 0) {
H5_FAILED();
- HDprintf(" failed to delete file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME);
+ printf(" failed to delete file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME);
err_occurred = 1;
goto access_end;
}
@@ -269,26 +269,26 @@ access_end:
/* Get the collective results about whether an error occurred */
if (MPI_SUCCESS != MPI_Allreduce(MPI_IN_PLACE, &err_occurred, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Allreduce failed\n");
+ printf(" MPI_Allreduce failed\n");
goto error;
}
if (err_occurred) {
H5_FAILED();
- HDprintf(" an error occurred on only some ranks during split-communicator file access! - "
- "collectively failing\n");
+ printf(" an error occurred on only some ranks during split-communicator file access! - "
+ "collectively failing\n");
goto error;
}
if (MPI_SUCCESS != MPI_Comm_free(&comm)) {
H5_FAILED();
- HDprintf(" MPI_Comm_free failed\n");
+ printf(" MPI_Comm_free failed\n");
goto error;
}
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
H5_FAILED();
- HDprintf(" MPI_Barrier on MPI_COMM_WORLD failed\n");
+ printf(" MPI_Barrier on MPI_COMM_WORLD failed\n");
goto error;
}
@@ -317,7 +317,7 @@ cleanup_files(void)
if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) {
if (MAINPROCESS)
- HDprintf(" failed to create FAPL for deleting test files\n");
+ printf(" failed to create FAPL for deleting test files\n");
return;
}
@@ -328,7 +328,7 @@ cleanup_files(void)
if (H5Pclose(fapl_id) < 0) {
if (MAINPROCESS)
- HDprintf(" failed to close FAPL used for deleting test files\n");
+ printf(" failed to close FAPL used for deleting test files\n");
return;
}
}
@@ -340,11 +340,11 @@ H5_api_file_test_parallel(void)
int nerrors;
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel File Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel File Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_file_tests); i++) {
@@ -352,13 +352,13 @@ H5_api_file_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS) {
- HDprintf("\n");
- HDprintf("Cleaning up testing files\n");
+ printf("\n");
+ printf("Cleaning up testing files\n");
}
cleanup_files();
diff --git a/testpar/API/H5_api_group_test_parallel.c b/testpar/API/H5_api_group_test_parallel.c
index d6d8f18..b894b74 100644
--- a/testpar/API/H5_api_group_test_parallel.c
+++ b/testpar/API/H5_api_group_test_parallel.c
@@ -24,11 +24,11 @@ H5_api_group_test_parallel(void)
int nerrors;
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel Group Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel Group Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_group_tests); i++) {
@@ -36,12 +36,12 @@ H5_api_group_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/testpar/API/H5_api_link_test_parallel.c b/testpar/API/H5_api_link_test_parallel.c
index fb865a0..f9999bd 100644
--- a/testpar/API/H5_api_link_test_parallel.c
+++ b/testpar/API/H5_api_link_test_parallel.c
@@ -24,11 +24,11 @@ H5_api_link_test_parallel(void)
int nerrors;
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel Link Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel Link Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_link_tests); i++) {
@@ -36,12 +36,12 @@ H5_api_link_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/testpar/API/H5_api_misc_test_parallel.c b/testpar/API/H5_api_misc_test_parallel.c
index 0dc85eb..307b3a0 100644
--- a/testpar/API/H5_api_misc_test_parallel.c
+++ b/testpar/API/H5_api_misc_test_parallel.c
@@ -24,11 +24,11 @@ H5_api_misc_test_parallel(void)
int nerrors;
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel Miscellaneous Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel Miscellaneous Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_misc_tests); i++) {
@@ -36,12 +36,12 @@ H5_api_misc_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/testpar/API/H5_api_object_test_parallel.c b/testpar/API/H5_api_object_test_parallel.c
index a264eb2..d08de7f 100644
--- a/testpar/API/H5_api_object_test_parallel.c
+++ b/testpar/API/H5_api_object_test_parallel.c
@@ -24,11 +24,11 @@ H5_api_object_test_parallel(void)
int nerrors;
if (MAINPROCESS) {
- HDprintf("**********************************************\n");
- HDprintf("* *\n");
- HDprintf("* API Parallel Object Tests *\n");
- HDprintf("* *\n");
- HDprintf("**********************************************\n\n");
+ printf("**********************************************\n");
+ printf("* *\n");
+ printf("* API Parallel Object Tests *\n");
+ printf("* *\n");
+ printf("**********************************************\n\n");
}
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_object_tests); i++) {
@@ -36,12 +36,12 @@ H5_api_object_test_parallel(void)
if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" MPI_Barrier() failed!\n");
+ printf(" MPI_Barrier() failed!\n");
}
}
if (MAINPROCESS)
- HDprintf("\n");
+ printf("\n");
return nerrors;
}
diff --git a/testpar/API/H5_api_test_parallel.c b/testpar/API/H5_api_test_parallel.c
index ad0fdca..a7f2839 100644
--- a/testpar/API/H5_api_test_parallel.c
+++ b/testpar/API/H5_api_test_parallel.c
@@ -141,7 +141,7 @@ generate_random_parallel_dimensions(int space_rank, hsize_t **dims_out)
if (space_rank <= 0)
goto error;
- if (NULL == (dims = HDmalloc((size_t)space_rank * sizeof(hsize_t))))
+ if (NULL == (dims = malloc((size_t)space_rank * sizeof(hsize_t))))
goto error;
if (MAINPROCESS) {
for (i = 0; i < (size_t)space_rank; i++) {
@@ -164,7 +164,7 @@ generate_random_parallel_dimensions(int space_rank, hsize_t **dims_out)
error:
if (dims)
- HDfree(dims);
+ free(dims);
return -1;
}
@@ -188,8 +188,8 @@ main(int argc, char **argv)
* that require that level of threading support in MPI
*/
if (MPI_SUCCESS != MPI_Init_thread(&argc, &argv, required, &provided)) {
- HDfprintf(stderr, "MPI_Init_thread failed\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "MPI_Init_thread failed\n");
+ exit(EXIT_FAILURE);
}
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -197,7 +197,7 @@ main(int argc, char **argv)
if (provided < required) {
if (MAINPROCESS)
- HDprintf("** INFO: couldn't initialize with MPI_THREAD_MULTIPLE threading support **\n");
+ printf("** INFO: couldn't initialize with MPI_THREAD_MULTIPLE threading support **\n");
}
/* Simple argument checking, TODO can improve that later */
@@ -229,7 +229,7 @@ main(int argc, char **argv)
if (mpi_size > 1) {
if (MPI_SUCCESS != MPI_Bcast(&seed, 1, MPI_UNSIGNED, 0, MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDfprintf(stderr, "Couldn't broadcast test seed\n");
+ fprintf(stderr, "Couldn't broadcast test seed\n");
goto error;
}
}
@@ -244,7 +244,7 @@ main(int argc, char **argv)
if (NULL == (vol_connector_string = HDgetenv(HDF5_VOL_CONNECTOR))) {
if (MAINPROCESS)
- HDprintf("No VOL connector selected; using native VOL connector\n");
+ printf("No VOL connector selected; using native VOL connector\n");
vol_connector_name = "native";
vol_connector_info = NULL;
}
@@ -255,7 +255,7 @@ main(int argc, char **argv)
{
if (NULL == (vol_connector_string_copy = HDstrdup(vol_connector_string))) {
if (MAINPROCESS)
- HDfprintf(stderr, "Unable to copy VOL connector string\n");
+ fprintf(stderr, "Unable to copy VOL connector string\n");
INDEPENDENT_OP_ERROR(copy_connector_string);
}
}
@@ -265,7 +265,7 @@ main(int argc, char **argv)
{
if (NULL == (token = HDstrtok(vol_connector_string_copy, " "))) {
if (MAINPROCESS)
- HDfprintf(stderr, "Error while parsing VOL connector string\n");
+ fprintf(stderr, "Error while parsing VOL connector string\n");
INDEPENDENT_OP_ERROR(get_connector_name);
}
}
@@ -279,20 +279,20 @@ main(int argc, char **argv)
}
if (MAINPROCESS) {
- HDprintf("Running parallel API tests with VOL connector '%s' and info string '%s'\n\n",
- vol_connector_name, vol_connector_info ? vol_connector_info : "");
- HDprintf("Test parameters:\n");
- HDprintf(" - Test file name: '%s'\n", H5_api_test_parallel_filename);
- HDprintf(" - Number of MPI ranks: %d\n", mpi_size);
- HDprintf(" - Test seed: %u\n", seed);
- HDprintf("\n\n");
+ printf("Running parallel API tests with VOL connector '%s' and info string '%s'\n\n",
+ vol_connector_name, vol_connector_info ? vol_connector_info : "");
+ printf("Test parameters:\n");
+ printf(" - Test file name: '%s'\n", H5_api_test_parallel_filename);
+ printf(" - Number of MPI ranks: %d\n", mpi_size);
+ printf(" - Test seed: %u\n", seed);
+ printf("\n\n");
}
BEGIN_INDEPENDENT_OP(create_fapl)
{
if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, FALSE)) < 0) {
if (MAINPROCESS)
- HDfprintf(stderr, "Unable to create FAPL\n");
+ fprintf(stderr, "Unable to create FAPL\n");
INDEPENDENT_OP_ERROR(create_fapl);
}
}
@@ -312,14 +312,14 @@ main(int argc, char **argv)
if ((is_registered = H5VLis_connector_registered_by_name(vol_connector_name)) < 0) {
if (MAINPROCESS)
- HDfprintf(stderr, "Unable to determine if VOL connector is registered\n");
+ fprintf(stderr, "Unable to determine if VOL connector is registered\n");
INDEPENDENT_OP_ERROR(check_vol_register);
}
if (!is_registered) {
if (MAINPROCESS)
- HDfprintf(stderr, "Specified VOL connector '%s' wasn't correctly registered!\n",
- vol_connector_name);
+ fprintf(stderr, "Specified VOL connector '%s' wasn't correctly registered!\n",
+ vol_connector_name);
INDEPENDENT_OP_ERROR(check_vol_register);
}
else {
@@ -330,20 +330,20 @@ main(int argc, char **argv)
*/
if (H5Pget_vol_id(fapl_id, &default_con_id) < 0) {
if (MAINPROCESS)
- HDfprintf(stderr, "Couldn't retrieve ID of VOL connector set on default FAPL\n");
+ fprintf(stderr, "Couldn't retrieve ID of VOL connector set on default FAPL\n");
INDEPENDENT_OP_ERROR(check_vol_register);
}
if ((registered_con_id = H5VLget_connector_id_by_name(vol_connector_name)) < 0) {
if (MAINPROCESS)
- HDfprintf(stderr, "Couldn't retrieve ID of registered VOL connector\n");
+ fprintf(stderr, "Couldn't retrieve ID of registered VOL connector\n");
INDEPENDENT_OP_ERROR(check_vol_register);
}
if (default_con_id != registered_con_id) {
if (MAINPROCESS)
- HDfprintf(stderr,
- "VOL connector set on default FAPL didn't match specified VOL connector\n");
+ fprintf(stderr,
+ "VOL connector set on default FAPL didn't match specified VOL connector\n");
INDEPENDENT_OP_ERROR(check_vol_register);
}
}
@@ -359,7 +359,7 @@ main(int argc, char **argv)
vol_cap_flags_g = H5VL_CAP_FLAG_NONE;
if (H5Pget_vol_cap_flags(fapl_id, &vol_cap_flags_g) < 0) {
if (MAINPROCESS)
- HDfprintf(stderr, "Unable to retrieve VOL connector capability flags\n");
+ fprintf(stderr, "Unable to retrieve VOL connector capability flags\n");
INDEPENDENT_OP_ERROR(get_capability_flags);
}
}
@@ -373,8 +373,8 @@ main(int argc, char **argv)
{
if (MAINPROCESS) {
if (create_test_container(H5_api_test_parallel_filename, vol_cap_flags_g) < 0) {
- HDfprintf(stderr, " failed to create testing container file '%s'\n",
- H5_api_test_parallel_filename);
+ fprintf(stderr, " failed to create testing container file '%s'\n",
+ H5_api_test_parallel_filename);
INDEPENDENT_OP_ERROR(create_test_container);
}
}
@@ -385,67 +385,67 @@ main(int argc, char **argv)
H5_api_test_run();
if (MAINPROCESS)
- HDprintf("Cleaning up testing files\n");
+ printf("Cleaning up testing files\n");
H5Fdelete(H5_api_test_parallel_filename, fapl_id);
if (n_tests_run_g > 0) {
if (MAINPROCESS)
- HDprintf("The below statistics are minimum values due to the possibility of some ranks failing a "
- "test while others pass:\n");
+ printf("The below statistics are minimum values due to the possibility of some ranks failing a "
+ "test while others pass:\n");
if (MPI_SUCCESS != MPI_Allreduce(MPI_IN_PLACE, &n_tests_passed_g, 1, MPI_UNSIGNED_LONG_LONG, MPI_MIN,
MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" failed to collect consensus about the minimum number of tests that passed -- "
- "reporting rank 0's (possibly inaccurate) value\n");
+ printf(" failed to collect consensus about the minimum number of tests that passed -- "
+ "reporting rank 0's (possibly inaccurate) value\n");
}
if (MAINPROCESS)
- HDprintf("%s%zu/%zu (%.2f%%) API tests passed across all ranks with VOL connector '%s'\n",
- n_tests_passed_g > 0 ? "At least " : "", n_tests_passed_g, n_tests_run_g,
- ((double)n_tests_passed_g / (double)n_tests_run_g * 100.0), vol_connector_name);
+ printf("%s%zu/%zu (%.2f%%) API tests passed across all ranks with VOL connector '%s'\n",
+ n_tests_passed_g > 0 ? "At least " : "", n_tests_passed_g, n_tests_run_g,
+ ((double)n_tests_passed_g / (double)n_tests_run_g * 100.0), vol_connector_name);
if (MPI_SUCCESS != MPI_Allreduce(MPI_IN_PLACE, &n_tests_failed_g, 1, MPI_UNSIGNED_LONG_LONG, MPI_MIN,
MPI_COMM_WORLD)) {
if (MAINPROCESS)
- HDprintf(" failed to collect consensus about the minimum number of tests that failed -- "
- "reporting rank 0's (possibly inaccurate) value\n");
+ printf(" failed to collect consensus about the minimum number of tests that failed -- "
+ "reporting rank 0's (possibly inaccurate) value\n");
}
if (MAINPROCESS) {
- HDprintf("%s%zu/%zu (%.2f%%) API tests did not pass across all ranks with VOL connector '%s'\n",
- n_tests_failed_g > 0 ? "At least " : "", n_tests_failed_g, n_tests_run_g,
- ((double)n_tests_failed_g / (double)n_tests_run_g * 100.0), vol_connector_name);
+ printf("%s%zu/%zu (%.2f%%) API tests did not pass across all ranks with VOL connector '%s'\n",
+ n_tests_failed_g > 0 ? "At least " : "", n_tests_failed_g, n_tests_run_g,
+ ((double)n_tests_failed_g / (double)n_tests_run_g * 100.0), vol_connector_name);
- HDprintf("%zu/%zu (%.2f%%) API tests were skipped with VOL connector '%s'\n", n_tests_skipped_g,
- n_tests_run_g, ((double)n_tests_skipped_g / (double)n_tests_run_g * 100.0),
- vol_connector_name);
+ printf("%zu/%zu (%.2f%%) API tests were skipped with VOL connector '%s'\n", n_tests_skipped_g,
+ n_tests_run_g, ((double)n_tests_skipped_g / (double)n_tests_run_g * 100.0),
+ vol_connector_name);
}
}
if (default_con_id >= 0 && H5VLclose(default_con_id) < 0) {
if (MAINPROCESS)
- HDfprintf(stderr, " failed to close VOL connector ID\n");
+ fprintf(stderr, " failed to close VOL connector ID\n");
}
if (registered_con_id >= 0 && H5VLclose(registered_con_id) < 0) {
if (MAINPROCESS)
- HDfprintf(stderr, " failed to close VOL connector ID\n");
+ fprintf(stderr, " failed to close VOL connector ID\n");
}
if (fapl_id >= 0 && H5Pclose(fapl_id) < 0) {
if (MAINPROCESS)
- HDfprintf(stderr, " failed to close MPI FAPL\n");
+ fprintf(stderr, " failed to close MPI FAPL\n");
}
H5close();
MPI_Finalize();
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
- HDfree(vol_connector_string_copy);
+ free(vol_connector_string_copy);
H5E_BEGIN_TRY
{
@@ -457,5 +457,5 @@ error:
MPI_Finalize();
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
diff --git a/testpar/API/t_bigio.c b/testpar/API/t_bigio.c
index 3e18c8f..febf0d5 100644
--- a/testpar/API/t_bigio.c
+++ b/testpar/API/t_bigio.c
@@ -133,16 +133,16 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "count[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "stride[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "block[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "total datapoints=%" PRIuHSIZE "\n",
- start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1],
- block[0] * block[1] * count[0] * count[1]);
+ printf("start[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "count[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "stride[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "block[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "total datapoints=%" PRIuHSIZE "\n",
+ start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1],
+ block[0] * block[1] * count[0] * count[1]);
k = 0;
for (i = 0; i < num_points; i++) {
- HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
+ printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
k += 2;
}
}
@@ -158,19 +158,19 @@ dataset_print(hsize_t start[], hsize_t block[], B_DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("%-8s", "Cols:");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3" PRIuHSIZE " ", start[1] + j);
+ printf("%3" PRIuHSIZE " ", start[1] + j);
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2" PRIuHSIZE ": ", i + start[0]);
+ printf("Row %2" PRIuHSIZE ": ", i + start[0]);
for (j = 0; j < block[1]; j++) {
- HDprintf("%" PRIuHSIZE " ", *dataptr++);
+ printf("%" PRIuHSIZE " ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -186,15 +186,15 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[],
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("verify_data dumping:::\n");
- HDprintf("start(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "count(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "stride(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "block(%" PRIuHSIZE ", %" PRIuHSIZE ")\n",
- start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1]);
- HDprintf("original values:\n");
+ printf("verify_data dumping:::\n");
+ printf("start(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "count(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "stride(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "block(%" PRIuHSIZE ", %" PRIuHSIZE ")\n",
+ start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1]);
+ printf("original values:\n");
dataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
dataset_print(start, block, dataset);
}
@@ -203,10 +203,10 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[],
for (j = 0; j < block[1]; j++) {
if (*dataset != *original) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%" PRIuHSIZE "][%" PRIuHSIZE "]"
- "(row %" PRIuHSIZE ", col %" PRIuHSIZE "): "
- "expect %" PRIuHSIZE ", got %" PRIuHSIZE "\n",
- i, j, i + start[0], j + start[1], *(original), *(dataset));
+ printf("Dataset Verify failed at [%" PRIuHSIZE "][%" PRIuHSIZE "]"
+ "(row %" PRIuHSIZE ", col %" PRIuHSIZE "): "
+ "expect %" PRIuHSIZE ", got %" PRIuHSIZE "\n",
+ i, j, i + start[0], j + start[1], *(original), *(dataset));
}
dataset++;
original++;
@@ -214,9 +214,9 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[],
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in verify_data\n", vrfyerrs);
+ printf("%d errors found in verify_data\n", vrfyerrs);
return (vrfyerrs);
}
@@ -314,12 +314,12 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t
break;
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
}
}
@@ -372,20 +372,20 @@ ccdataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("Print only the first block of the dataset\n");
- HDprintf("%-8s", "Cols:");
+ printf("Print only the first block of the dataset\n");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3lu ", (unsigned long)(start[1] + j));
+ printf("%3lu ", (unsigned long)(start[1] + j));
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2lu: ", (unsigned long)(i + start[0]));
+ printf("Row %2lu: ", (unsigned long)(i + start[0]));
for (j = 0; j < block[1]; j++) {
- HDprintf("%03d ", *dataptr++);
+ printf("%03d ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -402,14 +402,14 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("dataset_vrfy dumping:::\n");
- HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1]);
- HDprintf("original values:\n");
+ printf("dataset_vrfy dumping:::\n");
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1]);
+ printf("original values:\n");
ccdataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
ccdataset_print(start, block, dataset);
}
@@ -432,8 +432,8 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
}
if (*dataptr != *oriptr) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr));
+ printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr));
}
}
}
@@ -441,9 +441,9 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
+ printf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
return (vrfyerrs);
}
@@ -477,7 +477,7 @@ dataset_big_write(void)
B_DATATYPE *wdata;
/* allocate memory for data buffer */
- wdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE));
+ wdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE));
VRFY_G((wdata != NULL), "wdata malloc succeeded");
/* setup file access template */
@@ -495,7 +495,7 @@ dataset_big_write(void)
/* Each process takes a slabs of rows. */
if (mpi_rank_g == 0)
- HDprintf("\nTesting Dataset1 write by ROW\n");
+ printf("\nTesting Dataset1 write by ROW\n");
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = (hsize_t)mpi_size_g;
@@ -556,7 +556,7 @@ dataset_big_write(void)
/* Each process takes a slabs of cols. */
if (mpi_rank_g == 0)
- HDprintf("\nTesting Dataset2 write by COL\n");
+ printf("\nTesting Dataset2 write by COL\n");
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = (hsize_t)mpi_size_g;
@@ -617,7 +617,7 @@ dataset_big_write(void)
/* ALL selection */
if (mpi_rank_g == 0)
- HDprintf("\nTesting Dataset3 write select ALL proc 0, NONE others\n");
+ printf("\nTesting Dataset3 write select ALL proc 0, NONE others\n");
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = 1;
@@ -678,7 +678,7 @@ dataset_big_write(void)
/* Point selection */
if (mpi_rank_g == 0)
- HDprintf("\nTesting Dataset4 write point selection\n");
+ printf("\nTesting Dataset4 write point selection\n");
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = (hsize_t)(mpi_size_g * 4);
@@ -700,7 +700,7 @@ dataset_big_write(void)
num_points = bigcount;
- coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
VRFY_G((coords != NULL), "coords malloc succeeded");
set_coords(start, count, stride, block, num_points, coords, IN_ORDER);
@@ -749,7 +749,7 @@ dataset_big_write(void)
ret = H5Dclose(dataset);
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
- HDfree(wdata);
+ free(wdata);
H5Fclose(fid);
}
@@ -782,12 +782,12 @@ dataset_big_read(void)
herr_t ret; /* Generic return value */
/* allocate memory for data buffer */
- rdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE));
+ rdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE));
VRFY_G((rdata != NULL), "rdata malloc succeeded");
- wdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE));
+ wdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE));
VRFY_G((wdata != NULL), "wdata malloc succeeded");
- HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE));
+ memset(rdata, 0, bigcount * sizeof(B_DATATYPE));
/* setup file access template */
acc_tpl = H5Pcreate(H5P_FILE_ACCESS);
@@ -803,7 +803,7 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "");
if (mpi_rank_g == 0)
- HDprintf("\nRead Testing Dataset1 by COL\n");
+ printf("\nRead Testing Dataset1 by COL\n");
dataset = H5Dopen2(fid, DATASET1, H5P_DEFAULT);
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
@@ -854,7 +854,7 @@ dataset_big_read(void)
/* verify the read data with original expected data */
ret = verify_data(start, count, stride, block, rdata, wdata);
if (ret) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
@@ -866,8 +866,8 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
if (mpi_rank_g == 0)
- HDprintf("\nRead Testing Dataset2 by ROW\n");
- HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE));
+ printf("\nRead Testing Dataset2 by ROW\n");
+ memset(rdata, 0, bigcount * sizeof(B_DATATYPE));
dataset = H5Dopen2(fid, DATASET2, H5P_DEFAULT);
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
@@ -917,7 +917,7 @@ dataset_big_read(void)
/* verify the read data with original expected data */
ret = verify_data(start, count, stride, block, rdata, wdata);
if (ret) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
@@ -929,8 +929,8 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
if (mpi_rank_g == 0)
- HDprintf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n");
- HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE));
+ printf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n");
+ memset(rdata, 0, bigcount * sizeof(B_DATATYPE));
dataset = H5Dopen2(fid, DATASET3, H5P_DEFAULT);
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
@@ -982,7 +982,7 @@ dataset_big_read(void)
/* verify the read data with original expected data */
ret = verify_data(start, count, stride, block, rdata, wdata);
if (ret) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
}
@@ -995,7 +995,7 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
if (mpi_rank_g == 0)
- HDprintf("\nRead Testing Dataset4 with Point selection\n");
+ printf("\nRead Testing Dataset4 with Point selection\n");
dataset = H5Dopen2(fid, DATASET4, H5P_DEFAULT);
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
@@ -1020,7 +1020,7 @@ dataset_big_read(void)
num_points = bigcount;
- coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
VRFY_G((coords != NULL), "coords malloc succeeded");
set_coords(start, count, stride, block, num_points, coords, IN_ORDER);
@@ -1031,7 +1031,7 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "H5Sselect_elements succeeded");
if (coords)
- HDfree(coords);
+ free(coords);
/* create a memory dataspace */
/* Warning: H5Screate_simple requires an array of hsize_t elements
@@ -1057,7 +1057,7 @@ dataset_big_read(void)
ret = verify_data(start, count, stride, block, rdata, wdata);
if (ret) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
@@ -1068,8 +1068,8 @@ dataset_big_read(void)
ret = H5Dclose(dataset);
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
- HDfree(wdata);
- HDfree(rdata);
+ free(wdata);
+ free(rdata);
wdata = NULL;
rdata = NULL;
@@ -1096,9 +1096,9 @@ dataset_big_read(void)
/* release data buffers */
if (rdata)
- HDfree(rdata);
+ free(rdata);
if (wdata)
- HDfree(wdata);
+ free(wdata);
} /* dataset_large_readAll */
@@ -1106,7 +1106,7 @@ static void
single_rank_independent_io(void)
{
if (mpi_rank_g == 0)
- HDprintf("single_rank_independent_io\n");
+ printf("single_rank_independent_io\n");
if (MAIN_PROCESS) {
hsize_t dims[1];
@@ -1153,7 +1153,7 @@ single_rank_independent_io(void)
VRFY_G((ret >= 0), "H5Dwrite succeeded");
/* Wipe buffer */
- HDmemset(data, 0, dims[0] * sizeof(int));
+ memset(data, 0, dims[0] * sizeof(int));
/* Read data back */
ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_BLOCK, fspace_id, H5P_DEFAULT, data);
@@ -1162,7 +1162,7 @@ single_rank_independent_io(void)
/* Verify data */
for (i = 0; i < dims[0]; i++)
if (data[i] != (int)(i % (uint64_t)DXFER_BIGCOUNT)) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
@@ -1269,7 +1269,7 @@ coll_chunk1(void)
{
const char *filename = FILENAME[0];
if (mpi_rank_g == 0)
- HDprintf("coll_chunk1\n");
+ printf("coll_chunk1\n");
coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER);
coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER);
@@ -1322,7 +1322,7 @@ coll_chunk2(void)
{
const char *filename = FILENAME[0];
if (mpi_rank_g == 0)
- HDprintf("coll_chunk2\n");
+ printf("coll_chunk2\n");
coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER);
coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, POINT, OUT_OF_ORDER);
@@ -1374,7 +1374,7 @@ coll_chunk3(void)
{
const char *filename = FILENAME[0];
if (mpi_rank_g == 0)
- HDprintf("coll_chunk3\n");
+ printf("coll_chunk3\n");
coll_chunktest(filename, mpi_size_g, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER);
coll_chunktest(filename, mpi_size_g, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER);
@@ -1448,7 +1448,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
dims[1] = space_dim2;
/* allocate memory for data buffer */
- data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY_G((data_array1 != NULL), "data_array1 malloc succeeded");
/* set up dimensions of the slab this process accesses */
@@ -1456,7 +1456,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
/* set up the coords array selection */
num_points = block[0] * block[1] * count[0] * count[1];
- coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
VRFY_G((coords != NULL), "coords malloc succeeded");
point_set(start, count, stride, block, num_points, coords, mode);
@@ -1715,16 +1715,16 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
VRFY_G((status >= 0), "");
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
/* Use collective read to verify the correctness of collective write. */
/* allocate memory for data buffer */
- data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY_G((data_array1 != NULL), "data_array1 malloc succeeded");
/* allocate memory for data buffer */
- data_origin1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_origin1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY_G((data_origin1 != NULL), "data_origin1 malloc succeeded");
acc_plist = create_faccess_plist(comm, info, facc_type);
@@ -1847,11 +1847,11 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
int
@@ -1869,7 +1869,7 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0)
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ printf("Failed to turn off atexit processing. Continue.\n");
/* set alarm. */
/* TestAlarmOn(); */
@@ -1879,7 +1879,7 @@ main(int argc, char **argv)
/* Get the capability flag of the VOL connector being used */
if (H5Pget_vol_cap_flags(acc_plist, &vol_cap_flags_g) < 0) {
if (MAIN_PROCESS)
- HDprintf("Failed to get the capability flag of the VOL connector being used\n");
+ printf("Failed to get the capability flag of the VOL connector being used\n");
MPI_Finalize();
return 0;
@@ -1891,7 +1891,7 @@ main(int argc, char **argv)
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
if (MAIN_PROCESS)
- HDprintf(
+ printf(
"API functions for basic file, dataset basic or more aren't supported with this connector\n");
MPI_Finalize();
diff --git a/testpar/API/t_chunk_alloc.c b/testpar/API/t_chunk_alloc.c
index dd78225..715e0e5 100644
--- a/testpar/API/t_chunk_alloc.c
+++ b/testpar/API/t_chunk_alloc.c
@@ -115,7 +115,7 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_
VRFY((dataset >= 0), "");
if (write_pattern == sec_last) {
- HDmemset(buffer, 100, CHUNK_SIZE);
+ memset(buffer, 100, CHUNK_SIZE);
count[0] = 1;
stride[0] = 1;
@@ -241,7 +241,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti
/* all chunks are written by all the processes in an interleaved way*/
case write_all:
- HDmemset(buffer, mpi_rank + 1, CHUNK_SIZE);
+ memset(buffer, mpi_rank + 1, CHUNK_SIZE);
count[0] = 1;
stride[0] = 1;
block[0] = chunk_dims[0];
@@ -275,7 +275,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti
case open_only:
break;
default:
- HDassert(0);
+ assert(0);
}
/* Close up */
@@ -375,7 +375,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
block[0] = chunk_dims[0];
for (i = 0; i < nchunks; i++) {
/* reset buffer values */
- HDmemset(buffer, -1, CHUNK_SIZE);
+ memset(buffer, -1, CHUNK_SIZE);
offset[0] = (hsize_t)i * chunk_dims[0];
@@ -401,7 +401,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
value = 0;
break;
default:
- HDassert(0);
+ assert(0);
}
/* verify content of the chunk */
@@ -482,7 +482,7 @@ test_chunk_alloc(void)
filename = (const char *)PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Extend Chunked allocation test on file %s\n", filename);
+ printf("Extend Chunked allocation test on file %s\n", filename);
/* Case 1 */
/* Create chunked dataset without writing anything.*/
diff --git a/testpar/API/t_coll_chunk.c b/testpar/API/t_coll_chunk.c
index 57ee605..e68bc68 100644
--- a/testpar/API/t_coll_chunk.c
+++ b/testpar/API/t_coll_chunk.c
@@ -789,7 +789,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
dims[1] = SPACE_DIM2;
/* allocate memory for data buffer */
- data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* set up dimensions of the slab this process accesses */
@@ -797,7 +797,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
/* set up the coords array selection */
num_points = block[0] * block[1] * count[0] * count[1];
- coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
point_set(start, count, stride, block, num_points, coords, mode);
@@ -1054,16 +1054,16 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
VRFY((status >= 0), "");
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
/* Use collective read to verify the correctness of collective write. */
/* allocate memory for data buffer */
- data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* allocate memory for data buffer */
- data_origin1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_origin1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
acc_plist = create_faccess_plist(comm, info, facc_type);
@@ -1182,11 +1182,11 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/* Set up the selection */
@@ -1283,12 +1283,12 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t
break;
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
}
}
@@ -1341,20 +1341,20 @@ ccdataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("Print only the first block of the dataset\n");
- HDprintf("%-8s", "Cols:");
+ printf("Print only the first block of the dataset\n");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3lu ", (unsigned long)(start[1] + j));
+ printf("%3lu ", (unsigned long)(start[1] + j));
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2lu: ", (unsigned long)(i + start[0]));
+ printf("Row %2lu: ", (unsigned long)(i + start[0]));
for (j = 0; j < block[1]; j++) {
- HDprintf("%03d ", *dataptr++);
+ printf("%03d ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -1371,14 +1371,14 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("dataset_vrfy dumping:::\n");
- HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1]);
- HDprintf("original values:\n");
+ printf("dataset_vrfy dumping:::\n");
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1]);
+ printf("original values:\n");
ccdataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
ccdataset_print(start, block, dataset);
}
@@ -1401,8 +1401,8 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
}
if (*dataptr != *oriptr) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr));
+ printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr));
}
}
}
@@ -1410,8 +1410,8 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
+ printf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
return (vrfyerrs);
}
diff --git a/testpar/API/t_coll_md_read.c b/testpar/API/t_coll_md_read.c
index 1c37ba7..353d5f6 100644
--- a/testpar/API/t_coll_md_read.c
+++ b/testpar/API/t_coll_md_read.c
@@ -113,7 +113,7 @@ test_partial_no_selection_coll_md_read(void)
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
VRFY((file_id >= 0), "H5Fcreate succeeded");
- dataset_dims = HDmalloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims));
+ dataset_dims = malloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims));
VRFY((dataset_dims != NULL), "malloc succeeded");
dataset_dims[0] = (hsize_t)PARTIAL_NO_SELECTION_Y_DIM_SCALE * (hsize_t)mpi_size;
@@ -159,8 +159,8 @@ test_partial_no_selection_coll_md_read(void)
mspace_id = H5Screate_simple(1, sel_dims, NULL);
VRFY((mspace_id >= 0), "H5Screate_simple succeeded");
- data = HDcalloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
- sizeof(int));
+ data = calloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
+ sizeof(int));
VRFY((data != NULL), "calloc succeeded");
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
@@ -183,8 +183,8 @@ test_partial_no_selection_coll_md_read(void)
VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, H5FD_MPIO_CHUNK_ONE_IO) >= 0),
"H5Pset_dxpl_mpio_chunk_opt succeeded");
- read_buf = HDmalloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
- sizeof(int));
+ read_buf = malloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
+ sizeof(int));
VRFY((read_buf != NULL), "malloc succeeded");
/*
@@ -205,24 +205,24 @@ test_partial_no_selection_coll_md_read(void)
* Check data integrity just to be sure.
*/
if (!PARTIAL_NO_SELECTION_NO_SEL_PROCESS) {
- VRFY((!HDmemcmp(data, read_buf,
- count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
- sizeof(int))),
+ VRFY((!memcmp(data, read_buf,
+ count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
+ sizeof(int))),
"memcmp succeeded");
}
if (dataset_dims) {
- HDfree(dataset_dims);
+ free(dataset_dims);
dataset_dims = NULL;
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -346,13 +346,13 @@ test_multi_chunk_io_addrmap_issue(void)
VRFY((H5Fflush(file_id, H5F_SCOPE_GLOBAL) >= 0), "H5Fflush succeeded");
- read_buf = HDmalloc(50 * sizeof(int));
+ read_buf = malloc(50 * sizeof(int));
VRFY((read_buf != NULL), "malloc succeeded");
VRFY((H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "H5Dread succeeded");
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -479,7 +479,7 @@ test_link_chunk_io_sort_chunk_issue(void)
mspace_id = H5Screate_simple(1, sel_dims, NULL);
VRFY((mspace_id >= 0), "H5Screate_simple succeeded");
- data = HDcalloc(1, count[0] * sizeof(int));
+ data = calloc(1, count[0] * sizeof(int));
VRFY((data != NULL), "calloc succeeded");
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
@@ -502,7 +502,7 @@ test_link_chunk_io_sort_chunk_issue(void)
VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, H5FD_MPIO_CHUNK_ONE_IO) >= 0),
"H5Pset_dxpl_mpio_chunk_opt succeeded");
- read_buf = HDmalloc(count[0] * sizeof(int));
+ read_buf = malloc(count[0] * sizeof(int));
VRFY((read_buf != NULL), "malloc succeeded");
VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -522,12 +522,12 @@ test_link_chunk_io_sort_chunk_issue(void)
"H5Dread succeeded");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
diff --git a/testpar/API/t_dset.c b/testpar/API/t_dset.c
index dd8e58c..40ac75e 100644
--- a/testpar/API/t_dset.c
+++ b/testpar/API/t_dset.c
@@ -57,7 +57,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set BYROW\n");
+ printf("slab_set BYROW\n");
break;
case BYCOL:
/* Each process takes a block of columns. */
@@ -70,7 +70,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = (hsize_t)mpi_rank * block[1];
if (VERBOSE_MED)
- HDprintf("slab_set BYCOL\n");
+ printf("slab_set BYCOL\n");
break;
case ZROW:
/* Similar to BYROW except process 0 gets 0 row */
@@ -83,7 +83,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = (mpi_rank ? (hsize_t)mpi_rank * block[0] : 0);
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set ZROW\n");
+ printf("slab_set ZROW\n");
break;
case ZCOL:
/* Similar to BYCOL except process 0 gets 0 column */
@@ -96,11 +96,11 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = (mpi_rank ? (hsize_t)mpi_rank * block[1] : 0);
if (VERBOSE_MED)
- HDprintf("slab_set ZCOL\n");
+ printf("slab_set ZCOL\n");
break;
default:
/* Unknown mode. Set it to cover the whole dataset. */
- HDprintf("unknown slab_set mode (%d)\n", mode);
+ printf("unknown slab_set mode (%d)\n", mode);
block[0] = (hsize_t)dim0;
block[1] = (hsize_t)dim1;
stride[0] = block[0];
@@ -110,16 +110,16 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set wholeset\n");
+ printf("slab_set wholeset\n");
break;
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
}
}
@@ -156,15 +156,15 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
k = 0;
for (i = 0; i < num_points; i++) {
- HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
+ printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
k += 2;
}
}
@@ -199,19 +199,19 @@ dataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("%-8s", "Cols:");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3lu ", (unsigned long)(start[1] + j));
+ printf("%3lu ", (unsigned long)(start[1] + j));
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2lu: ", (unsigned long)(i + start[0]));
+ printf("Row %2lu: ", (unsigned long)(i + start[0]));
for (j = 0; j < block[1]; j++) {
- HDprintf("%03d ", *dataptr++);
+ printf("%03d ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -227,14 +227,14 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("dataset_vrfy dumping:::\n");
- HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1]);
- HDprintf("original values:\n");
+ printf("dataset_vrfy dumping:::\n");
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1]);
+ printf("original values:\n");
dataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
dataset_print(start, block, dataset);
}
@@ -243,9 +243,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
for (j = 0; j < block[1]; j++) {
if (*dataset != *original) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]),
- (unsigned long)(j + start[1]), *(original), *(dataset));
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]),
+ (unsigned long)(j + start[1]), *(original), *(dataset));
}
dataset++;
original++;
@@ -253,9 +253,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in dataset_vrfy\n", vrfyerrs);
+ printf("%d errors found in dataset_vrfy\n", vrfyerrs);
return (vrfyerrs);
}
@@ -296,7 +296,7 @@ dataset_writeInd(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Independent write test on file %s\n", filename);
+ printf("Independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -316,8 +316,8 @@ dataset_writeInd(void)
}
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* ----------------------------------------
* CREATE AN HDF5 FILE WITH PARALLEL ACCESS
@@ -384,7 +384,7 @@ dataset_writeInd(void)
/* setup dimensions again to write with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("writeInd by some with zero row\n");
+ printf("writeInd by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -419,7 +419,7 @@ dataset_writeInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/* Example of using the parallel HDF5 library to read a dataset */
@@ -447,7 +447,7 @@ dataset_readInd(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Independent read test on file %s\n", filename);
+ printf("Independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -467,10 +467,10 @@ dataset_readInd(void)
}
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* setup file access template */
acc_tpl = create_faccess_plist(comm, info, facc_type);
@@ -540,9 +540,9 @@ dataset_readInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -590,7 +590,7 @@ dataset_writeAll(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Collective write test on file %s\n", filename);
+ printf("Collective write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -611,12 +611,12 @@ dataset_writeAll(void)
/* set up the coords array selection */
num_points = (size_t)dim1;
- coords = (hsize_t *)HDmalloc((size_t)dim1 * (size_t)RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)dim1 * (size_t)RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -722,7 +722,7 @@ dataset_writeAll(void)
/* setup dimensions again to writeAll with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("writeAll by some with zero row\n");
+ printf("writeAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -787,7 +787,7 @@ dataset_writeAll(void)
/* setup dimensions again to writeAll with zero columns for process 0 */
if (VERBOSE_MED)
- HDprintf("writeAll by some with zero col\n");
+ printf("writeAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -927,7 +927,7 @@ dataset_writeAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
block[0] = 1;
@@ -1076,9 +1076,9 @@ dataset_writeAll(void)
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/*
@@ -1119,7 +1119,7 @@ dataset_readAll(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Collective read test on file %s\n", filename);
+ printf("Collective read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -1140,14 +1140,14 @@ dataset_readAll(void)
/* set up the coords array selection */
num_points = (size_t)dim1;
- coords = (hsize_t *)HDmalloc((size_t)dim0 * (size_t)dim1 * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)dim0 * (size_t)dim1 * RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -1229,7 +1229,7 @@ dataset_readAll(void)
/* setup dimensions again to readAll with zero columns for process 0 */
if (VERBOSE_MED)
- HDprintf("readAll by some with zero col\n");
+ printf("readAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1296,7 +1296,7 @@ dataset_readAll(void)
/* setup dimensions again to readAll with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("readAll by some with zero row\n");
+ printf("readAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1323,9 +1323,9 @@ dataset_readAll(void)
free(data_array1);
if (data_origin1)
free(data_origin1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
block[0] = 1;
@@ -1384,7 +1384,7 @@ dataset_readAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* Dataset6: point selection in File - Point selection in Memory*/
@@ -1430,7 +1430,7 @@ dataset_readAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* Dataset7: point selection in memory - All selection in file*/
@@ -1498,11 +1498,11 @@ dataset_readAll(void)
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -1546,7 +1546,7 @@ extend_writeInd(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -1570,8 +1570,8 @@ extend_writeInd(void)
chunk_dims[1] = (hsize_t)chunkdim1;
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -1611,7 +1611,7 @@ extend_writeInd(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims);
@@ -1742,7 +1742,7 @@ extend_writeInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/*
@@ -1774,7 +1774,7 @@ extend_writeInd2(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Extend independent write test #2 on file %s\n", filename);
+ printf("Extend independent write test #2 on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -1844,8 +1844,8 @@ extend_writeInd2(void)
if (VERBOSE_MED) {
MESG("writing at offset zero: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", written[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", written[i]);
+ printf("\n");
}
ret = H5Dwrite(dataset, H5T_NATIVE_INT, ms, fs, H5P_DEFAULT, written);
VRFY((ret >= 0), "H5Dwrite succeeded");
@@ -1857,15 +1857,15 @@ extend_writeInd2(void)
VRFY((ret >= 0), "H5Dread succeeded");
for (i = 0; i < (int)orig_size; i++)
if (written[i] != retrieved[i]) {
- HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
- written[i], i, retrieved[i]);
+ printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
+ written[i], i, retrieved[i]);
nerrors++;
}
if (VERBOSE_MED) {
MESG("read at offset zero: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", retrieved[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", retrieved[i]);
+ printf("\n");
}
/* -------------------------
@@ -1887,8 +1887,8 @@ extend_writeInd2(void)
if (VERBOSE_MED) {
MESG("writing at offset 10: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", written[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", written[i]);
+ printf("\n");
}
ret = H5Sselect_hyperslab(fs, H5S_SELECT_SET, &orig_size, NULL, &one, &orig_size);
VRFY((ret >= 0), "H5Sselect_hyperslab succeeded");
@@ -1902,15 +1902,15 @@ extend_writeInd2(void)
VRFY((ret >= 0), "H5Dread succeeded");
for (i = 0; i < (int)orig_size; i++)
if (written[i] != retrieved[i]) {
- HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
- written[i], i, retrieved[i]);
+ printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
+ written[i], i, retrieved[i]);
nerrors++;
}
if (VERBOSE_MED) {
MESG("read at offset 10: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", retrieved[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", retrieved[i]);
+ printf("\n");
}
/* Close dataset collectively */
@@ -1949,7 +1949,7 @@ extend_readInd(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Extend independent read test on file %s\n", filename);
+ printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -1969,12 +1969,12 @@ extend_readInd(void)
}
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array2 != NULL), "data_array2 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -2094,11 +2094,11 @@ extend_readInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_array2)
- HDfree(data_array2);
+ free(data_array2);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -2143,7 +2143,7 @@ extend_writeAll(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -2167,8 +2167,8 @@ extend_writeAll(void)
chunk_dims[1] = (hsize_t)chunkdim1;
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -2208,7 +2208,7 @@ extend_writeAll(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims);
@@ -2362,7 +2362,7 @@ extend_writeAll(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/* Example of using the parallel HDF5 library to read an extendible dataset */
@@ -2393,7 +2393,7 @@ extend_readAll(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Extend independent read test on file %s\n", filename);
+ printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -2413,12 +2413,12 @@ extend_readAll(void)
}
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array2 != NULL), "data_array2 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -2560,11 +2560,11 @@ extend_readAll(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_array2)
- HDfree(data_array2);
+ free(data_array2);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -2596,7 +2596,7 @@ compress_readAll(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Collective chunked dataset read test on file %s\n", filename);
+ printf("Collective chunked dataset read test on file %s\n", filename);
/* Retrieve MPI parameters */
MPI_Comm_size(comm, &mpi_size);
@@ -2614,10 +2614,10 @@ compress_readAll(void)
}
/* Allocate data buffer */
- data_orig = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE));
- VRFY((data_orig != NULL), "data_origin1 HDmalloc succeeded");
- data_read = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE));
- VRFY((data_read != NULL), "data_array1 HDmalloc succeeded");
+ data_orig = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE));
+ VRFY((data_orig != NULL), "data_origin1 malloc succeeded");
+ data_read = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE));
+ VRFY((data_read != NULL), "data_array1 malloc succeeded");
/* Initialize data buffers */
for (u = 0; u < dim; u++)
@@ -2727,8 +2727,8 @@ compress_readAll(void)
/* Verify data read */
for (u = 0; u < dim; u++)
if (data_orig[u] != data_read[u]) {
- HDprintf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__,
- (unsigned)u, data_orig[u], (unsigned)u, data_read[u]);
+ printf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__,
+ (unsigned)u, data_orig[u], (unsigned)u, data_read[u]);
nerrors++;
}
@@ -2750,9 +2750,9 @@ compress_readAll(void)
/* release data buffers */
if (data_read)
- HDfree(data_read);
+ free(data_read);
if (data_orig)
- HDfree(data_orig);
+ free(data_orig);
}
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2799,7 +2799,7 @@ none_selection_chunk(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -2841,7 +2841,7 @@ none_selection_chunk(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims);
@@ -2874,11 +2874,11 @@ none_selection_chunk(void)
/* allocate memory for data buffer. Only allocate enough buffer for
* each processor's data. */
if (mpi_rank) {
- data_origin = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE));
- VRFY((data_origin != NULL), "data_origin HDmalloc succeeded");
+ data_origin = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE));
+ VRFY((data_origin != NULL), "data_origin malloc succeeded");
- data_array = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* put some trivial data in the data_array */
mstart[0] = mstart[1] = 0;
@@ -2973,9 +2973,9 @@ none_selection_chunk(void)
/* release data buffers */
if (data_origin)
- HDfree(data_origin);
+ free(data_origin);
if (data_array)
- HDfree(data_array);
+ free(data_array);
}
/* Function: test_actual_io_mode
@@ -3116,13 +3116,13 @@ test_actual_io_mode(int selection_mode)
MPI_Barrier(MPI_COMM_WORLD);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = MPI_COMM_WORLD;
mpi_info = MPI_INFO_NULL;
filename = (const char *)PARATESTFILE /* GetTestParameters() */;
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* Setup the file access template */
fapl = create_faccess_plist(mpi_comm, mpi_info, facc_type);
@@ -3333,8 +3333,8 @@ test_actual_io_mode(int selection_mode)
length = dim0 * dim1;
/* Allocate and initialize the buffer */
- buffer = (int *)HDmalloc(sizeof(int) * (size_t)length);
- VRFY((buffer != NULL), "HDmalloc of buffer succeeded");
+ buffer = (int *)malloc(sizeof(int) * (size_t)length);
+ VRFY((buffer != NULL), "malloc of buffer succeeded");
for (i = 0; i < length; i++)
buffer[i] = i;
@@ -3418,8 +3418,8 @@ test_actual_io_mode(int selection_mode)
VRFY((actual_io_mode_write == actual_io_mode_expected), message);
}
else {
- HDfprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write,
- actual_io_mode_write);
+ fprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write,
+ actual_io_mode_write);
}
/* To test that the property is successfully reset to the default, we perform some
@@ -3484,7 +3484,7 @@ test_actual_io_mode(int selection_mode)
VRFY((ret >= 0), "H5Sclose succeeded");
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
- HDfree(buffer);
+ free(buffer);
return;
}
@@ -3517,7 +3517,7 @@ actual_io_mode_tests(void)
if (mpi_size > 2)
test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX);
else
- HDfprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n");
+ fprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n");
test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE);
@@ -3638,7 +3638,7 @@ test_no_collective_cause_mode(int selection_mode)
MPI_Barrier(MPI_COMM_WORLD);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = MPI_COMM_WORLD;
mpi_info = MPI_INFO_NULL;
@@ -3680,7 +3680,7 @@ test_no_collective_cause_mode(int selection_mode)
}
filename = (const char *)PARATESTFILE /* GetTestParameters() */;
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* Setup the file access template */
fapl = create_faccess_plist(mpi_comm, mpi_info, l_facc_type);
@@ -3768,8 +3768,8 @@ test_no_collective_cause_mode(int selection_mode)
length = (int)(dims[0] * dims[1]);
/* Allocate and initialize the buffer */
- buffer = (int *)HDmalloc(sizeof(int) * (size_t)length);
- VRFY((buffer != NULL), "HDmalloc of buffer succeeded");
+ buffer = (int *)malloc(sizeof(int) * (size_t)length);
+ VRFY((buffer != NULL), "malloc of buffer succeeded");
for (i = 0; i < length; i++)
buffer[i] = i;
@@ -3835,11 +3835,11 @@ test_no_collective_cause_mode(int selection_mode)
"reading and writing are the same for global cause of Broken Collective I/O");
/* Test values */
- HDmemset(message, 0, sizeof(message));
+ memset(message, 0, sizeof(message));
HDsnprintf(message, sizeof(message),
"Local cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message);
- HDmemset(message, 0, sizeof(message));
+ memset(message, 0, sizeof(message));
HDsnprintf(message, sizeof(message),
"Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message);
@@ -3861,7 +3861,7 @@ test_no_collective_cause_mode(int selection_mode)
H5Sclose(file_space);
if (fid)
H5Fclose(fid);
- HDfree(buffer);
+ free(buffer);
/* clean up external file */
if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL)
@@ -3946,11 +3946,11 @@ dataset_atomicity(void)
dim1 = 32;
filename = PARATESTFILE /* GetTestParameters() */;
if (facc_type != FACC_MPIO) {
- HDprintf("Atomicity tests will not work without the MPIO VFD\n");
+ printf("Atomicity tests will not work without the MPIO VFD\n");
return;
}
if (VERBOSE_MED)
- HDprintf("atomic writes to file %s\n", filename);
+ printf("atomic writes to file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -3971,11 +3971,11 @@ dataset_atomicity(void)
buf_size = dim0 * dim1;
/* allocate memory for data buffer */
- write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((write_buf != NULL), "write_buf HDcalloc succeeded");
+ write_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((write_buf != NULL), "write_buf calloc succeeded");
/* allocate memory for data buffer */
- read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((read_buf != NULL), "read_buf HDcalloc succeeded");
+ read_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((read_buf != NULL), "read_buf calloc succeeded");
/* setup file access template */
acc_tpl = create_faccess_plist(comm, info, facc_type);
@@ -4095,9 +4095,9 @@ dataset_atomicity(void)
j = 0;
k = 0;
for (i = 0; i < dim0; i++) {
- HDprintf("\n");
+ printf("\n");
for (j = 0; j < dim1; j++)
- HDprintf("%d ", read_buf[k++]);
+ printf("%d ", read_buf[k++]);
}
}
@@ -4111,8 +4111,8 @@ dataset_atomicity(void)
"Atomicity Test Failed Process %d: Value read should be 0 or 5\n");
for (i = 1; i < buf_size; i++) {
if (read_buf[i] != compare) {
- HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i,
- read_buf[i], compare);
+ printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i,
+ read_buf[i], compare);
nerrors++;
}
}
@@ -4123,20 +4123,20 @@ dataset_atomicity(void)
/* release data buffers */
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
/* open dataset2 (non-contiguous case) */
dataset2 = H5Dopen2(fid, DATASETNAME6, H5P_DEFAULT);
VRFY((dataset2 >= 0), "H5Dopen2 succeeded");
/* allocate memory for data buffer */
- write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((write_buf != NULL), "write_buf HDcalloc succeeded");
+ write_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((write_buf != NULL), "write_buf calloc succeeded");
/* allocate memory for data buffer */
- read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((read_buf != NULL), "read_buf HDcalloc succeeded");
+ read_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((read_buf != NULL), "read_buf calloc succeeded");
for (i = 0; i < buf_size; i++) {
write_buf[i] = 5;
@@ -4195,11 +4195,11 @@ dataset_atomicity(void)
j = 0;
k = 0;
for (i = 0; i < dim0; i++) {
- HDprintf("\n");
+ printf("\n");
for (j = 0; j < dim1; j++)
- HDprintf("%d ", read_buf[k++]);
+ printf("%d ", read_buf[k++]);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -4231,8 +4231,8 @@ dataset_atomicity(void)
continue;
}
else if (compare != read_buf[k]) {
- HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank,
- k, read_buf[k], compare);
+ printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank,
+ k, read_buf[k], compare);
nerrors++;
}
k++;
@@ -4249,9 +4249,9 @@ dataset_atomicity(void)
/* release data buffers */
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
@@ -4294,7 +4294,7 @@ test_dense_attr(void)
/* get filename */
filename = (const char *)PARATESTFILE /* GetTestParameters() */;
- HDassert(filename != NULL);
+ assert(filename != NULL);
fpid = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fpid > 0), "H5Pcreate succeeded");
diff --git a/testpar/API/t_file.c b/testpar/API/t_file.c
index a96f593..ccd4e6e 100644
--- a/testpar/API/t_file.c
+++ b/testpar/API/t_file.c
@@ -71,7 +71,7 @@ test_split_comm_access(void)
filename = (const char *)PARATESTFILE /* GetTestParameters()*/;
if (VERBOSE_MED)
- HDprintf("Split Communicator access test on file %s\n", filename);
+ printf("Split Communicator access test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -151,7 +151,7 @@ test_page_buffer_access(void)
filename = (const char *)GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Page Buffer Usage in Parallel %s\n", filename);
+ printf("Page Buffer Usage in Parallel %s\n", filename);
fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
VRFY((fapl >= 0), "create_faccess_plist succeeded");
@@ -192,7 +192,7 @@ test_page_buffer_access(void)
ret = H5Pset_file_space_page_size(fcpl, sizeof(int) * 100);
VRFY((ret == 0), "");
- data = (int *)HDmalloc(sizeof(int) * (size_t)num_elements);
+ data = (int *)malloc(sizeof(int) * (size_t)num_elements);
/* initialize all the elements to have a value of -1 */
for (i = 0; i < num_elements; i++)
@@ -441,7 +441,7 @@ test_page_buffer_access(void)
api_ctx_pushed = FALSE;
}
- HDfree(data);
+ free(data);
data = NULL;
MPI_Barrier(MPI_COMM_WORLD);
}
@@ -515,8 +515,8 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
num_elements = block[0] * block[1];
/* allocate memory for data buffer */
- data_array = (DATATYPE *)HDmalloc(num_elements * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(num_elements * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* put some trivial data in the data_array */
for (i = 0; i < num_elements; i++)
data_array[i] = mpi_rank + 1;
@@ -557,7 +557,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDmemset(data_array, 0, num_elements * sizeof(DATATYPE));
+ memset(data_array, 0, num_elements * sizeof(DATATYPE));
dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
@@ -598,7 +598,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
}
MPI_Barrier(MPI_COMM_WORLD);
- HDfree(data_array);
+ free(data_array);
return 0;
} /* create_file */
@@ -674,8 +674,8 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
num_elements = block[0] * block[1];
/* allocate memory for data buffer */
- data_array = (DATATYPE *)HDmalloc(num_elements * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(num_elements * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* create a memory dataspace independently */
mem_dataspace = H5Screate_simple(1, &num_elements, NULL);
@@ -727,8 +727,8 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->is_dirty == FALSE);
if (!entry_ptr->is_pinned && !entry_ptr->is_protected) {
ret = H5AC_expunge_entry(f, entry_ptr->type, entry_ptr->addr, 0);
@@ -761,7 +761,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
api_ctx_pushed = FALSE;
}
- HDfree(data_array);
+ free(data_array);
return nerrors;
}
diff --git a/testpar/API/t_file_image.c b/testpar/API/t_file_image.c
index 8edf0654..16cd521 100644
--- a/testpar/API/t_file_image.c
+++ b/testpar/API/t_file_image.c
@@ -127,7 +127,7 @@ file_image_daisy_chain_test(void)
* to -1 everywhere else.
*/
- vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int));
+ vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int));
VRFY((vector_ptr != NULL), "allocated in memory representation of vector");
vector_ptr[0] = 0;
@@ -137,7 +137,7 @@ file_image_daisy_chain_test(void)
err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
VRFY((err >= 0), "wrote initial data to vector.");
- HDfree(vector_ptr);
+ free(vector_ptr);
vector_ptr = NULL;
/* 3) Flush the core file, and get an image of it. Close
@@ -149,7 +149,7 @@ file_image_daisy_chain_test(void)
image_len = H5Fget_file_image(file_id, NULL, (size_t)0);
VRFY((image_len > 0), "got image file size");
- image_ptr = (void *)HDmalloc((size_t)image_len);
+ image_ptr = (void *)malloc((size_t)image_len);
VRFY(image_ptr != NULL, "allocated file image buffer.");
bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len);
@@ -175,7 +175,7 @@ file_image_daisy_chain_test(void)
mpi_result = MPI_Ssend((void *)image_ptr, (int)image_len, MPI_BYTE, 1, 0, MPI_COMM_WORLD);
VRFY((mpi_result == MPI_SUCCESS), "sent image to process 1");
- HDfree(image_ptr);
+ free(image_ptr);
image_ptr = NULL;
image_len = 0;
@@ -185,7 +185,7 @@ file_image_daisy_chain_test(void)
MPI_COMM_WORLD, &rcvstat);
VRFY((mpi_result == MPI_SUCCESS), "received image len from process n-1");
- image_ptr = (void *)HDmalloc((size_t)image_len);
+ image_ptr = (void *)malloc((size_t)image_len);
VRFY(image_ptr != NULL, "allocated file image receive buffer.");
mpi_result =
@@ -227,7 +227,7 @@ file_image_daisy_chain_test(void)
VRFY((space_ndims == 1), "verified data space num dims(2)");
VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims");
- vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int));
+ vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int));
VRFY((vector_ptr != NULL), "allocated in memory rep of vector");
err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
@@ -239,7 +239,7 @@ file_image_daisy_chain_test(void)
vector_ok = FALSE;
VRFY((vector_ok), "verified received vector.");
- HDfree(vector_ptr);
+ free(vector_ptr);
vector_ptr = NULL;
/* 7) closes the core file and exit. */
@@ -256,7 +256,7 @@ file_image_daisy_chain_test(void)
err = H5Pclose(fapl_id);
VRFY((err >= 0), "closed fapl(1).");
- HDfree(image_ptr);
+ free(image_ptr);
image_ptr = NULL;
image_len = 0;
}
@@ -267,7 +267,7 @@ file_image_daisy_chain_test(void)
MPI_COMM_WORLD, &rcvstat);
VRFY((mpi_result == MPI_SUCCESS), "received image size from process mpi_rank-1");
- image_ptr = (void *)HDmalloc((size_t)image_len);
+ image_ptr = (void *)malloc((size_t)image_len);
VRFY(image_ptr != NULL, "allocated file image receive buffer.");
mpi_result =
@@ -310,7 +310,7 @@ file_image_daisy_chain_test(void)
VRFY((space_ndims == 1), "verified data space num dims(2)");
VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims");
- vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int));
+ vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int));
VRFY((vector_ptr != NULL), "allocated in memory rep of vector");
err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
@@ -336,7 +336,7 @@ file_image_daisy_chain_test(void)
err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
VRFY((err >= 0), "wrote modified data to vector.");
- HDfree(vector_ptr);
+ free(vector_ptr);
vector_ptr = NULL;
/* 4) Flush the core file and send it to process (mpi_rank + 1) % n. */
@@ -347,7 +347,7 @@ file_image_daisy_chain_test(void)
image_len = H5Fget_file_image(file_id, NULL, (size_t)0);
VRFY((image_len > 0), "got (possibly modified) image file len");
- image_ptr = (void *)HDrealloc((void *)image_ptr, (size_t)image_len);
+ image_ptr = (void *)realloc((void *)image_ptr, (size_t)image_len);
VRFY(image_ptr != NULL, "re-allocated file image buffer.");
bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len);
@@ -361,7 +361,7 @@ file_image_daisy_chain_test(void)
MPI_COMM_WORLD);
VRFY((mpi_result == MPI_SUCCESS), "sent image to process (mpi_rank + 1) % mpi_size");
- HDfree(image_ptr);
+ free(image_ptr);
image_ptr = NULL;
image_len = 0;
diff --git a/testpar/API/t_filter_read.c b/testpar/API/t_filter_read.c
index 64b69b2..4b62e55 100644
--- a/testpar/API/t_filter_read.c
+++ b/testpar/API/t_filter_read.c
@@ -129,11 +129,11 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size)
VRFY(sid >= 0, "H5Screate_simple");
/* Create buffers */
- points = (int *)HDmalloc(size[0] * size[1] * sizeof(int));
- VRFY(points != NULL, "HDmalloc");
+ points = (int *)malloc(size[0] * size[1] * sizeof(int));
+ VRFY(points != NULL, "malloc");
- check = (int *)HDmalloc(hs_size[0] * hs_size[1] * sizeof(int));
- VRFY(check != NULL, "HDmalloc");
+ check = (int *)malloc(hs_size[0] * hs_size[1] * sizeof(int));
+ VRFY(check != NULL, "malloc");
/* Initialize writing buffer with random data */
for (i = 0; i < size[0]; i++)
@@ -196,12 +196,11 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size)
for (i = 0; i < hs_size[0]; i++) {
for (j = 0; j < hs_size[1]; j++) {
if (points[i * size[1] + (size_t)hs_offset[1] + j] != check[i * hs_size[1] + j]) {
- HDfprintf(stderr, " Read different values than written.\n");
- HDfprintf(stderr, " At index %lu,%lu\n", (unsigned long)(i),
- (unsigned long)(hs_offset[1] + j));
- HDfprintf(stderr, " At original: %d\n",
- (int)points[i * size[1] + (size_t)hs_offset[1] + j]);
- HDfprintf(stderr, " At returned: %d\n", (int)check[i * hs_size[1] + j]);
+ fprintf(stderr, " Read different values than written.\n");
+ fprintf(stderr, " At index %lu,%lu\n", (unsigned long)(i),
+ (unsigned long)(hs_offset[1] + j));
+ fprintf(stderr, " At original: %d\n", (int)points[i * size[1] + (size_t)hs_offset[1] + j]);
+ fprintf(stderr, " At returned: %d\n", (int)check[i * hs_size[1] + j]);
VRFY(FALSE, "");
}
}
@@ -228,8 +227,8 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size)
hrc = H5Fclose(file);
VRFY(hrc >= 0, "H5Fclose");
- HDfree(points);
- HDfree(check);
+ free(points);
+ free(check);
MPI_Barrier(MPI_COMM_WORLD);
}
@@ -285,7 +284,7 @@ test_filter_read(void)
filename = PARATESTFILE /* GetTestParameters() */;
if (VERBOSE_MED)
- HDprintf("Parallel reading of dataset written with filters %s\n", filename);
+ printf("Parallel reading of dataset written with filters %s\n", filename);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
diff --git a/testpar/API/t_mdset.c b/testpar/API/t_mdset.c
index c53ec2c..cc49e7b 100644
--- a/testpar/API/t_mdset.c
+++ b/testpar/API/t_mdset.c
@@ -185,8 +185,8 @@ multiple_dset_write(void)
return;
}
- outme = HDmalloc((size_t)size * (size_t)size * sizeof(double));
- VRFY((outme != NULL), "HDmalloc succeeded for outme");
+ outme = malloc((size_t)size * (size_t)size * sizeof(double));
+ VRFY((outme != NULL), "malloc succeeded for outme");
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
VRFY((plist >= 0), "create_faccess_plist succeeded");
@@ -225,7 +225,7 @@ multiple_dset_write(void)
H5Dclose(dataset);
#ifdef BARRIER_CHECKS
if (!((n + 1) % 10)) {
- HDprintf("created %d datasets\n", n + 1);
+ printf("created %d datasets\n", n + 1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
@@ -236,7 +236,7 @@ multiple_dset_write(void)
H5Pclose(dcpl);
H5Fclose(iof);
- HDfree(outme);
+ free(outme);
}
/* Example of using PHDF5 to create, write, and read compact dataset.
@@ -275,11 +275,11 @@ compact_dataset(void)
return;
}
- outme = HDmalloc((size_t)((size_t)size * (size_t)size * sizeof(double)));
- VRFY((outme != NULL), "HDmalloc succeeded for outme");
+ outme = malloc((size_t)((size_t)size * (size_t)size * sizeof(double)));
+ VRFY((outme != NULL), "malloc succeeded for outme");
- inme = HDmalloc((size_t)size * (size_t)size * sizeof(double));
- VRFY((outme != NULL), "HDmalloc succeeded for inme");
+ inme = malloc((size_t)size * (size_t)size * sizeof(double));
+ VRFY((outme != NULL), "malloc succeeded for inme");
filename = PARATESTFILE /* GetTestParameters() */;
VRFY((mpi_size <= size), "mpi_size <= size");
@@ -366,15 +366,15 @@ compact_dataset(void)
for (j = 0; j < size; j++)
if (!H5_DBL_ABS_EQUAL(inme[(i * size) + j], outme[(i * size) + j]))
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j,
- outme[(i * size) + j], inme[(i * size) + j]);
+ printf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j,
+ outme[(i * size) + j], inme[(i * size) + j]);
H5Pclose(plist);
H5Pclose(dxpl);
H5Dclose(dataset);
H5Fclose(iof);
- HDfree(inme);
- HDfree(outme);
+ free(inme);
+ free(outme);
}
/*
@@ -683,10 +683,10 @@ dataset_fillvalue(void)
dset_size = dset_dims[0] * dset_dims[1] * dset_dims[2] * dset_dims[3];
/* Allocate space for the buffers */
- rdata = HDmalloc((size_t)(dset_size * sizeof(int)));
- VRFY((rdata != NULL), "HDcalloc succeeded for read buffer");
- wdata = HDmalloc((size_t)(dset_size * sizeof(int)));
- VRFY((wdata != NULL), "HDmalloc succeeded for write buffer");
+ rdata = malloc((size_t)(dset_size * sizeof(int)));
+ VRFY((rdata != NULL), "calloc succeeded for read buffer");
+ wdata = malloc((size_t)(dset_size * sizeof(int)));
+ VRFY((wdata != NULL), "malloc succeeded for write buffer");
fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
VRFY((fapl >= 0), "create_faccess_plist succeeded");
@@ -730,7 +730,7 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
/* set entire read buffer with the constant 2 */
- HDmemset(rdata, 2, (size_t)(dset_size * sizeof(int)));
+ memset(rdata, 2, (size_t)(dset_size * sizeof(int)));
/* Read the entire dataset back */
ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, rdata);
@@ -755,13 +755,13 @@ dataset_fillvalue(void)
for (l = 0; l < (int)dset_dims[3]; l++, trdata++)
if (*trdata != 0)
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf(
+ printf(
"Rank %d: Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n",
mpi_rank, i, j, k, l, *trdata);
if (err_num > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("Rank %d: [more errors ...]\n", mpi_rank);
+ printf("Rank %d: [more errors ...]\n", mpi_rank);
if (err_num) {
- HDprintf("Rank %d: %d errors found in check_value\n", mpi_rank, err_num);
+ printf("Rank %d: %d errors found in check_value\n", mpi_rank, err_num);
nerrors++;
}
}
@@ -820,7 +820,7 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
/* set entire read buffer with the constant 2 */
- HDmemset(rdata, 2, (size_t)(dset_size * sizeof(int)));
+ memset(rdata, 2, (size_t)(dset_size * sizeof(int)));
/* Read the entire dataset back */
ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, rdata);
@@ -847,19 +847,19 @@ dataset_fillvalue(void)
if (i < mpi_size) {
if (*twdata != *trdata)
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n",
- i, j, k, l, *twdata, *trdata);
+ printf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n",
+ i, j, k, l, *twdata, *trdata);
} /* end if */
else {
if (*trdata != 0)
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n",
- i, j, k, l, *trdata);
+ printf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i,
+ j, k, l, *trdata);
} /* end else */
if (err_num > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (err_num) {
- HDprintf("%d errors found in check_value\n", err_num);
+ printf("%d errors found in check_value\n", err_num);
nerrors++;
}
}
@@ -885,8 +885,8 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Pclose succeeded");
/* free the buffers */
- HDfree(rdata);
- HDfree(wdata);
+ free(rdata);
+ free(wdata);
}
/* combined cngrpw and ingrpr tests because ingrpr reads file created by cngrpw. */
@@ -945,8 +945,8 @@ collective_group_write(void)
chunk_size[0] = (hsize_t)(size / 2);
chunk_size[1] = (hsize_t)(size / 2);
- outme = HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((outme != NULL), "HDmalloc succeeded for outme");
+ outme = malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((outme != NULL), "malloc succeeded for outme");
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist);
@@ -998,7 +998,7 @@ collective_group_write(void)
#ifdef BARRIER_CHECKS
if (!((m + 1) % 10)) {
- HDprintf("created %d groups\n", m + 1);
+ printf("created %d groups\n", m + 1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
@@ -1011,7 +1011,7 @@ collective_group_write(void)
ret1 = H5Fclose(fid);
VRFY((ret1 == 0), "H5Fclose");
- HDfree(outme);
+ free(outme);
}
/* Let two sets of processes open and read different groups and chunked
@@ -1086,11 +1086,11 @@ group_dataset_read(hid_t fid, int mpi_rank, int m)
size = get_size();
- indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((indata != NULL), "HDmalloc succeeded for indata");
+ indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((indata != NULL), "malloc succeeded for indata");
- outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((outdata != NULL), "HDmalloc succeeded for outdata");
+ outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((outdata != NULL), "malloc succeeded for outdata");
/* open every group under root group. */
HDsnprintf(gname, sizeof(gname), "group%d", m);
@@ -1118,8 +1118,8 @@ group_dataset_read(hid_t fid, int mpi_rank, int m)
ret = H5Gclose(gid);
VRFY((ret == 0), "H5Gclose");
- HDfree(indata);
- HDfree(outdata);
+ free(indata);
+ free(outdata);
}
/*
@@ -1225,7 +1225,7 @@ multiple_group_write(void)
#ifdef BARRIER_CHECKS
if (!((m + 1) % 10)) {
- HDprintf("created %d groups\n", m + 1);
+ printf("created %d groups\n", m + 1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
@@ -1263,8 +1263,8 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
size = get_size();
- outme = HDmalloc((size_t)size * (size_t)size * sizeof(double));
- VRFY((outme != NULL), "HDmalloc succeeded for outme");
+ outme = malloc((size_t)size * (size_t)size * sizeof(double));
+ VRFY((outme != NULL), "malloc succeeded for outme");
for (n = 0; n < NDATASET; n++) {
HDsnprintf(dname, sizeof(dname), "dataset%d", n);
@@ -1282,7 +1282,7 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
H5Dclose(did);
}
- HDfree(outme);
+ free(outme);
}
/*
@@ -1300,7 +1300,7 @@ create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, int counter)
#ifdef BARRIER_CHECKS
if (!((counter + 1) % 10)) {
- HDprintf("created %dth child groups\n", counter + 1);
+ printf("created %dth child groups\n", counter + 1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
@@ -1426,11 +1426,11 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
size = get_size();
- indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((indata != NULL), "HDmalloc succeeded for indata");
+ indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((indata != NULL), "malloc succeeded for indata");
- outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((outdata != NULL), "HDmalloc succeeded for outdata");
+ outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((outdata != NULL), "malloc succeeded for outdata");
for (n = 0; n < NDATASET; n++) {
HDsnprintf(dname, sizeof(dname), "dataset%d", n);
@@ -1457,8 +1457,8 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
H5Dclose(did);
}
- HDfree(indata);
- HDfree(outdata);
+ free(indata);
+ free(outdata);
return vrfy_errors;
}
@@ -1578,14 +1578,14 @@ check_value(DATATYPE *indata, DATATYPE *outdata, int size)
for (j = chunk_origin[1]; j < (chunk_origin[1] + chunk_dims[1]); j++) {
if (*indata != *outdata)
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col%lu): expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)i, (unsigned long)j, *outdata,
- *indata);
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col%lu): expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)i, (unsigned long)j, *outdata,
+ *indata);
}
if (err_num > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (err_num)
- HDprintf("%d errors found in check_value\n", err_num);
+ printf("%d errors found in check_value\n", err_num);
return err_num;
}
@@ -1697,7 +1697,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id != -1), "H5Pcreate() failed");
@@ -1710,7 +1710,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating new file.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Creating new file.\n", mpi_rank, fcn_name);
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist_id);
VRFY((file_id >= 0), "H5Fcreate() failed");
@@ -1723,7 +1723,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating the dataspace for the dataset.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Creating the dataspace for the dataset.\n", mpi_rank, fcn_name);
dimsf[0] = N;
filespace = H5Screate_simple(rank, dimsf, NULL);
@@ -1734,7 +1734,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating the dataset, and closing filespace.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Creating the dataset, and closing filespace.\n", mpi_rank, fcn_name);
dset_id =
H5Dcreate2(file_id, dataset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -1744,33 +1744,33 @@ io_mode_confusion(void)
VRFY((status >= 0), "H5Sclose() failed");
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Screate_simple().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Screate_simple().\n", mpi_rank, fcn_name);
memspace = H5Screate_simple(rank, dimsf, NULL);
VRFY((memspace >= 0), "H5Screate_simple() failed.");
if (mpi_rank == 0) {
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Sselect_all(memspace).\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Sselect_all(memspace).\n", mpi_rank, fcn_name);
status = H5Sselect_all(memspace);
VRFY((status >= 0), "H5Sselect_all() failed");
}
else {
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Sselect_none(memspace).\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Sselect_none(memspace).\n", mpi_rank, fcn_name);
status = H5Sselect_none(memspace);
VRFY((status >= 0), "H5Sselect_none() failed");
}
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name);
MPI_Barrier(MPI_COMM_WORLD);
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Dget_space().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Dget_space().\n", mpi_rank, fcn_name);
filespace = H5Dget_space(dset_id);
VRFY((filespace >= 0), "H5Dget_space() failed");
@@ -1778,32 +1778,32 @@ io_mode_confusion(void)
/* select all */
if (mpi_rank == 0) {
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Sselect_elements() -- set up hang?\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Sselect_elements() -- set up hang?\n", mpi_rank, fcn_name);
status = H5Sselect_elements(filespace, H5S_SELECT_SET, N, (const hsize_t *)&coord);
VRFY((status >= 0), "H5Sselect_elements() failed");
}
else { /* select nothing */
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Sselect_none().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Sselect_none().\n", mpi_rank, fcn_name);
status = H5Sselect_none(filespace);
VRFY((status >= 0), "H5Sselect_none() failed");
}
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name);
MPI_Barrier(MPI_COMM_WORLD);
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Pcreate().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Pcreate().\n", mpi_rank, fcn_name);
plist_id = H5Pcreate(H5P_DATASET_XFER);
VRFY((plist_id != -1), "H5Pcreate() failed");
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Pset_dxpl_mpio().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Pset_dxpl_mpio().\n", mpi_rank, fcn_name);
status = H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_COLLECTIVE);
VRFY((status >= 0), "H5Pset_dxpl_mpio() failed");
@@ -1813,12 +1813,12 @@ io_mode_confusion(void)
}
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Dwrite() -- hang here?.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Dwrite() -- hang here?.\n", mpi_rank, fcn_name);
status = H5Dwrite(dset_id, H5T_NATIVE_INT, memspace, filespace, plist_id, data);
if (verbose)
- HDfprintf(stdout, "%0d:%s: Returned from H5Dwrite(), status=%d.\n", mpi_rank, fcn_name, status);
+ fprintf(stdout, "%0d:%s: Returned from H5Dwrite(), status=%d.\n", mpi_rank, fcn_name, status);
VRFY((status >= 0), "H5Dwrite() failed");
/*
@@ -1826,7 +1826,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Cleaning up from test.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Cleaning up from test.\n", mpi_rank, fcn_name);
status = H5Dclose(dset_id);
VRFY((status >= 0), "H5Dclose() failed");
@@ -1844,7 +1844,7 @@ io_mode_confusion(void)
VRFY((status >= 0), "H5Fclose() failed");
if (verbose)
- HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
return;
@@ -1955,7 +1955,7 @@ rr_obj_hdr_flush_confusion(void)
return;
}
- HDassert(mpi_size > 2);
+ assert(mpi_size > 2);
is_reader = mpi_rank % 2;
mrc = MPI_Comm_split(MPI_COMM_WORLD, is_reader, mpi_rank, &comm);
@@ -1975,7 +1975,7 @@ rr_obj_hdr_flush_confusion(void)
MPI_Comm_free(&comm);
if (verbose)
- HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
return;
@@ -2048,7 +2048,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id != -1), "H5Pcreate(H5P_FILE_ACCESS) failed");
@@ -2061,7 +2061,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating new file \"%s\".\n", mpi_rank, fcn_name, filename);
+ fprintf(stdout, "%0d:%s: Creating new file \"%s\".\n", mpi_rank, fcn_name, filename);
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
VRFY((file_id >= 0), "H5Fcreate() failed");
@@ -2074,7 +2074,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating the datasets.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Creating the datasets.\n", mpi_rank, fcn_name);
disk_size[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_size);
mem_size[0] = (hsize_t)(LOCAL_DATA_SIZE);
@@ -2095,7 +2095,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
VRFY((dxpl_id != -1), "H5Pcreate(H5P_DATASET_XFER) failed.\n");
@@ -2108,7 +2108,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Writing datasets.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Writing datasets.\n", mpi_rank, fcn_name);
disk_count[0] = (hsize_t)(LOCAL_DATA_SIZE);
disk_start[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_rank);
@@ -2137,7 +2137,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
err = H5Sclose(disk_space[i]);
@@ -2153,7 +2153,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(1) failed.\n");
@@ -2167,7 +2167,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: writing attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: writing attributes.\n", mpi_rank, fcn_name);
att_size[0] = (hsize_t)(LOCAL_DATA_SIZE);
for (j = 0; j < LOCAL_DATA_SIZE; j++) {
@@ -2192,7 +2192,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing attr ids and spaces .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing attr ids and spaces .\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
err = H5Sclose(att_space[i]);
@@ -2208,7 +2208,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(2) failed.\n");
@@ -2222,7 +2222,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: writing large attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: writing large attributes.\n", mpi_rank, fcn_name);
lg_att_size[0] = (hsize_t)(LARGE_ATTR_SIZE);
@@ -2256,7 +2256,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(3) failed.\n");
@@ -2270,7 +2270,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: writing different large attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: writing different large attributes.\n", mpi_rank, fcn_name);
for (j = 0; j < LARGE_ATTR_SIZE; j++) {
lg_att[j] = (double)(j + 2);
@@ -2290,7 +2290,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
* flush the metadata cache again
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(3) failed.\n");
@@ -2306,7 +2306,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing large attr ids and spaces .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing large attr ids and spaces .\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
@@ -2321,7 +2321,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing datasets .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing datasets .\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
err = H5Dclose(dataset[i]);
@@ -2333,7 +2333,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
err = H5Pclose(dxpl_id);
VRFY((err >= 0), "H5Pclose(dxpl_id) failed.\n");
@@ -2343,7 +2343,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing file.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing file.\n", mpi_rank, fcn_name);
err = H5Fclose(file_id);
VRFY((err >= 0), "H5Fclose(1) failed");
@@ -2360,7 +2360,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
VRFY((MPI_SUCCESS == mrc), "Reader_check failed");
if (verbose)
- HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
return;
@@ -2439,7 +2439,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id != -1), "H5Pcreate(H5P_FILE_ACCESS) failed");
@@ -2451,7 +2451,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Re-open file \"%s\".\n", mpi_rank, fcn_name, filename);
+ fprintf(stdout, "%0d:%s: Re-open file \"%s\".\n", mpi_rank, fcn_name, filename);
file_id = H5Fopen(filename, H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "H5Fopen() failed");
@@ -2465,7 +2465,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*=====================================================*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: opening the datasets.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: opening the datasets.\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
dataset[i] = -1;
@@ -2483,7 +2483,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
VRFY((dxpl_id != -1), "H5Pcreate(H5P_DATASET_XFER) failed.\n");
@@ -2495,7 +2495,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Reading datasets.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Reading datasets.\n", mpi_rank, fcn_name);
disk_count[0] = (hsize_t)(LOCAL_DATA_SIZE);
disk_start[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_rank);
@@ -2525,10 +2525,10 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* compare read data with expected data */
for (j = 0; j < LOCAL_DATA_SIZE; j++)
if (!H5_DBL_ABS_EQUAL(data_read[j], data[j])) {
- HDfprintf(stdout,
- "%0d:%s: Reading datasets value failed in "
- "Dataset %d, at position %d: expect %f, got %f.\n",
- mpi_rank, fcn_name, i, j, data[j], data_read[j]);
+ fprintf(stdout,
+ "%0d:%s: Reading datasets value failed in "
+ "Dataset %d, at position %d: expect %f, got %f.\n",
+ mpi_rank, fcn_name, i, j, data[j], data_read[j]);
nerrors++;
}
for (j = 0; j < LOCAL_DATA_SIZE; j++)
@@ -2540,7 +2540,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
err = H5Sclose(disk_space[i]);
@@ -2560,7 +2560,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
if (steps >= 2) {
if (verbose)
- HDfprintf(stdout, "%0d:%s: reading attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: reading attributes.\n", mpi_rank, fcn_name);
for (j = 0; j < LOCAL_DATA_SIZE; j++) {
att[j] = (double)(j + 1);
@@ -2576,8 +2576,8 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
tri_err = H5Tequal(att_type, H5T_NATIVE_DOUBLE);
VRFY((tri_err >= 0), "H5Tequal failed.\n");
if (tri_err == 0) {
- HDfprintf(stdout, "%0d:%s: Mismatched Attribute type of Dataset %d.\n", mpi_rank,
- fcn_name, i);
+ fprintf(stdout, "%0d:%s: Mismatched Attribute type of Dataset %d.\n", mpi_rank,
+ fcn_name, i);
nerrors++;
}
else {
@@ -2587,10 +2587,10 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* compare read attribute data with expected data */
for (j = 0; j < LOCAL_DATA_SIZE; j++)
if (!H5_DBL_ABS_EQUAL(att_read[j], att[j])) {
- HDfprintf(stdout,
- "%0d:%s: Mismatched attribute data read in Dataset %d, at position "
- "%d: expect %f, got %f.\n",
- mpi_rank, fcn_name, i, j, att[j], att_read[j]);
+ fprintf(stdout,
+ "%0d:%s: Mismatched attribute data read in Dataset %d, at position "
+ "%d: expect %f, got %f.\n",
+ mpi_rank, fcn_name, i, j, att[j], att_read[j]);
nerrors++;
}
for (j = 0; j < LOCAL_DATA_SIZE; j++) {
@@ -2613,7 +2613,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
if (steps >= 3) {
if (verbose)
- HDfprintf(stdout, "%0d:%s: reading large attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: reading large attributes.\n", mpi_rank, fcn_name);
for (j = 0; j < LARGE_ATTR_SIZE; j++) {
lg_att[j] = (steps == 3) ? (double)(j + 1) : (double)(j + 2);
@@ -2627,8 +2627,8 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
tri_err = H5Tequal(lg_att_type[i], H5T_NATIVE_DOUBLE);
VRFY((tri_err >= 0), "H5Tequal failed.\n");
if (tri_err == 0) {
- HDfprintf(stdout, "%0d:%s: Mismatched Large attribute type of Dataset %d.\n",
- mpi_rank, fcn_name, i);
+ fprintf(stdout, "%0d:%s: Mismatched Large attribute type of Dataset %d.\n", mpi_rank,
+ fcn_name, i);
nerrors++;
}
else {
@@ -2638,10 +2638,10 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* compare read attribute data with expected data */
for (j = 0; j < LARGE_ATTR_SIZE; j++)
if (!H5_DBL_ABS_EQUAL(lg_att_read[j], lg_att[j])) {
- HDfprintf(stdout,
- "%0d:%s: Mismatched large attribute data read in Dataset %d, at "
- "position %d: expect %f, got %f.\n",
- mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]);
+ fprintf(stdout,
+ "%0d:%s: Mismatched large attribute data read in Dataset %d, at "
+ "position %d: expect %f, got %f.\n",
+ mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]);
nerrors++;
}
for (j = 0; j < LARGE_ATTR_SIZE; j++) {
@@ -2675,7 +2675,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing datasets again.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing datasets again.\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
if (dataset[i] >= 0) {
@@ -2689,7 +2689,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
err = H5Pclose(dxpl_id);
VRFY((err >= 0), "H5Pclose(dxpl_id) failed.\n");
@@ -2698,7 +2698,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
* Close the file
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing file again.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing file again.\n", mpi_rank, fcn_name);
err = H5Fclose(file_id);
VRFY((err >= 0), "H5Fclose(1) failed");
@@ -2707,7 +2707,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
} /* end while(1) */
if (verbose)
- HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
return;
} /* rr_obj_hdr_flush_confusion_reader() */
@@ -2781,7 +2781,7 @@ chunk_align_bug_1(void)
#endif
/* Set aggregator size and alignment, disable metadata aggregator */
- HDassert(AGGR_SIZE > CHUNK_SIZE);
+ assert(AGGR_SIZE > CHUNK_SIZE);
ret = H5Pset_small_data_block_size(fapl_id, AGGR_SIZE);
VRFY((ret >= 0), "H5Pset_small_data_block_size succeeded");
ret = H5Pset_meta_block_size(fapl_id, 0);
diff --git a/testpar/API/t_ph5basic.c b/testpar/API/t_ph5basic.c
index 1639aff..f35d906 100644
--- a/testpar/API/t_ph5basic.c
+++ b/testpar/API/t_ph5basic.c
@@ -47,13 +47,13 @@ test_fapl_mpio_dup(void)
int nkeys, nkeys_tmp;
if (VERBOSE_MED)
- HDprintf("Verify fapl_mpio duplicates communicator and INFO objects\n");
+ printf("Verify fapl_mpio duplicates communicator and INFO objects\n");
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (VERBOSE_MED)
- HDprintf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size);
+ printf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size);
/* Create a new communicator that has the same processes as MPI_COMM_WORLD.
* Use MPI_Comm_split because it is simpler than MPI_Comm_create
@@ -63,7 +63,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm, &mpi_size_old);
MPI_Comm_rank(comm, &mpi_rank_old);
if (VERBOSE_MED)
- HDprintf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old);
+ printf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old);
/* create a new INFO object with some trivial information. */
mrc = MPI_Info_create(&info);
@@ -102,7 +102,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm_tmp, &mpi_size_tmp);
MPI_Comm_rank(comm_tmp, &mpi_rank_tmp);
if (VERBOSE_MED)
- HDprintf("After H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
+ printf("After H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
VRFY((mpi_size_tmp == mpi_size), "MPI_Comm_size");
VRFY((mpi_rank_tmp == mpi_rank), "MPI_Comm_rank");
if (MPI_INFO_NULL != info_tmp) {
@@ -151,7 +151,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm_tmp, &mpi_size_tmp);
MPI_Comm_rank(comm_tmp, &mpi_rank_tmp);
if (VERBOSE_MED)
- HDprintf("After second H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
+ printf("After second H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
VRFY((mpi_size_tmp == mpi_size), "MPI_Comm_size");
VRFY((mpi_rank_tmp == mpi_rank), "MPI_Comm_rank");
if (MPI_INFO_NULL != info_tmp) {
@@ -172,7 +172,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm_tmp, &mpi_size_tmp);
MPI_Comm_rank(comm_tmp, &mpi_rank_tmp);
if (VERBOSE_MED)
- HDprintf("After Property list closed: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
+ printf("After Property list closed: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
if (MPI_INFO_NULL != info_tmp) {
mrc = MPI_Info_get_nkeys(info_tmp, &nkeys_tmp);
VRFY((mrc == MPI_SUCCESS), "MPI_Info_get_nkeys");
diff --git a/testpar/API/t_prop.c b/testpar/API/t_prop.c
index 3659501..9c91906 100644
--- a/testpar/API/t_prop.c
+++ b/testpar/API/t_prop.c
@@ -39,7 +39,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
ret = H5Pencode2(orig_pl, NULL, &buf_size, H5P_DEFAULT);
VRFY((ret >= 0), "H5Pencode succeeded");
- sbuf = (uint8_t *)HDmalloc(buf_size);
+ sbuf = (uint8_t *)malloc(buf_size);
ret = H5Pencode2(orig_pl, sbuf, &buf_size, H5P_DEFAULT);
VRFY((ret >= 0), "H5Pencode succeeded");
@@ -58,7 +58,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
MPI_Recv(&recv_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status);
VRFY((recv_size >= 0), "MPI_Recv succeeded");
buf_size = (size_t)recv_size;
- rbuf = (uint8_t *)HDmalloc(buf_size);
+ rbuf = (uint8_t *)malloc(buf_size);
MPI_Recv(rbuf, recv_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status);
pl = H5Pdecode(rbuf);
@@ -70,7 +70,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
VRFY((ret >= 0), "H5Pclose succeeded");
if (NULL != rbuf)
- HDfree(rbuf);
+ free(rbuf);
} /* end if */
if (0 == mpi_rank) {
@@ -85,7 +85,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
}
if (NULL != sbuf)
- HDfree(sbuf);
+ free(sbuf);
MPI_Barrier(MPI_COMM_WORLD);
return 0;
@@ -152,7 +152,7 @@ test_plist_ed(void)
herr_t ret; /* Generic return value */
if (VERBOSE_MED)
- HDprintf("Encode/Decode DCPLs\n");
+ printf("Encode/Decode DCPLs\n");
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -480,7 +480,7 @@ external_links(void)
char link_path[50];
if (VERBOSE_MED)
- HDprintf("Check external links\n");
+ printf("Check external links\n");
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
diff --git a/testpar/API/t_pshutdown.c b/testpar/API/t_pshutdown.c
index 48a8005..e1f9189 100644
--- a/testpar/API/t_pshutdown.c
+++ b/testpar/API/t_pshutdown.c
@@ -70,7 +70,7 @@ main(int argc, char **argv)
!(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
if (MAINPROCESS) {
puts("SKIPPED");
- HDprintf(
+ printf(
" API functions for basic file, group, or dataset aren't supported with this connector\n");
fflush(stdout);
}
@@ -99,8 +99,8 @@ main(int argc, char **argv)
VRFY((dset_id >= 0), "H5Dcreate succeeded");
/* allocate memory for data buffer */
- data_array = (DATATYPE *)HDmalloc(dims[0] * dims[1] * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(dims[0] * dims[1] * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* Each process takes a slabs of rows. */
block[0] = dims[0] / (hsize_t)mpi_size;
@@ -129,7 +129,7 @@ main(int argc, char **argv)
/* release data buffers */
if (data_array)
- HDfree(data_array);
+ free(data_array);
MPI_Finalize();
diff --git a/testpar/API/t_shapesame.c b/testpar/API/t_shapesame.c
index 2a029ab..f7a8d70 100644
--- a/testpar/API/t_shapesame.c
+++ b/testpar/API/t_shapesame.c
@@ -151,12 +151,12 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
hid_t large_ds_dcpl_id = H5P_DEFAULT;
herr_t ret; /* Generic return value */
- HDassert(edge_size >= 6);
- HDassert(edge_size >= chunk_edge_size);
- HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
- HDassert(1 < small_rank);
- HDassert(small_rank < large_rank);
- HDassert(large_rank <= PAR_SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(edge_size >= chunk_edge_size);
+ assert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
+ assert(1 < small_rank);
+ assert(small_rank < large_rank);
+ assert(large_rank <= PAR_SS_DR_MAX_RANK);
tv_ptr->test_num = test_num;
tv_ptr->edge_size = edge_size;
@@ -171,7 +171,7 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* the VRFY() macro needs the local variable mpi_rank -- set it up now */
mpi_rank = tv_ptr->mpi_rank;
- HDassert(tv_ptr->mpi_size >= 1);
+ assert(tv_ptr->mpi_size >= 1);
tv_ptr->mpi_comm = MPI_COMM_WORLD;
tv_ptr->mpi_info = MPI_INFO_NULL;
@@ -185,8 +185,8 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* used by checker board tests only */
tv_ptr->small_ds_offset = PAR_SS_DR_MAX_RANK - tv_ptr->small_rank;
- HDassert(0 < tv_ptr->small_ds_offset);
- HDassert(tv_ptr->small_ds_offset < PAR_SS_DR_MAX_RANK);
+ assert(0 < tv_ptr->small_ds_offset);
+ assert(tv_ptr->small_ds_offset < PAR_SS_DR_MAX_RANK);
for (i = 0; i < tv_ptr->large_rank - 1; i++) {
@@ -198,8 +198,8 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* used by checker board tests only */
tv_ptr->large_ds_offset = PAR_SS_DR_MAX_RANK - tv_ptr->large_rank;
- HDassert(0 <= tv_ptr->large_ds_offset);
- HDassert(tv_ptr->large_ds_offset < PAR_SS_DR_MAX_RANK);
+ assert(0 <= tv_ptr->large_ds_offset);
+ assert(tv_ptr->large_ds_offset < PAR_SS_DR_MAX_RANK);
/* set up the start, stride, count, and block pointers */
/* used by contiguous tests only */
@@ -209,28 +209,28 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
tv_ptr->block_ptr = &(tv_ptr->block[PAR_SS_DR_MAX_RANK - tv_ptr->large_rank]);
/* Allocate buffers */
- tv_ptr->small_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
+ tv_ptr->small_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
VRFY((tv_ptr->small_ds_buf_0 != NULL), "malloc of small_ds_buf_0 succeeded");
- tv_ptr->small_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
+ tv_ptr->small_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
VRFY((tv_ptr->small_ds_buf_1 != NULL), "malloc of small_ds_buf_1 succeeded");
- tv_ptr->small_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
+ tv_ptr->small_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
VRFY((tv_ptr->small_ds_buf_2 != NULL), "malloc of small_ds_buf_2 succeeded");
- tv_ptr->small_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
+ tv_ptr->small_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
VRFY((tv_ptr->small_ds_slice_buf != NULL), "malloc of small_ds_slice_buf succeeded");
- tv_ptr->large_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
+ tv_ptr->large_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
VRFY((tv_ptr->large_ds_buf_0 != NULL), "malloc of large_ds_buf_0 succeeded");
- tv_ptr->large_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
+ tv_ptr->large_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
VRFY((tv_ptr->large_ds_buf_1 != NULL), "malloc of large_ds_buf_1 succeeded");
- tv_ptr->large_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
+ tv_ptr->large_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
VRFY((tv_ptr->large_ds_buf_2 != NULL), "malloc of large_ds_buf_2 succeeded");
- tv_ptr->large_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size);
+ tv_ptr->large_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size);
VRFY((tv_ptr->large_ds_slice_buf != NULL), "malloc of large_ds_slice_buf succeeded");
/* initialize the buffers */
@@ -238,34 +238,34 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
ptr_0 = tv_ptr->small_ds_buf_0;
for (i = 0; i < (int)(tv_ptr->small_ds_size); i++)
*ptr_0++ = (uint32_t)i;
- HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
- HDmemset(tv_ptr->small_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
+ memset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
+ memset(tv_ptr->small_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
- HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
+ memset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
ptr_0 = tv_ptr->large_ds_buf_0;
for (i = 0; i < (int)(tv_ptr->large_ds_size); i++)
*ptr_0++ = (uint32_t)i;
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
- HDmemset(tv_ptr->large_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
- HDmemset(tv_ptr->large_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->large_ds_slice_size);
+ memset(tv_ptr->large_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->large_ds_slice_size);
filename = filenames[0]; /* (const char *)GetTestParameters(); */
- HDassert(filename != NULL);
+ assert(filename != NULL);
#if CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "%d: test num = %d.\n", tv_ptr->mpi_rank, tv_ptr->test_num);
- HDfprintf(stdout, "%d: mpi_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->mpi_size);
- HDfprintf(stdout, "%d: small/large rank = %d/%d, use_collective_io = %d.\n", tv_ptr->mpi_rank,
- tv_ptr->small_rank, tv_ptr->large_rank, (int)use_collective_io);
- HDfprintf(stdout, "%d: edge_size = %d, chunk_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->edge_size,
- tv_ptr->chunk_edge_size);
- HDfprintf(stdout, "%d: checker_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->checker_edge_size);
- HDfprintf(stdout, "%d: small_ds_size = %d, large_ds_size = %d.\n", tv_ptr->mpi_rank,
- (int)(tv_ptr->small_ds_size), (int)(tv_ptr->large_ds_size));
- HDfprintf(stdout, "%d: filename = %s.\n", tv_ptr->mpi_rank, filename);
+ fprintf(stdout, "%d: test num = %d.\n", tv_ptr->mpi_rank, tv_ptr->test_num);
+ fprintf(stdout, "%d: mpi_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->mpi_size);
+ fprintf(stdout, "%d: small/large rank = %d/%d, use_collective_io = %d.\n", tv_ptr->mpi_rank,
+ tv_ptr->small_rank, tv_ptr->large_rank, (int)use_collective_io);
+ fprintf(stdout, "%d: edge_size = %d, chunk_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->edge_size,
+ tv_ptr->chunk_edge_size);
+ fprintf(stdout, "%d: checker_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->checker_edge_size);
+ fprintf(stdout, "%d: small_ds_size = %d, large_ds_size = %d.\n", tv_ptr->mpi_rank,
+ (int)(tv_ptr->small_ds_size), (int)(tv_ptr->large_ds_size));
+ fprintf(stdout, "%d: filename = %s.\n", tv_ptr->mpi_rank, filename);
}
#endif /* CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG */
/* ----------------------------------------
@@ -657,22 +657,22 @@ hs_dr_pio_test__takedown(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Free memory buffers */
if (tv_ptr->small_ds_buf_0 != NULL)
- HDfree(tv_ptr->small_ds_buf_0);
+ free(tv_ptr->small_ds_buf_0);
if (tv_ptr->small_ds_buf_1 != NULL)
- HDfree(tv_ptr->small_ds_buf_1);
+ free(tv_ptr->small_ds_buf_1);
if (tv_ptr->small_ds_buf_2 != NULL)
- HDfree(tv_ptr->small_ds_buf_2);
+ free(tv_ptr->small_ds_buf_2);
if (tv_ptr->small_ds_slice_buf != NULL)
- HDfree(tv_ptr->small_ds_slice_buf);
+ free(tv_ptr->small_ds_slice_buf);
if (tv_ptr->large_ds_buf_0 != NULL)
- HDfree(tv_ptr->large_ds_buf_0);
+ free(tv_ptr->large_ds_buf_0);
if (tv_ptr->large_ds_buf_1 != NULL)
- HDfree(tv_ptr->large_ds_buf_1);
+ free(tv_ptr->large_ds_buf_1);
if (tv_ptr->large_ds_buf_2 != NULL)
- HDfree(tv_ptr->large_ds_buf_2);
+ free(tv_ptr->large_ds_buf_2);
if (tv_ptr->large_ds_slice_buf != NULL)
- HDfree(tv_ptr->large_ds_slice_buf);
+ free(tv_ptr->large_ds_slice_buf);
return;
@@ -744,10 +744,10 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the buffer we will be reading into */
- HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
+ memset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s reading slices from big cube on disk into small cube slice.\n", fcnName);
+ fprintf(stdout, "%s reading slices from big cube on disk into small cube slice.\n", fcnName);
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
/* in serial versions of this test, we loop through all the dimensions
@@ -834,12 +834,12 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Read selection from disk */
#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
- (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
- (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName,
- H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
+ (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
+ (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName,
+ H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
ret =
H5Dread(tv_ptr->large_dataset, H5T_NATIVE_UINT32, tv_ptr->small_ds_slice_sid,
@@ -955,11 +955,11 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
VRFY((ret >= 0), "H5Sselect_hyperslab(file_small_ds_sid_0, set) succeeded");
#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG
- HDfprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName);
+ fprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName);
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
/* zero out the in memory large ds */
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
/* set up start, stride, count, and block -- note that we will
* change start[] so as to read slices of the large cube.
@@ -1065,12 +1065,12 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Read selection from disk */
#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
- (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
- (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
+ (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
+ (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
ret = H5Dread(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid,
tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_1);
@@ -1088,8 +1088,8 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
(k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size));
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= tv_ptr->large_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= tv_ptr->large_ds_size);
for (n = 0; n < tv_ptr->large_ds_size; n++) {
@@ -1230,10 +1230,10 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the in memory small ds */
- HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
+ memset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG
- HDfprintf(stdout, "%s writing slices from big ds to slices of small ds on disk.\n", fcnName);
+ fprintf(stdout, "%s writing slices from big ds to slices of small ds on disk.\n", fcnName);
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
/* in serial versions of this test, we loop through all the dimensions
@@ -1334,12 +1334,12 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* write the slice from the in memory large data set to the
* slice of the on disk small dataset. */
#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
- (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
- (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
+ (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
+ (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
ret = H5Dwrite(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid,
tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_0);
@@ -1364,8 +1364,8 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
start_index = (size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size;
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= tv_ptr->small_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= tv_ptr->small_ds_size);
for (n = 0; n < tv_ptr->small_ds_size; n++) {
@@ -1505,10 +1505,10 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the in memory large ds */
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG
- HDfprintf(stdout, "%s writing process slices of small ds to slices of large ds on disk.\n", fcnName);
+ fprintf(stdout, "%s writing process slices of small ds to slices of large ds on disk.\n", fcnName);
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
if (PAR_SS_DR_MAX_RANK - tv_ptr->large_rank == 0) {
@@ -1569,12 +1569,12 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDfprintf(stdout, "%s:%d: skipping test with start = %d %d %d %d %d.\n", fcnName,
- (int)(tv_ptr->mpi_rank), (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]),
- (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
+ fprintf(stdout, "%s:%d: skipping test with start = %d %d %d %d %d.\n", fcnName,
+ (int)(tv_ptr->mpi_rank), (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]),
+ (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
}
else { /* run the test */
@@ -1620,12 +1620,12 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* target slice of the disk data set
*/
#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
- (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
- (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
+ (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
+ (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
ret = H5Dwrite(tv_ptr->large_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_small_ds_sid,
tv_ptr->file_large_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->small_ds_buf_0);
@@ -1653,8 +1653,8 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
(k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size));
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index < tv_ptr->large_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index < tv_ptr->large_ds_size);
for (n = 0; n < tv_ptr->large_ds_size; n++) {
@@ -1797,8 +1797,8 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank);
- HDfprintf(stdout, "test %d: Initialization complete.\n", test_num);
+ fprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank);
+ fprintf(stdout, "test %d: Initialization complete.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -1813,7 +1813,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_l2s.\n", test_num);
+ fprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_l2s.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
contig_hs_dr_pio_test__d2m_l2s(tv_ptr);
@@ -1825,7 +1825,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_s2l.\n", test_num);
+ fprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_s2l.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
contig_hs_dr_pio_test__d2m_s2l(tv_ptr);
@@ -1843,7 +1843,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_l2s.\n", test_num);
+ fprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_l2s.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
contig_hs_dr_pio_test__m2d_l2s(tv_ptr);
@@ -1858,16 +1858,16 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_s2l.\n", test_num);
+ fprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_s2l.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
contig_hs_dr_pio_test__m2d_s2l(tv_ptr);
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n",
- test_num, (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped),
- (long long)(tv_ptr->total_tests));
+ fprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", test_num,
+ (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped),
+ (long long)(tv_ptr->total_tests));
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -1875,7 +1875,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: Takedown complete.\n", test_num);
+ fprintf(stdout, "test %d: Takedown complete.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -2009,8 +2009,8 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
} /* end of switch(sstest_type) */
#if CONTIG_HS_DR_PIO_TEST__DEBUG
if ((MAINPROCESS) && (tests_skipped > 0)) {
- HDfprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n", tests_run, tests_skipped,
- total_tests);
+ fprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n", tests_run, tests_skipped,
+ total_tests);
}
#endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */
}
@@ -2018,11 +2018,11 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
if (MAINPROCESS) {
if (tests_skipped > 0) {
- HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
- tests_skipped, total_tests);
+ fprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
+ tests_skipped, total_tests);
}
else
- HDprintf("\n");
+ printf("\n");
}
return;
@@ -2076,26 +2076,26 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
hsize_t block[PAR_SS_DR_MAX_RANK];
herr_t ret; /* Generic return value */
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(0 < sel_rank);
- HDassert(sel_rank <= tgt_rank);
- HDassert(tgt_rank <= test_max_rank);
- HDassert(test_max_rank <= PAR_SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(0 < sel_rank);
+ assert(sel_rank <= tgt_rank);
+ assert(tgt_rank <= test_max_rank);
+ assert(test_max_rank <= PAR_SS_DR_MAX_RANK);
sel_offset = test_max_rank - sel_rank;
- HDassert(sel_offset >= 0);
+ assert(sel_offset >= 0);
n_cube_offset = test_max_rank - tgt_rank;
- HDassert(n_cube_offset >= 0);
- HDassert(n_cube_offset <= sel_offset);
+ assert(n_cube_offset >= 0);
+ assert(n_cube_offset <= sel_offset);
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
- HDfprintf(stdout, "%s:%d: edge_size/checker_edge_size = %d/%d\n", fcnName, mpi_rank, edge_size,
- checker_edge_size);
- HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset);
- HDfprintf(stdout, "%s:%d: tgt_rank/n_cube_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, n_cube_offset);
+ fprintf(stdout, "%s:%d: edge_size/checker_edge_size = %d/%d\n", fcnName, mpi_rank, edge_size,
+ checker_edge_size);
+ fprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset);
+ fprintf(stdout, "%s:%d: tgt_rank/n_cube_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, n_cube_offset);
#endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */
/* First, compute the base count (which assumes start == 0
@@ -2242,25 +2242,25 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
if (((i + j + k + l + m) % 2) == 0) {
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
- HDfprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank,
- (int)first_selection);
- HDfprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, j,
- k, l, m);
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)start[0], (int)start[1], (int)start[2], (int)start[3],
- (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3],
- (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)count[0], (int)count[1], (int)count[2], (int)count[3],
- (int)count[4]);
- HDfprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)block[0], (int)block[1], (int)block[2], (int)block[3],
- (int)block[4]);
- HDfprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank,
- H5Sget_simple_extent_ndims(tgt_sid));
- HDfprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank);
+ fprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank,
+ (int)first_selection);
+ fprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, j, k,
+ l, m);
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)start[0], (int)start[1], (int)start[2], (int)start[3],
+ (int)start[4]);
+ fprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3],
+ (int)stride[4]);
+ fprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)count[0], (int)count[1], (int)count[2], (int)count[3],
+ (int)count[4]);
+ fprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)block[0], (int)block[1], (int)block[2], (int)block[3],
+ (int)block[4]);
+ fprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank,
+ H5Sget_simple_extent_ndims(tgt_sid));
+ fprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank);
#endif
if (first_selection) {
@@ -2304,8 +2304,8 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
} while ((i <= 1) && (0 >= sel_offset));
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(tgt_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(tgt_sid));
#endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */
/* Clip the selection back to the dataspace proper. */
@@ -2323,9 +2323,9 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
VRFY((ret != FAIL), "H5Sselect_hyperslab(AND) succeeded");
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(tgt_sid));
- HDfprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(tgt_sid));
+ fprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank);
#endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */
return;
@@ -2407,25 +2407,25 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t *buf_ptr, const int rank, const int
int v, w, x, y, z; /* to track position in checker */
const int test_max_rank = 5; /* code changes needed if this is increased */
- HDassert(buf_ptr != NULL);
- HDassert(0 < rank);
- HDassert(rank <= test_max_rank);
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(test_max_rank <= PAR_SS_DR_MAX_RANK);
+ assert(buf_ptr != NULL);
+ assert(0 < rank);
+ assert(rank <= test_max_rank);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(test_max_rank <= PAR_SS_DR_MAX_RANK);
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
int mpi_rank;
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDfprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s rank = %d.\n", fcnName, rank);
- HDfprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size);
- HDfprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size);
- HDfprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val);
- HDfprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker);
+ fprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s rank = %d.\n", fcnName, rank);
+ fprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size);
+ fprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size);
+ fprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val);
+ fprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker);
}
#endif
@@ -2475,12 +2475,12 @@ do {
m = 0;
z = 0;
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
- HDfprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m);
+ fprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m);
#endif
in_checker = start_in_checker[3];
do {
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
- HDfprintf(stdout, " %d", (int)(*val_ptr));
+ fprintf(stdout, " %d", (int)(*val_ptr));
#endif
if (z >= checker_edge_size) {
@@ -2513,7 +2513,7 @@ do {
} while ((rank >= (test_max_rank - 4)) && (m < edge_size));
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
#endif
l++;
y++;
@@ -2596,16 +2596,16 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
sel_start);
/* zero out the buffer we will be reading into */
- HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
+ memset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: initial small_ds_slice_buf = ", fcnName, tv_ptr->mpi_rank);
+ fprintf(stdout, "%s:%d: initial small_ds_slice_buf = ", fcnName, tv_ptr->mpi_rank);
ptr_0 = tv_ptr->small_ds_slice_buf;
for (i = 0; i < (int)(tv_ptr->small_ds_slice_size); i++) {
- HDfprintf(stdout, "%d ", (int)(*ptr_0));
+ fprintf(stdout, "%d ", (int)(*ptr_0));
ptr_0++;
}
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
/* set up start, stride, count, and block -- note that we will
@@ -2627,8 +2627,8 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
}
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: reading slice from big ds on disk into small ds slice.\n", fcnName,
- tv_ptr->mpi_rank);
+ fprintf(stdout, "%s:%d: reading slice from big ds on disk into small ds slice.\n", fcnName,
+ tv_ptr->mpi_rank);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
/* in serial versions of this test, we loop through all the dimensions
* of the large data set. However, in the parallel version, each
@@ -2702,11 +2702,11 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
ckrbrd_hs_dr_pio_test__slct_ckrbrd(
tv_ptr->mpi_rank, tv_ptr->file_large_ds_sid_0, tv_ptr->large_rank, tv_ptr->edge_size,
@@ -2720,12 +2720,12 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Read selection from disk */
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
- tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
- tv_ptr->start[4]);
- HDfprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName,
- H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
+ tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
+ tv_ptr->start[4]);
+ fprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName,
+ H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
ret =
@@ -2734,7 +2734,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
VRFY((ret >= 0), "H5Dread() slice from large ds succeeded.");
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, tv_ptr->mpi_rank);
+ fprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, tv_ptr->mpi_rank);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
/* verify that expected data is retrieved */
@@ -2826,11 +2826,11 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
sel_start);
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG
- HDfprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName);
+ fprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
/* zero out the buffer we will be reading into */
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
/* set up start, stride, count, and block -- note that we will
* change start[] so as to read the slice of the small data set
@@ -2926,11 +2926,11 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
ckrbrd_hs_dr_pio_test__slct_ckrbrd(
tv_ptr->mpi_rank, tv_ptr->mem_large_ds_sid, tv_ptr->large_rank, tv_ptr->edge_size,
@@ -2944,12 +2944,12 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Read selection from disk */
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
- tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
- tv_ptr->start[4]);
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->large_ds_slice_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
+ tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
+ tv_ptr->start[4]);
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->large_ds_slice_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
ret = H5Dread(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid,
tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_1);
@@ -2972,27 +2972,27 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
{
int m, n;
- HDfprintf(stdout, "%s:%d: expected_value = %d.\n", fcnName, tv_ptr->mpi_rank,
- expected_value);
- HDfprintf(stdout, "%s:%d: start/stop index = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- start_index, stop_index);
+ fprintf(stdout, "%s:%d: expected_value = %d.\n", fcnName, tv_ptr->mpi_rank,
+ expected_value);
+ fprintf(stdout, "%s:%d: start/stop index = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ start_index, stop_index);
n = 0;
for (m = 0; (unsigned)m < tv_ptr->large_ds_size; m++) {
- HDfprintf(stdout, "%d ", (int)(*ptr_1));
+ fprintf(stdout, "%d ", (int)(*ptr_1));
ptr_1++;
n++;
if (n >= tv_ptr->edge_size) {
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
n = 0;
}
}
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
ptr_1 = tv_ptr->large_ds_buf_1;
}
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
- HDassert(start_index < stop_index);
- HDassert(stop_index <= tv_ptr->large_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= tv_ptr->large_ds_size);
for (u = 0; u < start_index; u++) {
@@ -3156,12 +3156,12 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the in memory small ds */
- HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
+ memset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG
- HDfprintf(stdout,
- "%s writing checker boards selections of slices from big ds to slices of small ds on disk.\n",
- fcnName);
+ fprintf(stdout,
+ "%s writing checker boards selections of slices from big ds to slices of small ds on disk.\n",
+ fcnName);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
/* in serial versions of this test, we loop through all the dimensions
@@ -3248,11 +3248,11 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
ckrbrd_hs_dr_pio_test__slct_ckrbrd(
tv_ptr->mpi_rank, tv_ptr->mem_large_ds_sid, tv_ptr->large_rank, tv_ptr->edge_size,
@@ -3271,12 +3271,12 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* dataset.
*/
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
- tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
- tv_ptr->start[4]);
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_1));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
+ tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
+ tv_ptr->start[4]);
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_1));
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
ret = H5Dwrite(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid,
tv_ptr->file_small_ds_sid_1, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_0);
@@ -3298,8 +3298,8 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
start_index = (size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size;
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= tv_ptr->small_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= tv_ptr->small_ds_size);
data_ok = TRUE;
@@ -3455,13 +3455,13 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the in memory large ds */
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG
- HDfprintf(stdout,
- "%s writing process checkerboard selections of slices of small ds to process slices of large "
- "ds on disk.\n",
- fcnName);
+ fprintf(stdout,
+ "%s writing process checkerboard selections of slices of small ds to process slices of large "
+ "ds on disk.\n",
+ fcnName);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
if (PAR_SS_DR_MAX_RANK - tv_ptr->large_rank == 0) {
@@ -3541,11 +3541,11 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
ckrbrd_hs_dr_pio_test__slct_ckrbrd(
tv_ptr->mpi_rank, tv_ptr->file_large_ds_sid_1, tv_ptr->large_rank, tv_ptr->edge_size,
@@ -3563,12 +3563,12 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* target slice of the disk data set
*/
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
- tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
- tv_ptr->start[4]);
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_1));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
+ tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
+ tv_ptr->start[4]);
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_1));
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
ret = H5Dwrite(tv_ptr->large_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_small_ds_sid,
tv_ptr->file_large_ds_sid_1, tv_ptr->xfer_plist, tv_ptr->small_ds_buf_0);
@@ -3594,8 +3594,8 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
(k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size));
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index < tv_ptr->large_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index < tv_ptr->large_ds_size);
data_ok = TRUE;
@@ -3743,8 +3743,8 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank);
- HDfprintf(stdout, "test %d: Initialization complete.\n", test_num);
+ fprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank);
+ fprintf(stdout, "test %d: Initialization complete.\n", test_num);
}
#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -3795,9 +3795,9 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n",
- test_num, (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped),
- (long long)(tv_ptr->total_tests));
+ fprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", test_num,
+ (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped),
+ (long long)(tv_ptr->total_tests));
}
#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -3805,7 +3805,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: Takedown complete.\n", test_num);
+ fprintf(stdout, "test %d: Takedown complete.\n", test_num);
}
#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -3945,8 +3945,8 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
} /* end of switch(sstest_type) */
#if CONTIG_HS_DR_PIO_TEST__DEBUG
if ((MAINPROCESS) && (tests_skipped > 0)) {
- HDfprintf(stdout, " run/skipped/total = %" PRId64 "/%" PRId64 "/%" PRId64 ".\n",
- tests_run, tests_skipped, total_tests);
+ fprintf(stdout, " run/skipped/total = %" PRId64 "/%" PRId64 "/%" PRId64 ".\n", tests_run,
+ tests_skipped, total_tests);
}
#endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */
}
@@ -3954,11 +3954,11 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
if (MAINPROCESS) {
if (tests_skipped > 0) {
- HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
- tests_skipped, total_tests);
+ fprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
+ tests_skipped, total_tests);
}
else
- HDprintf("\n");
+ printf("\n");
}
return;
@@ -4019,10 +4019,9 @@ pause_proc(void)
if (MAINPROCESS)
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) {
if (!loops++) {
- HDprintf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid,
- pid);
+ printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid);
}
- HDprintf("waiting(%ds) for file %s ...\n", time_int, greenlight);
+ printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
fflush(stdout);
HDsleep(time_int);
}
@@ -4046,20 +4045,20 @@ MPI_Init(int *argc, char ***argv)
static void
usage(void)
{
- HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
- "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
- HDprintf("\t-m<n_datasets>"
- "\tset number of datasets for the multiple dataset test\n");
- HDprintf("\t-n<n_groups>"
- "\tset number of groups for the multiple group test\n");
+ printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
+ "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
+ printf("\t-m<n_datasets>"
+ "\tset number of datasets for the multiple dataset test\n");
+ printf("\t-n<n_groups>"
+ "\tset number of groups for the multiple group test\n");
#if 0
- HDprintf("\t-f <prefix>\tfilename prefix\n");
+ printf("\t-f <prefix>\tfilename prefix\n");
#endif
- HDprintf("\t-2\t\tuse Split-file together with MPIO\n");
- HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR,
- COL_FACTOR);
- HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
- HDprintf("\n");
+ printf("\t-2\t\tuse Split-file together with MPIO\n");
+ printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR,
+ COL_FACTOR);
+ printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
+ printf("\n");
}
/*
@@ -4142,7 +4141,7 @@ parse_options(int argc, char **argv)
case 'h': /* print help message--return with nerrors set */
return (1);
default:
- HDprintf("Illegal option(%s)\n", *argv);
+ printf("Illegal option(%s)\n", *argv);
nerrors++;
return (1);
}
@@ -4151,12 +4150,12 @@ parse_options(int argc, char **argv)
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0) {
- HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
+ printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
nerrors++;
return (1);
}
if (chunkdim0 <= 0 || chunkdim1 <= 0) {
- HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
+ printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
nerrors++;
return (1);
}
@@ -4164,7 +4163,7 @@ parse_options(int argc, char **argv)
/* Make sure datasets can be divided into equal portions by the processes */
if ((dim0 % mpi_size) || (dim1 % mpi_size)) {
if (MAINPROCESS)
- HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
+ printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
nerrors++;
return (1);
}
@@ -4179,15 +4178,15 @@ parse_options(int argc, char **argv)
strncpy(filenames[i], FILENAME[i], PATH_MAX);
#if 0 /* no support for VFDs right now */
if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) {
- HDprintf("h5_fixname failed\n");
+ printf("h5_fixname failed\n");
nerrors++;
return (1);
}
#endif
if (MAINPROCESS) {
- HDprintf("Test filenames are:\n");
+ printf("Test filenames are:\n");
for (i = 0; i < n; i++)
- HDprintf(" %s\n", filenames[i]);
+ printf(" %s\n", filenames[i]);
}
}
@@ -4322,10 +4321,10 @@ main(int argc, char **argv)
dim1 = COL_FACTOR * mpi_size;
if (MAINPROCESS) {
- HDprintf("===================================\n");
- HDprintf("Shape Same Tests Start\n");
- HDprintf(" express_test = %d.\n", EXPRESS_MODE /* GetTestExpress() */);
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("Shape Same Tests Start\n");
+ printf(" express_test = %d.\n", EXPRESS_MODE /* GetTestExpress() */);
+ printf("===================================\n");
}
/* Attempt to turn off atexit post processing so that in case errors
@@ -4335,7 +4334,7 @@ main(int argc, char **argv)
*/
if (H5dont_atexit() < 0) {
if (MAINPROCESS)
- HDprintf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank);
+ printf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank);
};
H5open();
/* h5_show_hostname(); */
@@ -4345,7 +4344,7 @@ main(int argc, char **argv)
/* Get the capability flag of the VOL connector being used */
if (H5Pget_vol_cap_flags(fapl, &vol_cap_flags_g) < 0) {
if (MAINPROCESS)
- HDprintf("Failed to get the capability flag of the VOL connector being used\n");
+ printf("Failed to get the capability flag of the VOL connector being used\n");
MPI_Finalize();
return 0;
@@ -4356,17 +4355,17 @@ main(int argc, char **argv)
*/
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
if (MAINPROCESS)
- HDprintf("API functions for basic file and dataset aren't supported with this connector\n");
+ printf("API functions for basic file and dataset aren't supported with this connector\n");
MPI_Finalize();
return 0;
}
#if 0
- HDmemset(filenames, 0, sizeof(filenames));
+ memset(filenames, 0, sizeof(filenames));
for (int i = 0; i < NFILENAME; i++) {
- if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
- HDprintf("couldn't allocate filename array\n");
+ if (NULL == (filenames[i] = malloc(PATH_MAX))) {
+ printf("couldn't allocate filename array\n");
MPI_Abort(MPI_COMM_WORLD, -1);
}
}
@@ -4381,9 +4380,9 @@ main(int argc, char **argv)
}
if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS) {
- HDprintf("===================================\n"
- " Using Independent I/O with file set view to replace collective I/O \n"
- "===================================\n");
+ printf("===================================\n"
+ " Using Independent I/O with file set view to replace collective I/O \n"
+ "===================================\n");
}
/* Shape Same tests using contiguous hyperslab */
@@ -4486,17 +4485,17 @@ main(int argc, char **argv)
}
if (MAINPROCESS) { /* only process 0 reports */
- HDprintf("===================================\n");
+ printf("===================================\n");
if (nerrors)
- HDprintf("***Shape Same tests detected %d errors***\n", nerrors);
+ printf("***Shape Same tests detected %d errors***\n", nerrors);
else
- HDprintf("Shape Same tests finished successfully\n");
- HDprintf("===================================\n");
+ printf("Shape Same tests finished successfully\n");
+ printf("===================================\n");
}
#if 0
for (int i = 0; i < NFILENAME; i++) {
- HDfree(filenames[i]);
+ free(filenames[i]);
filenames[i] = NULL;
}
#endif
diff --git a/testpar/API/t_span_tree.c b/testpar/API/t_span_tree.c
index 5aafb0b..c7cb257 100644
--- a/testpar/API/t_span_tree.c
+++ b/testpar/API/t_span_tree.c
@@ -337,11 +337,11 @@ coll_write_test(int chunk_factor)
fsdim[0] = FSPACE_DIM1;
fsdim[1] = (hsize_t)(FSPACE_DIM2 * mpi_size);
- vector = (int *)HDmalloc(sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size);
- matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size);
- matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size);
+ vector = (int *)malloc(sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size);
+ matrix_out = (int *)malloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size);
+ matrix_out1 = (int *)malloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size);
- HDmemset(vector, 0, sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size);
+ memset(vector, 0, sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size);
vector[0] = vector[MSPACE1_DIM * mpi_size - 1] = -1;
for (i = 1; i < MSPACE1_DIM * mpi_size - 1; i++)
vector[i] = (int)i;
@@ -664,8 +664,8 @@ coll_write_test(int chunk_factor)
* Initialize data buffer.
*/
- HDmemset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
- HDmemset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ memset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ memset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
/*
* Read data back to the buffer matrix_out.
*/
@@ -718,11 +718,11 @@ coll_write_test(int chunk_factor)
VRFY((ret >= 0), "");
if (vector)
- HDfree(vector);
+ free(vector);
if (matrix_out)
- HDfree(matrix_out);
+ free(matrix_out);
if (matrix_out1)
- HDfree(matrix_out1);
+ free(matrix_out1);
return;
}
@@ -784,8 +784,8 @@ coll_read_test(void)
mdim[0] = MSPACE_DIM1;
mdim[1] = (hsize_t)(MSPACE_DIM2 * mpi_size);
- matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
- matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ matrix_out = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ matrix_out1 = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
/*** For testing collective hyperslab selection read ***/
@@ -905,8 +905,8 @@ coll_read_test(void)
* Initialize data buffer.
*/
- HDmemset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
- HDmemset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ memset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ memset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
/*
* Read data back to the buffer matrix_out.
@@ -945,8 +945,8 @@ coll_read_test(void)
/*
* Free read buffers.
*/
- HDfree(matrix_out);
- HDfree(matrix_out1);
+ free(matrix_out);
+ free(matrix_out1);
/*
* Close memory file and memory dataspaces.
@@ -1033,31 +1033,31 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: dims/checker_edge_size = %d %d %d %d %d / %d\n", fcnName, mpi_rank,
- (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4], checker_edge_size);
+ fprintf(stdout, "%s:%d: dims/checker_edge_size = %d %d %d %d %d / %d\n", fcnName, mpi_rank,
+ (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4], checker_edge_size);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
- HDassert(0 < checker_edge_size);
- HDassert(0 < sel_rank);
- HDassert(sel_rank <= tgt_rank);
- HDassert(tgt_rank <= test_max_rank);
- HDassert(test_max_rank <= LDSCT_DS_RANK);
+ assert(0 < checker_edge_size);
+ assert(0 < sel_rank);
+ assert(sel_rank <= tgt_rank);
+ assert(tgt_rank <= test_max_rank);
+ assert(test_max_rank <= LDSCT_DS_RANK);
sel_offset = test_max_rank - sel_rank;
- HDassert(sel_offset >= 0);
+ assert(sel_offset >= 0);
ds_offset = test_max_rank - tgt_rank;
- HDassert(ds_offset >= 0);
- HDassert(ds_offset <= sel_offset);
+ assert(ds_offset >= 0);
+ assert(ds_offset <= sel_offset);
- HDassert((hsize_t)checker_edge_size <= dims[sel_offset]);
- HDassert(dims[sel_offset] == 10);
+ assert((hsize_t)checker_edge_size <= dims[sel_offset]);
+ assert(dims[sel_offset] == 10);
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset);
- HDfprintf(stdout, "%s:%d: tgt_rank/ds_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, ds_offset);
+ fprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset);
+ fprintf(stdout, "%s:%d: tgt_rank/ds_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, ds_offset);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
@@ -1091,8 +1091,8 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: base_count/offset_count = %d/%d.\n", fcnName, mpi_rank, base_count,
- offset_count);
+ fprintf(stdout, "%s:%d: base_count/offset_count = %d/%d.\n", fcnName, mpi_rank, base_count,
+ offset_count);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
@@ -1215,26 +1215,25 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank,
- (int)first_selection);
- HDfprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i,
- j, k, l, m);
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)start[0], (int)start[1], (int)start[2], (int)start[3],
- (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3],
- (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)count[0], (int)count[1], (int)count[2], (int)count[3],
- (int)count[4]);
- HDfprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)block[0], (int)block[1], (int)block[2], (int)block[3],
- (int)block[4]);
- HDfprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank,
- H5Sget_simple_extent_ndims(tgt_sid));
- HDfprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank,
- sel_rank);
+ fprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank,
+ (int)first_selection);
+ fprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i,
+ j, k, l, m);
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)start[0], (int)start[1], (int)start[2], (int)start[3],
+ (int)start[4]);
+ fprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3],
+ (int)stride[4]);
+ fprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)count[0], (int)count[1], (int)count[2], (int)count[3],
+ (int)count[4]);
+ fprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)block[0], (int)block[1], (int)block[2], (int)block[3],
+ (int)block[4]);
+ fprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank,
+ H5Sget_simple_extent_ndims(tgt_sid));
+ fprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank);
}
#endif
@@ -1280,8 +1279,8 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(tgt_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(tgt_sid));
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
@@ -1301,9 +1300,9 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(tgt_sid));
- HDfprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(tgt_sid));
+ fprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
@@ -1389,22 +1388,22 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
int v, w, x, y, z; /* to track position in checker */
const int test_max_rank = 5; /* code changes needed if this is increased */
- HDassert(buf_ptr != NULL);
- HDassert(0 < rank);
- HDassert(rank <= test_max_rank);
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(test_max_rank <= LDSCT_DS_RANK);
+ assert(buf_ptr != NULL);
+ assert(0 < rank);
+ assert(rank <= test_max_rank);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(test_max_rank <= LDSCT_DS_RANK);
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s rank = %d.\n", fcnName, rank);
- HDfprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size);
- HDfprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size);
- HDfprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val);
- HDfprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker);
+ fprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s rank = %d.\n", fcnName, rank);
+ fprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size);
+ fprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size);
+ fprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val);
+ fprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker);
}
#endif
@@ -1455,14 +1454,14 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
z = 0;
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m);
+ fprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m);
}
#endif
in_checker = start_in_checker[3];
do {
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, " %d", (int)(*val_ptr));
+ fprintf(stdout, " %d", (int)(*val_ptr));
}
#endif
if (z >= checker_edge_size) {
@@ -1497,7 +1496,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
} while ((rank >= (test_max_rank - 4)) && (m < edge_size));
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
}
#endif
l++;
@@ -1598,15 +1597,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = MPI_COMM_WORLD;
mpi_info = MPI_INFO_NULL;
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: chunk_edge_size = %d.\n", fcnName, mpi_rank, (int)chunk_edge_size);
- HDfprintf(stdout, "%s:%d: use_collective_io = %d.\n", fcnName, mpi_rank, (int)use_collective_io);
+ fprintf(stdout, "%s:%d: chunk_edge_size = %d.\n", fcnName, mpi_rank, (int)chunk_edge_size);
+ fprintf(stdout, "%s:%d: use_collective_io = %d.\n", fcnName, mpi_rank, (int)use_collective_io);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1618,24 +1617,24 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
large_ds_slice_size = (size_t)(10 * 10 * 10 * 10);
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: small ds size / slice size = %d / %d.\n", fcnName, mpi_rank,
- (int)small_ds_size, (int)small_ds_slice_size);
- HDfprintf(stdout, "%s:%d: large ds size / slice size = %d / %d.\n", fcnName, mpi_rank,
- (int)large_ds_size, (int)large_ds_slice_size);
+ fprintf(stdout, "%s:%d: small ds size / slice size = %d / %d.\n", fcnName, mpi_rank,
+ (int)small_ds_size, (int)small_ds_slice_size);
+ fprintf(stdout, "%s:%d: large ds size / slice size = %d / %d.\n", fcnName, mpi_rank,
+ (int)large_ds_size, (int)large_ds_slice_size);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
/* Allocate buffers */
- small_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * small_ds_size);
+ small_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * small_ds_size);
VRFY((small_ds_buf_0 != NULL), "malloc of small_ds_buf_0 succeeded");
- small_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * small_ds_size);
+ small_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * small_ds_size);
VRFY((small_ds_buf_1 != NULL), "malloc of small_ds_buf_1 succeeded");
- large_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * large_ds_size);
+ large_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * large_ds_size);
VRFY((large_ds_buf_0 != NULL), "malloc of large_ds_buf_0 succeeded");
- large_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * large_ds_size);
+ large_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * large_ds_size);
VRFY((large_ds_buf_1 != NULL), "malloc of large_ds_buf_1 succeeded");
/* initialize the buffers */
@@ -1667,7 +1666,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* get the file name */
filename = (const char *)PARATESTFILE /* GetTestParameters() */;
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* ----------------------------------------
* CREATE AN HDF5 FILE WITH PARALLEL ACCESS
@@ -1701,10 +1700,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: small_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)small_dims[0],
- (int)small_dims[1], (int)small_dims[2], (int)small_dims[3], (int)small_dims[4]);
- HDfprintf(stdout, "%s:%d: large_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)large_dims[0],
- (int)large_dims[1], (int)large_dims[2], (int)large_dims[3], (int)large_dims[4]);
+ fprintf(stdout, "%s:%d: small_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)small_dims[0],
+ (int)small_dims[1], (int)small_dims[2], (int)small_dims[3], (int)small_dims[4]);
+ fprintf(stdout, "%s:%d: large_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)large_dims[0],
+ (int)large_dims[1], (int)large_dims[2], (int)large_dims[3], (int)large_dims[4]);
}
#endif
@@ -1760,9 +1759,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: small chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank,
- (int)small_chunk_dims[0], (int)small_chunk_dims[1], (int)small_chunk_dims[2],
- (int)small_chunk_dims[3], (int)small_chunk_dims[4]);
+ fprintf(stdout, "%s:%d: small chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank,
+ (int)small_chunk_dims[0], (int)small_chunk_dims[1], (int)small_chunk_dims[2],
+ (int)small_chunk_dims[3], (int)small_chunk_dims[4]);
}
#endif
@@ -1781,9 +1780,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: large chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank,
- (int)large_chunk_dims[0], (int)large_chunk_dims[1], (int)large_chunk_dims[2],
- (int)large_chunk_dims[3], (int)large_chunk_dims[4]);
+ fprintf(stdout, "%s:%d: large chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank,
+ (int)large_chunk_dims[0], (int)large_chunk_dims[1], (int)large_chunk_dims[2],
+ (int)large_chunk_dims[3], (int)large_chunk_dims[4]);
}
#endif
@@ -1809,8 +1808,8 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: small/large ds id = %d / %d.\n", fcnName, mpi_rank, (int)small_dataset,
- (int)large_dataset);
+ fprintf(stdout, "%s:%d: small/large ds id = %d / %d.\n", fcnName, mpi_rank, (int)small_dataset,
+ (int)large_dataset);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1842,15 +1841,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: settings for small data set initialization.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
- (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
- (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
- (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
- HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
- (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
+ fprintf(stdout, "%s:%d: settings for small data set initialization.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1],
+ (int)start[2], (int)start[3], (int)start[4]);
+ fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
+ (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
+ fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], (int)count[1],
+ (int)count[2], (int)count[3], (int)count[4]);
+ fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], (int)block[1],
+ (int)block[2], (int)block[3], (int)block[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1867,15 +1866,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
- (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
- (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
- (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
- HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
- (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
+ fprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
+ (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
+ fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
+ (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
+ fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
+ (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
+ fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
+ (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1895,7 +1894,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* write the initial value of the small data set to file */
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: writing init value of small ds to file.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: writing init value of small ds to file.\n", fcnName, mpi_rank);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
ret = H5Dwrite(small_dataset, dset_type, mem_small_ds_sid, file_small_ds_sid, xfer_plist, small_ds_buf_0);
@@ -1953,15 +1952,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: settings for large data set initialization.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
- (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
- (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
- (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
- HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
- (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
+ fprintf(stdout, "%s:%d: settings for large data set initialization.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1],
+ (int)start[2], (int)start[3], (int)start[4]);
+ fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
+ (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
+ fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], (int)count[1],
+ (int)count[2], (int)count[3], (int)count[4]);
+ fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], (int)block[1],
+ (int)block[2], (int)block[3], (int)block[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1973,10 +1972,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(mem_large_ds_sid));
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(file_large_ds_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(mem_large_ds_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(file_large_ds_sid));
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1986,15 +1985,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
- (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
- (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
- (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
- HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
- (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
+ fprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
+ (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
+ fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
+ (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
+ fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
+ (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
+ fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
+ (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -2006,10 +2005,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(mem_large_ds_sid));
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(file_large_ds_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(mem_large_ds_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(file_large_ds_sid));
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
}
@@ -2035,12 +2034,12 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
rank = H5Sget_simple_extent_dims(mem_large_ds_sid, dims, max_dims);
- HDfprintf(stdout, "%s:%d: mem_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank,
- (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]);
+ fprintf(stdout, "%s:%d: mem_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank,
+ (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]);
rank = H5Sget_simple_extent_dims(file_large_ds_sid, dims, max_dims);
- HDfprintf(stdout, "%s:%d: file_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank,
- (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]);
+ fprintf(stdout, "%s:%d: file_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank,
+ (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -2053,10 +2052,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* write the initial value of the large data set to file */
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: writing init value of large ds to file.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: large_dataset = %d.\n", fcnName, mpi_rank, (int)large_dataset);
- HDfprintf(stdout, "%s:%d: mem_large_ds_sid = %d, file_large_ds_sid = %d.\n", fcnName, mpi_rank,
- (int)mem_large_ds_sid, (int)file_large_ds_sid);
+ fprintf(stdout, "%s:%d: writing init value of large ds to file.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: large_dataset = %d.\n", fcnName, mpi_rank, (int)large_dataset);
+ fprintf(stdout, "%s:%d: mem_large_ds_sid = %d, file_large_ds_sid = %d.\n", fcnName, mpi_rank,
+ (int)mem_large_ds_sid, (int)file_large_ds_sid);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -2145,7 +2144,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -2160,9 +2159,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
stop_index = start_index + (int)small_ds_slice_size;
- HDassert(0 <= start_index);
- HDassert(start_index < stop_index);
- HDassert(stop_index <= (int)large_ds_size);
+ assert(0 <= start_index);
+ assert(start_index < stop_index);
+ assert(stop_index <= (int)large_ds_size);
ptr_1 = large_ds_buf_1;
@@ -2242,7 +2241,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -2260,9 +2259,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
stop_index = start_index + (int)small_ds_slice_size;
- HDassert(0 <= start_index);
- HDassert(start_index < stop_index);
- HDassert(stop_index <= (int)small_ds_size);
+ assert(0 <= start_index);
+ assert(start_index < stop_index);
+ assert(stop_index <= (int)small_ds_size);
ptr_1 = small_ds_buf_1;
@@ -2300,8 +2299,8 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: unexpected value at index %d: %d.\n", fcnName, mpi_rank, (int)i,
- (int)(*ptr_1));
+ fprintf(stdout, "%s:%d: unexpected value at index %d: %d.\n", fcnName, mpi_rank, (int)i,
+ (int)(*ptr_1));
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG */
@@ -2353,14 +2352,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* Free memory buffers */
if (small_ds_buf_0 != NULL)
- HDfree(small_ds_buf_0);
+ free(small_ds_buf_0);
if (small_ds_buf_1 != NULL)
- HDfree(small_ds_buf_1);
+ free(small_ds_buf_1);
if (large_ds_buf_0 != NULL)
- HDfree(large_ds_buf_0);
+ free(large_ds_buf_0);
if (large_ds_buf_1 != NULL)
- HDfree(large_ds_buf_1);
+ free(large_ds_buf_1);
return;
@@ -2490,11 +2489,11 @@ link_chunk_collective_io_test(void)
return;
}
- HDassert(mpi_size > 0);
+ assert(mpi_size > 0);
/* get the file name */
filename = (const char *)PARATESTFILE /* GetTestParameters() */;
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* setup file access template */
acc_tpl = create_faccess_plist(mpi_comm, mpi_info, facc_type);
diff --git a/testpar/API/testphdf5.c b/testpar/API/testphdf5.c
index ec5dae2..9469c12 100644
--- a/testpar/API/testphdf5.c
+++ b/testpar/API/testphdf5.c
@@ -80,11 +80,10 @@ pause_proc(void)
if (MAINPROCESS)
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) {
if (!loops++) {
- HDprintf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid,
- pid);
+ printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid);
}
- HDprintf("waiting(%ds) for file %s ...\n", time_int, greenlight);
- HDfflush(stdout);
+ printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
+ fflush(stdout);
HDsleep(time_int);
}
MPI_Barrier(MPI_COMM_WORLD);
@@ -107,20 +106,20 @@ MPI_Init(int *argc, char ***argv)
static void
usage(void)
{
- HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
- "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
- HDprintf("\t-m<n_datasets>"
- "\tset number of datasets for the multiple dataset test\n");
- HDprintf("\t-n<n_groups>"
- "\tset number of groups for the multiple group test\n");
+ printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
+ "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
+ printf("\t-m<n_datasets>"
+ "\tset number of datasets for the multiple dataset test\n");
+ printf("\t-n<n_groups>"
+ "\tset number of groups for the multiple group test\n");
#if 0
- HDprintf("\t-f <prefix>\tfilename prefix\n");
+ printf("\t-f <prefix>\tfilename prefix\n");
#endif
- HDprintf("\t-2\t\tuse Split-file together with MPIO\n");
- HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR,
- COL_FACTOR);
- HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
- HDprintf("\n");
+ printf("\t-2\t\tuse Split-file together with MPIO\n");
+ printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR,
+ COL_FACTOR);
+ printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
+ printf("\n");
}
/*
@@ -203,7 +202,7 @@ parse_options(int argc, char **argv)
case 'h': /* print help message--return with nerrors set */
return (1);
default:
- HDprintf("Illegal option(%s)\n", *argv);
+ printf("Illegal option(%s)\n", *argv);
nerrors++;
return (1);
}
@@ -212,12 +211,12 @@ parse_options(int argc, char **argv)
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0) {
- HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
+ printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
nerrors++;
return (1);
}
if (chunkdim0 <= 0 || chunkdim1 <= 0) {
- HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
+ printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
nerrors++;
return (1);
}
@@ -225,7 +224,7 @@ parse_options(int argc, char **argv)
/* Make sure datasets can be divided into equal portions by the processes */
if ((dim0 % mpi_size) || (dim1 % mpi_size)) {
if (MAINPROCESS)
- HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
+ printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
nerrors++;
return (1);
}
@@ -240,15 +239,15 @@ parse_options(int argc, char **argv)
strncpy(filenames[i], FILENAME[i], PATH_MAX);
#if 0 /* no support for VFDs right now */
if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) {
- HDprintf("h5_fixname failed\n");
+ printf("h5_fixname failed\n");
nerrors++;
return (1);
}
#endif
if (MAINPROCESS) {
- HDprintf("Test filenames are:\n");
+ printf("Test filenames are:\n");
for (i = 0; i < n; i++)
- HDprintf(" %s\n", filenames[i]);
+ printf(" %s\n", filenames[i]);
}
}
@@ -335,9 +334,9 @@ main(int argc, char **argv)
dim1 = COL_FACTOR * mpi_size;
if (MAINPROCESS) {
- HDprintf("===================================\n");
- HDprintf("PHDF5 TESTS START\n");
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("PHDF5 TESTS START\n");
+ printf("===================================\n");
}
/* Attempt to turn off atexit post processing so that in case errors
@@ -346,16 +345,16 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0) {
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ printf("Failed to turn off atexit processing. Continue.\n");
};
H5open();
/* h5_show_hostname(); */
#if 0
- HDmemset(filenames, 0, sizeof(filenames));
+ memset(filenames, 0, sizeof(filenames));
for (int i = 0; i < NFILENAME; i++) {
- if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
- HDprintf("couldn't allocate filename array\n");
+ if (NULL == (filenames[i] = malloc(PATH_MAX))) {
+ printf("couldn't allocate filename array\n");
MPI_Abort(MPI_COMM_WORLD, -1);
}
}
@@ -585,7 +584,7 @@ main(int argc, char **argv)
AddTest("bigdset", big_dataset, NULL,
"big dataset test", PARATESTFILE);
#else
- HDprintf("big dataset test will be skipped on Windows (JIRA HDDFV-8064)\n");
+ printf("big dataset test will be skipped on Windows (JIRA HDDFV-8064)\n");
#endif
#endif
@@ -644,9 +643,9 @@ main(int argc, char **argv)
coll_chunk4();
if ((mpi_size < 3) && MAINPROCESS) {
- HDprintf("Collective chunk IO optimization APIs ");
- HDprintf("needs at least 3 processes to participate\n");
- HDprintf("Collective chunk IO API tests will be skipped \n");
+ printf("Collective chunk IO optimization APIs ");
+ printf("needs at least 3 processes to participate\n");
+ printf("Collective chunk IO API tests will be skipped \n");
}
#if 0
@@ -783,8 +782,8 @@ main(int argc, char **argv)
io_mode_confusion();
if ((mpi_size < 3) && MAINPROCESS) {
- HDprintf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n");
- HDprintf("rr_obj_hdr_flush_confusion test will be skipped \n");
+ printf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n");
+ printf("rr_obj_hdr_flush_confusion test will be skipped \n");
}
if (mpi_size > 2) {
@@ -863,8 +862,8 @@ main(int argc, char **argv)
test_plist_ed();
if ((mpi_size < 2) && MAINPROCESS) {
- HDprintf("File Image Ops daisy chain test needs at least 2 processes.\n");
- HDprintf("File Image Ops daisy chain test will be skipped \n");
+ printf("File Image Ops daisy chain test needs at least 2 processes.\n");
+ printf("File Image Ops daisy chain test will be skipped \n");
}
#if 0
@@ -881,11 +880,11 @@ main(int argc, char **argv)
}
if ((mpi_size < 2) && MAINPROCESS) {
- HDprintf("Atomicity tests need at least 2 processes to participate\n");
- HDprintf("8 is more recommended.. Atomicity tests will be skipped \n");
+ printf("Atomicity tests need at least 2 processes to participate\n");
+ printf("8 is more recommended.. Atomicity tests will be skipped \n");
}
else if (facc_type != FACC_MPIO && MAINPROCESS) {
- HDprintf("Atomicity tests will not work with a non MPIO VFD\n");
+ printf("Atomicity tests will not work with a non MPIO VFD\n");
}
else if (mpi_size >= 2 && facc_type == FACC_MPIO) {
#if 0
@@ -946,9 +945,9 @@ main(int argc, char **argv)
/* TestParseCmdLine(argc, argv); */
if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS) {
- HDprintf("===================================\n"
- " Using Independent I/O with file set view to replace collective I/O \n"
- "===================================\n");
+ printf("===================================\n"
+ " Using Independent I/O with file set view to replace collective I/O \n"
+ "===================================\n");
}
/* Perform requested testing */
@@ -978,17 +977,17 @@ main(int argc, char **argv)
}
if (MAINPROCESS) { /* only process 0 reports */
- HDprintf("===================================\n");
+ printf("===================================\n");
if (nerrors)
- HDprintf("***PHDF5 tests detected %d errors***\n", nerrors);
+ printf("***PHDF5 tests detected %d errors***\n", nerrors);
else
- HDprintf("PHDF5 tests finished successfully\n");
- HDprintf("===================================\n");
+ printf("PHDF5 tests finished successfully\n");
+ printf("===================================\n");
}
#if 0
for (int i = 0; i < NFILENAME; i++) {
- HDfree(filenames[i]);
+ free(filenames[i]);
filenames[i] = NULL;
}
#endif
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index 8b67dd9..a64b6c1 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -96,18 +96,18 @@ MPI_Comm test_comm = MPI_COMM_WORLD;
static void
usage(void)
{
- HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
- "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
- HDprintf("\t-m<n_datasets>"
- "\tset number of datasets for the multiple dataset test\n");
- HDprintf("\t-n<n_groups>"
- "\tset number of groups for the multiple group test\n");
- HDprintf("\t-f <prefix>\tfilename prefix\n");
- HDprintf("\t-2\t\tuse Split-file together with MPIO\n");
- HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", BIG_X_FACTOR,
- BIG_Y_FACTOR);
- HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
- HDprintf("\n");
+ printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
+ "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
+ printf("\t-m<n_datasets>"
+ "\tset number of datasets for the multiple dataset test\n");
+ printf("\t-n<n_groups>"
+ "\tset number of groups for the multiple group test\n");
+ printf("\t-f <prefix>\tfilename prefix\n");
+ printf("\t-2\t\tuse Split-file together with MPIO\n");
+ printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", BIG_X_FACTOR,
+ BIG_Y_FACTOR);
+ printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
+ printf("\n");
}
/*
@@ -189,7 +189,7 @@ parse_options(int argc, char **argv)
case 'h': /* print help message--return with nerrors set */
return (1);
default:
- HDprintf("Illegal option(%s)\n", *argv);
+ printf("Illegal option(%s)\n", *argv);
nerrors++;
return (1);
}
@@ -198,12 +198,12 @@ parse_options(int argc, char **argv)
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0) {
- HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
+ printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
nerrors++;
return (1);
}
if (chunkdim0 <= 0 || chunkdim1 <= 0) {
- HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
+ printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
nerrors++;
return (1);
}
@@ -211,7 +211,7 @@ parse_options(int argc, char **argv)
/* Make sure datasets can be divided into equal portions by the processes */
if ((dim0 % mpi_size) || (dim1 % mpi_size)) {
if (MAINPROCESS)
- HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
+ printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
nerrors++;
return (1);
}
@@ -224,15 +224,15 @@ parse_options(int argc, char **argv)
for (i = 0; i < n; i++)
if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) {
- HDprintf("h5_fixname failed\n");
+ printf("h5_fixname failed\n");
nerrors++;
return (1);
}
if (MAINPROCESS) {
- HDprintf("Test filenames are:\n");
+ printf("Test filenames are:\n");
for (i = 0; i < n; i++)
- HDprintf(" %s\n", filenames[i]);
+ printf(" %s\n", filenames[i]);
}
}
@@ -317,7 +317,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set BYROW\n");
+ printf("slab_set BYROW\n");
break;
case BYCOL:
/* Each process takes a block of columns. */
@@ -330,7 +330,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = (hsize_t)mpi_rank * block[1];
if (VERBOSE_MED)
- HDprintf("slab_set BYCOL\n");
+ printf("slab_set BYCOL\n");
break;
case ZROW:
/* Similar to BYROW except process 0 gets 0 row */
@@ -343,7 +343,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = (hsize_t)(mpi_rank ? (hsize_t)mpi_rank * block[0] : 0);
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set ZROW\n");
+ printf("slab_set ZROW\n");
break;
case ZCOL:
/* Similar to BYCOL except process 0 gets 0 column */
@@ -356,11 +356,11 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = (hsize_t)(mpi_rank ? (hsize_t)mpi_rank * block[1] : 0);
if (VERBOSE_MED)
- HDprintf("slab_set ZCOL\n");
+ printf("slab_set ZCOL\n");
break;
default:
/* Unknown mode. Set it to cover the whole dataset. */
- HDprintf("unknown slab_set mode (%d)\n", mode);
+ printf("unknown slab_set mode (%d)\n", mode);
block[0] = (hsize_t)dim0;
block[1] = (hsize_t)dim1;
stride[0] = block[0];
@@ -370,16 +370,16 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set wholeset\n");
+ printf("slab_set wholeset\n");
break;
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
}
}
@@ -417,15 +417,15 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
k = 0;
for (i = 0; i < num_points; i++) {
- HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
+ printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
k += 2;
}
}
@@ -460,19 +460,19 @@ dataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("%-8s", "Cols:");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3lu ", (unsigned long)(start[1] + j));
+ printf("%3lu ", (unsigned long)(start[1] + j));
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2lu: ", (unsigned long)(i + start[0]));
+ printf("Row %2lu: ", (unsigned long)(i + start[0]));
for (j = 0; j < block[1]; j++) {
- HDprintf("%03d ", *dataptr++);
+ printf("%03d ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -488,14 +488,14 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("dataset_vrfy dumping:::\n");
- HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1]);
- HDprintf("original values:\n");
+ printf("dataset_vrfy dumping:::\n");
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1]);
+ printf("original values:\n");
dataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
dataset_print(start, block, dataset);
}
@@ -504,9 +504,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
for (j = 0; j < block[1]; j++) {
if (*dataset != *original) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]),
- (unsigned long)(j + start[1]), *(original), *(dataset));
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]),
+ (unsigned long)(j + start[1]), *(original), *(dataset));
}
dataset++;
original++;
@@ -514,9 +514,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in dataset_vrfy\n", vrfyerrs);
+ printf("%d errors found in dataset_vrfy\n", vrfyerrs);
return (vrfyerrs);
}
@@ -577,9 +577,9 @@ MpioTest2G(MPI_Comm comm)
MPI_Comm_rank(comm, &mpi_rank);
if (mpi_rank == 0) {
- HDprintf("Using %d process on dataset shape "
- "[%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "]\n",
- mpi_size, shape[0], shape[1], shape[2]);
+ printf("Using %d process on dataset shape "
+ "[%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "]\n",
+ mpi_size, shape[0], shape[1], shape[2]);
}
/*
@@ -606,7 +606,7 @@ MpioTest2G(MPI_Comm comm)
tot_size_bytes *= shape[i];
}
if (mpi_rank == 0) {
- HDprintf("Dataset of %zu bytes\n", tot_size_bytes);
+ printf("Dataset of %zu bytes\n", tot_size_bytes);
}
filespace = H5Screate_simple(3, shape, NULL);
VRFY((filespace >= 0), "H5Screate_simple succeeded");
@@ -641,8 +641,8 @@ MpioTest2G(MPI_Comm comm)
hsize_t);
data_size = slice_per_process * shape[1] * shape[2];
data_size_bytes = sizeof(int) * data_size;
- data = HDmalloc(data_size_bytes);
- VRFY((data != NULL), "data HDmalloc succeeded");
+ data = malloc(data_size_bytes);
+ VRFY((data != NULL), "data malloc succeeded");
for (size_t i = 0; i < data_size; i++) {
data[i] = mpi_rank;
@@ -681,7 +681,7 @@ MpioTest2G(MPI_Comm comm)
H5Fclose(file_id);
free(data);
- HDprintf("Proc %d - MpioTest2G test succeeded\n", mpi_rank);
+ printf("Proc %d - MpioTest2G test succeeded\n", mpi_rank);
if (mpi_rank == 0)
HDremove(FILENAME[1]);
@@ -729,7 +729,7 @@ dataset_writeInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Independent write test on file %s\n", filename);
+ printf("Independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -738,8 +738,8 @@ dataset_writeInd(void)
/* allocate memory for data buffer */
data_size = sizeof(DATATYPE);
data_size *= (hsize_t)dim0 * (hsize_t)dim1;
- data_array1 = (DATATYPE *)HDmalloc(data_size);
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc(data_size);
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* ----------------------------------------
* CREATE AN HDF5 FILE WITH PARALLEL ACCESS
@@ -806,7 +806,7 @@ dataset_writeInd(void)
/* setup dimensions again to write with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("writeInd by some with zero row\n");
+ printf("writeInd by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -841,7 +841,7 @@ dataset_writeInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/* Example of using the parallel HDF5 library to read a dataset */
@@ -869,17 +869,17 @@ dataset_readInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Independent read test on file %s\n", filename);
+ printf("Independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* setup file access template */
acc_tpl = create_faccess_plist(comm, info, facc_type);
@@ -949,9 +949,9 @@ dataset_readInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -1002,7 +1002,7 @@ dataset_writeAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Collective write test on file %s\n", filename);
+ printf("Collective write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -1010,12 +1010,12 @@ dataset_writeAll(void)
/* set up the coords array selection */
num_points = (size_t)dim1;
- coords = (hsize_t *)HDmalloc((size_t)dim1 * (size_t)MAX_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)dim1 * (size_t)MAX_RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -1121,7 +1121,7 @@ dataset_writeAll(void)
/* setup dimensions again to writeAll with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("writeAll by some with zero row\n");
+ printf("writeAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1186,7 +1186,7 @@ dataset_writeAll(void)
/* setup dimensions again to writeAll with zero columns for process 0 */
if (VERBOSE_MED)
- HDprintf("writeAll by some with zero col\n");
+ printf("writeAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1326,7 +1326,7 @@ dataset_writeAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
block[0] = 1;
@@ -1475,9 +1475,9 @@ dataset_writeAll(void)
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/*
@@ -1518,7 +1518,7 @@ dataset_readAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Collective read test on file %s\n", filename);
+ printf("Collective read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -1526,14 +1526,14 @@ dataset_readAll(void)
/* set up the coords array selection */
num_points = (size_t)dim1;
- coords = (hsize_t *)HDmalloc((size_t)dim0 * (size_t)dim1 * MAX_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)dim0 * (size_t)dim1 * MAX_RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -1615,7 +1615,7 @@ dataset_readAll(void)
/* setup dimensions again to readAll with zero columns for process 0 */
if (VERBOSE_MED)
- HDprintf("readAll by some with zero col\n");
+ printf("readAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1682,7 +1682,7 @@ dataset_readAll(void)
/* setup dimensions again to readAll with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("readAll by some with zero row\n");
+ printf("readAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1709,9 +1709,9 @@ dataset_readAll(void)
free(data_array1);
if (data_origin1)
free(data_origin1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
block[0] = 1;
@@ -1770,7 +1770,7 @@ dataset_readAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* Dataset6: point selection in File - Point selection in Memory*/
@@ -1816,7 +1816,7 @@ dataset_readAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* Dataset7: point selection in memory - All selection in file*/
@@ -1884,11 +1884,11 @@ dataset_readAll(void)
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -1932,7 +1932,7 @@ extend_writeInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -1943,8 +1943,8 @@ extend_writeInd(void)
chunk_dims[1] = (hsize_t)chunkdim1;
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -1984,7 +1984,7 @@ extend_writeInd(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, MAX_RANK, chunk_dims);
@@ -2116,7 +2116,7 @@ extend_writeInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/*
@@ -2148,7 +2148,7 @@ extend_writeInd2(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test #2 on file %s\n", filename);
+ printf("Extend independent write test #2 on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -2205,8 +2205,8 @@ extend_writeInd2(void)
if (VERBOSE_MED) {
MESG("writing at offset zero: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", written[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", written[i]);
+ printf("\n");
}
ret = H5Dwrite(dataset, H5T_NATIVE_INT, ms, fs, H5P_DEFAULT, written);
VRFY((ret >= 0), "H5Dwrite succeeded");
@@ -2218,15 +2218,15 @@ extend_writeInd2(void)
VRFY((ret >= 0), "H5Dread succeeded");
for (i = 0; i < (int)orig_size; i++)
if (written[i] != retrieved[i]) {
- HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
- written[i], i, retrieved[i]);
+ printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
+ written[i], i, retrieved[i]);
nerrors++;
}
if (VERBOSE_MED) {
MESG("read at offset zero: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", retrieved[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", retrieved[i]);
+ printf("\n");
}
/* -------------------------
@@ -2248,8 +2248,8 @@ extend_writeInd2(void)
if (VERBOSE_MED) {
MESG("writing at offset 10: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", written[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", written[i]);
+ printf("\n");
}
ret = H5Sselect_hyperslab(fs, H5S_SELECT_SET, &orig_size, NULL, &one, &orig_size);
VRFY((ret >= 0), "H5Sselect_hyperslab succeeded");
@@ -2263,15 +2263,15 @@ extend_writeInd2(void)
VRFY((ret >= 0), "H5Dread succeeded");
for (i = 0; i < (int)orig_size; i++)
if (written[i] != retrieved[i]) {
- HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
- written[i], i, retrieved[i]);
+ printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
+ written[i], i, retrieved[i]);
nerrors++;
}
if (VERBOSE_MED) {
MESG("read at offset 10: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", retrieved[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", retrieved[i]);
+ printf("\n");
}
/* Close dataset collectively */
@@ -2310,19 +2310,19 @@ extend_readInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent read test on file %s\n", filename);
+ printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array2 != NULL), "data_array2 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -2443,11 +2443,11 @@ extend_readInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_array2)
- HDfree(data_array2);
+ free(data_array2);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -2492,7 +2492,7 @@ extend_writeAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -2503,8 +2503,8 @@ extend_writeAll(void)
chunk_dims[1] = (hsize_t)chunkdim1;
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -2544,7 +2544,7 @@ extend_writeAll(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, MAX_RANK, chunk_dims);
@@ -2699,7 +2699,7 @@ extend_writeAll(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/* Example of using the parallel HDF5 library to read an extendible dataset */
@@ -2730,19 +2730,19 @@ extend_readAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent read test on file %s\n", filename);
+ printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array2 != NULL), "data_array2 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -2885,11 +2885,11 @@ extend_readAll(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_array2)
- HDfree(data_array2);
+ free(data_array2);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -2921,17 +2921,17 @@ compress_readAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Collective chunked dataset read test on file %s\n", filename);
+ printf("Collective chunked dataset read test on file %s\n", filename);
/* Retrieve MPI parameters */
MPI_Comm_size(comm, &mpi_size);
MPI_Comm_rank(comm, &mpi_rank);
/* Allocate data buffer */
- data_orig = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE));
- VRFY((data_orig != NULL), "data_origin1 HDmalloc succeeded");
- data_read = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE));
- VRFY((data_read != NULL), "data_array1 HDmalloc succeeded");
+ data_orig = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE));
+ VRFY((data_orig != NULL), "data_origin1 malloc succeeded");
+ data_read = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE));
+ VRFY((data_read != NULL), "data_array1 malloc succeeded");
/* Initialize data buffers */
for (u = 0; u < dim; u++)
@@ -3041,8 +3041,8 @@ compress_readAll(void)
/* Verify data read */
for (u = 0; u < dim; u++)
if (data_orig[u] != data_read[u]) {
- HDprintf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__,
- (unsigned)u, data_orig[u], (unsigned)u, data_read[u]);
+ printf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__,
+ (unsigned)u, data_orig[u], (unsigned)u, data_read[u]);
nerrors++;
}
@@ -3064,9 +3064,9 @@ compress_readAll(void)
/* release data buffers */
if (data_read)
- HDfree(data_read);
+ free(data_read);
if (data_orig)
- HDfree(data_orig);
+ free(data_orig);
}
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -3113,7 +3113,7 @@ none_selection_chunk(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -3144,7 +3144,7 @@ none_selection_chunk(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, MAX_RANK, chunk_dims);
@@ -3177,11 +3177,11 @@ none_selection_chunk(void)
/* allocate memory for data buffer. Only allocate enough buffer for
* each processor's data. */
if (mpi_rank) {
- data_origin = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE));
- VRFY((data_origin != NULL), "data_origin HDmalloc succeeded");
+ data_origin = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE));
+ VRFY((data_origin != NULL), "data_origin malloc succeeded");
- data_array = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* put some trivial data in the data_array */
mstart[0] = mstart[1] = 0;
@@ -3276,9 +3276,9 @@ none_selection_chunk(void)
/* release data buffers */
if (data_origin)
- HDfree(data_origin);
+ free(data_origin);
if (data_array)
- HDfree(data_array);
+ free(data_array);
}
/* Function: test_actual_io_mode
@@ -3408,13 +3408,13 @@ test_actual_io_mode(int selection_mode)
MPI_Barrier(test_comm);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = test_comm;
mpi_info = MPI_INFO_NULL;
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* Setup the file access template */
fapl_id = create_faccess_plist(mpi_comm, mpi_info, facc_type);
@@ -3625,8 +3625,8 @@ test_actual_io_mode(int selection_mode)
length = dim0 * dim1;
/* Allocate and initialize the buffer */
- buffer = (int *)HDmalloc(sizeof(int) * (size_t)length);
- VRFY((buffer != NULL), "HDmalloc of buffer succeeded");
+ buffer = (int *)malloc(sizeof(int) * (size_t)length);
+ VRFY((buffer != NULL), "malloc of buffer succeeded");
for (i = 0; i < length; i++)
buffer[i] = i;
@@ -3710,8 +3710,8 @@ test_actual_io_mode(int selection_mode)
VRFY((actual_io_mode_write == actual_io_mode_expected), message);
}
else {
- HDfprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write,
- actual_io_mode_write);
+ fprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write,
+ actual_io_mode_write);
}
/* To test that the property is successfully reset to the default, we perform some
@@ -3767,7 +3767,7 @@ test_actual_io_mode(int selection_mode)
ret = H5Sclose(mem_space);
ret = H5Sclose(file_space);
ret = H5Fclose(fid);
- HDfree(buffer);
+ free(buffer);
return;
}
@@ -3798,7 +3798,7 @@ actual_io_mode_tests(void)
if (mpi_size > 2)
test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX);
else
- HDfprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n");
+ fprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n");
test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE);
@@ -3906,7 +3906,7 @@ test_no_collective_cause_mode(int selection_mode)
MPI_Barrier(test_comm);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = test_comm;
mpi_info = MPI_INFO_NULL;
@@ -3948,7 +3948,7 @@ test_no_collective_cause_mode(int selection_mode)
}
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* Setup the file access template */
fapl_id = create_faccess_plist(mpi_comm, mpi_info, l_facc_type);
@@ -4063,8 +4063,8 @@ test_no_collective_cause_mode(int selection_mode)
H5_CHECKED_ASSIGN(length, int, dims[0] * dims[1], hsize_t);
/* Allocate and initialize the buffer */
- buffer = (int *)HDmalloc(sizeof(int) * (size_t)length);
- VRFY((buffer != NULL), "HDmalloc of buffer succeeded");
+ buffer = (int *)malloc(sizeof(int) * (size_t)length);
+ VRFY((buffer != NULL), "malloc of buffer succeeded");
for (i = 0; i < length; i++)
buffer[i] = i;
@@ -4150,11 +4150,11 @@ test_no_collective_cause_mode(int selection_mode)
"reading and writing are the same for global cause of Broken Collective I/O");
/* Test values */
- HDmemset(message, 0, sizeof(message));
+ memset(message, 0, sizeof(message));
HDsnprintf(message, sizeof(message),
"Local cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message);
- HDmemset(message, 0, sizeof(message));
+ memset(message, 0, sizeof(message));
HDsnprintf(message, sizeof(message),
"Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message);
@@ -4178,7 +4178,7 @@ test_no_collective_cause_mode(int selection_mode)
H5Sclose(file_space);
if (fid)
H5Fclose(fid);
- HDfree(buffer);
+ free(buffer);
/* clean up external file */
if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL)
@@ -4260,11 +4260,11 @@ dataset_atomicity(void)
dim1 = 32;
filename = GetTestParameters();
if (facc_type != FACC_MPIO) {
- HDprintf("Atomicity tests will not work without the MPIO VFD\n");
+ printf("Atomicity tests will not work without the MPIO VFD\n");
return;
}
if (VERBOSE_MED)
- HDprintf("atomic writes to file %s\n", filename);
+ printf("atomic writes to file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -4272,11 +4272,11 @@ dataset_atomicity(void)
buf_size = dim0 * dim1;
/* allocate memory for data buffer */
- write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((write_buf != NULL), "write_buf HDcalloc succeeded");
+ write_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((write_buf != NULL), "write_buf calloc succeeded");
/* allocate memory for data buffer */
- read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((read_buf != NULL), "read_buf HDcalloc succeeded");
+ read_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((read_buf != NULL), "read_buf calloc succeeded");
/* setup file access template */
acc_tpl = create_faccess_plist(comm, info, facc_type);
@@ -4394,9 +4394,9 @@ dataset_atomicity(void)
j = 0;
k = 0;
for (i = 0; i < dim0; i++) {
- HDprintf("\n");
+ printf("\n");
for (j = 0; j < dim1; j++)
- HDprintf("%d ", read_buf[k++]);
+ printf("%d ", read_buf[k++]);
}
}
@@ -4410,8 +4410,8 @@ dataset_atomicity(void)
"Atomicity Test Failed Process %d: Value read should be 0 or 5\n");
for (i = 1; i < buf_size; i++) {
if (read_buf[i] != compare) {
- HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i,
- read_buf[i], compare);
+ printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i,
+ read_buf[i], compare);
nerrors++;
}
}
@@ -4422,20 +4422,20 @@ dataset_atomicity(void)
/* release data buffers */
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
/* open dataset2 (non-contiguous case) */
dataset2 = H5Dopen2(fid, DATASETNAME6, H5P_DEFAULT);
VRFY((dataset2 >= 0), "H5Dopen2 succeeded");
/* allocate memory for data buffer */
- write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((write_buf != NULL), "write_buf HDcalloc succeeded");
+ write_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((write_buf != NULL), "write_buf calloc succeeded");
/* allocate memory for data buffer */
- read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((read_buf != NULL), "read_buf HDcalloc succeeded");
+ read_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((read_buf != NULL), "read_buf calloc succeeded");
for (i = 0; i < buf_size; i++) {
write_buf[i] = 5;
@@ -4494,11 +4494,11 @@ dataset_atomicity(void)
j = 0;
k = 0;
for (i = 0; i < dim0; i++) {
- HDprintf("\n");
+ printf("\n");
for (j = 0; j < dim1; j++)
- HDprintf("%d ", read_buf[k++]);
+ printf("%d ", read_buf[k++]);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -4531,8 +4531,8 @@ dataset_atomicity(void)
continue;
}
else if (compare != read_buf[k]) {
- HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank,
- k, read_buf[k], compare);
+ printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank,
+ k, read_buf[k], compare);
nerrors++;
}
k++;
@@ -4549,9 +4549,9 @@ dataset_atomicity(void)
/* release data buffers */
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
@@ -4577,7 +4577,7 @@ test_dense_attr(void)
/* get filename */
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -4638,29 +4638,29 @@ main(int argc, char **argv)
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);
- HDmemset(filenames, 0, sizeof(filenames));
+ memset(filenames, 0, sizeof(filenames));
dim0 = BIG_X_FACTOR;
dim1 = BIG_Y_FACTOR;
dim2 = BIG_Z_FACTOR;
if (MAINPROCESS) {
- HDprintf("===================================\n");
- HDprintf("2 GByte IO TESTS START\n");
- HDprintf("2 MPI ranks will run the tests...\n");
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("2 GByte IO TESTS START\n");
+ printf("2 MPI ranks will run the tests...\n");
+ printf("===================================\n");
h5_show_hostname();
}
if (H5dont_atexit() < 0) {
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ printf("Failed to turn off atexit processing. Continue.\n");
};
H5open();
- HDmemset(filenames, 0, sizeof(filenames));
+ memset(filenames, 0, sizeof(filenames));
for (int i = 0; i < NFILENAME; i++) {
- if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
- HDprintf("couldn't allocate filename array\n");
+ if (NULL == (filenames[i] = malloc(PATH_MAX))) {
+ printf("couldn't allocate filename array\n");
MPI_Abort(MPI_COMM_WORLD, -1);
}
}
@@ -4675,7 +4675,7 @@ main(int argc, char **argv)
if (mpi_rank >= 2)
rank_color = 1;
if (MPI_Comm_split(test_comm, rank_color, mpi_rank, &test_comm) != MPI_SUCCESS) {
- HDprintf("MPI returned an error. Exiting\n");
+ printf("MPI returned an error. Exiting\n");
}
}
@@ -4730,7 +4730,7 @@ main(int argc, char **argv)
HDremove(FILENAME[0]);
for (int i = 0; i < NFILENAME; i++) {
- HDfree(filenames[i]);
+ free(filenames[i]);
filenames[i] = NULL;
}
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index 0f8d01f..909b793 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -130,16 +130,16 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "count[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "stride[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "block[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "total datapoints=%" PRIuHSIZE "\n",
- start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1],
- block[0] * block[1] * count[0] * count[1]);
+ printf("start[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "count[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "stride[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "block[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "total datapoints=%" PRIuHSIZE "\n",
+ start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1],
+ block[0] * block[1] * count[0] * count[1]);
k = 0;
for (i = 0; i < num_points; i++) {
- HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
+ printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
k += 2;
}
}
@@ -155,19 +155,19 @@ dataset_print(hsize_t start[], hsize_t block[], B_DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("%-8s", "Cols:");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3" PRIuHSIZE " ", start[1] + j);
+ printf("%3" PRIuHSIZE " ", start[1] + j);
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2" PRIuHSIZE ": ", i + start[0]);
+ printf("Row %2" PRIuHSIZE ": ", i + start[0]);
for (j = 0; j < block[1]; j++) {
- HDprintf("%" PRIuHSIZE " ", *dataptr++);
+ printf("%" PRIuHSIZE " ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -183,15 +183,15 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[],
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("verify_data dumping:::\n");
- HDprintf("start(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "count(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "stride(%" PRIuHSIZE ", %" PRIuHSIZE "), "
- "block(%" PRIuHSIZE ", %" PRIuHSIZE ")\n",
- start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1]);
- HDprintf("original values:\n");
+ printf("verify_data dumping:::\n");
+ printf("start(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "count(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "stride(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "block(%" PRIuHSIZE ", %" PRIuHSIZE ")\n",
+ start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1]);
+ printf("original values:\n");
dataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
dataset_print(start, block, dataset);
}
@@ -200,10 +200,10 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[],
for (j = 0; j < block[1]; j++) {
if (*dataset != *original) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%" PRIuHSIZE "][%" PRIuHSIZE "]"
- "(row %" PRIuHSIZE ", col %" PRIuHSIZE "): "
- "expect %" PRIuHSIZE ", got %" PRIuHSIZE "\n",
- i, j, i + start[0], j + start[1], *(original), *(dataset));
+ printf("Dataset Verify failed at [%" PRIuHSIZE "][%" PRIuHSIZE "]"
+ "(row %" PRIuHSIZE ", col %" PRIuHSIZE "): "
+ "expect %" PRIuHSIZE ", got %" PRIuHSIZE "\n",
+ i, j, i + start[0], j + start[1], *(original), *(dataset));
}
dataset++;
original++;
@@ -211,9 +211,9 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[],
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in verify_data\n", vrfyerrs);
+ printf("%d errors found in verify_data\n", vrfyerrs);
return (vrfyerrs);
}
@@ -311,12 +311,12 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t
break;
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
}
}
@@ -369,20 +369,20 @@ ccdataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("Print only the first block of the dataset\n");
- HDprintf("%-8s", "Cols:");
+ printf("Print only the first block of the dataset\n");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3lu ", (unsigned long)(start[1] + j));
+ printf("%3lu ", (unsigned long)(start[1] + j));
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2lu: ", (unsigned long)(i + start[0]));
+ printf("Row %2lu: ", (unsigned long)(i + start[0]));
for (j = 0; j < block[1]; j++) {
- HDprintf("%03d ", *dataptr++);
+ printf("%03d ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -399,14 +399,14 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("dataset_vrfy dumping:::\n");
- HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1]);
- HDprintf("original values:\n");
+ printf("dataset_vrfy dumping:::\n");
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1]);
+ printf("original values:\n");
ccdataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
ccdataset_print(start, block, dataset);
}
@@ -429,8 +429,8 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
}
if (*dataptr != *oriptr) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr));
+ printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr));
}
}
}
@@ -438,9 +438,9 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
+ printf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
return (vrfyerrs);
}
@@ -474,7 +474,7 @@ dataset_big_write(void)
B_DATATYPE *wdata;
/* allocate memory for data buffer */
- wdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE));
+ wdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE));
VRFY_G((wdata != NULL), "wdata malloc succeeded");
/* setup file access template */
@@ -492,7 +492,7 @@ dataset_big_write(void)
/* Each process takes a slabs of rows. */
if (mpi_rank_g == 0)
- HDprintf("\nTesting Dataset1 write by ROW\n");
+ printf("\nTesting Dataset1 write by ROW\n");
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = (hsize_t)mpi_size_g;
@@ -553,7 +553,7 @@ dataset_big_write(void)
/* Each process takes a slabs of cols. */
if (mpi_rank_g == 0)
- HDprintf("\nTesting Dataset2 write by COL\n");
+ printf("\nTesting Dataset2 write by COL\n");
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = (hsize_t)mpi_size_g;
@@ -614,7 +614,7 @@ dataset_big_write(void)
/* ALL selection */
if (mpi_rank_g == 0)
- HDprintf("\nTesting Dataset3 write select ALL proc 0, NONE others\n");
+ printf("\nTesting Dataset3 write select ALL proc 0, NONE others\n");
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = 1;
@@ -675,7 +675,7 @@ dataset_big_write(void)
/* Point selection */
if (mpi_rank_g == 0)
- HDprintf("\nTesting Dataset4 write point selection\n");
+ printf("\nTesting Dataset4 write point selection\n");
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = (hsize_t)(mpi_size_g * 4);
@@ -697,7 +697,7 @@ dataset_big_write(void)
num_points = bigcount;
- coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
VRFY_G((coords != NULL), "coords malloc succeeded");
set_coords(start, count, stride, block, num_points, coords, IN_ORDER);
@@ -746,7 +746,7 @@ dataset_big_write(void)
ret = H5Dclose(dataset);
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
- HDfree(wdata);
+ free(wdata);
H5Fclose(fid);
}
@@ -779,12 +779,12 @@ dataset_big_read(void)
herr_t ret; /* Generic return value */
/* allocate memory for data buffer */
- rdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE));
+ rdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE));
VRFY_G((rdata != NULL), "rdata malloc succeeded");
- wdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE));
+ wdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE));
VRFY_G((wdata != NULL), "wdata malloc succeeded");
- HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE));
+ memset(rdata, 0, bigcount * sizeof(B_DATATYPE));
/* setup file access template */
acc_tpl = H5Pcreate(H5P_FILE_ACCESS);
@@ -800,7 +800,7 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "");
if (mpi_rank_g == 0)
- HDprintf("\nRead Testing Dataset1 by COL\n");
+ printf("\nRead Testing Dataset1 by COL\n");
dataset = H5Dopen2(fid, DATASET1, H5P_DEFAULT);
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
@@ -851,7 +851,7 @@ dataset_big_read(void)
/* verify the read data with original expected data */
ret = verify_data(start, count, stride, block, rdata, wdata);
if (ret) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
@@ -863,8 +863,8 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
if (mpi_rank_g == 0)
- HDprintf("\nRead Testing Dataset2 by ROW\n");
- HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE));
+ printf("\nRead Testing Dataset2 by ROW\n");
+ memset(rdata, 0, bigcount * sizeof(B_DATATYPE));
dataset = H5Dopen2(fid, DATASET2, H5P_DEFAULT);
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
@@ -914,7 +914,7 @@ dataset_big_read(void)
/* verify the read data with original expected data */
ret = verify_data(start, count, stride, block, rdata, wdata);
if (ret) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
@@ -926,8 +926,8 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
if (mpi_rank_g == 0)
- HDprintf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n");
- HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE));
+ printf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n");
+ memset(rdata, 0, bigcount * sizeof(B_DATATYPE));
dataset = H5Dopen2(fid, DATASET3, H5P_DEFAULT);
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
@@ -979,7 +979,7 @@ dataset_big_read(void)
/* verify the read data with original expected data */
ret = verify_data(start, count, stride, block, rdata, wdata);
if (ret) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
}
@@ -992,7 +992,7 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
if (mpi_rank_g == 0)
- HDprintf("\nRead Testing Dataset4 with Point selection\n");
+ printf("\nRead Testing Dataset4 with Point selection\n");
dataset = H5Dopen2(fid, DATASET4, H5P_DEFAULT);
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
@@ -1017,7 +1017,7 @@ dataset_big_read(void)
num_points = bigcount;
- coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
VRFY_G((coords != NULL), "coords malloc succeeded");
set_coords(start, count, stride, block, num_points, coords, IN_ORDER);
@@ -1028,7 +1028,7 @@ dataset_big_read(void)
VRFY_G((ret >= 0), "H5Sselect_elements succeeded");
if (coords)
- HDfree(coords);
+ free(coords);
/* create a memory dataspace */
/* Warning: H5Screate_simple requires an array of hsize_t elements
@@ -1054,7 +1054,7 @@ dataset_big_read(void)
ret = verify_data(start, count, stride, block, rdata, wdata);
if (ret) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
@@ -1065,8 +1065,8 @@ dataset_big_read(void)
ret = H5Dclose(dataset);
VRFY_G((ret >= 0), "H5Dclose1 succeeded");
- HDfree(wdata);
- HDfree(rdata);
+ free(wdata);
+ free(rdata);
wdata = NULL;
rdata = NULL;
@@ -1093,9 +1093,9 @@ dataset_big_read(void)
/* release data buffers */
if (rdata)
- HDfree(rdata);
+ free(rdata);
if (wdata)
- HDfree(wdata);
+ free(wdata);
} /* dataset_large_readAll */
@@ -1103,7 +1103,7 @@ static void
single_rank_independent_io(void)
{
if (mpi_rank_g == 0)
- HDprintf("\nSingle Rank Independent I/O\n");
+ printf("\nSingle Rank Independent I/O\n");
if (MAIN_PROCESS) {
hsize_t dims[1];
@@ -1150,7 +1150,7 @@ single_rank_independent_io(void)
VRFY_G((ret >= 0), "H5Dwrite succeeded");
/* Wipe buffer */
- HDmemset(data, 0, dims[0] * sizeof(int));
+ memset(data, 0, dims[0] * sizeof(int));
/* Read data back */
ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_BLOCK, fspace_id, H5P_DEFAULT, data);
@@ -1159,7 +1159,7 @@ single_rank_independent_io(void)
/* Verify data */
for (i = 0; i < dims[0]; i++)
if (data[i] != (int)(i % (uint64_t)DXFER_BIGCOUNT)) {
- HDfprintf(stderr, "verify failed\n");
+ fprintf(stderr, "verify failed\n");
exit(1);
}
@@ -1266,7 +1266,7 @@ coll_chunk1(void)
{
const char *filename = FILENAME[0];
if (mpi_rank_g == 0)
- HDprintf("\nCollective chunk I/O Test #1\n");
+ printf("\nCollective chunk I/O Test #1\n");
coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER);
coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER);
@@ -1317,7 +1317,7 @@ coll_chunk2(void)
{
const char *filename = FILENAME[0];
if (mpi_rank_g == 0)
- HDprintf("\nCollective chunk I/O Test #2\n");
+ printf("\nCollective chunk I/O Test #2\n");
coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER);
coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, POINT, OUT_OF_ORDER);
@@ -1369,7 +1369,7 @@ coll_chunk3(void)
{
const char *filename = FILENAME[0];
if (mpi_rank_g == 0)
- HDprintf("\nCollective chunk I/O Test #3\n");
+ printf("\nCollective chunk I/O Test #3\n");
coll_chunktest(filename, mpi_size_g, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER);
coll_chunktest(filename, mpi_size_g, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER);
@@ -1443,7 +1443,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
dims[1] = space_dim2;
/* allocate memory for data buffer */
- data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY_G((data_array1 != NULL), "data_array1 malloc succeeded");
/* set up dimensions of the slab this process accesses */
@@ -1451,7 +1451,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
/* set up the coords array selection */
num_points = block[0] * block[1] * count[0] * count[1];
- coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
VRFY_G((coords != NULL), "coords malloc succeeded");
point_set(start, count, stride, block, num_points, coords, mode);
@@ -1716,16 +1716,16 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
VRFY_G((status >= 0), "");
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
/* Use collective read to verify the correctness of collective write. */
/* allocate memory for data buffer */
- data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY_G((data_array1 != NULL), "data_array1 malloc succeeded");
/* allocate memory for data buffer */
- data_origin1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_origin1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY_G((data_origin1 != NULL), "data_origin1 malloc succeeded");
acc_plist = create_faccess_plist(comm, info, facc_type);
@@ -1854,11 +1854,11 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
int
@@ -1886,7 +1886,7 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0)
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ printf("Failed to turn off atexit processing. Continue.\n");
/* set alarm. */
TestAlarmOn();
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 4d3aff5..b374a48 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -480,13 +480,13 @@ static hbool_t trace_file_check(int metadata_write_strategy);
static void
print_stats(void)
{
- HDfprintf(stdout, "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n", world_mpi_rank,
- datum_clears, datum_pinned_clears, datum_destroys);
- HDfprintf(stdout, "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n", world_mpi_rank,
- datum_flushes, datum_pinned_flushes, datum_loads);
- HDfprintf(stdout, "%d: pins: global / global dirty / local = %ld / %ld / %ld\n", world_mpi_rank,
- global_pins, global_dirty_pins, local_pins);
- HDfflush(stdout);
+ fprintf(stdout, "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n", world_mpi_rank,
+ datum_clears, datum_pinned_clears, datum_destroys);
+ fprintf(stdout, "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n", world_mpi_rank,
+ datum_flushes, datum_pinned_flushes, datum_loads);
+ fprintf(stdout, "%d: pins: global / global dirty / local = %ld / %ld / %ld\n", world_mpi_rank,
+ global_pins, global_dirty_pins, local_pins);
+ fflush(stdout);
return;
@@ -560,8 +560,8 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, __func__,
- mpi_result);
+ fprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, __func__,
+ mpi_result);
}
}
}
@@ -577,8 +577,8 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Group_excl() failed with error %d.\n", world_mpi_rank, __func__,
- mpi_result);
+ fprintf(stdout, "%d:%s: MPI_Group_excl() failed with error %d.\n", world_mpi_rank, __func__,
+ mpi_result);
}
}
}
@@ -592,8 +592,8 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Comm_create() failed with error %d.\n", world_mpi_rank,
- __func__, mpi_result);
+ fprintf(stdout, "%d:%s: MPI_Comm_create() failed with error %d.\n", world_mpi_rank, __func__,
+ mpi_result);
}
}
else {
@@ -605,8 +605,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: file_mpi_comm == MPI_COMM_NULL.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: file_mpi_comm == MPI_COMM_NULL.\n", world_mpi_rank, __func__);
}
}
}
@@ -619,8 +618,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: file_mpi_comm != MPI_COMM_NULL.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: file_mpi_comm != MPI_COMM_NULL.\n", world_mpi_rank, __func__);
}
}
}
@@ -636,8 +634,8 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Comm_size() failed with error %d.\n", world_mpi_rank, __func__,
- mpi_result);
+ fprintf(stdout, "%d:%s: MPI_Comm_size() failed with error %d.\n", world_mpi_rank, __func__,
+ mpi_result);
}
}
}
@@ -651,8 +649,8 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Comm_rank() failed with error %d.\n", world_mpi_rank, __func__,
- mpi_result);
+ fprintf(stdout, "%d:%s: MPI_Comm_rank() failed with error %d.\n", world_mpi_rank, __func__,
+ mpi_result);
}
}
}
@@ -747,8 +745,8 @@ init_data(void)
haddr_t addr = BASE_ADDR;
/* this must hold so moves don't change entry size. */
- HDassert((NUM_DATA_ENTRIES / 2) % 20 == 0);
- HDassert((virt_num_data_entries / 2) % 20 == 0);
+ assert((NUM_DATA_ENTRIES / 2) % 20 == 0);
+ assert((virt_num_data_entries / 2) % 20 == 0);
for (i = 0; i < NUM_DATA_ENTRIES; i++) {
data[i].base_addr = addr;
@@ -770,7 +768,7 @@ init_data(void)
data_index[i] = i;
addr += addr_offsets[j];
- HDassert(addr > data[i].base_addr);
+ assert(addr > data[i].base_addr);
j = (j + 1) % num_addr_offsets;
}
@@ -823,7 +821,7 @@ do_express_test(void)
nerrors++;
max_express_test = -1;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__);
}
}
@@ -871,7 +869,7 @@ do_sync(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -882,7 +880,7 @@ do_sync(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != SYNC_ACK_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -890,7 +888,7 @@ do_sync(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in sync ack.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad data in sync ack.\n", world_mpi_rank, __func__);
}
}
}
@@ -927,7 +925,7 @@ get_max_nerrors(void)
nerrors++;
max_nerrors = -1;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__);
}
}
@@ -970,7 +968,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: bad param(s) on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: bad param(s) on entry.\n", world_mpi_rank, __func__);
}
}
else {
@@ -987,7 +985,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Recv() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: MPI_Recv() failed.\n", world_mpi_rank, __func__);
}
}
else if (mssg_ptr->magic != MSSG_MAGIC) {
@@ -995,7 +993,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank, __func__);
}
}
else if (mssg_ptr->src != status.MPI_SOURCE) {
@@ -1003,7 +1001,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n", world_mpi_rank, __func__);
}
}
}
@@ -1043,7 +1041,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Invalid mssg on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Invalid mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1063,7 +1061,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Send() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: MPI_Send() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -1098,7 +1096,7 @@ setup_derived_types(void)
MPI_Aint displs[9];
struct mssg_t sample; /* used to compute displacements */
- HDmemset(&sample, 0, sizeof(struct mssg_t));
+ memset(&sample, 0, sizeof(struct mssg_t));
/* setup the displacements array */
if ((MPI_SUCCESS != MPI_Get_address(&sample.req, &displs[0])) ||
@@ -1114,7 +1112,7 @@ setup_derived_types(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -1134,7 +1132,7 @@ setup_derived_types(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -1148,7 +1146,7 @@ setup_derived_types(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -1187,7 +1185,7 @@ takedown_derived_types(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n", world_mpi_rank, __func__);
}
}
@@ -1240,8 +1238,8 @@ reset_server_counters(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, __func__,
- actual_total_reads, total_reads);
+ fprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, __func__,
+ actual_total_reads, total_reads);
}
}
@@ -1250,8 +1248,8 @@ reset_server_counters(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, __func__,
- actual_total_writes, total_writes);
+ fprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, __func__,
+ actual_total_writes, total_writes);
}
}
@@ -1293,7 +1291,7 @@ server_main(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: This isn't the server process?!?!?\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: This isn't the server process?!?!?\n", world_mpi_rank, __func__);
}
}
@@ -1310,7 +1308,7 @@ server_main(void)
case WRITE_REQ_ACK_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received write ack?!?.\n", __func__);
+ fprintf(stdout, "%s: Received write ack?!?.\n", __func__);
break;
case READ_REQ_CODE:
@@ -1320,7 +1318,7 @@ server_main(void)
case READ_REQ_REPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received read req reply?!?.\n", __func__);
+ fprintf(stdout, "%s: Received read req reply?!?.\n", __func__);
break;
case SYNC_REQ_CODE:
@@ -1330,7 +1328,7 @@ server_main(void)
case SYNC_ACK_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received sync ack?!?.\n", __func__);
+ fprintf(stdout, "%s: Received sync ack?!?.\n", __func__);
break;
case REQ_TTL_WRITES_CODE:
@@ -1340,7 +1338,7 @@ server_main(void)
case REQ_TTL_WRITES_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received total writes reply?!?.\n", __func__);
+ fprintf(stdout, "%s: Received total writes reply?!?.\n", __func__);
break;
case REQ_TTL_READS_CODE:
@@ -1350,7 +1348,7 @@ server_main(void)
case REQ_TTL_READS_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received total reads reply?!?.\n", __func__);
+ fprintf(stdout, "%s: Received total reads reply?!?.\n", __func__);
break;
case REQ_ENTRY_WRITES_CODE:
@@ -1360,7 +1358,7 @@ server_main(void)
case REQ_ENTRY_WRITES_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received entry writes reply?!?.\n", __func__);
+ fprintf(stdout, "%s: Received entry writes reply?!?.\n", __func__);
break;
case REQ_ENTRY_READS_CODE:
@@ -1370,7 +1368,7 @@ server_main(void)
case REQ_ENTRY_READS_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received entry reads reply?!?.\n", __func__);
+ fprintf(stdout, "%s: Received entry reads reply?!?.\n", __func__);
break;
case REQ_RW_COUNT_RESET_CODE:
@@ -1380,7 +1378,7 @@ server_main(void)
case REQ_RW_COUNT_RESET_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received RW count reset reply?!?.\n", __func__);
+ fprintf(stdout, "%s: Received RW count reset reply?!?.\n", __func__);
break;
case DONE_REQ_CODE:
@@ -1393,7 +1391,7 @@ server_main(void)
nerrors++;
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, __func__);
break;
}
}
@@ -1435,7 +1433,7 @@ serve_read_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1449,8 +1447,8 @@ serve_read_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
- target_addr);
+ fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
+ target_addr);
}
}
else if (data[target_index].len != mssg_ptr->len) {
@@ -1458,8 +1456,8 @@ serve_read_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__,
- data[target_index].len, mssg_ptr->len);
+ fprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__,
+ data[target_index].len, mssg_ptr->len);
}
}
else if (!(data[target_index].valid)) {
@@ -1467,11 +1465,10 @@ serve_read_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout,
- "%d:%s: proc %d read invalid entry. "
- "idx/base_addr = %d/%" PRIuHADDR ".\n",
- world_mpi_rank, __func__, mssg_ptr->src, target_index,
- data[target_index].base_addr);
+ fprintf(stdout,
+ "%d:%s: proc %d read invalid entry. "
+ "idx/base_addr = %d/%" PRIuHADDR ".\n",
+ world_mpi_rank, __func__, mssg_ptr->src, target_index, data[target_index].base_addr);
}
}
else {
@@ -1502,15 +1499,15 @@ serve_read_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d read 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src),
- (long long)(data[target_index].base_addr), (int)(data[target_index].len),
- (int)(data[target_index].ver));
+ fprintf(stdout, "%d read 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src),
+ (long long)(data[target_index].base_addr), (int)(data[target_index].len),
+ (int)(data[target_index].ver));
}
else {
- HDfprintf(stdout, "%d read 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src),
- (long long)(data[target_index].base_addr), (int)(data[target_index].len),
- (int)(data[target_index].ver));
+ fprintf(stdout, "%d read 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src),
+ (long long)(data[target_index].base_addr), (int)(data[target_index].len),
+ (int)(data[target_index].ver));
}
}
@@ -1551,7 +1548,7 @@ serve_sync_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1578,11 +1575,11 @@ serve_sync_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d sync.\n", (int)(mssg_ptr->src));
+ fprintf(stdout, "%d sync.\n", (int)(mssg_ptr->src));
}
else {
- HDfprintf(stdout, "%d sync FAILED.\n", (int)(mssg_ptr->src));
+ fprintf(stdout, "%d sync FAILED.\n", (int)(mssg_ptr->src));
}
}
@@ -1625,7 +1622,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1639,8 +1636,8 @@ serve_write_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
- target_addr);
+ fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
+ target_addr);
}
}
else if (data[target_index].len != mssg_ptr->len) {
@@ -1648,8 +1645,8 @@ serve_write_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__,
- data[target_index].len, mssg_ptr->len);
+ fprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__,
+ data[target_index].len, mssg_ptr->len);
}
}
}
@@ -1664,8 +1661,8 @@ serve_write_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n", world_mpi_rank, __func__,
- new_ver_num, data[target_index].ver);
+ fprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n", world_mpi_rank, __func__,
+ new_ver_num, data[target_index].ver);
}
}
}
@@ -1703,15 +1700,15 @@ serve_write_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d write 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src),
- (long long)(data[target_index].base_addr), (int)(data[target_index].len),
- (int)(data[target_index].ver));
+ fprintf(stdout, "%d write 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src),
+ (long long)(data[target_index].base_addr), (int)(data[target_index].len),
+ (int)(data[target_index].ver));
}
else {
- HDfprintf(stdout, "%d write 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src),
- (long long)(data[target_index].base_addr), (int)(data[target_index].len),
- (int)(data[target_index].ver));
+ fprintf(stdout, "%d write 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src),
+ (long long)(data[target_index].base_addr), (int)(data[target_index].len),
+ (int)(data[target_index].ver));
}
}
@@ -1750,7 +1747,7 @@ serve_total_writes_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1777,11 +1774,11 @@ serve_total_writes_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d request total writes %d.\n", (int)(mssg_ptr->src), total_writes);
+ fprintf(stdout, "%d request total writes %d.\n", (int)(mssg_ptr->src), total_writes);
}
else {
- HDfprintf(stdout, "%d request total writes %d -- FAILED.\n", (int)(mssg_ptr->src), total_writes);
+ fprintf(stdout, "%d request total writes %d -- FAILED.\n", (int)(mssg_ptr->src), total_writes);
}
}
@@ -1820,7 +1817,7 @@ serve_total_reads_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1847,11 +1844,11 @@ serve_total_reads_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d request total reads %d.\n", (int)(mssg_ptr->src), total_reads);
+ fprintf(stdout, "%d request total reads %d.\n", (int)(mssg_ptr->src), total_reads);
}
else {
- HDfprintf(stdout, "%d request total reads %d -- FAILED.\n", (int)(mssg_ptr->src), total_reads);
+ fprintf(stdout, "%d request total reads %d -- FAILED.\n", (int)(mssg_ptr->src), total_reads);
}
}
@@ -1892,7 +1889,7 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1906,8 +1903,8 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
- target_addr);
+ fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
+ target_addr);
}
}
else {
@@ -1934,13 +1931,13 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d request entry 0x%llx writes = %ld.\n", (int)(mssg_ptr->src),
- (long long)(data[target_index].base_addr), (long)(data[target_index].writes));
+ fprintf(stdout, "%d request entry 0x%llx writes = %ld.\n", (int)(mssg_ptr->src),
+ (long long)(data[target_index].base_addr), (long)(data[target_index].writes));
}
else {
- HDfprintf(stdout, "%d request entry 0x%llx writes = %ld FAILED.\n", (int)(mssg_ptr->src),
- (long long)(data[target_index].base_addr), (long)(data[target_index].writes));
+ fprintf(stdout, "%d request entry 0x%llx writes = %ld FAILED.\n", (int)(mssg_ptr->src),
+ (long long)(data[target_index].base_addr), (long)(data[target_index].writes));
}
}
@@ -1981,7 +1978,7 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1995,8 +1992,8 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
- target_addr);
+ fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
+ target_addr);
}
}
else {
@@ -2023,13 +2020,13 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d request entry 0x%llx reads = %ld.\n", (int)(mssg_ptr->src),
- (long long)(data[target_index].base_addr), (long)(data[target_index].reads));
+ fprintf(stdout, "%d request entry 0x%llx reads = %ld.\n", (int)(mssg_ptr->src),
+ (long long)(data[target_index].base_addr), (long)(data[target_index].reads));
}
else {
- HDfprintf(stdout, "%d request entry 0x%llx reads = %ld FAILED.\n", (int)(mssg_ptr->src),
- (long long)(data[target_index].base_addr), (long)(data[target_index].reads));
+ fprintf(stdout, "%d request entry 0x%llx reads = %ld FAILED.\n", (int)(mssg_ptr->src),
+ (long long)(data[target_index].base_addr), (long)(data[target_index].reads));
}
}
@@ -2067,7 +2064,7 @@ serve_rw_count_reset_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -2099,11 +2096,11 @@ serve_rw_count_reset_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d request R/W counter reset.\n", (int)(mssg_ptr->src));
+ fprintf(stdout, "%d request R/W counter reset.\n", (int)(mssg_ptr->src));
}
else {
- HDfprintf(stdout, "%d request R/w counter reset FAILED.\n", (int)(mssg_ptr->src));
+ fprintf(stdout, "%d request R/w counter reset FAILED.\n", (int)(mssg_ptr->src));
}
}
@@ -2134,25 +2131,25 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr)
int idx;
struct datum *entry_ptr;
- HDassert(udata_ptr);
- HDassert(image_len_ptr);
+ assert(udata_ptr);
+ assert(image_len_ptr);
idx = addr_to_datum_index(addr);
- HDassert(idx >= 0);
- HDassert(idx < NUM_DATA_ENTRIES);
- HDassert(idx < virt_num_data_entries);
+ assert(idx >= 0);
+ assert(idx < NUM_DATA_ENTRIES);
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(addr == entry_ptr->base_addr);
- HDassert(!entry_ptr->global_pinned);
- HDassert(!entry_ptr->local_pinned);
+ assert(addr == entry_ptr->base_addr);
+ assert(!entry_ptr->global_pinned);
+ assert(!entry_ptr->local_pinned);
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: get_initial_load_size() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank,
- idx, (long)addr, (int)entry_ptr->local_len);
+ fprintf(stdout, "%d: get_initial_load_size() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx,
+ (long)addr, (int)entry_ptr->local_len);
fflush(stdout);
}
@@ -2183,26 +2180,26 @@ datum_deserialize(const void H5_ATTR_NDEBUG_UNUSED *image_ptr, H5_ATTR_UNUSED si
int idx;
struct datum *entry_ptr = NULL;
- HDassert(image_ptr != NULL);
+ assert(image_ptr != NULL);
idx = addr_to_datum_index(addr);
- HDassert(idx >= 0);
- HDassert(idx < NUM_DATA_ENTRIES);
- HDassert(idx < virt_num_data_entries);
+ assert(idx >= 0);
+ assert(idx < NUM_DATA_ENTRIES);
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(addr == entry_ptr->base_addr);
- HDassert(!entry_ptr->global_pinned);
- HDassert(!entry_ptr->local_pinned);
+ assert(addr == entry_ptr->base_addr);
+ assert(!entry_ptr->global_pinned);
+ assert(!entry_ptr->local_pinned);
- HDassert(dirty_ptr);
+ assert(dirty_ptr);
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: deserialize() idx = %d, addr = %ld, len = %d, is_dirty = %d.\n",
- world_mpi_rank, idx, (long)addr, (int)len, (int)(entry_ptr->header.is_dirty));
+ fprintf(stdout, "%d: deserialize() idx = %d, addr = %ld, len = %d, is_dirty = %d.\n", world_mpi_rank,
+ idx, (long)addr, (int)len, (int)(entry_ptr->header.is_dirty));
fflush(stdout);
}
@@ -2238,27 +2235,27 @@ datum_image_len(const void *thing, size_t *image_len)
int idx;
const struct datum *entry_ptr;
- HDassert(thing);
- HDassert(image_len);
+ assert(thing);
+ assert(image_len);
entry_ptr = (const struct datum *)thing;
idx = addr_to_datum_index(entry_ptr->base_addr);
- HDassert(idx >= 0);
- HDassert(idx < NUM_DATA_ENTRIES);
- HDassert(idx < virt_num_data_entries);
- HDassert(&(data[idx]) == entry_ptr);
- HDassert(entry_ptr->local_len > 0);
- HDassert(entry_ptr->local_len <= entry_ptr->len);
+ assert(idx >= 0);
+ assert(idx < NUM_DATA_ENTRIES);
+ assert(idx < virt_num_data_entries);
+ assert(&(data[idx]) == entry_ptr);
+ assert(entry_ptr->local_len > 0);
+ assert(entry_ptr->local_len <= entry_ptr->len);
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: image_len() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx,
- (long)(entry_ptr->base_addr), (int)(entry_ptr->local_len));
+ fprintf(stdout, "%d: image_len() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx,
+ (long)(entry_ptr->base_addr), (int)(entry_ptr->local_len));
fflush(stdout);
}
- HDassert(entry_ptr->header.addr == entry_ptr->base_addr);
+ assert(entry_ptr->header.addr == entry_ptr->base_addr);
*image_len = entry_ptr->local_len;
@@ -2285,49 +2282,49 @@ datum_serialize(const H5F_t *f, void H5_ATTR_NDEBUG_UNUSED *image_ptr, size_t le
struct datum *entry_ptr;
struct H5AC_aux_t *aux_ptr;
- HDassert(thing_ptr);
- HDassert(image_ptr);
+ assert(thing_ptr);
+ assert(image_ptr);
entry_ptr = (struct datum *)thing_ptr;
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(f->shared->cache->magic == H5C__H5C_T_MAGIC);
- HDassert(f->shared->cache->aux_ptr);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(f->shared->cache->magic == H5C__H5C_T_MAGIC);
+ assert(f->shared->cache->aux_ptr);
aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr);
- HDassert(aux_ptr);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
entry_ptr->aux_ptr = aux_ptr;
idx = addr_to_datum_index(entry_ptr->base_addr);
- HDassert(idx >= 0);
- HDassert(idx < NUM_DATA_ENTRIES);
- HDassert(idx < virt_num_data_entries);
- HDassert(&(data[idx]) == entry_ptr);
+ assert(idx >= 0);
+ assert(idx < NUM_DATA_ENTRIES);
+ assert(idx < virt_num_data_entries);
+ assert(&(data[idx]) == entry_ptr);
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: serialize() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx,
- (long)entry_ptr->header.addr, (int)len);
+ fprintf(stdout, "%d: serialize() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx,
+ (long)entry_ptr->header.addr, (int)len);
fflush(stdout);
}
- HDassert(entry_ptr->header.addr == entry_ptr->base_addr);
- HDassert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len));
+ assert(entry_ptr->header.addr == entry_ptr->base_addr);
+ assert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len));
- HDassert(entry_ptr->header.is_dirty == entry_ptr->dirty);
+ assert(entry_ptr->header.is_dirty == entry_ptr->dirty);
datum_flushes++;
if (entry_ptr->header.is_pinned) {
datum_pinned_flushes++;
- HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned);
+ assert(entry_ptr->global_pinned || entry_ptr->local_pinned);
}
return (ret_value);
@@ -2357,39 +2354,39 @@ datum_notify(H5C_notify_action_t action, void *thing)
struct mssg_t mssg;
int idx;
- HDassert(thing);
+ assert(thing);
entry_ptr = (struct datum *)thing;
idx = addr_to_datum_index(entry_ptr->base_addr);
- HDassert(idx >= 0);
- HDassert(idx < NUM_DATA_ENTRIES);
- HDassert(idx < virt_num_data_entries);
- HDassert(&(data[idx]) == entry_ptr);
+ assert(idx >= 0);
+ assert(idx < NUM_DATA_ENTRIES);
+ assert(idx < virt_num_data_entries);
+ assert(&(data[idx]) == entry_ptr);
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = %d, idx = %d, addr = %ld.\n", world_mpi_rank, (int)action,
- idx, (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = %d, idx = %d, addr = %ld.\n", world_mpi_rank, (int)action, idx,
+ (long)entry_ptr->header.addr);
fflush(stdout);
}
- HDassert(entry_ptr->header.addr == entry_ptr->base_addr);
+ assert(entry_ptr->header.addr == entry_ptr->base_addr);
/* Skip this check when the entry is being dirtied, since the resize
* operation sends the message before the len/local_len is updated
* (after the resize operation completes successfully) (QAK - 2016/10/19)
*/
if (H5AC_NOTIFY_ACTION_ENTRY_DIRTIED != action)
- HDassert((entry_ptr->header.size == entry_ptr->len) ||
- (entry_ptr->header.size == entry_ptr->local_len));
+ assert((entry_ptr->header.size == entry_ptr->len) ||
+ (entry_ptr->header.size == entry_ptr->local_len));
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = insert, idx = %d, addr = %ld.\n", world_mpi_rank,
- idx, (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = insert, idx = %d, addr = %ld.\n", world_mpi_rank, idx,
+ (long)entry_ptr->header.addr);
fflush(stdout);
}
/* do nothing */
@@ -2398,8 +2395,8 @@ datum_notify(H5C_notify_action_t action, void *thing)
case H5AC_NOTIFY_ACTION_AFTER_LOAD:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = load, idx = %d, addr = %ld.\n", world_mpi_rank, idx,
- (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = load, idx = %d, addr = %ld.\n", world_mpi_rank, idx,
+ (long)entry_ptr->header.addr);
fflush(stdout);
}
@@ -2419,7 +2416,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
@@ -2430,7 +2427,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -2445,41 +2442,41 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__);
}
#if 0 /* This has been useful debugging code -- keep it for now. */
if ( mssg.req != READ_REQ_REPLY_CODE ) {
- HDfprintf(stdout,
+ fprintf(stdout,
"%d:%s: mssg.req != READ_REQ_REPLY_CODE.\n",
world_mpi_rank, __func__);
- HDfprintf(stdout, "%d:%s: mssg.req = %d.\n",
+ fprintf(stdout, "%d:%s: mssg.req = %d.\n",
world_mpi_rank, __func__, (int)(mssg.req));
}
if ( mssg.src != world_server_mpi_rank ) {
- HDfprintf(stdout,
+ fprintf(stdout,
"%d:%s: mssg.src != world_server_mpi_rank.\n",
world_mpi_rank, __func__);
}
if ( mssg.dest != world_mpi_rank ) {
- HDfprintf(stdout,
+ fprintf(stdout,
"%d:%s: mssg.dest != world_mpi_rank.\n",
world_mpi_rank, __func__);
}
if ( mssg.base_addr != entry_ptr->base_addr ) {
- HDfprintf(stdout,
+ fprintf(stdout,
"%d:%s: mssg.base_addr != entry_ptr->base_addr.\n",
world_mpi_rank, __func__);
- HDfprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n",
+ fprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n",
world_mpi_rank, __func__, mssg.base_addr);
- HDfprintf(stdout,
+ fprintf(stdout,
"%d:%s: entry_ptr->base_addr = %" PRIuHADDR ".\n",
world_mpi_rank, __func__,
entry_ptr->base_addr);
@@ -2487,23 +2484,23 @@ datum_notify(H5C_notify_action_t action, void *thing)
if ( mssg.len != entry_ptr->len ) {
- HDfprintf(stdout,
+ fprintf(stdout,
"%d:%s: mssg.len != entry_ptr->len.\n",
world_mpi_rank, __func__);
- HDfprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n",
+ fprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n",
world_mpi_rank, __func__, mssg.len);
}
if ( mssg.ver < entry_ptr->ver ) {
- HDfprintf(stdout,
+ fprintf(stdout,
"%d:%s: mssg.ver < entry_ptr->ver.\n",
world_mpi_rank, __func__);
}
if ( mssg.magic != MSSG_MAGIC ) {
- HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n",
+ fprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n",
world_mpi_rank, __func__);
}
#endif /* JRM */
@@ -2520,24 +2517,24 @@ datum_notify(H5C_notify_action_t action, void *thing)
case H5C_NOTIFY_ACTION_AFTER_FLUSH:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = flush, idx = %d, addr = %ld.\n", world_mpi_rank, idx,
- (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = flush, idx = %d, addr = %ld.\n", world_mpi_rank, idx,
+ (long)entry_ptr->header.addr);
fflush(stdout);
}
- HDassert(entry_ptr->aux_ptr);
- HDassert(entry_ptr->aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(entry_ptr->aux_ptr);
+ assert(entry_ptr->aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
aux_ptr = entry_ptr->aux_ptr;
entry_ptr->aux_ptr = NULL;
- HDassert(entry_ptr->header.is_dirty); /* JRM */
+ assert(entry_ptr->header.is_dirty); /* JRM */
if ((file_mpi_rank != 0) && (entry_ptr->dirty) &&
(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY)) {
ret_value = FAIL;
- HDfprintf(stdout, "%d:%s: Flushed dirty entry from non-zero file process.", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: Flushed dirty entry from non-zero file process.", world_mpi_rank,
+ __func__);
}
if (ret_value == SUCCEED) {
@@ -2564,7 +2561,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -2583,7 +2580,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != WRITE_REQ_ACK_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -2594,7 +2591,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__);
}
}
}
@@ -2606,15 +2603,15 @@ datum_notify(H5C_notify_action_t action, void *thing)
if (entry_ptr->header.is_pinned) {
datum_pinned_flushes++;
- HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned);
+ assert(entry_ptr->global_pinned || entry_ptr->local_pinned);
}
break;
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = evict, idx = %d, addr = %ld.\n", world_mpi_rank, idx,
- (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = evict, idx = %d, addr = %ld.\n", world_mpi_rank, idx,
+ (long)entry_ptr->header.addr);
fflush(stdout);
}
@@ -2624,8 +2621,8 @@ datum_notify(H5C_notify_action_t action, void *thing)
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = entry dirty, idx = %d, addr = %ld.\n",
- world_mpi_rank, idx, (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = entry dirty, idx = %d, addr = %ld.\n", world_mpi_rank,
+ idx, (long)entry_ptr->header.addr);
fflush(stdout);
}
@@ -2635,8 +2632,8 @@ datum_notify(H5C_notify_action_t action, void *thing)
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = entry clean, idx = %d, addr = %ld.\n",
- world_mpi_rank, idx, (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = entry clean, idx = %d, addr = %ld.\n", world_mpi_rank,
+ idx, (long)entry_ptr->header.addr);
fflush(stdout);
}
@@ -2647,7 +2644,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
if (entry_ptr->header.is_pinned) {
datum_pinned_clears++;
- HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned);
+ assert(entry_ptr->global_pinned || entry_ptr->local_pinned);
} /* end if */
break;
@@ -2655,8 +2652,8 @@ datum_notify(H5C_notify_action_t action, void *thing)
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = child entry dirty, idx = %d, addr = %ld.\n",
- world_mpi_rank, idx, (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = child entry dirty, idx = %d, addr = %ld.\n",
+ world_mpi_rank, idx, (long)entry_ptr->header.addr);
fflush(stdout);
}
@@ -2666,8 +2663,8 @@ datum_notify(H5C_notify_action_t action, void *thing)
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = child entry clean, idx = %d, addr = %ld.\n",
- world_mpi_rank, idx, (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = child entry clean, idx = %d, addr = %ld.\n",
+ world_mpi_rank, idx, (long)entry_ptr->header.addr);
fflush(stdout);
}
@@ -2677,8 +2674,8 @@ datum_notify(H5C_notify_action_t action, void *thing)
case H5AC_NOTIFY_ACTION_CHILD_UNSERIALIZED:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = child entry unserialized, idx = %d, addr = %ld.\n",
- world_mpi_rank, idx, (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = child entry unserialized, idx = %d, addr = %ld.\n",
+ world_mpi_rank, idx, (long)entry_ptr->header.addr);
fflush(stdout);
}
@@ -2688,8 +2685,8 @@ datum_notify(H5C_notify_action_t action, void *thing)
case H5AC_NOTIFY_ACTION_CHILD_SERIALIZED:
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: notify() action = child entry serialized, idx = %d, addr = %ld.\n",
- world_mpi_rank, idx, (long)entry_ptr->header.addr);
+ fprintf(stdout, "%d: notify() action = child entry serialized, idx = %d, addr = %ld.\n",
+ world_mpi_rank, idx, (long)entry_ptr->header.addr);
fflush(stdout);
}
@@ -2700,7 +2697,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Unknown notify action.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Unknown notify action.\n", world_mpi_rank, __func__);
}
break;
}
@@ -2731,31 +2728,31 @@ datum_free_icr(void *thing)
int idx;
struct datum *entry_ptr;
- HDassert(thing);
+ assert(thing);
entry_ptr = (struct datum *)thing;
idx = addr_to_datum_index(entry_ptr->base_addr);
- HDassert(idx >= 0);
- HDassert(idx < NUM_DATA_ENTRIES);
- HDassert(idx < virt_num_data_entries);
- HDassert(&(data[idx]) == entry_ptr);
+ assert(idx >= 0);
+ assert(idx < NUM_DATA_ENTRIES);
+ assert(idx < virt_num_data_entries);
+ assert(&(data[idx]) == entry_ptr);
if (callbacks_verbose) {
- HDfprintf(stdout, "%d: free_icr() idx = %d, dirty = %d.\n", world_mpi_rank, idx,
- (int)(entry_ptr->dirty));
+ fprintf(stdout, "%d: free_icr() idx = %d, dirty = %d.\n", world_mpi_rank, idx,
+ (int)(entry_ptr->dirty));
fflush(stdout);
}
- HDassert(entry_ptr->header.addr == entry_ptr->base_addr);
- HDassert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len));
+ assert(entry_ptr->header.addr == entry_ptr->base_addr);
+ assert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len));
- HDassert(!(entry_ptr->header.is_dirty));
- HDassert(!(entry_ptr->global_pinned));
- HDassert(!(entry_ptr->local_pinned));
- HDassert(!(entry_ptr->header.is_pinned));
+ assert(!(entry_ptr->header.is_dirty));
+ assert(!(entry_ptr->global_pinned));
+ assert(!(entry_ptr->local_pinned));
+ assert(!(entry_ptr->header.is_pinned));
datum_destroys++;
@@ -2787,15 +2784,15 @@ expunge_entry(H5F_t *file_ptr, int32_t idx)
herr_t result;
struct datum *entry_ptr;
- HDassert(file_ptr);
- HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
- HDassert(idx < virt_num_data_entries);
+ assert(file_ptr);
+ assert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(!(entry_ptr->locked));
- HDassert(!(entry_ptr->global_pinned));
- HDassert(!(entry_ptr->local_pinned));
+ assert(!(entry_ptr->locked));
+ assert(!(entry_ptr->global_pinned));
+ assert(!(entry_ptr->local_pinned));
entry_ptr->dirty = FALSE;
@@ -2807,12 +2804,12 @@ expunge_entry(H5F_t *file_ptr, int32_t idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", world_mpi_rank, __func__);
}
}
- HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
- HDassert(!((entry_ptr->header).is_dirty));
+ assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
+ assert(!((entry_ptr->header).is_dirty));
result = H5C_get_entry_status(file_ptr, entry_ptr->base_addr, NULL, &in_cache, NULL, NULL, NULL, NULL,
NULL, NULL, NULL);
@@ -2821,14 +2818,14 @@ expunge_entry(H5F_t *file_ptr, int32_t idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", world_mpi_rank, __func__);
}
}
else if (in_cache) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", world_mpi_rank, __func__);
}
}
}
@@ -2858,14 +2855,14 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags)
herr_t result;
struct datum *entry_ptr;
- HDassert(cache_ptr);
- HDassert(file_ptr);
- HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
- HDassert(idx < virt_num_data_entries);
+ assert(cache_ptr);
+ assert(file_ptr);
+ assert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(!(entry_ptr->locked));
+ assert(!(entry_ptr->locked));
insert_pinned = ((flags & H5C__PIN_ENTRY_FLAG) != 0);
@@ -2882,7 +2879,7 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", world_mpi_rank, __func__);
}
}
@@ -2903,26 +2900,26 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__,
- idx, (int)(data[idx].header.is_dirty));
+ fprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__, idx,
+ (int)(data[idx].header.is_dirty));
}
}
}
if (insert_pinned) {
- HDassert(entry_ptr->header.is_pinned);
+ assert(entry_ptr->header.is_pinned);
entry_ptr->global_pinned = TRUE;
global_pins++;
}
else {
- HDassert(!(entry_ptr->header.is_pinned));
+ assert(!(entry_ptr->header.is_pinned));
entry_ptr->global_pinned = FALSE;
}
- /* HDassert( entry_ptr->header.is_dirty ); */
- HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
+ /* assert( entry_ptr->header.is_dirty ); */
+ assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
}
return;
@@ -2954,18 +2951,18 @@ local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, in
int i;
int idx;
- HDassert(file_ptr);
- HDassert(0 <= min_idx);
- HDassert(min_idx < max_idx);
- HDassert(max_idx < NUM_DATA_ENTRIES);
- HDassert(max_idx < virt_num_data_entries);
- HDassert(0 <= min_count);
- HDassert(min_count < max_count);
+ assert(file_ptr);
+ assert(0 <= min_idx);
+ assert(min_idx < max_idx);
+ assert(max_idx < NUM_DATA_ENTRIES);
+ assert(max_idx < virt_num_data_entries);
+ assert(0 <= min_count);
+ assert(min_count < max_count);
count = (HDrand() % (max_count - min_count)) + min_count;
- HDassert(min_count <= count);
- HDassert(count <= max_count);
+ assert(min_count <= count);
+ assert(count <= max_count);
for (i = 0; i < count; i++) {
local_pin_random_entry(file_ptr, min_idx, max_idx);
@@ -2973,8 +2970,8 @@ local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, in
count = (HDrand() % (max_count - min_count)) + min_count;
- HDassert(min_count <= count);
- HDassert(count <= max_count);
+ assert(min_count <= count);
+ assert(count <= max_count);
i = 0;
idx = 0;
@@ -3013,16 +3010,16 @@ local_pin_random_entry(H5F_t *file_ptr, int min_idx, int max_idx)
if (nerrors == 0) {
- HDassert(file_ptr);
- HDassert(0 <= min_idx);
- HDassert(min_idx < max_idx);
- HDassert(max_idx < NUM_DATA_ENTRIES);
- HDassert(max_idx < virt_num_data_entries);
+ assert(file_ptr);
+ assert(0 <= min_idx);
+ assert(min_idx < max_idx);
+ assert(max_idx < NUM_DATA_ENTRIES);
+ assert(max_idx < virt_num_data_entries);
do {
idx = (HDrand() % (max_idx - min_idx)) + min_idx;
- HDassert(min_idx <= idx);
- HDassert(idx <= max_idx);
+ assert(min_idx <= idx);
+ assert(idx <= max_idx);
} while (data[idx].global_pinned || data[idx].local_pinned);
pin_entry(file_ptr, idx, FALSE, FALSE);
@@ -3053,7 +3050,7 @@ local_unpin_all_entries(H5F_t *file_ptr, hbool_t via_unprotect)
int idx;
- HDassert(file_ptr);
+ assert(file_ptr);
idx = 0;
@@ -3090,10 +3087,10 @@ local_unpin_next_pinned_entry(H5F_t *file_ptr, int start_idx, hbool_t via_unprot
if (nerrors == 0) {
- HDassert(file_ptr);
- HDassert(0 <= start_idx);
- HDassert(start_idx < NUM_DATA_ENTRIES);
- HDassert(start_idx < virt_num_data_entries);
+ assert(file_ptr);
+ assert(0 <= start_idx);
+ assert(start_idx < NUM_DATA_ENTRIES);
+ assert(start_idx < virt_num_data_entries);
idx = start_idx;
@@ -3142,14 +3139,14 @@ lock_and_unlock_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, int mi
if (nerrors == 0) {
- HDassert(file_ptr);
- HDassert(0 <= min_count);
- HDassert(min_count < max_count);
+ assert(file_ptr);
+ assert(0 <= min_count);
+ assert(min_count < max_count);
count = (HDrand() % (max_count - min_count)) + min_count;
- HDassert(min_count <= count);
- HDassert(count <= max_count);
+ assert(min_count <= count);
+ assert(count <= max_count);
for (i = 0; i < count; i++) {
lock_and_unlock_random_entry(file_ptr, min_idx, max_idx);
@@ -3181,16 +3178,16 @@ lock_and_unlock_random_entry(H5F_t *file_ptr, int min_idx, int max_idx)
if (nerrors == 0) {
- HDassert(file_ptr);
- HDassert(0 <= min_idx);
- HDassert(min_idx < max_idx);
- HDassert(max_idx < NUM_DATA_ENTRIES);
- HDassert(max_idx < virt_num_data_entries);
+ assert(file_ptr);
+ assert(0 <= min_idx);
+ assert(min_idx < max_idx);
+ assert(max_idx < NUM_DATA_ENTRIES);
+ assert(max_idx < virt_num_data_entries);
idx = (HDrand() % (max_idx - min_idx)) + min_idx;
- HDassert(min_idx <= idx);
- HDassert(idx <= max_idx);
+ assert(min_idx <= idx);
+ assert(idx <= max_idx);
lock_entry(file_ptr, idx);
unlock_entry(file_ptr, idx, H5AC__NO_FLAGS_SET);
@@ -3221,12 +3218,12 @@ lock_entry(H5F_t *file_ptr, int32_t idx)
if (nerrors == 0) {
- HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
- HDassert(idx < virt_num_data_entries);
+ assert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(!(entry_ptr->locked));
+ assert(!(entry_ptr->locked));
cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, &(types[0]), entry_ptr->base_addr,
&entry_ptr->base_addr, H5AC__NO_FLAGS_SET);
@@ -3238,7 +3235,7 @@ lock_entry(H5F_t *file_ptr, int32_t idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: error in H5AC_protect().\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: error in H5AC_protect().\n", world_mpi_rank, __func__);
}
}
else {
@@ -3246,7 +3243,7 @@ lock_entry(H5F_t *file_ptr, int32_t idx)
entry_ptr->locked = TRUE;
}
- HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
+ assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
}
return;
@@ -3274,13 +3271,13 @@ mark_entry_dirty(int32_t idx)
if (nerrors == 0) {
- HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
- HDassert(idx < virt_num_data_entries);
+ assert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(entry_ptr->locked || entry_ptr->global_pinned);
- HDassert(!(entry_ptr->local_pinned));
+ assert(entry_ptr->locked || entry_ptr->global_pinned);
+ assert(!(entry_ptr->local_pinned));
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
@@ -3291,7 +3288,7 @@ mark_entry_dirty(int32_t idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, __func__);
}
}
else if (!(entry_ptr->locked)) {
@@ -3324,15 +3321,15 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty)
if (nerrors == 0) {
- HDassert(file_ptr);
- HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
- HDassert(idx < virt_num_data_entries);
+ assert(file_ptr);
+ assert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(!(entry_ptr->global_pinned));
- HDassert(!(entry_ptr->local_pinned));
- HDassert(!(dirty && (!global)));
+ assert(!(entry_ptr->global_pinned));
+ assert(!(entry_ptr->local_pinned));
+ assert(!(dirty && (!global)));
lock_entry(file_ptr, idx);
@@ -3343,8 +3340,8 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty)
unlock_entry(file_ptr, idx, flags);
- HDassert((entry_ptr->header).is_pinned);
- HDassert((!dirty) || ((entry_ptr->header).is_dirty));
+ assert((entry_ptr->header).is_pinned);
+ assert((!dirty) || ((entry_ptr->header).is_dirty));
if (global) {
@@ -3384,12 +3381,12 @@ pin_protected_entry(int32_t idx, hbool_t global)
herr_t result;
struct datum *entry_ptr;
- HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
- HDassert(idx < virt_num_data_entries);
+ assert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(entry_ptr->locked);
+ assert(entry_ptr->locked);
if (nerrors == 0) {
@@ -3402,7 +3399,7 @@ pin_protected_entry(int32_t idx, hbool_t global)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Error in H5AC_pin_protected entry().\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Error in H5AC_pin_protected entry().\n", world_mpi_rank, __func__);
}
}
@@ -3419,7 +3416,7 @@ pin_protected_entry(int32_t idx, hbool_t global)
local_pins++;
}
- HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
+ assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
}
return;
@@ -3455,19 +3452,19 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx)
if ((nerrors == 0) && (old_idx != new_idx)) {
- HDassert(file_ptr);
- HDassert((0 <= old_idx) && (old_idx < NUM_DATA_ENTRIES));
- HDassert(old_idx < virt_num_data_entries);
- HDassert((0 <= new_idx) && (new_idx < NUM_DATA_ENTRIES));
- HDassert(new_idx < virt_num_data_entries);
+ assert(file_ptr);
+ assert((0 <= old_idx) && (old_idx < NUM_DATA_ENTRIES));
+ assert(old_idx < virt_num_data_entries);
+ assert((0 <= new_idx) && (new_idx < NUM_DATA_ENTRIES));
+ assert(new_idx < virt_num_data_entries);
old_entry_ptr = &(data[old_idx]);
new_entry_ptr = &(data[new_idx]);
- HDassert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
- HDassert(!(old_entry_ptr->header.is_protected));
- HDassert(!(old_entry_ptr->locked));
- HDassert(old_entry_ptr->len == new_entry_ptr->len);
+ assert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
+ assert(!(old_entry_ptr->header.is_protected));
+ assert(!(old_entry_ptr->locked));
+ assert(old_entry_ptr->len == new_entry_ptr->len);
old_addr = old_entry_ptr->base_addr;
new_addr = new_entry_ptr->base_addr;
@@ -3506,12 +3503,12 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, __func__);
}
}
else {
- HDassert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
+ assert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
if (!(old_entry_ptr->header.is_dirty)) {
@@ -3530,14 +3527,14 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__,
- new_idx, (int)(data[new_idx].header.is_dirty));
+ fprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__,
+ new_idx, (int)(data[new_idx].header.is_dirty));
}
}
}
else {
- HDassert(old_entry_ptr->header.is_dirty);
+ assert(old_entry_ptr->header.is_dirty);
}
}
}
@@ -3582,7 +3579,7 @@ reset_server_counts(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -3594,7 +3591,7 @@ reset_server_counts(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != REQ_RW_COUNT_RESET_RPLY_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -3604,8 +3601,8 @@ reset_server_counts(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank,
+ __func__);
}
}
}
@@ -3637,18 +3634,18 @@ resize_entry(int32_t idx, size_t new_size)
if (nerrors == 0) {
- HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
- HDassert(idx < virt_num_data_entries);
+ assert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
- HDassert(!(entry_ptr->locked));
- HDassert((entry_ptr->global_pinned) && (!entry_ptr->local_pinned));
- HDassert((entry_ptr->header.size == entry_ptr->len) ||
- (entry_ptr->header.size == entry_ptr->local_len));
- HDassert(new_size > 0);
- HDassert(new_size <= entry_ptr->len);
+ assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
+ assert(!(entry_ptr->locked));
+ assert((entry_ptr->global_pinned) && (!entry_ptr->local_pinned));
+ assert((entry_ptr->header.size == entry_ptr->len) ||
+ (entry_ptr->header.size == entry_ptr->local_len));
+ assert(new_size > 0);
+ assert(new_size <= entry_ptr->len);
result = H5AC_resize_entry((void *)entry_ptr, new_size);
@@ -3656,14 +3653,14 @@ resize_entry(int32_t idx, size_t new_size)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", world_mpi_rank, __func__);
}
}
else {
- HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
- HDassert(entry_ptr->header.is_dirty);
- HDassert(entry_ptr->header.size == new_size);
+ assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
+ assert(entry_ptr->header.is_dirty);
+ assert(entry_ptr->header.size == new_size);
entry_ptr->dirty = TRUE;
entry_ptr->local_len = new_size;
@@ -3709,9 +3706,9 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
H5C_t *cache_ptr = NULL;
haddr_t actual_base_addr;
- HDassert(fid_ptr != NULL);
- HDassert(file_ptr_ptr != NULL);
- HDassert(cache_ptr_ptr != NULL);
+ assert(fid_ptr != NULL);
+ assert(file_ptr_ptr != NULL);
+ assert(cache_ptr_ptr != NULL);
fid = H5Fcreate(filenames[0], H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -3721,13 +3718,13 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (fid < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fcreate() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Fcreate() failed.\n", world_mpi_rank, __func__);
}
}
else if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -3737,7 +3734,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (file_ptr == NULL) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Can't get file_ptr.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Can't get file_ptr.\n", world_mpi_rank, __func__);
}
}
else {
@@ -3747,13 +3744,13 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (cache_ptr == NULL) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, __func__);
}
}
else if (cache_ptr->magic != H5C__H5C_T_MAGIC) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, __func__);
}
}
else {
@@ -3771,8 +3768,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
- HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n", world_mpi_rank,
+ __func__);
}
else {
@@ -3781,12 +3778,12 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
- HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank,
+ __func__);
}
else if (enable_rpt_fcn) {
- HDfprintf(stdout, "%d:%s: rpt_fcn enabled.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: rpt_fcn enabled.\n", world_mpi_rank, __func__);
}
}
}
@@ -3802,23 +3799,23 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, __func__);
}
}
else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n",
- world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n",
+ world_mpi_rank, __func__);
}
}
else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy != metadata_write_strategy) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: bad cache_ptr->aux_ptr->metadata_write_strategy\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: bad cache_ptr->aux_ptr->metadata_write_strategy\n", world_mpi_rank,
+ __func__);
}
}
}
@@ -3833,8 +3830,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (H5AC_get_cache_auto_resize_config(cache_ptr, &test_config) != SUCCEED) {
- HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n", world_mpi_rank,
+ __func__);
}
else if (test_config.metadata_write_strategy != metadata_write_strategy) {
@@ -3842,7 +3839,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (verbose) {
- HDfprintf(stdout, "%d:%s: unexpected metadata_write_strategy.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: unexpected metadata_write_strategy.\n", world_mpi_rank, __func__);
}
}
}
@@ -3862,7 +3859,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", world_mpi_rank, __func__);
}
}
else if (actual_base_addr > BASE_ADDR) {
@@ -3875,7 +3872,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", world_mpi_rank, __func__);
}
}
}
@@ -3886,7 +3883,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: second H5Fflush() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: second H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -3899,7 +3896,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5C_set_write_done_callback failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5C_set_write_done_callback failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -3912,8 +3909,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank,
+ __func__);
}
}
}
@@ -3956,8 +3953,8 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
hbool_t proceed = TRUE;
unsigned u = 0;
- HDassert(world_mpi_rank != world_server_mpi_rank);
- HDassert((num_writes == 0) || (written_entries_tbl != NULL));
+ assert(world_mpi_rank != world_server_mpi_rank);
+ assert((num_writes == 0) || (written_entries_tbl != NULL));
/* barrier to ensure that all other processes are ready to leave
* the sync point as well.
@@ -3969,7 +3966,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
proceed = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -3992,7 +3989,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
proceed = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4007,11 +4004,11 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
if (proceed) {
- HDfprintf(stdout, "%d:%s: verified %u writes.\n", world_mpi_rank, __func__, num_writes);
+ fprintf(stdout, "%d:%s: verified %u writes.\n", world_mpi_rank, __func__, num_writes);
}
else {
- HDfprintf(stdout, "%d:%s: FAILED to verify %u writes.\n", world_mpi_rank, __func__, num_writes);
+ fprintf(stdout, "%d:%s: FAILED to verify %u writes.\n", world_mpi_rank, __func__, num_writes);
}
}
@@ -4028,7 +4025,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
proceed = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4062,11 +4059,11 @@ setup_rand(void)
if ((use_predefined_seeds) && (world_mpi_size == num_predefined_seeds)) {
- HDassert(world_mpi_rank >= 0);
- HDassert(world_mpi_rank < world_mpi_size);
+ assert(world_mpi_rank >= 0);
+ assert(world_mpi_rank < world_mpi_size);
seed = predefined_seeds[world_mpi_rank];
- HDfprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, __func__, seed);
+ fprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, __func__, seed);
fflush(stdout);
HDsrand(seed);
}
@@ -4076,13 +4073,13 @@ setup_rand(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: gettimeofday() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: gettimeofday() failed.\n", world_mpi_rank, __func__);
}
}
else {
seed = (unsigned)tv.tv_usec;
if (verbose) {
- HDfprintf(stdout, "%d:%s: seed = %d.\n", world_mpi_rank, __func__, seed);
+ fprintf(stdout, "%d:%s: seed = %d.\n", world_mpi_rank, __func__, seed);
fflush(stdout);
}
HDsrand(seed);
@@ -4122,7 +4119,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -4138,8 +4135,8 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank,
+ __func__);
}
}
}
@@ -4150,7 +4147,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fclose() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Fclose() failed.\n", world_mpi_rank, __func__);
}
}
@@ -4166,7 +4163,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: HDremove() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: HDremove() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4228,7 +4225,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4240,7 +4237,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4254,7 +4251,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n", world_mpi_rank, __func__);
}
}
else {
@@ -4270,8 +4267,8 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n",
- world_mpi_rank, __func__, addr, reported_entry_reads, expected_entry_reads);
+ fprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n",
+ world_mpi_rank, __func__, addr, reported_entry_reads, expected_entry_reads);
}
}
}
@@ -4325,7 +4322,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4337,7 +4334,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4351,7 +4348,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n", world_mpi_rank, __func__);
}
}
else {
@@ -4367,8 +4364,8 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank,
- __func__, (long long)addr, reported_entry_writes, expected_entry_writes);
+ fprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank,
+ __func__, (long long)addr, reported_entry_writes, expected_entry_writes);
}
}
}
@@ -4421,7 +4418,7 @@ verify_total_reads(int expected_total_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4433,7 +4430,7 @@ verify_total_reads(int expected_total_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != REQ_TTL_READS_RPLY_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -4443,7 +4440,7 @@ verify_total_reads(int expected_total_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__);
}
}
else {
@@ -4459,8 +4456,8 @@ verify_total_reads(int expected_total_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank,
- __func__, reported_total_reads, expected_total_reads);
+ fprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank,
+ __func__, reported_total_reads, expected_total_reads);
}
}
}
@@ -4513,7 +4510,7 @@ verify_total_writes(unsigned expected_total_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4525,7 +4522,7 @@ verify_total_writes(unsigned expected_total_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != REQ_TTL_WRITES_RPLY_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -4535,7 +4532,7 @@ verify_total_writes(unsigned expected_total_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__);
}
}
else {
@@ -4551,8 +4548,8 @@ verify_total_writes(unsigned expected_total_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: reported/expected total writes mismatch (%u/%u).\n", world_mpi_rank,
- __func__, reported_total_writes, expected_total_writes);
+ fprintf(stdout, "%d:%s: reported/expected total writes mismatch (%u/%u).\n", world_mpi_rank,
+ __func__, reported_total_writes, expected_total_writes);
}
}
}
@@ -4583,13 +4580,13 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags)
if (nerrors == 0) {
- HDassert(file_ptr);
- HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
- HDassert(idx < virt_num_data_entries);
+ assert(file_ptr);
+ assert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert(entry_ptr->locked);
+ assert(entry_ptr->locked);
dirtied = ((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG);
@@ -4609,7 +4606,7 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: error in H5AC_unprotect().\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: error in H5AC_unprotect().\n", world_mpi_rank, __func__);
}
}
else {
@@ -4617,13 +4614,13 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags)
entry_ptr->locked = FALSE;
}
- HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
+ assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
if (((flags & H5AC__DIRTIED_FLAG) != 0) && ((flags & H5C__DELETED_FLAG) == 0) &&
(!(((world_mpi_rank == 0) && (entry_ptr->flushed)) ||
((world_mpi_rank != 0) && (entry_ptr->cleared))))) {
- HDassert(entry_ptr->header.is_dirty);
- HDassert(entry_ptr->dirty);
+ assert(entry_ptr->header.is_dirty);
+ assert(entry_ptr->dirty);
}
}
@@ -4653,16 +4650,16 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t
if (nerrors == 0) {
- HDassert(file_ptr);
- HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
- HDassert(idx < virt_num_data_entries);
+ assert(file_ptr);
+ assert((0 <= idx) && (idx < NUM_DATA_ENTRIES));
+ assert(idx < virt_num_data_entries);
entry_ptr = &(data[idx]);
- HDassert((entry_ptr->header).is_pinned);
- HDassert(!(entry_ptr->global_pinned && entry_ptr->local_pinned));
- HDassert((global && entry_ptr->global_pinned) || (!global && entry_ptr->local_pinned));
- HDassert(!(dirty && (!global)));
+ assert((entry_ptr->header).is_pinned);
+ assert(!(entry_ptr->global_pinned && entry_ptr->local_pinned));
+ assert((global && entry_ptr->global_pinned) || (!global && entry_ptr->local_pinned));
+ assert(!(dirty && (!global)));
if (via_unprotect) {
@@ -4688,12 +4685,12 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n", world_mpi_rank, __func__);
}
}
}
- HDassert(!((entry_ptr->header).is_pinned));
+ assert(!((entry_ptr->header).is_pinned));
if (global) {
@@ -4749,7 +4746,7 @@ server_smoke_check(void)
/* some error occurred in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4770,7 +4767,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__);
}
}
@@ -4785,7 +4782,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4801,7 +4798,7 @@ server_smoke_check(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__);
}
}
}
@@ -4816,7 +4813,7 @@ server_smoke_check(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__);
}
}
@@ -4848,7 +4845,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__);
}
}
@@ -4871,7 +4868,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__);
}
}
}
@@ -4885,7 +4882,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4901,7 +4898,7 @@ server_smoke_check(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__);
}
}
}
@@ -4912,7 +4909,7 @@ server_smoke_check(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__);
}
}
@@ -4943,7 +4940,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 4 failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: barrier 4 failed.\n", world_mpi_rank, __func__);
}
}
@@ -4959,7 +4956,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 5 failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: barrier 5 failed.\n", world_mpi_rank, __func__);
}
}
@@ -4990,7 +4987,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 6 failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: barrier 6 failed.\n", world_mpi_rank, __func__);
}
}
@@ -5013,7 +5010,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -5096,7 +5093,7 @@ smoke_check_1(int metadata_write_strategy)
/* some error occurred in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5108,7 +5105,7 @@ smoke_check_1(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5141,7 +5138,7 @@ smoke_check_1(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5151,8 +5148,8 @@ smoke_check_1(int metadata_write_strategy)
*/
for (i = 0; i < NUM_DATA_ENTRIES; i++) {
- HDassert(data_index[i] == i);
- HDassert(!(data[i].dirty));
+ assert(data_index[i] == i);
+ assert(!(data[i].dirty));
}
/* compose the done message */
@@ -5174,7 +5171,7 @@ smoke_check_1(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -5260,7 +5257,7 @@ smoke_check_2(int metadata_write_strategy)
/* some error occurred in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5272,7 +5269,7 @@ smoke_check_2(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5339,7 +5336,7 @@ smoke_check_2(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5349,8 +5346,8 @@ smoke_check_2(int metadata_write_strategy)
*/
for (i = 0; i < NUM_DATA_ENTRIES; i++) {
- HDassert(data_index[i] == i);
- HDassert(!(data[i].dirty));
+ assert(data_index[i] == i);
+ assert(!(data[i].dirty));
}
/* compose the done message */
@@ -5372,7 +5369,7 @@ smoke_check_2(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -5465,7 +5462,7 @@ smoke_check_3(int metadata_write_strategy)
/* some error occurred in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5477,7 +5474,7 @@ smoke_check_3(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5510,10 +5507,10 @@ smoke_check_3(int metadata_write_strategy)
pin_entry(file_ptr, i, TRUE, dirty);
- HDassert(!dirty || data[i].header.is_dirty);
- HDassert(data[i].header.is_pinned);
- HDassert(data[i].global_pinned);
- HDassert(!data[i].local_pinned);
+ assert(!dirty || data[i].header.is_dirty);
+ assert(data[i].header.is_pinned);
+ assert(data[i].global_pinned);
+ assert(!data[i].local_pinned);
}
if (i > 100) {
@@ -5531,7 +5528,7 @@ smoke_check_3(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5548,8 +5545,8 @@ smoke_check_3(int metadata_write_strategy)
hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0);
hbool_t dirty = ((((unsigned)i) & 0x04) == 0);
- HDassert(data[i].global_pinned);
- HDassert(!data[i].local_pinned);
+ assert(data[i].global_pinned);
+ assert(!data[i].local_pinned);
unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect);
}
@@ -5624,7 +5621,7 @@ smoke_check_3(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5634,8 +5631,8 @@ smoke_check_3(int metadata_write_strategy)
*/
for (i = 0; i < NUM_DATA_ENTRIES; i++) {
- HDassert(data_index[i] == i);
- HDassert(!(data[i].dirty));
+ assert(data_index[i] == i);
+ assert(!(data[i].dirty));
}
/* compose the done message */
@@ -5657,7 +5654,7 @@ smoke_check_3(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -5750,7 +5747,7 @@ smoke_check_4(int metadata_write_strategy)
/* some error occurred in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5762,7 +5759,7 @@ smoke_check_4(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5807,10 +5804,10 @@ smoke_check_4(int metadata_write_strategy)
pin_entry(file_ptr, i, TRUE, dirty);
- HDassert(!dirty || data[i].header.is_dirty);
- HDassert(data[i].header.is_pinned);
- HDassert(data[i].global_pinned);
- HDassert(!data[i].local_pinned);
+ assert(!dirty || data[i].header.is_dirty);
+ assert(data[i].header.is_pinned);
+ assert(data[i].global_pinned);
+ assert(!data[i].local_pinned);
}
if (i > 100) {
@@ -5828,7 +5825,7 @@ smoke_check_4(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5841,8 +5838,8 @@ smoke_check_4(int metadata_write_strategy)
hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0);
hbool_t dirty = ((((unsigned)i) & 0x04) == 0);
- HDassert(data[i].global_pinned);
- HDassert(!data[i].local_pinned);
+ assert(data[i].global_pinned);
+ assert(!data[i].local_pinned);
unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect);
}
@@ -5908,7 +5905,7 @@ smoke_check_4(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5918,8 +5915,8 @@ smoke_check_4(int metadata_write_strategy)
*/
for (i = 0; i < NUM_DATA_ENTRIES; i++) {
- HDassert(data_index[i] == i);
- HDassert(!(data[i].dirty));
+ assert(data_index[i] == i);
+ assert(!(data[i].dirty));
}
/* compose the done message */
@@ -5941,7 +5938,7 @@ smoke_check_4(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -6025,7 +6022,7 @@ smoke_check_5(int metadata_write_strategy)
/* some error occurred in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -6038,7 +6035,7 @@ smoke_check_5(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -6050,7 +6047,7 @@ smoke_check_5(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -6100,7 +6097,7 @@ smoke_check_5(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -6110,8 +6107,8 @@ smoke_check_5(int metadata_write_strategy)
*/
for (i = 0; i < NUM_DATA_ENTRIES; i++) {
- HDassert(data_index[i] == i);
- HDassert(!(data[i].dirty));
+ assert(data_index[i] == i);
+ assert(!(data[i].dirty));
}
/* compose the done message */
@@ -6133,7 +6130,7 @@ smoke_check_5(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -6310,7 +6307,7 @@ trace_file_check(int metadata_write_strategy)
/* some error occurred in the server -- report failure */
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -6322,7 +6319,7 @@ trace_file_check(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose)
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
if (nerrors == 0) {
@@ -6331,8 +6328,8 @@ trace_file_check(int metadata_write_strategy)
if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
nerrors++;
- HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank,
+ __func__);
}
else {
config.open_trace_file = TRUE;
@@ -6340,8 +6337,8 @@ trace_file_check(int metadata_write_strategy)
if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
nerrors++;
- HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank,
+ __func__);
}
}
} /* end if */
@@ -6376,7 +6373,7 @@ trace_file_check(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
if (nerrors == 0) {
@@ -6384,8 +6381,8 @@ trace_file_check(int metadata_write_strategy)
if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
nerrors++;
- HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank,
+ __func__);
}
else {
config.open_trace_file = FALSE;
@@ -6394,8 +6391,8 @@ trace_file_check(int metadata_write_strategy)
if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
nerrors++;
- HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank,
+ __func__);
}
}
} /* end if */
@@ -6405,7 +6402,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
} /* end if */
@@ -6414,8 +6411,8 @@ trace_file_check(int metadata_write_strategy)
*/
for (i = 0; i < NUM_DATA_ENTRIES; i++) {
- HDassert(data_index[i] == i);
- HDassert(!(data[i].dirty));
+ assert(data_index[i] == i);
+ assert(!(data[i].dirty));
}
/* compose the done message */
@@ -6435,18 +6432,18 @@ trace_file_check(int metadata_write_strategy)
if (!success) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
} /* end if */
if (nerrors == 0) {
HDsnprintf(trace_file_name, sizeof(trace_file_name), "t_cache_trace.txt.%d", (int)file_mpi_rank);
- if ((trace_file_ptr = HDfopen(trace_file_name, "r")) == NULL) {
+ if ((trace_file_ptr = fopen(trace_file_name, "r")) == NULL) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: HDfopen failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: fopen failed.\n", world_mpi_rank, __func__);
}
} /* end if */
@@ -6474,22 +6471,22 @@ trace_file_check(int metadata_write_strategy)
/* One ran out before the other - BADNESS */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
- __func__, i);
+ fprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
+ __func__, i);
if (expected_line_len == 0) {
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__,
- "<EMPTY>", expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__,
- buffer, actual_line_len);
+ fprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__,
+ "<EMPTY>", expected_line_len);
+ fprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__,
+ buffer, actual_line_len);
}
if (actual_line_len == 0) {
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__,
- (*expected_output)[i], expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__,
- "<EMPTY>", actual_line_len);
+ fprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__,
+ (*expected_output)[i], expected_line_len);
+ fprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__,
+ "<EMPTY>", actual_line_len);
}
}
- HDfprintf(stdout, "BADNESS BADNESS BADNESS\n");
+ fprintf(stdout, "BADNESS BADNESS BADNESS\n");
}
}
/* We directly compare the header line (line 0) */
@@ -6499,12 +6496,12 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
- __func__, i);
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__,
- (*expected_output)[i], expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, buffer,
- actual_line_len);
+ fprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
+ __func__, i);
+ fprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__,
+ (*expected_output)[i], expected_line_len);
+ fprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, buffer,
+ actual_line_len);
}
}
}
@@ -6520,11 +6517,11 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
- __func__, i);
- HDfprintf(stdout, "%d:%s: expected = \"%s\"\n", world_mpi_rank, __func__,
- (*expected_output)[i]);
- HDfprintf(stdout, "%d:%s: actual = \"%s\"\n", world_mpi_rank, __func__, tok);
+ fprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
+ __func__, i);
+ fprintf(stdout, "%d:%s: expected = \"%s\"\n", world_mpi_rank, __func__,
+ (*expected_output)[i]);
+ fprintf(stdout, "%d:%s: actual = \"%s\"\n", world_mpi_rank, __func__, tok);
}
}
} /* end else */
@@ -6617,7 +6614,7 @@ smoke_check_6(int metadata_write_strategy)
/* some error occurred in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -6631,7 +6628,7 @@ smoke_check_6(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -6651,14 +6648,14 @@ smoke_check_6(int metadata_write_strategy)
if (TRUE != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Entry inserted not marked as collective.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: Entry inserted not marked as collective.\n", world_mpi_rank,
+ __func__);
}
}
/* Make sure coll entries do not cross the 80% threshold */
H5_CHECK_OVERFLOW(cache_ptr->max_cache_size, size_t, double);
- HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size);
+ assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size);
}
/* Restore collective metadata reads state */
H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag);
@@ -6676,13 +6673,13 @@ smoke_check_6(int metadata_write_strategy)
if (FALSE != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
- world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
+ world_mpi_rank, __func__);
}
}
/* Make sure coll entries do not cross the 80% threshold */
- HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size);
+ assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size);
}
/* Restore collective metadata reads state */
H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag);
@@ -6691,7 +6688,7 @@ smoke_check_6(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -6708,13 +6705,13 @@ smoke_check_6(int metadata_write_strategy)
if (TRUE != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Entry protected not marked as collective.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: Entry protected not marked as collective.\n", world_mpi_rank,
+ __func__);
}
}
/* Make sure coll entries do not cross the 80% threshold */
- HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size);
+ assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size);
}
/* Restore collective metadata reads state */
H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag);
@@ -6732,13 +6729,13 @@ smoke_check_6(int metadata_write_strategy)
if (FALSE != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
- world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
+ world_mpi_rank, __func__);
}
}
/* Make sure coll entries do not cross the 80% threshold */
- HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size);
+ assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size);
}
/* Restore collective metadata reads state */
H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag);
@@ -6753,7 +6750,7 @@ smoke_check_6(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -6763,8 +6760,8 @@ smoke_check_6(int metadata_write_strategy)
*/
for (i = 0; i < NUM_DATA_ENTRIES; i++) {
- HDassert(data_index[i] == i);
- HDassert(!(data[i].dirty));
+ assert(data_index[i] == i);
+ assert(!(data[i].dirty));
}
/* compose the done message */
@@ -6786,7 +6783,7 @@ smoke_check_6(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -6851,7 +6848,7 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0)
- HDprintf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank);
+ printf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank);
H5open();
@@ -6862,32 +6859,32 @@ main(int argc, char **argv)
virt_num_data_entries = STD_VIRT_NUM_DATA_ENTRIES;
if (MAINPROCESS) {
- HDprintf("===================================\n");
- HDprintf("Parallel metadata cache tests\n");
- HDprintf(" mpi_size = %d\n", mpi_size);
- HDprintf(" express_test = %d\n", express_test);
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("Parallel metadata cache tests\n");
+ printf(" mpi_size = %d\n", mpi_size);
+ printf(" express_test = %d\n", express_test);
+ printf("===================================\n");
}
if (mpi_size < 3) {
if (MAINPROCESS)
- HDprintf(" Need at least 3 processes. Exiting.\n");
+ printf(" Need at least 3 processes. Exiting.\n");
goto finish;
}
- if (NULL == (data = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data)))) {
- HDprintf(" Couldn't allocate data array. Exiting.\n");
+ if (NULL == (data = malloc(NUM_DATA_ENTRIES * sizeof(*data)))) {
+ printf(" Couldn't allocate data array. Exiting.\n");
MPI_Abort(MPI_COMM_WORLD, -1);
}
- if (NULL == (data_index = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data_index)))) {
- HDprintf(" Couldn't allocate data index array. Exiting.\n");
+ if (NULL == (data_index = malloc(NUM_DATA_ENTRIES * sizeof(*data_index)))) {
+ printf(" Couldn't allocate data index array. Exiting.\n");
MPI_Abort(MPI_COMM_WORLD, -1);
}
- HDmemset(filenames, 0, sizeof(filenames));
+ memset(filenames, 0, sizeof(filenames));
for (int i = 0; i < NFILENAME; i++) {
- if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
- HDprintf("couldn't allocate filename array\n");
+ if (NULL == (filenames[i] = malloc(PATH_MAX))) {
+ printf("couldn't allocate filename array\n");
MPI_Abort(MPI_COMM_WORLD, -1);
}
}
@@ -6907,13 +6904,13 @@ main(int argc, char **argv)
if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, __func__);
}
if (H5Pset_fapl_mpio(fapl, world_mpi_comm, MPI_INFO_NULL) < 0) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, __func__);
}
/* fix the file names */
@@ -6921,7 +6918,7 @@ main(int argc, char **argv)
if (h5_fixname(FILENAME[u], fapl, filenames[u], PATH_MAX) == NULL) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, __func__);
break;
}
}
@@ -6930,7 +6927,7 @@ main(int argc, char **argv)
if (H5Pclose(fapl) < 0) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, __func__);
}
/* now create the fapl again, excluding the server process. */
@@ -6940,13 +6937,13 @@ main(int argc, char **argv)
if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, __func__);
}
if (H5Pset_fapl_mpio(fapl, file_mpi_comm, MPI_INFO_NULL) < 0) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, __func__);
+ fprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, __func__);
}
}
@@ -6957,7 +6954,7 @@ main(int argc, char **argv)
/* errors in setup -- no point in continuing */
if (world_mpi_rank == 0)
- HDfprintf(stdout, "Errors in test initialization. Exiting.\n");
+ fprintf(stdout, "Errors in test initialization. Exiting.\n");
goto finish;
}
@@ -6991,8 +6988,8 @@ main(int argc, char **argv)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Pset_all_coll_metadata_ops() failed 1.\n", world_mpi_rank,
- __func__);
+ fprintf(stdout, "%d:%s: H5Pset_all_coll_metadata_ops() failed 1.\n", world_mpi_rank,
+ __func__);
}
}
}
@@ -7008,9 +7005,9 @@ main(int argc, char **argv)
finish:
if (data_index)
- HDfree(data_index);
+ free(data_index);
if (data)
- HDfree(data);
+ free(data);
/* make sure all processes are finished before final report, cleanup
* and exit.
@@ -7021,14 +7018,14 @@ finish:
MPI_Barrier(MPI_COMM_WORLD);
if (MAINPROCESS) { /* only process 0 reports */
- HDprintf("===================================\n");
+ printf("===================================\n");
if (nerrors || failures) {
- HDprintf("***metadata cache tests detected %d failures***\n", nerrors + failures);
+ printf("***metadata cache tests detected %d failures***\n", nerrors + failures);
}
else {
- HDprintf("metadata cache tests finished with no failures\n");
+ printf("metadata cache tests finished with no failures\n");
}
- HDprintf("===================================\n");
+ printf("===================================\n");
}
takedown_derived_types();
diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c
index 1e556d9..d8acd92 100644
--- a/testpar/t_cache_image.c
+++ b/testpar/t_cache_image.c
@@ -146,12 +146,12 @@ construct_test_file(int test_file_index)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
- HDassert(FILENAMES[test_file_index]);
+ assert(FILENAMES[test_file_index]);
if (h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
@@ -161,7 +161,7 @@ construct_test_file(int test_file_index)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a HDF5 file with the cache image FAPL entry.
*
@@ -192,7 +192,7 @@ construct_test_file(int test_file_index)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create a data set in the file. */
@@ -213,7 +213,7 @@ construct_test_file(int test_file_index)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -227,7 +227,7 @@ construct_test_file(int test_file_index)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
while ((pass) && (max_dset < MAX_NUM_DSETS)) {
@@ -259,7 +259,7 @@ construct_test_file(int test_file_index)
}
if (show_progress)
- HDfprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp, max_dset, pass);
+ fprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp, max_dset, pass);
/* 5) Create a data set in the file. */
@@ -280,7 +280,7 @@ construct_test_file(int test_file_index)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 1, max_dset, pass);
+ fprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 1, max_dset, pass);
/* 6) Close the file. */
@@ -294,7 +294,7 @@ construct_test_file(int test_file_index)
}
if (show_progress)
- HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 2, max_dset, pass);
+ fprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 2, max_dset, pass);
} /* end while */
cp += 3;
@@ -326,7 +326,7 @@ construct_test_file(int test_file_index)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Open and close all data sets.
*
@@ -350,7 +350,7 @@ construct_test_file(int test_file_index)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Close the file. */
@@ -412,11 +412,11 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
hsize_t chunk_size[2];
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- HDassert(0 <= min_dset);
- HDassert(min_dset <= max_dset);
- HDassert(max_dset < MAX_NUM_DSETS);
+ assert(0 <= min_dset);
+ assert(min_dset <= max_dset);
+ assert(max_dset < MAX_NUM_DSETS);
/* create the datasets */
@@ -493,7 +493,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* create the mem space to be used to read and write chunks */
if (pass) {
@@ -510,7 +510,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* select in memory hyperslab */
if (pass) {
@@ -529,7 +529,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* initialize all datasets on a round robin basis */
i = 0;
@@ -576,7 +576,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* read data from data sets and validate it */
i = 0;
@@ -625,11 +625,11 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (verbose) {
- HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
- data_chunk[k][l],
- ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l));
- HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k,
- l);
+ fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
+ data_chunk[k][l],
+ ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l));
+ fprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k,
+ l);
}
}
}
@@ -642,7 +642,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (verbose) {
- HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m);
+ fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m);
}
}
}
@@ -654,7 +654,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* close the file spaces */
i = min_dset;
@@ -729,18 +729,18 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset)
int cp = 0;
int i;
- if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ if ( show_progress ) fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- HDassert(0 <= min_dset);
- HDassert(min_dset <= max_dset);
- HDassert(max_dset < MAX_NUM_DSETS);
+ assert(0 <= min_dset);
+ assert(min_dset <= max_dset);
+ assert(max_dset < MAX_NUM_DSETS);
- if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ if ( show_progress ) fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* first, verify the contents of the target dataset(s) */
verify_data_sets(file_id, min_dset, max_dset);
- if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ if ( show_progress ) fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* now delete the target datasets */
if ( pass ) {
@@ -761,7 +761,7 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset)
}
}
- if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ if ( show_progress ) fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
return;
@@ -832,7 +832,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
- HDassert(!create_file || config_fsm);
+ assert(!create_file || config_fsm);
if (pass) {
/* opening the file both read only and with a cache image
@@ -852,12 +852,12 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
else if (verbose) {
- HDfprintf(stdout, "%s: HDF file name = \"%s\".\n", fcn_name, hdf_file_name);
+ fprintf(stdout, "%s: HDF file name = \"%s\".\n", fcn_name, hdf_file_name);
}
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* create a file access property list. */
if (pass) {
@@ -872,7 +872,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* call H5Pset_libver_bounds() on the fapl_id */
if (pass) {
@@ -885,7 +885,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* get metadata cache image config -- verify that it is the default */
if (pass) {
@@ -909,7 +909,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* set metadata cache image fapl entry if indicated */
if ((pass) && (set_mdci_fapl)) {
@@ -929,7 +929,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the persistent free space manager if indicated */
if ((pass) && (config_fsm)) {
@@ -961,7 +961,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the page buffer if indicated */
if ((pass) && (enable_page_buffer)) {
@@ -974,7 +974,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ((pass) && (l_facc_type == FACC_MPIO)) {
@@ -987,7 +987,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ((pass) && (l_facc_type == FACC_MPIO)) {
@@ -999,7 +999,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ((pass) && (l_facc_type == FACC_MPIO)) {
@@ -1011,7 +1011,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ((pass) && (l_facc_type == FACC_MPIO)) {
@@ -1036,7 +1036,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* open the file */
if (pass) {
@@ -1076,14 +1076,14 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
failure_mssg = "Can't get file_ptr.";
if (verbose) {
- HDfprintf(stdout, "%s: Can't get file_ptr.\n", fcn_name);
+ fprintf(stdout, "%s: Can't get file_ptr.\n", fcn_name);
}
}
}
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* get a pointer to the files internal data structure and then
* to the cache structure
@@ -1102,7 +1102,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* verify expected page buffer status. At present, page buffering
* must be disabled in parallel -- hopefully this will change in the
@@ -1124,7 +1124,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* verify expected metadata cache status */
@@ -1143,7 +1143,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -1186,7 +1186,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if ((pass) && (set_mdci_fapl)) {
@@ -1200,7 +1200,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -1240,7 +1240,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -1250,10 +1250,10 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
}
if (show_progress) {
- HDfprintf(stdout, "%s: cp = %d, pass = %d -- exiting.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d -- exiting.\n", fcn_name, cp++, pass);
if (!pass)
- HDfprintf(stdout, "%s: failure_mssg = %s\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = %s\n", fcn_name, failure_mssg);
}
return;
@@ -1308,8 +1308,8 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
if (show_progress) {
- HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
}
if (pass) {
@@ -1328,7 +1328,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* set the dataset creation plist to specify that the raw data is
* to be partitioned into 1X10X10 element chunks.
@@ -1346,7 +1346,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -1362,7 +1362,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* create the dataset */
if (pass) {
@@ -1378,7 +1378,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* get the file space ID */
if (pass) {
@@ -1393,7 +1393,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* create the mem space to be used to read and write chunks */
if (pass) {
@@ -1411,7 +1411,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* select in memory hyperslab */
if (pass) {
@@ -1432,7 +1432,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the DXPL for collective I/O */
if (pass) {
@@ -1447,7 +1447,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -1459,7 +1459,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* initialize the dataset with collective writes */
i = 0;
@@ -1468,7 +1468,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
while ((pass) && (j < DSET_SIZE)) {
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.0, pass = %d.\n", fcn_name, cp, pass);
+ fprintf(stdout, "%s: cp = %d.0, pass = %d.\n", fcn_name, cp, pass);
/* initialize the slab */
for (k = 0; k < CHUNK_SIZE; k++) {
@@ -1479,7 +1479,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.1, pass = %d.\n", fcn_name, cp, pass);
+ fprintf(stdout, "%s: cp = %d.1, pass = %d.\n", fcn_name, cp, pass);
/* select on disk hyperslab */
offset[0] = (hsize_t)mpi_rank; /* offset of hyperslab in file */
@@ -1497,7 +1497,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.2, pass = %d.\n", fcn_name, cp, pass);
+ fprintf(stdout, "%s: cp = %d.2, pass = %d.\n", fcn_name, cp, pass);
/* write the chunk to file */
status = H5Dwrite(dset_id, H5T_NATIVE_INT, memspace_id, filespace_id, dxpl_id, data_chunk);
@@ -1509,7 +1509,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.3, pass = %d.\n", fcn_name, cp, pass);
+ fprintf(stdout, "%s: cp = %d.3, pass = %d.\n", fcn_name, cp, pass);
j += CHUNK_SIZE;
}
@@ -1519,7 +1519,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
cp++;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* read data from data sets and validate it */
i = 0;
@@ -1567,12 +1567,12 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (verbose) {
- HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
- data_chunk[0][k][l],
- ((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j +
- l + dset_num));
- HDfprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n", dset_num,
- i, j, k, l);
+ fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
+ data_chunk[0][k][l],
+ ((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j + l +
+ dset_num));
+ fprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n", dset_num,
+ i, j, k, l);
}
}
}
@@ -1585,7 +1585,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (verbose) {
- HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, dset_num);
+ fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, dset_num);
}
}
}
@@ -1595,7 +1595,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* close the data space */
if ((pass) && (H5Sclose(dataspace_id) < 0)) {
@@ -1640,7 +1640,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
return;
@@ -1677,8 +1677,8 @@ par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank)
HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
if (show_progress) {
- HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
}
/* verify the target dataset */
@@ -1688,7 +1688,7 @@ par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* delete the target dataset */
if (pass) {
@@ -1701,7 +1701,7 @@ par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
return;
@@ -1739,9 +1739,9 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size)
if (mpi_rank == 0) { /* insert cache image in supplied test file */
if (!serial_insert_cache_image(file_name_idx, mpi_size)) {
- HDfprintf(stderr, "\n\nCache image insertion failed.\n");
- HDfprintf(stderr, " failure mssg = \"%s\"\n", failure_mssg);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "\n\nCache image insertion failed.\n");
+ fprintf(stderr, " failure mssg = \"%s\"\n", failure_mssg);
+ exit(EXIT_FAILURE);
}
}
}
@@ -1802,8 +1802,8 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
if (show_progress) {
- HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
}
if (pass) {
@@ -1832,7 +1832,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* create the mem space to be used to read */
if (pass) {
@@ -1850,7 +1850,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* select in memory hyperslab */
if (pass) {
@@ -1871,7 +1871,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the DXPL for collective I/O */
if (pass) {
@@ -1886,7 +1886,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -1898,7 +1898,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* read data from data sets and validate it */
i = 0;
@@ -1946,12 +1946,12 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (verbose) {
- HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
- data_chunk[0][k][l],
- ((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j +
- l + dset_num));
- HDfprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n", dset_num,
- i, j, k, l);
+ fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
+ data_chunk[0][k][l],
+ ((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j + l +
+ dset_num));
+ fprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n", dset_num,
+ i, j, k, l);
}
}
}
@@ -1964,7 +1964,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (verbose) {
- HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, dset_num);
+ fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, dset_num);
}
}
}
@@ -1974,7 +1974,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* close the file space */
if ((pass) && (H5Sclose(filespace_id) < 0)) {
@@ -2005,7 +2005,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
return;
@@ -2048,22 +2048,22 @@ serial_insert_cache_image(int file_name_idx, int mpi_size)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) setup the file name */
if (pass) {
- HDassert(FILENAMES[file_name_idx]);
+ assert(FILENAMES[file_name_idx]);
if (h5_fixname(FILENAMES[file_name_idx], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
pass = FALSE;
- HDfprintf(stdout, "h5_fixname() failed.\n");
+ fprintf(stdout, "h5_fixname() failed.\n");
}
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Open the PHDF5 file with the cache image FAPL entry.
*/
@@ -2090,7 +2090,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Validate contents of the file */
@@ -2102,7 +2102,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Close the file */
@@ -2116,7 +2116,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
return pass;
@@ -2162,8 +2162,8 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
if (show_progress) {
- HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
}
if (pass) {
@@ -2192,7 +2192,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* create the mem space to be used to read */
if (pass) {
@@ -2210,7 +2210,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* select in memory hyperslab */
if (pass) {
@@ -2231,7 +2231,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* read data from data sets and validate it */
i = 0;
@@ -2283,13 +2283,12 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
if (verbose) {
- HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", j, k,
- data_chunk[0][j][k],
- ((DSET_SIZE * DSET_SIZE * i) + (DSET_SIZE * (j + l)) + k + m +
- dset_num));
- HDfprintf(stdout,
- "dset_num = %d, i = %d, j = %d, k = %d, l = %d, m = %d\n",
- dset_num, i, j, k, l, m);
+ fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", j, k,
+ data_chunk[0][j][k],
+ ((DSET_SIZE * DSET_SIZE * i) + (DSET_SIZE * (j + l)) + k + m +
+ dset_num));
+ fprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d, m = %d\n",
+ dset_num, i, j, k, l, m);
}
}
}
@@ -2302,7 +2301,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
if (verbose) {
- HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", j, k, dset_num);
+ fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", j, k, dset_num);
}
}
}
@@ -2314,7 +2313,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* close the file space */
if ((pass) && (H5Sclose(filespace_id) < 0)) {
@@ -2338,7 +2337,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
return;
@@ -2388,11 +2387,11 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
hsize_t offset[2];
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- HDassert(0 <= min_dset);
- HDassert(min_dset <= max_dset);
- HDassert(max_dset < MAX_NUM_DSETS);
+ assert(0 <= min_dset);
+ assert(min_dset <= max_dset);
+ assert(max_dset < MAX_NUM_DSETS);
/* open the datasets */
@@ -2431,7 +2430,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* create the mem space to be used to read and write chunks */
if (pass) {
@@ -2448,7 +2447,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* select in memory hyperslab */
if (pass) {
@@ -2467,7 +2466,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* read data from data sets and validate it */
i = 0;
@@ -2516,11 +2515,11 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if (verbose) {
- HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
- data_chunk[k][l],
- ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l));
- HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k,
- l);
+ fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l,
+ data_chunk[k][l],
+ ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l));
+ fprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k,
+ l);
}
}
}
@@ -2533,7 +2532,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if (verbose) {
- HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m);
+ fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m);
}
}
}
@@ -2545,7 +2544,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
/* close the file spaces */
i = min_dset;
@@ -2660,7 +2659,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -2673,7 +2672,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file created at the beginning of this test.
*
@@ -2702,7 +2701,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Verify that the file contains the expected data.
*
@@ -2731,7 +2730,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Verify that all other processes receive the cache image block
* from process 0.
@@ -2752,7 +2751,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -2766,7 +2765,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file, and verify that it doesn't contain a cache image. */
@@ -2792,7 +2791,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Verify that the file contains the expected data. */
@@ -2824,7 +2823,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -2838,7 +2837,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
H5_FAILED();
if (show_progress) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -2923,7 +2922,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -2936,7 +2935,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file created at the beginning of this test.
*
@@ -2970,7 +2969,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Verify that the file contains the expected data.
*
@@ -2998,7 +2997,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Verify that all other processes receive the cache image block
* from process 0.
@@ -3019,7 +3018,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
#endif /* H5C_COLLECT_CACHE_STATS */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Close the file. */
@@ -3033,7 +3032,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Open the file, and verify that it doesn't contain a cache image. */
@@ -3059,7 +3058,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Verify that the file contains the expected data. */
@@ -3091,7 +3090,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Delete the file. */
@@ -3119,7 +3118,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
H5_FAILED();
if (show_progress) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -3175,12 +3174,12 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
- HDassert(FILENAMES[test_file_index]);
+ assert(FILENAMES[test_file_index]);
if (h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
@@ -3190,7 +3189,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Create a PHDF5 file without the cache image FAPL entry.
*
@@ -3219,7 +3218,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Create datasets in the file */
@@ -3231,7 +3230,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Verify the datasets in the file */
@@ -3254,7 +3253,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5 Insert a cache image into the file */
@@ -3264,7 +3263,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Open the file R/O */
@@ -3290,7 +3289,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Verify the datasets in the file backwards
*
@@ -3308,7 +3307,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Verify that only process 0 reads the cache image. */
#if H5C_COLLECT_CACHE_STATS
@@ -3324,7 +3323,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
#endif /* H5C_COLLECT_CACHE_STATS */
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Verify that all other processes receive the cache image block
* from process 0.
@@ -3345,7 +3344,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
#endif /* H5C_COLLECT_CACHE_STATS */
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the file */
@@ -3359,7 +3358,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Open the file */
@@ -3385,7 +3384,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Verify the datasets in the file
*
@@ -3403,7 +3402,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Verify that only process 0 reads the cache image. */
#if H5C_COLLECT_CACHE_STATS
@@ -3419,7 +3418,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
#endif /* H5C_COLLECT_CACHE_STATS */
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Verify that all other processes receive the cache image block
* from process 0.
@@ -3440,7 +3439,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
#endif /* H5C_COLLECT_CACHE_STATS */
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 11) Delete the datasets in the file */
@@ -3452,7 +3451,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 12) Close the file */
@@ -3466,7 +3465,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 13) Get the size of the file. Verify that it is less
* than 20 KB. Without deletions and persistent free
@@ -3492,7 +3491,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 14) Delete the file */
@@ -3509,7 +3508,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
}
if ((mpi_rank == 0) && (show_progress))
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -3522,7 +3521,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
H5_FAILED();
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
@@ -3573,46 +3572,46 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0)
- HDprintf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank);
+ printf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank);
H5open();
if (mpi_rank == 0) {
- HDprintf("===================================\n");
- HDprintf("Parallel metadata cache image tests\n");
- HDprintf(" mpi_size = %d\n", mpi_size);
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("Parallel metadata cache image tests\n");
+ printf(" mpi_size = %d\n", mpi_size);
+ printf("===================================\n");
}
if (mpi_size < 2) {
if (mpi_rank == 0)
- HDprintf(" Need at least 2 processes. Exiting.\n");
+ printf(" Need at least 2 processes. Exiting.\n");
goto finish;
}
if (mpi_rank == 0) { /* create test files */
int i;
- HDfprintf(stdout, "Constructing test files: \n");
- HDfflush(stdout);
+ fprintf(stdout, "Constructing test files: \n");
+ fflush(stdout);
i = 0;
while ((FILENAMES[i] != NULL) && (i < TEST_FILES_TO_CONSTRUCT)) {
- HDfprintf(stdout, " writing %s ... ", FILENAMES[i]);
- HDfflush(stdout);
+ fprintf(stdout, " writing %s ... ", FILENAMES[i]);
+ fflush(stdout);
construct_test_file(i);
if (pass) {
- HDprintf("done.\n");
- HDfflush(stdout);
+ printf("done.\n");
+ fflush(stdout);
}
else {
- HDprintf("failed.\n");
- HDexit(EXIT_FAILURE);
+ printf("failed.\n");
+ exit(EXIT_FAILURE);
}
i++;
}
- HDfprintf(stdout, "Test file construction complete.\n");
+ fprintf(stdout, "Test file construction complete.\n");
}
/* can't start test until test files exist */
@@ -3632,12 +3631,12 @@ finish:
MPI_Barrier(MPI_COMM_WORLD);
if (mpi_rank == 0) { /* only process 0 reports */
- HDprintf("===================================\n");
+ printf("===================================\n");
if (nerrs > 0)
- HDprintf("***metadata cache image tests detected %d failures***\n", nerrs);
+ printf("***metadata cache image tests detected %d failures***\n", nerrs);
else
- HDprintf("metadata cache image tests finished with no failures\n");
- HDprintf("===================================\n");
+ printf("metadata cache image tests finished with no failures\n");
+ printf("===================================\n");
}
/* close HDF5 library */
diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c
index ac5b90b..a6be482 100644
--- a/testpar/t_chunk_alloc.c
+++ b/testpar/t_chunk_alloc.c
@@ -112,7 +112,7 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_
VRFY((dataset >= 0), "");
if (write_pattern == sec_last) {
- HDmemset(buffer, 100, CHUNK_SIZE);
+ memset(buffer, 100, CHUNK_SIZE);
count[0] = 1;
stride[0] = 1;
@@ -229,7 +229,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti
/* all chunks are written by all the processes in an interleaved way*/
case write_all:
- HDmemset(buffer, mpi_rank + 1, CHUNK_SIZE);
+ memset(buffer, mpi_rank + 1, CHUNK_SIZE);
count[0] = 1;
stride[0] = 1;
block[0] = chunk_dims[0];
@@ -263,7 +263,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti
case open_only:
break;
default:
- HDassert(0);
+ assert(0);
}
/* Close up */
@@ -361,7 +361,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
block[0] = chunk_dims[0];
for (i = 0; i < nchunks; i++) {
/* reset buffer values */
- HDmemset(buffer, -1, CHUNK_SIZE);
+ memset(buffer, -1, CHUNK_SIZE);
offset[0] = (hsize_t)i * chunk_dims[0];
@@ -387,7 +387,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
value = 0;
break;
default:
- HDassert(0);
+ assert(0);
}
/* verify content of the chunk */
@@ -455,7 +455,7 @@ test_chunk_alloc(void)
filename = (const char *)GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend Chunked allocation test on file %s\n", filename);
+ printf("Extend Chunked allocation test on file %s\n", filename);
/* Case 1 */
/* Create chunked dataset without writing anything.*/
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c
index da8d69e..b44d7ef 100644
--- a/testpar/t_coll_chunk.c
+++ b/testpar/t_coll_chunk.c
@@ -600,7 +600,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
dims[1] = SPACE_DIM2;
/* allocate memory for data buffer */
- data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* set up dimensions of the slab this process accesses */
@@ -608,7 +608,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
/* set up the coords array selection */
num_points = block[0] * block[1] * count[0] * count[1];
- coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
point_set(start, count, stride, block, num_points, coords, mode);
@@ -875,16 +875,16 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
VRFY((status >= 0), "");
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
/* Use collective read to verify the correctness of collective write. */
/* allocate memory for data buffer */
- data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* allocate memory for data buffer */
- data_origin1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int));
+ data_origin1 = (int *)malloc(dims[0] * dims[1] * sizeof(int));
VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
acc_plist = create_faccess_plist(comm, info, facc_type);
@@ -1009,11 +1009,11 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/* Set up the selection */
@@ -1110,12 +1110,12 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t
break;
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
}
}
@@ -1168,20 +1168,20 @@ ccdataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("Print only the first block of the dataset\n");
- HDprintf("%-8s", "Cols:");
+ printf("Print only the first block of the dataset\n");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3lu ", (unsigned long)(start[1] + j));
+ printf("%3lu ", (unsigned long)(start[1] + j));
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2lu: ", (unsigned long)(i + start[0]));
+ printf("Row %2lu: ", (unsigned long)(i + start[0]));
for (j = 0; j < block[1]; j++) {
- HDprintf("%03d ", *dataptr++);
+ printf("%03d ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -1198,14 +1198,14 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("dataset_vrfy dumping:::\n");
- HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1]);
- HDprintf("original values:\n");
+ printf("dataset_vrfy dumping:::\n");
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1]);
+ printf("original values:\n");
ccdataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
ccdataset_print(start, block, dataset);
}
@@ -1228,8 +1228,8 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
}
if (*dataptr != *oriptr) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr));
+ printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr));
}
}
}
@@ -1237,8 +1237,8 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
+ printf("%d errors found in ccdataset_vrfy\n", vrfyerrs);
return (vrfyerrs);
}
diff --git a/testpar/t_coll_md.c b/testpar/t_coll_md.c
index cc32d01..1220111 100644
--- a/testpar/t_coll_md.c
+++ b/testpar/t_coll_md.c
@@ -99,7 +99,7 @@ test_partial_no_selection_coll_md_read(void)
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
VRFY((file_id >= 0), "H5Fcreate succeeded");
- dataset_dims = HDmalloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims));
+ dataset_dims = malloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims));
VRFY((dataset_dims != NULL), "malloc succeeded");
dataset_dims[0] = (hsize_t)PARTIAL_NO_SELECTION_Y_DIM_SCALE * (hsize_t)mpi_size;
@@ -145,8 +145,8 @@ test_partial_no_selection_coll_md_read(void)
mspace_id = H5Screate_simple(1, sel_dims, NULL);
VRFY((mspace_id >= 0), "H5Screate_simple succeeded");
- data = HDcalloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
- sizeof(int));
+ data = calloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
+ sizeof(int));
VRFY((data != NULL), "calloc succeeded");
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
@@ -169,8 +169,8 @@ test_partial_no_selection_coll_md_read(void)
VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, H5FD_MPIO_CHUNK_ONE_IO) >= 0),
"H5Pset_dxpl_mpio_chunk_opt succeeded");
- read_buf = HDmalloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
- sizeof(int));
+ read_buf = malloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
+ sizeof(int));
VRFY((read_buf != NULL), "malloc succeeded");
/*
@@ -191,24 +191,24 @@ test_partial_no_selection_coll_md_read(void)
* Check data integrity just to be sure.
*/
if (!PARTIAL_NO_SELECTION_NO_SEL_PROCESS) {
- VRFY((!HDmemcmp(data, read_buf,
- count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
- sizeof(int))),
+ VRFY((!memcmp(data, read_buf,
+ count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) *
+ sizeof(int))),
"memcmp succeeded");
}
if (dataset_dims) {
- HDfree(dataset_dims);
+ free(dataset_dims);
dataset_dims = NULL;
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -319,13 +319,13 @@ test_multi_chunk_io_addrmap_issue(void)
VRFY((H5Fflush(file_id, H5F_SCOPE_GLOBAL) >= 0), "H5Fflush succeeded");
- read_buf = HDmalloc(50 * sizeof(int));
+ read_buf = malloc(50 * sizeof(int));
VRFY((read_buf != NULL), "malloc succeeded");
VRFY((H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "H5Dread succeeded");
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -439,7 +439,7 @@ test_link_chunk_io_sort_chunk_issue(void)
mspace_id = H5Screate_simple(1, sel_dims, NULL);
VRFY((mspace_id >= 0), "H5Screate_simple succeeded");
- data = HDcalloc(1, count[0] * sizeof(int));
+ data = calloc(1, count[0] * sizeof(int));
VRFY((data != NULL), "calloc succeeded");
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
@@ -462,7 +462,7 @@ test_link_chunk_io_sort_chunk_issue(void)
VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, H5FD_MPIO_CHUNK_ONE_IO) >= 0),
"H5Pset_dxpl_mpio_chunk_opt succeeded");
- read_buf = HDmalloc(count[0] * sizeof(int));
+ read_buf = malloc(count[0] * sizeof(int));
VRFY((read_buf != NULL), "malloc succeeded");
VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -482,12 +482,12 @@ test_link_chunk_io_sort_chunk_issue(void)
"H5Dread succeeded");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index d144235..80ef5b3 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -56,7 +56,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set BYROW\n");
+ printf("slab_set BYROW\n");
break;
case BYCOL:
/* Each process takes a block of columns. */
@@ -69,7 +69,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = (hsize_t)mpi_rank * block[1];
if (VERBOSE_MED)
- HDprintf("slab_set BYCOL\n");
+ printf("slab_set BYCOL\n");
break;
case ZROW:
/* Similar to BYROW except process 0 gets 0 row */
@@ -82,7 +82,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = (mpi_rank ? (hsize_t)mpi_rank * block[0] : 0);
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set ZROW\n");
+ printf("slab_set ZROW\n");
break;
case ZCOL:
/* Similar to BYCOL except process 0 gets 0 column */
@@ -95,11 +95,11 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = (mpi_rank ? (hsize_t)mpi_rank * block[1] : 0);
if (VERBOSE_MED)
- HDprintf("slab_set ZCOL\n");
+ printf("slab_set ZCOL\n");
break;
default:
/* Unknown mode. Set it to cover the whole dataset. */
- HDprintf("unknown slab_set mode (%d)\n", mode);
+ printf("unknown slab_set mode (%d)\n", mode);
block[0] = (hsize_t)dim0;
block[1] = (hsize_t)dim1;
stride[0] = block[0];
@@ -109,16 +109,16 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set wholeset\n");
+ printf("slab_set wholeset\n");
break;
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
}
}
@@ -155,15 +155,15 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
k = 0;
for (i = 0; i < num_points; i++) {
- HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
+ printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
k += 2;
}
}
@@ -198,19 +198,19 @@ dataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("%-8s", "Cols:");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3lu ", (unsigned long)(start[1] + j));
+ printf("%3lu ", (unsigned long)(start[1] + j));
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2lu: ", (unsigned long)(i + start[0]));
+ printf("Row %2lu: ", (unsigned long)(i + start[0]));
for (j = 0; j < block[1]; j++) {
- HDprintf("%03d ", *dataptr++);
+ printf("%03d ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -226,14 +226,14 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("dataset_vrfy dumping:::\n");
- HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1]);
- HDprintf("original values:\n");
+ printf("dataset_vrfy dumping:::\n");
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1]);
+ printf("original values:\n");
dataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
dataset_print(start, block, dataset);
}
@@ -242,9 +242,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
for (j = 0; j < block[1]; j++) {
if (*dataset != *original) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]),
- (unsigned long)(j + start[1]), *(original), *(dataset));
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]),
+ (unsigned long)(j + start[1]), *(original), *(dataset));
}
dataset++;
original++;
@@ -252,9 +252,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in dataset_vrfy\n", vrfyerrs);
+ printf("%d errors found in dataset_vrfy\n", vrfyerrs);
return (vrfyerrs);
}
@@ -295,15 +295,15 @@ dataset_writeInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Independent write test on file %s\n", filename);
+ printf("Independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* ----------------------------------------
* CREATE AN HDF5 FILE WITH PARALLEL ACCESS
@@ -370,7 +370,7 @@ dataset_writeInd(void)
/* setup dimensions again to write with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("writeInd by some with zero row\n");
+ printf("writeInd by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -405,7 +405,7 @@ dataset_writeInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/* Example of using the parallel HDF5 library to read a dataset */
@@ -433,17 +433,17 @@ dataset_readInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Independent read test on file %s\n", filename);
+ printf("Independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* setup file access template */
acc_tpl = create_faccess_plist(comm, info, facc_type);
@@ -513,9 +513,9 @@ dataset_readInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -563,7 +563,7 @@ dataset_writeAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Collective write test on file %s\n", filename);
+ printf("Collective write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -571,12 +571,12 @@ dataset_writeAll(void)
/* set up the coords array selection */
num_points = (size_t)dim1;
- coords = (hsize_t *)HDmalloc((size_t)dim1 * (size_t)RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)dim1 * (size_t)RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -682,7 +682,7 @@ dataset_writeAll(void)
/* setup dimensions again to writeAll with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("writeAll by some with zero row\n");
+ printf("writeAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -747,7 +747,7 @@ dataset_writeAll(void)
/* setup dimensions again to writeAll with zero columns for process 0 */
if (VERBOSE_MED)
- HDprintf("writeAll by some with zero col\n");
+ printf("writeAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -887,7 +887,7 @@ dataset_writeAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
block[0] = 1;
@@ -1036,9 +1036,9 @@ dataset_writeAll(void)
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/*
@@ -1079,7 +1079,7 @@ dataset_readAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Collective read test on file %s\n", filename);
+ printf("Collective read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -1087,14 +1087,14 @@ dataset_readAll(void)
/* set up the coords array selection */
num_points = (size_t)dim1;
- coords = (hsize_t *)HDmalloc((size_t)dim0 * (size_t)dim1 * RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)dim0 * (size_t)dim1 * RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -1176,7 +1176,7 @@ dataset_readAll(void)
/* setup dimensions again to readAll with zero columns for process 0 */
if (VERBOSE_MED)
- HDprintf("readAll by some with zero col\n");
+ printf("readAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1243,7 +1243,7 @@ dataset_readAll(void)
/* setup dimensions again to readAll with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("readAll by some with zero row\n");
+ printf("readAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1270,9 +1270,9 @@ dataset_readAll(void)
free(data_array1);
if (data_origin1)
free(data_origin1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
block[0] = 1;
@@ -1331,7 +1331,7 @@ dataset_readAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* Dataset6: point selection in File - Point selection in Memory*/
@@ -1377,7 +1377,7 @@ dataset_readAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* Dataset7: point selection in memory - All selection in file*/
@@ -1445,11 +1445,11 @@ dataset_readAll(void)
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -1493,7 +1493,7 @@ extend_writeInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -1504,8 +1504,8 @@ extend_writeInd(void)
chunk_dims[1] = (hsize_t)chunkdim1;
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -1545,7 +1545,7 @@ extend_writeInd(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims);
@@ -1676,7 +1676,7 @@ extend_writeInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/*
@@ -1708,7 +1708,7 @@ extend_writeInd2(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test #2 on file %s\n", filename);
+ printf("Extend independent write test #2 on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -1765,8 +1765,8 @@ extend_writeInd2(void)
if (VERBOSE_MED) {
MESG("writing at offset zero: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", written[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", written[i]);
+ printf("\n");
}
ret = H5Dwrite(dataset, H5T_NATIVE_INT, ms, fs, H5P_DEFAULT, written);
VRFY((ret >= 0), "H5Dwrite succeeded");
@@ -1778,15 +1778,15 @@ extend_writeInd2(void)
VRFY((ret >= 0), "H5Dread succeeded");
for (i = 0; i < (int)orig_size; i++)
if (written[i] != retrieved[i]) {
- HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
- written[i], i, retrieved[i]);
+ printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
+ written[i], i, retrieved[i]);
nerrors++;
}
if (VERBOSE_MED) {
MESG("read at offset zero: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", retrieved[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", retrieved[i]);
+ printf("\n");
}
/* -------------------------
@@ -1809,8 +1809,8 @@ extend_writeInd2(void)
if (VERBOSE_MED) {
MESG("writing at offset 10: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", written[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", written[i]);
+ printf("\n");
}
ret = H5Sselect_hyperslab(fs, H5S_SELECT_SET, &orig_size, NULL, &one, &orig_size);
VRFY((ret >= 0), "H5Sselect_hyperslab succeeded");
@@ -1824,15 +1824,15 @@ extend_writeInd2(void)
VRFY((ret >= 0), "H5Dread succeeded");
for (i = 0; i < (int)orig_size; i++)
if (written[i] != retrieved[i]) {
- HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
- written[i], i, retrieved[i]);
+ printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
+ written[i], i, retrieved[i]);
nerrors++;
}
if (VERBOSE_MED) {
MESG("read at offset 10: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", retrieved[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", retrieved[i]);
+ printf("\n");
}
/* Close dataset collectively */
@@ -1871,19 +1871,19 @@ extend_readInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent read test on file %s\n", filename);
+ printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array2 != NULL), "data_array2 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -2003,11 +2003,11 @@ extend_readInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_array2)
- HDfree(data_array2);
+ free(data_array2);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -2052,7 +2052,7 @@ extend_writeAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -2063,8 +2063,8 @@ extend_writeAll(void)
chunk_dims[1] = (hsize_t)chunkdim1;
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -2104,7 +2104,7 @@ extend_writeAll(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims);
@@ -2258,7 +2258,7 @@ extend_writeAll(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/* Example of using the parallel HDF5 library to read an extendible dataset */
@@ -2289,19 +2289,19 @@ extend_readAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent read test on file %s\n", filename);
+ printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array2 != NULL), "data_array2 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -2443,11 +2443,11 @@ extend_readAll(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_array2)
- HDfree(data_array2);
+ free(data_array2);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -2479,17 +2479,17 @@ compress_readAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Collective chunked dataset read test on file %s\n", filename);
+ printf("Collective chunked dataset read test on file %s\n", filename);
/* Retrieve MPI parameters */
MPI_Comm_size(comm, &mpi_size);
MPI_Comm_rank(comm, &mpi_rank);
/* Allocate data buffer */
- data_orig = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE));
- VRFY((data_orig != NULL), "data_origin1 HDmalloc succeeded");
- data_read = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE));
- VRFY((data_read != NULL), "data_array1 HDmalloc succeeded");
+ data_orig = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE));
+ VRFY((data_orig != NULL), "data_origin1 malloc succeeded");
+ data_read = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE));
+ VRFY((data_read != NULL), "data_array1 malloc succeeded");
/* Initialize data buffers */
for (u = 0; u < dim; u++)
@@ -2599,8 +2599,8 @@ compress_readAll(void)
/* Verify data read */
for (u = 0; u < dim; u++)
if (data_orig[u] != data_read[u]) {
- HDprintf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__,
- (unsigned)u, data_orig[u], (unsigned)u, data_read[u]);
+ printf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__,
+ (unsigned)u, data_orig[u], (unsigned)u, data_read[u]);
nerrors++;
}
@@ -2622,9 +2622,9 @@ compress_readAll(void)
/* release data buffers */
if (data_read)
- HDfree(data_read);
+ free(data_read);
if (data_orig)
- HDfree(data_orig);
+ free(data_orig);
}
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2671,7 +2671,7 @@ none_selection_chunk(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -2702,7 +2702,7 @@ none_selection_chunk(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims);
@@ -2735,11 +2735,11 @@ none_selection_chunk(void)
/* allocate memory for data buffer. Only allocate enough buffer for
* each processor's data. */
if (mpi_rank) {
- data_origin = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE));
- VRFY((data_origin != NULL), "data_origin HDmalloc succeeded");
+ data_origin = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE));
+ VRFY((data_origin != NULL), "data_origin malloc succeeded");
- data_array = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* put some trivial data in the data_array */
mstart[0] = mstart[1] = 0;
@@ -2834,9 +2834,9 @@ none_selection_chunk(void)
/* release data buffers */
if (data_origin)
- HDfree(data_origin);
+ free(data_origin);
if (data_array)
- HDfree(data_array);
+ free(data_array);
}
/* Function: test_actual_io_mode
@@ -2966,13 +2966,13 @@ test_actual_io_mode(int selection_mode)
MPI_Barrier(MPI_COMM_WORLD);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = MPI_COMM_WORLD;
mpi_info = MPI_INFO_NULL;
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* Setup the file access template */
fapl = create_faccess_plist(mpi_comm, mpi_info, facc_type);
@@ -3183,8 +3183,8 @@ test_actual_io_mode(int selection_mode)
length = dim0 * dim1;
/* Allocate and initialize the buffer */
- buffer = (int *)HDmalloc(sizeof(int) * (size_t)length);
- VRFY((buffer != NULL), "HDmalloc of buffer succeeded");
+ buffer = (int *)malloc(sizeof(int) * (size_t)length);
+ VRFY((buffer != NULL), "malloc of buffer succeeded");
for (i = 0; i < length; i++)
buffer[i] = i;
@@ -3268,8 +3268,8 @@ test_actual_io_mode(int selection_mode)
VRFY((actual_io_mode_write == actual_io_mode_expected), message);
}
else {
- HDfprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write,
- actual_io_mode_write);
+ fprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write,
+ actual_io_mode_write);
}
/* To test that the property is successfully reset to the default, we perform some
@@ -3334,7 +3334,7 @@ test_actual_io_mode(int selection_mode)
VRFY((ret >= 0), "H5Sclose succeeded");
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
- HDfree(buffer);
+ free(buffer);
return;
}
@@ -3381,7 +3381,7 @@ actual_io_mode_tests(void)
if (mpi_size > 2)
test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX);
else
- HDfprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n");
+ fprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n");
test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE);
@@ -3490,7 +3490,7 @@ test_no_collective_cause_mode(int selection_mode)
MPI_Barrier(MPI_COMM_WORLD);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = MPI_COMM_WORLD;
mpi_info = MPI_INFO_NULL;
@@ -3532,7 +3532,7 @@ test_no_collective_cause_mode(int selection_mode)
}
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* Setup the file access template */
fapl = create_faccess_plist(mpi_comm, mpi_info, l_facc_type);
@@ -3647,8 +3647,8 @@ test_no_collective_cause_mode(int selection_mode)
H5_CHECKED_ASSIGN(length, int, dims[0] * dims[1], uint64_t);
/* Allocate and initialize the buffer */
- buffer = (int *)HDmalloc(sizeof(int) * (size_t)length);
- VRFY((buffer != NULL), "HDmalloc of buffer succeeded");
+ buffer = (int *)malloc(sizeof(int) * (size_t)length);
+ VRFY((buffer != NULL), "malloc of buffer succeeded");
for (i = 0; i < length; i++)
buffer[i] = i;
@@ -3739,11 +3739,11 @@ test_no_collective_cause_mode(int selection_mode)
"reading and writing are the same for global cause of Broken Collective I/O");
/* Test values */
- HDmemset(message, 0, sizeof(message));
+ memset(message, 0, sizeof(message));
HDsnprintf(message, sizeof(message),
"Local cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message);
- HDmemset(message, 0, sizeof(message));
+ memset(message, 0, sizeof(message));
HDsnprintf(message, sizeof(message),
"Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message);
@@ -3767,7 +3767,7 @@ test_no_collective_cause_mode(int selection_mode)
H5Sclose(file_space);
if (fid)
H5Fclose(fid);
- HDfree(buffer);
+ free(buffer);
/* clean up external file */
if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL)
@@ -3849,11 +3849,11 @@ dataset_atomicity(void)
dim1 = 32;
filename = GetTestParameters();
if (facc_type != FACC_MPIO) {
- HDprintf("Atomicity tests will not work without the MPIO VFD\n");
+ printf("Atomicity tests will not work without the MPIO VFD\n");
return;
}
if (VERBOSE_MED)
- HDprintf("atomic writes to file %s\n", filename);
+ printf("atomic writes to file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -3861,11 +3861,11 @@ dataset_atomicity(void)
buf_size = dim0 * dim1;
/* allocate memory for data buffer */
- write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((write_buf != NULL), "write_buf HDcalloc succeeded");
+ write_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((write_buf != NULL), "write_buf calloc succeeded");
/* allocate memory for data buffer */
- read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((read_buf != NULL), "read_buf HDcalloc succeeded");
+ read_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((read_buf != NULL), "read_buf calloc succeeded");
/* setup file access template */
acc_tpl = create_faccess_plist(comm, info, facc_type);
@@ -3985,9 +3985,9 @@ dataset_atomicity(void)
j = 0;
k = 0;
for (i = 0; i < dim0; i++) {
- HDprintf("\n");
+ printf("\n");
for (j = 0; j < dim1; j++)
- HDprintf("%d ", read_buf[k++]);
+ printf("%d ", read_buf[k++]);
}
}
@@ -4001,8 +4001,8 @@ dataset_atomicity(void)
"Atomicity Test Failed Process %d: Value read should be 0 or 5\n");
for (i = 1; i < buf_size; i++) {
if (read_buf[i] != compare) {
- HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i,
- read_buf[i], compare);
+ printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i,
+ read_buf[i], compare);
nerrors++;
}
}
@@ -4013,20 +4013,20 @@ dataset_atomicity(void)
/* release data buffers */
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
/* open dataset2 (non-contiguous case) */
dataset2 = H5Dopen2(fid, DATASETNAME6, H5P_DEFAULT);
VRFY((dataset2 >= 0), "H5Dopen2 succeeded");
/* allocate memory for data buffer */
- write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((write_buf != NULL), "write_buf HDcalloc succeeded");
+ write_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((write_buf != NULL), "write_buf calloc succeeded");
/* allocate memory for data buffer */
- read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((read_buf != NULL), "read_buf HDcalloc succeeded");
+ read_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((read_buf != NULL), "read_buf calloc succeeded");
for (i = 0; i < buf_size; i++) {
write_buf[i] = 5;
@@ -4085,11 +4085,11 @@ dataset_atomicity(void)
j = 0;
k = 0;
for (i = 0; i < dim0; i++) {
- HDprintf("\n");
+ printf("\n");
for (j = 0; j < dim1; j++)
- HDprintf("%d ", read_buf[k++]);
+ printf("%d ", read_buf[k++]);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -4123,8 +4123,8 @@ dataset_atomicity(void)
continue;
}
else if (compare != read_buf[k]) {
- HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank,
- k, read_buf[k], compare);
+ printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank,
+ k, read_buf[k], compare);
nerrors++;
}
k++;
@@ -4141,9 +4141,9 @@ dataset_atomicity(void)
/* release data buffers */
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
@@ -4169,7 +4169,7 @@ test_dense_attr(void)
/* get filename */
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
diff --git a/testpar/t_file.c b/testpar/t_file.c
index 90ae22d..7568ba0 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -66,7 +66,7 @@ test_split_comm_access(void)
filename = (const char *)GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Split Communicator access test on file %s\n", filename);
+ printf("Split Communicator access test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -137,7 +137,7 @@ test_page_buffer_access(void)
filename = (const char *)GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Page Buffer Usage in Parallel %s\n", filename);
+ printf("Page Buffer Usage in Parallel %s\n", filename);
fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
VRFY((fapl >= 0), "create_faccess_plist succeeded");
@@ -178,7 +178,7 @@ test_page_buffer_access(void)
ret = H5Pset_file_space_page_size(fcpl, sizeof(int) * 100);
VRFY((ret == 0), "");
- data = (int *)HDmalloc(sizeof(int) * (size_t)num_elements);
+ data = (int *)malloc(sizeof(int) * (size_t)num_elements);
/* initialize all the elements to have a value of -1 */
for (i = 0; i < num_elements; i++)
@@ -427,7 +427,7 @@ test_page_buffer_access(void)
api_ctx_pushed = FALSE;
}
- HDfree(data);
+ free(data);
data = NULL;
MPI_Barrier(MPI_COMM_WORLD);
}
@@ -501,8 +501,8 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
num_elements = block[0] * block[1];
/* allocate memory for data buffer */
- data_array = (DATATYPE *)HDmalloc(num_elements * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(num_elements * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* put some trivial data in the data_array */
for (i = 0; i < num_elements; i++)
data_array[i] = mpi_rank + 1;
@@ -543,7 +543,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDmemset(data_array, 0, num_elements * sizeof(DATATYPE));
+ memset(data_array, 0, num_elements * sizeof(DATATYPE));
dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
@@ -584,7 +584,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
}
MPI_Barrier(MPI_COMM_WORLD);
- HDfree(data_array);
+ free(data_array);
return 0;
} /* create_file */
@@ -660,8 +660,8 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
num_elements = block[0] * block[1];
/* allocate memory for data buffer */
- data_array = (DATATYPE *)HDmalloc(num_elements * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(num_elements * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* create a memory dataspace independently */
mem_dataspace = H5Screate_simple(1, &num_elements, NULL);
@@ -713,8 +713,8 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->is_dirty == FALSE);
if (!entry_ptr->is_pinned && !entry_ptr->is_protected) {
ret = H5AC_expunge_entry(f, entry_ptr->type, entry_ptr->addr, 0);
@@ -747,7 +747,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
api_ctx_pushed = FALSE;
}
- HDfree(data_array);
+ free(data_array);
return nerrors;
}
diff --git a/testpar/t_file_image.c b/testpar/t_file_image.c
index 676978c..471494c 100644
--- a/testpar/t_file_image.c
+++ b/testpar/t_file_image.c
@@ -112,7 +112,7 @@ file_image_daisy_chain_test(void)
* to -1 everywhere else.
*/
- vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int));
+ vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int));
VRFY((vector_ptr != NULL), "allocated in memory representation of vector");
vector_ptr[0] = 0;
@@ -122,7 +122,7 @@ file_image_daisy_chain_test(void)
err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
VRFY((err >= 0), "wrote initial data to vector.");
- HDfree(vector_ptr);
+ free(vector_ptr);
vector_ptr = NULL;
/* 3) Flush the core file, and get an image of it. Close
@@ -134,7 +134,7 @@ file_image_daisy_chain_test(void)
image_len = H5Fget_file_image(file_id, NULL, (size_t)0);
VRFY((image_len > 0), "got image file size");
- image_ptr = (void *)HDmalloc((size_t)image_len);
+ image_ptr = (void *)malloc((size_t)image_len);
VRFY(image_ptr != NULL, "allocated file image buffer.");
bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len);
@@ -160,7 +160,7 @@ file_image_daisy_chain_test(void)
mpi_result = MPI_Ssend((void *)image_ptr, (int)image_len, MPI_BYTE, 1, 0, MPI_COMM_WORLD);
VRFY((mpi_result == MPI_SUCCESS), "sent image to process 1");
- HDfree(image_ptr);
+ free(image_ptr);
image_ptr = NULL;
image_len = 0;
@@ -170,7 +170,7 @@ file_image_daisy_chain_test(void)
MPI_COMM_WORLD, &rcvstat);
VRFY((mpi_result == MPI_SUCCESS), "received image len from process n-1");
- image_ptr = (void *)HDmalloc((size_t)image_len);
+ image_ptr = (void *)malloc((size_t)image_len);
VRFY(image_ptr != NULL, "allocated file image receive buffer.");
mpi_result =
@@ -212,7 +212,7 @@ file_image_daisy_chain_test(void)
VRFY((space_ndims == 1), "verified data space num dims(2)");
VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims");
- vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int));
+ vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int));
VRFY((vector_ptr != NULL), "allocated in memory rep of vector");
err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
@@ -224,7 +224,7 @@ file_image_daisy_chain_test(void)
vector_ok = FALSE;
VRFY((vector_ok), "verified received vector.");
- HDfree(vector_ptr);
+ free(vector_ptr);
vector_ptr = NULL;
/* 7) closes the core file and exit. */
@@ -241,7 +241,7 @@ file_image_daisy_chain_test(void)
err = H5Pclose(fapl_id);
VRFY((err >= 0), "closed fapl(1).");
- HDfree(image_ptr);
+ free(image_ptr);
image_ptr = NULL;
image_len = 0;
}
@@ -252,7 +252,7 @@ file_image_daisy_chain_test(void)
MPI_COMM_WORLD, &rcvstat);
VRFY((mpi_result == MPI_SUCCESS), "received image size from process mpi_rank-1");
- image_ptr = (void *)HDmalloc((size_t)image_len);
+ image_ptr = (void *)malloc((size_t)image_len);
VRFY(image_ptr != NULL, "allocated file image receive buffer.");
mpi_result =
@@ -295,7 +295,7 @@ file_image_daisy_chain_test(void)
VRFY((space_ndims == 1), "verified data space num dims(2)");
VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims");
- vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int));
+ vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int));
VRFY((vector_ptr != NULL), "allocated in memory rep of vector");
err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
@@ -321,7 +321,7 @@ file_image_daisy_chain_test(void)
err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
VRFY((err >= 0), "wrote modified data to vector.");
- HDfree(vector_ptr);
+ free(vector_ptr);
vector_ptr = NULL;
/* 4) Flush the core file and send it to process (mpi_rank + 1) % n. */
@@ -332,7 +332,7 @@ file_image_daisy_chain_test(void)
image_len = H5Fget_file_image(file_id, NULL, (size_t)0);
VRFY((image_len > 0), "got (possibly modified) image file len");
- image_ptr = (void *)HDrealloc((void *)image_ptr, (size_t)image_len);
+ image_ptr = (void *)realloc((void *)image_ptr, (size_t)image_len);
VRFY(image_ptr != NULL, "re-allocated file image buffer.");
bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len);
@@ -346,7 +346,7 @@ file_image_daisy_chain_test(void)
MPI_COMM_WORLD);
VRFY((mpi_result == MPI_SUCCESS), "sent image to process (mpi_rank + 1) % mpi_size");
- HDfree(image_ptr);
+ free(image_ptr);
image_ptr = NULL;
image_len = 0;
diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c
index 8895c15..aa0fcb1 100644
--- a/testpar/t_filter_read.c
+++ b/testpar/t_filter_read.c
@@ -80,11 +80,11 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size)
VRFY(sid >= 0, "H5Screate_simple");
/* Create buffers */
- points = (int *)HDmalloc(size[0] * size[1] * sizeof(int));
- VRFY(points != NULL, "HDmalloc");
+ points = (int *)malloc(size[0] * size[1] * sizeof(int));
+ VRFY(points != NULL, "malloc");
- check = (int *)HDmalloc(hs_size[0] * hs_size[1] * sizeof(int));
- VRFY(check != NULL, "HDmalloc");
+ check = (int *)malloc(hs_size[0] * hs_size[1] * sizeof(int));
+ VRFY(check != NULL, "malloc");
/* Initialize writing buffer with random data */
for (i = 0; i < size[0]; i++)
@@ -146,12 +146,11 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size)
for (i = 0; i < hs_size[0]; i++) {
for (j = 0; j < hs_size[1]; j++) {
if (points[i * size[1] + (size_t)hs_offset[1] + j] != check[i * hs_size[1] + j]) {
- HDfprintf(stderr, " Read different values than written.\n");
- HDfprintf(stderr, " At index %lu,%lu\n", (unsigned long)(i),
- (unsigned long)(hs_offset[1] + j));
- HDfprintf(stderr, " At original: %d\n",
- (int)points[i * size[1] + (size_t)hs_offset[1] + j]);
- HDfprintf(stderr, " At returned: %d\n", (int)check[i * hs_size[1] + j]);
+ fprintf(stderr, " Read different values than written.\n");
+ fprintf(stderr, " At index %lu,%lu\n", (unsigned long)(i),
+ (unsigned long)(hs_offset[1] + j));
+ fprintf(stderr, " At original: %d\n", (int)points[i * size[1] + (size_t)hs_offset[1] + j]);
+ fprintf(stderr, " At returned: %d\n", (int)check[i * hs_size[1] + j]);
VRFY(FALSE, "");
}
}
@@ -177,8 +176,8 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size)
hrc = H5Fclose(file);
VRFY(hrc >= 0, "H5Fclose");
- HDfree(points);
- HDfree(check);
+ free(points);
+ free(check);
MPI_Barrier(MPI_COMM_WORLD);
}
@@ -228,7 +227,7 @@ test_filter_read(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Parallel reading of dataset written with filters %s\n", filename);
+ printf("Parallel reading of dataset written with filters %s\n", filename);
/*----------------------------------------------------------
* STEP 0: Test without filters.
diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c
index 1593d15..e5f59d5 100644
--- a/testpar/t_filters_parallel.c
+++ b/testpar/t_filters_parallel.c
@@ -472,11 +472,11 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -491,11 +491,11 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil
(hsize_t)WRITE_ONE_CHUNK_FILTERED_DATASET_NCOLS * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -513,13 +513,13 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_ONE_CHUNK_FILTERED_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -527,12 +527,12 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -628,11 +628,11 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -646,11 +646,11 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -666,13 +666,13 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -680,12 +680,12 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -775,11 +775,11 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -793,11 +793,11 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -822,13 +822,13 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -836,12 +836,12 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -936,11 +936,11 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -954,11 +954,11 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -976,13 +976,13 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -990,12 +990,12 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1078,11 +1078,11 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- read_buf = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -1106,12 +1106,12 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group
start[1] = i * count[1] * block[1];
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
- block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
+ block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -1128,13 +1128,13 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group
dset_id = H5Dopen2(group_id, WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
- HDmemset(read_buf, 255, data_size);
+ memset(read_buf, 255, data_size);
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
/* Verify the correct data was written */
- VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
if (i < (size_t)WRITE_UNSHARED_ONE_UNLIM_DIM_NLOOPS - 1) {
/* Extend the dataset by count[1] chunks in the extensible dimension */
@@ -1149,9 +1149,9 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group
}
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1232,11 +1232,11 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- read_buf = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -1259,12 +1259,12 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H
start[1] = i * count[1] * block[1];
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
- block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
+ block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -1281,13 +1281,13 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H
dset_id = H5Dopen2(group_id, WRITE_SHARED_ONE_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
- HDmemset(read_buf, 255, data_size);
+ memset(read_buf, 255, data_size);
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
/* Verify correct data was written */
- VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
if (i < (size_t)WRITE_SHARED_ONE_UNLIM_DIM_NLOOPS - 1) {
/* Extend the dataset by count[1] chunks in the extensible dimension */
@@ -1302,9 +1302,9 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H
}
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1395,12 +1395,12 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group,
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- tmp_realloc = (C_DATATYPE *)HDrealloc(data, data_size);
- VRFY((NULL != tmp_realloc), "HDrealloc succeeded");
+ tmp_realloc = (C_DATATYPE *)realloc(data, data_size);
+ VRFY((NULL != tmp_realloc), "realloc succeeded");
data = tmp_realloc;
- tmp_realloc = (C_DATATYPE *)HDrealloc(read_buf, data_size);
- VRFY((NULL != tmp_realloc), "HDrealloc succeeded");
+ tmp_realloc = (C_DATATYPE *)realloc(read_buf, data_size);
+ VRFY((NULL != tmp_realloc), "realloc succeeded");
read_buf = tmp_realloc;
for (j = 0; j < data_size / sizeof(*data); j++)
@@ -1423,12 +1423,12 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group,
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
- block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
+ block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -1445,13 +1445,13 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group,
dset_id = H5Dopen2(group_id, WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
- HDmemset(read_buf, 255, data_size);
+ memset(read_buf, 255, data_size);
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
/* Verify the correct data was written */
- VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
if (i < (size_t)WRITE_UNSHARED_TWO_UNLIM_DIM_NLOOPS - 1) {
/*
@@ -1471,9 +1471,9 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group,
}
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1562,12 +1562,12 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- tmp_realloc = (C_DATATYPE *)HDrealloc(data, data_size);
- VRFY((NULL != tmp_realloc), "HDrealloc succeeded");
+ tmp_realloc = (C_DATATYPE *)realloc(data, data_size);
+ VRFY((NULL != tmp_realloc), "realloc succeeded");
data = tmp_realloc;
- tmp_realloc = (C_DATATYPE *)HDrealloc(read_buf, data_size);
- VRFY((NULL != tmp_realloc), "HDrealloc succeeded");
+ tmp_realloc = (C_DATATYPE *)realloc(read_buf, data_size);
+ VRFY((NULL != tmp_realloc), "realloc succeeded");
read_buf = tmp_realloc;
for (j = 0; j < data_size / sizeof(*data); j++)
@@ -1590,12 +1590,12 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
- block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
+ block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -1612,13 +1612,13 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5
dset_id = H5Dopen2(group_id, WRITE_SHARED_TWO_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
- HDmemset(read_buf, 255, data_size);
+ memset(read_buf, 255, data_size);
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
/* Verify correct data was written */
- VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
if (i < (size_t)WRITE_SHARED_TWO_UNLIM_DIM_NLOOPS - 1) {
/* Extend the dataset by the size of a chunk in each extensible dimension */
@@ -1634,9 +1634,9 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5
}
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1737,11 +1737,11 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -1759,15 +1759,15 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
if (mpi_rank != WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) {
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
}
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
@@ -1775,9 +1775,8 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
/* Compute the correct offset into the buffer for the process having no selection and clear it */
segment_length = dataset_dims[0] * dataset_dims[1] / (hsize_t)mpi_size;
- HDmemset(correct_buf +
- ((size_t)WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length),
- 0, segment_length * sizeof(*data));
+ memset(correct_buf + ((size_t)WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length),
+ 0, segment_length * sizeof(*data));
VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
"Dataset write succeeded");
@@ -1786,13 +1785,13 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
verify_space_alloc_status(dset_id, plist_id, (mpi_size > 1 ? SOME_CHUNKS_WRITTEN : NO_CHUNKS_WRITTEN));
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -1800,12 +1799,12 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1895,11 +1894,11 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -1911,13 +1910,13 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte
verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -1925,12 +1924,12 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -2014,8 +2013,8 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter
num_points = (hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NROWS *
(hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NCOLS / (hsize_t)mpi_size;
- coords = (hsize_t *)HDcalloc(1, 2 * num_points * sizeof(*coords));
- VRFY((NULL != coords), "Coords HDcalloc succeeded");
+ coords = (hsize_t *)calloc(1, 2 * num_points * sizeof(*coords));
+ VRFY((NULL != coords), "Coords calloc succeeded");
for (i = 0; i < num_points; i++)
for (j = 0; j < WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++)
@@ -2031,11 +2030,11 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -2053,13 +2052,13 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -2067,14 +2066,14 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (coords)
- HDfree(coords);
+ free(coords);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -2173,11 +2172,11 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -2191,11 +2190,11 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -2221,13 +2220,13 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, INTERLEAVED_WRITE_FILTERED_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -2235,12 +2234,12 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -2344,11 +2343,11 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -2362,11 +2361,11 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -2386,13 +2385,13 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
"Dataset write succeeded");
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -2400,7 +2399,7 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, plist_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
@@ -2410,9 +2409,9 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -2515,13 +2514,13 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou
start[2] = (hsize_t)mpi_rank;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE
- ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ]\n",
- mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1],
- start[2], block[0], block[1], block[2]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE
+ ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ " ]\n",
+ mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1],
+ start[2], block[0], block[1], block[2]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -2535,11 +2534,11 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou
data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -2554,13 +2553,13 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -2568,12 +2567,12 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -2677,13 +2676,13 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H
start[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE
- ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ]\n",
- mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1],
- start[2], block[0], block[1], block[2]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE
+ ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ " ]\n",
+ mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1],
+ start[2], block[0], block[1], block[2]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -2697,11 +2696,11 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H
data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -2717,13 +2716,13 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -2731,12 +2730,12 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -2838,13 +2837,13 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi
start[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE
- ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ]\n",
- mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1],
- start[2], block[0], block[1], block[2]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE
+ ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ " ]\n",
+ mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1],
+ start[2], block[0], block[1], block[2]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -2858,11 +2857,11 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi
data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data);
correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -2892,13 +2891,13 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
@@ -2906,12 +2905,12 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -3028,11 +3027,11 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group
start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -3042,14 +3041,14 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
"Hyperslab selection succeeded");
- data = (COMPOUND_C_DATATYPE *)HDcalloc(
+ data = (COMPOUND_C_DATATYPE *)calloc(
1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC * sizeof(*data));
- VRFY((NULL != data), "HDcalloc succeeded");
+ VRFY((NULL != data), "calloc succeeded");
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
/* Fill data buffer */
for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC; i++) {
@@ -3072,13 +3071,13 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id =
H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT);
@@ -3086,12 +3085,12 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group
VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -3209,11 +3208,11 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -3223,14 +3222,14 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
"Hyperslab selection succeeded");
- data = (COMPOUND_C_DATATYPE *)HDcalloc(
+ data = (COMPOUND_C_DATATYPE *)calloc(
1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC * sizeof(*data));
- VRFY((NULL != data), "HDcalloc succeeded");
+ VRFY((NULL != data), "calloc succeeded");
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
/* Fill data buffer */
for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC; i++) {
@@ -3259,13 +3258,13 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id =
H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT);
@@ -3273,12 +3272,12 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -3416,11 +3415,11 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro
start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -3430,14 +3429,14 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
"Hyperslab selection succeeded");
- data = (COMPOUND_C_DATATYPE *)HDcalloc(
+ data = (COMPOUND_C_DATATYPE *)calloc(
1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC * sizeof(*data));
- VRFY((NULL != data), "HDcalloc succeeded");
+ VRFY((NULL != data), "calloc succeeded");
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
/* Fill data buffer */
for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC; i++) {
@@ -3457,13 +3456,13 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro
verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
/* Verify that no data was written */
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id =
H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT);
@@ -3471,12 +3470,12 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro
VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -3615,11 +3614,11 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -3629,14 +3628,14 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
"Hyperslab selection succeeded");
- data = (COMPOUND_C_DATATYPE *)HDcalloc(
+ data = (COMPOUND_C_DATATYPE *)calloc(
1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC * sizeof(*data));
- VRFY((NULL != data), "HDcalloc succeeded");
+ VRFY((NULL != data), "calloc succeeded");
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
/* Fill data buffer */
for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC; i++) {
@@ -3656,13 +3655,13 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group
verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
/* Verify that no data was written */
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
dset_id =
H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT);
@@ -3670,12 +3669,12 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group
VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -3733,8 +3732,8 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] = ((C_DATATYPE)i % (READ_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size *
@@ -3831,11 +3830,11 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -3843,24 +3842,24 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
recvcounts[i] = (int)flat_dims[0];
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
displs[i] = (int)(i * flat_dims[0]);
@@ -3869,18 +3868,18 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
displs, C_DATATYPE_MPI, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -3935,8 +3934,8 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
correct_buf_size = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NROWS *
(hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NCOLS * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
@@ -4031,11 +4030,11 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -4043,24 +4042,24 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
recvcounts[i] = (int)flat_dims[0];
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
displs[i] = (int)(i * flat_dims[0]);
@@ -4069,18 +4068,18 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
displs, C_DATATYPE_MPI, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -4135,8 +4134,8 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] =
@@ -4233,11 +4232,11 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -4245,14 +4244,14 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/*
* Since these chunks are shared, run multiple rounds of MPI_Allgatherv
@@ -4264,11 +4263,11 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
size_t loop_count = count[0];
size_t total_recvcounts = 0;
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)dataset_dims[1];
@@ -4287,18 +4286,18 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
}
}
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -4354,8 +4353,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
@@ -4363,8 +4362,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
/* Compute the correct offset into the buffer for the process having no selection and clear it */
segment_length = dataset_dims[0] * dataset_dims[1] / (hsize_t)mpi_size;
- HDmemset(correct_buf + ((size_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length),
- 0, segment_length * sizeof(*correct_buf));
+ memset(correct_buf + ((size_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length),
+ 0, segment_length * sizeof(*correct_buf));
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -4460,11 +4459,11 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
if (mpi_rank == READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC)
@@ -4475,8 +4474,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
if (mpi_rank == READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) {
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, NULL) >= 0),
@@ -4487,20 +4486,20 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
"Dataset read succeeded");
}
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
recvcounts[i] = (int)(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS *
READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NCOLS);
recvcounts[READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC] = 0;
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
displs[i] = (int)(i * (size_t)(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS *
@@ -4515,18 +4514,18 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
recvcounts, displs, C_DATATYPE_MPI, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -4574,8 +4573,8 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -4652,18 +4651,18 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter
read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -4716,8 +4715,8 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] =
@@ -4802,8 +4801,8 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
num_points = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NROWS *
(hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NCOLS / (hsize_t)mpi_size;
- coords = (hsize_t *)HDcalloc(1, 2 * num_points * sizeof(*coords));
- VRFY((NULL != coords), "Coords HDcalloc succeeded");
+ coords = (hsize_t *)calloc(1, 2 * num_points * sizeof(*coords));
+ VRFY((NULL != coords), "Coords calloc succeeded");
for (i = 0; i < num_points; i++)
for (j = 0; j < READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++)
@@ -4817,14 +4816,14 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/*
* Since these chunks are shared, run multiple rounds of MPI_Allgatherv
@@ -4837,11 +4836,11 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
size_t cur_loop_count = original_loop_count;
size_t total_recvcounts = 0;
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)dataset_dims[1];
@@ -4861,20 +4860,20 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
}
}
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
- HDfree(coords);
+ free(coords);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -4932,8 +4931,8 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
/* Add Column Index */
@@ -5040,11 +5039,11 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -5052,14 +5051,14 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/*
* Since these chunks are shared, run multiple rounds of MPI_Allgatherv
@@ -5071,11 +5070,11 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
size_t loop_count = count[0];
size_t total_recvcounts = 0;
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)dataset_dims[1];
@@ -5094,18 +5093,18 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
}
}
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -5161,8 +5160,8 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] = (C_DATATYPE)((i % (hsize_t)mpi_size) + (i / (hsize_t)mpi_size));
@@ -5266,11 +5265,11 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
start[2] = (hsize_t)mpi_rank;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -5278,14 +5277,14 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/*
* Due to the nature of 3-dimensional reading, create an MPI vector type that allows each
@@ -5307,17 +5306,17 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
resized_vector_type, comm)),
"MPI_Allgather succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
VRFY((MPI_SUCCESS == MPI_Type_free(&vector_type)), "MPI_Type_free succeeded");
VRFY((MPI_SUCCESS == MPI_Type_free(&resized_vector_type)), "MPI_Type_free succeeded");
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -5380,8 +5379,8 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
correct_buf_size = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NROWS *
(hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NCOLS * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
@@ -5491,11 +5490,11 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -5510,24 +5509,24 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, plist_id, read_buf) >= 0),
"Dataset read succeeded");
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
recvcounts[i] = (int)flat_dims[0];
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
displs[i] = (int)(i * flat_dims[0]);
@@ -5536,18 +5535,18 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
displs, C_DATATYPE_MPI, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -5605,8 +5604,8 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] * dataset_dims[1])) +
@@ -5710,11 +5709,11 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
start[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -5722,24 +5721,24 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
recvcounts[i] = (int)flat_dims[0];
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
displs[i] = (int)(i * flat_dims[0]);
@@ -5748,18 +5747,18 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
displs, C_DATATYPE_MPI, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -5816,8 +5815,8 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
/* Add the Column Index */
@@ -5932,11 +5931,11 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
start[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -5944,14 +5943,14 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
{
size_t run_length =
@@ -5982,17 +5981,17 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
resized_vector_type, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
VRFY((MPI_SUCCESS == MPI_Type_free(&vector_type)), "MPI_Type_free succeeded");
VRFY((MPI_SUCCESS == MPI_Type_free(&resized_vector_type)), "MPI_Type_free succeeded");
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -6056,8 +6055,8 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
correct_buf[i].field1 = (short)((i % dataset_dims[1]) + (i / dataset_dims[1]));
@@ -6170,11 +6169,11 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -6182,23 +6181,23 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
- global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf));
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf));
@@ -6207,18 +6206,18 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
global_buf, recvcounts, displs, MPI_BYTE, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -6283,8 +6282,8 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
correct_buf[i].field1 =
@@ -6403,11 +6402,11 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -6415,23 +6414,23 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
- global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf));
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf));
@@ -6440,18 +6439,18 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
global_buf, recvcounts, displs, MPI_BYTE, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -6516,8 +6515,8 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
correct_buf[i].field1 = (short)((i % dataset_dims[1]) + (i / dataset_dims[1]));
@@ -6638,11 +6637,11 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -6650,23 +6649,23 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
- global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf));
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf));
@@ -6675,18 +6674,18 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
global_buf, recvcounts, displs, MPI_BYTE, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -6752,8 +6751,8 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
/* Setup the buffer for writing and for comparison */
correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
- correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
correct_buf[i].field1 =
@@ -6880,11 +6879,11 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -6892,23 +6891,23 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
read_buf_size = flat_dims[0] * sizeof(*read_buf);
- read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
- global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "HDcalloc succeeded");
+ global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf));
- displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++)
displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf));
@@ -6917,18 +6916,18 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
global_buf, recvcounts, displs, MPI_BYTE, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (global_buf)
- HDfree(global_buf);
+ free(global_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7017,8 +7016,8 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id
data_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*data);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -7030,7 +7029,7 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -7040,11 +7039,11 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id
correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] = (long)i;
@@ -7062,12 +7061,12 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
@@ -7168,13 +7167,13 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
offset[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], offset[ %" PRIuHSIZE
- ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ]\n",
- mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], offset[0],
- offset[1], offset[2], block[0], block[1], block[2]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], offset[ %" PRIuHSIZE
+ ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ " ]\n",
+ mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], offset[0], offset[1],
+ offset[2], block[0], block[1], block[2]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -7187,8 +7186,8 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -7200,7 +7199,7 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7229,11 +7228,11 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
- correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
- read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] * dataset_dims[1])) +
@@ -7242,14 +7241,14 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
- HDfree(correct_buf);
- HDfree(read_buf);
+ free(correct_buf);
+ free(read_buf);
}
return;
@@ -7337,11 +7336,11 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id,
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -7353,16 +7352,16 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id,
data_size = sel_dims[0] * sel_dims[1] * sizeof(double);
- data = (double *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (double *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- read_buf = (double *)HDcalloc(1, data_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (double *)calloc(1, data_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
for (i = 0; i < SHRINKING_GROWING_CHUNKS_NLOOPS; i++) {
/* Continually write random float data, followed by zeroed-out data */
if (i % 2)
- HDmemset(data, 0, data_size);
+ memset(data, 0, data_size);
else {
size_t j;
for (j = 0; j < data_size / sizeof(*data); j++) {
@@ -7377,22 +7376,22 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id,
verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
if (i % 2) {
- HDmemset(read_buf, 255, data_size);
+ memset(read_buf, 255, data_size);
}
else {
- HDmemset(read_buf, 0, data_size);
+ memset(read_buf, 0, data_size);
}
VRFY((H5Dread(dset_id, H5T_NATIVE_DOUBLE, memspace, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, data, data_size)), "data verification succeeded");
+ VRFY((0 == memcmp(read_buf, data, data_size)), "data verification succeeded");
}
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (data)
- HDfree(data);
+ free(data);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -7485,11 +7484,11 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
(hsize_t)(WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -7502,11 +7501,11 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- read_buf = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -7526,7 +7525,7 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -7559,11 +7558,11 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
(hsize_t)(WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -7585,17 +7584,17 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
- HDmemset(read_buf, 255, data_size);
+ memset(read_buf, 255, data_size);
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7688,11 +7687,11 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
(hsize_t)(WRITE_SHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_SHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -7705,11 +7704,11 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
- read_buf = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -7729,7 +7728,7 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -7763,11 +7762,11 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
(hsize_t)(WRITE_SHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_SHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -7789,17 +7788,17 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
- HDmemset(read_buf, 255, data_size);
+ memset(read_buf, 255, data_size);
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
"Dataset read succeeded");
- VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7901,11 +7900,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
/* Allocate buffer for reading entire dataset */
read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf);
- read_buf = HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
- correct_buf = HDcalloc(1, read_buf_size);
- VRFY((NULL != correct_buf), "HDcalloc succeeded");
+ correct_buf = calloc(1, read_buf_size);
+ VRFY((NULL != correct_buf), "calloc succeeded");
/* Read entire dataset and verify that the fill value is returned */
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
@@ -7914,7 +7913,7 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
for (i = 0; i < read_buf_size / sizeof(*read_buf); i++)
correct_buf[i] = FILL_VALUES_TEST_FILL_VAL;
- VRFY((0 == HDmemcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
/*
* Write to part of the first chunk in the dataset with
@@ -7933,11 +7932,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -7950,8 +7949,8 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -7975,11 +7974,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
* Each MPI rank communicates their written piece of data
* into each other rank's correctness-checking buffer
*/
- recvcounts = HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
- displs = HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)(count[1] * block[1]);
@@ -7990,7 +7989,7 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
displs, C_DATATYPE_MPI, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
/*
* Write to whole dataset and ensure fill value isn't returned
@@ -8010,11 +8009,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -8062,7 +8061,7 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
for (i = 0; i < read_buf_size / sizeof(*read_buf); i++)
correct_buf[i] = FILL_VALUES_TEST_FILL_VAL;
- VRFY((0 == HDmemcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
/*
* Write to part of the first chunk in the dataset with
@@ -8081,11 +8080,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -8126,7 +8125,7 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
displs, C_DATATYPE_MPI, comm)),
"MPI_Allgatherv succeeded");
- VRFY((0 == HDmemcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
/*
* Write to whole dataset and ensure fill value isn't returned
@@ -8146,11 +8145,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -8175,15 +8174,15 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
VRFY((read_buf[i] != FILL_VALUES_TEST_FILL_VAL), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (correct_buf)
- HDfree(correct_buf);
+ free(correct_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -8264,8 +8263,8 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
/* Allocate buffer for reading entire dataset */
read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf);
- read_buf = HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
/*
* Read entire dataset - nothing to verify since there's no fill value.
@@ -8300,11 +8299,11 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -8317,8 +8316,8 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -8355,11 +8354,11 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -8381,9 +8380,9 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
"Dataset read succeeded");
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -8487,11 +8486,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
/* Allocate buffer for reading entire dataset */
read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf);
- read_buf = HDcalloc(1, read_buf_size);
- VRFY((NULL != read_buf), "HDcalloc succeeded");
+ read_buf = calloc(1, read_buf_size);
+ VRFY((NULL != read_buf), "calloc succeeded");
- fill_buf = HDcalloc(1, read_buf_size);
- VRFY((NULL != fill_buf), "HDcalloc succeeded");
+ fill_buf = calloc(1, read_buf_size);
+ VRFY((NULL != fill_buf), "calloc succeeded");
/* Read entire dataset and verify that the fill value isn't returned */
VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
@@ -8505,7 +8504,7 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
* values to all be the fill value, so this should be
* a safe comparison in theory.
*/
- VRFY((0 != HDmemcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded");
+ VRFY((0 != memcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded");
/*
* Write to part of the first chunk in the dataset with
@@ -8524,11 +8523,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
/* Select hyperslab in the file */
@@ -8541,8 +8540,8 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
/* Fill data buffer */
data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- data = (C_DATATYPE *)HDcalloc(1, data_size);
- VRFY((NULL != data), "HDcalloc succeeded");
+ data = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != data), "calloc succeeded");
for (i = 0; i < data_size / sizeof(*data); i++)
data[i] = (C_DATATYPE)GEN_DATA(i);
@@ -8566,11 +8565,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
* Each MPI rank communicates their written piece of data
* into each other rank's correctness-checking buffer
*/
- recvcounts = HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "HDcalloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
- displs = HDcalloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "HDcalloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
for (i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)(count[1] * block[1]);
@@ -8586,7 +8585,7 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
* values to all be the fill value, so this should be
* a safe comparison in theory.
*/
- VRFY((0 != HDmemcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded");
+ VRFY((0 != memcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded");
/*
* Write to whole dataset and ensure fill value isn't returned
@@ -8606,11 +8605,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- HDfflush(stdout);
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
}
VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
@@ -8635,15 +8634,15 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
VRFY((read_buf[i] != FILL_TIME_NEVER_TEST_FILL_VAL), "Data verification succeeded");
if (displs)
- HDfree(displs);
+ free(displs);
if (recvcounts)
- HDfree(recvcounts);
+ free(recvcounts);
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
if (fill_buf)
- HDfree(fill_buf);
+ free(fill_buf);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -8675,8 +8674,8 @@ main(int argc, char **argv)
if (mpi_size <= 0) {
if (MAINPROCESS) {
- HDprintf("The Parallel Filters tests require at least 1 rank.\n");
- HDprintf("Quitting...\n");
+ printf("The Parallel Filters tests require at least 1 rank.\n");
+ printf("Quitting...\n");
}
MPI_Abort(MPI_COMM_WORLD, 1);
@@ -8684,16 +8683,16 @@ main(int argc, char **argv)
if (H5dont_atexit() < 0) {
if (MAINPROCESS) {
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ printf("Failed to turn off atexit processing. Continue.\n");
}
}
H5open();
if (MAINPROCESS) {
- HDprintf("==========================\n");
- HDprintf(" Parallel Filters tests\n");
- HDprintf("==========================\n\n");
+ printf("==========================\n");
+ printf(" Parallel Filters tests\n");
+ printf("==========================\n\n");
}
if (VERBOSE_MED)
@@ -8779,10 +8778,10 @@ main(int argc, char **argv)
}
if (MAINPROCESS)
- HDprintf("== Running tests with filter '%s' using '%s' and '%s' allocation time ==\n\n",
- filterNames[cur_filter_idx],
- H5FD_MPIO_CHUNK_ONE_IO == chunk_opt ? "Linked-Chunk I/O" : "Multi-Chunk I/O",
- alloc_time);
+ printf("== Running tests with filter '%s' using '%s' and '%s' allocation time ==\n\n",
+ filterNames[cur_filter_idx],
+ H5FD_MPIO_CHUNK_ONE_IO == chunk_opt ? "Linked-Chunk I/O" : "Multi-Chunk I/O",
+ alloc_time);
/* Make sure current filter is available before testing with it */
filter_avail = H5Zfilter_avail(cur_filter);
@@ -8790,8 +8789,8 @@ main(int argc, char **argv)
if (!filter_avail) {
if (MAINPROCESS)
- HDprintf(" ** SKIPPED tests with filter '%s' - filter unavailable **\n\n",
- filterNames[cur_filter_idx]);
+ printf(" ** SKIPPED tests with filter '%s' - filter unavailable **\n\n",
+ filterNames[cur_filter_idx]);
continue;
}
@@ -8801,8 +8800,8 @@ main(int argc, char **argv)
/* Determine if filter is encode-enabled */
if (0 == (filter_config & H5Z_FILTER_CONFIG_ENCODE_ENABLED)) {
if (MAINPROCESS)
- HDprintf(" ** SKIPPED tests with filter '%s' - filter not encode-enabled **\n\n",
- filterNames[cur_filter_idx]);
+ printf(" ** SKIPPED tests with filter '%s' - filter not encode-enabled **\n\n",
+ filterNames[cur_filter_idx]);
continue;
}
@@ -8867,7 +8866,7 @@ main(int argc, char **argv)
exit:
if (nerrors)
if (MAINPROCESS)
- HDprintf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : "");
TestAlarmOff();
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index 7cdfecf..bc6305e 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -156,8 +156,8 @@ multiple_dset_write(void)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
- outme = HDmalloc((size_t)size * (size_t)size * sizeof(double));
- VRFY((outme != NULL), "HDmalloc succeeded for outme");
+ outme = malloc((size_t)size * (size_t)size * sizeof(double));
+ VRFY((outme != NULL), "malloc succeeded for outme");
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
VRFY((plist >= 0), "create_faccess_plist succeeded");
@@ -196,7 +196,7 @@ multiple_dset_write(void)
H5Dclose(dataset);
#ifdef BARRIER_CHECKS
if (!((n + 1) % 10)) {
- HDprintf("created %d datasets\n", n + 1);
+ printf("created %d datasets\n", n + 1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
@@ -207,7 +207,7 @@ multiple_dset_write(void)
H5Pclose(dcpl);
H5Fclose(iof);
- HDfree(outme);
+ free(outme);
}
/* Example of using PHDF5 to create, write, and read compact dataset.
@@ -235,11 +235,11 @@ compact_dataset(void)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
- outme = HDmalloc((size_t)((size_t)size * (size_t)size * sizeof(double)));
- VRFY((outme != NULL), "HDmalloc succeeded for outme");
+ outme = malloc((size_t)((size_t)size * (size_t)size * sizeof(double)));
+ VRFY((outme != NULL), "malloc succeeded for outme");
- inme = HDmalloc((size_t)size * (size_t)size * sizeof(double));
- VRFY((outme != NULL), "HDmalloc succeeded for inme");
+ inme = malloc((size_t)size * (size_t)size * sizeof(double));
+ VRFY((outme != NULL), "malloc succeeded for inme");
filename = GetTestParameters();
VRFY((mpi_size <= size), "mpi_size <= size");
@@ -326,15 +326,15 @@ compact_dataset(void)
for (j = 0; j < size; j++)
if (!H5_DBL_ABS_EQUAL(inme[(i * size) + j], outme[(i * size) + j]))
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j,
- outme[(i * size) + j], inme[(i * size) + j]);
+ printf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j,
+ outme[(i * size) + j], inme[(i * size) + j]);
H5Pclose(plist);
H5Pclose(dxpl);
H5Dclose(dataset);
H5Fclose(iof);
- HDfree(inme);
- HDfree(outme);
+ free(inme);
+ free(outme);
}
/*
@@ -602,10 +602,10 @@ dataset_fillvalue(void)
dset_size = dset_dims[0] * dset_dims[1] * dset_dims[2] * dset_dims[3];
/* Allocate space for the buffers */
- rdata = HDmalloc((size_t)(dset_size * sizeof(int)));
- VRFY((rdata != NULL), "HDcalloc succeeded for read buffer");
- wdata = HDmalloc((size_t)(dset_size * sizeof(int)));
- VRFY((wdata != NULL), "HDmalloc succeeded for write buffer");
+ rdata = malloc((size_t)(dset_size * sizeof(int)));
+ VRFY((rdata != NULL), "calloc succeeded for read buffer");
+ wdata = malloc((size_t)(dset_size * sizeof(int)));
+ VRFY((wdata != NULL), "malloc succeeded for write buffer");
fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
VRFY((fapl >= 0), "create_faccess_plist succeeded");
@@ -649,7 +649,7 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
/* set entire read buffer with the constant 2 */
- HDmemset(rdata, 2, (size_t)(dset_size * sizeof(int)));
+ memset(rdata, 2, (size_t)(dset_size * sizeof(int)));
/* Read the entire dataset back */
ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, rdata);
@@ -674,13 +674,13 @@ dataset_fillvalue(void)
for (l = 0; l < (int)dset_dims[3]; l++, trdata++)
if (*trdata != 0)
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf(
+ printf(
"Rank %d: Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n",
mpi_rank, i, j, k, l, *trdata);
if (err_num > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("Rank %d: [more errors ...]\n", mpi_rank);
+ printf("Rank %d: [more errors ...]\n", mpi_rank);
if (err_num) {
- HDprintf("Rank %d: %d errors found in check_value\n", mpi_rank, err_num);
+ printf("Rank %d: %d errors found in check_value\n", mpi_rank, err_num);
nerrors++;
}
}
@@ -739,7 +739,7 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
/* set entire read buffer with the constant 2 */
- HDmemset(rdata, 2, (size_t)(dset_size * sizeof(int)));
+ memset(rdata, 2, (size_t)(dset_size * sizeof(int)));
/* Read the entire dataset back */
ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, rdata);
@@ -766,19 +766,19 @@ dataset_fillvalue(void)
if (i < mpi_size) {
if (*twdata != *trdata)
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n",
- i, j, k, l, *twdata, *trdata);
+ printf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n",
+ i, j, k, l, *twdata, *trdata);
} /* end if */
else {
if (*trdata != 0)
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n",
- i, j, k, l, *trdata);
+ printf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i,
+ j, k, l, *trdata);
} /* end else */
if (err_num > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (err_num) {
- HDprintf("%d errors found in check_value\n", err_num);
+ printf("%d errors found in check_value\n", err_num);
nerrors++;
}
}
@@ -804,8 +804,8 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Pclose succeeded");
/* free the buffers */
- HDfree(rdata);
- HDfree(wdata);
+ free(rdata);
+ free(wdata);
}
/* combined cngrpw and ingrpr tests because ingrpr reads file created by cngrpw. */
@@ -847,8 +847,8 @@ collective_group_write(void)
chunk_size[0] = (hsize_t)(size / 2);
chunk_size[1] = (hsize_t)(size / 2);
- outme = HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((outme != NULL), "HDmalloc succeeded for outme");
+ outme = malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((outme != NULL), "malloc succeeded for outme");
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist);
@@ -900,7 +900,7 @@ collective_group_write(void)
#ifdef BARRIER_CHECKS
if (!((m + 1) % 10)) {
- HDprintf("created %d groups\n", m + 1);
+ printf("created %d groups\n", m + 1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
@@ -913,7 +913,7 @@ collective_group_write(void)
ret1 = H5Fclose(fid);
VRFY((ret1 == 0), "H5Fclose");
- HDfree(outme);
+ free(outme);
}
/* Let two sets of processes open and read different groups and chunked
@@ -971,11 +971,11 @@ group_dataset_read(hid_t fid, int mpi_rank, int m)
size = get_size();
- indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((indata != NULL), "HDmalloc succeeded for indata");
+ indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((indata != NULL), "malloc succeeded for indata");
- outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((outdata != NULL), "HDmalloc succeeded for outdata");
+ outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((outdata != NULL), "malloc succeeded for outdata");
/* open every group under root group. */
HDsnprintf(gname, sizeof(gname), "group%d", m);
@@ -1003,8 +1003,8 @@ group_dataset_read(hid_t fid, int mpi_rank, int m)
ret = H5Gclose(gid);
VRFY((ret == 0), "H5Gclose");
- HDfree(indata);
- HDfree(outdata);
+ free(indata);
+ free(outdata);
}
/*
@@ -1093,7 +1093,7 @@ multiple_group_write(void)
#ifdef BARRIER_CHECKS
if (!((m + 1) % 10)) {
- HDprintf("created %d groups\n", m + 1);
+ printf("created %d groups\n", m + 1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
@@ -1131,8 +1131,8 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
size = get_size();
- outme = HDmalloc((size_t)size * (size_t)size * sizeof(double));
- VRFY((outme != NULL), "HDmalloc succeeded for outme");
+ outme = malloc((size_t)size * (size_t)size * sizeof(double));
+ VRFY((outme != NULL), "malloc succeeded for outme");
for (n = 0; n < NDATASET; n++) {
HDsnprintf(dname, sizeof(dname), "dataset%d", n);
@@ -1150,7 +1150,7 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
H5Dclose(did);
}
- HDfree(outme);
+ free(outme);
}
/*
@@ -1168,7 +1168,7 @@ create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, int counter)
#ifdef BARRIER_CHECKS
if (!((counter + 1) % 10)) {
- HDprintf("created %dth child groups\n", counter + 1);
+ printf("created %dth child groups\n", counter + 1);
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
@@ -1277,11 +1277,11 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
size = get_size();
- indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((indata != NULL), "HDmalloc succeeded for indata");
+ indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((indata != NULL), "malloc succeeded for indata");
- outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE));
- VRFY((outdata != NULL), "HDmalloc succeeded for outdata");
+ outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE));
+ VRFY((outdata != NULL), "malloc succeeded for outdata");
for (n = 0; n < NDATASET; n++) {
HDsnprintf(dname, sizeof(dname), "dataset%d", n);
@@ -1308,8 +1308,8 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
H5Dclose(did);
}
- HDfree(indata);
- HDfree(outdata);
+ free(indata);
+ free(outdata);
return vrfy_errors;
}
@@ -1429,14 +1429,14 @@ check_value(DATATYPE *indata, DATATYPE *outdata, int size)
for (j = chunk_origin[1]; j < (chunk_origin[1] + chunk_dims[1]); j++) {
if (*indata != *outdata)
if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col%lu): expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)i, (unsigned long)j, *outdata,
- *indata);
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col%lu): expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)i, (unsigned long)j, *outdata,
+ *indata);
}
if (err_num > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (err_num)
- HDprintf("%d errors found in check_value\n", err_num);
+ printf("%d errors found in check_value\n", err_num);
return err_num;
}
@@ -1531,7 +1531,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id != -1), "H5Pcreate() failed");
@@ -1544,7 +1544,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating new file.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Creating new file.\n", mpi_rank, fcn_name);
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist_id);
VRFY((file_id >= 0), "H5Fcreate() failed");
@@ -1557,7 +1557,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating the dataspace for the dataset.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Creating the dataspace for the dataset.\n", mpi_rank, fcn_name);
dimsf[0] = N;
filespace = H5Screate_simple(rank, dimsf, NULL);
@@ -1568,7 +1568,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating the dataset, and closing filespace.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Creating the dataset, and closing filespace.\n", mpi_rank, fcn_name);
dset_id =
H5Dcreate2(file_id, dataset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -1578,33 +1578,33 @@ io_mode_confusion(void)
VRFY((status >= 0), "H5Sclose() failed");
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Screate_simple().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Screate_simple().\n", mpi_rank, fcn_name);
memspace = H5Screate_simple(rank, dimsf, NULL);
VRFY((memspace >= 0), "H5Screate_simple() failed.");
if (mpi_rank == 0) {
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Sselect_all(memspace).\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Sselect_all(memspace).\n", mpi_rank, fcn_name);
status = H5Sselect_all(memspace);
VRFY((status >= 0), "H5Sselect_all() failed");
}
else {
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Sselect_none(memspace).\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Sselect_none(memspace).\n", mpi_rank, fcn_name);
status = H5Sselect_none(memspace);
VRFY((status >= 0), "H5Sselect_none() failed");
}
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name);
MPI_Barrier(MPI_COMM_WORLD);
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Dget_space().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Dget_space().\n", mpi_rank, fcn_name);
filespace = H5Dget_space(dset_id);
VRFY((filespace >= 0), "H5Dget_space() failed");
@@ -1612,32 +1612,32 @@ io_mode_confusion(void)
/* select all */
if (mpi_rank == 0) {
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Sselect_elements() -- set up hang?\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Sselect_elements() -- set up hang?\n", mpi_rank, fcn_name);
status = H5Sselect_elements(filespace, H5S_SELECT_SET, N, (const hsize_t *)&coord);
VRFY((status >= 0), "H5Sselect_elements() failed");
}
else { /* select nothing */
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Sselect_none().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Sselect_none().\n", mpi_rank, fcn_name);
status = H5Sselect_none(filespace);
VRFY((status >= 0), "H5Sselect_none() failed");
}
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name);
MPI_Barrier(MPI_COMM_WORLD);
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Pcreate().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Pcreate().\n", mpi_rank, fcn_name);
plist_id = H5Pcreate(H5P_DATASET_XFER);
VRFY((plist_id != -1), "H5Pcreate() failed");
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Pset_dxpl_mpio().\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Pset_dxpl_mpio().\n", mpi_rank, fcn_name);
status = H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_COLLECTIVE);
VRFY((status >= 0), "H5Pset_dxpl_mpio() failed");
@@ -1647,12 +1647,12 @@ io_mode_confusion(void)
}
if (verbose)
- HDfprintf(stdout, "%0d:%s: Calling H5Dwrite() -- hang here?.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Calling H5Dwrite() -- hang here?.\n", mpi_rank, fcn_name);
status = H5Dwrite(dset_id, H5T_NATIVE_INT, memspace, filespace, plist_id, data);
if (verbose)
- HDfprintf(stdout, "%0d:%s: Returned from H5Dwrite(), status=%d.\n", mpi_rank, fcn_name, status);
+ fprintf(stdout, "%0d:%s: Returned from H5Dwrite(), status=%d.\n", mpi_rank, fcn_name, status);
VRFY((status >= 0), "H5Dwrite() failed");
/*
@@ -1660,7 +1660,7 @@ io_mode_confusion(void)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Cleaning up from test.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Cleaning up from test.\n", mpi_rank, fcn_name);
status = H5Dclose(dset_id);
VRFY((status >= 0), "H5Dclose() failed");
@@ -1678,7 +1678,7 @@ io_mode_confusion(void)
VRFY((status >= 0), "H5Fclose() failed");
if (verbose)
- HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
return;
@@ -1775,7 +1775,7 @@ rr_obj_hdr_flush_confusion(void)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
- HDassert(mpi_size > 2);
+ assert(mpi_size > 2);
is_reader = mpi_rank % 2;
mrc = MPI_Comm_split(MPI_COMM_WORLD, is_reader, mpi_rank, &comm);
@@ -1795,7 +1795,7 @@ rr_obj_hdr_flush_confusion(void)
MPI_Comm_free(&comm);
if (verbose)
- HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
return;
@@ -1864,7 +1864,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id != -1), "H5Pcreate(H5P_FILE_ACCESS) failed");
@@ -1877,7 +1877,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating new file \"%s\".\n", mpi_rank, fcn_name, filename);
+ fprintf(stdout, "%0d:%s: Creating new file \"%s\".\n", mpi_rank, fcn_name, filename);
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
VRFY((file_id >= 0), "H5Fcreate() failed");
@@ -1890,7 +1890,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Creating the datasets.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Creating the datasets.\n", mpi_rank, fcn_name);
disk_size[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_size);
mem_size[0] = (hsize_t)(LOCAL_DATA_SIZE);
@@ -1911,7 +1911,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
VRFY((dxpl_id != -1), "H5Pcreate(H5P_DATASET_XFER) failed.\n");
@@ -1924,7 +1924,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Writing datasets.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Writing datasets.\n", mpi_rank, fcn_name);
disk_count[0] = (hsize_t)(LOCAL_DATA_SIZE);
disk_start[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_rank);
@@ -1953,7 +1953,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
err = H5Sclose(disk_space[i]);
@@ -1969,7 +1969,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(1) failed.\n");
@@ -1983,7 +1983,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: writing attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: writing attributes.\n", mpi_rank, fcn_name);
att_size[0] = (hsize_t)(LOCAL_DATA_SIZE);
for (j = 0; j < LOCAL_DATA_SIZE; j++) {
@@ -2008,7 +2008,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing attr ids and spaces .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing attr ids and spaces .\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
err = H5Sclose(att_space[i]);
@@ -2024,7 +2024,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(2) failed.\n");
@@ -2038,7 +2038,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: writing large attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: writing large attributes.\n", mpi_rank, fcn_name);
lg_att_size[0] = (hsize_t)(LARGE_ATTR_SIZE);
@@ -2072,7 +2072,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(3) failed.\n");
@@ -2086,7 +2086,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: writing different large attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: writing different large attributes.\n", mpi_rank, fcn_name);
for (j = 0; j < LARGE_ATTR_SIZE; j++) {
lg_att[j] = (double)(j + 2);
@@ -2106,7 +2106,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
* flush the metadata cache again
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name);
err = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((err >= 0), "H5Fflush(3) failed.\n");
@@ -2122,7 +2122,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing large attr ids and spaces .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing large attr ids and spaces .\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
@@ -2137,7 +2137,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing datasets .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing datasets .\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
err = H5Dclose(dataset[i]);
@@ -2149,7 +2149,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
err = H5Pclose(dxpl_id);
VRFY((err >= 0), "H5Pclose(dxpl_id) failed.\n");
@@ -2159,7 +2159,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing file.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing file.\n", mpi_rank, fcn_name);
err = H5Fclose(file_id);
VRFY((err >= 0), "H5Fclose(1) failed");
@@ -2176,7 +2176,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
VRFY((MPI_SUCCESS == mrc), "Reader_check failed");
if (verbose)
- HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
return;
@@ -2251,7 +2251,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name);
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id != -1), "H5Pcreate(H5P_FILE_ACCESS) failed");
@@ -2263,7 +2263,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Re-open file \"%s\".\n", mpi_rank, fcn_name, filename);
+ fprintf(stdout, "%0d:%s: Re-open file \"%s\".\n", mpi_rank, fcn_name, filename);
file_id = H5Fopen(filename, H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "H5Fopen() failed");
@@ -2277,7 +2277,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*=====================================================*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: opening the datasets.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: opening the datasets.\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
dataset[i] = -1;
@@ -2295,7 +2295,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name);
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
VRFY((dxpl_id != -1), "H5Pcreate(H5P_DATASET_XFER) failed.\n");
@@ -2307,7 +2307,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: Reading datasets.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Reading datasets.\n", mpi_rank, fcn_name);
disk_count[0] = (hsize_t)(LOCAL_DATA_SIZE);
disk_start[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_rank);
@@ -2337,10 +2337,10 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* compare read data with expected data */
for (j = 0; j < LOCAL_DATA_SIZE; j++)
if (!H5_DBL_ABS_EQUAL(data_read[j], data[j])) {
- HDfprintf(stdout,
- "%0d:%s: Reading datasets value failed in "
- "Dataset %d, at position %d: expect %f, got %f.\n",
- mpi_rank, fcn_name, i, j, data[j], data_read[j]);
+ fprintf(stdout,
+ "%0d:%s: Reading datasets value failed in "
+ "Dataset %d, at position %d: expect %f, got %f.\n",
+ mpi_rank, fcn_name, i, j, data[j], data_read[j]);
nerrors++;
}
for (j = 0; j < LOCAL_DATA_SIZE; j++)
@@ -2352,7 +2352,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
err = H5Sclose(disk_space[i]);
@@ -2372,7 +2372,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
if (steps >= 2) {
if (verbose)
- HDfprintf(stdout, "%0d:%s: reading attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: reading attributes.\n", mpi_rank, fcn_name);
for (j = 0; j < LOCAL_DATA_SIZE; j++) {
att[j] = (double)(j + 1);
@@ -2388,8 +2388,8 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
tri_err = H5Tequal(att_type, H5T_NATIVE_DOUBLE);
VRFY((tri_err >= 0), "H5Tequal failed.\n");
if (tri_err == 0) {
- HDfprintf(stdout, "%0d:%s: Mismatched Attribute type of Dataset %d.\n", mpi_rank,
- fcn_name, i);
+ fprintf(stdout, "%0d:%s: Mismatched Attribute type of Dataset %d.\n", mpi_rank,
+ fcn_name, i);
nerrors++;
}
else {
@@ -2399,10 +2399,10 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* compare read attribute data with expected data */
for (j = 0; j < LOCAL_DATA_SIZE; j++)
if (!H5_DBL_ABS_EQUAL(att_read[j], att[j])) {
- HDfprintf(stdout,
- "%0d:%s: Mismatched attribute data read in Dataset %d, at position "
- "%d: expect %f, got %f.\n",
- mpi_rank, fcn_name, i, j, att[j], att_read[j]);
+ fprintf(stdout,
+ "%0d:%s: Mismatched attribute data read in Dataset %d, at position "
+ "%d: expect %f, got %f.\n",
+ mpi_rank, fcn_name, i, j, att[j], att_read[j]);
nerrors++;
}
for (j = 0; j < LOCAL_DATA_SIZE; j++) {
@@ -2425,7 +2425,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
if (steps >= 3) {
if (verbose)
- HDfprintf(stdout, "%0d:%s: reading large attributes.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: reading large attributes.\n", mpi_rank, fcn_name);
for (j = 0; j < LARGE_ATTR_SIZE; j++) {
lg_att[j] = (steps == 3) ? (double)(j + 1) : (double)(j + 2);
@@ -2439,8 +2439,8 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
tri_err = H5Tequal(lg_att_type[i], H5T_NATIVE_DOUBLE);
VRFY((tri_err >= 0), "H5Tequal failed.\n");
if (tri_err == 0) {
- HDfprintf(stdout, "%0d:%s: Mismatched Large attribute type of Dataset %d.\n",
- mpi_rank, fcn_name, i);
+ fprintf(stdout, "%0d:%s: Mismatched Large attribute type of Dataset %d.\n", mpi_rank,
+ fcn_name, i);
nerrors++;
}
else {
@@ -2450,10 +2450,10 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* compare read attribute data with expected data */
for (j = 0; j < LARGE_ATTR_SIZE; j++)
if (!H5_DBL_ABS_EQUAL(lg_att_read[j], lg_att[j])) {
- HDfprintf(stdout,
- "%0d:%s: Mismatched large attribute data read in Dataset %d, at "
- "position %d: expect %f, got %f.\n",
- mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]);
+ fprintf(stdout,
+ "%0d:%s: Mismatched large attribute data read in Dataset %d, at "
+ "position %d: expect %f, got %f.\n",
+ mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]);
nerrors++;
}
for (j = 0; j < LARGE_ATTR_SIZE; j++) {
@@ -2487,7 +2487,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing datasets again.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing datasets again.\n", mpi_rank, fcn_name);
for (i = 0; i < NUM_DATA_SETS; i++) {
if (dataset[i] >= 0) {
@@ -2501,7 +2501,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name);
err = H5Pclose(dxpl_id);
VRFY((err >= 0), "H5Pclose(dxpl_id) failed.\n");
@@ -2510,7 +2510,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
* Close the file
*/
if (verbose)
- HDfprintf(stdout, "%0d:%s: closing file again.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: closing file again.\n", mpi_rank, fcn_name);
err = H5Fclose(file_id);
VRFY((err >= 0), "H5Fclose(1) failed");
@@ -2519,7 +2519,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
} /* end while(1) */
if (verbose)
- HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
+ fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
return;
} /* rr_obj_hdr_flush_confusion_reader() */
@@ -2579,7 +2579,7 @@ chunk_align_bug_1(void)
align = (hsize_t)file_size + CHUNK_SIZE + EXTRA_ALIGN;
/* Set aggregator size and alignment, disable metadata aggregator */
- HDassert(AGGR_SIZE > CHUNK_SIZE);
+ assert(AGGR_SIZE > CHUNK_SIZE);
ret = H5Pset_small_data_block_size(fapl_id, AGGR_SIZE);
VRFY((ret >= 0), "H5Pset_small_data_block_size succeeded");
ret = H5Pset_meta_block_size(fapl_id, 0);
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index d0400ae..48d0cc1 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -54,7 +54,7 @@ test_mpio_overlap_writes(char *filename)
MPI_Status mpi_stat;
if (VERBOSE_MED)
- HDprintf("MPIO independent overlapping writes test on file %s\n", filename);
+ printf("MPIO independent overlapping writes test on file %s\n", filename);
nerrs = 0;
/* set up MPI parameters */
@@ -64,15 +64,15 @@ test_mpio_overlap_writes(char *filename)
/* Need at least 2 processes */
if (mpi_size < 2) {
if (MAINPROCESS)
- HDprintf("Need at least 2 processes to run MPIO test.\n");
- HDprintf(" -SKIP- \n");
+ printf("Need at least 2 processes to run MPIO test.\n");
+ printf(" -SKIP- \n");
return 0;
}
bufsize = 4093; /* use some prime number for size */
- if (NULL == (buf = HDmalloc((size_t)bufsize))) {
+ if (NULL == (buf = malloc((size_t)bufsize))) {
if (MAINPROCESS)
- HDprintf("couldn't allocate buffer\n");
+ printf("couldn't allocate buffer\n");
return 1;
}
@@ -142,12 +142,12 @@ test_mpio_overlap_writes(char *filename)
unsigned char expected;
expected = (unsigned char)(mpi_off + i);
if ((expected != buf[i]) && (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED)) {
- HDprintf("proc %d: found data error at [%ld], expect %u, got %u\n", mpi_rank,
- (long)(mpi_off + i), expected, buf[i]);
+ printf("proc %d: found data error at [%ld], expect %u, got %u\n", mpi_rank,
+ (long)(mpi_off + i), expected, buf[i]);
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("proc %d: [more errors ...]\n", mpi_rank);
+ printf("proc %d: [more errors ...]\n", mpi_rank);
nerrs += vrfyerrs;
}
@@ -166,7 +166,7 @@ test_mpio_overlap_writes(char *filename)
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync before leaving test");
- HDfree(buf);
+ free(buf);
return (nerrs);
}
@@ -212,7 +212,7 @@ test_mpio_gb_file(char *filename)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (VERBOSE_MED)
- HDprintf("MPI_Offset range test\n");
+ printf("MPI_Offset range test\n");
/* figure out the signness and sizeof MPI_Offset */
mpi_off = 0;
@@ -224,11 +224,11 @@ test_mpio_gb_file(char *filename)
* sizes.
*/
if (MAINPROCESS) { /* only process 0 needs to check it*/
- HDprintf("MPI_Offset is %s %d bytes integral type\n", is_signed ? "signed" : "unsigned",
- (int)sizeof(MPI_Offset));
+ printf("MPI_Offset is %s %d bytes integral type\n", is_signed ? "signed" : "unsigned",
+ (int)sizeof(MPI_Offset));
if (sizeof_mpi_offset <= 4 && is_signed) {
- HDprintf("Skipped 2GB range test "
- "because MPI_Offset cannot support it\n");
+ printf("Skipped 2GB range test "
+ "because MPI_Offset cannot support it\n");
}
else {
/* verify correctness of assigning 2GB sizes */
@@ -249,8 +249,8 @@ test_mpio_gb_file(char *filename)
}
if (sizeof_mpi_offset <= 4) {
- HDprintf("Skipped 4GB range test "
- "because MPI_Offset cannot support it\n");
+ printf("Skipped 4GB range test "
+ "because MPI_Offset cannot support it\n");
}
else {
/* verify correctness of assigning 4GB sizes */
@@ -275,14 +275,14 @@ test_mpio_gb_file(char *filename)
* Verify if we can write to a file of multiple GB sizes.
*/
if (VERBOSE_MED)
- HDprintf("MPIO GB file test %s\n", filename);
+ printf("MPIO GB file test %s\n", filename);
if (sizeof_mpi_offset <= 4) {
- HDprintf("Skipped GB file range test "
- "because MPI_Offset cannot support it\n");
+ printf("Skipped GB file range test "
+ "because MPI_Offset cannot support it\n");
}
else {
- buf = (char *)HDmalloc(MB);
+ buf = (char *)malloc(MB);
VRFY((buf != NULL), "malloc succeed");
/* open a new file. Remove it first in case it exists. */
@@ -294,7 +294,7 @@ test_mpio_gb_file(char *filename)
mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh);
VRFY((mrc == MPI_SUCCESS), "MPI_FILE_OPEN");
- HDprintf("MPIO GB file write test %s\n", filename);
+ printf("MPIO GB file write test %s\n", filename);
/* instead of writing every bytes of the file, we will just write
* some data around the 2 and 4 GB boundaries. That should cover
@@ -306,13 +306,12 @@ test_mpio_gb_file(char *filename)
for (i = ntimes - 2; i <= ntimes; i++) {
mpi_off = (i * mpi_size + mpi_rank) * (MPI_Offset)MB;
if (VERBOSE_MED)
- HDfprintf(stdout, "proc %d: write to mpi_off=%016llx, %lld\n", mpi_rank, mpi_off,
- mpi_off);
+ fprintf(stdout, "proc %d: write to mpi_off=%016llx, %lld\n", mpi_rank, mpi_off, mpi_off);
/* set data to some trivial pattern for easy verification */
for (j = 0; j < MB; j++)
*(buf + j) = (int8_t)(i * mpi_size + mpi_rank);
if (VERBOSE_MED)
- HDfprintf(stdout, "proc %d: writing %d bytes at offset %lld\n", mpi_rank, MB, mpi_off);
+ fprintf(stdout, "proc %d: writing %d bytes at offset %lld\n", mpi_rank, MB, mpi_off);
mrc = MPI_File_write_at(fh, mpi_off, buf, MB, MPI_BYTE, &mpi_stat);
INFO((mrc == MPI_SUCCESS), "GB size file write");
if (mrc != MPI_SUCCESS)
@@ -332,9 +331,9 @@ test_mpio_gb_file(char *filename)
*/
/* open it again to verify the data written */
/* but only if there was no write errors */
- HDprintf("MPIO GB file read test %s\n", filename);
+ printf("MPIO GB file read test %s\n", filename);
if (errors_sum(writerrs) > 0) {
- HDprintf("proc %d: Skip read test due to previous write errors\n", mpi_rank);
+ printf("proc %d: Skip read test due to previous write errors\n", mpi_rank);
goto finish;
}
mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY, info, &fh);
@@ -346,20 +345,19 @@ test_mpio_gb_file(char *filename)
for (i = ntimes - 2; i <= ntimes; i++) {
mpi_off = (i * mpi_size + (mpi_size - mpi_rank - 1)) * (MPI_Offset)MB;
if (VERBOSE_MED)
- HDfprintf(stdout, "proc %d: read from mpi_off=%016llx, %lld\n", mpi_rank, mpi_off,
- mpi_off);
+ fprintf(stdout, "proc %d: read from mpi_off=%016llx, %lld\n", mpi_rank, mpi_off, mpi_off);
mrc = MPI_File_read_at(fh, mpi_off, buf, MB, MPI_BYTE, &mpi_stat);
INFO((mrc == MPI_SUCCESS), "GB size file read");
expected = (int8_t)(i * mpi_size + (mpi_size - mpi_rank - 1));
vrfyerrs = 0;
for (j = 0; j < MB; j++) {
if ((*(buf + j) != expected) && (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED)) {
- HDprintf("proc %d: found data error at [%ld+%d], expect %d, got %d\n", mpi_rank,
- (long)mpi_off, j, expected, *(buf + j));
+ printf("proc %d: found data error at [%ld+%d], expect %d, got %d\n", mpi_rank,
+ (long)mpi_off, j, expected, *(buf + j));
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("proc %d: [more errors ...]\n", mpi_rank);
+ printf("proc %d: [more errors ...]\n", mpi_rank);
nerrs += vrfyerrs;
}
@@ -376,7 +374,7 @@ test_mpio_gb_file(char *filename)
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync before leaving test");
- HDprintf("Test if MPI_File_get_size works correctly with %s\n", filename);
+ printf("Test if MPI_File_get_size works correctly with %s\n", filename);
mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY, info, &fh);
VRFY((mrc == MPI_SUCCESS), "");
@@ -401,7 +399,7 @@ test_mpio_gb_file(char *filename)
finish:
if (buf)
- HDfree(buf);
+ free(buf);
return (nerrs);
}
@@ -423,7 +421,7 @@ finish:
*/
#define DIMSIZE 32 /* Dimension size. */
-#define PRINTID HDprintf("Proc %d: ", mpi_rank)
+#define PRINTID printf("Proc %d: ", mpi_rank)
#define USENONE 0
#define USEATOM 1 /* request atomic I/O */
#define USEFSYNC 2 /* request file_sync */
@@ -449,24 +447,24 @@ test_mpio_1wMr(char *filename, int special_request)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (MAINPROCESS && VERBOSE_MED) {
- HDprintf("Testing one process writes, all processes read.\n");
- HDprintf("Using %d processes accessing file %s\n", mpi_size, filename);
- HDprintf(" (Filename can be specified via program argument)\n");
+ printf("Testing one process writes, all processes read.\n");
+ printf("Using %d processes accessing file %s\n", mpi_size, filename);
+ printf(" (Filename can be specified via program argument)\n");
}
/* show the hostname so that we can tell where the processes are running */
if (VERBOSE_DEF) {
#ifdef H5_HAVE_GETHOSTNAME
if (HDgethostname(hostname, sizeof(hostname)) < 0) {
- HDprintf("gethostname failed\n");
+ printf("gethostname failed\n");
hostname[0] = '\0';
}
#else
- HDprintf("gethostname unavailable\n");
+ printf("gethostname unavailable\n");
hostname[0] = '\0';
#endif
PRINTID;
- HDprintf("hostname=%s\n", hostname);
+ printf("hostname=%s\n", hostname);
}
/* Delete any old file in order to start anew. */
@@ -479,7 +477,7 @@ test_mpio_1wMr(char *filename, int special_request)
&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- HDprintf("MPI_File_open failed (%s)\n", mpi_err_str);
+ printf("MPI_File_open failed (%s)\n", mpi_err_str);
return 1;
}
@@ -491,29 +489,29 @@ test_mpio_1wMr(char *filename, int special_request)
if ((mpi_err = MPI_File_get_atomicity(fh, &atomicity)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- HDprintf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str);
+ printf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str);
}
if (VERBOSE_HI)
- HDprintf("Initial atomicity = %d\n", atomicity);
+ printf("Initial atomicity = %d\n", atomicity);
if ((mpi_err = MPI_File_set_atomicity(fh, 1)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- HDprintf("MPI_File_set_atomicity failed (%s)\n", mpi_err_str);
+ printf("MPI_File_set_atomicity failed (%s)\n", mpi_err_str);
}
if ((mpi_err = MPI_File_get_atomicity(fh, &atomicity)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- HDprintf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str);
+ printf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str);
}
if (VERBOSE_HI)
- HDprintf("After set_atomicity atomicity = %d\n", atomicity);
+ printf("After set_atomicity atomicity = %d\n", atomicity);
}
/* This barrier is not necessary but do it anyway. */
MPI_Barrier(MPI_COMM_WORLD);
if (VERBOSE_HI) {
PRINTID;
- HDprintf("between MPI_Barrier and MPI_File_write_at\n");
+ printf("between MPI_Barrier and MPI_File_write_at\n");
}
/* ==================================================
@@ -529,14 +527,14 @@ test_mpio_1wMr(char *filename, int special_request)
if (mpi_rank == irank) {
if (VERBOSE_HI) {
PRINTID;
- HDprintf("wrote %d bytes at %ld\n", DIMSIZE, (long)mpi_off);
+ printf("wrote %d bytes at %ld\n", DIMSIZE, (long)mpi_off);
}
if ((mpi_err = MPI_File_write_at(fh, mpi_off, writedata, DIMSIZE, MPI_BYTE, &mpi_stat)) !=
MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- HDprintf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, DIMSIZE,
- mpi_err_str);
+ printf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, DIMSIZE,
+ mpi_err_str);
return 1;
};
};
@@ -546,7 +544,7 @@ test_mpio_1wMr(char *filename, int special_request)
MPI_Bcast(&mpi_err, 1, MPI_INT, irank, MPI_COMM_WORLD);
if (VERBOSE_HI) {
PRINTID;
- HDprintf("MPI_Bcast: mpi_err = %d\n", mpi_err);
+ printf("MPI_Bcast: mpi_err = %d\n", mpi_err);
}
if (special_request & USEFSYNC) {
@@ -555,19 +553,19 @@ test_mpio_1wMr(char *filename, int special_request)
* should not need this.
* ==================================================*/
if (VERBOSE_HI)
- HDprintf("Apply MPI_File_sync\n");
+ printf("Apply MPI_File_sync\n");
/* call file_sync to force the write out */
if ((mpi_err = MPI_File_sync(fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- HDprintf("MPI_File_sync failed (%s)\n", mpi_err_str);
+ printf("MPI_File_sync failed (%s)\n", mpi_err_str);
}
MPI_Barrier(MPI_COMM_WORLD);
/* call file_sync to force the write out */
if ((mpi_err = MPI_File_sync(fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- HDprintf("MPI_File_sync failed (%s)\n", mpi_err_str);
+ printf("MPI_File_sync failed (%s)\n", mpi_err_str);
}
}
@@ -576,7 +574,7 @@ test_mpio_1wMr(char *filename, int special_request)
MPI_Barrier(MPI_COMM_WORLD);
if (VERBOSE_HI) {
PRINTID;
- HDprintf("after MPI_Barrier\n");
+ printf("after MPI_Barrier\n");
}
/* ==================================================
@@ -587,15 +585,15 @@ test_mpio_1wMr(char *filename, int special_request)
if ((mpi_err = MPI_File_read_at(fh, mpi_off, readdata, DIMSIZE, MPI_BYTE, &mpi_stat)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
PRINTID;
- HDprintf("MPI_File_read_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, DIMSIZE,
- mpi_err_str);
+ printf("MPI_File_read_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, DIMSIZE,
+ mpi_err_str);
return 1;
};
for (i = 0; i < DIMSIZE; i++) {
expect_val = (uint8_t)(irank * DIMSIZE + i);
if (readdata[i] != expect_val) {
PRINTID;
- HDprintf("read data[%d:%d] got %02x, expect %02x\n", irank, i, readdata[i], expect_val);
+ printf("read data[%d:%d] got %02x, expect %02x\n", irank, i, readdata[i], expect_val);
nerrs++;
}
}
@@ -604,7 +602,7 @@ test_mpio_1wMr(char *filename, int special_request)
if (VERBOSE_HI) {
PRINTID;
- HDprintf("%d data errors detected\n", nerrs);
+ printf("%d data errors detected\n", nerrs);
}
mpi_err = MPI_Barrier(MPI_COMM_WORLD);
@@ -658,7 +656,7 @@ test_mpio_1wMr(char *filename, int special_request)
2. This test will verify whether the complicated derived datatype is working on
the current platform.
- If this bug has been fixed in the previous not-working package, this test will issue a HDprintf message to
+ If this bug has been fixed in the previous not-working package, this test will issue a printf message to
tell the developer to change the configuration specific file of HDF5 so that we can change our
configurationsetting to support collective IO for irregular selections.
@@ -699,7 +697,7 @@ test_mpio_derived_dtype(char *filename)
if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL,
&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_open failed (%s)\n", mpi_err_str);
+ printf("MPI_File_open failed (%s)\n", mpi_err_str);
return 1;
}
@@ -712,13 +710,13 @@ test_mpio_derived_dtype(char *filename)
if ((mpi_err = MPI_Type_create_hindexed(count, blocklens, offsets, MPI_BYTE, &filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_Type_commit(&filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
}
@@ -728,13 +726,13 @@ test_mpio_derived_dtype(char *filename)
if ((mpi_err = MPI_Type_create_hindexed(count, blocklens, offsets, MPI_BYTE, &filetypenew)) !=
MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_Type_commit(&filetypenew)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
}
@@ -749,67 +747,67 @@ test_mpio_derived_dtype(char *filename)
if ((mpi_err = MPI_Type_create_struct(outcount, adv_blocklens, adv_disp, bas_filetype, &adv_filetype)) !=
MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_create_struct failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_create_struct failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_Type_commit(&adv_filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_set_view(fh, disp, etype, adv_filetype, "native", MPI_INFO_NULL)) !=
MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_set_view failed (%s)\n", mpi_err_str);
+ printf("MPI_File_set_view failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_write(fh, buf, 3, MPI_BYTE, &Status)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_write failed (%s)\n", mpi_err_str);
+ printf("MPI_File_write failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_close failed (%s)\n", mpi_err_str);
+ printf("MPI_File_close failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_Type_free(&filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_free failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_Type_free(&adv_filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_free failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_Type_free(&filetypenew)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_free failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY, MPI_INFO_NULL, &fh)) !=
MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_open failed (%s)\n", mpi_err_str);
+ printf("MPI_File_open failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_set_view(fh, 0, MPI_BYTE, MPI_BYTE, "native", MPI_INFO_NULL)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_set_view failed (%s)\n", mpi_err_str);
+ printf("MPI_File_set_view failed (%s)\n", mpi_err_str);
return 1;
}
if ((mpi_err = MPI_File_read(fh, outbuf, 3, MPI_BYTE, &Status)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_read failed (%s)\n", mpi_err_str);
+ printf("MPI_File_read failed (%s)\n", mpi_err_str);
return 1;
}
@@ -818,9 +816,9 @@ test_mpio_derived_dtype(char *filename)
}
else {
/* if(mpi_rank == 0) {
- HDprintf("complicated derived datatype is NOT working at this platform\n");
- HDprintf("go back to hdf5/config and find the corresponding\n");
- HDprintf("configure-specific file and change ?????\n");
+ printf("complicated derived datatype is NOT working at this platform\n");
+ printf("go back to hdf5/config and find the corresponding\n");
+ printf("configure-specific file and change ?????\n");
}
*/
retcode = -1;
@@ -828,15 +826,15 @@ test_mpio_derived_dtype(char *filename)
if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_close failed (%s)\n", mpi_err_str);
+ printf("MPI_File_close failed (%s)\n", mpi_err_str);
return 1;
}
mpi_err = MPI_Barrier(MPI_COMM_WORLD);
if (retcode == -1) {
if (mpi_rank == 0) {
- HDprintf("Complicated derived datatype is NOT working at this platform\n");
- HDprintf(" Please report to help@hdfgroup.org about this problem.\n");
+ printf("Complicated derived datatype is NOT working at this platform\n");
+ printf(" Please report to help@hdfgroup.org about this problem.\n");
}
retcode = 1;
}
@@ -861,7 +859,7 @@ test_mpio_derived_dtype(char *filename)
2. This test will fail with the MPI-IO package that doesn't support this. For example,
mpich 1.2.6.
- If this bug has been fixed in the previous not-working package, this test will issue a HDprintf message to
+ If this bug has been fixed in the previous not-working package, this test will issue a printf message to
tell the developer to change the configuration specific file of HDF5 so that we can change our
configurationsetting to support special collective IO; currently only special collective IO.
@@ -913,25 +911,25 @@ test_mpio_special_collective(char *filename)
if (count != 0) {
if ((mpi_err = MPI_Type_create_hindexed(2, blocklens, offsets, etype, &filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
if ((mpi_err = MPI_Type_commit(&filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
if ((mpi_err = MPI_Type_create_hindexed(2, blocklens, offsets, etype, &buftype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
if ((mpi_err = MPI_Type_commit(&buftype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_commit failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
} /* end if */
@@ -940,7 +938,7 @@ test_mpio_special_collective(char *filename)
if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL,
&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_open failed (%s)\n", mpi_err_str);
+ printf("MPI_File_open failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
@@ -952,13 +950,13 @@ test_mpio_special_collective(char *filename)
if ((mpi_err = MPI_File_set_view(fh, mpi_off, MPI_BYTE, filetype, filerep, MPI_INFO_NULL)) !=
MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_set_view failed (%s)\n", mpi_err_str);
+ printf("MPI_File_set_view failed (%s)\n", mpi_err_str);
return 1;
} /* end if */
if (filetype != MPI_BYTE && (mpi_err = MPI_Type_free(&filetype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_free failed (%s)\n", mpi_err_str);
return 1;
}
@@ -966,21 +964,21 @@ test_mpio_special_collective(char *filename)
if ((mpi_err = MPI_File_write_at_all(fh, mpi_off, writedata, bufcount, buftype, &mpi_stat)) !=
MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, bufcount,
- mpi_err_str);
+ printf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, bufcount,
+ mpi_err_str);
return 1;
} /* end if */
if (buftype != MPI_BYTE && (mpi_err = MPI_Type_free(&buftype)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_free failed (%s)\n", mpi_err_str);
return 1;
}
/* Close the file */
if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) {
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- HDprintf("MPI_File_close failed. \n");
+ printf("MPI_File_close failed. \n");
return 1;
} /* end if */
@@ -988,8 +986,8 @@ test_mpio_special_collective(char *filename)
mpi_err = MPI_Barrier(MPI_COMM_WORLD);
if (retcode != 0) {
if (mpi_rank == 0) {
- HDprintf("special collective IO is NOT working at this platform\n");
- HDprintf(" Please report to help@hdfgroup.org about this problem.\n");
+ printf("special collective IO is NOT working at this platform\n");
+ printf(" Please report to help@hdfgroup.org about this problem.\n");
} /* end if */
retcode = 1;
} /* end if */
@@ -1047,15 +1045,15 @@ parse_options(int argc, char **argv)
for (i = 0; i < n; i++)
if (h5_fixname(FILENAME[i], plist, filenames[i], sizeof(filenames[i])) == NULL) {
- HDprintf("h5_fixname failed\n");
+ printf("h5_fixname failed\n");
nerrors++;
return (1);
}
H5Pclose(plist);
if (VERBOSE_MED) {
- HDprintf("Test filenames are:\n");
+ printf("Test filenames are:\n");
for (i = 0; i < n; i++)
- HDprintf(" %s\n", filenames[i]);
+ printf(" %s\n", filenames[i]);
}
}
@@ -1068,10 +1066,10 @@ parse_options(int argc, char **argv)
static void
usage(void)
{
- HDprintf("Usage: t_mpi [-v<verbosity>] [-f <prefix>]\n");
- HDprintf("\t-v<verbosity>\tset verbose level (0-9,l,m,h)\n");
- HDprintf("\t-f <prefix>\tfilename prefix\n");
- HDprintf("\n");
+ printf("Usage: t_mpi [-v<verbosity>] [-f <prefix>]\n");
+ printf("\t-v<verbosity>\tset verbose level (0-9,l,m,h)\n");
+ printf("\t-f <prefix>\tfilename prefix\n");
+ printf("\n");
}
/*
@@ -1101,7 +1099,7 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0) {
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ printf("Failed to turn off atexit processing. Continue.\n");
};
H5open();
if (parse_options(argc, argv) != 0) {
@@ -1111,9 +1109,9 @@ main(int argc, char **argv)
}
if (MAINPROCESS) {
- HDprintf("===================================\n");
- HDprintf("MPI functionality tests\n");
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("MPI functionality tests\n");
+ printf("===================================\n");
}
if (VERBOSE_MED)
@@ -1132,7 +1130,7 @@ main(int argc, char **argv)
ret_code = test_mpio_1wMr(filenames[0], USENONE);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- HDprintf("***FAILED with %d total errors\n", ret_code);
+ printf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1143,7 +1141,7 @@ main(int argc, char **argv)
ret_code = test_mpio_1wMr(filenames[0], USEATOM);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- HDprintf("***FAILED with %d total errors\n", ret_code);
+ printf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1151,7 +1149,7 @@ main(int argc, char **argv)
ret_code = test_mpio_1wMr(filenames[0], USEFSYNC);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- HDprintf("***FAILED with %d total errors\n", ret_code);
+ printf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
}
@@ -1164,12 +1162,12 @@ main(int argc, char **argv)
ret_code = test_mpio_gb_file(filenames[0]);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- HDprintf("***FAILED with %d total errors\n", ret_code);
+ printf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
#else
if (mpi_rank == 0)
- HDprintf(" will be skipped on Windows (JIRA HDDFV-8064)\n");
+ printf(" will be skipped on Windows (JIRA HDDFV-8064)\n");
#endif
/*=======================================
@@ -1179,7 +1177,7 @@ main(int argc, char **argv)
ret_code = test_mpio_overlap_writes(filenames[0]);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- HDprintf("***FAILED with %d total errors\n", ret_code);
+ printf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1190,7 +1188,7 @@ main(int argc, char **argv)
ret_code = test_mpio_derived_dtype(filenames[0]);
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- HDprintf("***FAILED with %d total errors\n", ret_code);
+ printf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1200,7 +1198,7 @@ main(int argc, char **argv)
if (mpi_size < 4) {
MPI_BANNER("MPIO special collective io test SKIPPED.");
if (mpi_rank == 0)
- HDprintf("This test needs at least four processes to run.\n");
+ printf("This test needs at least four processes to run.\n");
ret_code = 0;
goto sc_finish;
} /* end if */
@@ -1211,7 +1209,7 @@ main(int argc, char **argv)
sc_finish:
ret_code = errors_sum(ret_code);
if (mpi_rank == 0 && ret_code > 0) {
- HDprintf("***FAILED with %d total errors\n", ret_code);
+ printf("***FAILED with %d total errors\n", ret_code);
nerrors += ret_code;
}
@@ -1221,14 +1219,14 @@ finish:
*/
MPI_Barrier(MPI_COMM_WORLD);
if (MAINPROCESS) { /* only process 0 reports */
- HDprintf("===================================\n");
+ printf("===================================\n");
if (nerrors) {
- HDprintf("***MPI tests detected %d errors***\n", nerrors);
+ printf("***MPI tests detected %d errors***\n", nerrors);
}
else {
- HDprintf("MPI tests finished with no errors\n");
+ printf("MPI tests finished with no errors\n");
}
- HDprintf("===================================\n");
+ printf("===================================\n");
}
/* turn off alarm */
diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c
index edfbcfe..035a4e8 100644
--- a/testpar/t_pflush1.c
+++ b/testpar/t_pflush1.c
@@ -142,10 +142,10 @@ main(int argc, char *argv[])
HDputs(" Test not compatible with current Virtual File Driver");
}
MPI_Finalize();
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
- if (NULL == (data_g = HDmalloc(100 * 100 * sizeof(*data_g))))
+ if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g))))
goto error;
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -169,8 +169,8 @@ main(int argc, char *argv[])
if (mpi_rank == 0)
PASSED();
- HDfflush(stdout);
- HDfflush(stderr);
+ fflush(stdout);
+ fflush(stderr);
/* Some systems like AIX do not like files not being closed when MPI_Finalize
* is called. So, we need to get the MPI file handles, close them by hand.
@@ -191,11 +191,11 @@ main(int argc, char *argv[])
if (MPI_File_close(mpifh_p) != MPI_SUCCESS)
goto error;
- HDfflush(stdout);
- HDfflush(stderr);
+ fflush(stdout);
+ fflush(stderr);
if (data_g) {
- HDfree(data_g);
+ free(data_g);
data_g = NULL;
}
@@ -207,17 +207,17 @@ main(int argc, char *argv[])
* always ignore the failure condition than to handle some
* platforms returning success and others failure.
*/
- HD_exit(EXIT_FAILURE);
+ _exit(EXIT_FAILURE);
error:
- HDfflush(stdout);
- HDfflush(stderr);
- HDprintf("*** ERROR ***\n");
- HDprintf("THERE WAS A REAL ERROR IN t_pflush1.\n");
- HDfflush(stdout);
+ fflush(stdout);
+ fflush(stderr);
+ printf("*** ERROR ***\n");
+ printf("THERE WAS A REAL ERROR IN t_pflush1.\n");
+ fflush(stdout);
if (data_g)
- HDfree(data_g);
+ free(data_g);
- HD_exit(EXIT_FAILURE);
+ _exit(EXIT_FAILURE);
} /* end main() */
diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c
index 3e42351..391a59c 100644
--- a/testpar/t_pflush2.c
+++ b/testpar/t_pflush2.c
@@ -68,7 +68,7 @@ check_test_file(char *name, size_t name_length, hid_t fapl_id)
goto error;
if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto error;
- HDassert(100 == dims[0] && 100 == dims[1]);
+ assert(100 == dims[0] && 100 == dims[1]);
/* Read some data */
if (H5Dread(did, H5T_NATIVE_INT, sid, sid, dxpl_id, data_g) < 0)
@@ -78,9 +78,9 @@ check_test_file(char *name, size_t name_length, hid_t fapl_id)
val = (int)(i + (i * j) + j);
if (data_g[(i * 100) + j] != val) {
H5_FAILED();
- HDprintf(" data_g[%lu][%lu] = %d\n", (unsigned long)i, (unsigned long)j,
- data_g[(i * 100) + j]);
- HDprintf(" should be %d\n", val);
+ printf(" data_g[%lu][%lu] = %d\n", (unsigned long)i, (unsigned long)j,
+ data_g[(i * 100) + j]);
+ printf(" should be %d\n", val);
}
}
}
@@ -167,10 +167,10 @@ main(int argc, char *argv[])
HDputs(" Test not compatible with current Virtual File Driver");
}
MPI_Finalize();
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
- if (NULL == (data_g = HDmalloc(100 * 100 * sizeof(*data_g))))
+ if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g))))
goto error;
if ((fapl_id1 = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -217,17 +217,17 @@ main(int argc, char *argv[])
h5_clean_files(&FILENAME[1], fapl_id2);
if (data_g) {
- HDfree(data_g);
+ free(data_g);
data_g = NULL;
}
MPI_Finalize();
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
if (data_g)
- HDfree(data_g);
+ free(data_g);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/testpar/t_ph5basic.c b/testpar/t_ph5basic.c
index cef5d12..697b6e9 100644
--- a/testpar/t_ph5basic.c
+++ b/testpar/t_ph5basic.c
@@ -46,13 +46,13 @@ test_fapl_mpio_dup(void)
int nkeys, nkeys_tmp;
if (VERBOSE_MED)
- HDprintf("Verify fapl_mpio duplicates communicator and INFO objects\n");
+ printf("Verify fapl_mpio duplicates communicator and INFO objects\n");
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (VERBOSE_MED)
- HDprintf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size);
+ printf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size);
/* Create a new communicator that has the same processes as MPI_COMM_WORLD.
* Use MPI_Comm_split because it is simpler than MPI_Comm_create
@@ -62,7 +62,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm, &mpi_size_old);
MPI_Comm_rank(comm, &mpi_rank_old);
if (VERBOSE_MED)
- HDprintf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old);
+ printf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old);
/* create a new INFO object with some trivial information. */
mrc = MPI_Info_create(&info);
@@ -99,7 +99,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm_tmp, &mpi_size_tmp);
MPI_Comm_rank(comm_tmp, &mpi_rank_tmp);
if (VERBOSE_MED)
- HDprintf("After H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
+ printf("After H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
VRFY((mpi_size_tmp == mpi_size), "MPI_Comm_size");
VRFY((mpi_rank_tmp == mpi_rank), "MPI_Comm_rank");
if (MPI_INFO_NULL != info_tmp) {
@@ -146,7 +146,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm_tmp, &mpi_size_tmp);
MPI_Comm_rank(comm_tmp, &mpi_rank_tmp);
if (VERBOSE_MED)
- HDprintf("After second H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
+ printf("After second H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
VRFY((mpi_size_tmp == mpi_size), "MPI_Comm_size");
VRFY((mpi_rank_tmp == mpi_rank), "MPI_Comm_rank");
if (MPI_INFO_NULL != info_tmp) {
@@ -165,7 +165,7 @@ test_fapl_mpio_dup(void)
MPI_Comm_size(comm_tmp, &mpi_size_tmp);
MPI_Comm_rank(comm_tmp, &mpi_rank_tmp);
if (VERBOSE_MED)
- HDprintf("After Property list closed: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
+ printf("After Property list closed: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp);
if (MPI_INFO_NULL != info_tmp) {
mrc = MPI_Info_get_nkeys(info_tmp, &nkeys_tmp);
VRFY((mrc == MPI_SUCCESS), "MPI_Info_get_nkeys");
diff --git a/testpar/t_pmulti_dset.c b/testpar/t_pmulti_dset.c
index dd9a71a..d7561d2 100644
--- a/testpar/t_pmulti_dset.c
+++ b/testpar/t_pmulti_dset.c
@@ -160,15 +160,15 @@ test_pmdset(size_t niter, unsigned flags)
dcpl_id[i] = -1;
/* Allocate buffers */
- if (NULL == (rbuf = (unsigned *)HDmalloc(buf_size)))
+ if (NULL == (rbuf = (unsigned *)malloc(buf_size)))
T_PMD_ERROR;
- if (NULL == (erbuf = (unsigned *)HDmalloc(buf_size)))
+ if (NULL == (erbuf = (unsigned *)malloc(buf_size)))
T_PMD_ERROR;
- if (NULL == (wbuf = (unsigned *)HDmalloc(buf_size)))
+ if (NULL == (wbuf = (unsigned *)malloc(buf_size)))
T_PMD_ERROR;
- if (NULL == (efbuf = (unsigned *)HDmalloc(buf_size)))
+ if (NULL == (efbuf = (unsigned *)malloc(buf_size)))
T_PMD_ERROR;
- if (NULL == (dset_usage = (unsigned char *)HDmalloc(max_dsets * MAX_DSET_X * MAX_DSET_Y)))
+ if (NULL == (dset_usage = (unsigned char *)malloc(max_dsets * MAX_DSET_X * MAX_DSET_Y)))
T_PMD_ERROR;
/* Initialize buffer indices */
@@ -312,8 +312,8 @@ test_pmdset(size_t niter, unsigned flags)
} /* end for */
/* Initialize read buffer and expected read buffer */
- (void)HDmemset(rbuf, 0, buf_size);
- (void)HDmemset(erbuf, 0, buf_size);
+ (void)memset(rbuf, 0, buf_size);
+ (void)memset(erbuf, 0, buf_size);
/* Initialize write buffer */
for (j = 0; j < max_dsets; j++)
@@ -323,7 +323,7 @@ test_pmdset(size_t niter, unsigned flags)
(j * MAX_DSET_X * MAX_DSET_Y) + (k * MAX_DSET_Y) + l);
/* Initialize expected file buffer */
- (void)HDmemset(efbuf, 0, buf_size);
+ (void)memset(efbuf, 0, buf_size);
/* Set last_read to TRUE so we don't reopen the file on the first
* iteration */
@@ -384,7 +384,7 @@ test_pmdset(size_t niter, unsigned flags)
/* Reset dataset usage array, if writing */
if (!do_read)
- HDmemset(dset_usage, 0, max_dsets * MAX_DSET_X * MAX_DSET_Y);
+ memset(dset_usage, 0, max_dsets * MAX_DSET_X * MAX_DSET_Y);
/* Iterate over processes */
for (l = 0; l < (size_t)mpi_size; l++) {
@@ -473,7 +473,7 @@ test_pmdset(size_t niter, unsigned flags)
/* Reset dataset usage array if reading, since in this case we don't care
* about overlapping selections between processes */
if (do_read)
- HDmemset(dset_usage, 0, max_dsets * MAX_DSET_X * MAX_DSET_Y);
+ memset(dset_usage, 0, max_dsets * MAX_DSET_X * MAX_DSET_Y);
/* Generate points */
for (m = 0; m < npoints; m++) {
diff --git a/testpar/t_pread.c b/testpar/t_pread.c
index d05ec46..3f8f5b2 100644
--- a/testpar/t_pread.c
+++ b/testpar/t_pread.c
@@ -111,7 +111,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
pass = TRUE;
- HDassert(comm != MPI_COMM_NULL);
+ assert(comm != MPI_COMM_NULL);
if ((MPI_Comm_rank(comm, &group_rank)) != MPI_SUCCESS) {
pass = FALSE;
@@ -125,7 +125,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if (mpi_rank == 0) {
- HDfprintf(stdout, "Constructing test files...");
+ fprintf(stdout, "Constructing test files...");
}
/* Setup the file names
@@ -151,7 +151,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
* need to worry that we reassign it for each file!
*/
group_filename = FILENAMES[file_index];
- HDassert(group_filename);
+ assert(group_filename);
/* Assign the 'data_filename' */
if (h5_fixname(group_filename, H5P_DEFAULT, data_filename, sizeof(data_filename)) == NULL) {
@@ -162,7 +162,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* setup data to write */
if (pass) {
- if ((data_slice = (float *)HDmalloc(COUNT * sizeof(float))) == NULL) {
+ if ((data_slice = (float *)malloc(COUNT * sizeof(float))) == NULL) {
pass = FALSE;
failure_mssg = "malloc of data_slice failed.\n";
}
@@ -429,17 +429,17 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* report results */
if (mpi_rank == 0) {
if (pass) {
- HDfprintf(stdout, "Done.\n");
+ fprintf(stdout, "Done.\n");
}
else {
- HDfprintf(stdout, "FAILED.\n");
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "FAILED.\n");
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
/* free data_slice if it has been allocated */
if (data_slice != NULL) {
- HDfree(data_slice);
+ free(data_slice);
data_slice = NULL;
}
@@ -513,7 +513,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
pass = TRUE;
- HDassert(comm != MPI_COMM_NULL);
+ assert(comm != MPI_COMM_NULL);
if ((MPI_Comm_rank(comm, &group_rank)) != MPI_SUCCESS) {
pass = FALSE;
@@ -536,7 +536,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* allocate space for the data_slice array */
if (pass) {
- if ((data_slice = (float *)HDmalloc(COUNT * sizeof(float))) == NULL) {
+ if ((data_slice = (float *)malloc(COUNT * sizeof(float))) == NULL) {
pass = FALSE;
failure_mssg = "malloc of data_slice failed.\n";
}
@@ -555,7 +555,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
else /* test 2 group 1 */
group_filename = FILENAMES[2];
- HDassert(group_filename);
+ assert(group_filename);
if (h5_fixname(group_filename, H5P_DEFAULT, reloc_data_filename, sizeof(reloc_data_filename)) ==
NULL) {
@@ -670,7 +670,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* free data_slice if it has been allocated */
if (data_slice != NULL) {
- HDfree(data_slice);
+ free(data_slice);
data_slice = NULL;
}
@@ -710,7 +710,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
failure_mssg = "H5Tclose failed.\n";
};
- if ((data_slice = (float *)HDmalloc((size_t)dset_size * filetype_size)) == NULL) {
+ if ((data_slice = (float *)malloc((size_t)dset_size * filetype_size)) == NULL) {
pass = FALSE;
failure_mssg = "malloc of data_slice failed.\n";
}
@@ -861,7 +861,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* free data_slice if it has been allocated */
if (data_slice != NULL) {
- HDfree(data_slice);
+ free(data_slice);
data_slice = NULL;
}
@@ -869,7 +869,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
* Read an H5S_ALL filespace into a hyperslab defined memory space
*/
- if ((data_slice = (float *)HDmalloc((size_t)(dset_size * 2) * filetype_size)) == NULL) {
+ if ((data_slice = (float *)malloc((size_t)(dset_size * 2) * filetype_size)) == NULL) {
pass = FALSE;
failure_mssg = "malloc of data_slice failed.\n";
}
@@ -958,7 +958,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* free data_slice if it has been allocated */
if (data_slice != NULL) {
- HDfree(data_slice);
+ free(data_slice);
data_slice = NULL;
}
@@ -1023,7 +1023,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
}
else {
H5_FAILED();
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
HDremove(reloc_data_filename);
}
@@ -1077,34 +1077,34 @@ main(int argc, char **argv)
test_argv0 = HDstrdup(argv[0]);
if ((MPI_Init(&argc, &argv)) != MPI_SUCCESS) {
- HDfprintf(stderr, "FATAL: Unable to initialize MPI\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "FATAL: Unable to initialize MPI\n");
+ exit(EXIT_FAILURE);
}
if ((MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank)) != MPI_SUCCESS) {
- HDfprintf(stderr, "FATAL: MPI_Comm_rank returned an error\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "FATAL: MPI_Comm_rank returned an error\n");
+ exit(EXIT_FAILURE);
}
if ((MPI_Comm_size(MPI_COMM_WORLD, &mpi_size)) != MPI_SUCCESS) {
- HDfprintf(stderr, "FATAL: MPI_Comm_size returned an error\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "FATAL: MPI_Comm_size returned an error\n");
+ exit(EXIT_FAILURE);
}
H5open();
if (mpi_rank == 0) {
- HDfprintf(stdout, "========================================\n");
- HDfprintf(stdout, "Collective file open optimization tests\n");
- HDfprintf(stdout, " mpi_size = %d\n", mpi_size);
- HDfprintf(stdout, "========================================\n");
+ fprintf(stdout, "========================================\n");
+ fprintf(stdout, "Collective file open optimization tests\n");
+ fprintf(stdout, " mpi_size = %d\n", mpi_size);
+ fprintf(stdout, "========================================\n");
}
if (mpi_size < 3) {
if (mpi_rank == 0) {
- HDprintf(" Need at least 3 processes. Exiting.\n");
+ printf(" Need at least 3 processes. Exiting.\n");
}
goto finish;
}
@@ -1121,8 +1121,8 @@ main(int argc, char **argv)
if ((MPI_Comm_split(MPI_COMM_WORLD, which_group, 0, &group_comm)) != MPI_SUCCESS) {
- HDfprintf(stderr, "FATAL: MPI_Comm_split returned an error\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "FATAL: MPI_Comm_split returned an error\n");
+ exit(EXIT_FAILURE);
}
/* ------ Generate all files ------ */
@@ -1132,7 +1132,7 @@ main(int argc, char **argv)
if (nerrs > 0) {
if (mpi_rank == 0) {
- HDprintf(" Test(1) file construction failed -- skipping tests.\n");
+ printf(" Test(1) file construction failed -- skipping tests.\n");
}
goto finish;
}
@@ -1142,7 +1142,7 @@ main(int argc, char **argv)
if (nerrs > 0) {
if (mpi_rank == 0) {
- HDprintf(" Test(2) file construction failed -- skipping tests.\n");
+ printf(" Test(2) file construction failed -- skipping tests.\n");
}
goto finish;
}
@@ -1152,15 +1152,15 @@ main(int argc, char **argv)
if (nerrs > 0) {
if (mpi_rank == 0) {
- HDprintf(" Parallel read test(1) failed -- skipping tests.\n");
+ printf(" Parallel read test(1) failed -- skipping tests.\n");
}
goto finish;
}
/* Update the user on our progress so far. */
if (mpi_rank == 0) {
- HDprintf(" Test 1 of 2 succeeded\n");
- HDprintf(" -- Starting multi-group parallel read test.\n");
+ printf(" Test 1 of 2 succeeded\n");
+ printf(" -- Starting multi-group parallel read test.\n");
}
/* run the 2nd set of tests */
@@ -1168,19 +1168,19 @@ main(int argc, char **argv)
if (nerrs > 0) {
if (mpi_rank == 0) {
- HDprintf(" Multi-group read test(2) failed\n");
+ printf(" Multi-group read test(2) failed\n");
}
goto finish;
}
if (mpi_rank == 0) {
- HDprintf(" Test 2 of 2 succeeded\n");
+ printf(" Test 2 of 2 succeeded\n");
}
finish:
if ((group_comm != MPI_COMM_NULL) && (MPI_Comm_free(&group_comm)) != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI_Comm_free failed!\n");
+ fprintf(stderr, "MPI_Comm_free failed!\n");
}
/* make sure all processes are finished before final report, cleanup
@@ -1191,19 +1191,19 @@ finish:
if (mpi_rank == 0) { /* only process 0 reports */
const char *header = "Collective file open optimization tests";
- HDfprintf(stdout, "===================================\n");
+ fprintf(stdout, "===================================\n");
if (nerrs > 0) {
- HDfprintf(stdout, "***%s detected %d failures***\n", header, nerrs);
+ fprintf(stdout, "***%s detected %d failures***\n", header, nerrs);
}
else {
- HDfprintf(stdout, "%s finished with no failures\n", header);
+ fprintf(stdout, "%s finished with no failures\n", header);
}
- HDfprintf(stdout, "===================================\n");
+ fprintf(stdout, "===================================\n");
}
/* close HDF5 library */
if (H5close() != SUCCEED) {
- HDfprintf(stdout, "H5close() failed. (Ignoring)\n");
+ fprintf(stdout, "H5close() failed. (Ignoring)\n");
}
/* MPI_Finalize must be called AFTER H5close which may use MPI calls */
diff --git a/testpar/t_prestart.c b/testpar/t_prestart.c
index bfa72b6..514906a 100644
--- a/testpar/t_prestart.c
+++ b/testpar/t_prestart.c
@@ -74,8 +74,8 @@ main(int argc, char **argv)
VRFY(dims[1] == (hsize_t)(COL_FACTOR * mpi_size), "Wrong dataset dimensions");
/* allocate memory for data buffer */
- data_array = (DATATYPE *)HDmalloc(dims[0] * dims[1] * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(dims[0] * dims[1] * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* Each process takes a slabs of rows. */
block[0] = dims[0] / (hsize_t)mpi_size;
@@ -103,9 +103,9 @@ main(int argc, char **argv)
for (i = 0; i < block[0]; i++) {
for (j = 0; j < block[1]; j++) {
if (*dataptr != mpi_rank + 1) {
- HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)((hsize_t)i + start[0]),
- (unsigned long)((hsize_t)j + start[1]), mpi_rank + 1, *(dataptr));
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)((hsize_t)i + start[0]),
+ (unsigned long)((hsize_t)j + start[1]), mpi_rank + 1, *(dataptr));
nerrors++;
}
dataptr++;
@@ -116,7 +116,7 @@ main(int argc, char **argv)
/* release data buffers */
if (data_array)
- HDfree(data_array);
+ free(data_array);
nerrors += GetTestNumErrs();
diff --git a/testpar/t_prop.c b/testpar/t_prop.c
index 6f7e28b..c6eb99c 100644
--- a/testpar/t_prop.c
+++ b/testpar/t_prop.c
@@ -35,7 +35,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
ret = H5Pencode2(orig_pl, NULL, &buf_size, H5P_DEFAULT);
VRFY((ret >= 0), "H5Pencode succeeded");
- sbuf = (uint8_t *)HDmalloc(buf_size);
+ sbuf = (uint8_t *)malloc(buf_size);
ret = H5Pencode2(orig_pl, sbuf, &buf_size, H5P_DEFAULT);
VRFY((ret >= 0), "H5Pencode succeeded");
@@ -53,7 +53,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
MPI_Recv(&recv_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status);
buf_size = (size_t)recv_size;
- rbuf = (uint8_t *)HDmalloc(buf_size);
+ rbuf = (uint8_t *)malloc(buf_size);
MPI_Recv(rbuf, recv_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status);
pl = H5Pdecode(rbuf);
@@ -65,7 +65,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
VRFY((ret >= 0), "H5Pclose succeeded");
if (NULL != rbuf)
- HDfree(rbuf);
+ free(rbuf);
} /* end if */
if (0 == mpi_rank) {
@@ -80,7 +80,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
}
if (NULL != sbuf)
- HDfree(sbuf);
+ free(sbuf);
MPI_Barrier(MPI_COMM_WORLD);
return 0;
@@ -147,7 +147,7 @@ test_plist_ed(void)
herr_t ret; /* Generic return value */
if (VERBOSE_MED)
- HDprintf("Encode/Decode DCPLs\n");
+ printf("Encode/Decode DCPLs\n");
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -474,7 +474,7 @@ external_links(void)
char link_path[50];
if (VERBOSE_MED)
- HDprintf("Check external links\n");
+ printf("Check external links\n");
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
diff --git a/testpar/t_pshutdown.c b/testpar/t_pshutdown.c
index 278fd09..013dc1e 100644
--- a/testpar/t_pshutdown.c
+++ b/testpar/t_pshutdown.c
@@ -73,8 +73,8 @@ main(int argc, char **argv)
VRFY((dset_id >= 0), "H5Dcreate succeeded");
/* allocate memory for data buffer */
- data_array = (DATATYPE *)HDmalloc(dims[0] * dims[1] * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(dims[0] * dims[1] * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* Each process takes a slabs of rows. */
block[0] = dims[0] / (hsize_t)mpi_size;
@@ -103,7 +103,7 @@ main(int argc, char **argv)
/* release data buffers */
if (data_array)
- HDfree(data_array);
+ free(data_array);
MPI_Finalize();
diff --git a/testpar/t_select_io_dset.c b/testpar/t_select_io_dset.c
index 10b29e4..eb64bfe 100644
--- a/testpar/t_select_io_dset.c
+++ b/testpar/t_select_io_dset.c
@@ -168,15 +168,15 @@ check_io_mode(hid_t dxpl, unsigned chunked)
if (actual_io_mode != H5D_MPIO_CHUNK_COLLECTIVE) {
nerrors++;
if (MAINPROCESS)
- HDprintf("\n Failed: Incorrect I/O mode (expected chunked, returned %u)",
- (unsigned)actual_io_mode);
+ printf("\n Failed: Incorrect I/O mode (expected chunked, returned %u)",
+ (unsigned)actual_io_mode);
}
}
else if (actual_io_mode != H5D_MPIO_CONTIGUOUS_COLLECTIVE) {
nerrors++;
if (MAINPROCESS)
- HDprintf("\n Failed: Incorrect I/O mode (expected contiguous, returned %u)",
- (unsigned)actual_io_mode);
+ printf("\n Failed: Incorrect I/O mode (expected contiguous, returned %u)",
+ (unsigned)actual_io_mode);
}
} /* check_io_mode() */
@@ -269,7 +269,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf));
+ memcpy(wbuf_bak, wbuf, sizeof(wbuf));
/* Write data to the dataset with/without data transform */
if (H5Dwrite(did, H5T_NATIVE_INT, mspace_id, fspace_id, dxpl, wbuf) < 0)
@@ -277,7 +277,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf));
+ memcpy(wbuf, wbuf_bak, sizeof(wbuf));
check_io_mode(dxpl, chunked);
@@ -289,9 +289,9 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
for (i = 0; i < (int)block[0]; i++)
if (rbuf[i] != (dtrans ? trans_wbuf[i] : wbuf[i])) {
nerrors++;
- HDprintf("\n Error in first data verification:\n");
- HDprintf(" At index %d: %d, %d\n", i + (int)start[0], dtrans ? trans_wbuf[i] : wbuf[i],
- rbuf[i]);
+ printf("\n Error in first data verification:\n");
+ printf(" At index %d: %d, %d\n", i + (int)start[0], dtrans ? trans_wbuf[i] : wbuf[i],
+ rbuf[i]);
break;
}
@@ -305,8 +305,8 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
for (i = 0; i < (int)block[0]; i++)
if (rbuf[i] != (2 * trans_wbuf[i])) {
nerrors++;
- HDprintf("\n Error in second data verification:.\n");
- HDprintf(" At index %d: %d, %d\n", i + (int)start[0], 2 * trans_wbuf[i], rbuf[i]);
+ printf("\n Error in second data verification:.\n");
+ printf(" At index %d: %d, %d\n", i + (int)start[0], 2 * trans_wbuf[i], rbuf[i]);
break;
}
}
@@ -353,11 +353,11 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
curr_nerrors = nerrors;
- if ((wbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
+ if ((wbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
P_TEST_ERROR;
- if (mwbuf && (wbuf_bak = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
+ if (mwbuf && (wbuf_bak = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
P_TEST_ERROR;
- if ((rbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
+ if ((rbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
P_TEST_ERROR;
/* Create 1d data space */
@@ -415,7 +415,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, (size_t)(4 * DSET_SELECT_DIM));
+ memcpy(wbuf_bak, wbuf, (size_t)(4 * DSET_SELECT_DIM));
/* Write the data to the dataset with little endian */
if (H5Dwrite(did, H5T_STD_I32LE, mspace_id, fspace_id, dxpl, wbuf) < 0)
@@ -423,7 +423,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, (size_t)(4 * DSET_SELECT_DIM));
+ memcpy(wbuf, wbuf_bak, (size_t)(4 * DSET_SELECT_DIM));
check_io_mode(dxpl, chunked);
@@ -436,8 +436,8 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (rbuf[4 * i + 0] != wbuf[4 * i + 0] || rbuf[4 * i + 1] != wbuf[4 * i + 1] ||
rbuf[4 * i + 2] != wbuf[4 * i + 2] || rbuf[4 * i + 3] != wbuf[4 * i + 3]) {
nerrors++;
- HDprintf("\n Error in data verification:\n");
- HDprintf("\n Error in data verification at index %d\n", i + (int)start[0]);
+ printf("\n Error in data verification:\n");
+ printf("\n Error in data verification at index %d\n", i + (int)start[0]);
break;
}
}
@@ -451,7 +451,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (rbuf[4 * i + 0] != wbuf[4 * i + 3] || rbuf[4 * i + 1] != wbuf[4 * i + 2] ||
rbuf[4 * i + 2] != wbuf[4 * i + 1] || rbuf[4 * i + 3] != wbuf[4 * i + 0]) {
nerrors++;
- HDprintf("\n Error in data verification at index %d\n", i + (int)start[0]);
+ printf("\n Error in data verification at index %d\n", i + (int)start[0]);
break;
}
}
@@ -467,13 +467,13 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
P_TEST_ERROR;
if (wbuf)
- HDfree(wbuf);
+ free(wbuf);
if (wbuf_bak)
- HDfree(wbuf_bak);
+ free(wbuf_bak);
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
CHECK_PASSED();
@@ -567,7 +567,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf));
+ memcpy(wbuf_bak, wbuf, sizeof(wbuf));
/* Write data to the dataset with/without data transform set in dxpl */
if (H5Dwrite(did, H5T_NATIVE_LONG, mspace_id, fspace_id, dxpl, wbuf) < 0)
@@ -575,7 +575,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf));
+ memcpy(wbuf, wbuf_bak, sizeof(wbuf));
check_io_mode(dxpl, chunked);
@@ -587,9 +587,9 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
for (i = 0; i < (int)block[0]; i++)
if (rbuf[i] != (long long)(dtrans ? trans_wbuf[i] : wbuf[i])) {
nerrors++;
- HDprintf("\n Error in first data verification:\n");
- HDprintf(" At index %d: %lld, %lld\n", i + (int)start[0],
- (long long)(dtrans ? trans_wbuf[i] : wbuf[i]), rbuf[i]);
+ printf("\n Error in first data verification:\n");
+ printf(" At index %d: %lld, %lld\n", i + (int)start[0],
+ (long long)(dtrans ? trans_wbuf[i] : wbuf[i]), rbuf[i]);
break;
}
@@ -603,9 +603,9 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
for (i = 0; i < (int)block[0]; i++)
if (rbuf[i] != (long long)(100 - trans_wbuf[i])) {
nerrors++;
- HDprintf("\n Error in second data verification:.\n");
- HDprintf(" At index %d: %lld, %lld\n", i + (int)start[0],
- (long long)(100 - trans_wbuf[i]), rbuf[i]);
+ printf("\n Error in second data verification:.\n");
+ printf(" At index %d: %lld, %lld\n", i + (int)start[0], (long long)(100 - trans_wbuf[i]),
+ rbuf[i]);
break;
}
}
@@ -716,7 +716,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf));
+ memcpy(wbuf_bak, wbuf, sizeof(wbuf));
/* Write data to the dataset with/without data transform in dxpl */
if (H5Dwrite(did, H5T_NATIVE_SHORT, mspace_id, fspace_id, dxpl, wbuf) < 0)
@@ -724,7 +724,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf));
+ memcpy(wbuf, wbuf_bak, sizeof(wbuf));
check_io_mode(dxpl, chunked);
@@ -736,8 +736,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
for (i = 0; i < (int)block[0]; i++)
if (rbuf[i] != (dtrans ? trans_wbuf[i] : wbuf[i])) {
nerrors++;
- HDprintf("\n Error in first data verification:\n");
- HDprintf(" At index %d: %d, %d\n", i + (int)start[0], wbuf[i], rbuf[i]);
+ printf("\n Error in first data verification:\n");
+ printf(" At index %d: %d, %d\n", i + (int)start[0], wbuf[i], rbuf[i]);
break;
}
@@ -751,9 +751,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
for (i = 0; i < (int)block[0]; i++)
if (rbuf[i] != (2 * (10 + trans_wbuf[i]))) {
nerrors++;
- HDprintf("\n Error in second data verification:.\n");
- HDprintf(" At index %d: %d, %d\n", i + (int)start[0], (2 * (10 - trans_wbuf[i])),
- rbuf[i]);
+ printf("\n Error in second data verification:.\n");
+ printf(" At index %d: %d, %d\n", i + (int)start[0], (2 * (10 - trans_wbuf[i])), rbuf[i]);
break;
}
}
@@ -827,17 +826,17 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
curr_nerrors = nerrors;
/* Allocate buffers for datasets */
- if (NULL == (s1_wbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM)))
+ if (NULL == (s1_wbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM)))
P_TEST_ERROR;
- if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM)))
+ if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM)))
P_TEST_ERROR;
- if (NULL == (s1_rbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM)))
+ if (NULL == (s1_rbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM)))
P_TEST_ERROR;
- if (NULL == (s2_wbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM)))
+ if (NULL == (s2_wbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM)))
P_TEST_ERROR;
- if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM)))
+ if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM)))
P_TEST_ERROR;
- if (NULL == (s2_rbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM)))
+ if (NULL == (s2_rbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM)))
P_TEST_ERROR;
/* Create the memory data type */
@@ -907,7 +906,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
/* Write all the data to the dataset */
if (H5Dwrite(did, s1_tid, mspace_id, fspace_id, dxpl, s1_wbuf) < 0)
@@ -915,12 +914,12 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
check_io_mode(dxpl, chunked);
/* Read all the data from the dataset */
- HDmemset(s1_rbuf, 0, sizeof(s1_t) * DSET_SELECT_DIM);
+ memset(s1_rbuf, 0, sizeof(s1_t) * DSET_SELECT_DIM);
if (H5Dread(did, s1_tid, mspace_id, fspace_id, dxpl, s1_rbuf) < 0)
P_TEST_ERROR;
@@ -929,10 +928,10 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (s1_wbuf[i].a != s1_rbuf[i].a || s1_wbuf[i].b != s1_rbuf[i].b || s1_wbuf[i].c != s1_rbuf[i].c ||
s1_wbuf[i].d != s1_rbuf[i].d) {
nerrors++;
- HDprintf("\n Error in 1st data verification:\n");
- HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], s1_wbuf[i].a,
- s1_rbuf[i].a, s1_wbuf[i].b, s1_rbuf[i].b, s1_wbuf[i].c, s1_rbuf[i].c, s1_wbuf[i].d,
- s1_rbuf[i].d);
+ printf("\n Error in 1st data verification:\n");
+ printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], s1_wbuf[i].a,
+ s1_rbuf[i].a, s1_wbuf[i].b, s1_rbuf[i].b, s1_wbuf[i].c, s1_rbuf[i].c, s1_wbuf[i].d,
+ s1_rbuf[i].d);
break;
}
@@ -957,7 +956,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
/* Write s1_wbuf to the dataset but with only subset members in ss_tid */
if (H5Dwrite(did, ss_ac_tid, mspace_id, fspace_id, dxpl, s1_wbuf) < 0)
@@ -965,10 +964,10 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
/* Read the whole compound back */
- HDmemset(s1_rbuf, 0, sizeof(s1_t) * DSET_SELECT_DIM);
+ memset(s1_rbuf, 0, sizeof(s1_t) * DSET_SELECT_DIM);
if (H5Dread(did, s1_tid, mspace_id, fspace_id, dxpl, s1_rbuf) < 0)
P_TEST_ERROR;
@@ -977,10 +976,10 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (s1_rbuf[i].a != s1_wbuf[i].a || s1_rbuf[i].b != (4 * (i + (int)start[0]) + 1) ||
s1_rbuf[i].c != s1_wbuf[i].c || s1_rbuf[i].d != (4 * (i + (int)start[0]) + 3)) {
nerrors++;
- HDprintf("\n Error in 2nd data verification:\n");
- HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], s1_wbuf[i].a,
- s1_rbuf[i].a, (4 * (i + (int)start[0]) + 1), s1_rbuf[i].b, s1_wbuf[i].c, s1_rbuf[i].c,
- (4 * (i + (int)start[0]) + 3), s1_rbuf[i].d);
+ printf("\n Error in 2nd data verification:\n");
+ printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], s1_wbuf[i].a,
+ s1_rbuf[i].a, (4 * (i + (int)start[0]) + 1), s1_rbuf[i].b, s1_wbuf[i].c, s1_rbuf[i].c,
+ (4 * (i + (int)start[0]) + 3), s1_rbuf[i].d);
break;
}
@@ -1014,12 +1013,12 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
s1_rbuf[i].c != (4 * (i + (int)start[0]) + DSET_SELECT_DIM + 2) ||
s1_rbuf[i].d != ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3)) {
nerrors++;
- HDprintf("\n Error in 3rd data verification:\n");
- HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0],
- ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM)), s1_rbuf[i].a,
- (4 * (i + (int)start[0]) + 1), s1_rbuf[i].b,
- (4 * (i + (int)start[0]) + DSET_SELECT_DIM + 2), s1_rbuf[i].c,
- ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3), s1_rbuf[i].d);
+ printf("\n Error in 3rd data verification:\n");
+ printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0],
+ ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM)), s1_rbuf[i].a,
+ (4 * (i + (int)start[0]) + 1), s1_rbuf[i].b,
+ (4 * (i + (int)start[0]) + DSET_SELECT_DIM + 2), s1_rbuf[i].c,
+ ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3), s1_rbuf[i].d);
break;
}
@@ -1049,17 +1048,17 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s2_wbuf_bak, s2_wbuf, sizeof(s2_t) * DSET_SELECT_DIM);
+ memcpy(s2_wbuf_bak, s2_wbuf, sizeof(s2_t) * DSET_SELECT_DIM);
if (H5Dwrite(did, s2_tid, mspace_id, fspace_id, dxpl, s2_wbuf) < 0)
P_TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s2_wbuf, s2_wbuf_bak, sizeof(s2_t) * DSET_SELECT_DIM);
+ memcpy(s2_wbuf, s2_wbuf_bak, sizeof(s2_t) * DSET_SELECT_DIM);
/* Read it back */
- HDmemset(s2_rbuf, 0, sizeof(s2_t) * DSET_SELECT_DIM);
+ memset(s2_rbuf, 0, sizeof(s2_t) * DSET_SELECT_DIM);
if (H5Dread(did, s2_tid, mspace_id, fspace_id, dxpl, s2_rbuf) < 0)
P_TEST_ERROR;
@@ -1068,10 +1067,10 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (s2_wbuf[i].a != s2_rbuf[i].a || s2_wbuf[i].b != s2_rbuf[i].b || s2_wbuf[i].c != s2_rbuf[i].c ||
s2_wbuf[i].d != s2_rbuf[i].d) {
nerrors++;
- HDprintf("\n Error in 4th data verification:\n");
- HDprintf(" At index %d: %d/%d, %lld/%lld, %d/%d, %d/%d\n", i + (int)start[0], s2_wbuf[i].a,
- s2_rbuf[i].a, s2_wbuf[i].b, s2_rbuf[i].b, s2_wbuf[i].c, s2_rbuf[i].c, s2_wbuf[i].d,
- s2_rbuf[i].d);
+ printf("\n Error in 4th data verification:\n");
+ printf(" At index %d: %d/%d, %lld/%lld, %d/%d, %d/%d\n", i + (int)start[0], s2_wbuf[i].a,
+ s2_rbuf[i].a, s2_wbuf[i].b, s2_rbuf[i].b, s2_wbuf[i].c, s2_rbuf[i].c, s2_wbuf[i].d,
+ s2_rbuf[i].d);
break;
}
@@ -1094,12 +1093,12 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
P_TEST_ERROR;
/* Release buffers */
- HDfree(s1_wbuf);
- HDfree(s1_wbuf_bak);
- HDfree(s1_rbuf);
- HDfree(s2_wbuf);
- HDfree(s2_wbuf_bak);
- HDfree(s2_rbuf);
+ free(s1_wbuf);
+ free(s1_wbuf_bak);
+ free(s1_rbuf);
+ free(s2_wbuf);
+ free(s2_wbuf_bak);
+ free(s2_rbuf);
CHECK_PASSED();
@@ -1213,7 +1212,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(lwbuf_bak, lwbuf, sizeof(lwbuf));
+ memcpy(lwbuf_bak, lwbuf, sizeof(lwbuf));
/* Write data to the dataset with/without data transform in dxpl */
if (H5Dwrite(did, H5T_NATIVE_LONG, mspace_id, fspace_id, dxpl, lwbuf) < 0)
@@ -1221,7 +1220,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(lwbuf, lwbuf_bak, sizeof(lwbuf));
+ memcpy(lwbuf, lwbuf_bak, sizeof(lwbuf));
check_io_mode(dxpl, chunked);
@@ -1234,9 +1233,9 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
for (i = 0; i < (int)block[0]; i++)
if (lrbuf[i] != (dtrans ? trans_lwbuf[i] : lwbuf[i])) {
nerrors++;
- HDprintf("\n Error in first data verification:\n");
- HDprintf(" At index %d: %ld, %ld\n", i + (int)start[0],
- dtrans ? trans_lwbuf[i] : lwbuf[i], lrbuf[i]);
+ printf("\n Error in first data verification:\n");
+ printf(" At index %d: %ld, %ld\n", i + (int)start[0], dtrans ? trans_lwbuf[i] : lwbuf[i],
+ lrbuf[i]);
break;
}
}
@@ -1272,7 +1271,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(lwbuf_bak, lwbuf, sizeof(lwbuf));
+ memcpy(lwbuf_bak, lwbuf, sizeof(lwbuf));
/* Write data to the dataset with/without data transform */
if (H5Dwrite(did, H5T_NATIVE_LONG, mspace_id, fspace_id, dxpl, lwbuf) < 0)
@@ -1280,7 +1279,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(lwbuf, lwbuf_bak, sizeof(lwbuf));
+ memcpy(lwbuf, lwbuf_bak, sizeof(lwbuf));
/* Read the data from the dataset: type conversion int-->short */
/* If dtrans, without data transform set in dxpl */
@@ -1290,9 +1289,9 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
if (mpi_rank) {
for (i = 0; i < (int)block[0]; i++)
if (srbuf[i] != (short)(dtrans ? trans_lwbuf[i] : lwbuf[i])) {
- HDprintf("\n Error in second data verification:\n");
- HDprintf(" At index %d: %d, %d\n", i + (int)start[0],
- (short)(dtrans ? trans_lwbuf[i] : lwbuf[i]), srbuf[i]);
+ printf("\n Error in second data verification:\n");
+ printf(" At index %d: %d, %d\n", i + (int)start[0],
+ (short)(dtrans ? trans_lwbuf[i] : lwbuf[i]), srbuf[i]);
break;
}
}
@@ -1333,7 +1332,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(swbuf_bak, swbuf, sizeof(swbuf));
+ memcpy(swbuf_bak, swbuf, sizeof(swbuf));
/* Write data to the dataset with/without data transform */
if (H5Dwrite(did, H5T_NATIVE_SHORT, mspace_id, fspace_id, dxpl, swbuf) < 0)
@@ -1341,7 +1340,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(swbuf, swbuf_bak, sizeof(swbuf));
+ memcpy(swbuf, swbuf_bak, sizeof(swbuf));
/* Read the data from the dataset: type conversion int-->llong */
/* If dtrans, without data transform set in dxpl */
@@ -1351,9 +1350,9 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
if (mpi_rank) {
for (i = 0; i < (int)block[0]; i++)
if (llrbuf[i] != (long long)(dtrans ? trans_swbuf[i] : swbuf[i])) {
- HDprintf("\n Error in third data verification:\n");
- HDprintf(" At index %d: %lld, %lld\n", i + (int)start[0],
- (long long)(dtrans ? trans_swbuf[i] : swbuf[i]), llrbuf[i]);
+ printf("\n Error in third data verification:\n");
+ printf(" At index %d: %lld, %lld\n", i + (int)start[0],
+ (long long)(dtrans ? trans_swbuf[i] : swbuf[i]), llrbuf[i]);
break;
}
}
@@ -1496,24 +1495,24 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
buf_size = ndsets * DSET_SELECT_DIM * sizeof(int);
/* Allocate buffers for all datasets */
- if (NULL == (total_wbuf = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf = (int *)malloc(buf_size)))
P_TEST_ERROR;
- if (mwbuf && NULL == (total_wbuf_bak = (int *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (total_wbuf_bak = (int *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_trans_wbuf = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_trans_wbuf = (int *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_rbuf = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_rbuf = (int *)malloc(buf_size)))
P_TEST_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(long);
- if (NULL == (total_lwbuf = (long *)HDmalloc(buf_size)))
+ if (NULL == (total_lwbuf = (long *)malloc(buf_size)))
P_TEST_ERROR;
- if (mwbuf && NULL == (total_lwbuf_bak = (long *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (total_lwbuf_bak = (long *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_trans_lwbuf = (long *)HDmalloc(buf_size)))
+ if (NULL == (total_trans_lwbuf = (long *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_lrbuf = (long *)HDmalloc(buf_size)))
+ if (NULL == (total_lrbuf = (long *)malloc(buf_size)))
P_TEST_ERROR;
/* Initialize buffer indices */
@@ -1541,7 +1540,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(total_wbuf_bak, total_wbuf, ndsets * DSET_SELECT_DIM * sizeof(int));
/* Write data to the dataset with/without data transform */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1549,7 +1548,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(total_wbuf, total_wbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
check_io_mode(dxpl, chunked);
@@ -1562,9 +1561,9 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
for (j = 0; j < (int)block[0]; j++)
if (rbufi[i][j] != (dtrans ? trans_wbufi[i][j] : wbufi[i][j])) {
nerrors++;
- HDprintf("\n Error in 1st data verification for dset %d:\n", i);
- HDprintf(" At index %d: %d, %d\n", j + (int)start[0],
- dtrans ? trans_wbufi[i][j] : wbufi[i][j], rbufi[i][j]);
+ printf("\n Error in 1st data verification for dset %d:\n", i);
+ printf(" At index %d: %d, %d\n", j + (int)start[0],
+ dtrans ? trans_wbufi[i][j] : wbufi[i][j], rbufi[i][j]);
break;
}
@@ -1579,9 +1578,9 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
for (j = 0; j < (int)block[0]; j++)
if (rbufi[i][j] != (2 * trans_wbufi[i][j])) {
nerrors++;
- HDprintf("\n Error in 1st (with dtrans) data verification for dset %d:\n", i);
- HDprintf(" At index %d: %d, %d\n", j + (int)start[0], 2 * trans_wbufi[i][j],
- rbufi[i][j]);
+ printf("\n Error in 1st (with dtrans) data verification for dset %d:\n", i);
+ printf(" At index %d: %d, %d\n", j + (int)start[0], 2 * trans_wbufi[i][j],
+ rbufi[i][j]);
break;
}
}
@@ -1610,7 +1609,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_lwbuf_bak, total_lwbuf, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(total_lwbuf_bak, total_lwbuf, ndsets * DSET_SELECT_DIM * sizeof(long));
/* Write data to the dataset with/without data transform */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1618,7 +1617,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_lwbuf, total_lwbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(total_lwbuf, total_lwbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
/* Read data from the dataset (if dtrans, with data transform again in dxpl */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -1628,9 +1627,9 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
for (j = 0; j < (int)block[0]; j++) {
if (lrbufi[i][j] != (dtrans ? (2 * trans_lwbufi[i][j]) : lwbufi[i][j])) {
nerrors++;
- HDprintf("\n Error in 2nd data verification for dset %d:\n", i);
- HDprintf(" At index %d: %ld/%ld\n", j + (int)start[0],
- (dtrans ? (2 * trans_lwbufi[i][j]) : lwbufi[i][j]), lrbufi[i][j]);
+ printf("\n Error in 2nd data verification for dset %d:\n", i);
+ printf(" At index %d: %ld/%ld\n", j + (int)start[0],
+ (dtrans ? (2 * trans_lwbufi[i][j]) : lwbufi[i][j]), lrbufi[i][j]);
break;
}
}
@@ -1652,14 +1651,14 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
P_TEST_ERROR;
}
- HDfree(total_wbuf);
- HDfree(total_wbuf_bak);
- HDfree(total_rbuf);
- HDfree(total_trans_wbuf);
- HDfree(total_lwbuf);
- HDfree(total_lwbuf_bak);
- HDfree(total_trans_lwbuf);
- HDfree(total_lrbuf);
+ free(total_wbuf);
+ free(total_wbuf_bak);
+ free(total_rbuf);
+ free(total_trans_wbuf);
+ free(total_lwbuf);
+ free(total_lwbuf_bak);
+ free(total_trans_lwbuf);
+ free(total_lrbuf);
CHECK_PASSED();
@@ -1806,18 +1805,18 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
s2_buf_size = ndsets * DSET_SELECT_DIM * sizeof(s2_t);
/* Allocate buffers for all datasets */
- if (NULL == (total_wbuf = (s1_t *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf = (s1_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_rbuf = (s1_t *)HDmalloc(buf_size)))
+ if (NULL == (total_rbuf = (s1_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (s2_total_wbuf = (s2_t *)HDmalloc(s2_buf_size)))
+ if (NULL == (s2_total_wbuf = (s2_t *)malloc(s2_buf_size)))
P_TEST_ERROR;
- if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)HDmalloc(s2_buf_size)))
+ if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)malloc(s2_buf_size)))
P_TEST_ERROR;
- if (NULL == (s2_total_rbuf = (s2_t *)HDmalloc(s2_buf_size)))
+ if (NULL == (s2_total_rbuf = (s2_t *)malloc(s2_buf_size)))
P_TEST_ERROR;
/* Initialize buffer indices */
@@ -1846,14 +1845,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
P_TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
check_io_mode(dxpl, chunked);
@@ -1866,10 +1865,10 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (wbufi[i][j].a != rbufi[i][j].a || wbufi[i][j].b != rbufi[i][j].b ||
wbufi[i][j].c != rbufi[i][j].c || wbufi[i][j].d != rbufi[i][j].d) {
nerrors++;
- HDprintf("\n Error in 1st data verification for dset %d:\n", i);
- HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[i][j].a,
- rbufi[i][j].a, wbufi[i][j].b, rbufi[i][j].b, wbufi[i][j].c, rbufi[i][j].c,
- wbufi[i][j].d, rbufi[i][j].d);
+ printf("\n Error in 1st data verification for dset %d:\n", i);
+ printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[i][j].a,
+ rbufi[i][j].a, wbufi[i][j].b, rbufi[i][j].b, wbufi[i][j].c, rbufi[i][j].c,
+ wbufi[i][j].d, rbufi[i][j].d);
break;
}
@@ -1910,14 +1909,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
P_TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
P_TEST_ERROR;
@@ -1929,10 +1928,10 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (wbufi[i][j].a != rbufi[i][j].a || (4 * (j + (int)start[0]) + 1) != rbufi[i][j].b ||
wbufi[i][j].c != rbufi[i][j].c || (4 * (j + (int)start[0]) + 3) != rbufi[i][j].d) {
nerrors++;
- HDprintf("\n Error in 2nd data verification for dset %d:\n", i);
- HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0],
- wbufi[i][j].a, rbufi[i][j].a, (4 * (j + (int)start[0]) + 1), rbufi[i][j].b,
- wbufi[i][j].c, rbufi[i][j].c, (4 * (j + (int)start[0]) + 3), rbufi[i][j].d);
+ printf("\n Error in 2nd data verification for dset %d:\n", i);
+ printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[i][j].a,
+ rbufi[i][j].a, (4 * (j + (int)start[0]) + 1), rbufi[i][j].b, wbufi[i][j].c,
+ rbufi[i][j].c, (4 * (j + (int)start[0]) + 3), rbufi[i][j].d);
break;
}
}
@@ -1943,11 +1942,11 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
(4 * (j + (int)start[0]) + 2) != rbufi[i][j].c ||
(4 * (j + (int)start[0]) + 3) != rbufi[i][j].d) {
nerrors++;
- HDprintf("\n Error in 2nd data verification for dset %d:\n", i);
- HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0],
- (4 * (j + (int)start[0])), rbufi[i][j].a, (4 * (j + (int)start[0]) + 1),
- rbufi[i][j].b, (4 * (j + (int)start[0]) + 2), rbufi[i][j].c,
- (4 * (j + (int)start[0]) + 3), rbufi[i][j].d);
+ printf("\n Error in 2nd data verification for dset %d:\n", i);
+ printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0],
+ (4 * (j + (int)start[0])), rbufi[i][j].a, (4 * (j + (int)start[0]) + 1),
+ rbufi[i][j].b, (4 * (j + (int)start[0]) + 2), rbufi[i][j].c,
+ (4 * (j + (int)start[0]) + 3), rbufi[i][j].d);
break;
}
}
@@ -2004,10 +2003,10 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (wbufi[0][j].a != rbufi[0][j].a || ((4 * (j + (int)start[0])) + 1) != rbufi[0][j].b ||
wbufi[0][j].c != rbufi[0][j].c || ((4 * (j + (int)start[0])) + 3) != rbufi[0][j].d) {
nerrors++;
- HDprintf("\n Error in 3rd data verification for dset0:\n");
- HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[0][j].a,
- rbufi[0][j].a, (4 * (j + (int)start[0]) + 1), rbufi[0][j].b, wbufi[0][j].c,
- rbufi[0][j].c, (4 * (j + (int)start[0]) + 3), rbufi[0][j].d);
+ printf("\n Error in 3rd data verification for dset0:\n");
+ printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[0][j].a,
+ rbufi[0][j].a, (4 * (j + (int)start[0]) + 1), rbufi[0][j].b, wbufi[0][j].c, rbufi[0][j].c,
+ (4 * (j + (int)start[0]) + 3), rbufi[0][j].d);
break;
}
@@ -2018,11 +2017,11 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
rbufi[mm][j].c != ((4 * (j + (int)start[0])) + 2) ||
rbufi[mm][j].d != ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3)) {
nerrors++;
- HDprintf("\n Error in 3rd data verification for dset %d:\n", mm);
- HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0],
- ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM)), rbufi[mm][j].a,
- ((4 * (j + (int)start[0])) + 1), rbufi[mm][j].b, ((4 * (j + (int)start[0])) + 2),
- rbufi[mm][j].c, ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3), rbufi[mm][j].d);
+ printf("\n Error in 3rd data verification for dset %d:\n", mm);
+ printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0],
+ ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM)), rbufi[mm][j].a,
+ ((4 * (j + (int)start[0])) + 1), rbufi[mm][j].b, ((4 * (j + (int)start[0])) + 2),
+ rbufi[mm][j].c, ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3), rbufi[mm][j].d);
break;
}
@@ -2037,11 +2036,11 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
rbufi[i][j].c != ((4 * (j + (int)start[0])) + 2) ||
rbufi[i][j].d != ((4 * (j + (int)start[0])) + 3)) {
nerrors++;
- HDprintf("\n Error in 3rd data verification for dset %d:\n", i);
- HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0],
- ((4 * (j + (int)start[0]))), rbufi[i][j].a, ((4 * (j + (int)start[0])) + 1),
- rbufi[i][j].b, ((4 * (j + (int)start[0])) + 2), rbufi[i][j].c,
- ((4 * (j + (int)start[0])) + 3), rbufi[i][j].d);
+ printf("\n Error in 3rd data verification for dset %d:\n", i);
+ printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0],
+ ((4 * (j + (int)start[0]))), rbufi[i][j].a, ((4 * (j + (int)start[0])) + 1),
+ rbufi[i][j].b, ((4 * (j + (int)start[0])) + 2), rbufi[i][j].c,
+ ((4 * (j + (int)start[0])) + 3), rbufi[i][j].d);
break;
}
}
@@ -2090,14 +2089,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s2_total_wbuf_bak, s2_total_wbuf, s2_buf_size);
+ memcpy(s2_total_wbuf_bak, s2_total_wbuf, s2_buf_size);
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
P_TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s2_total_wbuf, s2_total_wbuf_bak, s2_buf_size);
+ memcpy(s2_total_wbuf, s2_total_wbuf_bak, s2_buf_size);
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
P_TEST_ERROR;
@@ -2107,10 +2106,10 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (s2_rbufi[i][j].a != s2_wbufi[i][j].a || s2_rbufi[i][j].b != s2_wbufi[i][j].b ||
s2_rbufi[i][j].c != s2_wbufi[i][j].c || s2_rbufi[i][j].d != s2_wbufi[i][j].d) {
nerrors++;
- HDprintf("\n Error in 3rd data verification for dset %d:\n", i);
- HDprintf(" At index %d: %d/%d, %lld/%lld, %d/%d, %d/%d\n", j + (int)start[0],
- s2_wbufi[i][j].a, s2_rbufi[i][j].a, s2_wbufi[i][j].b, s2_rbufi[i][j].b,
- s2_wbufi[i][j].c, s2_rbufi[i][j].c, s2_wbufi[i][j].d, s2_rbufi[i][j].d);
+ printf("\n Error in 3rd data verification for dset %d:\n", i);
+ printf(" At index %d: %d/%d, %lld/%lld, %d/%d, %d/%d\n", j + (int)start[0],
+ s2_wbufi[i][j].a, s2_rbufi[i][j].a, s2_wbufi[i][j].b, s2_rbufi[i][j].b,
+ s2_wbufi[i][j].c, s2_rbufi[i][j].c, s2_wbufi[i][j].d, s2_rbufi[i][j].d);
break;
}
}
@@ -2130,12 +2129,12 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
P_TEST_ERROR;
}
- HDfree(total_wbuf);
- HDfree(total_wbuf_bak);
- HDfree(total_rbuf);
- HDfree(s2_total_wbuf);
- HDfree(s2_total_wbuf_bak);
- HDfree(s2_total_rbuf);
+ free(total_wbuf);
+ free(total_wbuf_bak);
+ free(total_rbuf);
+ free(s2_total_wbuf);
+ free(s2_total_wbuf_bak);
+ free(s2_total_rbuf);
CHECK_PASSED();
@@ -2255,11 +2254,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
buf_size = ndsets * ss * DSET_SELECT_DIM;
/* Allocate buffers for all datasets */
- if (NULL == (total_wbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf = (uint8_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_wbuf_bak = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf_bak = (uint8_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_rbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_rbuf = (uint8_t *)malloc(buf_size)))
P_TEST_ERROR;
/* Initialize buffer indices */
@@ -2286,7 +2285,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
/* Write data to the dataset */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -2294,7 +2293,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
check_io_mode(dxpl, chunked);
@@ -2312,8 +2311,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
rbufi[i][(int)ss * j + 2] != wbufi[i][(int)ss * j + 2] ||
rbufi[i][(int)ss * j + 3] != wbufi[i][(int)ss * j + 3]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j + (int)start[0]);
P_TEST_ERROR;
}
}
@@ -2324,11 +2323,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
buf_size = ndsets * (ss * DSET_SELECT_DIM);
/* Allocate buffers for all datasets */
- if (NULL == (total_lwbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_lwbuf = (uint8_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_lwbuf_bak = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_lwbuf_bak = (uint8_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_lrbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_lrbuf = (uint8_t *)malloc(buf_size)))
P_TEST_ERROR;
/* Initialize buffer indices */
@@ -2359,7 +2358,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_lwbuf_bak, total_lwbuf, buf_size);
+ memcpy(total_lwbuf_bak, total_lwbuf, buf_size);
/* Write data to the dataset */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -2367,7 +2366,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_lwbuf, total_lwbuf_bak, buf_size);
+ memcpy(total_lwbuf, total_lwbuf_bak, buf_size);
/* Read data from the dataset */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -2387,8 +2386,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
lrbufi[i][(int)ss * j + 6] != lwbufi[i][(int)ss * j + 6] ||
lrbufi[i][(int)ss * j + 7] != lwbufi[i][(int)ss * j + 7]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j + (int)start[0]);
P_TEST_ERROR;
}
}
@@ -2399,11 +2398,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
buf_size = ndsets * (ss * DSET_SELECT_DIM);
/* Allocate buffers for all datasets */
- if (NULL == (total_swbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_swbuf = (uint8_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_swbuf_bak = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_swbuf_bak = (uint8_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_srbuf = (uint8_t *)HDmalloc(buf_size)))
+ if (NULL == (total_srbuf = (uint8_t *)malloc(buf_size)))
P_TEST_ERROR;
/* Initialize buffer indices */
@@ -2428,7 +2427,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_swbuf_bak, total_swbuf, buf_size);
+ memcpy(total_swbuf_bak, total_swbuf, buf_size);
/* Write data to the dataset */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -2436,7 +2435,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_swbuf, total_swbuf_bak, buf_size);
+ memcpy(total_swbuf, total_swbuf_bak, buf_size);
/* Read data from the dataset */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -2449,8 +2448,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
if (srbufi[i][(int)ss * j + 0] != swbufi[i][(int)ss * j + 0] ||
srbufi[i][(int)ss * j + 1] != swbufi[i][(int)ss * j + 1]) {
H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j + (int)start[0]);
P_TEST_ERROR;
}
@@ -2468,15 +2467,15 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
P_TEST_ERROR;
}
- HDfree(total_wbuf);
- HDfree(total_wbuf_bak);
- HDfree(total_rbuf);
- HDfree(total_lwbuf);
- HDfree(total_lwbuf_bak);
- HDfree(total_lrbuf);
- HDfree(total_swbuf);
- HDfree(total_swbuf_bak);
- HDfree(total_srbuf);
+ free(total_wbuf);
+ free(total_wbuf_bak);
+ free(total_rbuf);
+ free(total_lwbuf);
+ free(total_lwbuf_bak);
+ free(total_lrbuf);
+ free(total_swbuf);
+ free(total_swbuf_bak);
+ free(total_srbuf);
CHECK_PASSED();
@@ -2599,13 +2598,13 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un
buf_size = ndsets * DSET_SELECT_DIM * sizeof(int);
/* Allocate buffers for all datasets */
- if (NULL == (total_wbuf = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf = (int *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_wbuf_bak = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf_bak = (int *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_trans_wbuf = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_trans_wbuf = (int *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_lrbuf = (long *)HDmalloc(ndsets * DSET_SELECT_DIM * sizeof(long))))
+ if (NULL == (total_lrbuf = (long *)malloc(ndsets * DSET_SELECT_DIM * sizeof(long))))
P_TEST_ERROR;
/* Initialize buffer indices */
@@ -2755,7 +2754,7 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
/* Write data to the dataset with/without data transform */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -2763,7 +2762,7 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
check_io_mode(dxpl, chunked);
@@ -2785,8 +2784,8 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un
for (j = 0; j < save_block0; j++)
if (l_rbufi[0][j] != (dtrans ? (long)trans_wbufi[0][j] : (long)wbufi[0][j])) {
nerrors++;
- HDprintf(" Verify dset0 at index %d: %ld, %ld\n", j + (int)start[0],
- dtrans ? (long)trans_wbufi[0][j] : (long)wbufi[0][j], l_rbufi[0][j]);
+ printf(" Verify dset0 at index %d: %ld, %ld\n", j + (int)start[0],
+ dtrans ? (long)trans_wbufi[0][j] : (long)wbufi[0][j], l_rbufi[0][j]);
break;
}
}
@@ -2796,8 +2795,8 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un
for (j = 0; j < (int)block[0]; j++)
if (l_rbufi[mm][j] != (long)(dtrans ? trans_wbufi[mm][j] : wbufi[mm][j])) {
nerrors++;
- HDprintf(" Verify dset %d at index %d: %ld, %ld\n", mm, j + (int)start[0],
- (long)(dtrans ? trans_wbufi[mm][j] : wbufi[mm][j]), l_rbufi[mm][j]);
+ printf(" Verify dset %d at index %d: %ld, %ld\n", mm, j + (int)start[0],
+ (long)(dtrans ? trans_wbufi[mm][j] : wbufi[mm][j]), l_rbufi[mm][j]);
break;
}
@@ -2805,8 +2804,8 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un
for (j = 0; j < (int)dims[0]; j++)
if (l_rbufi[ll][j] != (long)(dtrans ? trans_wbufi[ll][j] : wbufi[ll][j])) {
nerrors++;
- HDprintf(" Verify dset %d at index %d: %ld, %ld\n", ll, j,
- (long)(dtrans ? trans_wbufi[ll][j] : wbufi[ll][j]), l_rbufi[ll][j]);
+ printf(" Verify dset %d at index %d: %ld, %ld\n", ll, j,
+ (long)(dtrans ? trans_wbufi[ll][j] : wbufi[ll][j]), l_rbufi[ll][j]);
break;
}
}
@@ -2827,10 +2826,10 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un
P_TEST_ERROR;
}
- HDfree(total_wbuf);
- HDfree(total_wbuf_bak);
- HDfree(total_trans_wbuf);
- HDfree(total_lrbuf);
+ free(total_wbuf);
+ free(total_wbuf_bak);
+ free(total_trans_wbuf);
+ free(total_lrbuf);
CHECK_PASSED();
@@ -3065,49 +3064,49 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* DSET_WITH_NO_CONV */
buf_size = ndsets * DSET_SELECT_DIM * sizeof(int);
- if (NULL == (total_wbuf1 = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_wbuf1 = (int *)malloc(buf_size)))
P_TEST_ERROR;
- if (mwbuf && NULL == (total_wbuf1_bak = (int *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (total_wbuf1_bak = (int *)malloc(buf_size)))
P_TEST_ERROR;
- if (NULL == (total_rbuf1 = (int *)HDmalloc(buf_size)))
+ if (NULL == (total_rbuf1 = (int *)malloc(buf_size)))
P_TEST_ERROR;
/* DSET_WITH_CONV_AND_NO_BKG */
buf_size = ndsets * DSET_SELECT_DIM * sizeof(unsigned long);
- if (NULL == (ul_total_wbuf2 = (unsigned long *)HDmalloc(buf_size)))
+ if (NULL == (ul_total_wbuf2 = (unsigned long *)malloc(buf_size)))
P_TEST_ERROR;
- if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)malloc(buf_size)))
P_TEST_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(long);
- if (NULL == (l_total_rbuf2 = (long *)HDmalloc(buf_size)))
+ if (NULL == (l_total_rbuf2 = (long *)malloc(buf_size)))
P_TEST_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(long);
- if (NULL == (l_total_wbuf2 = (long *)HDmalloc(buf_size)))
+ if (NULL == (l_total_wbuf2 = (long *)malloc(buf_size)))
P_TEST_ERROR;
- if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)malloc(buf_size)))
P_TEST_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(short);
- if (NULL == (s_total_rbuf2 = (short *)HDmalloc(buf_size)))
+ if (NULL == (s_total_rbuf2 = (short *)malloc(buf_size)))
P_TEST_ERROR;
/* DSET_WITH_CONV_AND_BKG */
buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t);
- if (NULL == (s1_total_wbuf3 = (s1_t *)HDmalloc(buf_size)))
+ if (NULL == (s1_total_wbuf3 = (s1_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)malloc(buf_size)))
P_TEST_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(s3_t);
- if (NULL == (s3_total_rbuf3 = (s3_t *)HDmalloc(buf_size)))
+ if (NULL == (s3_total_rbuf3 = (s3_t *)malloc(buf_size)))
P_TEST_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(s4_t);
- if (NULL == (s4_total_wbuf3 = (s4_t *)HDmalloc(buf_size)))
+ if (NULL == (s4_total_wbuf3 = (s4_t *)malloc(buf_size)))
P_TEST_ERROR;
- if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)HDmalloc(buf_size)))
+ if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)malloc(buf_size)))
P_TEST_ERROR;
buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t);
- if (NULL == (s1_total_rbuf3 = (s1_t *)HDmalloc(buf_size)))
+ if (NULL == (s1_total_rbuf3 = (s1_t *)malloc(buf_size)))
P_TEST_ERROR;
/* Test with s settings for ndsets */
@@ -3218,12 +3217,11 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbufs if the library will be modifying them */
if (mwbuf) {
- HDmemcpy(total_wbuf1_bak, total_wbuf1, ndsets * DSET_SELECT_DIM * sizeof(int));
- HDmemcpy(ul_total_wbuf2_bak, ul_total_wbuf2,
- ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
- HDmemcpy(l_total_wbuf2_bak, l_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(long));
- HDmemcpy(s1_total_wbuf3_bak, s1_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
- HDmemcpy(s4_total_wbuf3_bak, s4_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
+ memcpy(total_wbuf1_bak, total_wbuf1, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(ul_total_wbuf2_bak, ul_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
+ memcpy(l_total_wbuf2_bak, l_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(s1_total_wbuf3_bak, s1_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
+ memcpy(s4_total_wbuf3_bak, s4_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
}
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -3231,12 +3229,11 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbufs from backup if the library modified them */
if (mwbuf) {
- HDmemcpy(total_wbuf1, total_wbuf1_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
- HDmemcpy(ul_total_wbuf2, ul_total_wbuf2_bak,
- ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
- HDmemcpy(l_total_wbuf2, l_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
- HDmemcpy(s1_total_wbuf3, s1_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
- HDmemcpy(s4_total_wbuf3, s4_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
+ memcpy(total_wbuf1, total_wbuf1_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(ul_total_wbuf2, ul_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
+ memcpy(l_total_wbuf2, l_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(s1_total_wbuf3, s1_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
+ memcpy(s4_total_wbuf3, s4_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
}
if (H5Dread_multi(ndsets, dset_dids, r_mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -3253,8 +3250,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
for (j = 0; j < (int)block[0]; j++)
if (rbufi1[i][j] != wbufi1[i][j]) {
nerrors++;
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j + (int)start[0]);
break;
}
@@ -3265,8 +3262,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
for (j = 0; j < (int)block[0]; j++)
if (l_rbufi2[i][j] != LONG_MAX) {
nerrors++;
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j + (int)start[0]);
break;
}
}
@@ -3274,8 +3271,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
for (j = 0; j < (int)block[0]; j++)
if (s_rbufi2[i][j] != SHRT_MAX) {
nerrors++;
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j + (int)start[0]);
break;
}
}
@@ -3290,8 +3287,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
s3_rbufi3[i][j].c != s1_wbufi3[i][j].c ||
s3_rbufi3[i][j].d != s1_wbufi3[i][j].d) {
nerrors++;
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j + (int)start[0]);
break;
}
}
@@ -3302,8 +3299,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
s1_rbufi3[i][j].c != s1_wbufi3[i][j].c ||
s1_rbufi3[i][j].d != (DSET_SELECT_DIM + j + (int)start[0])) {
nerrors++;
- HDprintf(" Read different values than written.\n");
- HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]);
+ printf(" Read different values than written.\n");
+ printf(" For dset %d at index %d\n", i, j + (int)start[0]);
break;
}
}
@@ -3345,37 +3342,37 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
}
/* Freeing */
- HDfree(total_wbuf1);
+ free(total_wbuf1);
total_wbuf1 = NULL;
- HDfree(total_wbuf1_bak);
+ free(total_wbuf1_bak);
total_wbuf1_bak = NULL;
- HDfree(total_rbuf1);
+ free(total_rbuf1);
total_rbuf1 = NULL;
- HDfree(ul_total_wbuf2);
+ free(ul_total_wbuf2);
ul_total_wbuf2 = NULL;
- HDfree(ul_total_wbuf2_bak);
+ free(ul_total_wbuf2_bak);
ul_total_wbuf2_bak = NULL;
- HDfree(l_total_rbuf2);
+ free(l_total_rbuf2);
l_total_rbuf2 = NULL;
- HDfree(l_total_wbuf2);
+ free(l_total_wbuf2);
l_total_wbuf2 = NULL;
- HDfree(l_total_wbuf2_bak);
+ free(l_total_wbuf2_bak);
l_total_wbuf2_bak = NULL;
- HDfree(s_total_rbuf2);
+ free(s_total_rbuf2);
s_total_rbuf2 = NULL;
- HDfree(s1_total_wbuf3);
+ free(s1_total_wbuf3);
s1_total_wbuf3 = NULL;
- HDfree(s1_total_wbuf3_bak);
+ free(s1_total_wbuf3_bak);
s1_total_wbuf3_bak = NULL;
- HDfree(s3_total_rbuf3);
+ free(s3_total_rbuf3);
s3_total_rbuf3 = NULL;
- HDfree(s4_total_wbuf3);
+ free(s4_total_wbuf3);
s4_total_wbuf3 = NULL;
- HDfree(s4_total_wbuf3_bak);
+ free(s4_total_wbuf3_bak);
s4_total_wbuf3_bak = NULL;
- HDfree(s1_total_rbuf3);
+ free(s1_total_rbuf3);
s1_total_rbuf3 = NULL;
} /* end for n niter */
@@ -3769,9 +3766,9 @@ main(int argc, char *argv[])
if (MAINPROCESS) {
printf("\n===================================\n");
if (nerrors)
- HDprintf("***Parallel selection I/O dataset tests detected %d errors***\n", nerrors);
+ printf("***Parallel selection I/O dataset tests detected %d errors***\n", nerrors);
else
- HDprintf("Parallel selection I/O dataset tests finished with no errors\n");
+ printf("Parallel selection I/O dataset tests finished with no errors\n");
printf("===================================\n");
}
diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c
index c11f95c..b074944 100644
--- a/testpar/t_shapesame.c
+++ b/testpar/t_shapesame.c
@@ -133,12 +133,12 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
hid_t large_ds_dcpl_id = H5P_DEFAULT;
herr_t ret; /* Generic return value */
- HDassert(edge_size >= 6);
- HDassert(edge_size >= chunk_edge_size);
- HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
- HDassert(1 < small_rank);
- HDassert(small_rank < large_rank);
- HDassert(large_rank <= PAR_SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(edge_size >= chunk_edge_size);
+ assert((chunk_edge_size == 0) || (chunk_edge_size >= 3));
+ assert(1 < small_rank);
+ assert(small_rank < large_rank);
+ assert(large_rank <= PAR_SS_DR_MAX_RANK);
tv_ptr->test_num = test_num;
tv_ptr->edge_size = edge_size;
@@ -153,7 +153,7 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* the VRFY() macro needs the local variable mpi_rank -- set it up now */
mpi_rank = tv_ptr->mpi_rank;
- HDassert(tv_ptr->mpi_size >= 1);
+ assert(tv_ptr->mpi_size >= 1);
tv_ptr->mpi_comm = MPI_COMM_WORLD;
tv_ptr->mpi_info = MPI_INFO_NULL;
@@ -167,8 +167,8 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* used by checker board tests only */
tv_ptr->small_ds_offset = PAR_SS_DR_MAX_RANK - tv_ptr->small_rank;
- HDassert(0 < tv_ptr->small_ds_offset);
- HDassert(tv_ptr->small_ds_offset < PAR_SS_DR_MAX_RANK);
+ assert(0 < tv_ptr->small_ds_offset);
+ assert(tv_ptr->small_ds_offset < PAR_SS_DR_MAX_RANK);
for (i = 0; i < tv_ptr->large_rank - 1; i++) {
@@ -180,8 +180,8 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* used by checker board tests only */
tv_ptr->large_ds_offset = PAR_SS_DR_MAX_RANK - tv_ptr->large_rank;
- HDassert(0 <= tv_ptr->large_ds_offset);
- HDassert(tv_ptr->large_ds_offset < PAR_SS_DR_MAX_RANK);
+ assert(0 <= tv_ptr->large_ds_offset);
+ assert(tv_ptr->large_ds_offset < PAR_SS_DR_MAX_RANK);
/* set up the start, stride, count, and block pointers */
/* used by contiguous tests only */
@@ -191,28 +191,28 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
tv_ptr->block_ptr = &(tv_ptr->block[PAR_SS_DR_MAX_RANK - tv_ptr->large_rank]);
/* Allocate buffers */
- tv_ptr->small_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
+ tv_ptr->small_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
VRFY((tv_ptr->small_ds_buf_0 != NULL), "malloc of small_ds_buf_0 succeeded");
- tv_ptr->small_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
+ tv_ptr->small_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
VRFY((tv_ptr->small_ds_buf_1 != NULL), "malloc of small_ds_buf_1 succeeded");
- tv_ptr->small_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
+ tv_ptr->small_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size);
VRFY((tv_ptr->small_ds_buf_2 != NULL), "malloc of small_ds_buf_2 succeeded");
- tv_ptr->small_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
+ tv_ptr->small_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
VRFY((tv_ptr->small_ds_slice_buf != NULL), "malloc of small_ds_slice_buf succeeded");
- tv_ptr->large_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
+ tv_ptr->large_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
VRFY((tv_ptr->large_ds_buf_0 != NULL), "malloc of large_ds_buf_0 succeeded");
- tv_ptr->large_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
+ tv_ptr->large_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
VRFY((tv_ptr->large_ds_buf_1 != NULL), "malloc of large_ds_buf_1 succeeded");
- tv_ptr->large_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
+ tv_ptr->large_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size);
VRFY((tv_ptr->large_ds_buf_2 != NULL), "malloc of large_ds_buf_2 succeeded");
- tv_ptr->large_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size);
+ tv_ptr->large_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size);
VRFY((tv_ptr->large_ds_slice_buf != NULL), "malloc of large_ds_slice_buf succeeded");
/* initialize the buffers */
@@ -220,34 +220,34 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
ptr_0 = tv_ptr->small_ds_buf_0;
for (i = 0; i < (int)(tv_ptr->small_ds_size); i++)
*ptr_0++ = (uint32_t)i;
- HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
- HDmemset(tv_ptr->small_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
+ memset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
+ memset(tv_ptr->small_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
- HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
+ memset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
ptr_0 = tv_ptr->large_ds_buf_0;
for (i = 0; i < (int)(tv_ptr->large_ds_size); i++)
*ptr_0++ = (uint32_t)i;
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
- HDmemset(tv_ptr->large_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
- HDmemset(tv_ptr->large_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->large_ds_slice_size);
+ memset(tv_ptr->large_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->large_ds_slice_size);
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
#if CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "%d: test num = %d.\n", tv_ptr->mpi_rank, tv_ptr->test_num);
- HDfprintf(stdout, "%d: mpi_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->mpi_size);
- HDfprintf(stdout, "%d: small/large rank = %d/%d, use_collective_io = %d.\n", tv_ptr->mpi_rank,
- tv_ptr->small_rank, tv_ptr->large_rank, (int)use_collective_io);
- HDfprintf(stdout, "%d: edge_size = %d, chunk_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->edge_size,
- tv_ptr->chunk_edge_size);
- HDfprintf(stdout, "%d: checker_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->checker_edge_size);
- HDfprintf(stdout, "%d: small_ds_size = %d, large_ds_size = %d.\n", tv_ptr->mpi_rank,
- (int)(tv_ptr->small_ds_size), (int)(tv_ptr->large_ds_size));
- HDfprintf(stdout, "%d: filename = %s.\n", tv_ptr->mpi_rank, filename);
+ fprintf(stdout, "%d: test num = %d.\n", tv_ptr->mpi_rank, tv_ptr->test_num);
+ fprintf(stdout, "%d: mpi_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->mpi_size);
+ fprintf(stdout, "%d: small/large rank = %d/%d, use_collective_io = %d.\n", tv_ptr->mpi_rank,
+ tv_ptr->small_rank, tv_ptr->large_rank, (int)use_collective_io);
+ fprintf(stdout, "%d: edge_size = %d, chunk_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->edge_size,
+ tv_ptr->chunk_edge_size);
+ fprintf(stdout, "%d: checker_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->checker_edge_size);
+ fprintf(stdout, "%d: small_ds_size = %d, large_ds_size = %d.\n", tv_ptr->mpi_rank,
+ (int)(tv_ptr->small_ds_size), (int)(tv_ptr->large_ds_size));
+ fprintf(stdout, "%d: filename = %s.\n", tv_ptr->mpi_rank, filename);
}
#endif /* CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG */
/* ----------------------------------------
@@ -639,22 +639,22 @@ hs_dr_pio_test__takedown(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Free memory buffers */
if (tv_ptr->small_ds_buf_0 != NULL)
- HDfree(tv_ptr->small_ds_buf_0);
+ free(tv_ptr->small_ds_buf_0);
if (tv_ptr->small_ds_buf_1 != NULL)
- HDfree(tv_ptr->small_ds_buf_1);
+ free(tv_ptr->small_ds_buf_1);
if (tv_ptr->small_ds_buf_2 != NULL)
- HDfree(tv_ptr->small_ds_buf_2);
+ free(tv_ptr->small_ds_buf_2);
if (tv_ptr->small_ds_slice_buf != NULL)
- HDfree(tv_ptr->small_ds_slice_buf);
+ free(tv_ptr->small_ds_slice_buf);
if (tv_ptr->large_ds_buf_0 != NULL)
- HDfree(tv_ptr->large_ds_buf_0);
+ free(tv_ptr->large_ds_buf_0);
if (tv_ptr->large_ds_buf_1 != NULL)
- HDfree(tv_ptr->large_ds_buf_1);
+ free(tv_ptr->large_ds_buf_1);
if (tv_ptr->large_ds_buf_2 != NULL)
- HDfree(tv_ptr->large_ds_buf_2);
+ free(tv_ptr->large_ds_buf_2);
if (tv_ptr->large_ds_slice_buf != NULL)
- HDfree(tv_ptr->large_ds_slice_buf);
+ free(tv_ptr->large_ds_slice_buf);
return;
@@ -726,10 +726,10 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the buffer we will be reading into */
- HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
+ memset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s reading slices from big cube on disk into small cube slice.\n", fcnName);
+ fprintf(stdout, "%s reading slices from big cube on disk into small cube slice.\n", fcnName);
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
/* in serial versions of this test, we loop through all the dimensions
@@ -816,12 +816,12 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Read selection from disk */
#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
- (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
- (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName,
- H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
+ (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
+ (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName,
+ H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
ret =
H5Dread(tv_ptr->large_dataset, H5T_NATIVE_UINT32, tv_ptr->small_ds_slice_sid,
@@ -937,11 +937,11 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
VRFY((ret >= 0), "H5Sselect_hyperslab(file_small_ds_sid_0, set) succeeded");
#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG
- HDfprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName);
+ fprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName);
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
/* zero out the in memory large ds */
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
/* set up start, stride, count, and block -- note that we will
* change start[] so as to read slices of the large cube.
@@ -1047,12 +1047,12 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Read selection from disk */
#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
- (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
- (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
+ (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
+ (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
ret = H5Dread(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid,
tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_1);
@@ -1070,8 +1070,8 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
(k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size));
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= tv_ptr->large_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= tv_ptr->large_ds_size);
for (n = 0; n < tv_ptr->large_ds_size; n++) {
@@ -1212,10 +1212,10 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the in memory small ds */
- HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
+ memset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG
- HDfprintf(stdout, "%s writing slices from big ds to slices of small ds on disk.\n", fcnName);
+ fprintf(stdout, "%s writing slices from big ds to slices of small ds on disk.\n", fcnName);
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
/* in serial versions of this test, we loop through all the dimensions
@@ -1316,12 +1316,12 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* write the slice from the in memory large data set to the
* slice of the on disk small dataset. */
#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
- (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
- (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
+ (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
+ (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
ret = H5Dwrite(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid,
tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_0);
@@ -1346,8 +1346,8 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
start_index = (size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size;
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= tv_ptr->small_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= tv_ptr->small_ds_size);
for (n = 0; n < tv_ptr->small_ds_size; n++) {
@@ -1487,10 +1487,10 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the in memory large ds */
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG
- HDfprintf(stdout, "%s writing process slices of small ds to slices of large ds on disk.\n", fcnName);
+ fprintf(stdout, "%s writing process slices of small ds to slices of large ds on disk.\n", fcnName);
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
if (PAR_SS_DR_MAX_RANK - tv_ptr->large_rank == 0) {
@@ -1551,12 +1551,12 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDfprintf(stdout, "%s:%d: skipping test with start = %d %d %d %d %d.\n", fcnName,
- (int)(tv_ptr->mpi_rank), (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]),
- (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
+ fprintf(stdout, "%s:%d: skipping test with start = %d %d %d %d %d.\n", fcnName,
+ (int)(tv_ptr->mpi_rank), (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]),
+ (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
}
else { /* run the test */
@@ -1602,12 +1602,12 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* target slice of the disk data set
*/
#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
- (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
- (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank),
+ (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]),
+ (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4]));
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
ret = H5Dwrite(tv_ptr->large_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_small_ds_sid,
tv_ptr->file_large_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->small_ds_buf_0);
@@ -1635,8 +1635,8 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
(k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size));
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index < tv_ptr->large_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index < tv_ptr->large_ds_size);
for (n = 0; n < tv_ptr->large_ds_size; n++) {
@@ -1774,8 +1774,8 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank);
- HDfprintf(stdout, "test %d: Initialization complete.\n", test_num);
+ fprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank);
+ fprintf(stdout, "test %d: Initialization complete.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -1790,7 +1790,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_l2s.\n", test_num);
+ fprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_l2s.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
contig_hs_dr_pio_test__d2m_l2s(tv_ptr);
@@ -1802,7 +1802,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_s2l.\n", test_num);
+ fprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_s2l.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
contig_hs_dr_pio_test__d2m_s2l(tv_ptr);
@@ -1820,7 +1820,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_l2s.\n", test_num);
+ fprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_l2s.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
contig_hs_dr_pio_test__m2d_l2s(tv_ptr);
@@ -1835,16 +1835,16 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_s2l.\n", test_num);
+ fprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_s2l.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
contig_hs_dr_pio_test__m2d_s2l(tv_ptr);
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n",
- test_num, (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped),
- (long long)(tv_ptr->total_tests));
+ fprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", test_num,
+ (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped),
+ (long long)(tv_ptr->total_tests));
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -1852,7 +1852,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: Takedown complete.\n", test_num);
+ fprintf(stdout, "test %d: Takedown complete.\n", test_num);
}
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -1986,16 +1986,16 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
} /* end of switch(sstest_type) */
#if CONTIG_HS_DR_PIO_TEST__DEBUG
if ((MAINPROCESS) && (tests_skipped > 0)) {
- HDfprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n", tests_run, tests_skipped,
- total_tests);
+ fprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n", tests_run, tests_skipped,
+ total_tests);
}
#endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */
}
}
if ((MAINPROCESS) && (tests_skipped > 0)) {
- HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
- tests_skipped, total_tests);
+ fprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
+ tests_skipped, total_tests);
}
return;
@@ -2049,26 +2049,26 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
hsize_t block[PAR_SS_DR_MAX_RANK];
herr_t ret; /* Generic return value */
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(0 < sel_rank);
- HDassert(sel_rank <= tgt_rank);
- HDassert(tgt_rank <= test_max_rank);
- HDassert(test_max_rank <= PAR_SS_DR_MAX_RANK);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(0 < sel_rank);
+ assert(sel_rank <= tgt_rank);
+ assert(tgt_rank <= test_max_rank);
+ assert(test_max_rank <= PAR_SS_DR_MAX_RANK);
sel_offset = test_max_rank - sel_rank;
- HDassert(sel_offset >= 0);
+ assert(sel_offset >= 0);
n_cube_offset = test_max_rank - tgt_rank;
- HDassert(n_cube_offset >= 0);
- HDassert(n_cube_offset <= sel_offset);
+ assert(n_cube_offset >= 0);
+ assert(n_cube_offset <= sel_offset);
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
- HDfprintf(stdout, "%s:%d: edge_size/checker_edge_size = %d/%d\n", fcnName, mpi_rank, edge_size,
- checker_edge_size);
- HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset);
- HDfprintf(stdout, "%s:%d: tgt_rank/n_cube_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, n_cube_offset);
+ fprintf(stdout, "%s:%d: edge_size/checker_edge_size = %d/%d\n", fcnName, mpi_rank, edge_size,
+ checker_edge_size);
+ fprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset);
+ fprintf(stdout, "%s:%d: tgt_rank/n_cube_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, n_cube_offset);
#endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */
/* First, compute the base count (which assumes start == 0
@@ -2215,25 +2215,25 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
if (((i + j + k + l + m) % 2) == 0) {
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
- HDfprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank,
- (int)first_selection);
- HDfprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, j,
- k, l, m);
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)start[0], (int)start[1], (int)start[2], (int)start[3],
- (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3],
- (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)count[0], (int)count[1], (int)count[2], (int)count[3],
- (int)count[4]);
- HDfprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)block[0], (int)block[1], (int)block[2], (int)block[3],
- (int)block[4]);
- HDfprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank,
- H5Sget_simple_extent_ndims(tgt_sid));
- HDfprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank);
+ fprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank,
+ (int)first_selection);
+ fprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, j, k,
+ l, m);
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)start[0], (int)start[1], (int)start[2], (int)start[3],
+ (int)start[4]);
+ fprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3],
+ (int)stride[4]);
+ fprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)count[0], (int)count[1], (int)count[2], (int)count[3],
+ (int)count[4]);
+ fprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)block[0], (int)block[1], (int)block[2], (int)block[3],
+ (int)block[4]);
+ fprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank,
+ H5Sget_simple_extent_ndims(tgt_sid));
+ fprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank);
#endif
if (first_selection) {
@@ -2277,8 +2277,8 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
} while ((i <= 1) && (0 >= sel_offset));
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(tgt_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(tgt_sid));
#endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */
/* Clip the selection back to the dataspace proper. */
@@ -2296,9 +2296,9 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
VRFY((ret != FAIL), "H5Sselect_hyperslab(AND) succeeded");
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(tgt_sid));
- HDfprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(tgt_sid));
+ fprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank);
#endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */
return;
@@ -2380,25 +2380,25 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t *buf_ptr, const int rank, const int
int v, w, x, y, z; /* to track position in checker */
const int test_max_rank = 5; /* code changes needed if this is increased */
- HDassert(buf_ptr != NULL);
- HDassert(0 < rank);
- HDassert(rank <= test_max_rank);
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(test_max_rank <= PAR_SS_DR_MAX_RANK);
+ assert(buf_ptr != NULL);
+ assert(0 < rank);
+ assert(rank <= test_max_rank);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(test_max_rank <= PAR_SS_DR_MAX_RANK);
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
int mpi_rank;
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDfprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s rank = %d.\n", fcnName, rank);
- HDfprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size);
- HDfprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size);
- HDfprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val);
- HDfprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker);
+ fprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s rank = %d.\n", fcnName, rank);
+ fprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size);
+ fprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size);
+ fprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val);
+ fprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker);
}
#endif
@@ -2448,12 +2448,12 @@ do {
m = 0;
z = 0;
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
- HDfprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m);
+ fprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m);
#endif
in_checker = start_in_checker[3];
do {
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
- HDfprintf(stdout, " %d", (int)(*val_ptr));
+ fprintf(stdout, " %d", (int)(*val_ptr));
#endif
if (z >= checker_edge_size) {
@@ -2486,7 +2486,7 @@ do {
} while ((rank >= (test_max_rank - 4)) && (m < edge_size));
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
#endif
l++;
y++;
@@ -2569,16 +2569,16 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
sel_start);
/* zero out the buffer we will be reading into */
- HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
+ memset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size);
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: initial small_ds_slice_buf = ", fcnName, tv_ptr->mpi_rank);
+ fprintf(stdout, "%s:%d: initial small_ds_slice_buf = ", fcnName, tv_ptr->mpi_rank);
ptr_0 = tv_ptr->small_ds_slice_buf;
for (i = 0; i < (int)(tv_ptr->small_ds_slice_size); i++) {
- HDfprintf(stdout, "%d ", (int)(*ptr_0));
+ fprintf(stdout, "%d ", (int)(*ptr_0));
ptr_0++;
}
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
/* set up start, stride, count, and block -- note that we will
@@ -2600,8 +2600,8 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
}
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: reading slice from big ds on disk into small ds slice.\n", fcnName,
- tv_ptr->mpi_rank);
+ fprintf(stdout, "%s:%d: reading slice from big ds on disk into small ds slice.\n", fcnName,
+ tv_ptr->mpi_rank);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
/* in serial versions of this test, we loop through all the dimensions
* of the large data set. However, in the parallel version, each
@@ -2675,11 +2675,11 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
ckrbrd_hs_dr_pio_test__slct_ckrbrd(
tv_ptr->mpi_rank, tv_ptr->file_large_ds_sid_0, tv_ptr->large_rank, tv_ptr->edge_size,
@@ -2693,12 +2693,12 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Read selection from disk */
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
- tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
- tv_ptr->start[4]);
- HDfprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName,
- H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
+ tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
+ tv_ptr->start[4]);
+ fprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName,
+ H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0));
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
ret =
@@ -2707,7 +2707,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
VRFY((ret >= 0), "H5Dread() slice from large ds succeeded.");
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, tv_ptr->mpi_rank);
+ fprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, tv_ptr->mpi_rank);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
/* verify that expected data is retrieved */
@@ -2799,11 +2799,11 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
sel_start);
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG
- HDfprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName);
+ fprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
/* zero out the buffer we will be reading into */
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
/* set up start, stride, count, and block -- note that we will
* change start[] so as to read the slice of the small data set
@@ -2899,11 +2899,11 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
ckrbrd_hs_dr_pio_test__slct_ckrbrd(
tv_ptr->mpi_rank, tv_ptr->mem_large_ds_sid, tv_ptr->large_rank, tv_ptr->edge_size,
@@ -2917,12 +2917,12 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
/* Read selection from disk */
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
- tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
- tv_ptr->start[4]);
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->large_ds_slice_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
+ tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
+ tv_ptr->start[4]);
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->large_ds_slice_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0));
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
ret = H5Dread(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid,
tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_1);
@@ -2945,27 +2945,27 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
{
int m, n;
- HDfprintf(stdout, "%s:%d: expected_value = %d.\n", fcnName, tv_ptr->mpi_rank,
- expected_value);
- HDfprintf(stdout, "%s:%d: start/stop index = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- start_index, stop_index);
+ fprintf(stdout, "%s:%d: expected_value = %d.\n", fcnName, tv_ptr->mpi_rank,
+ expected_value);
+ fprintf(stdout, "%s:%d: start/stop index = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ start_index, stop_index);
n = 0;
for (m = 0; (unsigned)m < tv_ptr->large_ds_size; m++) {
- HDfprintf(stdout, "%d ", (int)(*ptr_1));
+ fprintf(stdout, "%d ", (int)(*ptr_1));
ptr_1++;
n++;
if (n >= tv_ptr->edge_size) {
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
n = 0;
}
}
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
ptr_1 = tv_ptr->large_ds_buf_1;
}
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
- HDassert(start_index < stop_index);
- HDassert(stop_index <= tv_ptr->large_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= tv_ptr->large_ds_size);
for (u = 0; u < start_index; u++) {
@@ -3129,12 +3129,12 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the in memory small ds */
- HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
+ memset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size);
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG
- HDfprintf(stdout,
- "%s writing checker boards selections of slices from big ds to slices of small ds on disk.\n",
- fcnName);
+ fprintf(stdout,
+ "%s writing checker boards selections of slices from big ds to slices of small ds on disk.\n",
+ fcnName);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
/* in serial versions of this test, we loop through all the dimensions
@@ -3221,11 +3221,11 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
ckrbrd_hs_dr_pio_test__slct_ckrbrd(
tv_ptr->mpi_rank, tv_ptr->mem_large_ds_sid, tv_ptr->large_rank, tv_ptr->edge_size,
@@ -3244,12 +3244,12 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* dataset.
*/
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
- tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
- tv_ptr->start[4]);
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_1));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
+ tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
+ tv_ptr->start[4]);
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_1));
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
ret = H5Dwrite(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid,
tv_ptr->file_small_ds_sid_1, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_0);
@@ -3271,8 +3271,8 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
start_index = (size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size;
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index <= tv_ptr->small_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index <= tv_ptr->small_ds_size);
data_ok = TRUE;
@@ -3428,13 +3428,13 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
}
/* zero out the in memory large ds */
- HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
+ memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size);
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG
- HDfprintf(stdout,
- "%s writing process checkerboard selections of slices of small ds to process slices of large "
- "ds on disk.\n",
- fcnName);
+ fprintf(stdout,
+ "%s writing process checkerboard selections of slices of small ds to process slices of large "
+ "ds on disk.\n",
+ fcnName);
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
if (PAR_SS_DR_MAX_RANK - tv_ptr->large_rank == 0) {
@@ -3514,11 +3514,11 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
tv_ptr->start[3] = (hsize_t)l;
tv_ptr->start[4] = 0;
- HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
- HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1));
+ assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1));
ckrbrd_hs_dr_pio_test__slct_ckrbrd(
tv_ptr->mpi_rank, tv_ptr->file_large_ds_sid_1, tv_ptr->large_rank, tv_ptr->edge_size,
@@ -3536,12 +3536,12 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* target slice of the disk data set
*/
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
- tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
- tv_ptr->start[4]);
- HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
- H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
- H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_1));
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank,
+ tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3],
+ tv_ptr->start[4]);
+ fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank,
+ H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid),
+ H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_1));
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
ret = H5Dwrite(tv_ptr->large_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_small_ds_sid,
tv_ptr->file_large_ds_sid_1, tv_ptr->xfer_plist, tv_ptr->small_ds_buf_0);
@@ -3567,8 +3567,8 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
(k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size));
stop_index = start_index + tv_ptr->small_ds_slice_size - 1;
- HDassert(start_index < stop_index);
- HDassert(stop_index < tv_ptr->large_ds_size);
+ assert(start_index < stop_index);
+ assert(stop_index < tv_ptr->large_ds_size);
data_ok = TRUE;
@@ -3711,8 +3711,8 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank);
- HDfprintf(stdout, "test %d: Initialization complete.\n", test_num);
+ fprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank);
+ fprintf(stdout, "test %d: Initialization complete.\n", test_num);
}
#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -3763,9 +3763,9 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n",
- test_num, (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped),
- (long long)(tv_ptr->total_tests));
+ fprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", test_num,
+ (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped),
+ (long long)(tv_ptr->total_tests));
}
#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -3773,7 +3773,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
#if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG
if (MAINPROCESS) {
- HDfprintf(stdout, "test %d: Takedown complete.\n", test_num);
+ fprintf(stdout, "test %d: Takedown complete.\n", test_num);
}
#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
@@ -3911,16 +3911,16 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
} /* end of switch(sstest_type) */
#if CONTIG_HS_DR_PIO_TEST__DEBUG
if ((MAINPROCESS) && (tests_skipped > 0)) {
- HDfprintf(stdout, " run/skipped/total = %" PRId64 "/%" PRId64 "/%" PRId64 ".\n",
- tests_run, tests_skipped, total_tests);
+ fprintf(stdout, " run/skipped/total = %" PRId64 "/%" PRId64 "/%" PRId64 ".\n", tests_run,
+ tests_skipped, total_tests);
}
#endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */
}
}
if ((MAINPROCESS) && (tests_skipped > 0)) {
- HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
- tests_skipped, total_tests);
+ fprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
+ tests_skipped, total_tests);
}
return;
@@ -3998,10 +3998,9 @@ pause_proc(void)
if (MAINPROCESS)
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) {
if (!loops++) {
- HDprintf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid,
- pid);
+ printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid);
}
- HDprintf("waiting(%ds) for file %s ...\n", time_int, greenlight);
+ printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
fflush(stdout);
HDsleep(time_int);
}
@@ -4025,18 +4024,18 @@ MPI_Init(int *argc, char ***argv)
static void
usage(void)
{
- HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
- "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
- HDprintf("\t-m<n_datasets>"
- "\tset number of datasets for the multiple dataset test\n");
- HDprintf("\t-n<n_groups>"
- "\tset number of groups for the multiple group test\n");
- HDprintf("\t-f <prefix>\tfilename prefix\n");
- HDprintf("\t-2\t\tuse Split-file together with MPIO\n");
- HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR,
- COL_FACTOR);
- HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
- HDprintf("\n");
+ printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
+ "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
+ printf("\t-m<n_datasets>"
+ "\tset number of datasets for the multiple dataset test\n");
+ printf("\t-n<n_groups>"
+ "\tset number of groups for the multiple group test\n");
+ printf("\t-f <prefix>\tfilename prefix\n");
+ printf("\t-2\t\tuse Split-file together with MPIO\n");
+ printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR,
+ COL_FACTOR);
+ printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
+ printf("\n");
}
/*
@@ -4118,7 +4117,7 @@ parse_options(int argc, char **argv)
case 'h': /* print help message--return with nerrors set */
return (1);
default:
- HDprintf("Illegal option(%s)\n", *argv);
+ printf("Illegal option(%s)\n", *argv);
nerrors++;
return (1);
}
@@ -4127,12 +4126,12 @@ parse_options(int argc, char **argv)
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0) {
- HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
+ printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
nerrors++;
return (1);
}
if (chunkdim0 <= 0 || chunkdim1 <= 0) {
- HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
+ printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
nerrors++;
return (1);
}
@@ -4140,7 +4139,7 @@ parse_options(int argc, char **argv)
/* Make sure datasets can be divided into equal portions by the processes */
if ((dim0 % mpi_size) || (dim1 % mpi_size)) {
if (MAINPROCESS)
- HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
+ printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
nerrors++;
return (1);
}
@@ -4153,13 +4152,13 @@ parse_options(int argc, char **argv)
for (i = 0; i < n; i++)
if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) {
- HDprintf("h5_fixname failed\n");
+ printf("h5_fixname failed\n");
nerrors++;
return (1);
}
- HDprintf("Test filenames are:\n");
+ printf("Test filenames are:\n");
for (i = 0; i < n; i++)
- HDprintf(" %s\n", filenames[i]);
+ printf(" %s\n", filenames[i]);
}
return (0);
@@ -4293,10 +4292,10 @@ main(int argc, char **argv)
dim1 = COL_FACTOR * mpi_size;
if (MAINPROCESS) {
- HDprintf("===================================\n");
- HDprintf("Shape Same Tests Start\n");
- HDprintf(" express_test = %d.\n", GetTestExpress());
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("Shape Same Tests Start\n");
+ printf(" express_test = %d.\n", GetTestExpress());
+ printf("===================================\n");
}
/* Attempt to turn off atexit post processing so that in case errors
@@ -4306,15 +4305,15 @@ main(int argc, char **argv)
*/
if (H5dont_atexit() < 0) {
if (MAINPROCESS)
- HDprintf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank);
+ printf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank);
};
H5open();
h5_show_hostname();
- HDmemset(filenames, 0, sizeof(filenames));
+ memset(filenames, 0, sizeof(filenames));
for (int i = 0; i < NFILENAME; i++) {
- if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
- HDprintf("couldn't allocate filename array\n");
+ if (NULL == (filenames[i] = malloc(PATH_MAX))) {
+ printf("couldn't allocate filename array\n");
MPI_Abort(MPI_COMM_WORLD, -1);
}
}
@@ -4345,9 +4344,9 @@ main(int argc, char **argv)
TestParseCmdLine(argc, argv);
if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS) {
- HDprintf("===================================\n"
- " Using Independent I/O with file set view to replace collective I/O \n"
- "===================================\n");
+ printf("===================================\n"
+ " Using Independent I/O with file set view to replace collective I/O \n"
+ "===================================\n");
}
/* Perform requested testing */
@@ -4375,16 +4374,16 @@ main(int argc, char **argv)
}
if (MAINPROCESS) { /* only process 0 reports */
- HDprintf("===================================\n");
+ printf("===================================\n");
if (nerrors)
- HDprintf("***Shape Same tests detected %d errors***\n", nerrors);
+ printf("***Shape Same tests detected %d errors***\n", nerrors);
else
- HDprintf("Shape Same tests finished with no errors\n");
- HDprintf("===================================\n");
+ printf("Shape Same tests finished with no errors\n");
+ printf("===================================\n");
}
for (int i = 0; i < NFILENAME; i++) {
- HDfree(filenames[i]);
+ free(filenames[i]);
filenames[i] = NULL;
}
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index aab2b59..d0ef253 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -238,11 +238,11 @@ coll_write_test(int chunk_factor)
fsdim[0] = FSPACE_DIM1;
fsdim[1] = (hsize_t)(FSPACE_DIM2 * mpi_size);
- vector = (int *)HDmalloc(sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size);
- matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size);
- matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size);
+ vector = (int *)malloc(sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size);
+ matrix_out = (int *)malloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size);
+ matrix_out1 = (int *)malloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size);
- HDmemset(vector, 0, sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size);
+ memset(vector, 0, sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size);
vector[0] = vector[MSPACE1_DIM * mpi_size - 1] = -1;
for (i = 1; i < MSPACE1_DIM * mpi_size - 1; i++)
H5_CHECKED_ASSIGN(vector[i], int, i, unsigned);
@@ -565,8 +565,8 @@ coll_write_test(int chunk_factor)
* Initialize data buffer.
*/
- HDmemset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
- HDmemset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ memset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ memset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
/*
* Read data back to the buffer matrix_out.
*/
@@ -619,11 +619,11 @@ coll_write_test(int chunk_factor)
VRFY((ret >= 0), "");
if (vector)
- HDfree(vector);
+ free(vector);
if (matrix_out)
- HDfree(matrix_out);
+ free(matrix_out);
if (matrix_out1)
- HDfree(matrix_out1);
+ free(matrix_out1);
return;
}
@@ -685,8 +685,8 @@ coll_read_test(void)
mdim[0] = MSPACE_DIM1;
mdim[1] = (hsize_t)(MSPACE_DIM2 * mpi_size);
- matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
- matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ matrix_out = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ matrix_out1 = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
/*** For testing collective hyperslab selection read ***/
@@ -806,8 +806,8 @@ coll_read_test(void)
* Initialize data buffer.
*/
- HDmemset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
- HDmemset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ memset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
+ memset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size);
/*
* Read data back to the buffer matrix_out.
@@ -846,8 +846,8 @@ coll_read_test(void)
/*
* Free read buffers.
*/
- HDfree(matrix_out);
- HDfree(matrix_out1);
+ free(matrix_out);
+ free(matrix_out1);
/*
* Close memory file and memory dataspaces.
@@ -934,31 +934,31 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: dims/checker_edge_size = %d %d %d %d %d / %d\n", fcnName, mpi_rank,
- (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4], checker_edge_size);
+ fprintf(stdout, "%s:%d: dims/checker_edge_size = %d %d %d %d %d / %d\n", fcnName, mpi_rank,
+ (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4], checker_edge_size);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
- HDassert(0 < checker_edge_size);
- HDassert(0 < sel_rank);
- HDassert(sel_rank <= tgt_rank);
- HDassert(tgt_rank <= test_max_rank);
- HDassert(test_max_rank <= LDSCT_DS_RANK);
+ assert(0 < checker_edge_size);
+ assert(0 < sel_rank);
+ assert(sel_rank <= tgt_rank);
+ assert(tgt_rank <= test_max_rank);
+ assert(test_max_rank <= LDSCT_DS_RANK);
sel_offset = test_max_rank - sel_rank;
- HDassert(sel_offset >= 0);
+ assert(sel_offset >= 0);
ds_offset = test_max_rank - tgt_rank;
- HDassert(ds_offset >= 0);
- HDassert(ds_offset <= sel_offset);
+ assert(ds_offset >= 0);
+ assert(ds_offset <= sel_offset);
- HDassert((hsize_t)checker_edge_size <= dims[sel_offset]);
- HDassert(dims[sel_offset] == 10);
+ assert((hsize_t)checker_edge_size <= dims[sel_offset]);
+ assert(dims[sel_offset] == 10);
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset);
- HDfprintf(stdout, "%s:%d: tgt_rank/ds_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, ds_offset);
+ fprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset);
+ fprintf(stdout, "%s:%d: tgt_rank/ds_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, ds_offset);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
@@ -992,8 +992,8 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: base_count/offset_count = %d/%d.\n", fcnName, mpi_rank, base_count,
- offset_count);
+ fprintf(stdout, "%s:%d: base_count/offset_count = %d/%d.\n", fcnName, mpi_rank, base_count,
+ offset_count);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
@@ -1116,26 +1116,25 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank,
- (int)first_selection);
- HDfprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i,
- j, k, l, m);
- HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)start[0], (int)start[1], (int)start[2], (int)start[3],
- (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3],
- (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)count[0], (int)count[1], (int)count[2], (int)count[3],
- (int)count[4]);
- HDfprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank,
- (int)block[0], (int)block[1], (int)block[2], (int)block[3],
- (int)block[4]);
- HDfprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank,
- H5Sget_simple_extent_ndims(tgt_sid));
- HDfprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank,
- sel_rank);
+ fprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank,
+ (int)first_selection);
+ fprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i,
+ j, k, l, m);
+ fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)start[0], (int)start[1], (int)start[2], (int)start[3],
+ (int)start[4]);
+ fprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3],
+ (int)stride[4]);
+ fprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)count[0], (int)count[1], (int)count[2], (int)count[3],
+ (int)count[4]);
+ fprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank,
+ (int)block[0], (int)block[1], (int)block[2], (int)block[3],
+ (int)block[4]);
+ fprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank,
+ H5Sget_simple_extent_ndims(tgt_sid));
+ fprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank);
}
#endif
@@ -1181,8 +1180,8 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(tgt_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(tgt_sid));
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
@@ -1202,9 +1201,9 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(tgt_sid));
- HDfprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(tgt_sid));
+ fprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */
@@ -1290,22 +1289,22 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
int v, w, x, y, z; /* to track position in checker */
const int test_max_rank = 5; /* code changes needed if this is increased */
- HDassert(buf_ptr != NULL);
- HDassert(0 < rank);
- HDassert(rank <= test_max_rank);
- HDassert(edge_size >= 6);
- HDassert(0 < checker_edge_size);
- HDassert(checker_edge_size <= edge_size);
- HDassert(test_max_rank <= LDSCT_DS_RANK);
+ assert(buf_ptr != NULL);
+ assert(0 < rank);
+ assert(rank <= test_max_rank);
+ assert(edge_size >= 6);
+ assert(0 < checker_edge_size);
+ assert(checker_edge_size <= edge_size);
+ assert(test_max_rank <= LDSCT_DS_RANK);
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s rank = %d.\n", fcnName, rank);
- HDfprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size);
- HDfprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size);
- HDfprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val);
- HDfprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker);
+ fprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s rank = %d.\n", fcnName, rank);
+ fprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size);
+ fprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size);
+ fprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val);
+ fprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker);
}
#endif
@@ -1356,14 +1355,14 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
z = 0;
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m);
+ fprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m);
}
#endif
in_checker = start_in_checker[3];
do {
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, " %d", (int)(*val_ptr));
+ fprintf(stdout, " %d", (int)(*val_ptr));
}
#endif
if (z >= checker_edge_size) {
@@ -1398,7 +1397,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
} while ((rank >= (test_max_rank - 4)) && (m < edge_size));
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
}
#endif
l++;
@@ -1499,15 +1498,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = MPI_COMM_WORLD;
mpi_info = MPI_INFO_NULL;
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: chunk_edge_size = %d.\n", fcnName, mpi_rank, (int)chunk_edge_size);
- HDfprintf(stdout, "%s:%d: use_collective_io = %d.\n", fcnName, mpi_rank, (int)use_collective_io);
+ fprintf(stdout, "%s:%d: chunk_edge_size = %d.\n", fcnName, mpi_rank, (int)chunk_edge_size);
+ fprintf(stdout, "%s:%d: use_collective_io = %d.\n", fcnName, mpi_rank, (int)use_collective_io);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1519,24 +1518,24 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
large_ds_slice_size = (size_t)(10 * 10 * 10 * 10);
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: small ds size / slice size = %d / %d.\n", fcnName, mpi_rank,
- (int)small_ds_size, (int)small_ds_slice_size);
- HDfprintf(stdout, "%s:%d: large ds size / slice size = %d / %d.\n", fcnName, mpi_rank,
- (int)large_ds_size, (int)large_ds_slice_size);
+ fprintf(stdout, "%s:%d: small ds size / slice size = %d / %d.\n", fcnName, mpi_rank,
+ (int)small_ds_size, (int)small_ds_slice_size);
+ fprintf(stdout, "%s:%d: large ds size / slice size = %d / %d.\n", fcnName, mpi_rank,
+ (int)large_ds_size, (int)large_ds_slice_size);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
/* Allocate buffers */
- small_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * small_ds_size);
+ small_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * small_ds_size);
VRFY((small_ds_buf_0 != NULL), "malloc of small_ds_buf_0 succeeded");
- small_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * small_ds_size);
+ small_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * small_ds_size);
VRFY((small_ds_buf_1 != NULL), "malloc of small_ds_buf_1 succeeded");
- large_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * large_ds_size);
+ large_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * large_ds_size);
VRFY((large_ds_buf_0 != NULL), "malloc of large_ds_buf_0 succeeded");
- large_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * large_ds_size);
+ large_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * large_ds_size);
VRFY((large_ds_buf_1 != NULL), "malloc of large_ds_buf_1 succeeded");
/* initialize the buffers */
@@ -1568,7 +1567,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* get the file name */
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* ----------------------------------------
* CREATE AN HDF5 FILE WITH PARALLEL ACCESS
@@ -1602,10 +1601,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: small_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)small_dims[0],
- (int)small_dims[1], (int)small_dims[2], (int)small_dims[3], (int)small_dims[4]);
- HDfprintf(stdout, "%s:%d: large_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)large_dims[0],
- (int)large_dims[1], (int)large_dims[2], (int)large_dims[3], (int)large_dims[4]);
+ fprintf(stdout, "%s:%d: small_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)small_dims[0],
+ (int)small_dims[1], (int)small_dims[2], (int)small_dims[3], (int)small_dims[4]);
+ fprintf(stdout, "%s:%d: large_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)large_dims[0],
+ (int)large_dims[1], (int)large_dims[2], (int)large_dims[3], (int)large_dims[4]);
}
#endif
@@ -1661,9 +1660,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: small chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank,
- (int)small_chunk_dims[0], (int)small_chunk_dims[1], (int)small_chunk_dims[2],
- (int)small_chunk_dims[3], (int)small_chunk_dims[4]);
+ fprintf(stdout, "%s:%d: small chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank,
+ (int)small_chunk_dims[0], (int)small_chunk_dims[1], (int)small_chunk_dims[2],
+ (int)small_chunk_dims[3], (int)small_chunk_dims[4]);
}
#endif
@@ -1682,9 +1681,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: large chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank,
- (int)large_chunk_dims[0], (int)large_chunk_dims[1], (int)large_chunk_dims[2],
- (int)large_chunk_dims[3], (int)large_chunk_dims[4]);
+ fprintf(stdout, "%s:%d: large chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank,
+ (int)large_chunk_dims[0], (int)large_chunk_dims[1], (int)large_chunk_dims[2],
+ (int)large_chunk_dims[3], (int)large_chunk_dims[4]);
}
#endif
@@ -1710,8 +1709,8 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: small/large ds id = %d / %d.\n", fcnName, mpi_rank, (int)small_dataset,
- (int)large_dataset);
+ fprintf(stdout, "%s:%d: small/large ds id = %d / %d.\n", fcnName, mpi_rank, (int)small_dataset,
+ (int)large_dataset);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1743,15 +1742,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: settings for small data set initialization.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
- (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
- (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
- (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
- HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
- (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
+ fprintf(stdout, "%s:%d: settings for small data set initialization.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1],
+ (int)start[2], (int)start[3], (int)start[4]);
+ fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
+ (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
+ fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], (int)count[1],
+ (int)count[2], (int)count[3], (int)count[4]);
+ fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], (int)block[1],
+ (int)block[2], (int)block[3], (int)block[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1768,15 +1767,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
- (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
- (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
- (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
- HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
- (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
+ fprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
+ (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
+ fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
+ (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
+ fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
+ (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
+ fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
+ (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1796,7 +1795,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* write the initial value of the small data set to file */
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: writing init value of small ds to file.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: writing init value of small ds to file.\n", fcnName, mpi_rank);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
ret = H5Dwrite(small_dataset, dset_type, mem_small_ds_sid, file_small_ds_sid, xfer_plist, small_ds_buf_0);
@@ -1850,15 +1849,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: settings for large data set initialization.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
- (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
- (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
- (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
- HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
- (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
+ fprintf(stdout, "%s:%d: settings for large data set initialization.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1],
+ (int)start[2], (int)start[3], (int)start[4]);
+ fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
+ (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
+ fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], (int)count[1],
+ (int)count[2], (int)count[3], (int)count[4]);
+ fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], (int)block[1],
+ (int)block[2], (int)block[3], (int)block[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1870,10 +1869,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(mem_large_ds_sid));
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(file_large_ds_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(mem_large_ds_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(file_large_ds_sid));
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1883,15 +1882,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
- (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
- HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
- (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
- HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
- (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
- HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
- (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
+ fprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0],
+ (int)start[1], (int)start[2], (int)start[3], (int)start[4]);
+ fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0],
+ (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]);
+ fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0],
+ (int)count[1], (int)count[2], (int)count[3], (int)count[4]);
+ fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0],
+ (int)block[1], (int)block[2], (int)block[3], (int)block[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1903,10 +1902,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(mem_large_ds_sid));
- HDfprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank,
- (int)H5Sget_select_npoints(file_large_ds_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(mem_large_ds_sid));
+ fprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank,
+ (int)H5Sget_select_npoints(file_large_ds_sid));
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
}
@@ -1932,12 +1931,12 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
rank = H5Sget_simple_extent_dims(mem_large_ds_sid, dims, max_dims);
- HDfprintf(stdout, "%s:%d: mem_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank,
- (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]);
+ fprintf(stdout, "%s:%d: mem_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank,
+ (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]);
rank = H5Sget_simple_extent_dims(file_large_ds_sid, dims, max_dims);
- HDfprintf(stdout, "%s:%d: file_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank,
- (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]);
+ fprintf(stdout, "%s:%d: file_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank,
+ (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -1950,10 +1949,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* write the initial value of the large data set to file */
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: writing init value of large ds to file.\n", fcnName, mpi_rank);
- HDfprintf(stdout, "%s:%d: large_dataset = %d.\n", fcnName, mpi_rank, (int)large_dataset);
- HDfprintf(stdout, "%s:%d: mem_large_ds_sid = %d, file_large_ds_sid = %d.\n", fcnName, mpi_rank,
- (int)mem_large_ds_sid, (int)file_large_ds_sid);
+ fprintf(stdout, "%s:%d: writing init value of large ds to file.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: large_dataset = %d.\n", fcnName, mpi_rank, (int)large_dataset);
+ fprintf(stdout, "%s:%d: mem_large_ds_sid = %d, file_large_ds_sid = %d.\n", fcnName, mpi_rank,
+ (int)mem_large_ds_sid, (int)file_large_ds_sid);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -2042,7 +2041,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -2057,9 +2056,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
stop_index = start_index + (int)small_ds_slice_size;
- HDassert(0 <= start_index);
- HDassert(start_index < stop_index);
- HDassert(stop_index <= (int)large_ds_size);
+ assert(0 <= start_index);
+ assert(start_index < stop_index);
+ assert(stop_index <= (int)large_ds_size);
ptr_1 = large_ds_buf_1;
@@ -2139,7 +2138,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank);
+ fprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank);
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
@@ -2157,9 +2156,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
stop_index = start_index + (int)small_ds_slice_size;
- HDassert(0 <= start_index);
- HDassert(start_index < stop_index);
- HDassert(stop_index <= (int)small_ds_size);
+ assert(0 <= start_index);
+ assert(start_index < stop_index);
+ assert(stop_index <= (int)small_ds_size);
ptr_1 = small_ds_buf_1;
@@ -2197,8 +2196,8 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) {
- HDfprintf(stdout, "%s:%d: unexpected value at index %d: %d.\n", fcnName, mpi_rank, (int)i,
- (int)(*ptr_1));
+ fprintf(stdout, "%s:%d: unexpected value at index %d: %d.\n", fcnName, mpi_rank, (int)i,
+ (int)(*ptr_1));
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG */
@@ -2250,14 +2249,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* Free memory buffers */
if (small_ds_buf_0 != NULL)
- HDfree(small_ds_buf_0);
+ free(small_ds_buf_0);
if (small_ds_buf_1 != NULL)
- HDfree(small_ds_buf_1);
+ free(small_ds_buf_1);
if (large_ds_buf_0 != NULL)
- HDfree(large_ds_buf_0);
+ free(large_ds_buf_0);
if (large_ds_buf_1 != NULL)
- HDfree(large_ds_buf_1);
+ free(large_ds_buf_1);
return;
@@ -2362,11 +2361,11 @@ link_chunk_collective_io_test(void)
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDassert(mpi_size > 0);
+ assert(mpi_size > 0);
/* get the file name */
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* setup file access template */
acc_tpl = create_faccess_plist(mpi_comm, mpi_info, facc_type);
diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c
index ba9ecf5..08e6e1f 100644
--- a/testpar/t_subfiling_vfd.c
+++ b/testpar/t_subfiling_vfd.c
@@ -132,7 +132,7 @@ create_subfiling_ioc_fapl(MPI_Comm comm, MPI_Info info, hbool_t custom_config,
H5FD_ioc_config_t ioc_conf;
hid_t ret_value = H5I_INVALID_HID;
- HDassert(!custom_config || custom_cfg);
+ assert(!custom_config || custom_cfg);
if ((ret_value = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
@@ -322,16 +322,16 @@ test_config_file(void)
VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded");
- config_filename = HDmalloc(PATH_MAX);
- VRFY(config_filename, "HDmalloc succeeded");
+ config_filename = malloc(PATH_MAX);
+ VRFY(config_filename, "malloc succeeded");
HDsnprintf(config_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
SUBF_FILENAME, (uint64_t)file_info.st_ino);
- config_file = HDfopen(config_filename, "r");
- VRFY(config_file, "HDfopen succeeded");
+ config_file = fopen(config_filename, "r");
+ VRFY(config_file, "fopen succeeded");
- HDfree(config_filename);
+ free(config_filename);
VRFY((HDfseek(config_file, 0, SEEK_END) >= 0), "HDfseek succeeded");
@@ -340,8 +340,8 @@ test_config_file(void)
VRFY((HDfseek(config_file, 0, SEEK_SET) >= 0), "HDfseek succeeded");
- config_buf = HDmalloc((size_t)config_file_len + 1);
- VRFY(config_buf, "HDmalloc succeeded");
+ config_buf = malloc((size_t)config_file_len + 1);
+ VRFY(config_buf, "malloc succeeded");
VRFY((HDfread(config_buf, (size_t)config_file_len, 1, config_file) == 1), "HDfread succeeded");
config_buf[config_file_len] = '\0';
@@ -376,8 +376,8 @@ test_config_file(void)
VRFY((H5_dirname(resolved_path, &subfile_dir) >= 0), "H5_dirname succeeded");
- tmp_buf = HDmalloc(PATH_MAX);
- VRFY(tmp_buf, "HDmalloc succeeded");
+ tmp_buf = malloc(PATH_MAX);
+ VRFY(tmp_buf, "malloc succeeded");
substr = HDstrstr(config_buf, "hdf5_file");
VRFY(substr, "HDstrstr succeeded");
@@ -395,12 +395,12 @@ test_config_file(void)
VRFY((HDstrcmp(tmp_buf, subfile_dir) == 0), "HDstrcmp succeeded");
- HDfree(tmp_buf);
+ free(tmp_buf);
H5MM_free(subfile_dir);
- HDfree(resolved_path);
+ free(resolved_path);
- subfile_name = HDmalloc(PATH_MAX);
- VRFY(subfile_name, "HDmalloc succeeded");
+ subfile_name = malloc(PATH_MAX);
+ VRFY(subfile_name, "malloc succeeded");
/* Verify the name of each subfile is in the configuration file */
num_digits = (int)(HDlog10(cfg.stripe_count) + 1);
@@ -418,8 +418,8 @@ test_config_file(void)
substr = HDstrstr(config_buf, subfile_name);
VRFY(substr == NULL, "HDstrstr correctly failed");
- HDfree(subfile_name);
- HDfree(config_buf);
+ free(subfile_name);
+ free(config_buf);
VRFY((HDfclose(config_file) >= 0), "HDfclose on configuration file succeeded");
}
@@ -462,8 +462,8 @@ test_stripe_sizes(void)
if (MAINPROCESS)
TESTING_2("random subfiling stripe sizes");
- tmp_filename = HDmalloc(PATH_MAX);
- VRFY(tmp_filename, "HDmalloc succeeded");
+ tmp_filename = malloc(PATH_MAX);
+ VRFY(tmp_filename, "malloc succeeded");
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
VRFY((dxpl_id >= 0), "DXPL creation succeeded");
@@ -511,10 +511,10 @@ test_stripe_sizes(void)
nbytes = (size_t)(cfg.stripe_size * num_subfiles);
- write_buf = HDmalloc(nbytes);
- VRFY(write_buf, "HDmalloc succeeded");
+ write_buf = malloc(nbytes);
+ VRFY(write_buf, "malloc succeeded");
- HDmemset(write_buf, 255, nbytes);
+ memset(write_buf, 255, nbytes);
c_write_buf = write_buf;
@@ -570,8 +570,8 @@ test_stripe_sizes(void)
(uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr, "HDfopen on subfile succeeded");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr, "fopen on subfile succeeded");
VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded");
/* Check file size */
@@ -586,8 +586,8 @@ test_stripe_sizes(void)
(uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed");
/* Set EOA for following write call */
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, file_end_addr + nbytes) >= 0),
@@ -616,8 +616,8 @@ test_stripe_sizes(void)
(uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr, "HDfopen on subfile succeeded");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr, "fopen on subfile succeeded");
VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded");
/* Check file size */
@@ -632,10 +632,10 @@ test_stripe_sizes(void)
(uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed");
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
VRFY((H5FDclose(file_ptr) >= 0), "H5FDclose succeeded");
@@ -673,10 +673,10 @@ test_stripe_sizes(void)
nbytes = (size_t)(cfg.stripe_size * num_subfiles);
- write_buf = HDmalloc(nbytes);
- VRFY(write_buf, "HDmalloc succeeded");
+ write_buf = malloc(nbytes);
+ VRFY(write_buf, "malloc succeeded");
- HDmemset(write_buf, 255, nbytes);
+ memset(write_buf, 255, nbytes);
c_write_buf = write_buf;
@@ -736,8 +736,8 @@ test_stripe_sizes(void)
(uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr, "HDfopen on subfile succeeded");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr, "fopen on subfile succeeded");
VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded");
/* Check file size */
@@ -752,8 +752,8 @@ test_stripe_sizes(void)
(uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed");
}
mpi_code_g = MPI_Barrier(comm_g);
@@ -793,8 +793,8 @@ test_stripe_sizes(void)
(uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr, "HDfopen on subfile succeeded");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr, "fopen on subfile succeeded");
VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded");
/* Check file size */
@@ -809,8 +809,8 @@ test_stripe_sizes(void)
(uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed");
}
VRFY((H5FDclose(file_ptr) >= 0), "H5FDclose succeeded");
@@ -824,12 +824,12 @@ test_stripe_sizes(void)
}
H5E_END_TRY;
- HDfree(write_buf);
+ free(write_buf);
VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded");
}
- HDfree(tmp_filename);
+ free(tmp_filename);
VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded");
@@ -858,8 +858,8 @@ test_selection_strategies(void)
if (MAINPROCESS)
TESTING_2("I/O concentrator selection strategies");
- tmp_filename = HDmalloc(PATH_MAX);
- VRFY(tmp_filename, "HDmalloc succeeded");
+ tmp_filename = malloc(PATH_MAX);
+ VRFY(tmp_filename, "malloc succeeded");
for (H5FD_subfiling_ioc_select_t strategy = 0; strategy < ioc_selection_options; strategy++) {
/* Skip 1 IOC per node strategy since we assume it's
@@ -941,7 +941,7 @@ test_selection_strategies(void)
case SELECT_IOC_WITH_CONFIG:
case ioc_selection_options:
default:
- HDprintf("invalid IOC selection strategy\n");
+ printf("invalid IOC selection strategy\n");
MPI_Abort(comm_g, -1);
}
@@ -955,7 +955,7 @@ test_selection_strategies(void)
VRFY(HDsetenv(H5FD_SUBFILING_IOC_SELECTION_CRITERIA, criteria_buf, 1) >= 0,
"HDsetenv succeeded");
- HDassert(num_active_ranks == mpi_size || num_active_ranks == 1);
+ assert(num_active_ranks == mpi_size || num_active_ranks == 1);
if ((num_active_ranks == mpi_size) || (mpi_rank == 0)) {
h5_stat_t file_info;
@@ -985,8 +985,8 @@ test_selection_strategies(void)
(uint64_t)file_info.st_ino, num_digits, i + 1, expected_num_subfiles);
/* Ensure file exists */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr, "HDfopen on subfile succeeded");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr, "fopen on subfile succeeded");
VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded");
}
@@ -996,8 +996,8 @@ test_selection_strategies(void)
expected_num_subfiles);
/* Ensure file doesn't exist */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -1024,7 +1024,7 @@ test_selection_strategies(void)
mpi_code_g = MPI_Barrier(comm_g);
VRFY((mpi_code_g == MPI_SUCCESS), "MPI_Barrier succeeded");
- HDfree(tmp_filename);
+ free(tmp_filename);
CHECK_PASSED();
}
@@ -1071,8 +1071,8 @@ test_read_different_stripe_size(void)
if (MAINPROCESS)
TESTING_2("file re-opening with different stripe size");
- tmp_filename = HDmalloc(PATH_MAX);
- VRFY(tmp_filename, "HDmalloc succeeded");
+ tmp_filename = malloc(PATH_MAX);
+ VRFY(tmp_filename, "malloc succeeded");
/* Use a 1MiB stripe size and a subfile for each IOC */
cfg.ioc_selection = SELECT_IOC_ONE_PER_NODE;
@@ -1111,8 +1111,8 @@ test_read_different_stripe_size(void)
VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0),
"H5Sselect_hyperslab succeeded");
- buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE));
- VRFY(buf, "HDmalloc succeeded");
+ buf = malloc(count[0] * sizeof(SUBF_C_TYPE));
+ VRFY(buf, "malloc succeeded");
for (size_t i = 0; i < count[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i);
@@ -1120,7 +1120,7 @@ test_read_different_stripe_size(void)
VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded");
@@ -1144,8 +1144,8 @@ test_read_different_stripe_size(void)
(uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr, "HDfopen on subfile succeeded");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr, "fopen on subfile succeeded");
VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded");
/* Check file size */
@@ -1181,8 +1181,8 @@ test_read_different_stripe_size(void)
VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0),
"H5Sselect_hyperslab succeeded");
- buf = HDcalloc(1, count[0] * sizeof(SUBF_C_TYPE));
- VRFY(buf, "HDcalloc succeeded");
+ buf = calloc(1, count[0] * sizeof(SUBF_C_TYPE));
+ VRFY(buf, "calloc succeeded");
VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset read succeeded");
@@ -1193,7 +1193,7 @@ test_read_different_stripe_size(void)
VRFY((buf_value == (SUBF_C_TYPE)((size_t)mpi_rank + i)), "data verification succeeded");
}
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded");
@@ -1215,14 +1215,14 @@ test_read_different_stripe_size(void)
if (j < (num_subfiles / 2)) {
/* Ensure file exists */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr, "HDfopen on subfile succeeded");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr, "fopen on subfile succeeded");
VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded");
}
else {
/* Ensure file doesn't exist */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed");
}
}
}
@@ -1239,7 +1239,7 @@ test_read_different_stripe_size(void)
VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded");
VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded");
- HDfree(tmp_filename);
+ free(tmp_filename);
CHECK_PASSED();
}
@@ -1331,8 +1331,8 @@ test_subfiling_precreate_rank_0(void)
H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset creation succeeded");
- buf = HDmalloc(dset_dims[0] * sizeof(SUBF_C_TYPE));
- VRFY(buf, "HDmalloc succeeded");
+ buf = malloc(dset_dims[0] * sizeof(SUBF_C_TYPE));
+ VRFY(buf, "malloc succeeded");
for (size_t i = 0; i < dset_dims[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((i / n_elements_per_rank) + (i % n_elements_per_rank));
@@ -1340,7 +1340,7 @@ test_subfiling_precreate_rank_0(void)
VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded");
@@ -1357,8 +1357,8 @@ test_subfiling_precreate_rank_0(void)
VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded");
- tmp_filename = HDmalloc(PATH_MAX);
- VRFY(tmp_filename, "HDmalloc succeeded");
+ tmp_filename = malloc(PATH_MAX);
+ VRFY(tmp_filename, "malloc succeeded");
for (int i = 0; i < num_subfiles; i++) {
h5_stat_t subfile_info;
@@ -1367,8 +1367,8 @@ test_subfiling_precreate_rank_0(void)
(uint64_t)file_info.st_ino, num_digits, i + 1, num_subfiles);
/* Ensure file exists */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr, "HDfopen on subfile succeeded");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr, "fopen on subfile succeeded");
VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded");
/* Check file size */
@@ -1383,10 +1383,10 @@ test_subfiling_precreate_rank_0(void)
(uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
- subfile_ptr = HDfopen(tmp_filename, "r");
- VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed");
+ subfile_ptr = fopen(tmp_filename, "r");
+ VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed");
- HDfree(tmp_filename);
+ free(tmp_filename);
tmp_filename = NULL;
}
@@ -1413,8 +1413,8 @@ test_subfiling_precreate_rank_0(void)
VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0),
"H5Sselect_hyperslab succeeded");
- buf = HDcalloc(1, count[0] * sizeof(SUBF_C_TYPE));
- VRFY(buf, "HDcalloc succeeded");
+ buf = calloc(1, count[0] * sizeof(SUBF_C_TYPE));
+ VRFY(buf, "calloc succeeded");
VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset read succeeded");
@@ -1425,7 +1425,7 @@ test_subfiling_precreate_rank_0(void)
VRFY((buf_value == (SUBF_C_TYPE)((size_t)mpi_rank + i)), "data verification succeeded");
}
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded");
@@ -1522,8 +1522,8 @@ test_subfiling_write_many_read_one(void)
VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0),
"H5Sselect_hyperslab succeeded");
- buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE));
- VRFY(buf, "HDmalloc succeeded");
+ buf = malloc(count[0] * sizeof(SUBF_C_TYPE));
+ VRFY(buf, "malloc succeeded");
for (size_t i = 0; i < count[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i);
@@ -1531,7 +1531,7 @@ test_subfiling_write_many_read_one(void)
VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1550,8 +1550,8 @@ test_subfiling_write_many_read_one(void)
dset_id = H5Dopen2(file_id, "DSET", H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
- buf = HDcalloc(1, target_size);
- VRFY(buf, "HDcalloc succeeded");
+ buf = calloc(1, target_size);
+ VRFY(buf, "calloc succeeded");
VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0),
"Dataset read succeeded");
@@ -1564,7 +1564,7 @@ test_subfiling_write_many_read_one(void)
}
}
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1678,8 +1678,8 @@ test_subfiling_write_many_read_few(void)
VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0),
"H5Sselect_hyperslab succeeded");
- buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE));
- VRFY(buf, "HDmalloc succeeded");
+ buf = malloc(count[0] * sizeof(SUBF_C_TYPE));
+ VRFY(buf, "malloc succeeded");
for (size_t i = 0; i < count[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i);
@@ -1687,7 +1687,7 @@ test_subfiling_write_many_read_few(void)
VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1736,8 +1736,8 @@ test_subfiling_write_many_read_few(void)
dset_id = H5Dopen2(file_id, "DSET", H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
- buf = HDcalloc(1, target_size);
- VRFY(buf, "HDcalloc succeeded");
+ buf = calloc(1, target_size);
+ VRFY(buf, "calloc succeeded");
VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0),
"Dataset read succeeded");
@@ -1750,7 +1750,7 @@ test_subfiling_write_many_read_few(void)
}
}
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -1829,7 +1829,7 @@ test_subfiling_h5fuse(void)
if (MAINPROCESS) {
FILE *h5fuse_script;
- h5fuse_script = HDfopen("h5fuse.sh", "r");
+ h5fuse_script = fopen("h5fuse.sh", "r");
if (h5fuse_script)
HDfclose(h5fuse_script);
else
@@ -1903,8 +1903,8 @@ test_subfiling_h5fuse(void)
VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0),
"H5Sselect_hyperslab succeeded");
- buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE));
- VRFY(buf, "HDmalloc succeeded");
+ buf = malloc(count[0] * sizeof(SUBF_C_TYPE));
+ VRFY(buf, "malloc succeeded");
for (size_t i = 0; i < count[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i);
@@ -1912,7 +1912,7 @@ test_subfiling_h5fuse(void)
VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded");
@@ -1931,8 +1931,8 @@ test_subfiling_h5fuse(void)
char *tmp_filename;
char *args[7];
- tmp_filename = HDmalloc(PATH_MAX);
- VRFY(tmp_filename, "HDmalloc succeeded");
+ tmp_filename = malloc(PATH_MAX);
+ VRFY(tmp_filename, "malloc succeeded");
/* Generate name for configuration file */
HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
@@ -1957,14 +1957,14 @@ test_subfiling_h5fuse(void)
int ret;
if ((ret = WEXITSTATUS(status)) != 0) {
- HDprintf("h5fuse process exited with error code %d\n", ret);
- HDfflush(stdout);
+ printf("h5fuse process exited with error code %d\n", ret);
+ fflush(stdout);
MPI_Abort(comm_g, -1);
}
}
else {
- HDprintf("h5fuse process terminated abnormally\n");
- HDfflush(stdout);
+ printf("h5fuse process terminated abnormally\n");
+ fflush(stdout);
MPI_Abort(comm_g, -1);
}
}
@@ -1980,8 +1980,8 @@ test_subfiling_h5fuse(void)
dset_id = H5Dopen2(file_id, "DSET", H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset open succeeded");
- buf = HDcalloc(1, target_size);
- VRFY(buf, "HDcalloc succeeded");
+ buf = calloc(1, target_size);
+ VRFY(buf, "calloc succeeded");
VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0),
"Dataset read succeeded");
@@ -1994,7 +1994,7 @@ test_subfiling_h5fuse(void)
}
}
- HDfree(buf);
+ free(buf);
buf = NULL;
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
@@ -2024,8 +2024,8 @@ test_subfiling_h5fuse(void)
}
H5E_END_TRY;
- filename_buf = HDmalloc(PATH_MAX);
- VRFY(filename_buf, "HDmalloc succeeded");
+ filename_buf = malloc(PATH_MAX);
+ VRFY(filename_buf, "malloc succeeded");
/* Generate name for configuration file */
HDsnprintf(filename_buf, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
@@ -2033,7 +2033,7 @@ test_subfiling_h5fuse(void)
/* Delete the configuration file */
if (HDremove(filename_buf) < 0) {
- HDprintf("couldn't remove Subfiling VFD configuration file '%s'\n", filename_buf);
+ printf("couldn't remove Subfiling VFD configuration file '%s'\n", filename_buf);
nerrors++;
}
@@ -2044,12 +2044,12 @@ test_subfiling_h5fuse(void)
/* Delete the subfile */
if (HDremove(filename_buf) < 0) {
- HDprintf("couldn't remove subfile '%s'\n", filename_buf);
+ printf("couldn't remove subfile '%s'\n", filename_buf);
nerrors++;
}
}
- HDfree(filename_buf);
+ free(filename_buf);
}
VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded");
@@ -2093,13 +2093,13 @@ parse_subfiling_env_vars(void)
}
if (NULL != (env_value = HDgetenv(H5FD_IOC_THREAD_POOL_SIZE))) {
- ioc_thread_pool_size_g = HDatoi(env_value);
+ ioc_thread_pool_size_g = atoi(env_value);
if (ioc_thread_pool_size_g <= 0)
ioc_thread_pool_size_g = -1;
}
if (NULL != (env_value = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX))) {
- HDassert(config_dir);
+ assert(config_dir);
HDstrncpy(config_dir, env_value, PATH_MAX);
@@ -2129,27 +2129,27 @@ main(int argc, char **argv)
/* Initialize MPI */
if (MPI_SUCCESS != (mpi_code_g = MPI_Init_thread(&argc, &argv, required, &provided))) {
- HDprintf("MPI_Init_thread failed with error code %d\n", mpi_code_g);
+ printf("MPI_Init_thread failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_rank(comm_g, &mpi_rank))) {
- HDprintf("MPI_Comm_rank failed with error code %d\n", mpi_code_g);
+ printf("MPI_Comm_rank failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
if (provided != required) {
if (MAINPROCESS)
- HDprintf("MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE\n");
+ printf("MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE\n");
nerrors++;
goto exit;
}
if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_size(comm_g, &mpi_size))) {
if (MAINPROCESS)
- HDprintf("MPI_Comm_size failed with error code %d\n", mpi_code_g);
+ printf("MPI_Comm_size failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
@@ -2158,19 +2158,19 @@ main(int argc, char **argv)
if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_split_type(comm_g, MPI_COMM_TYPE_SHARED, mpi_rank,
MPI_INFO_NULL, &node_local_comm))) {
if (MAINPROCESS)
- HDprintf("MPI_Comm_split_type failed with error code %d\n", mpi_code_g);
+ printf("MPI_Comm_split_type failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_size(node_local_comm, &node_local_size))) {
if (MAINPROCESS)
- HDprintf("MPI_Comm_size failed with error code %d\n", mpi_code_g);
+ printf("MPI_Comm_size failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_rank(node_local_comm, &node_local_rank))) {
if (MAINPROCESS)
- HDprintf("MPI_Comm_rank failed with error code %d\n", mpi_code_g);
+ printf("MPI_Comm_rank failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
@@ -2180,7 +2180,7 @@ main(int argc, char **argv)
if (MPI_SUCCESS !=
(mpi_code_g = MPI_Allreduce(MPI_IN_PLACE, &num_nodes_g, 1, MPI_INT, MPI_SUM, comm_g))) {
if (MAINPROCESS)
- HDprintf("MPI_Allreduce failed with error code %d\n", mpi_code_g);
+ printf("MPI_Allreduce failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
@@ -2193,32 +2193,32 @@ main(int argc, char **argv)
*/
if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_split(comm_g, node_local_rank, mpi_rank, &ioc_comm))) {
if (MAINPROCESS)
- HDprintf("MPI_Comm_split failed with error code %d\n", mpi_code_g);
+ printf("MPI_Comm_split failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_size(ioc_comm, &ioc_comm_size))) {
if (MAINPROCESS)
- HDprintf("MPI_Comm_size failed with error code %d\n", mpi_code_g);
+ printf("MPI_Comm_size failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_rank(ioc_comm, &ioc_comm_rank))) {
if (MAINPROCESS)
- HDprintf("MPI_Comm_rank failed with error code %d\n", mpi_code_g);
+ printf("MPI_Comm_rank failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
if (H5dont_atexit() < 0) {
if (MAINPROCESS)
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ printf("Failed to turn off atexit processing. Continue.\n");
}
H5open();
if (MAINPROCESS) {
- HDprintf("Testing Subfiling VFD functionality\n");
+ printf("Testing Subfiling VFD functionality\n");
}
TestAlarmOn();
@@ -2236,7 +2236,7 @@ main(int argc, char **argv)
if (mpi_size > 1) {
if (MPI_SUCCESS != (mpi_code_g = MPI_Bcast(&seed, 1, MPI_UNSIGNED, 0, comm_g))) {
if (MAINPROCESS)
- HDprintf("MPI_Bcast failed with error code %d\n", mpi_code_g);
+ printf("MPI_Bcast failed with error code %d\n", mpi_code_g);
nerrors++;
goto exit;
}
@@ -2245,13 +2245,13 @@ main(int argc, char **argv)
srand(seed);
if (MAINPROCESS)
- HDprintf("Using seed: %u\n\n", seed);
+ printf("Using seed: %u\n\n", seed);
/* Allocate buffer for possible config file directory specified */
- config_dir = HDmalloc(PATH_MAX);
+ config_dir = malloc(PATH_MAX);
if (!config_dir) {
if (MAINPROCESS)
- HDprintf("couldn't allocate space for subfiling config file directory buffer\n");
+ printf("couldn't allocate space for subfiling config file directory buffer\n");
nerrors++;
goto exit;
}
@@ -2312,7 +2312,7 @@ main(int argc, char **argv)
if (HDsetenv(H5FD_SUBFILING_STRIPE_SIZE, tmp, 1) < 0) {
if (MAINPROCESS)
- HDprintf("HDsetenv failed\n");
+ printf("HDsetenv failed\n");
nerrors++;
goto exit;
}
@@ -2329,7 +2329,7 @@ main(int argc, char **argv)
if (HDsetenv(H5FD_SUBFILING_IOC_PER_NODE, ioc_per_node_str, 1) < 0) {
if (MAINPROCESS)
- HDprintf("HDsetenv failed\n");
+ printf("HDsetenv failed\n");
nerrors++;
goto exit;
}
@@ -2339,7 +2339,7 @@ main(int argc, char **argv)
if (ioc_thread_pool_size_g < 0) {
if (HDsetenv(H5FD_IOC_THREAD_POOL_SIZE, "2", 1) < 0) {
if (MAINPROCESS)
- HDprintf("HDsetenv failed\n");
+ printf("HDsetenv failed\n");
nerrors++;
goto exit;
}
@@ -2364,7 +2364,7 @@ main(int argc, char **argv)
if (MAINPROCESS) {
if ((HDmkdir(SUBFILING_CONFIG_FILE_DIR, (mode_t)0755) < 0) && (errno != EEXIST)) {
- HDprintf("couldn't create temporary testing directory\n");
+ printf("couldn't create temporary testing directory\n");
mkdir_success = 0;
}
else
@@ -2376,14 +2376,14 @@ main(int argc, char **argv)
if (!mkdir_success) {
if (MAINPROCESS)
- HDprintf("HDmkdir failed\n");
+ printf("HDmkdir failed\n");
nerrors++;
goto exit;
}
if (HDsetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX, SUBFILING_CONFIG_FILE_DIR, 1) < 0) {
if (MAINPROCESS)
- HDprintf("HDsetenv failed\n");
+ printf("HDsetenv failed\n");
nerrors++;
goto exit;
}
@@ -2391,7 +2391,7 @@ main(int argc, char **argv)
else {
if (HDsetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX, ".", 1) < 0) {
if (MAINPROCESS)
- HDprintf("HDsetenv failed\n");
+ printf("HDsetenv failed\n");
nerrors++;
goto exit;
}
@@ -2413,7 +2413,7 @@ main(int argc, char **argv)
num_iocs_g = mpi_size;
if (MAINPROCESS) {
- HDprintf("Re-running tests with environment variables set\n");
+ printf("Re-running tests with environment variables set\n");
}
for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
@@ -2448,14 +2448,14 @@ exit:
if (MAINPROCESS) {
if (HDrmdir(SUBFILING_CONFIG_FILE_DIR) < 0 && (errno != ENOENT)) {
- HDprintf("couldn't remove temporary testing directory\n");
+ printf("couldn't remove temporary testing directory\n");
nerrors++;
}
}
if (nerrors) {
if (MAINPROCESS)
- HDprintf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : "");
+ printf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : "");
}
TestAlarmOff();
@@ -2469,7 +2469,7 @@ exit:
MPI_Finalize();
- HDexit(nerrors ? EXIT_FAILURE : EXIT_SUCCESS);
+ exit(nerrors ? EXIT_FAILURE : EXIT_SUCCESS);
}
#else /* H5_HAVE_SUBFILING_VFD */
@@ -2478,9 +2478,9 @@ int
main(void)
{
h5_reset();
- HDprintf("Testing Subfiling VFD functionality\n");
- HDprintf("SKIPPED - Subfiling VFD not built\n");
- HDexit(EXIT_SUCCESS);
+ printf("Testing Subfiling VFD functionality\n");
+ printf("SKIPPED - Subfiling VFD not built\n");
+ exit(EXIT_SUCCESS);
}
#endif /* H5_HAVE_SUBFILING_VFD */
diff --git a/testpar/t_vfd.c b/testpar/t_vfd.c
index 86cfe2f..fe3477d 100644
--- a/testpar/t_vfd.c
+++ b/testpar/t_vfd.c
@@ -133,7 +133,7 @@ alloc_and_init_file_images(int mpi_size)
pass = TRUE;
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* allocate the file image buffers */
if (pass) {
@@ -141,11 +141,11 @@ alloc_and_init_file_images(int mpi_size)
buf_len = INTS_PER_RANK * mpi_size;
buf_size = sizeof(int32_t) * (size_t)INTS_PER_RANK * (size_t)mpi_size;
- increasing_fi_buf = (int32_t *)HDmalloc(buf_size);
- decreasing_fi_buf = (int32_t *)HDmalloc(buf_size);
- negative_fi_buf = (int32_t *)HDmalloc(buf_size);
- zero_fi_buf = (int32_t *)HDmalloc(buf_size);
- read_fi_buf = (int32_t *)HDmalloc(buf_size);
+ increasing_fi_buf = (int32_t *)malloc(buf_size);
+ decreasing_fi_buf = (int32_t *)malloc(buf_size);
+ negative_fi_buf = (int32_t *)malloc(buf_size);
+ zero_fi_buf = (int32_t *)malloc(buf_size);
+ read_fi_buf = (int32_t *)malloc(buf_size);
if ((!increasing_fi_buf) || (!decreasing_fi_buf) || (!negative_fi_buf) || (!zero_fi_buf) ||
(!read_fi_buf)) {
@@ -156,7 +156,7 @@ alloc_and_init_file_images(int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* initialize the file image buffers */
if (pass) {
@@ -172,7 +172,7 @@ alloc_and_init_file_images(int mpi_size)
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* discard file image buffers if there was an error */
if (!pass) {
@@ -203,31 +203,31 @@ free_file_images(void)
{
if (increasing_fi_buf) {
- HDfree(increasing_fi_buf);
+ free(increasing_fi_buf);
increasing_fi_buf = NULL;
}
if (decreasing_fi_buf) {
- HDfree(decreasing_fi_buf);
+ free(decreasing_fi_buf);
decreasing_fi_buf = NULL;
}
if (negative_fi_buf) {
- HDfree(negative_fi_buf);
+ free(negative_fi_buf);
negative_fi_buf = NULL;
}
if (zero_fi_buf) {
- HDfree(zero_fi_buf);
+ free(zero_fi_buf);
zero_fi_buf = NULL;
}
if (read_fi_buf) {
- HDfree(read_fi_buf);
+ free(read_fi_buf);
read_fi_buf = NULL;
}
@@ -270,13 +270,13 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
unsigned flags = 0; /* file open flags */
H5FD_t *lf = NULL; /* VFD struct ptr */
- HDassert(vfd_name);
- HDassert(lf_ptr);
- HDassert(fapl_id_ptr);
- HDassert(dxpl_id_ptr);
+ assert(vfd_name);
+ assert(lf_ptr);
+ assert(fapl_id_ptr);
+ assert(dxpl_id_ptr);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name -- do this now, since setting up the ioc faple requires it. This will probably
* change */
@@ -290,7 +290,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setupf fapl for target VFD */
if (pass) {
@@ -354,8 +354,8 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
failure_mssg = "Can't set MPI communicator and info in subfiling fapl.";
}
- HDmemset(&ioc_config, 0, sizeof(ioc_config));
- HDmemset(&subfiling_conf, 0, sizeof(subfiling_conf));
+ memset(&ioc_config, 0, sizeof(ioc_config));
+ memset(&subfiling_conf, 0, sizeof(subfiling_conf));
/* Get subfiling VFD defaults */
if ((pass) && (H5Pget_fapl_subfiling(fapl_id, &subfiling_conf) == FAIL)) {
@@ -407,7 +407,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* setup the file name */
if (pass) {
@@ -420,7 +420,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Open the VFD test file with the specified VFD. */
@@ -436,7 +436,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* set eoa as specified */
@@ -452,7 +452,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) { /* setup dxpl */
@@ -466,7 +466,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -478,7 +478,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -533,12 +533,12 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
int cp = 0;
hbool_t show_progress = FALSE;
- HDassert(lf_ptr);
- HDassert(fapl_id_ptr);
- HDassert(dxpl_id_ptr);
+ assert(lf_ptr);
+ assert(fapl_id_ptr);
+ assert(dxpl_id_ptr);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Close the test file if it is open, regardless of the value of pass.
* This should let the test program shut down more cleanly.
@@ -554,7 +554,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) On rank 0, delete the test file.
*/
@@ -575,7 +575,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Close the fapl */
if (H5Pclose(*fapl_id_ptr) < 0) {
@@ -585,7 +585,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* Close the dxpl */
if (H5Pclose(*dxpl_id_ptr) < 0) {
@@ -595,7 +595,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
return;
@@ -681,7 +681,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 1 -- %s / col op / col I/O",
vfd_name);
@@ -693,7 +693,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -705,7 +705,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Using rank zero, write the entire increasing_fi_buf to
* the file.
@@ -729,7 +729,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) On each rank, zero the read buffer, and then read
* INTS_PER_RANK * sizeof(int32) bytes from the file
@@ -787,13 +787,13 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -801,7 +801,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -815,7 +815,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -914,7 +914,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 2 -- %s / col op / col I/O",
vfd_name);
@@ -926,7 +926,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -938,7 +938,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Using rank zero, write the entire decreasing_fi_buf to
* the file.
@@ -962,7 +962,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) On each rank, zero the read buffer. */
if (pass) {
@@ -974,7 +974,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) On even ranks, read INTS_PER_RANK * sizeof(int32)
* bytes from the file starting at offset mpi_rank *
@@ -1007,13 +1007,13 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) On odd ranks, read INTS_PER_RANK * sizeof(int32)
* bytes from the file starting at offset mpi_rank *
@@ -1046,7 +1046,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Verify that read_fi_buf contains zeros for all
* indices less than mpi_rank * INTS_PER_RANK, or
@@ -1081,20 +1081,20 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 9) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 10) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
*/
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -1108,7 +1108,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -1218,7 +1218,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 3 -- %s / col op / col I/O",
vfd_name);
@@ -1230,7 +1230,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -1242,7 +1242,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Using rank zero, write the entire negative_fi_buf to
* the file.
@@ -1266,7 +1266,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) On each rank, zero the four read buffers. */
if (pass) {
@@ -1281,7 +1281,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) On each rank, do a vector read from the file, with
* each rank's vector having four elements, with each
@@ -1354,7 +1354,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Verify that buf_0, buf_1, buf_2, and buf_3 contain
* the expected data. Note that this will be different
@@ -1412,13 +1412,13 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -1426,7 +1426,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -1440,7 +1440,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -1574,7 +1574,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 4 -- %s / col op / col I/O",
vfd_name);
@@ -1586,7 +1586,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -1598,7 +1598,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Using rank zero, write the entire negative_fi_buf to
* the file.
@@ -1622,7 +1622,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Set all cells of read_fi_buf to zero. */
if (pass) {
@@ -1634,7 +1634,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) For each rank, define base_index equal to:
*
@@ -1775,8 +1775,8 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
pass = FALSE;
failure_mssg = "unexpected data read from file (1.1)";
- HDfprintf(stdout, "\nread_fi_buf[%d] = %d, increasing_fi_buf[%d] = %d\n",
- j, read_fi_buf[j], j, increasing_fi_buf[j]);
+ fprintf(stdout, "\nread_fi_buf[%d] = %d, increasing_fi_buf[%d] = %d\n", j,
+ read_fi_buf[j], j, increasing_fi_buf[j]);
}
}
else if (((INTS_PER_RANK / 4) <= k) && (k < (3 * (INTS_PER_RANK / 8)))) {
@@ -1860,7 +1860,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
break;
default:
- HDassert(FALSE); /* should be un-reachable */
+ assert(FALSE); /* should be un-reachable */
break;
}
}
@@ -1874,13 +1874,13 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
} /* end if */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -1888,7 +1888,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -1902,7 +1902,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -2004,7 +2004,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 5 -- %s / col op / col I/O",
vfd_name);
@@ -2016,7 +2016,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -2028,7 +2028,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Using rank zero, write the entire negative_fi_buf to
* the file.
@@ -2052,7 +2052,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Set all cells of read_fi_buf to zero. */
if (pass) {
@@ -2064,7 +2064,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) For each rank, define base_index equal to:
*
@@ -2108,7 +2108,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) On each rank, verify that read_fi_buf contains the
* the expected values -- that is the matching values from
@@ -2141,13 +2141,13 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
} /* end if */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -2155,7 +2155,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -2168,7 +2168,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -2243,7 +2243,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title),
"parallel vector write test 1 -- %s / col op / col I/O", vfd_name);
@@ -2255,7 +2255,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -2267,7 +2267,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Write the entire increasing_fi_buf to the file, with
* exactly one buffer per vector per rank. Use either
@@ -2290,14 +2290,14 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Barrier
*/
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) On each rank, read the entire file into the read_fi_buf,
* and compare against increasing_fi_buf. Report failure
@@ -2326,7 +2326,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -2334,7 +2334,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -2348,7 +2348,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -2433,7 +2433,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title),
"parallel vector write test 2 -- %s / col op / col I/O", vfd_name);
@@ -2445,7 +2445,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -2457,7 +2457,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Write the odd blocks of the increasing_fi_buf to the file,
* with the odd ranks writing the odd blocks, and the even
@@ -2494,7 +2494,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Write the even blocks of the negative_fi_buf to the file,
* with the even ranks writing the even blocks, and the odd
@@ -2527,14 +2527,14 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) Barrier
*/
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) On each rank, read the entire file into the read_fi_buf,
* and compare against increasing_fi_buf. Report failure
@@ -2581,7 +2581,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -2589,7 +2589,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -2603,7 +2603,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -2689,7 +2689,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title),
"parallel vector write test 3 -- %s / col op / col I/O", vfd_name);
@@ -2701,7 +2701,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -2713,7 +2713,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) For each rank, construct a vector with base address
* (mpi_rank * INTS_PER_RANK) and writing all bytes from
@@ -2759,14 +2759,14 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Barrier
*/
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) On each rank, read the entire file into the read_fi_buf,
* and compare against increasing_fi_buf,
@@ -2838,7 +2838,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -2846,7 +2846,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -2860,7 +2860,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -2952,7 +2952,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title),
"parallel vector write test 4 -- %s / col op / col I/O", vfd_name);
@@ -2964,7 +2964,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -2976,7 +2976,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) For each rank, construct a vector with base address
* (mpi_rank * INTS_PER_RANK) and writing all bytes from
@@ -3023,14 +3023,14 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Barrier
*/
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) On each rank, read the entire file into the read_fi_buf,
* and compare against increasing_fi_buf,
@@ -3102,7 +3102,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -3110,7 +3110,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -3124,7 +3124,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -3252,7 +3252,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title),
"parallel vector write test 5 -- %s / col op / col I/O", vfd_name);
@@ -3264,7 +3264,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -3276,7 +3276,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Set the test file in a known state by writing zeros
* to all bytes in the test file. Since we have already
@@ -3298,14 +3298,14 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Barrier
*/
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) For each rank, define base_index equal to:
*
@@ -3415,13 +3415,13 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) On each rank, read the entire file into the read_fi_buf,
* and compare against increasing_fi_buf,
@@ -3458,8 +3458,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
pass = FALSE;
failure_mssg = "unexpected data read from file (1.1)";
- HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
- negative_fi_buf[j]);
+ printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
+ negative_fi_buf[j]);
}
}
else if (((INTS_PER_RANK / 4) <= k) && (k < (3 * (INTS_PER_RANK / 8)))) {
@@ -3469,8 +3469,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
pass = FALSE;
failure_mssg = "unexpected data read from file (1.2)";
- HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
- decreasing_fi_buf[j]);
+ printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
+ decreasing_fi_buf[j]);
}
}
else if (((INTS_PER_RANK / 16) <= k) && (k < (INTS_PER_RANK / 8))) {
@@ -3480,8 +3480,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
pass = FALSE;
failure_mssg = "unexpected data read from file (1.3)";
- HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
- increasing_fi_buf[j]);
+ printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
+ increasing_fi_buf[j]);
}
}
else {
@@ -3502,8 +3502,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
pass = FALSE;
failure_mssg = "unexpected data read from file (2.1)";
- HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
- increasing_fi_buf[j]);
+ printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
+ increasing_fi_buf[j]);
}
}
else if ((((INTS_PER_RANK / 2) + 1) <= k) && (k <= (INTS_PER_RANK - 2))) {
@@ -3513,8 +3513,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
pass = FALSE;
failure_mssg = "unexpected data read from file (2.2)";
- HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
- decreasing_fi_buf[j]);
+ printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
+ decreasing_fi_buf[j]);
}
}
else {
@@ -3535,8 +3535,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
pass = FALSE;
failure_mssg = "unexpected data read from file (3.1)";
- HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
- negative_fi_buf[j]);
+ printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
+ negative_fi_buf[j]);
}
}
else {
@@ -3558,7 +3558,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
break;
default:
- HDassert(FALSE); /* should be un-reachable */
+ assert(FALSE); /* should be un-reachable */
break;
}
}
@@ -3566,7 +3566,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -3574,7 +3574,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -3588,7 +3588,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -3689,7 +3689,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsnprintf(test_title, sizeof(test_title),
"parallel vector write test 6 -- %s / col op / col I/O", vfd_name);
@@ -3701,7 +3701,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -3713,7 +3713,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Using rank zero, write the entire negative_fi_buf to
* the file.
@@ -3736,7 +3736,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 4) For each rank, define base_index equal to:
*
@@ -3780,13 +3780,13 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) On each rank, read the entire file into the read_fi_buf,
* and compare against zero_fi_buf, and increasing_fi_buf
@@ -3822,13 +3822,13 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
} /* end if */
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 8) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -3836,7 +3836,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -3850,7 +3850,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -3947,7 +3947,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
else {
- HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
+ assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
HDsprintf(test_title, "parallel vector write test 7 -- %s / col op / col I/O", vfd_name);
}
@@ -3958,7 +3958,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
show_progress = ((show_progress) && (mpi_rank == 0));
if (show_progress)
- HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */
if (pass) {
@@ -3970,7 +3970,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 2) Set the test file in a known state by writing zeros
* to all bytes in the test file. Since we have already
@@ -3992,14 +3992,14 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 3) Barrier
*/
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
if (pass) {
@@ -4025,13 +4025,13 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 5) Barrier */
MPI_Barrier(comm);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 6) On each rank, read the entire file into the read_fi_buf,
* and compare against increasing_fi_buf, and zero_fi_buf as
@@ -4064,8 +4064,8 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
pass = FALSE;
failure_mssg = "unexpected data read from file (1)";
- HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
- increasing_fi_buf[j]);
+ printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
+ increasing_fi_buf[j]);
}
}
else {
@@ -4075,7 +4075,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
pass = FALSE;
failure_mssg = "unexpected data read from file (2)";
- HDprintf("\nread_fi_buf[%d] = %d, 0 expected.\n", j, read_fi_buf[j]);
+ printf("\nread_fi_buf[%d] = %d, 0 expected.\n", j, read_fi_buf[j]);
}
}
}
@@ -4083,7 +4083,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
}
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* 7) Close the test file and delete it (on rank 0 only).
* Close FAPL and DXPL.
@@ -4091,7 +4091,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id);
if (show_progress)
- HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
/* report results */
if (mpi_rank == 0) {
@@ -4105,7 +4105,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
H5_FAILED();
if ((disp_failure_mssgs) || (show_progress)) {
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
+ fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg);
}
}
}
@@ -4142,17 +4142,17 @@ main(int argc, char **argv)
#ifdef H5_HAVE_SUBFILING_VFD
if (MPI_SUCCESS != MPI_Init_thread(&argc, &argv, required, &provided)) {
- HDprintf(" MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE. Exiting\n");
+ printf(" MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE. Exiting\n");
goto finish;
}
if (provided != required) {
- HDprintf(" MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE. Exiting\n");
+ printf(" MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE. Exiting\n");
goto finish;
}
#else
if (MPI_SUCCESS != MPI_Init(&argc, &argv)) {
- HDprintf(" MPI_Init failed. Exiting\n");
+ printf(" MPI_Init failed. Exiting\n");
goto finish;
}
#endif
@@ -4166,20 +4166,20 @@ main(int argc, char **argv)
* calls which may not work.
*/
if (H5dont_atexit() < 0)
- HDprintf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank);
+ printf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank);
H5open();
if (mpi_rank == 0) {
- HDprintf("=========================================\n");
- HDprintf("Parallel virtual file driver (VFD) tests\n");
- HDprintf(" mpi_size = %d\n", mpi_size);
- HDprintf("=========================================\n");
+ printf("=========================================\n");
+ printf("Parallel virtual file driver (VFD) tests\n");
+ printf(" mpi_size = %d\n", mpi_size);
+ printf("=========================================\n");
}
if (mpi_size < 2) {
if (mpi_rank == 0)
- HDprintf(" Need at least 2 processes. Exiting.\n");
+ printf(" Need at least 2 processes. Exiting.\n");
goto finish;
}
@@ -4187,14 +4187,14 @@ main(int argc, char **argv)
if (!pass) {
- HDprintf("\nAllocation and initialize of file image buffers failed. Test aborted.\n");
+ printf("\nAllocation and initialize of file image buffers failed. Test aborted.\n");
}
MPI_Barrier(comm);
if (mpi_rank == 0) {
- HDprintf("\n\n --- TESTING MPIO VFD --- \n\n");
+ printf("\n\n --- TESTING MPIO VFD --- \n\n");
}
nerrs +=
@@ -4276,7 +4276,7 @@ main(int argc, char **argv)
#ifdef H5_HAVE_SUBFILING_VFD
if (mpi_rank == 0) {
- HDprintf("\n\n --- TESTING SUBFILING VFD --- \n\n");
+ printf("\n\n --- TESTING SUBFILING VFD --- \n\n");
}
nerrs += vector_read_test_1(7, mpi_rank, mpi_size, H5FD_MPIO_INDEPENDENT, H5FD_MPIO_INDIVIDUAL_IO,
@@ -4371,12 +4371,12 @@ finish:
MPI_Barrier(comm);
if (mpi_rank == 0) { /* only process 0 reports */
- HDprintf("===================================\n");
+ printf("===================================\n");
if (nerrs > 0)
- HDprintf("***vfd tests detected %d failures***\n", nerrs);
+ printf("***vfd tests detected %d failures***\n", nerrs);
else
- HDprintf("vfd tests finished with no failures\n");
- HDprintf("===================================\n");
+ printf("vfd tests finished with no failures\n");
+ printf("===================================\n");
}
/* discard the file image buffers */
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index e7befd6..b35a758 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -76,11 +76,10 @@ pause_proc(void)
if (MAINPROCESS)
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) {
if (!loops++) {
- HDprintf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid,
- pid);
+ printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid);
}
- HDprintf("waiting(%ds) for file %s ...\n", time_int, greenlight);
- HDfflush(stdout);
+ printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
+ fflush(stdout);
HDsleep(time_int);
}
MPI_Barrier(MPI_COMM_WORLD);
@@ -103,18 +102,18 @@ MPI_Init(int *argc, char ***argv)
static void
usage(void)
{
- HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
- "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
- HDprintf("\t-m<n_datasets>"
- "\tset number of datasets for the multiple dataset test\n");
- HDprintf("\t-n<n_groups>"
- "\tset number of groups for the multiple group test\n");
- HDprintf("\t-f <prefix>\tfilename prefix\n");
- HDprintf("\t-2\t\tuse Split-file together with MPIO\n");
- HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR,
- COL_FACTOR);
- HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
- HDprintf("\n");
+ printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
+ "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
+ printf("\t-m<n_datasets>"
+ "\tset number of datasets for the multiple dataset test\n");
+ printf("\t-n<n_groups>"
+ "\tset number of groups for the multiple group test\n");
+ printf("\t-f <prefix>\tfilename prefix\n");
+ printf("\t-2\t\tuse Split-file together with MPIO\n");
+ printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR,
+ COL_FACTOR);
+ printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
+ printf("\n");
}
/*
@@ -196,7 +195,7 @@ parse_options(int argc, char **argv)
case 'h': /* print help message--return with nerrors set */
return (1);
default:
- HDprintf("Illegal option(%s)\n", *argv);
+ printf("Illegal option(%s)\n", *argv);
nerrors++;
return (1);
}
@@ -205,12 +204,12 @@ parse_options(int argc, char **argv)
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0) {
- HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
+ printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
nerrors++;
return (1);
}
if (chunkdim0 <= 0 || chunkdim1 <= 0) {
- HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
+ printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
nerrors++;
return (1);
}
@@ -218,7 +217,7 @@ parse_options(int argc, char **argv)
/* Make sure datasets can be divided into equal portions by the processes */
if ((dim0 % mpi_size) || (dim1 % mpi_size)) {
if (MAINPROCESS)
- HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
+ printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
nerrors++;
return (1);
}
@@ -231,13 +230,13 @@ parse_options(int argc, char **argv)
for (i = 0; i < n; i++)
if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) {
- HDprintf("h5_fixname failed\n");
+ printf("h5_fixname failed\n");
nerrors++;
return (1);
}
- HDprintf("Test filenames are:\n");
+ printf("Test filenames are:\n");
for (i = 0; i < n; i++)
- HDprintf(" %s\n", filenames[i]);
+ printf(" %s\n", filenames[i]);
}
return (0);
@@ -319,9 +318,9 @@ main(int argc, char **argv)
dim1 = COL_FACTOR * mpi_size;
if (MAINPROCESS) {
- HDprintf("===================================\n");
- HDprintf("PHDF5 TESTS START\n");
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("PHDF5 TESTS START\n");
+ printf("===================================\n");
}
/* Attempt to turn off atexit post processing so that in case errors
@@ -330,15 +329,15 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0) {
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ printf("Failed to turn off atexit processing. Continue.\n");
};
H5open();
h5_show_hostname();
- HDmemset(filenames, 0, sizeof(filenames));
+ memset(filenames, 0, sizeof(filenames));
for (int i = 0; i < NFILENAME; i++) {
- if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
- HDprintf("couldn't allocate filename array\n");
+ if (NULL == (filenames[i] = malloc(PATH_MAX))) {
+ printf("couldn't allocate filename array\n");
MPI_Abort(MPI_COMM_WORLD, -1);
}
}
@@ -402,7 +401,7 @@ main(int argc, char **argv)
#ifndef H5_HAVE_WIN32_API
AddTest("bigdset", big_dataset, NULL, "big dataset test", PARATESTFILE);
#else
- HDprintf("big dataset test will be skipped on Windows (JIRA HDDFV-8064)\n");
+ printf("big dataset test will be skipped on Windows (JIRA HDDFV-8064)\n");
#endif
AddTest("fill", dataset_fillvalue, NULL, "dataset fill value", PARATESTFILE);
@@ -412,9 +411,9 @@ main(int argc, char **argv)
AddTest("cchunk4", coll_chunk4, NULL, "collective chunk io with partial non-selection ", PARATESTFILE);
if ((mpi_size < 3) && MAINPROCESS) {
- HDprintf("Collective chunk IO optimization APIs ");
- HDprintf("needs at least 3 processes to participate\n");
- HDprintf("Collective chunk IO API tests will be skipped \n");
+ printf("Collective chunk IO optimization APIs ");
+ printf("needs at least 3 processes to participate\n");
+ printf("Collective chunk IO API tests will be skipped \n");
}
AddTest((mpi_size < 3) ? "-cchunk5" : "cchunk5", coll_chunk5, NULL,
"linked chunk collective IO without optimization", PARATESTFILE);
@@ -450,8 +449,8 @@ main(int argc, char **argv)
&io_mode_confusion_params);
if ((mpi_size < 3) && MAINPROCESS) {
- HDprintf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n");
- HDprintf("rr_obj_hdr_flush_confusion test will be skipped \n");
+ printf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n");
+ printf("rr_obj_hdr_flush_confusion test will be skipped \n");
}
if (mpi_size > 2) {
rr_obj_flush_confusion_params.name = PARATESTFILE;
@@ -477,18 +476,18 @@ main(int argc, char **argv)
AddTest("extlink", external_links, NULL, "test external links", NULL);
if ((mpi_size < 2) && MAINPROCESS) {
- HDprintf("File Image Ops daisy chain test needs at least 2 processes.\n");
- HDprintf("File Image Ops daisy chain test will be skipped \n");
+ printf("File Image Ops daisy chain test needs at least 2 processes.\n");
+ printf("File Image Ops daisy chain test will be skipped \n");
}
AddTest((mpi_size < 2) ? "-fiodc" : "fiodc", file_image_daisy_chain_test, NULL,
"file image ops daisy chain", NULL);
if ((mpi_size < 2) && MAINPROCESS) {
- HDprintf("Atomicity tests need at least 2 processes to participate\n");
- HDprintf("8 is more recommended.. Atomicity tests will be skipped \n");
+ printf("Atomicity tests need at least 2 processes to participate\n");
+ printf("8 is more recommended.. Atomicity tests will be skipped \n");
}
else if (facc_type != FACC_MPIO && MAINPROCESS) {
- HDprintf("Atomicity tests will not work with a non MPIO VFD\n");
+ printf("Atomicity tests will not work with a non MPIO VFD\n");
}
else if (mpi_size >= 2 && facc_type == FACC_MPIO) {
AddTest("atomicity", dataset_atomicity, NULL, "dataset atomic updates", PARATESTFILE);
@@ -516,9 +515,9 @@ main(int argc, char **argv)
TestParseCmdLine(argc, argv);
if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS) {
- HDprintf("===================================\n"
- " Using Independent I/O with file set view to replace collective I/O \n"
- "===================================\n");
+ printf("===================================\n"
+ " Using Independent I/O with file set view to replace collective I/O \n"
+ "===================================\n");
}
/* Perform requested testing */
@@ -546,16 +545,16 @@ main(int argc, char **argv)
}
if (MAINPROCESS) { /* only process 0 reports */
- HDprintf("===================================\n");
+ printf("===================================\n");
if (nerrors)
- HDprintf("***PHDF5 tests detected %d errors***\n", nerrors);
+ printf("***PHDF5 tests detected %d errors***\n", nerrors);
else
- HDprintf("PHDF5 tests finished with no errors\n");
- HDprintf("===================================\n");
+ printf("PHDF5 tests finished with no errors\n");
+ printf("===================================\n");
}
for (int i = 0; i < NFILENAME; i++) {
- HDfree(filenames[i]);
+ free(filenames[i]);
filenames[i] = NULL;
}
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index ea268f3..7232ed0 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -112,11 +112,11 @@ print_incoming_data(void)
do {
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &incomingMessage, &Status);
if (incomingMessage) {
- HDmemset(data, 0, PRINT_DATA_MAX_SIZE + 1);
+ memset(data, 0, PRINT_DATA_MAX_SIZE + 1);
MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA,
MPI_COMM_WORLD, &Status);
- HDprintf("%s", data);
+ printf("%s", data);
}
} while (incomingMessage);
}
@@ -297,7 +297,7 @@ free_exclude_path_list(diff_opt_t *opts)
while (NULL != curr) {
next = curr->next;
- HDfree(curr);
+ free(curr);
curr = next;
}
}
@@ -315,7 +315,7 @@ free_exclude_attr_list(diff_opt_t *opts)
while (NULL != curr) {
next = curr->next;
- HDfree(curr);
+ free(curr);
curr = next;
}
}
@@ -494,7 +494,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
H5TOOLS_START_DEBUG(" ");
/* init linkinfo struct */
- HDmemset(&lnk_info, 0, sizeof(h5tool_link_info_t));
+ memset(&lnk_info, 0, sizeof(h5tool_link_info_t));
if (!opts->follow_links) {
trav_info_visit_lnk(path, linfo, tinfo);
@@ -575,7 +575,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
done:
if (lnk_info.trg_path)
- HDfree(lnk_info.trg_path);
+ free(lnk_info.trg_path);
H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -628,10 +628,10 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
H5TOOLS_START_DEBUG(" ");
/* init filenames */
- HDmemset(filenames, 0, MAX_FILENAME * 2);
+ memset(filenames, 0, MAX_FILENAME * 2);
/* init link info struct */
- HDmemset(&trg_linfo1, 0, sizeof(h5tool_link_info_t));
- HDmemset(&trg_linfo2, 0, sizeof(h5tool_link_info_t));
+ memset(&trg_linfo1, 0, sizeof(h5tool_link_info_t));
+ memset(&trg_linfo2, 0, sizeof(h5tool_link_info_t));
/*-------------------------------------------------------------------------
* check invalid combination of options
@@ -710,7 +710,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed");
#else /* H5_HAVE_ASPRINTF */
/* (malloc 2 more for "/" and end-of-line) */
- if ((obj1fullname = (char *)HDmalloc(HDstrlen(objname1) + 2)) == NULL)
+ if ((obj1fullname = (char *)malloc(HDstrlen(objname1) + 2)) == NULL)
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed");
HDstrcpy(obj1fullname, "/");
@@ -729,7 +729,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed");
#else /* H5_HAVE_ASPRINTF */
/* (malloc 2 more for "/" and end-of-line) */
- if ((obj2fullname = (char *)HDmalloc(HDstrlen(objname2) + 2)) == NULL)
+ if ((obj2fullname = (char *)malloc(HDstrlen(objname2) + 2)) == NULL)
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed");
HDstrcpy(obj2fullname, "/");
HDstrcat(obj2fullname, objname2);
@@ -776,7 +776,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
obj1type = (h5trav_type_t)oinfo1.type;
trav_info_add(info1_obj, obj1fullname, obj1type);
idx = info1_obj->nused - 1;
- HDmemcpy(&info1_obj->paths[idx].obj_token, &oinfo1.token, sizeof(H5O_token_t));
+ memcpy(&info1_obj->paths[idx].obj_token, &oinfo1.token, sizeof(H5O_token_t));
info1_obj->paths[idx].fileno = oinfo1.fileno;
}
else if (src_linfo1.type == H5L_TYPE_SOFT) {
@@ -826,7 +826,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
obj2type = (h5trav_type_t)oinfo2.type;
trav_info_add(info2_obj, obj2fullname, obj2type);
idx = info2_obj->nused - 1;
- HDmemcpy(&info2_obj->paths[idx].obj_token, &oinfo2.token, sizeof(H5O_token_t));
+ memcpy(&info2_obj->paths[idx].obj_token, &oinfo2.token, sizeof(H5O_token_t));
info2_obj->paths[idx].fileno = oinfo2.fileno;
}
else if (src_linfo2.type == H5L_TYPE_SOFT) {
@@ -896,7 +896,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
size_t idx = info1_lp->nused - 1;
H5TOOLS_DEBUG("h5diff ... ... ... info1_obj not null");
- HDmemcpy(&info1_lp->paths[idx].obj_token, &trg_linfo1.obj_token, sizeof(H5O_token_t));
+ memcpy(&info1_lp->paths[idx].obj_token, &trg_linfo1.obj_token, sizeof(H5O_token_t));
info1_lp->paths[idx].type = (h5trav_type_t)trg_linfo1.trg_type;
info1_lp->paths[idx].fileno = trg_linfo1.fileno;
}
@@ -936,7 +936,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
size_t idx = info2_lp->nused - 1;
H5TOOLS_DEBUG("h5diff ... ... ... info2_obj not null");
- HDmemcpy(&info2_lp->paths[idx].obj_token, &trg_linfo2.obj_token, sizeof(H5O_token_t));
+ memcpy(&info2_lp->paths[idx].obj_token, &trg_linfo2.obj_token, sizeof(H5O_token_t));
info2_lp->paths[idx].type = (h5trav_type_t)trg_linfo2.trg_type;
info2_lp->paths[idx].fileno = trg_linfo2.fileno;
}
@@ -997,8 +997,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
int i;
if ((HDstrlen(fname1) > MAX_FILENAME) || (HDstrlen(fname2) > MAX_FILENAME)) {
- HDfprintf(stderr, "The parallel diff only supports path names up to %d characters\n",
- MAX_FILENAME);
+ fprintf(stderr, "The parallel diff only supports path names up to %d characters\n", MAX_FILENAME);
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
@@ -1068,15 +1067,15 @@ done:
/* free buffers */
if (obj1fullname)
- HDfree(obj1fullname);
+ free(obj1fullname);
if (obj2fullname)
- HDfree(obj2fullname);
+ free(obj2fullname);
/* free link info buffer */
if (trg_linfo1.trg_path)
- HDfree(trg_linfo1.trg_path);
+ free(trg_linfo1.trg_path);
if (trg_linfo2.trg_path)
- HDfree(trg_linfo2.trg_path);
+ free(trg_linfo2.trg_path);
/* close */
H5E_BEGIN_TRY
@@ -1165,7 +1164,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
*/
#ifdef H5_HAVE_PARALLEL
{
- char *workerTasks = (char *)HDmalloc((size_t)(g_nTasks - 1) * sizeof(char));
+ char *workerTasks = (char *)malloc((size_t)(g_nTasks - 1) * sizeof(char));
int n;
int busyTasks = 0;
struct diffs_found nFoundbyWorker;
@@ -1174,7 +1173,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
MPI_Status Status;
/*set all tasks as free */
- HDmemset(workerTasks, 1, (size_t)(g_nTasks - 1) * sizeof(char));
+ memset(workerTasks, 1, (size_t)(g_nTasks - 1) * sizeof(char));
#endif
for (i = 0; i < table->nobjs; i++) {
@@ -1187,7 +1186,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed");
}
#else /* H5_HAVE_ASPRINTF */
- if ((obj1_fullpath = (char *)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) ==
+ if ((obj1_fullpath = (char *)malloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) ==
NULL) {
H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed");
}
@@ -1205,7 +1204,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed");
}
#else /* H5_HAVE_ASPRINTF */
- if ((obj2_fullpath = (char *)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) ==
+ if ((obj2_fullpath = (char *)malloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) ==
NULL) {
H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed");
}
@@ -1248,7 +1247,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
/*Set up args to pass to worker task. */
if (HDstrlen(obj1_fullpath) > 255 || HDstrlen(obj2_fullpath) > 255) {
- HDprintf("The parallel diff only supports object names up to 255 characters\n");
+ printf("The parallel diff only supports object names up to 255 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
@@ -1393,7 +1392,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
MPI_COMM_WORLD);
} /* end else-if */
else {
- HDprintf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
+ printf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
MPI_Finalize();
} /* end else */
@@ -1402,9 +1401,9 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
} /* end else */
#endif /* H5_HAVE_PARALLEL */
if (obj1_fullpath)
- HDfree(obj1_fullpath);
+ free(obj1_fullpath);
if (obj2_fullpath)
- HDfree(obj2_fullpath);
+ free(obj2_fullpath);
} /* end if */
} /* end for */
H5TOOLS_DEBUG("done with for loop - errstat:%d", opts->err_stat);
@@ -1473,15 +1472,15 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
} /* end else-if */
else if (Status.MPI_TAG == MPI_TAG_PRINT_DATA) {
char data[PRINT_DATA_MAX_SIZE + 1];
- HDmemset(data, 0, PRINT_DATA_MAX_SIZE + 1);
+ memset(data, 0, PRINT_DATA_MAX_SIZE + 1);
MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA,
MPI_COMM_WORLD, &Status);
- HDprintf("%s", data);
+ printf("%s", data);
} /* end else-if */
else {
- HDprintf("ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
+ printf("ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end else */
} /* end while */
@@ -1494,7 +1493,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
} /* end if */
H5TOOLS_DEBUG("done with if block");
- HDfree(workerTasks);
+ free(workerTasks);
}
#endif /* H5_HAVE_PARALLEL */
@@ -1549,8 +1548,8 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
H5TOOLS_START_DEBUG(" - errstat:%d", opts->err_stat);
/*init link info struct */
- HDmemset(&linkinfo1, 0, sizeof(h5tool_link_info_t));
- HDmemset(&linkinfo2, 0, sizeof(h5tool_link_info_t));
+ memset(&linkinfo1, 0, sizeof(h5tool_link_info_t));
+ memset(&linkinfo2, 0, sizeof(h5tool_link_info_t));
/* pass how to handle printing warnings to linkinfo option */
if (print_warn(opts))
@@ -1834,7 +1833,7 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
if (linkinfo1.linfo.type == H5L_TYPE_EXTERNAL && linkinfo2.linfo.type == H5L_TYPE_EXTERNAL) {
/* If the buffers are the same size, compare them */
if (linkinfo1.linfo.u.val_size == linkinfo2.linfo.u.val_size) {
- status = HDmemcmp(linkinfo1.trg_path, linkinfo2.trg_path, linkinfo1.linfo.u.val_size);
+ status = memcmp(linkinfo1.trg_path, linkinfo2.trg_path, linkinfo1.linfo.u.val_size);
}
else
status = 1;
@@ -1913,9 +1912,9 @@ done:
/* free link info buffer */
if (linkinfo1.trg_path)
- HDfree(linkinfo1.trg_path);
+ free(linkinfo1.trg_path);
if (linkinfo2.trg_path)
- HDfree(linkinfo2.trg_path);
+ free(linkinfo2.trg_path);
/* close */
/* disable error reporting */
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 3f504eb..85defbe 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -212,7 +212,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_
* by the condition, but it gives more clarity for code planning
*/
if (type_class != H5T_REFERENCE && type_class != H5T_COMPOUND && type_class != H5T_STRING &&
- type_class != H5T_VLEN && HDmemcmp(mem1, mem2, size * opts->hs_nelmts) == 0) {
+ type_class != H5T_VLEN && memcmp(mem1, mem2, size * opts->hs_nelmts) == 0) {
H5TOOLS_ENDDEBUG(":Fast comparison - errstat:%d", opts->err_stat);
return 0;
}
@@ -224,7 +224,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_
case H5T_NCLASSES:
default:
H5TOOLS_DEBUG("type_class:INVALID");
- HDassert(0);
+ assert(0);
break;
/*-------------------------------------------------------------------------
@@ -381,7 +381,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_
case H5T_VLEN:
case H5T_REFERENCE:
H5TOOLS_DEBUG("type_class:OTHER");
- HDmemset(&members, 0, sizeof(mcomp_t));
+ memset(&members, 0, sizeof(mcomp_t));
get_member_types(opts->m_tid, &members);
for (i = 0; i < opts->hs_nelmts; i++) {
H5TOOLS_DEBUG("opts->pos[%" PRIuHSIZE "]:%" PRIuHSIZE " - nelmts:%" PRIuHSIZE, i,
@@ -460,7 +460,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
* by the condition, but it gives more clarity for code planning
*/
if (type_class != H5T_REFERENCE && type_class != H5T_COMPOUND && type_class != H5T_STRING &&
- type_class != H5T_VLEN && HDmemcmp(mem1, mem2, type_size) == 0)
+ type_class != H5T_VLEN && memcmp(mem1, mem2, type_size) == 0)
H5TOOLS_GOTO_DONE(opts->err_stat);
switch (H5Tget_class(opts->m_tid)) {
@@ -590,7 +590,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
/* check for NULL pointer for string */
if (s != NULL) {
/* try fast compare first */
- if ((HDmemcmp(s, sx, size) == 0) && (size1 != size2)) {
+ if ((memcmp(s, sx, size) == 0) && (size1 != size2)) {
for (u = size; u < sizex; u++)
character_compare(s + u, sx + u, elemtno, u, opts);
}
@@ -707,7 +707,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
size = H5Tget_size(arr_opts.m_tid);
ndims = H5Tget_array_ndims(opts->m_tid);
H5Tget_array_dims2(opts->m_tid, adims);
- HDassert(ndims >= 1 && ndims <= H5S_MAX_RANK);
+ assert(ndims >= 1 && ndims <= H5S_MAX_RANK);
H5TOOLS_DEBUG("attr ph=%d", arr_opts.print_header);
/* calculate the number of array elements */
@@ -1386,11 +1386,11 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
*/
if (nblocks1 > 0) {
H5TOOLS_DEBUG("region compare blocks");
- HDassert(ndims1 > 0);
+ assert(ndims1 > 0);
alloc_size = (hsize_t)nblocks1 * (unsigned)ndims1 * 2 * sizeof(ptdata1[0]);
- HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
+ assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
- if ((ptdata1 = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL) {
+ if ((ptdata1 = (hsize_t *)malloc((size_t)alloc_size)) == NULL) {
opts->err_stat = H5DIFF_ERR;
H5TOOLS_INFO("Buffer allocation failed");
}
@@ -1398,7 +1398,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
H5_CHECK_OVERFLOW(nblocks1, hssize_t, hsize_t);
H5Sget_select_hyper_blocklist(region1_id, (hsize_t)0, (hsize_t)nblocks1, ptdata1);
- if ((ptdata2 = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL) {
+ if ((ptdata2 = (hsize_t *)malloc((size_t)alloc_size)) == NULL) {
opts->err_stat = H5DIFF_ERR;
H5TOOLS_INFO("Buffer allocation failed");
}
@@ -1446,10 +1446,10 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
parallel_print("\n");
}
}
- HDfree(ptdata2);
+ free(ptdata2);
} /* else ptdata2 */
- HDfree(ptdata1);
+ free(ptdata1);
} /* else ptdata1 */
}
@@ -1460,9 +1460,9 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
if (npoints1 > 0) {
H5TOOLS_DEBUG("region compare points");
alloc_size = (hsize_t)npoints1 * (unsigned)ndims1 * sizeof(ptdata1[0]);
- HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
+ assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
- if ((ptdata1 = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL) {
+ if ((ptdata1 = (hsize_t *)malloc((size_t)alloc_size)) == NULL) {
opts->err_stat = H5DIFF_ERR;
H5TOOLS_INFO("Buffer allocation failed");
}
@@ -1470,7 +1470,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
H5_CHECK_OVERFLOW(npoints1, hssize_t, hsize_t);
H5Sget_select_elem_pointlist(region1_id, (hsize_t)0, (hsize_t)npoints1, ptdata1);
- if ((ptdata2 = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL) {
+ if ((ptdata2 = (hsize_t *)malloc((size_t)alloc_size)) == NULL) {
opts->err_stat = H5DIFF_ERR;
H5TOOLS_INFO("Buffer allocation failed");
}
@@ -1511,7 +1511,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
}
}
}
- HDfree(ptdata2);
+ free(ptdata2);
} /* else ptdata2 */
#if defined(H5DIFF_DEBUG)
@@ -1526,7 +1526,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
parallel_print("\n");
#endif
- HDfree(ptdata1);
+ free(ptdata1);
} /* else ptdata1 */
}
@@ -1556,8 +1556,8 @@ character_compare(char *mem1, char *mem2, hsize_t elemtno, size_t u, diff_opt_t
char temp1_uchar;
char temp2_uchar;
- HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char));
- HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char));
+ memcpy(&temp1_uchar, mem1, sizeof(unsigned char));
+ memcpy(&temp2_uchar, mem2, sizeof(unsigned char));
H5TOOLS_START_DEBUG(" %d=%d", temp1_uchar, temp2_uchar);
if (temp1_uchar != temp2_uchar) {
@@ -1598,8 +1598,8 @@ character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno,
/* both_zero is set in the PER_UNSIGN macro but not used in this function */
(void)both_zero;
- HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char));
- HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char));
+ memcpy(&temp1_uchar, mem1, sizeof(unsigned char));
+ memcpy(&temp2_uchar, mem2, sizeof(unsigned char));
H5TOOLS_START_DEBUG(" %d=%d", temp1_uchar, temp2_uchar);
/* -d and !-p */
@@ -1673,8 +1673,8 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_float, mem1, sizeof(float));
- HDmemcpy(&temp2_float, mem2, sizeof(float));
+ memcpy(&temp1_float, mem1, sizeof(float));
+ memcpy(&temp2_float, mem2, sizeof(float));
/* logic for detecting NaNs is different with opts -d, -p and no opts */
@@ -1853,8 +1853,8 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_double, mem1, sizeof(double));
- HDmemcpy(&temp2_double, mem2, sizeof(double));
+ memcpy(&temp1_double, mem1, sizeof(double));
+ memcpy(&temp2_double, mem2, sizeof(double));
/*-------------------------------------------------------------------------
* -d and !-p
@@ -2026,8 +2026,8 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_double, mem1, sizeof(long double));
- HDmemcpy(&temp2_double, mem2, sizeof(long double));
+ memcpy(&temp1_double, mem1, sizeof(long double));
+ memcpy(&temp2_double, mem2, sizeof(long double));
/* logic for detecting NaNs is different with options -d, -p and no options */
@@ -2196,8 +2196,8 @@ diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
hbool_t both_zero = FALSE;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_char, mem1, sizeof(char));
- HDmemcpy(&temp2_char, mem2, sizeof(char));
+ memcpy(&temp1_char, mem1, sizeof(char));
+ memcpy(&temp2_char, mem2, sizeof(char));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
@@ -2285,8 +2285,8 @@ diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char));
- HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char));
+ memcpy(&temp1_uchar, mem1, sizeof(unsigned char));
+ memcpy(&temp2_uchar, mem2, sizeof(unsigned char));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_uchar, temp2_uchar) > opts->delta) {
@@ -2373,8 +2373,8 @@ diff_short_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_short, mem1, sizeof(short));
- HDmemcpy(&temp2_short, mem2, sizeof(short));
+ memcpy(&temp1_short, mem1, sizeof(short));
+ memcpy(&temp2_short, mem2, sizeof(short));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
if (ABS(temp1_short - temp2_short) > opts->delta) {
@@ -2461,8 +2461,8 @@ diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short));
- HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short));
+ memcpy(&temp1_ushort, mem1, sizeof(unsigned short));
+ memcpy(&temp2_ushort, mem2, sizeof(unsigned short));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_ushort, temp2_ushort) > opts->delta) {
@@ -2553,8 +2553,8 @@ diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, dif
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_int, mem1, sizeof(int));
- HDmemcpy(&temp2_int, mem2, sizeof(int));
+ memcpy(&temp1_int, mem1, sizeof(int));
+ memcpy(&temp2_int, mem2, sizeof(int));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
if (ABS(temp1_int - temp2_int) > opts->delta) {
@@ -2641,8 +2641,8 @@ diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int));
- HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int));
+ memcpy(&temp1_uint, mem1, sizeof(unsigned int));
+ memcpy(&temp2_uint, mem2, sizeof(unsigned int));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_uint, temp2_uint) > opts->delta) {
@@ -2729,8 +2729,8 @@ diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_long, mem1, sizeof(long));
- HDmemcpy(&temp2_long, mem2, sizeof(long));
+ memcpy(&temp1_long, mem1, sizeof(long));
+ memcpy(&temp2_long, mem2, sizeof(long));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
if (ABS(temp1_long - temp2_long) > (long)opts->delta) {
@@ -2817,8 +2817,8 @@ diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long));
- HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long));
+ memcpy(&temp1_ulong, mem1, sizeof(unsigned long));
+ memcpy(&temp2_ulong, mem2, sizeof(unsigned long));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_ulong, temp2_ulong) > (unsigned long)opts->delta) {
@@ -2907,8 +2907,8 @@ diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_llong, mem1, sizeof(long long));
- HDmemcpy(&temp2_llong, mem2, sizeof(long long));
+ memcpy(&temp1_llong, mem1, sizeof(long long));
+ memcpy(&temp2_llong, mem2, sizeof(long long));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
@@ -3001,8 +3001,8 @@ diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
- HDmemcpy(&temp1_ullong, mem1, sizeof(unsigned long long));
- HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long));
+ memcpy(&temp1_ullong, mem1, sizeof(unsigned long long));
+ memcpy(&temp2_ullong, mem2, sizeof(unsigned long long));
/* -d and !-p */
if (opts->delta_bool && !opts->percent_bool) {
@@ -3101,16 +3101,16 @@ ull2float(unsigned long long ull_value, float *f_value)
src_size = H5Tget_size(H5T_NATIVE_ULLONG);
dst_size = H5Tget_size(H5T_NATIVE_FLOAT);
- if ((buf = (unsigned char *)HDcalloc((size_t)1, MAX(src_size, dst_size))) == NULL)
+ if ((buf = (unsigned char *)calloc((size_t)1, MAX(src_size, dst_size))) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "Could not allocate buffer for dims");
- HDmemcpy(buf, &ull_value, src_size);
+ memcpy(buf, &ull_value, src_size);
/* do conversion */
if (H5Tconvert(H5T_NATIVE_ULLONG, H5T_NATIVE_FLOAT, (size_t)1, buf, NULL, dxpl_id) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Tconvert failed");
- HDmemcpy(f_value, buf, dst_size);
+ memcpy(f_value, buf, dst_size);
done:
H5E_BEGIN_TRY
@@ -3120,7 +3120,7 @@ done:
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
H5TOOLS_ENDDEBUG(" ");
return ret_value;
@@ -3165,7 +3165,7 @@ equal_double(double value, double expected, diff_opt_t *opts)
}
else {
/* Check bits */
- if (!HDmemcmp(&value, &expected, sizeof(double)))
+ if (!memcmp(&value, &expected, sizeof(double)))
return TRUE;
}
@@ -3212,7 +3212,7 @@ equal_ldouble(long double value, long double expected, diff_opt_t *opts)
}
else {
/* Check bits */
- if (!HDmemcmp(&value, &expected, sizeof(long double)))
+ if (!memcmp(&value, &expected, sizeof(long double)))
return TRUE;
}
@@ -3258,7 +3258,7 @@ equal_float(float value, float expected, diff_opt_t *opts)
}
else {
/* Check bits */
- if (!HDmemcmp(&value, &expected, sizeof(float)))
+ if (!memcmp(&value, &expected, sizeof(float)))
return TRUE;
}
@@ -3493,15 +3493,15 @@ get_member_types(hid_t tid, mcomp_t *members)
return;
members->n = (unsigned)nmembs;
- members->ids = (hid_t *)HDcalloc((size_t)members->n, sizeof(hid_t));
- members->offsets = (size_t *)HDcalloc((size_t)members->n, sizeof(size_t));
- members->m = (mcomp_t **)HDcalloc((size_t)members->n, sizeof(mcomp_t *));
+ members->ids = (hid_t *)calloc((size_t)members->n, sizeof(hid_t));
+ members->offsets = (size_t *)calloc((size_t)members->n, sizeof(size_t));
+ members->m = (mcomp_t **)calloc((size_t)members->n, sizeof(mcomp_t *));
for (u = 0; u < members->n; u++) {
members->ids[u] = H5Tget_member_type(tid, u);
members->offsets[u] = H5Tget_member_offset(tid, u);
- members->m[u] = (mcomp_t *)HDmalloc(sizeof(mcomp_t));
- HDmemset(members->m[u], 0, sizeof(mcomp_t));
+ members->m[u] = (mcomp_t *)malloc(sizeof(mcomp_t));
+ memset(members->m[u], 0, sizeof(mcomp_t));
get_member_types(members->ids[u], members->m[u]);
}
}
@@ -3523,12 +3523,12 @@ close_member_types(mcomp_t *members)
for (u = 0; u < members->n; u++) {
if (members->m[u]) {
close_member_types(members->m[u]);
- HDfree(members->m[u]);
+ free(members->m[u]);
}
H5Tclose(members->ids[u]);
}
- HDfree(members->m);
- HDfree(members->ids);
- HDfree(members->offsets);
+ free(members->m);
+ free(members->ids);
+ free(members->offsets);
}
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index aa64fa5..0dbaee1 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -45,7 +45,7 @@ typedef struct table_attrs_t {
static void
table_attrs_init(table_attrs_t **tbl)
{
- table_attrs_t *table_attrs = (table_attrs_t *)HDmalloc(sizeof(table_attrs_t));
+ table_attrs_t *table_attrs = (table_attrs_t *)malloc(sizeof(table_attrs_t));
table_attrs->size = 0;
table_attrs->nattrs = 0;
@@ -77,13 +77,13 @@ table_attrs_free(table_attrs_t *table)
if (table->attrs) {
for (i = 0; i < table->nattrs; i++) {
if (table->attrs[i].name) {
- HDfree(table->attrs[i].name);
+ free(table->attrs[i].name);
}
} /* end for */
- HDfree(table->attrs);
+ free(table->attrs);
table->attrs = NULL;
} /* end if */
- HDfree(table);
+ free(table);
table = NULL;
}
}
@@ -109,7 +109,7 @@ table_attr_mark_exist(const unsigned *exist, char *name, table_attrs_t *table)
match_attr_t *new_attrs;
table->size = MAX(1, table->size * 2);
- new_attrs = (match_attr_t *)HDrealloc(table->attrs, table->size * sizeof(match_attr_t));
+ new_attrs = (match_attr_t *)realloc(table->attrs, table->size * sizeof(match_attr_t));
if (new_attrs)
table->attrs = new_attrs;
} /* end if */
@@ -396,7 +396,7 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
sz = HDstrlen(name1);
H5TOOLS_DEBUG("attr1_name: %s - %d", name1, sz);
if (sz > 0) {
- opts->obj_name[0] = (char *)HDmalloc(sz + 1);
+ opts->obj_name[0] = (char *)malloc(sz + 1);
HDstrncpy(opts->obj_name[0], name1, sz + 1);
}
}
@@ -404,7 +404,7 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
sz = HDstrlen(name2);
H5TOOLS_DEBUG("attr2_name: %s - %d", name2, sz);
if (sz > 0) {
- opts->obj_name[1] = (char *)HDmalloc(sz + 1);
+ opts->obj_name[1] = (char *)malloc(sz + 1);
HDstrncpy(opts->obj_name[1], name2, sz + 1);
}
}
@@ -440,8 +440,8 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
* read
*----------------------------------------------------------------------
*/
- buf1 = (void *)HDcalloc((size_t)(opts->nelmts), msize1);
- buf2 = (void *)HDcalloc((size_t)(opts->nelmts), msize2);
+ buf1 = (void *)calloc((size_t)(opts->nelmts), msize1);
+ buf2 = (void *)calloc((size_t)(opts->nelmts), msize2);
H5TOOLS_DEBUG("attr buffer size %ld * %ld", opts->nelmts, msize1);
if (buf1 == NULL || buf2 == NULL) {
parallel_print("cannot read into memory\n");
@@ -465,24 +465,24 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
/* format output string */
if (opts->obj_name[0] != NULL)
- HDfree(opts->obj_name[0]);
+ free(opts->obj_name[0]);
opts->obj_name[0] = NULL;
if (opts->obj_name[1] != NULL)
- HDfree(opts->obj_name[1]);
+ free(opts->obj_name[1]);
opts->obj_name[1] = NULL;
H5TOOLS_DEBUG("attr_names: %s - %s : %s - %s", name1, name2, path1, path2);
if (name1) {
sz = HDstrlen(name1) + HDstrlen(path1) + 7;
H5TOOLS_DEBUG("attr1_name: %s - %d", name1, sz);
- opts->obj_name[0] = (char *)HDcalloc(sz + 1, sizeof(char));
+ opts->obj_name[0] = (char *)calloc(sz + 1, sizeof(char));
HDsnprintf(opts->obj_name[0], sz, "%s of <%s>", name1, path1);
opts->obj_name[0][sz] = '\0';
}
if (name2) {
sz = HDstrlen(name2) + HDstrlen(path2) + 7;
H5TOOLS_DEBUG("attr2_name: %s - %d", name2, sz);
- opts->obj_name[1] = (char *)HDcalloc(sz + 1, sizeof(char));
+ opts->obj_name[1] = (char *)calloc(sz + 1, sizeof(char));
HDsnprintf(opts->obj_name[1], sz, "%s of <%s>", name2, path2);
opts->obj_name[1][sz] = '\0';
}
@@ -531,22 +531,22 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
*----------------------------------------------------------------------
*/
if (opts->obj_name[0] != NULL)
- HDfree(opts->obj_name[0]);
+ free(opts->obj_name[0]);
opts->obj_name[0] = NULL;
if (opts->obj_name[1] != NULL)
- HDfree(opts->obj_name[1]);
+ free(opts->obj_name[1]);
opts->obj_name[1] = NULL;
/* Free buf1 and buf2, check both VLEN-data VLEN-string to reclaim any
* VLEN memory first */
if (TRUE == h5tools_detect_vlen(mtype1_id))
H5Treclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
- HDfree(buf1);
+ free(buf1);
buf1 = NULL;
if (TRUE == h5tools_detect_vlen(mtype2_id))
H5Treclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
- HDfree(buf2);
+ free(buf2);
buf2 = NULL;
if (H5Tclose(ftype1_id) < 0)
@@ -570,12 +570,12 @@ done:
if (buf1) {
if (buf1hasdata && TRUE == h5tools_detect_vlen(mtype1_id))
H5Treclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
- HDfree(buf1);
+ free(buf1);
} /* end if */
if (buf2) {
if (buf2hasdata && TRUE == h5tools_detect_vlen(mtype2_id))
H5Treclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
- HDfree(buf2);
+ free(buf2);
} /* end if */
H5Tclose(ftype1_id);
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index b5c3290..c30532b 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -277,7 +277,7 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
j = (int)HDstrlen(obj1_name);
H5TOOLS_DEBUG("obj1_name: %s - %d", obj1_name, j);
if (j > 0) {
- opts->obj_name[0] = (char *)HDmalloc((size_t)j + 1);
+ opts->obj_name[0] = (char *)malloc((size_t)j + 1);
HDstrncpy(opts->obj_name[0], obj1_name, (size_t)j + 1);
}
}
@@ -287,7 +287,7 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
j = (int)HDstrlen(obj2_name);
H5TOOLS_DEBUG("obj2_name: %s - %d", obj2_name, j);
if (j > 0) {
- opts->obj_name[1] = (char *)HDmalloc((size_t)j + 1);
+ opts->obj_name[1] = (char *)malloc((size_t)j + 1);
HDstrncpy(opts->obj_name[1], obj2_name, (size_t)j + 1);
}
}
@@ -424,10 +424,10 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
H5TOOLS_DEBUG("obj_names: %s - %s", obj1_name, obj2_name);
if (opts->obj_name[0] != NULL)
- HDfree(opts->obj_name[0]);
+ free(opts->obj_name[0]);
opts->obj_name[0] = NULL;
if (opts->obj_name[1] != NULL)
- HDfree(opts->obj_name[1]);
+ free(opts->obj_name[1]);
opts->obj_name[1] = NULL;
if (obj1_name)
@@ -442,8 +442,8 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
*-----------------------------------------------------------------
*/
if (need < H5TOOLS_MALLOCSIZE) {
- buf1 = HDmalloc(need);
- buf2 = HDmalloc(need);
+ buf1 = malloc(need);
+ buf2 = malloc(need);
} /* end if */
/* Assume entire data space to be printed */
@@ -478,11 +478,11 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
if (vl_data2)
H5Treclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
if (buf1 != NULL) {
- HDfree(buf1);
+ free(buf1);
buf1 = NULL;
}
if (buf2 != NULL) {
- HDfree(buf2);
+ free(buf2);
buf2 = NULL;
}
} /* end if */
@@ -520,29 +520,29 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
/* reclaim any VL memory, if necessary */
if (vl_data1)
H5Treclaim(m_tid1, sid1, H5P_DEFAULT, buf1);
- HDfree(buf1);
+ free(buf1);
buf1 = NULL;
}
if (buf2 != NULL) {
/* reclaim any VL memory, if necessary */
if (vl_data2)
H5Treclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
- HDfree(buf2);
+ free(buf2);
buf2 = NULL;
}
/* the stripmine loop */
- HDmemset(hs_offset1, 0, sizeof hs_offset1);
- HDmemset(hs_stride1, 0, sizeof hs_stride1);
- HDmemset(hs_count1, 0, sizeof hs_count1);
- HDmemset(hs_block1, 0, sizeof hs_block1);
- HDmemset(hs_size1, 0, sizeof hs_size1);
- HDmemset(hs_offset2, 0, sizeof hs_offset2);
- HDmemset(hs_stride2, 0, sizeof hs_stride2);
- HDmemset(hs_count2, 0, sizeof hs_count2);
- HDmemset(hs_block2, 0, sizeof hs_block2);
- HDmemset(hs_size2, 0, sizeof hs_size2);
- HDmemset(zero, 0, sizeof zero);
+ memset(hs_offset1, 0, sizeof hs_offset1);
+ memset(hs_stride1, 0, sizeof hs_stride1);
+ memset(hs_count1, 0, sizeof hs_count1);
+ memset(hs_block1, 0, sizeof hs_block1);
+ memset(hs_size1, 0, sizeof hs_size1);
+ memset(hs_offset2, 0, sizeof hs_offset2);
+ memset(hs_stride2, 0, sizeof hs_stride2);
+ memset(hs_count2, 0, sizeof hs_count2);
+ memset(hs_block2, 0, sizeof hs_block2);
+ memset(hs_size2, 0, sizeof hs_size2);
+ memset(zero, 0, sizeof zero);
/* if subsetting was requested - initialize the subsetting variables */
H5TOOLS_DEBUG("compare by hyperslabs: opts->nelmts=%ld - opts->m_size=%ld", opts->nelmts,
@@ -557,26 +557,26 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
* dimensions */
if (!opts->sset[0]->start.data) {
/* default to (0, 0, ...) for the start coord */
- opts->sset[0]->start.data = (hsize_t *)HDcalloc((size_t)rank1, sizeof(hsize_t));
+ opts->sset[0]->start.data = (hsize_t *)calloc((size_t)rank1, sizeof(hsize_t));
opts->sset[0]->start.len = (unsigned)rank1;
}
if (!opts->sset[0]->stride.data) {
- opts->sset[0]->stride.data = (hsize_t *)HDcalloc((size_t)rank1, sizeof(hsize_t));
+ opts->sset[0]->stride.data = (hsize_t *)calloc((size_t)rank1, sizeof(hsize_t));
opts->sset[0]->stride.len = (unsigned)rank1;
for (i = 0; i < rank1; i++)
opts->sset[0]->stride.data[i] = 1;
}
if (!opts->sset[0]->count.data) {
- opts->sset[0]->count.data = (hsize_t *)HDcalloc((size_t)rank1, sizeof(hsize_t));
+ opts->sset[0]->count.data = (hsize_t *)calloc((size_t)rank1, sizeof(hsize_t));
opts->sset[0]->count.len = (unsigned)rank1;
for (i = 0; i < rank1; i++)
opts->sset[0]->count.data[i] = 1;
}
if (!opts->sset[0]->block.data) {
- opts->sset[0]->block.data = (hsize_t *)HDcalloc((size_t)rank1, sizeof(hsize_t));
+ opts->sset[0]->block.data = (hsize_t *)calloc((size_t)rank1, sizeof(hsize_t));
opts->sset[0]->block.len = (unsigned)rank1;
for (i = 0; i < rank1; i++)
opts->sset[0]->block.data[i] = 1;
@@ -618,26 +618,26 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
* dimensions */
if (!opts->sset[1]->start.data) {
/* default to (0, 0, ...) for the start coord */
- opts->sset[1]->start.data = (hsize_t *)HDcalloc((size_t)rank2, sizeof(hsize_t));
+ opts->sset[1]->start.data = (hsize_t *)calloc((size_t)rank2, sizeof(hsize_t));
opts->sset[1]->start.len = (unsigned)rank2;
}
if (!opts->sset[1]->stride.data) {
- opts->sset[1]->stride.data = (hsize_t *)HDcalloc((size_t)rank2, sizeof(hsize_t));
+ opts->sset[1]->stride.data = (hsize_t *)calloc((size_t)rank2, sizeof(hsize_t));
opts->sset[1]->stride.len = (unsigned)rank2;
for (i = 0; i < rank2; i++)
opts->sset[1]->stride.data[i] = 1;
}
if (!opts->sset[1]->count.data) {
- opts->sset[1]->count.data = (hsize_t *)HDcalloc((size_t)rank2, sizeof(hsize_t));
+ opts->sset[1]->count.data = (hsize_t *)calloc((size_t)rank2, sizeof(hsize_t));
opts->sset[1]->count.len = (unsigned)rank2;
for (i = 0; i < rank2; i++)
opts->sset[1]->count.data[i] = 1;
}
if (!opts->sset[1]->block.data) {
- opts->sset[1]->block.data = (hsize_t *)HDcalloc((size_t)rank2, sizeof(hsize_t));
+ opts->sset[1]->block.data = (hsize_t *)calloc((size_t)rank2, sizeof(hsize_t));
opts->sset[1]->block.len = (unsigned)rank2;
for (i = 0; i < rank2; i++)
opts->sset[1]->block.data[i] = 1;
@@ -696,9 +696,9 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
for (elmtno = 0; elmtno < opts->nelmts; elmtno += opts->hs_nelmts) {
H5TOOLS_DEBUG("elmtno: %ld - hs_nelmts1: %ld", elmtno, hs_nelmts1);
- if (NULL == (sm_buf1 = (unsigned char *)HDmalloc((size_t)sm_nbytes)))
+ if (NULL == (sm_buf1 = (unsigned char *)malloc((size_t)sm_nbytes)))
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "Could not allocate buffer for strip-mine");
- if (NULL == (sm_buf2 = (unsigned char *)HDmalloc((size_t)sm_nbytes)))
+ if (NULL == (sm_buf2 = (unsigned char *)malloc((size_t)sm_nbytes)))
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "Could not allocate buffer for strip-mine");
/* calculate the hyperslab size */
@@ -809,14 +809,14 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
/* reclaim any VL memory, if necessary */
if (vl_data1)
H5Treclaim(m_tid1, sm_space1, H5P_DEFAULT, sm_buf1);
- HDfree(sm_buf1);
+ free(sm_buf1);
sm_buf1 = NULL;
}
if (sm_buf2 != NULL) {
/* reclaim any VL memory, if necessary */
if (vl_data2)
H5Treclaim(m_tid2, sm_space2, H5P_DEFAULT, sm_buf2);
- HDfree(sm_buf2);
+ free(sm_buf2);
sm_buf2 = NULL;
}
@@ -878,10 +878,10 @@ done:
H5TOOLS_DEBUG("free names - errstat:%d", opts->err_stat);
/* free */
if (opts->obj_name[0] != NULL)
- HDfree(opts->obj_name[0]);
+ free(opts->obj_name[0]);
opts->obj_name[0] = NULL;
if (opts->obj_name[1] != NULL)
- HDfree(opts->obj_name[1]);
+ free(opts->obj_name[1]);
opts->obj_name[1] = NULL;
H5TOOLS_DEBUG("reclaim any VL memory");
@@ -889,14 +889,14 @@ done:
/* reclaim any VL memory, if necessary */
if (vl_data1)
H5Treclaim(m_tid1, sid1, H5P_DEFAULT, buf1);
- HDfree(buf1);
+ free(buf1);
buf1 = NULL;
}
if (buf2 != NULL) {
/* reclaim any VL memory, if necessary */
if (vl_data2)
H5Treclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
- HDfree(buf2);
+ free(buf2);
buf2 = NULL;
}
H5TOOLS_DEBUG("reclaim any stripmine VL memory");
@@ -904,14 +904,14 @@ done:
/* reclaim any VL memory, if necessary */
if (vl_data1)
H5Treclaim(m_tid1, sm_space1, H5P_DEFAULT, sm_buf1);
- HDfree(sm_buf1);
+ free(sm_buf1);
sm_buf1 = NULL;
}
if (sm_buf2 != NULL) {
/* reclaim any VL memory, if necessary */
if (vl_data2)
H5Treclaim(m_tid2, sm_space2, H5P_DEFAULT, sm_buf2);
- HDfree(sm_buf2);
+ free(sm_buf2);
sm_buf2 = NULL;
}
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index 17b8d3c..fc74a39 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -321,7 +321,7 @@ print_found(hsize_t nfound)
if (g_Parallel)
parallel_print("%" PRIuHSIZE " differences found\n", nfound);
else
- HDfprintf(stdout, "%" PRIuHSIZE " differences found\n", nfound);
+ fprintf(stdout, "%" PRIuHSIZE " differences found\n", nfound);
}
/*-----------------------------------------------------------------
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 189aafd..58be037 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -176,7 +176,7 @@ h5tools_close(void)
if (h5tools_init_g) {
/* special case where only data is output to stdout */
if ((rawoutstream == NULL) && rawdatastream && (rawdatastream == stdout))
- HDfprintf(rawdatastream, "\n");
+ fprintf(rawdatastream, "\n");
if (tools_func)
H5Eprint2(H5tools_ERR_STACK_g, rawerrorstream);
@@ -256,13 +256,13 @@ h5tools_set_data_output_file(const char *fname, int is_bin)
if (fname != NULL) {
/* binary output */
if (is_bin) {
- if ((f = HDfopen(fname, "wb")) != NULL) {
+ if ((f = fopen(fname, "wb")) != NULL) {
rawdatastream = f;
retvalue = SUCCEED;
}
}
else {
- if ((f = HDfopen(fname, "w")) != NULL) {
+ if ((f = fopen(fname, "w")) != NULL) {
rawdatastream = f;
retvalue = SUCCEED;
}
@@ -304,13 +304,13 @@ h5tools_set_attr_output_file(const char *fname, int is_bin)
if (fname != NULL) {
/* binary output */
if (is_bin) {
- if ((f = HDfopen(fname, "wb")) != NULL) {
+ if ((f = fopen(fname, "wb")) != NULL) {
rawattrstream = f;
retvalue = SUCCEED;
}
}
else {
- if ((f = HDfopen(fname, "w")) != NULL) {
+ if ((f = fopen(fname, "w")) != NULL) {
rawattrstream = f;
retvalue = SUCCEED;
}
@@ -352,13 +352,13 @@ h5tools_set_input_file(const char *fname, int is_bin)
if (fname != NULL) {
/* binary output */
if (is_bin) {
- if ((f = HDfopen(fname, "rb")) != NULL) {
+ if ((f = fopen(fname, "rb")) != NULL) {
rawinstream = f;
retvalue = SUCCEED;
}
}
else {
- if ((f = HDfopen(fname, "r")) != NULL) {
+ if ((f = fopen(fname, "r")) != NULL) {
rawinstream = f;
retvalue = SUCCEED;
}
@@ -400,13 +400,13 @@ h5tools_set_output_file(const char *fname, int is_bin)
if (fname != NULL) {
/* binary output */
if (is_bin) {
- if ((f = HDfopen(fname, "wb")) != NULL) {
+ if ((f = fopen(fname, "wb")) != NULL) {
rawoutstream = f;
retvalue = SUCCEED;
}
}
else {
- if ((f = HDfopen(fname, "w")) != NULL) {
+ if ((f = fopen(fname, "w")) != NULL) {
rawoutstream = f;
retvalue = SUCCEED;
}
@@ -448,13 +448,13 @@ h5tools_set_error_file(const char *fname, int is_bin)
if (fname != NULL) {
/* binary output */
if (is_bin) {
- if ((f = HDfopen(fname, "wb")) != NULL) {
+ if ((f = fopen(fname, "wb")) != NULL) {
rawerrorstream = f;
retvalue = SUCCEED;
}
}
else {
- if ((f = HDfopen(fname, "w")) != NULL) {
+ if ((f = fopen(fname, "w")) != NULL) {
rawerrorstream = f;
retvalue = SUCCEED;
}
@@ -1230,8 +1230,8 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context
H5TOOLS_START_DEBUG(" ");
- HDmemset(&prefix, 0, sizeof(h5tools_str_t));
- HDmemset(&str, 0, sizeof(h5tools_str_t));
+ memset(&prefix, 0, sizeof(h5tools_str_t));
+ memset(&str, 0, sizeof(h5tools_str_t));
/* Terminate previous line, if any */
H5TOOLS_DEBUG("before CR elmtno=%ld, ctx->cur_column=%d, info->idx_fmt=%s, info->line_suf=%s", elmtno,
@@ -1325,8 +1325,8 @@ h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_
if (!ctx->need_prefix)
return;
- HDmemset(&prefix, 0, sizeof(h5tools_str_t));
- HDmemset(&str, 0, sizeof(h5tools_str_t));
+ memset(&prefix, 0, sizeof(h5tools_str_t));
+ memset(&str, 0, sizeof(h5tools_str_t));
/* Terminate previous line, if any */
if (ctx->cur_column) {
@@ -1843,7 +1843,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
s = (char *)mem;
}
for (i = 0; i < size && (s[i] || pad != H5T_STR_NULLTERM); i++) {
- HDmemcpy(&tempuchar, &s[i], sizeof(unsigned char));
+ memcpy(&tempuchar, &s[i], sizeof(unsigned char));
if (1 != HDfwrite(&tempuchar, sizeof(unsigned char), 1, stream))
H5TOOLS_THROW((-1), "fwrite failed");
} /* i */
@@ -1947,11 +1947,11 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
if (size > sizeof(tref))
H5TOOLS_THROW((-1), "unexpectedly large ref");
- HDmemset(&tref, 0, sizeof(tref));
+ memset(&tref, 0, sizeof(tref));
for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char *)_mem) + block_index * size;
- HDmemcpy(&tref, mem, size);
+ memcpy(&tref, mem, size);
if ((region_id = H5Ropen_object(&tref, H5P_DEFAULT, H5P_DEFAULT)) < 0)
H5TOOLS_INFO("H5Ropen_object H5T_STD_REF failed");
else {
@@ -2044,7 +2044,7 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t contai
H5TOOLS_THROW((-1), "H5Dget_space failed");
/* Allocate space for the dimension array */
- if ((dims1 = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
+ if ((dims1 = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL)
H5TOOLS_THROW((-1), "Could not allocate buffer for dims");
/* find the dimensions of each data space from the block coordinates */
@@ -2061,15 +2061,15 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t contai
if ((type_size = H5Tget_size(type_id)) == 0)
H5TOOLS_THROW((-1), "H5Tget_size failed");
- if ((region_buf = HDmalloc(type_size * (size_t)numelem)) == NULL)
+ if ((region_buf = malloc(type_size * (size_t)numelem)) == NULL)
H5TOOLS_THROW((-1), "Could not allocate region buffer");
/* Select (x , x , ..., x ) x (y , y , ..., y ) hyperslab for reading memory dataset */
/* 1 2 n 1 2 n */
- if ((start = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
+ if ((start = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL)
H5TOOLS_THROW((-1), "Could not allocate buffer for start");
- if ((count = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
+ if ((count = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL)
H5TOOLS_THROW((-1), "Could not allocate buffer for count");
for (blkndx = 0; blkndx < nblocks; blkndx++) {
@@ -2094,10 +2094,10 @@ done:;
} /* end for (blkndx = 0; blkndx < nblocks; blkndx++) */
CATCH
- HDfree(start);
- HDfree(count);
- HDfree(region_buf);
- HDfree(dims1);
+ free(start);
+ free(count);
+ free(region_buf);
+ free(dims1);
if (H5Sclose(mem_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
@@ -2143,7 +2143,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea
ndims = (unsigned)sndims;
alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]);
- if ((ptdata = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL)
+ if ((ptdata = (hsize_t *)malloc((size_t)alloc_size)) == NULL)
H5TOOLS_GOTO_ERROR(FALSE, "Could not allocate buffer for ptdata");
if (H5Sget_select_hyper_blocklist(region_space, (hsize_t)0, nblocks, ptdata) < 0)
@@ -2157,7 +2157,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea
render_bin_output_region_data_blocks(region_id, stream, container, ndims, type_id, nblocks, ptdata);
done:
- HDfree(ptdata);
+ free(ptdata);
if (type_id > 0 && H5Tclose(type_id) < 0)
H5TOOLS_ERROR(FALSE, "H5Tclose failed");
@@ -2203,11 +2203,11 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *
if ((type_size = H5Tget_size(type_id)) == 0)
H5TOOLS_GOTO_ERROR((-1), "H5Tget_size failed");
- if ((region_buf = HDmalloc(type_size * (size_t)npoints)) == NULL)
+ if ((region_buf = malloc(type_size * (size_t)npoints)) == NULL)
H5TOOLS_GOTO_ERROR((-1), "Could not allocate buffer for region");
/* Allocate space for the dimension array */
- if ((dims1 = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
+ if ((dims1 = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL)
H5TOOLS_GOTO_ERROR((-1), "Could not allocate buffer for dims");
dims1[0] = npoints;
@@ -2223,8 +2223,8 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *
H5TOOLS_GOTO_ERROR((-1), "render_bin_output of data points failed");
done:
- HDfree(region_buf);
- HDfree(dims1);
+ free(region_buf);
+ free(dims1);
if (H5Sclose(mem_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 57a1712..f7298cb 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -266,7 +266,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont
} /* end if */
else {
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
size = H5Tget_size(type);
H5TOOLS_DEBUG("type size is %ld", size);
@@ -344,9 +344,9 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
hbool_t past_catch = FALSE;
hbool_t ret_value = TRUE;
- HDassert(info);
- HDassert(ctx);
- HDassert(buffer);
+ assert(info);
+ assert(ctx);
+ assert(buffer);
outputformat = *info;
outputformat.idx_fmt = "";
@@ -497,12 +497,12 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
void *region_buf = NULL;
int ret_value = 0;
- HDassert(info);
- HDassert(cur_ctx);
- HDassert(buffer);
- HDassert(ptdata);
+ assert(info);
+ assert(cur_ctx);
+ assert(buffer);
+ assert(ptdata);
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
H5TOOLS_START_DEBUG(" ");
@@ -514,7 +514,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
H5TOOLS_GOTO_ERROR(FAIL, "H5Dget_space failed");
/* Allocate space for the dimension array */
- if ((dims1 = (hsize_t *)HDmalloc((size_t)(sizeof(hsize_t) * ndims))) == NULL)
+ if ((dims1 = (hsize_t *)malloc((size_t)(sizeof(hsize_t) * ndims))) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "Could not allocate buffer for dims");
/* find the dimensions of each data space from the block coordinates */
@@ -528,15 +528,15 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
if ((mem_space = H5Screate_simple((int)ndims, dims1, NULL)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Screate_simple failed");
- if ((region_buf = HDmalloc(type_size * (size_t)numelem)) == NULL)
+ if ((region_buf = malloc(type_size * (size_t)numelem)) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "Could not allocate region buffer");
/* Select (x , x , ..., x ) x (y , y , ..., y ) hyperslab for reading memory dataset */
/* 1 2 n 1 2 n */
- if ((start = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
+ if ((start = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "Could not allocate buffer for start");
- if ((count = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
+ if ((count = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "Could not allocate buffer for count");
curr_pos = 0;
@@ -614,10 +614,10 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
} /* end for (blkndx = 0; blkndx < nblocks; blkndx++) */
done:
- HDfree(start);
- HDfree(count);
- HDfree(region_buf);
- HDfree(dims1);
+ free(start);
+ free(count);
+ free(region_buf);
+ free(dims1);
if (H5Sclose(mem_space) < 0)
H5TOOLS_ERROR(FAIL, "H5Sclose failed");
@@ -674,9 +674,9 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
hbool_t past_catch = FALSE;
hbool_t ret_value = TRUE;
- HDassert(info);
- HDassert(ctx);
- HDassert(buffer);
+ assert(info);
+ assert(ctx);
+ assert(buffer);
H5TOOLS_START_DEBUG(" ");
outputformat = *info;
@@ -712,8 +712,8 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
h5tools_str_append(buffer, "REGION_TYPE BLOCK ");
alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]);
- HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
- if ((ptdata = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL)
+ assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
+ if ((ptdata = (hsize_t *)malloc((size_t)alloc_size)) == NULL)
H5TOOLS_GOTO_ERROR(dimension_break, "Could not allocate buffer for ptdata");
if (H5Sget_select_hyper_blocklist(region_space, (hsize_t)0, nblocks, ptdata) < 0)
@@ -809,7 +809,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
}
done:
- HDfree(ptdata);
+ free(ptdata);
if (type_id > 0 && H5Tclose(type_id) < 0)
H5TOOLS_ERROR(dimension_break, "H5Tclose failed");
@@ -893,17 +893,17 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
hbool_t past_catch = FALSE;
int ret_value = 0;
- HDassert(info);
- HDassert(cur_ctx);
- HDassert(buffer);
- HDassert(ptdata);
- HDassert(ndims > 0);
+ assert(info);
+ assert(cur_ctx);
+ assert(buffer);
+ assert(ptdata);
+ assert(ndims > 0);
H5TOOLS_START_DEBUG(" ");
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
/* Allocate space for the dimension array */
- if ((dims1 = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
+ if ((dims1 = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL)
H5TOOLS_THROW((-1), "Could not allocate buffer for dims");
dims1[0] = npoints;
@@ -915,7 +915,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
if ((type_size = H5Tget_size(type_id)) == 0)
H5TOOLS_THROW((-1), "H5Tget_size failed");
- if ((region_buf = HDmalloc(type_size * (size_t)npoints)) == NULL)
+ if ((region_buf = malloc(type_size * (size_t)npoints)) == NULL)
H5TOOLS_THROW((-1), "Could not allocate buffer for region");
curr_pos = 0;
@@ -978,9 +978,9 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
} /* end for (jndx = 0; jndx < npoints; jndx++, elmtno++) */
done:
- HDfree(region_buf);
+ free(region_buf);
CATCH
- HDfree(dims1);
+ free(dims1);
if (H5Sclose(mem_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
@@ -1033,9 +1033,9 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
hbool_t past_catch = FALSE;
hbool_t ret_value = TRUE;
- HDassert(info);
- HDassert(ctx);
- HDassert(buffer);
+ assert(info);
+ assert(ctx);
+ assert(buffer);
H5TOOLS_START_DEBUG(" ");
outputformat = *info;
@@ -1071,8 +1071,8 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
h5tools_str_append(buffer, "REGION_TYPE POINT ");
alloc_size = npoints * ndims * sizeof(ptdata[0]);
- HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
- if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size)))
+ assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
+ if (NULL == (ptdata = (hsize_t *)malloc((size_t)alloc_size)))
H5TOOLS_GOTO_ERROR(dimension_break, "Could not allocate buffer for ptdata");
if (H5Sget_select_elem_pointlist(region_space, (hsize_t)0, npoints, ptdata) < 0)
@@ -1164,7 +1164,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
}
done:
- HDfree(ptdata);
+ free(ptdata);
if (type_id > 0 && H5Tclose(type_id) < 0)
H5TOOLS_ERROR(dimension_break, "H5Tclose failed");
@@ -1317,11 +1317,11 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
size = 1;
sm_size[i - 1] = MIN(total_size[i - 1], size);
sm_nbytes *= sm_size[i - 1];
- HDassert(sm_nbytes > 0);
+ assert(sm_nbytes > 0);
}
- HDassert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/
- if (NULL == (sm_buf = (unsigned char *)HDmalloc((size_t)sm_nelmts * p_type_nbytes)))
+ assert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/
+ if (NULL == (sm_buf = (unsigned char *)malloc((size_t)sm_nelmts * p_type_nbytes)))
H5TOOLS_THROW(FAIL, "Could not allocate buffer for strip-mine");
if ((sm_space = H5Screate_simple(1, &sm_nelmts, NULL)) < 0)
@@ -1370,7 +1370,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
if (H5Sclose(sm_space) < 0)
H5TOOLS_THROW(FAIL, "H5Sclose failed");
if (sm_buf)
- HDfree(sm_buf);
+ free(sm_buf);
sm_buf = NULL;
}
else
@@ -1382,7 +1382,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
CATCH
if (sm_buf)
- HDfree(sm_buf);
+ free(sm_buf);
H5TOOLS_ENDDEBUG(" ");
return ret_value;
@@ -1699,8 +1699,8 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
if (!sm_nbytes)
goto done;
- HDassert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/
- if (NULL != (sm_buf = (unsigned char *)HDmalloc((size_t)sm_nbytes))) {
+ assert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/
+ if (NULL != (sm_buf = (unsigned char *)malloc((size_t)sm_nbytes))) {
H5TOOLS_DEBUG("stripmine size:%ld", sm_nbytes);
sm_nelmts = sm_nbytes / p_type_nbytes;
@@ -1710,8 +1710,8 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
H5TOOLS_DEBUG("ctx->ndims:%d", ctx->ndims);
/* The stripmine loop */
- HDmemset(hs_offset, 0, sizeof hs_offset);
- HDmemset(zero, 0, sizeof zero);
+ memset(hs_offset, 0, sizeof hs_offset);
+ memset(zero, 0, sizeof zero);
for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_nelmts) {
H5TOOLS_DEBUG("stripmine read loop:%d", i);
@@ -1772,7 +1772,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
ctx->continuation++;
H5TOOLS_DEBUG("stripmine read loop:%d complete", i);
}
- HDfree(sm_buf);
+ free(sm_buf);
} /* if (NULL != (sm_buf...)) */
done:
@@ -1848,8 +1848,8 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
vl_data = TRUE;
alloc_size = p_nelmts * H5Tget_size(p_type);
- HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
- if (NULL != (buf = (unsigned char *)HDmalloc((size_t)alloc_size))) {
+ assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
+ if (NULL != (buf = (unsigned char *)malloc((size_t)alloc_size))) {
H5TOOLS_DEBUG("ctx->ndims:%d", ctx->ndims);
H5TOOLS_DEBUG("Read the data");
@@ -1865,7 +1865,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
}
else
H5TOOLS_ERROR((-1), "H5Aread failed");
- HDfree(buf);
+ free(buf);
} /* if (NULL != (buf...)) */
done:
if (f_space >= 0 && H5Sclose(f_space) < 0)
@@ -1909,7 +1909,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
stream = rawoutstream;
if (!info) {
- HDmemset(&info_dflt, 0, sizeof info_dflt);
+ memset(&info_dflt, 0, sizeof info_dflt);
info = &info_dflt;
}
@@ -1985,7 +1985,7 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c
stream = rawoutstream;
if (!info) {
- HDmemset(&info_dflt, 0, sizeof(info_dflt));
+ memset(&info_dflt, 0, sizeof(info_dflt));
info = &info_dflt;
}
@@ -2747,7 +2747,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
if ((snmembs = H5Tget_nmembers(type)) < 0)
H5TOOLS_THROW((-1), "H5Tget_nmembers failed");
nmembs = (unsigned)snmembs;
- HDassert(nmembs > 0);
+ assert(nmembs > 0);
if ((super = H5Tget_super(type)) < 0)
H5TOOLS_THROW((-1), "H5Tget_super failed");
@@ -2776,9 +2776,9 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
dst_size = type_size;
/* Get the names and raw values of all members */
- if (NULL == (name = (char **)HDcalloc((size_t)nmembs, sizeof(char *))))
+ if (NULL == (name = (char **)calloc((size_t)nmembs, sizeof(char *))))
H5TOOLS_THROW((-1), "Could not allocate buffer for member name");
- if (NULL == (value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(type_size, dst_size))))
+ if (NULL == (value = (unsigned char *)calloc((size_t)nmembs, MAX(type_size, dst_size))))
H5TOOLS_THROW((-1), "Could not allocate buffer for member value");
for (i = 0; i < nmembs; i++) {
@@ -2820,13 +2820,13 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
else if (H5T_SGN_NONE == H5Tget_sign(native)) {
unsigned long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(buffer, "%llu", copy);
}
else {
long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(buffer, "%lld", copy);
}
@@ -2840,11 +2840,11 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
for (i = 0; i < nmembs; i++)
if (name[i])
H5free_memory(name[i]);
- HDfree(name);
+ free(name);
} /* end if */
if (value)
- HDfree(value);
+ free(value);
if (super >= 0 && H5Tclose(super) < 0)
H5TOOLS_THROW((-1), "Could not close datatype's super class");
@@ -2879,7 +2879,7 @@ h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, h5tools_context
*/
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -2925,7 +2925,7 @@ h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info, h5tools_contex
*/
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -2972,7 +2972,7 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c
*/
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -3081,7 +3081,7 @@ h5tools_print_fill_value(h5tools_str_t *buffer /*in,out*/, const h5tool_format_t
n_type = H5Tget_native_type(type_id, H5T_DIR_DEFAULT);
size = H5Tget_size(n_type);
- buf = HDmalloc(size);
+ buf = malloc(size);
H5Pget_fill_value(dcpl, n_type, buf);
@@ -3090,7 +3090,7 @@ h5tools_print_fill_value(h5tools_str_t *buffer /*in,out*/, const h5tool_format_t
H5Tclose(n_type);
if (buf)
- HDfree(buf);
+ free(buf);
}
/*-------------------------------------------------------------------------
@@ -3130,7 +3130,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_str_t buffer; /* string into which to render */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -3382,12 +3382,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
ssize_out = H5Pget_virtual_filename(dcpl_id, curr_vmap, NULL, 0);
- HDassert(ssize_out > 0);
- HDassert((size_t)ssize_out < sizeof(name));
+ assert(ssize_out > 0);
+ assert((size_t)ssize_out < sizeof(name));
H5Pget_virtual_filename(dcpl_id, curr_vmap, name, sizeof(name));
ssize_out = H5Pget_virtual_dsetname(dcpl_id, curr_vmap, NULL, 0);
- HDassert(ssize_out > 0);
- HDassert((size_t)ssize_out < sizeof(name));
+ assert(ssize_out > 0);
+ assert((size_t)ssize_out < sizeof(name));
H5Pget_virtual_dsetname(dcpl_id, curr_vmap, dsetname, sizeof(dsetname));
ctx->need_prefix = TRUE;
@@ -3661,7 +3661,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
break;
case H5D_FILL_TIME_ERROR:
default:
- HDassert(0);
+ assert(0);
break;
}
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -3685,7 +3685,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
break;
case H5D_FILL_VALUE_ERROR:
default:
- HDassert(0);
+ assert(0);
break;
}
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -3727,7 +3727,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
case H5D_ALLOC_TIME_ERROR:
case H5D_ALLOC_TIME_DEFAULT:
default:
- HDassert(0);
+ assert(0);
break;
}
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -3774,7 +3774,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_
return;
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -3783,7 +3783,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_
/* call H5Oget_comment again with the correct value */
if (cmt_bufsize > 0) {
- comment = (char *)HDmalloc((size_t)(cmt_bufsize + 1)); /* new_size including null terminator */
+ comment = (char *)malloc((size_t)(cmt_bufsize + 1)); /* new_size including null terminator */
if (comment) {
cmt_bufsize = H5Oget_comment(obj_id, comment, (size_t)cmt_bufsize);
if (cmt_bufsize > 0) {
@@ -3798,7 +3798,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_
h5tools_str_close(&buffer);
}
- HDfree(comment);
+ free(comment);
}
}
} /* end dump_comment() */
@@ -3826,7 +3826,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_contex
*/
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -3968,7 +3968,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
size_t ncols = 80; /* available output width */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -4063,7 +4063,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
/* Assume entire data space to be printed */
datactx.need_prefix = TRUE;
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
for (i = 0; i < ndims; i++, datactx.cur_elmt++, elmt_counter++) {
H5O_type_t obj_type = -1; /* Object type */
H5R_type_t ref_type; /* Reference type */
@@ -4296,7 +4296,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
H5TOOLS_START_DEBUG(" file=%p", (void *)stream);
H5TOOLS_DEBUG("rawdata file=%p", (void *)rawdatastream);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -4357,23 +4357,23 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
datactx.need_prefix = TRUE;
if (NULL !=
- (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
+ (ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
if (obj_data) {
if (H5Dread(obj_id, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) {
- HDfree(ref_buf);
+ free(ref_buf);
H5TOOLS_INFO("H5Dread reference failed");
H5TOOLS_GOTO_DONE_NO_RET();
}
}
else {
if (H5Aread(obj_id, H5T_STD_REF, ref_buf) < 0) {
- HDfree(ref_buf);
+ free(ref_buf);
H5TOOLS_INFO("H5Aread reference failed");
H5TOOLS_GOTO_DONE_NO_RET();
}
}
h5tools_dump_reference(stream, &outputformat, &datactx, obj_id, ref_buf, ndims);
- HDfree(ref_buf);
+ free(ref_buf);
}
ctx->indent_level--;
}
diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c
index 899b7be..58a71b3 100644
--- a/tools/lib/h5tools_filters.c
+++ b/tools/lib/h5tools_filters.c
@@ -20,7 +20,7 @@
static void
print_filter_warning(const char *dname, const char *fname)
{
- HDfprintf(stderr, "Warning: dataset <%s> cannot be read, %s filter is not available\n", dname, fname);
+ fprintf(stderr, "Warning: dataset <%s> cannot be read, %s filter is not available\n", dname, fname);
}
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index 9f12367..2d95732 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -58,8 +58,8 @@ free_ref_path_info(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *op
{
ref_path_node_t *node = (ref_path_node_t *)item;
- HDfree(node->path);
- HDfree(node);
+ free(node->path);
+ free(node);
return (0);
}
@@ -112,7 +112,7 @@ ref_path_table_cmp(const void *key1, const void *key2)
if (thefile > 0)
H5Otoken_cmp(thefile, token1, token2, &cmp_value);
else
- cmp_value = HDmemcmp(token1, token2, sizeof(H5O_token_t));
+ cmp_value = memcmp(token1, token2, sizeof(H5O_token_t));
return cmp_value;
}
@@ -211,7 +211,7 @@ ref_path_table_lookup(const char *thepath, H5O_token_t *token)
return -1;
/* Return object token through parameter */
- HDmemcpy(token, &oi.token, sizeof(H5O_token_t));
+ memcpy(token, &oi.token, sizeof(H5O_token_t));
return 0;
}
@@ -239,10 +239,10 @@ ref_path_table_put(const char *path, const H5O_token_t *token)
ref_path_node_t *new_node;
if (ref_path_table && path) {
- if ((new_node = (ref_path_node_t *)HDmalloc(sizeof(ref_path_node_t))) == NULL)
+ if ((new_node = (ref_path_node_t *)malloc(sizeof(ref_path_node_t))) == NULL)
return (-1);
- HDmemcpy(&new_node->obj_token, token, sizeof(H5O_token_t));
+ memcpy(&new_node->obj_token, token, sizeof(H5O_token_t));
new_node->path = HDstrdup(path);
return (H5SL_insert(ref_path_table, new_node, &(new_node->obj_token)));
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 208e33a..3f38805 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -64,8 +64,8 @@ void
h5tools_str_close(h5tools_str_t *str)
{
if (str && str->nalloc) {
- HDfree(str->s);
- HDmemset(str, 0, sizeof(h5tools_str_t));
+ free(str->s);
+ memset(str, 0, sizeof(h5tools_str_t));
}
}
@@ -122,9 +122,9 @@ h5tools_str_append(h5tools_str_t *str /*in,out*/, const char *fmt, ...)
int nchars = -1;
size_t avail = str->nalloc - str->len;
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
nchars = HDvsnprintf(str->s + str->len, avail, fmt, ap);
- HDva_end(ap);
+ va_end(ap);
/* Note: HDvsnprintf() behaves differently on Windows as Unix, when
* buffer is smaller than source string. On Unix, this function
@@ -149,9 +149,9 @@ h5tools_str_append(h5tools_str_t *str /*in,out*/, const char *fmt, ...)
* Allocate at least twice as much space and try again.
*/
size_t newsize = MAX(str->len + (size_t)nchars + 1, 2 * str->nalloc);
- HDassert(newsize > str->nalloc); /*overflow*/
- str->s = (char *)HDrealloc(str->s, newsize);
- HDassert(str->s);
+ assert(newsize > str->nalloc); /*overflow*/
+ str->s = (char *)realloc(str->s, newsize);
+ assert(str->s);
str->nalloc = newsize;
}
else {
@@ -183,8 +183,8 @@ h5tools_str_reset(h5tools_str_t *str /*in,out*/)
{
if (!str->s || str->nalloc <= 0) {
str->nalloc = STR_INIT_LEN;
- str->s = (char *)HDmalloc(str->nalloc);
- HDassert(str->s);
+ str->s = (char *)malloc(str->nalloc);
+ assert(str->s);
}
str->s[0] = '\0';
@@ -238,8 +238,8 @@ h5tools_str_fmt(h5tools_str_t *str /*in,out*/, size_t start, const char *fmt)
{
char _temp[1024], *temp = _temp;
- HDassert(str);
- HDassert(fmt);
+ assert(str);
+ assert(fmt);
/* If the format string is simply "%s" then don't bother doing anything */
if (!HDstrcmp(fmt, "%s"))
@@ -253,8 +253,8 @@ h5tools_str_fmt(h5tools_str_t *str /*in,out*/, size_t start, const char *fmt)
size_t n = sizeof(_temp);
if (str->len - start + 1 > n) {
n = str->len - start + 1;
- temp = (char *)HDmalloc(n);
- HDassert(temp);
+ temp = (char *)malloc(n);
+ assert(temp);
}
HDstrncpy(temp, str->s + start, n - 1);
@@ -269,7 +269,7 @@ h5tools_str_fmt(h5tools_str_t *str /*in,out*/, size_t start, const char *fmt)
/* Free the temp buffer if we allocated one */
if (temp != _temp)
- HDfree(temp);
+ free(temp);
return str->s;
}
@@ -471,8 +471,8 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, const h5tool_for
nblocks = (hsize_t)snblocks;
alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]);
- HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
- ptdata = (hsize_t *)HDmalloc((size_t)alloc_size);
+ assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
+ ptdata = (hsize_t *)malloc((size_t)alloc_size);
H5Sget_select_hyper_blocklist(rspace, (hsize_t)0, nblocks, ptdata);
for (u = 0; u < nblocks; u++) {
@@ -493,7 +493,7 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, const h5tool_for
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
}
- HDfree(ptdata);
+ free(ptdata);
} /* end if (nblocks > 0) */
}
@@ -532,8 +532,8 @@ h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, const h5tool_for
npoints = (hsize_t)snpoints;
alloc_size = npoints * ndims * sizeof(ptdata[0]);
- HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
- ptdata = (hsize_t *)HDmalloc((size_t)alloc_size);
+ assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
+ ptdata = (hsize_t *)malloc((size_t)alloc_size);
H5Sget_select_elem_pointlist(rspace, (hsize_t)0, npoints, ptdata);
for (u = 0; u < npoints; u++) {
@@ -550,7 +550,7 @@ h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, const h5tool_for
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
}
- HDfree(ptdata);
+ free(ptdata);
} /* end if (npoints > 0) */
}
@@ -716,21 +716,21 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
/* if (H5Tequal(type, H5T_NATIVE_FLOAT)) */
float tempfloat;
- HDmemcpy(&tempfloat, vp, sizeof(float));
+ memcpy(&tempfloat, vp, sizeof(float));
h5tools_str_append(str, OPT(info->fmt_float, "%g"), (double)tempfloat);
}
else if (sizeof(double) == nsize) {
/* if (H5Tequal(type, H5T_NATIVE_DOUBLE)) */
double tempdouble;
- HDmemcpy(&tempdouble, vp, sizeof(double));
+ memcpy(&tempdouble, vp, sizeof(double));
h5tools_str_append(str, OPT(info->fmt_double, "%g"), tempdouble);
}
else if (sizeof(long double) == nsize) {
/* if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) */
long double templdouble;
- HDmemcpy(&templdouble, vp, sizeof(long double));
+ memcpy(&templdouble, vp, sizeof(long double));
h5tools_str_append(str, "%Lg", templdouble);
}
else {
@@ -830,7 +830,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
else if (H5T_SGN_NONE == nsign) {
unsigned char tempuchar;
- HDmemcpy(&tempuchar, ucp_vp, sizeof(unsigned char));
+ memcpy(&tempuchar, ucp_vp, sizeof(unsigned char));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(unsigned char))
tempuchar = 0;
@@ -844,7 +844,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
else {
signed char tempchar;
- HDmemcpy(&tempchar, cp_vp, sizeof(char));
+ memcpy(&tempchar, cp_vp, sizeof(char));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(char))
tempchar = 0;
@@ -860,7 +860,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
if (H5T_SGN_NONE == nsign) {
unsigned int tempuint;
- HDmemcpy(&tempuint, vp, sizeof(unsigned int));
+ memcpy(&tempuint, vp, sizeof(unsigned int));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(unsigned int))
tempuint = 0;
@@ -872,7 +872,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
else {
int tempint;
- HDmemcpy(&tempint, vp, sizeof(int));
+ memcpy(&tempint, vp, sizeof(int));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(int))
tempint = 0;
@@ -887,7 +887,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
if (H5T_SGN_NONE == nsign) {
unsigned short tempushort;
- HDmemcpy(&tempushort, vp, sizeof(unsigned short));
+ memcpy(&tempushort, vp, sizeof(unsigned short));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(unsigned short))
tempushort = 0;
@@ -901,7 +901,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
else {
short tempshort;
- HDmemcpy(&tempshort, vp, sizeof(short));
+ memcpy(&tempshort, vp, sizeof(short));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(short))
tempshort = 0;
@@ -916,7 +916,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
if (H5T_SGN_NONE == nsign) {
unsigned long tempulong;
- HDmemcpy(&tempulong, vp, sizeof(unsigned long));
+ memcpy(&tempulong, vp, sizeof(unsigned long));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(unsigned long))
tempulong = 0;
@@ -928,7 +928,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
else {
long templong;
- HDmemcpy(&templong, vp, sizeof(long));
+ memcpy(&templong, vp, sizeof(long));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(long))
templong = 0;
@@ -944,7 +944,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
if (H5T_SGN_NONE == nsign) {
unsigned long long tempullong;
- HDmemcpy(&tempullong, vp, sizeof(unsigned long long));
+ memcpy(&tempullong, vp, sizeof(unsigned long long));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(unsigned long long))
tempullong = 0;
@@ -956,7 +956,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
else {
long long templlong;
- HDmemcpy(&templlong, vp, sizeof(long long));
+ memcpy(&templlong, vp, sizeof(long long));
if (packed_bits_num) {
if (packed_data_offset >= 8 * sizeof(long long))
templlong = 0;
@@ -1271,13 +1271,13 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
size = H5Tget_size(memb);
ndims = H5Tget_array_ndims(type);
H5Tget_array_dims2(type, dims);
- HDassert(ndims >= 1 && ndims <= H5S_MAX_RANK);
+ assert(ndims >= 1 && ndims <= H5S_MAX_RANK);
/* Calculate the number of array elements */
for (k = 0, nelmts = 1; k < ndims; k++) {
temp_nelmts = nelmts;
temp_nelmts *= dims[k];
- HDassert(temp_nelmts == (hsize_t)((size_t)temp_nelmts));
+ assert(temp_nelmts == (hsize_t)((size_t)temp_nelmts));
nelmts = (size_t)temp_nelmts;
}
/* Print the opening bracket */
@@ -1446,38 +1446,38 @@ h5tools_str_sprint_reference(h5tools_str_t *str, H5R_ref_t *ref_vp)
buf_size = H5Rget_file_name(ref_vp, NULL, 0);
H5TOOLS_DEBUG("buf_size=%ld", buf_size);
if (buf_size) {
- char *file_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
+ char *file_name = (char *)malloc(sizeof(char) * (size_t)buf_size + 1);
if (H5Rget_file_name(ref_vp, file_name, (size_t)buf_size + 1) >= 0) {
file_name[buf_size] = '\0';
H5TOOLS_DEBUG("name=%s", file_name);
h5tools_str_append(str, "%s", file_name);
}
- HDfree(file_name);
+ free(file_name);
}
buf_size = H5Rget_obj_name(ref_vp, H5P_DEFAULT, NULL, 0);
H5TOOLS_DEBUG("buf_size=%ld", buf_size);
if (buf_size) {
- char *obj_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
+ char *obj_name = (char *)malloc(sizeof(char) * (size_t)buf_size + 1);
if (H5Rget_obj_name(ref_vp, H5P_DEFAULT, obj_name, (size_t)buf_size + 1) >= 0) {
obj_name[buf_size] = '\0';
H5TOOLS_DEBUG("name=%s", obj_name);
h5tools_str_append(str, "%s", obj_name);
}
- HDfree(obj_name);
+ free(obj_name);
}
if (H5Rget_type(ref_vp) == H5R_ATTR) {
buf_size = H5Rget_attr_name(ref_vp, NULL, 0);
H5TOOLS_DEBUG("buf_size=%ld", buf_size);
if (buf_size) {
- char *attr_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
+ char *attr_name = (char *)malloc(sizeof(char) * (size_t)buf_size + 1);
if (H5Rget_attr_name(ref_vp, attr_name, (size_t)buf_size + 1) >= 0) {
attr_name[buf_size] = '\0';
H5TOOLS_DEBUG("name=%s", attr_name);
h5tools_str_append(str, "/%s", attr_name);
}
- HDfree(attr_name);
+ free(attr_name);
}
}
h5tools_str_append(str, "\"");
@@ -1563,7 +1563,7 @@ h5tools_escape(char *s /*in,out*/, size_t size)
return NULL;
HDmemmove(s + i + esc_size, s + i + 1, n - i); /*make room*/
- HDmemcpy(s + i, escape, esc_size); /*insert*/
+ memcpy(s + i, escape, esc_size); /*insert*/
n += esc_size - 1; /* adjust total string size */
i += esc_size; /* adjust string position */
}
@@ -1626,20 +1626,20 @@ h5tools_str_replace(const char *string, const char *substr, const char *replacem
char *oldstr;
oldstr = newstr;
- newstr = (char *)HDmalloc(HDstrlen(oldstr) - HDstrlen(substr) + HDstrlen(replacement) + 1);
+ newstr = (char *)malloc(HDstrlen(oldstr) - HDstrlen(substr) + HDstrlen(replacement) + 1);
if (newstr == NULL) {
- HDfree(oldstr);
+ free(oldstr);
return NULL;
}
- HDmemcpy(newstr, oldstr, (size_t)(tok - oldstr));
- HDmemcpy(newstr + (tok - oldstr), replacement, HDstrlen(replacement));
- HDmemcpy(newstr + (tok - oldstr) + HDstrlen(replacement), tok + HDstrlen(substr),
- HDstrlen(oldstr) - HDstrlen(substr) - (size_t)(tok - oldstr));
- HDmemset(newstr + HDstrlen(oldstr) - HDstrlen(substr) + HDstrlen(replacement), 0, 1);
+ memcpy(newstr, oldstr, (size_t)(tok - oldstr));
+ memcpy(newstr + (tok - oldstr), replacement, HDstrlen(replacement));
+ memcpy(newstr + (tok - oldstr) + HDstrlen(replacement), tok + HDstrlen(substr),
+ HDstrlen(oldstr) - HDstrlen(substr) - (size_t)(tok - oldstr));
+ memset(newstr + HDstrlen(oldstr) - HDstrlen(substr) + HDstrlen(replacement), 0, 1);
/* move back head right after the last replacement */
head = newstr + (tok - oldstr) + HDstrlen(replacement);
- HDfree(oldstr);
+ free(oldstr);
}
return newstr;
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 8a9d806..652dafa 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -65,15 +65,15 @@ parallel_print(const char *format, ...)
int bytes_written;
va_list ap;
- HDva_start(ap, format);
+ va_start(ap, format);
if (!g_Parallel)
HDvprintf(format, ap);
else {
if (overflow_file == NULL) /*no overflow has occurred yet */ {
bytes_written = HDvsnprintf(outBuff + outBuffOffset, OUTBUFF_SIZE - outBuffOffset, format, ap);
- HDva_end(ap);
- HDva_start(ap, format);
+ va_end(ap);
+ va_start(ap, format);
if ((bytes_written < 0) || ((unsigned)bytes_written >= (OUTBUFF_SIZE - outBuffOffset))) {
/* Terminate the outbuff at the end of the previous output */
@@ -81,8 +81,8 @@ parallel_print(const char *format, ...)
overflow_file = HDtmpfile();
if (overflow_file == NULL)
- HDfprintf(rawerrorstream,
- "warning: could not create overflow file. Output may be truncated.\n");
+ fprintf(rawerrorstream,
+ "warning: could not create overflow file. Output may be truncated.\n");
else
bytes_written = HDvfprintf(overflow_file, format, ap);
}
@@ -92,7 +92,7 @@ parallel_print(const char *format, ...)
else
bytes_written = HDvfprintf(overflow_file, format, ap);
}
- HDva_end(ap);
+ va_end(ap);
}
/*-------------------------------------------------------------------------
@@ -109,14 +109,14 @@ error_msg(const char *fmt, ...)
{
va_list ap;
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
FLUSHSTREAM(rawattrstream);
FLUSHSTREAM(rawdatastream);
FLUSHSTREAM(rawoutstream);
- HDfprintf(rawerrorstream, "%s error: ", h5tools_getprogname());
+ fprintf(rawerrorstream, "%s error: ", h5tools_getprogname());
HDvfprintf(rawerrorstream, fmt, ap);
- HDva_end(ap);
+ va_end(ap);
}
/*-------------------------------------------------------------------------
@@ -133,13 +133,13 @@ warn_msg(const char *fmt, ...)
{
va_list ap;
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
FLUSHSTREAM(rawattrstream);
FLUSHSTREAM(rawdatastream);
FLUSHSTREAM(rawoutstream);
- HDfprintf(rawerrorstream, "%s warning: ", h5tools_getprogname());
+ fprintf(rawerrorstream, "%s warning: ", h5tools_getprogname());
HDvfprintf(rawerrorstream, fmt, ap);
- HDva_end(ap);
+ va_end(ap);
}
/*-------------------------------------------------------------------------
@@ -153,8 +153,8 @@ warn_msg(const char *fmt, ...)
void
help_ref_msg(FILE *output)
{
- HDfprintf(output, "Try '-h' or '--help' for more information or ");
- HDfprintf(output, "see the <%s> entry in the 'HDF5 Reference Manual'.\n", h5tools_getprogname());
+ fprintf(output, "Try '-h' or '--help' for more information or ");
+ fprintf(output, "see the <%s> entry in the 'HDF5 Reference Manual'.\n", h5tools_getprogname());
}
/*-------------------------------------------------------------------------
@@ -205,7 +205,7 @@ parse_hsize_list(const char *h_list, subset_d *d)
H5TOOLS_DEBUG("Number integers to read=%ld", size_count);
/* allocate an array for the integers in the list */
- if ((p_list = (hsize_t *)HDcalloc(size_count, sizeof(hsize_t))) == NULL)
+ if ((p_list = (hsize_t *)calloc(size_count, sizeof(hsize_t))) == NULL)
H5TOOLS_INFO("Unable to allocate space for subset data");
for (ptr = h_list; i < size_count && ptr && *ptr && *ptr != ';' && *ptr != ']'; ptr++)
@@ -247,7 +247,7 @@ parse_subset_params(const char *dset)
if ((brace = HDstrrchr(q_dset, '[')) != NULL) {
*brace++ = '\0';
- s = (struct subset_t *)HDcalloc(1, sizeof(struct subset_t));
+ s = (struct subset_t *)calloc(1, sizeof(struct subset_t));
parse_hsize_list(brace, &s->start);
while (*brace && *brace != ';')
@@ -383,7 +383,7 @@ parse_tuple(const char *start, int sep, char **cpy_out, unsigned *nelems, char *
/* create list
*/
- elems = (char **)HDmalloc(sizeof(char *) * (init_slots + 1));
+ elems = (char **)malloc(sizeof(char *) * (init_slots + 1));
if (elems == NULL) {
ret_value = FAIL;
goto done;
@@ -391,8 +391,8 @@ parse_tuple(const char *start, int sep, char **cpy_out, unsigned *nelems, char *
/* create destination string
*/
- start++; /* advance past opening paren '(' */
- cpy = (char *)HDmalloc(sizeof(char) * (HDstrlen(start))); /* no +1; less '(' */
+ start++; /* advance past opening paren '(' */
+ cpy = (char *)malloc(sizeof(char) * (HDstrlen(start))); /* no +1; less '(' */
if (cpy == NULL) {
ret_value = FAIL;
goto done;
@@ -508,8 +508,8 @@ indentation(unsigned x)
PRINTVALSTREAM(rawoutstream, " ");
}
else {
- HDfprintf(rawerrorstream, "error: the indentation exceeds the number of cols.\n");
- HDexit(1);
+ fprintf(rawerrorstream, "error: the indentation exceeds the number of cols.\n");
+ exit(1);
}
}
@@ -541,12 +541,12 @@ print_version(const char *progname)
static void
init_table(hid_t fid, table_t **tbl)
{
- table_t *table = (table_t *)HDmalloc(sizeof(table_t));
+ table_t *table = (table_t *)malloc(sizeof(table_t));
table->fid = fid;
table->size = 20;
table->nobjs = 0;
- table->objs = (obj_t *)HDmalloc(table->size * sizeof(obj_t));
+ table->objs = (obj_t *)malloc(table->size * sizeof(obj_t));
*tbl = table;
}
@@ -568,10 +568,10 @@ free_table(table_t *table)
/* Free the names for the objects in the table */
for (u = 0; u < table->nobjs; u++)
if (table->objs[u].objname)
- HDfree(table->objs[u].objname);
+ free(table->objs[u].objname);
- HDfree(table->objs);
- HDfree(table);
+ free(table->objs);
+ free(table);
}
#ifdef H5DUMP_DEBUG
@@ -701,7 +701,7 @@ find_objs_cb(const char *name, const H5O_info2_t *oinfo, const char *already_see
add_obj(info->type_table, &oinfo->token, name, TRUE);
else {
/* Use latest version of name */
- HDfree(found_obj->objname);
+ free(found_obj->objname);
found_obj->objname = HDstrdup(name);
/* Mark named datatype as having valid name */
@@ -780,14 +780,14 @@ add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, hbool
/* See if we need to make table larger */
if (table->nobjs == table->size) {
table->size *= 2;
- table->objs = (struct obj_t *)HDrealloc(table->objs, table->size * sizeof(table->objs[0]));
+ table->objs = (struct obj_t *)realloc(table->objs, table->size * sizeof(table->objs[0]));
} /* end if */
/* Increment number of objects in table */
u = table->nobjs++;
/* Set information about object */
- HDmemcpy(&table->objs[u].obj_token, obj_token, sizeof(H5O_token_t));
+ memcpy(&table->objs[u].obj_token, obj_token, sizeof(H5O_token_t));
table->objs[u].objname = HDstrdup(objname);
table->objs[u].recorded = record;
table->objs[u].displayed = 0;
@@ -870,7 +870,7 @@ H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t
H5TOOLS_GOTO_DONE(2);
/* trg_path must be freed out of this function when finished using */
- if ((link_info->trg_path = (char *)HDcalloc(link_info->linfo.u.val_size, sizeof(char))) == NULL) {
+ if ((link_info->trg_path = (char *)calloc(link_info->linfo.u.val_size, sizeof(char))) == NULL) {
if (link_info->opt.msg_mode == 1)
parallel_print("Warning: unable to allocate buffer for <%s>\n", linkpath);
H5TOOLS_GOTO_DONE(FAIL);
@@ -930,7 +930,7 @@ H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t
} /* end if */
/* set target obj type to return */
- HDmemcpy(&link_info->obj_token, &trg_oinfo.token, sizeof(H5O_token_t));
+ memcpy(&link_info->obj_token, &trg_oinfo.token, sizeof(H5O_token_t));
link_info->trg_type = trg_oinfo.type;
link_info->fileno = trg_oinfo.fileno;
} /* end if */
@@ -1053,9 +1053,9 @@ h5tools_parse_ros3_fapl_tuple(const char *tuple_str, int delim, H5FD_ros3_fapl_t
done:
if (s3cred)
- HDfree(s3cred);
+ free(s3cred);
if (s3cred_src)
- HDfree(s3cred_src);
+ free(s3cred_src);
return ret_value;
}
@@ -1130,19 +1130,19 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa, const char **values)
/* e.g.? if (!populate()) { then failed } */
if (show_progress) {
- HDprintf("called h5tools_populate_ros3_fapl\n");
+ printf("called h5tools_populate_ros3_fapl\n");
}
if (fa == NULL) {
if (show_progress) {
- HDprintf(" ERROR: null pointer to fapl_t\n");
+ printf(" ERROR: null pointer to fapl_t\n");
}
ret_value = 0;
goto done;
}
if (show_progress) {
- HDprintf(" preset fapl with default values\n");
+ printf(" preset fapl with default values\n");
}
fa->version = H5FD_CURR_ROS3_FAPL_T_VERSION;
fa->authenticate = FALSE;
@@ -1155,21 +1155,21 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa, const char **values)
if (values != NULL) {
if (values[0] == NULL) {
if (show_progress) {
- HDprintf(" ERROR: aws_region value cannot be NULL\n");
+ printf(" ERROR: aws_region value cannot be NULL\n");
}
ret_value = 0;
goto done;
}
if (values[1] == NULL) {
if (show_progress) {
- HDprintf(" ERROR: secret_id value cannot be NULL\n");
+ printf(" ERROR: secret_id value cannot be NULL\n");
}
ret_value = 0;
goto done;
}
if (values[2] == NULL) {
if (show_progress) {
- HDprintf(" ERROR: secret_key value cannot be NULL\n");
+ printf(" ERROR: secret_key value cannot be NULL\n");
}
ret_value = 0;
goto done;
@@ -1181,48 +1181,48 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa, const char **values)
if (*values[0] != '\0' && *values[1] != '\0') {
if (HDstrlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN) {
if (show_progress) {
- HDprintf(" ERROR: aws_region value too long\n");
+ printf(" ERROR: aws_region value too long\n");
}
ret_value = 0;
goto done;
}
- HDmemcpy(fa->aws_region, values[0], (HDstrlen(values[0]) + 1));
+ memcpy(fa->aws_region, values[0], (HDstrlen(values[0]) + 1));
if (show_progress) {
- HDprintf(" aws_region set\n");
+ printf(" aws_region set\n");
}
if (HDstrlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN) {
if (show_progress) {
- HDprintf(" ERROR: secret_id value too long\n");
+ printf(" ERROR: secret_id value too long\n");
}
ret_value = 0;
goto done;
}
- HDmemcpy(fa->secret_id, values[1], (HDstrlen(values[1]) + 1));
+ memcpy(fa->secret_id, values[1], (HDstrlen(values[1]) + 1));
if (show_progress) {
- HDprintf(" secret_id set\n");
+ printf(" secret_id set\n");
}
if (HDstrlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN) {
if (show_progress) {
- HDprintf(" ERROR: secret_key value too long\n");
+ printf(" ERROR: secret_key value too long\n");
}
ret_value = 0;
goto done;
}
- HDmemcpy(fa->secret_key, values[2], (HDstrlen(values[2]) + 1));
+ memcpy(fa->secret_key, values[2], (HDstrlen(values[2]) + 1));
if (show_progress) {
- HDprintf(" secret_key set\n");
+ printf(" secret_key set\n");
}
fa->authenticate = TRUE;
if (show_progress) {
- HDprintf(" set to authenticate\n");
+ printf(" set to authenticate\n");
}
}
else if (*values[0] != '\0' || *values[1] != '\0' || *values[2] != '\0') {
if (show_progress) {
- HDprintf(" ERROR: invalid assortment of empty/non-empty values\n");
+ printf(" ERROR: invalid assortment of empty/non-empty values\n");
}
ret_value = 0;
goto done;
@@ -1291,9 +1291,9 @@ h5tools_parse_hdfs_fapl_tuple(const char *tuple_str, int delim, H5FD_hdfs_fapl_t
done:
if (props)
- HDfree(props);
+ free(props);
if (props_src)
- HDfree(props_src);
+ free(props_src);
return ret_value;
}
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 564dcba..6b3ad0a 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -121,12 +121,12 @@ trav_token_add(trav_addr_t *visited, H5O_token_t *token, const char *path)
visited->nalloc = MAX(1, visited->nalloc * 2);
;
visited->objs =
- (trav_addr_path_t *)HDrealloc(visited->objs, visited->nalloc * sizeof(trav_addr_path_t));
+ (trav_addr_path_t *)realloc(visited->objs, visited->nalloc * sizeof(trav_addr_path_t));
} /* end if */
/* Append it */
idx = visited->nused++;
- HDmemcpy(&visited->objs[idx].token, token, sizeof(H5O_token_t));
+ memcpy(&visited->objs[idx].token, token, sizeof(H5O_token_t));
visited->objs[idx].path = HDstrdup(path);
} /* end trav_token_add() */
@@ -178,7 +178,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, void *_uda
size_t new_name_len = base_len + add_slash + HDstrlen(path) + 1 +
3; /* Extra "+3" to quiet GCC warning - 2019/07/05, QAK */
- if (NULL == (new_name = (char *)HDmalloc(new_name_len)))
+ if (NULL == (new_name = (char *)malloc(new_name_len)))
return (H5_ITER_ERROR);
if (add_slash)
HDsnprintf(new_name, new_name_len, "%s/%s", udata->base_grp_name, path);
@@ -196,7 +196,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, void *_uda
/* Get information about the object */
if (H5Oget_info_by_name3(loc_id, path, &oinfo, udata->fields, H5P_DEFAULT) < 0) {
if (new_name)
- HDfree(new_name);
+ free(new_name);
return (H5_ITER_ERROR);
} /* end if */
@@ -211,7 +211,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, void *_uda
if (udata->visitor->visit_obj)
if ((*udata->visitor->visit_obj)(full_name, &oinfo, already_visited, udata->visitor->udata) < 0) {
if (new_name)
- HDfree(new_name);
+ free(new_name);
return (H5_ITER_ERROR);
} /* end if */
} /* end if */
@@ -220,13 +220,13 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, void *_uda
if (udata->visitor->visit_lnk)
if ((*udata->visitor->visit_lnk)(full_name, linfo, udata->visitor->udata) < 0) {
if (new_name)
- HDfree(new_name);
+ free(new_name);
return (H5_ITER_ERROR);
} /* end if */
} /* end else */
if (new_name)
- HDfree(new_name);
+ free(new_name);
return (H5_ITER_CONT);
} /* end traverse_cb() */
@@ -296,8 +296,8 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start, hbool_t recur
/* Free paths to objects */
for (u = 0; u < seen.nused; u++)
- HDfree(seen.objs[u].path);
- HDfree(seen.objs);
+ free(seen.objs[u].path);
+ free(seen.objs);
} /* end if */
} /* end if */
@@ -323,7 +323,7 @@ trav_info_add(trav_info_t *info, const char *path, h5trav_type_t obj_type)
if (info->nused == info->nalloc) {
info->nalloc = MAX(1, info->nalloc * 2);
;
- info->paths = (trav_path_t *)HDrealloc(info->paths, info->nalloc * sizeof(trav_path_t));
+ info->paths = (trav_path_t *)realloc(info->paths, info->nalloc * sizeof(trav_path_t));
} /* end if */
/* Append it */
@@ -356,7 +356,7 @@ trav_fileinfo_add(trav_info_t *info, hid_t loc_id)
else
H5Oget_info3(loc_id, &oinfo, H5O_INFO_BASIC);
- HDmemcpy(&info->paths[idx].obj_token, &oinfo.token, sizeof(H5O_token_t));
+ memcpy(&info->paths[idx].obj_token, &oinfo.token, sizeof(H5O_token_t));
info->paths[idx].fileno = oinfo.fileno;
} /* end trav_fileinfo_add() */
@@ -383,7 +383,7 @@ trav_info_visit_obj(const char *path, const H5O_info2_t *oinfo, const char H5_AT
/* set object addr and fileno. These are for checking same object */
info_p = (trav_info_t *)udata;
idx = info_p->nused - 1;
- HDmemcpy(&info_p->paths[idx].obj_token, &oinfo->token, sizeof(H5O_token_t));
+ memcpy(&info_p->paths[idx].obj_token, &oinfo->token, sizeof(H5O_token_t));
info_p->paths[idx].fileno = oinfo->fileno;
return (0);
@@ -476,7 +476,7 @@ h5trav_getindex(const trav_info_t *info, const char *obj)
void
trav_info_init(const char *filename, hid_t fileid, trav_info_t **_info)
{
- trav_info_t *info = (trav_info_t *)HDmalloc(sizeof(trav_info_t));
+ trav_info_t *info = (trav_info_t *)malloc(sizeof(trav_info_t));
/* Init info structure */
info->nused = info->nalloc = 0;
@@ -507,16 +507,16 @@ trav_info_free(trav_info_t *info)
/* Free visited symbolic links path and file (if alloc) */
for (u = 0; u < info->symlink_visited.nused; u++) {
if (info->symlink_visited.objs[u].file)
- HDfree(info->symlink_visited.objs[u].file);
- HDfree(info->symlink_visited.objs[u].path);
+ free(info->symlink_visited.objs[u].file);
+ free(info->symlink_visited.objs[u].path);
}
- HDfree(info->symlink_visited.objs);
+ free(info->symlink_visited.objs);
/* Free path names */
for (u = 0; u < info->nused; u++)
- HDfree(info->paths[u].path);
- HDfree(info->paths);
- HDfree(info);
+ free(info->paths[u].path);
+ free(info->paths);
+ free(info);
} /* end if */
} /* end trav_info_free() */
@@ -655,12 +655,12 @@ trav_table_add(trav_table_t *table, const char *path, const H5O_info2_t *oinfo)
if (table) {
if (table->nobjs == table->size) {
table->size = MAX(1, table->size * 2);
- table->objs = (trav_obj_t *)HDrealloc(table->objs, table->size * sizeof(trav_obj_t));
+ table->objs = (trav_obj_t *)realloc(table->objs, table->size * sizeof(trav_obj_t));
} /* end if */
new_obj = table->nobjs++;
if (oinfo)
- HDmemcpy(&table->objs[new_obj].obj_token, &oinfo->token, sizeof(H5O_token_t));
+ memcpy(&table->objs[new_obj].obj_token, &oinfo->token, sizeof(H5O_token_t));
else
/* Set token to 'undefined' values */
table->objs[new_obj].obj_token = H5O_TOKEN_UNDEF;
@@ -702,7 +702,7 @@ trav_table_addlink(trav_table_t *table, const H5O_token_t *obj_token, const char
/* allocate space if necessary */
if (table->objs[i].nlinks == (unsigned)table->objs[i].sizelinks) {
table->objs[i].sizelinks = MAX(1, table->objs[i].sizelinks * 2);
- table->objs[i].links = (trav_link_t *)HDrealloc(
+ table->objs[i].links = (trav_link_t *)realloc(
table->objs[i].links, table->objs[i].sizelinks * sizeof(trav_link_t));
} /* end if */
@@ -732,7 +732,7 @@ trav_table_addflags(const unsigned *flags, char *name, h5trav_type_t type, trav_
if (table) {
if (table->nobjs == table->size) {
table->size = MAX(1, table->size * 2);
- table->objs = (trav_obj_t *)HDrealloc(table->objs, table->size * sizeof(trav_obj_t));
+ table->objs = (trav_obj_t *)realloc(table->objs, table->size * sizeof(trav_obj_t));
} /* end if */
new_obj = table->nobjs++;
@@ -762,7 +762,7 @@ trav_table_addflags(const unsigned *flags, char *name, h5trav_type_t type, trav_
void
trav_table_init(hid_t fid, trav_table_t **tbl)
{
- trav_table_t *table = (trav_table_t *)HDmalloc(sizeof(trav_table_t));
+ trav_table_t *table = (trav_table_t *)malloc(sizeof(trav_table_t));
if (table) {
table->fid = fid;
table->size = 0;
@@ -788,19 +788,19 @@ trav_table_free(trav_table_t *table)
unsigned int i;
for (i = 0; i < table->nobjs; i++) {
- HDfree(table->objs[i].name);
+ free(table->objs[i].name);
if (table->objs[i].nlinks) {
unsigned int j;
for (j = 0; j < table->objs[i].nlinks; j++)
- HDfree(table->objs[i].links[j].new_name);
+ free(table->objs[i].links[j].new_name);
- HDfree(table->objs[i].links);
+ free(table->objs[i].links);
} /* end if */
} /* end for */
- HDfree(table->objs);
+ free(table->objs);
} /* end if */
- HDfree(table);
+ free(table);
}
}
@@ -816,14 +816,14 @@ trav_attr(hid_t
const char *buf = op_data->path;
if ((strlen(buf) == 1) && (*buf == '/'))
- HDprintf(" %-10s %s%s", "attribute", buf, attr_name);
+ printf(" %-10s %s%s", "attribute", buf, attr_name);
else
- HDprintf(" %-10s %s/%s", "attribute", buf, attr_name);
+ printf(" %-10s %s/%s", "attribute", buf, attr_name);
#ifdef H5TRAV_PRINT_SPACE
if (trav_verbosity < 2) {
#endif
- HDprintf("\n");
+ printf("\n");
#ifdef H5TRAV_PRINT_SPACE
}
else {
@@ -843,26 +843,26 @@ trav_attr(hid_t
switch (space_type) {
case H5S_SCALAR:
/* scalar dataspace */
- HDprintf(" scalar\n");
+ printf(" scalar\n");
break;
case H5S_SIMPLE:
/* simple dataspace */
- HDprintf(" {");
+ printf(" {");
for (i = 0; i < ndims; i++) {
- HDprintf("%s%" PRIuHSIZE, i ? ", " : "", size[i]);
+ printf("%s%" PRIuHSIZE, i ? ", " : "", size[i]);
}
- HDprintf("}\n");
+ printf("}\n");
break;
case H5S_NULL:
/* null dataspace */
- HDprintf(" null\n");
+ printf(" null\n");
break;
default:
/* Unknown dataspace type */
- HDprintf(" unknown\n");
+ printf(" unknown\n");
break;
} /* end switch */
@@ -894,22 +894,22 @@ trav_print_visit_obj(const char *path, const H5O_info2_t *oinfo, const char *alr
*/
switch (oinfo->type) {
case H5O_TYPE_GROUP:
- HDprintf(" %-10s %s", "group", path);
+ printf(" %-10s %s", "group", path);
break;
case H5O_TYPE_DATASET:
- HDprintf(" %-10s %s", "dataset", path);
+ printf(" %-10s %s", "dataset", path);
break;
case H5O_TYPE_NAMED_DATATYPE:
- HDprintf(" %-10s %s", "datatype", path);
+ printf(" %-10s %s", "datatype", path);
break;
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
- HDprintf(" %-10s %s", "unknown object type", path);
+ printf(" %-10s %s", "unknown object type", path);
break;
} /* end switch */
@@ -919,14 +919,14 @@ trav_print_visit_obj(const char *path, const H5O_info2_t *oinfo, const char *alr
op_data.path = path;
/* Finish printing line about object */
- HDprintf("\n");
+ printf("\n");
if (trav_verbosity > 0)
H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order, NULL, trav_attr,
&op_data, H5P_DEFAULT);
}
else
/* Print the link's original name */
- HDprintf(" -> %s\n", already_visited);
+ printf(" -> %s\n", already_visited);
return (0);
} /* end trav_print_visit_obj() */
@@ -949,16 +949,16 @@ trav_print_visit_lnk(const char *path, const H5L_info2_t *linfo, void *udata)
switch (linfo->type) {
case H5L_TYPE_SOFT:
if (linfo->u.val_size > 0) {
- char *targbuf = (char *)HDmalloc(linfo->u.val_size + 1);
+ char *targbuf = (char *)malloc(linfo->u.val_size + 1);
if (targbuf) {
if (H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0)
targbuf[0] = 0;
- HDprintf(" %-10s %s -> %s\n", "link", path, targbuf);
- HDfree(targbuf);
+ printf(" %-10s %s -> %s\n", "link", path, targbuf);
+ free(targbuf);
}
} /* end if */
else
- HDprintf(" %-10s %s ->\n", "link", path);
+ printf(" %-10s %s ->\n", "link", path);
break;
case H5L_TYPE_EXTERNAL:
@@ -967,17 +967,17 @@ trav_print_visit_lnk(const char *path, const H5L_info2_t *linfo, void *udata)
const char *filename = NULL;
const char *objname = NULL;
- targbuf = (char *)HDmalloc(linfo->u.val_size + 1);
+ targbuf = (char *)malloc(linfo->u.val_size + 1);
if (targbuf) {
if (H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0)
targbuf[0] = 0;
if (H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL, &filename, &objname) >= 0)
- HDprintf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname);
- HDfree(targbuf);
+ printf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname);
+ free(targbuf);
}
} /* end if */
else
- HDprintf(" %-10s %s ->\n", "ext link", path);
+ printf(" %-10s %s ->\n", "ext link", path);
break;
case H5L_TYPE_HARD:
@@ -987,7 +987,7 @@ trav_print_visit_lnk(const char *path, const H5L_info2_t *linfo, void *udata)
case H5L_TYPE_ERROR:
case H5L_TYPE_MAX:
default:
- HDprintf(" %-10s %s -> ???\n", "unknown type of UD link", path);
+ printf(" %-10s %s -> ???\n", "unknown type of UD link", path);
break;
} /* end switch() */
@@ -1075,7 +1075,7 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
void *tmp_ptr;
visited->nalloc = MAX(1, visited->nalloc * 2);
- if (NULL == (tmp_ptr = HDrealloc(visited->objs, visited->nalloc * sizeof(symlink_trav_path_t))))
+ if (NULL == (tmp_ptr = realloc(visited->objs, visited->nalloc * sizeof(symlink_trav_path_t))))
H5TOOLS_GOTO_ERROR(FAIL, "visited data structure realloc failed");
visited->objs = (symlink_trav_path_t *)tmp_ptr;
} /* end if */
@@ -1097,7 +1097,7 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
if (NULL == (visited->objs[idx].path = HDstrdup(path))) {
visited->nused--;
if (visited->objs[idx].file)
- HDfree(visited->objs[idx].file);
+ free(visited->objs[idx].file);
H5TOOLS_GOTO_ERROR(FAIL, "visited data structure path allocation failed");
} /* end if */
diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c
index 49a4a20..455e28a 100644
--- a/tools/lib/io_timer.c
+++ b/tools/lib/io_timer.c
@@ -61,7 +61,7 @@ sub_time(struct timeval *a, struct timeval *b)
io_time_t *
io_time_new(clock_type type)
{
- io_time_t *pt = (io_time_t *)HDcalloc(1, sizeof(struct io_time_t));
+ io_time_t *pt = (io_time_t *)calloc(1, sizeof(struct io_time_t));
/* set global timer variable */
timer_g = pt;
@@ -81,7 +81,7 @@ io_time_new(clock_type type)
void
io_time_destroy(io_time_t *pt)
{
- HDfree(pt);
+ free(pt);
/* reset the global timer pointer too. */
timer_g = NULL;
}
@@ -125,7 +125,7 @@ io_time_t *
io_time_set(io_time_t *pt, timer_type t, int start_stop)
{
/* sanity check */
- HDassert(pt);
+ assert(pt);
switch (pt->type) {
#ifdef H5_HAVE_PARALLEL
@@ -158,7 +158,7 @@ io_time_set(io_time_t *pt, timer_type t, int start_stop)
break;
#else
case MPI_CLOCK:
- HDfprintf(stderr, "MPI clock set in serial library\n");
+ fprintf(stderr, "MPI clock set in serial library\n");
return NULL;
#endif /* H5_HAVE_PARALLEL */
case SYS_CLOCK:
@@ -192,7 +192,7 @@ io_time_set(io_time_t *pt, timer_type t, int start_stop)
break;
default:
- HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
+ fprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
return NULL;
} /* end switch */
@@ -214,7 +214,7 @@ H5_ATTR_PURE double
io_time_get(io_time_t *pt, timer_type t)
{
/* sanity check */
- HDassert(pt);
+ assert(pt);
return pt->total_time[t];
}
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index f060e2c..7f49f97 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -100,7 +100,7 @@ H5_GCC_CLANG_DIAG_OFF("format")
*/
#define JSFAILED_AT() \
{ \
- HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
+ printf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
}
/*----------------------------------------------------------------------------
@@ -189,10 +189,10 @@ H5_GCC_CLANG_DIAG_OFF("format")
{ \
JSFAILED_AT() \
if (reason != NULL) { \
- HDprintf("%s\n", (reason)); \
+ printf("%s\n", (reason)); \
} \
else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
+ printf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
} \
}
@@ -228,10 +228,10 @@ H5_GCC_CLANG_DIAG_OFF("format")
{ \
JSFAILED_AT() \
if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
+ printf("%s\n", (reason)); \
} \
else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
+ printf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
} \
}
@@ -532,11 +532,11 @@ test_parse_tuple(void)
/* SETUP
*/
- HDassert(parsed == NULL);
- HDassert(cpy == NULL);
+ assert(parsed == NULL);
+ assert(cpy == NULL);
tc = cases[i];
if (show_progress == TRUE) {
- HDprintf("testing %d: %s...\n", i, tc.test_msg);
+ printf("testing %d: %s...\n", i, tc.test_msg);
}
/* VERIFY
@@ -551,11 +551,11 @@ test_parse_tuple(void)
JSVERIFY_STR(tc.exp_elems[elem_i], parsed[elem_i], NULL)
}
/* TEARDOWN */
- HDassert(parsed != NULL);
- HDassert(cpy != NULL);
- HDfree(parsed);
+ assert(parsed != NULL);
+ assert(cpy != NULL);
+ free(parsed);
parsed = NULL;
- HDfree(cpy);
+ free(cpy);
cpy = NULL;
}
else {
@@ -573,9 +573,9 @@ error:
***********/
if (parsed != NULL)
- HDfree(parsed);
+ free(parsed);
if (cpy != NULL)
- HDfree(cpy);
+ free(cpy);
return 1;
@@ -616,14 +616,14 @@ test_populate_ros3_fa(void)
#ifndef H5_HAVE_ROS3_VFD
HDputs(" -SKIP-");
HDputs(" Read-Only S3 VFD not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
#if H5TOOLS_UTILS_TEST_DEBUG > 0
show_progress = TRUE;
#endif /* H5TOOLS_UTILS_TEST_DEBUG */
- HDassert(bad_version != H5FD_CURR_ROS3_FAPL_T_VERSION);
+ assert(bad_version != H5FD_CURR_ROS3_FAPL_T_VERSION);
/*********
* TESTS *
@@ -635,7 +635,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "y", "z"};
if (show_progress) {
- HDprintf("NULL fapl pointer\n");
+ printf("NULL fapl pointer\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(NULL, values), "fapl pointer cannot be null")
@@ -647,7 +647,7 @@ test_populate_ros3_fa(void)
H5FD_ros3_fapl_t fa = {bad_version, TRUE, "u", "v", "w"};
if (show_progress) {
- HDprintf("NULL values pointer\n");
+ printf("NULL values pointer\n");
}
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, NULL), "NULL values pointer yields \"default\" fapl")
@@ -666,7 +666,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"", "", ""};
if (show_progress) {
- HDprintf("all empty values\n");
+ printf("all empty values\n");
}
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "empty values yields \"default\" fapl")
@@ -685,7 +685,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "y", "z", "a"};
if (show_progress) {
- HDprintf("successful full set\n");
+ printf("successful full set\n");
}
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "four values")
@@ -704,7 +704,7 @@ test_populate_ros3_fa(void)
const char *values[] = {NULL, "y", "z", NULL};
if (show_progress) {
- HDprintf("NULL region\n");
+ printf("NULL region\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -723,7 +723,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"", "y", "z", NULL};
if (show_progress) {
- HDprintf("empty region; non-empty id, key\n");
+ printf("empty region; non-empty id, key\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -744,10 +744,10 @@ test_populate_ros3_fa(void)
"y", "z"};
if (show_progress) {
- HDprintf("region overflow\n");
+ printf("region overflow\n");
}
- HDassert(HDstrlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN);
+ assert(HDstrlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN);
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.version, NULL)
@@ -765,7 +765,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", NULL, "z", NULL};
if (show_progress) {
- HDprintf("NULL id\n");
+ printf("NULL id\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -784,7 +784,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "", "z", NULL};
if (show_progress) {
- HDprintf("empty id; non-empty region and key\n");
+ printf("empty id; non-empty region and key\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -814,10 +814,10 @@ test_populate_ros3_fa(void)
"z"};
if (show_progress) {
- HDprintf("id overflow\n");
+ printf("id overflow\n");
}
- HDassert(HDstrlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN);
+ assert(HDstrlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN);
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.version, NULL)
@@ -835,7 +835,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "y", NULL, NULL};
if (show_progress) {
- HDprintf("NULL key\n");
+ printf("NULL key\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -854,7 +854,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "y", "", NULL};
if (show_progress) {
- HDprintf("empty key; non-empty region and id\n");
+ printf("empty key; non-empty region and id\n");
}
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -873,7 +873,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"", "y", "", NULL};
if (show_progress) {
- HDprintf("empty key and region; non-empty id\n");
+ printf("empty key and region; non-empty id\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -892,7 +892,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "", "", NULL};
if (show_progress) {
- HDprintf("empty key and id; non-empty region\n");
+ printf("empty key and id; non-empty region\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -921,10 +921,10 @@ test_populate_ros3_fa(void)
"Can you separate the various parts of the problem?"};
if (show_progress) {
- HDprintf("key overflow\n");
+ printf("key overflow\n");
}
- HDassert(HDstrlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN);
+ assert(HDstrlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN);
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.version, NULL)
@@ -1134,7 +1134,7 @@ test_set_configured_fapl(void)
fapl_id = H5I_INVALID_HID;
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "setup test %d\t%s\n", i, C.message);
+ fprintf(stderr, "setup test %d\t%s\n", i, C.message);
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1148,7 +1148,7 @@ test_set_configured_fapl(void)
}
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "before test\n");
+ fprintf(stderr, "before test\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1165,7 +1165,7 @@ test_set_configured_fapl(void)
}
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "after test\n");
+ fprintf(stderr, "after test\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1176,13 +1176,13 @@ test_set_configured_fapl(void)
fapl_id = H5I_INVALID_HID;
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "after cleanup\n");
+ fprintf(stderr, "after cleanup\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
}
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "after loop\n");
+ fprintf(stderr, "after loop\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1195,7 +1195,7 @@ error:
***********/
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "ERROR\n");
+ fprintf(stderr, "ERROR\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1234,18 +1234,18 @@ main(void)
h5reset(); /* h5test? */
#endif /* _H5TEST_ */
- HDfprintf(stdout, "Testing h5tools_utils corpus.\n");
+ fprintf(stdout, "Testing h5tools_utils corpus.\n");
nerrors += test_parse_tuple();
nerrors += test_populate_ros3_fa();
nerrors += test_set_configured_fapl();
if (nerrors > 0) {
- HDfprintf(stdout, "***** %d h5tools_utils TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ fprintf(stdout, "***** %d h5tools_utils TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
nerrors = 1;
}
else {
- HDfprintf(stdout, "All h5tools_utils tests passed\n");
+ fprintf(stdout, "All h5tools_utils tests passed\n");
}
return (int)nerrors;
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 9756d11..2deba02 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -52,18 +52,18 @@ static void
leave(int ret)
{
if (fname_src)
- HDfree(fname_src);
+ free(fname_src);
if (fname_dst)
- HDfree(fname_dst);
+ free(fname_dst);
if (oname_dst)
- HDfree(oname_dst);
+ free(oname_dst);
if (oname_src)
- HDfree(oname_src);
+ free(oname_src);
if (str_flag)
- HDfree(str_flag);
+ free(str_flag);
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -226,7 +226,7 @@ main(int argc, char *argv[])
h5tools_init();
/* init linkinfo struct */
- HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t));
+ memset(&linkinfo, 0, sizeof(h5tool_link_info_t));
/* Check for no command line parameters */
if (argc == 1) {
@@ -282,7 +282,7 @@ main(int argc, char *argv[])
case 'E':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
@@ -369,10 +369,10 @@ main(int argc, char *argv[])
*-------------------------------------------------------------------------*/
if (verbose) {
- HDprintf("Copying file <%s> and object <%s> to file <%s> and object <%s>\n", fname_src, oname_src,
- fname_dst, oname_dst);
+ printf("Copying file <%s> and object <%s> to file <%s> and object <%s>\n", fname_src, oname_src,
+ fname_dst, oname_dst);
if (flag) {
- HDprintf("Using %s flag\n", str_flag);
+ printf("Using %s flag\n", str_flag);
}
}
@@ -406,7 +406,7 @@ main(int argc, char *argv[])
/* Display some output if requested */
if (verbose)
- HDprintf("%s: Creating parent groups\n", h5tools_getprogname());
+ printf("%s: Creating parent groups\n", h5tools_getprogname());
} /* end if */
else {
/* error, if parent groups doesn't already exist in destination file */
@@ -419,15 +419,15 @@ main(int argc, char *argv[])
if ('/' == oname_dst[i]) {
char *str_ptr;
- str_ptr = (char *)HDcalloc(i + 1, sizeof(char));
+ str_ptr = (char *)calloc(i + 1, sizeof(char));
HDstrncpy(str_ptr, oname_dst, i);
str_ptr[i] = '\0';
if (H5Lexists(fid_dst, str_ptr, H5P_DEFAULT) <= 0) {
error_msg("group <%s> doesn't exist. Use -p to create parent groups.\n", str_ptr);
- HDfree(str_ptr);
+ free(str_ptr);
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, "H5Lexists failed");
}
- HDfree(str_ptr);
+ free(str_ptr);
}
}
}
@@ -458,7 +458,7 @@ main(int argc, char *argv[])
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ free(linkinfo.trg_path);
/* close propertis */
if (H5Pclose(ocpl_id) < 0)
@@ -475,11 +475,11 @@ main(int argc, char *argv[])
leave(EXIT_SUCCESS);
done:
- HDprintf("Error in copy...Exiting\n");
+ printf("Error in copy...Exiting\n");
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ free(linkinfo.trg_path);
H5E_BEGIN_TRY
{
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index a2fe5d9..51bc050 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -95,11 +95,11 @@ check_options(diff_opt_t *opts)
* These options are mutually exclusive.
*/
if ((opts->delta_bool + opts->percent_bool + opts->use_system_epsilon) > 1) {
- HDprintf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME);
- HDprintf("use no more than one.\n");
- HDprintf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 "
- "Reference Manual'.\n",
- PROGRAMNAME);
+ printf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME);
+ printf("use no more than one.\n");
+ printf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 "
+ "Reference Manual'.\n",
+ PROGRAMNAME);
h5diff_exit(EXIT_FAILURE);
}
}
@@ -122,7 +122,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
H5TOOLS_START_DEBUG(" ");
/* process the command-line */
- HDmemset(opts, 0, sizeof(diff_opt_t));
+ memset(opts, 0, sizeof(diff_opt_t));
/* assume equal contents initially */
opts->contents = 1;
@@ -181,7 +181,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
}
else {
if (H5_optarg != NULL)
- opts->mode_verbose_level = HDatoi(H5_optarg);
+ opts->mode_verbose_level = atoi(H5_optarg);
else
opts->mode_verbose_level = 0;
}
@@ -207,7 +207,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case 'S':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
@@ -216,9 +216,9 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
opts->exclude_path = 1;
/* create linked list of excluding objects */
- if ((exclude_node = (struct exclude_path_list *)HDmalloc(sizeof(struct exclude_path_list))) ==
+ if ((exclude_node = (struct exclude_path_list *)malloc(sizeof(struct exclude_path_list))) ==
NULL) {
- HDprintf("Error: lack of memory!\n");
+ printf("Error: lack of memory!\n");
h5diff_exit(EXIT_FAILURE);
}
@@ -249,8 +249,8 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
/* create linked list of excluding objects */
if ((exclude_attr_node =
- (struct exclude_path_list *)HDmalloc(sizeof(struct exclude_path_list))) == NULL) {
- HDprintf("Error: lack of memory!\n");
+ (struct exclude_path_list *)malloc(sizeof(struct exclude_path_list))) == NULL) {
+ printf("Error: lack of memory!\n");
h5diff_exit(EXIT_FAILURE);
}
@@ -276,7 +276,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
opts->delta_bool = 1;
if (check_d_input(H5_optarg) == -1) {
- HDprintf("<-d %s> is not a valid option\n", H5_optarg);
+ printf("<-d %s> is not a valid option\n", H5_optarg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -287,7 +287,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case 'p':
opts->percent_bool = 1;
if (check_p_input(H5_optarg) == -1) {
- HDprintf("<-p %s> is not a valid option\n", H5_optarg);
+ printf("<-p %s> is not a valid option\n", H5_optarg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -301,7 +301,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case 'n':
opts->count_bool = 1;
if (check_n_input(H5_optarg) == -1) {
- HDprintf("<-n %s> is not a valid option\n", H5_optarg);
+ printf("<-n %s> is not a valid option\n", H5_optarg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -322,7 +322,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '1':
opts->vol_info[0].type = VOL_BY_VALUE;
- opts->vol_info[0].u.value = (H5VL_class_value_t)HDatoi(H5_optarg);
+ opts->vol_info[0].u.value = (H5VL_class_value_t)atoi(H5_optarg);
opts->custom_vol[0] = TRUE;
break;
@@ -338,7 +338,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '4':
opts->vol_info[1].type = VOL_BY_VALUE;
- opts->vol_info[1].u.value = (H5VL_class_value_t)HDatoi(H5_optarg);
+ opts->vol_info[1].u.value = (H5VL_class_value_t)atoi(H5_optarg);
opts->custom_vol[1] = TRUE;
break;
@@ -354,7 +354,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '7':
opts->vfd_info[0].type = VFD_BY_VALUE;
- opts->vfd_info[0].u.value = (H5FD_class_value_t)HDatoi(H5_optarg);
+ opts->vfd_info[0].u.value = (H5FD_class_value_t)atoi(H5_optarg);
opts->custom_vfd[0] = TRUE;
break;
@@ -370,7 +370,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '0':
opts->vfd_info[1].type = VFD_BY_VALUE;
- opts->vfd_info[1].u.value = (H5FD_class_value_t)HDatoi(H5_optarg);
+ opts->vfd_info[1].u.value = (H5FD_class_value_t)atoi(H5_optarg);
opts->custom_vfd[1] = TRUE;
break;
@@ -392,7 +392,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
errno = 0;
onion_fa_g_1.revision_num = HDstrtoull(opts->vfd_info[0].info, NULL, 10);
if (errno == ERANGE) {
- HDprintf("Invalid onion revision specified for file 1\n");
+ printf("Invalid onion revision specified for file 1\n");
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -409,7 +409,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
errno = 0;
onion_fa_g_2.revision_num = HDstrtoull(opts->vfd_info[1].info, NULL, 10);
if (errno == ERANGE) {
- HDprintf("Invalid onion revision specified for file 2\n");
+ printf("Invalid onion revision specified for file 2\n");
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -480,20 +480,20 @@ print_info(diff_opt_t *opts)
return;
if (opts->cmn_objs == 0) {
- HDprintf("No common objects found. Files are not comparable.\n");
+ printf("No common objects found. Files are not comparable.\n");
if (!opts->mode_verbose)
- HDprintf("Use -v for a list of objects.\n");
+ printf("Use -v for a list of objects.\n");
}
if (opts->not_cmp == 1) {
if (opts->mode_list_not_cmp == 0) {
- HDprintf("--------------------------------\n");
- HDprintf("Some objects are not comparable\n");
- HDprintf("--------------------------------\n");
+ printf("--------------------------------\n");
+ printf("Some objects are not comparable\n");
+ printf("--------------------------------\n");
if (opts->mode_verbose)
- HDprintf("Use -c for a list of objects without details of differences.\n");
+ printf("Use -c for a list of objects without details of differences.\n");
else
- HDprintf("Use -c for a list of objects.\n");
+ printf("Use -c for a list of objects.\n");
}
}
}
diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c
index 561f139..f2ab2f9 100644
--- a/tools/src/h5diff/h5diff_main.c
+++ b/tools/src/h5diff/h5diff_main.c
@@ -89,15 +89,15 @@ main(int argc, char *argv[])
for (i = 0; i < 2; i++) {
if (opts.sset[i]) {
if (opts.sset[i]->start.data)
- HDfree(opts.sset[i]->start.data);
+ free(opts.sset[i]->start.data);
if (opts.sset[i]->stride.data)
- HDfree(opts.sset[i]->stride.data);
+ free(opts.sset[i]->stride.data);
if (opts.sset[i]->count.data)
- HDfree(opts.sset[i]->count.data);
+ free(opts.sset[i]->count.data);
if (opts.sset[i]->block.data)
- HDfree(opts.sset[i]->block.data);
+ free(opts.sset[i]->block.data);
- HDfree(opts.sset[i]);
+ free(opts.sset[i]);
opts.sset[i] = NULL;
}
}
@@ -124,5 +124,5 @@ h5diff_exit(int status)
{
h5tools_close();
- HDexit(status);
+ exit(status);
}
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 64b1f28..82cb876 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -67,7 +67,7 @@ main(int argc, char *argv[])
MPI_Comm_size(MPI_COMM_WORLD, &g_nTasks);
if (g_nTasks == 1) {
- HDprintf("Only 1 task available...doing serial diff\n");
+ printf("Only 1 task available...doing serial diff\n");
g_Parallel = 0;
@@ -141,11 +141,11 @@ ph5diff_worker(int nID)
{
/* Open the files */
if ((file1_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
- HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]);
+ printf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]);
MPI_Abort(MPI_COMM_WORLD, 0);
}
if ((file2_id = H5Fopen(filenames[1], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
- HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]);
+ printf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]);
MPI_Abort(MPI_COMM_WORLD, 0);
}
/* enable error reporting */
@@ -160,7 +160,7 @@ ph5diff_worker(int nID)
/* Make certain we've received the filenames and opened the files already */
if (file1_id < 0 || file2_id < 0) {
- HDprintf("ph5diff_worker: ERROR: work received before/without filenames\n");
+ printf("ph5diff_worker: ERROR: work received before/without filenames\n");
break;
}
@@ -188,7 +188,7 @@ ph5diff_worker(int nID)
char out_data[PRINT_DATA_MAX_SIZE];
int tmp;
- HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE);
+ memset(out_data, 0, PRINT_DATA_MAX_SIZE);
i = 0;
rewind(overflow_file);
@@ -198,7 +198,7 @@ ph5diff_worker(int nID)
MPI_Send(out_data, PRINT_DATA_MAX_SIZE, MPI_BYTE, 0, MPI_TAG_PRINT_DATA,
MPI_COMM_WORLD);
i = 0;
- HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE);
+ memset(out_data, 0, PRINT_DATA_MAX_SIZE);
}
}
@@ -210,8 +210,8 @@ ph5diff_worker(int nID)
overflow_file = NULL;
}
- HDfflush(stdout);
- HDmemset(outBuff, 0, OUTBUFF_SIZE);
+ fflush(stdout);
+ memset(outBuff, 0, OUTBUFF_SIZE);
outBuffOffset = 0;
MPI_Send(&diffs, sizeof(diffs), MPI_BYTE, 0, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD);
@@ -225,7 +225,7 @@ ph5diff_worker(int nID)
break;
}
else {
- HDprintf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG);
+ printf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG);
break;
}
}
@@ -252,7 +252,7 @@ print_manager_output(void)
{
/* If there was something we buffered, let's print it now */
if ((outBuffOffset > 0) && g_Parallel) {
- HDprintf("%s", outBuff);
+ printf("%s", outBuff);
if (overflow_file) {
int tmp;
@@ -263,12 +263,12 @@ print_manager_output(void)
overflow_file = NULL;
}
- HDfflush(stdout);
- HDmemset(outBuff, 0, OUTBUFF_SIZE);
+ fflush(stdout);
+ memset(outBuff, 0, OUTBUFF_SIZE);
outBuffOffset = 0;
}
else if ((outBuffOffset > 0) && !g_Parallel) {
- HDfprintf(stderr, "h5diff error: outBuffOffset>0, but we're not in parallel!\n");
+ fprintf(stderr, "h5diff error: outBuffOffset>0, but we're not in parallel!\n");
}
}
@@ -303,5 +303,5 @@ h5diff_exit(int status)
/* Always exit(0), since MPI implementations do weird stuff when they
* receive a non-zero exit value. - QAK
*/
- HDexit(status);
+ exit(status);
}
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 2a5eeb7..73309cd 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -159,7 +159,7 @@ leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -408,7 +408,7 @@ table_list_add(hid_t oid, unsigned long file_no)
h5dump_table_items_t *tmp_ptr;
table_list.nalloc = MAX(1, table_list.nalloc * 2);
- if (NULL == (tmp_ptr = (h5dump_table_items_t *)HDrealloc(
+ if (NULL == (tmp_ptr = (h5dump_table_items_t *)realloc(
table_list.tables, table_list.nalloc * sizeof(table_list.tables[0]))))
return -1;
table_list.tables = tmp_ptr;
@@ -485,7 +485,7 @@ table_list_free(void)
}
/* Free the table list */
- HDfree(table_list.tables);
+ free(table_list.tables);
table_list.tables = NULL;
table_list.nalloc = table_list.nused = 0;
} /* end table_list_free() */
@@ -587,7 +587,7 @@ parse_mask_list(const char *h_list)
/* sanity check */
if (h_list) {
- HDmemset(packed_mask, 0, sizeof(packed_mask));
+ memset(packed_mask, 0, sizeof(packed_mask));
packed_bits_num = 0;
/* scan in pair of offset,length separated by commas. */
@@ -598,7 +598,7 @@ parse_mask_list(const char *h_list)
error_msg("Bad mask list(%s)\n", h_list);
return FAIL;
}
- soffset_value = HDatoi(ptr);
+ soffset_value = atoi(ptr);
offset_value = (unsigned)soffset_value;
if (soffset_value < 0 || offset_value >= PACKED_BITS_SIZE_MAX) {
error_msg("Packed Bit offset value(%d) must be between 0 and %u\n", soffset_value,
@@ -620,7 +620,7 @@ parse_mask_list(const char *h_list)
error_msg("Bad mask list(%s)\n", h_list);
return FAIL;
}
- slength_value = HDatoi(ptr);
+ slength_value = atoi(ptr);
if (slength_value <= 0) {
error_msg("Packed Bit length value(%d) must be positive.\n", slength_value);
return FAIL;
@@ -700,26 +700,26 @@ free_handler(struct handler_t *hand, int len)
if (hand) {
for (i = 0; i < len; i++) {
if (hand[i].obj) {
- HDfree(hand[i].obj);
+ free(hand[i].obj);
hand[i].obj = NULL;
}
if (hand[i].subset_info) {
if (hand[i].subset_info->start.data)
- HDfree(hand[i].subset_info->start.data);
+ free(hand[i].subset_info->start.data);
if (hand[i].subset_info->stride.data)
- HDfree(hand[i].subset_info->stride.data);
+ free(hand[i].subset_info->stride.data);
if (hand[i].subset_info->count.data)
- HDfree(hand[i].subset_info->count.data);
+ free(hand[i].subset_info->count.data);
if (hand[i].subset_info->block.data)
- HDfree(hand[i].subset_info->block.data);
+ free(hand[i].subset_info->block.data);
- HDfree(hand[i].subset_info);
+ free(hand[i].subset_info);
hand[i].subset_info = NULL;
}
}
- HDfree(hand);
+ free(hand);
}
}
@@ -750,7 +750,7 @@ parse_command_line(int argc, const char *const *argv)
}
/* this will be plenty big enough to hold the info */
- if ((hand = (struct handler_t *)HDcalloc((size_t)argc, sizeof(struct handler_t))) == NULL) {
+ if ((hand = (struct handler_t *)calloc((size_t)argc, sizeof(struct handler_t))) == NULL) {
goto error;
}
@@ -770,7 +770,7 @@ parse_start:
dump_opts.display_fi = TRUE;
last_was_dset = FALSE;
if (H5_optarg != NULL)
- h5trav_set_verbose(HDatoi(H5_optarg));
+ h5trav_set_verbose(atoi(H5_optarg));
break;
case 'p':
dump_opts.display_dcpl = TRUE;
@@ -788,7 +788,7 @@ parse_start:
break;
case 'A':
if (H5_optarg != NULL) {
- if (0 == HDatoi(H5_optarg))
+ if (0 == atoi(H5_optarg))
dump_opts.include_attrs = FALSE;
}
else {
@@ -812,7 +812,7 @@ parse_start:
goto done;
break;
case 'w': {
- int sh5tools_nCols = HDatoi(H5_optarg);
+ int sh5tools_nCols = atoi(H5_optarg);
if (sh5tools_nCols <= 0)
h5tools_nCols = 65535;
@@ -998,7 +998,7 @@ parse_start:
dump_opts.display_vds_first = TRUE;
break;
case 'G':
- dump_opts.vds_gap_size = HDatoi(H5_optarg);
+ dump_opts.vds_gap_size = atoi(H5_optarg);
if (dump_opts.vds_gap_size < 0) {
usage(h5tools_getprogname());
goto error;
@@ -1070,7 +1070,7 @@ parse_start:
s = last_dset->subset_info;
}
else {
- last_dset->subset_info = s = (struct subset_t *)HDcalloc(1, sizeof(struct subset_t));
+ last_dset->subset_info = s = (struct subset_t *)calloc(1, sizeof(struct subset_t));
}
/*
@@ -1088,28 +1088,28 @@ parse_start:
switch ((char)opt) {
case 's':
if (s->start.data) {
- HDfree(s->start.data);
+ free(s->start.data);
s->start.data = NULL;
}
parse_hsize_list(H5_optarg, &s->start);
break;
case 'S':
if (s->stride.data) {
- HDfree(s->stride.data);
+ free(s->stride.data);
s->stride.data = NULL;
}
parse_hsize_list(H5_optarg, &s->stride);
break;
case 'c':
if (s->count.data) {
- HDfree(s->count.data);
+ free(s->count.data);
s->count.data = NULL;
}
parse_hsize_list(H5_optarg, &s->count);
break;
case 'k':
if (s->block.data) {
- HDfree(s->block.data);
+ free(s->block.data);
s->block.data = NULL;
}
parse_hsize_list(H5_optarg, &s->block);
@@ -1131,7 +1131,7 @@ end_collect:
case 'E':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
@@ -1185,7 +1185,7 @@ end_collect:
case '1':
vol_info_g.type = VOL_BY_VALUE;
- vol_info_g.u.value = (H5VL_class_value_t)HDatoi(H5_optarg);
+ vol_info_g.u.value = (H5VL_class_value_t)atoi(H5_optarg);
use_custom_vol_g = TRUE;
break;
@@ -1201,7 +1201,7 @@ end_collect:
case '4':
vfd_info_g.type = VFD_BY_VALUE;
- vfd_info_g.u.value = (H5FD_class_value_t)HDatoi(H5_optarg);
+ vfd_info_g.u.value = (H5FD_class_value_t)atoi(H5_optarg);
use_custom_vfd_g = TRUE;
break;
@@ -1232,11 +1232,11 @@ end_collect:
errno = 0;
onion_fa_g.revision_num = HDstrtoull(vfd_info_g.info, NULL, 10);
if (errno == ERANGE) {
- HDprintf("Invalid onion revision specified\n");
+ printf("Invalid onion revision specified\n");
goto error;
}
- HDprintf("Using revision %" PRIu64 "\n", onion_fa_g.revision_num);
+ printf("Using revision %" PRIu64 "\n", onion_fa_g.revision_num);
}
}
else
@@ -1374,7 +1374,7 @@ main(int argc, char *argv[])
goto done;
}
- HDprintf("The number of revisions for the onion file is %" PRIu64 "\n", revision_count);
+ printf("The number of revisions for the onion file is %" PRIu64 "\n", revision_count);
goto done;
}
else
@@ -1473,7 +1473,7 @@ main(int argc, char *argv[])
"xsi:schemaLocation=\"http://hdfgroup.org/HDF5/XML/schema/HDF5-File "
"http://www.hdfgroup.org/HDF5/XML/schema/HDF5-File.xsd\">\n",
xmlnsprefix, ns);
- HDfree(ns);
+ free(ns);
}
}
else {
@@ -1546,11 +1546,11 @@ main(int argc, char *argv[])
h5tools_setstatus(EXIT_FAILURE);
if (prefix) {
- HDfree(prefix);
+ free(prefix);
prefix = NULL;
}
if (fname) {
- HDfree(fname);
+ free(fname);
fname = NULL;
}
} /* end while */
@@ -1576,11 +1576,11 @@ done:
h5tools_setstatus(EXIT_FAILURE);
if (prefix) {
- HDfree(prefix);
+ free(prefix);
prefix = NULL;
}
if (fname) {
- HDfree(fname);
+ free(fname);
fname = NULL;
}
@@ -1605,7 +1605,7 @@ static void
init_prefix(char **prfx, size_t prfx_len)
{
if (prfx_len > 0)
- *prfx = (char *)HDcalloc(prfx_len, 1);
+ *prfx = (char *)calloc(prfx_len, 1);
else
error_msg("unable to allocate prefix buffer\n");
}
@@ -1627,7 +1627,7 @@ add_prefix(char **prfx, size_t *prfx_len, const char *name)
/* Check if we need more space */
if (*prfx_len <= new_len) {
*prfx_len = new_len + 1;
- *prfx = (char *)HDrealloc(*prfx, *prfx_len);
+ *prfx = (char *)realloc(*prfx, *prfx_len);
}
/* Append object name to prefix */
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index 3eaa2f9..a69aeac 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -48,7 +48,7 @@ dump_datatype(hid_t type)
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -72,7 +72,7 @@ dump_dataspace(hid_t space)
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -99,7 +99,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *
hid_t attr_id;
herr_t ret = SUCCEED;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
ctx.display_index = dump_opts.display_ai;
@@ -163,9 +163,9 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -187,7 +187,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
outputformat = &string_dataformat;
/* Build the object's path name */
- obj_path = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ obj_path = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (!obj_path) {
ret = FAIL;
goto done;
@@ -229,7 +229,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
/* Restore old prefix name */
HDstrcpy(prefix, old_prefix);
- HDfree(old_prefix);
+ free(old_prefix);
}
else
error_msg("warning: null prefix\n");
@@ -386,7 +386,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
switch (linfo->type) {
case H5L_TYPE_SOFT:
- if ((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) {
+ if ((targbuf = (char *)malloc(linfo->u.val_size)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -436,12 +436,12 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(targbuf);
+ free(targbuf);
}
break;
case H5L_TYPE_EXTERNAL:
- if ((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) {
+ if ((targbuf = (char *)malloc(linfo->u.val_size)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -510,7 +510,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(targbuf);
+ free(targbuf);
}
break;
@@ -560,7 +560,7 @@ done:
h5tools_str_close(&buffer);
if (obj_path)
- HDfree(obj_path);
+ free(obj_path);
return ret;
}
@@ -634,9 +634,9 @@ dump_named_datatype(hid_t tid, const char *name)
h5tool_format_t string_dataformat;
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -790,9 +790,9 @@ dump_group(hid_t gid, const char *name)
}
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -925,7 +925,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -958,7 +958,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
}
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -1112,7 +1112,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
ctx.sset = sset;
@@ -1336,7 +1336,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
u = HDstrlen(buf);
v = HDstrlen(op_name);
w = u + 1 + v + 1 + 2;
- obj_name = (char *)HDmalloc(w);
+ obj_name = (char *)malloc(w);
if (obj_name == NULL) {
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -1344,7 +1344,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
else {
size_t buffer_space = w - 1;
- HDmemset(obj_name, '\0', w);
+ memset(obj_name, '\0', w);
if (op_name[0] != '/') {
HDstrncat(obj_name, buf, buffer_space);
buffer_space -= MIN(buffer_space, u);
@@ -1359,10 +1359,10 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
buffer_space -= MIN(buffer_space, v);
handle_attributes(oid, obj_name, NULL, 0, NULL);
- HDfree(obj_name);
+ free(obj_name);
}
}
- HDfree(obj_op_name);
+ free(obj_op_name);
}
return ret;
} /* end attr_search() */
@@ -1420,7 +1420,7 @@ lnk_search(const char *path, const H5L_info2_t *li, void *_op_data)
k = 2;
else
k = 1;
- search_name = (char *)HDmalloc(search_len + k);
+ search_name = (char *)malloc(search_len + k);
if (search_name == NULL) {
error_msg("creating temporary link\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -1450,7 +1450,7 @@ lnk_search(const char *path, const H5L_info2_t *li, void *_op_data)
break;
} /* end switch() */
}
- HDfree(search_name);
+ free(search_name);
}
return 0;
} /* end lnk_search() */
@@ -1534,7 +1534,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
hsize_t curr_pos = 0; /* total data element position */
j = (int)HDstrlen(attr) - 1;
- obj_name = (char *)HDmalloc((size_t)j + 2);
+ obj_name = (char *)malloc((size_t)j + 2);
if (obj_name == NULL)
goto error;
@@ -1554,7 +1554,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
} /* end else */
dump_indent += COL;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
ctx.display_index = dump_opts.display_ai;
@@ -1582,7 +1582,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
/* handle error case: cannot open the object with the attribute */
if ((oid = H5Oopen(fid, obj_name, H5P_DEFAULT)) < 0) {
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
ctx.need_prefix = TRUE;
@@ -1631,18 +1631,18 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
goto error;
} /* end if */
- HDfree(obj_name);
- HDfree(attr_name);
+ free(obj_name);
+ free(attr_name);
dump_indent -= COL;
return;
error:
h5tools_setstatus(EXIT_FAILURE);
if (obj_name)
- HDfree(obj_name);
+ free(obj_name);
if (attr_name)
- HDfree(attr_name);
+ free(attr_name);
H5E_BEGIN_TRY
{
@@ -1709,7 +1709,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if (!sset->start.data) {
/* default to (0, 0, ...) for the start coord */
if (ndims > 0)
- sset->start.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t));
+ sset->start.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t));
else
sset->start.data = NULL;
sset->start.len = ndims;
@@ -1717,7 +1717,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if (!sset->stride.data) {
if (ndims > 0)
- sset->stride.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t));
+ sset->stride.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t));
else
sset->stride.data = NULL;
sset->stride.len = ndims;
@@ -1727,7 +1727,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if (!sset->count.data) {
if (ndims > 0)
- sset->count.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t));
+ sset->count.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t));
else
sset->count.data = NULL;
sset->count.len = ndims;
@@ -1737,7 +1737,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if (!sset->block.data) {
if (ndims > 0)
- sset->block.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t));
+ sset->block.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t));
else
sset->block.data = NULL;
sset->block.len = ndims;
@@ -1856,7 +1856,7 @@ handle_groups(hid_t fid, const char *group, void H5_ATTR_UNUSED *data, int pe, c
if (prefix_len <= new_len) {
prefix_len = new_len;
- prefix = (char *)HDrealloc(prefix, prefix_len);
+ prefix = (char *)realloc(prefix, prefix_len);
} /* end if */
HDstrcpy(prefix, group);
@@ -1893,7 +1893,7 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED *data, int H5_ATT
h5tools_setstatus(EXIT_FAILURE);
}
else {
- char *buf = (char *)HDmalloc(linfo.u.val_size);
+ char *buf = (char *)malloc(linfo.u.val_size);
PRINTVALSTREAM(rawoutstream, "\n");
switch (linfo.type) {
@@ -1951,7 +1951,7 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED *data, int H5_ATT
end_obj(h5tools_dump_header_format->udlinkend, h5tools_dump_header_format->udlinkblockend);
break;
} /* end switch */
- HDfree(buf);
+ free(buf);
} /* end else */
}
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index d0bc7e4..6d3f6c8 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -141,9 +141,9 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -165,7 +165,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
outputformat = &string_dataformat;
/* Build the object's path name */
- obj_path = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ obj_path = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (!obj_path) {
ret = FAIL;
goto done;
@@ -211,7 +211,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
/* Restore old prefix name */
HDstrcpy(prefix, old_prefix);
- HDfree(old_prefix);
+ free(old_prefix);
}
/* Close group */
@@ -316,10 +316,10 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_name);
- HDfree(t_obj_path);
- HDfree(t_prefix);
- HDfree(t_objname);
+ free(t_name);
+ free(t_obj_path);
+ free(t_prefix);
+ free(t_objname);
H5Dclose(obj);
goto done;
@@ -364,7 +364,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
switch (linfo->type) {
case H5L_TYPE_SOFT:
- if ((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) {
+ if ((targbuf = (char *)malloc(linfo->u.val_size)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -388,7 +388,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char *t_link_path;
int res;
- t_link_path = (char *)HDmalloc(HDstrlen(prefix) + linfo->u.val_size + 1);
+ t_link_path = (char *)malloc(HDstrlen(prefix) + linfo->u.val_size + 1);
if (targbuf[0] == '/')
HDstrcpy(t_link_path, targbuf);
else {
@@ -446,19 +446,19 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(t_targbuf);
- HDfree(t_obj_path);
- HDfree(t_link_path);
+ free(t_prefix);
+ free(t_name);
+ free(t_targbuf);
+ free(t_obj_path);
+ free(t_link_path);
}
- HDfree(targbuf);
+ free(targbuf);
}
break;
case H5L_TYPE_EXTERNAL:
- if ((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) {
+ if ((targbuf = (char *)malloc(linfo->u.val_size)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -512,14 +512,14 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(t_filename);
- HDfree(t_targname);
- HDfree(t_obj_path);
+ free(t_prefix);
+ free(t_name);
+ free(t_filename);
+ free(t_targname);
+ free(t_obj_path);
} /* end else */
} /* end else */
- HDfree(targbuf);
+ free(targbuf);
}
break;
@@ -556,9 +556,9 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(t_obj_path);
+ free(t_prefix);
+ free(t_name);
+ free(t_obj_path);
} break;
} /* end switch */
@@ -569,7 +569,7 @@ done:
h5tools_str_close(&buffer);
if (obj_path)
- HDfree(obj_path);
+ free(obj_path);
return ret;
}
@@ -689,7 +689,7 @@ xml_escape_the_name(const char *str)
cp = str;
ncp_len = len + extra + 1;
- rcp = ncp = (char *)HDmalloc(ncp_len);
+ rcp = ncp = (char *)malloc(ncp_len);
if (!ncp)
return NULL; /* ?? */
@@ -782,7 +782,7 @@ xml_escape_the_string(const char *str, int slen)
cp = str;
ncp_len = len + extra + 1;
- rcp = ncp = (char *)HDcalloc(ncp_len, sizeof(char));
+ rcp = ncp = (char *)calloc(ncp_len, sizeof(char));
if (ncp == NULL)
return NULL; /* ?? */
@@ -877,9 +877,9 @@ xml_print_datatype(hid_t type, unsigned in_group)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -912,7 +912,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* This should be defined somewhere else */
/* These 2 cases are handled the same right now, but
probably will have something different eventually */
- char *dtxid = (char *)HDmalloc((size_t)100);
+ char *dtxid = (char *)malloc((size_t)100);
xml_name_to_XID(type, found_obj->objname, dtxid, 100, 1);
if (!found_obj->recorded) {
@@ -939,9 +939,9 @@ xml_print_datatype(hid_t type, unsigned in_group)
dtxid, t_objname);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_objname);
+ free(t_objname);
}
- HDfree(dtxid);
+ free(dtxid);
}
else {
ctx.need_prefix = TRUE;
@@ -1286,7 +1286,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
H5free_memory(mname);
- HDfree(t_fname);
+ free(t_fname);
dump_indent += COL;
ctx.indent_level++;
@@ -1575,9 +1575,9 @@ xml_dump_datatype(hid_t type)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -1612,7 +1612,7 @@ xml_dump_datatype(hid_t type)
if (found_obj) {
/* Shared datatype, must be entered as an object */
/* These 2 cases are the same now, but may change */
- char *dtxid = (char *)HDmalloc((size_t)100);
+ char *dtxid = (char *)malloc((size_t)100);
xml_name_to_XID(type, found_obj->objname, dtxid, 100, 1);
if (!found_obj->recorded) {
@@ -1642,9 +1642,9 @@ xml_dump_datatype(hid_t type)
xmlnsprefix, dtxid, t_objname);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_objname);
+ free(t_objname);
}
- HDfree(dtxid);
+ free(dtxid);
}
else {
ctx.need_prefix = TRUE;
@@ -1710,9 +1710,9 @@ xml_dump_dataspace(hid_t space)
H5S_class_t space_type = H5Sget_simple_extent_type(space);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -1881,13 +1881,13 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
h5tool_format_t *outputformat = &xml_dataformat;
h5tool_format_t string_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
/* Print all the values. */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
string_dataformat = *outputformat;
@@ -1941,7 +1941,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
status = xml_print_strs(obj_id, DATASET_DATA);
else {
h5tools_context_t datactx;
- HDmemset(&datactx, 0, sizeof(datactx));
+ memset(&datactx, 0, sizeof(datactx));
datactx.need_prefix = TRUE;
datactx.indent_level = ctx.indent_level;
datactx.cur_column = ctx.cur_column;
@@ -1971,7 +1971,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
}
else {
h5tools_context_t datactx;
- HDmemset(&datactx, 0, sizeof(datactx));
+ memset(&datactx, 0, sizeof(datactx));
datactx.need_prefix = TRUE;
datactx.indent_level = ctx.indent_level;
datactx.cur_column = ctx.cur_column;
@@ -2051,9 +2051,9 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
char *t_aname = xml_escape_the_name(attr_name);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -2081,7 +2081,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_str_append(&buffer, "<%sAttribute Name=\"%s\">", xmlnsprefix, t_aname);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_aname);
+ free(t_aname);
if ((attr_id = H5Aopen(attr, attr_name, H5P_DEFAULT)) >= 0) {
type = H5Aget_type(attr_id);
@@ -2370,7 +2370,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
char *t_prefix = NULL;
char *t_name = NULL;
- tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (tmp == NULL) {
indentation(dump_indent);
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
@@ -2383,9 +2383,9 @@ xml_dump_named_datatype(hid_t type, const char *name)
HDstrcat(tmp, name);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -2406,8 +2406,8 @@ xml_dump_named_datatype(hid_t type, const char *name)
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- dtxid = (char *)HDmalloc((size_t)100);
- parentxid = (char *)HDmalloc((size_t)100);
+ dtxid = (char *)malloc((size_t)100);
+ parentxid = (char *)malloc((size_t)100);
t_tmp = xml_escape_the_name(tmp);
t_prefix = xml_escape_the_name(prefix);
t_name = xml_escape_the_name(name);
@@ -2493,7 +2493,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
h5tools_str_append(&buffer, "</%sNamedDataType>", xmlnsprefix);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_objname);
+ free(t_objname);
goto done;
}
else
@@ -2541,12 +2541,12 @@ done:
h5tools_str_close(&buffer);
- HDfree(dtxid);
- HDfree(parentxid);
- HDfree(t_tmp);
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(tmp);
+ free(dtxid);
+ free(parentxid);
+ free(t_tmp);
+ free(t_prefix);
+ free(t_name);
+ free(tmp);
}
/*-------------------------------------------------------------------------
@@ -2603,9 +2603,9 @@ xml_dump_group(hid_t gid, const char *name)
}
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -2631,7 +2631,7 @@ xml_dump_group(hid_t gid, const char *name)
tmp = HDstrdup("/");
}
else {
- tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (tmp == NULL) {
indentation(dump_indent);
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
@@ -2665,11 +2665,11 @@ xml_dump_group(hid_t gid, const char *name)
}
else {
char *t_name = xml_escape_the_name(name);
- char *grpxid = (char *)HDmalloc((size_t)100);
- char *parentxid = (char *)HDmalloc((size_t)100);
+ char *grpxid = (char *)malloc((size_t)100);
+ char *parentxid = (char *)malloc((size_t)100);
if (found_obj->displayed) {
- char *ptrstr = (char *)HDmalloc((size_t)100);
+ char *ptrstr = (char *)malloc((size_t)100);
/* already seen: enter a groupptr */
if (isRoot) {
@@ -2702,8 +2702,8 @@ xml_dump_group(hid_t gid, const char *name)
par_name);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_objname);
- HDfree(par_name);
+ free(t_objname);
+ free(par_name);
ctx.indent_level++;
@@ -2725,10 +2725,10 @@ xml_dump_group(hid_t gid, const char *name)
ctx.indent_level--;
- HDfree(t_objname);
- HDfree(par_name);
+ free(t_objname);
+ free(par_name);
}
- HDfree(ptrstr);
+ free(ptrstr);
}
else {
@@ -2763,8 +2763,8 @@ xml_dump_group(hid_t gid, const char *name)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_tmp);
- HDfree(par_name);
+ free(t_tmp);
+ free(par_name);
}
found_obj->displayed = TRUE;
@@ -2820,16 +2820,16 @@ xml_dump_group(hid_t gid, const char *name)
dump_indent -= COL;
ctx.indent_level--;
}
- HDfree(t_name);
- HDfree(grpxid);
- HDfree(parentxid);
+ free(t_name);
+ free(grpxid);
+ free(parentxid);
}
}
else {
/* only link -- must be first time! */
char *t_name = xml_escape_the_name(name);
- char *grpxid = (char *)HDmalloc((size_t)100);
- char *parentxid = (char *)HDmalloc((size_t)100);
+ char *grpxid = (char *)malloc((size_t)100);
+ char *parentxid = (char *)malloc((size_t)100);
ctx.need_prefix = TRUE;
@@ -2851,15 +2851,15 @@ xml_dump_group(hid_t gid, const char *name)
"<%sGroup Name=\"%s\" OBJ-XID=\"%s\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\" >",
xmlnsprefix, t_name, grpxid, t_tmp, parentxid, par_name);
- HDfree(t_tmp);
- HDfree(par_name);
+ free(t_tmp);
+ free(par_name);
}
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_name);
- HDfree(grpxid);
- HDfree(parentxid);
+ free(t_name);
+ free(grpxid);
+ free(parentxid);
/* 1. do all the attributes of the group */
@@ -2928,9 +2928,9 @@ xml_dump_group(hid_t gid, const char *name)
h5tools_str_close(&buffer);
if (par)
- HDfree(par);
+ free(par);
if (tmp)
- HDfree(tmp);
+ free(tmp);
}
/*-------------------------------------------------------------------------
@@ -2983,7 +2983,7 @@ xml_print_refs(hid_t did, int source)
if ((ssiz = H5Sget_simple_extent_npoints(space)) < 0)
goto error;
- buf = (char *)HDcalloc((size_t)ssiz, sizeof(H5R_ref_t));
+ buf = (char *)calloc((size_t)ssiz, sizeof(H5R_ref_t));
if (buf == NULL)
goto error;
e = H5Dread(did, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
@@ -2996,7 +2996,7 @@ xml_print_refs(hid_t did, int source)
if ((ssiz = H5Sget_simple_extent_npoints(space)) < 0)
goto error;
- buf = (char *)HDcalloc((size_t)ssiz, sizeof(H5R_ref_t));
+ buf = (char *)calloc((size_t)ssiz, sizeof(H5R_ref_t));
if (buf == NULL)
goto error;
e = H5Aread(did, H5T_STD_REF, buf);
@@ -3008,9 +3008,9 @@ xml_print_refs(hid_t did, int source)
refbuf = (H5R_ref_t *)((void *)buf);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3054,7 +3054,7 @@ xml_print_refs(hid_t did, int source)
h5tools_str_append(&buffer, "\"%s\"", t_path);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_path);
+ free(t_path);
}
ctx.indent_level--;
@@ -3065,14 +3065,14 @@ xml_print_refs(hid_t did, int source)
h5tools_str_close(&buffer);
- HDfree(buf);
+ free(buf);
H5Tclose(type);
H5Sclose(space);
return SUCCEED;
error:
if (buf)
- HDfree(buf);
+ free(buf);
H5E_BEGIN_TRY
{
@@ -3133,7 +3133,7 @@ xml_print_strs(hid_t did, int source)
if ((tsiz = H5Tget_size(type)) == 0)
goto error;
- buf = HDmalloc((size_t)ssiz * tsiz);
+ buf = malloc((size_t)ssiz * tsiz);
if (buf == NULL)
goto error;
@@ -3148,7 +3148,7 @@ xml_print_strs(hid_t did, int source)
if ((tsiz = H5Tget_size(type)) == 0)
goto error;
- buf = HDmalloc((size_t)ssiz * tsiz);
+ buf = malloc((size_t)ssiz * tsiz);
if (buf == NULL)
goto error;
@@ -3159,15 +3159,15 @@ xml_print_strs(hid_t did, int source)
bp = (char *)buf;
if (!is_vlstr) {
- onestring = (char *)HDcalloc(tsiz, sizeof(char));
+ onestring = (char *)calloc(tsiz, sizeof(char));
if (onestring == NULL)
goto error;
}
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3219,7 +3219,7 @@ xml_print_strs(hid_t did, int source)
h5tools_str_append(&buffer, "\"%s\"", t_onestring);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_onestring);
+ free(t_onestring);
}
}
bp += tsiz;
@@ -3230,11 +3230,11 @@ xml_print_strs(hid_t did, int source)
/* Reclaim any VL memory, if necessary */
if (!is_vlstr)
if (onestring)
- HDfree(onestring);
+ free(onestring);
if (buf) {
if (is_vlstr)
H5Treclaim(type, space, H5P_DEFAULT, buf);
- HDfree(buf);
+ free(buf);
}
H5Tclose(type);
H5Sclose(space);
@@ -3242,7 +3242,7 @@ xml_print_strs(hid_t did, int source)
error:
if (buf)
- HDfree(buf);
+ free(buf);
H5E_BEGIN_TRY
{
@@ -3281,9 +3281,9 @@ check_filters(hid_t dcpl)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3422,9 +3422,9 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3459,7 +3459,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
dump_indent += COL;
space = H5Tget_size(type);
- buf = HDmalloc((size_t)space);
+ buf = malloc((size_t)space);
H5Pget_fill_value(dcpl, type, buf);
@@ -3492,7 +3492,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_str_append(&buffer, "\"%s\"", t_path);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_path);
+ free(t_path);
}
ctx.need_prefix = TRUE;
@@ -3732,7 +3732,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
break;
}
}
- HDfree(buf);
+ free(buf);
ctx.indent_level--;
dump_indent -= COL;
@@ -3782,15 +3782,15 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tool_format_t string_dataformat;
hsize_t curr_pos = 0; /* total data element position */
- char *rstr = (char *)HDmalloc((size_t)100);
- char *pstr = (char *)HDmalloc((size_t)100);
+ char *rstr = (char *)malloc((size_t)100);
+ char *pstr = (char *)malloc((size_t)100);
- tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (tmp == NULL) {
error_msg("buffer allocation failed\n");
h5tools_setstatus(EXIT_FAILURE);
- HDfree(rstr);
- HDfree(pstr);
+ free(rstr);
+ free(pstr);
return;
}
@@ -3799,9 +3799,9 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
HDstrcat(tmp, name);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3839,12 +3839,12 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_name);
- HDfree(t_tmp);
- HDfree(t_prefix);
- HDfree(rstr);
- HDfree(pstr);
- HDfree(tmp);
+ free(t_name);
+ free(t_tmp);
+ free(t_prefix);
+ free(rstr);
+ free(pstr);
+ free(tmp);
dcpl = H5Dget_create_plist(did);
type = H5Dget_type(did);
@@ -3860,7 +3860,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_setstatus(EXIT_FAILURE);
}
else {
- chsize = (hsize_t *)HDmalloc((size_t)maxdims * sizeof(hsize_t));
+ chsize = (hsize_t *)malloc((size_t)maxdims * sizeof(hsize_t));
ctx.indent_level++;
dump_indent += COL;
@@ -3943,7 +3943,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
dump_indent -= COL;
- HDfree(chsize);
+ free(chsize);
}
}
else if (H5D_CONTIGUOUS == H5Pget_layout(dcpl)) {
@@ -4391,9 +4391,9 @@ xml_print_enum(hid_t type)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -4457,8 +4457,8 @@ xml_print_enum(hid_t type)
}
/* Get the names and raw values of all members */
- name = (char **)HDcalloc((size_t)nmembs, sizeof(char *));
- value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size));
+ name = (char **)calloc((size_t)nmembs, sizeof(char *));
+ value = (unsigned char *)calloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size));
for (i = 0; i < nmembs; i++) {
name[i] = H5Tget_member_name(type, i);
@@ -4494,7 +4494,7 @@ xml_print_enum(hid_t type)
h5tools_str_append(&buffer, "%s", t_name);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_name);
+ free(t_name);
ctx.indent_level--;
ctx.need_prefix = TRUE;
@@ -4527,13 +4527,13 @@ xml_print_enum(hid_t type)
else if (H5T_SGN_NONE == H5Tget_sign(native)) {
unsigned long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(&buffer, "%llu", copy);
}
else {
long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(&buffer, "%lld", copy);
}
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
@@ -4557,7 +4557,7 @@ xml_print_enum(hid_t type)
for (i = 0; i < nmembs; i++)
H5free_memory(name[i]);
- HDfree(name);
- HDfree(value);
+ free(name);
+ free(value);
H5Tclose(super);
}
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index 200f735..87e9acb 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -55,31 +55,31 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"version",
static void
usage(const char *prog)
{
- HDfprintf(stdout, "usage: %s [OPTIONS] file_name\n", prog);
- HDfprintf(stdout, " OPTIONS\n");
- HDfprintf(stdout, " -h, --help Print a usage message and exit\n");
- HDfprintf(stdout, " -V, --version Print version number and exit\n");
- HDfprintf(stdout, " -v, --verbose Turn on verbose mode\n");
- HDfprintf(stdout, " -d dname, --dname=dataset_name Pathname for the dataset\n");
- HDfprintf(stdout, " -n, --noop Perform all the steps except the actual conversion\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Examples of use:\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "h5format_convert -d /group/dataset file_name\n");
- HDfprintf(stdout, " Convert the dataset </group/dataset> in the HDF5 file <file_name>:\n");
- HDfprintf(stdout, " a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
- HDfprintf(stdout, " b. compact/contiguous dataset: downgrade the layout version to 3\n");
- HDfprintf(stdout, " c. virtual dataset: no action\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "h5format_convert file_name\n");
- HDfprintf(stdout, " Convert all datasets in the HDF5 file <file_name>:\n");
- HDfprintf(stdout, " a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
- HDfprintf(stdout, " b. compact/contiguous dataset: downgrade the layout version to 3\n");
- HDfprintf(stdout, " c. virtual dataset: no action\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "h5format_convert -n -d /group/dataset file_name\n");
- HDfprintf(stdout, " Go through all the steps except the actual conversion when \n");
- HDfprintf(stdout, " converting the dataset </group/dataset> in the HDF5 file <file_name>.\n");
+ fprintf(stdout, "usage: %s [OPTIONS] file_name\n", prog);
+ fprintf(stdout, " OPTIONS\n");
+ fprintf(stdout, " -h, --help Print a usage message and exit\n");
+ fprintf(stdout, " -V, --version Print version number and exit\n");
+ fprintf(stdout, " -v, --verbose Turn on verbose mode\n");
+ fprintf(stdout, " -d dname, --dname=dataset_name Pathname for the dataset\n");
+ fprintf(stdout, " -n, --noop Perform all the steps except the actual conversion\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Examples of use:\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "h5format_convert -d /group/dataset file_name\n");
+ fprintf(stdout, " Convert the dataset </group/dataset> in the HDF5 file <file_name>:\n");
+ fprintf(stdout, " a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
+ fprintf(stdout, " b. compact/contiguous dataset: downgrade the layout version to 3\n");
+ fprintf(stdout, " c. virtual dataset: no action\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "h5format_convert file_name\n");
+ fprintf(stdout, " Convert all datasets in the HDF5 file <file_name>:\n");
+ fprintf(stdout, " a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
+ fprintf(stdout, " b. compact/contiguous dataset: downgrade the layout version to 3\n");
+ fprintf(stdout, " c. virtual dataset: no action\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "h5format_convert -n -d /group/dataset file_name\n");
+ fprintf(stdout, " Go through all the steps except the actual conversion when \n");
+ fprintf(stdout, " converting the dataset </group/dataset> in the HDF5 file <file_name>.\n");
} /* usage() */
/*-------------------------------------------------------------------------
@@ -179,7 +179,7 @@ leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
} /* leave() */
/*-------------------------------------------------------------------------
@@ -215,7 +215,7 @@ convert(hid_t fid, const char *dname)
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Open the dataset\n");
+ fprintf(stdout, "Open the dataset\n");
/* Get the dataset's creation property list */
if ((dcpl = H5Dget_create_plist(did)) < 0) {
@@ -231,12 +231,12 @@ convert(hid_t fid, const char *dname)
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Retrieve the dataset's layout\n");
+ fprintf(stdout, "Retrieve the dataset's layout\n");
switch (layout_type) {
case H5D_CHUNKED:
if (verbose_g)
- HDfprintf(stdout, "Dataset is a chunked dataset\n");
+ fprintf(stdout, "Dataset is a chunked dataset\n");
/* Get the dataset's chunk indexing type */
if (H5Dget_chunk_index_type(did, &idx_type) < 0) {
@@ -245,34 +245,33 @@ convert(hid_t fid, const char *dname)
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Retrieve the dataset's chunk indexing type\n");
+ fprintf(stdout, "Retrieve the dataset's chunk indexing type\n");
if (idx_type == H5D_CHUNK_IDX_BTREE) {
if (verbose_g)
- HDfprintf(
- stdout,
- "Dataset's chunk indexing type is already version 1 B-tree: no further action\n");
+ fprintf(stdout,
+ "Dataset's chunk indexing type is already version 1 B-tree: no further action\n");
h5tools_setstatus(EXIT_SUCCESS);
goto done;
}
else if (verbose_g)
- HDfprintf(stdout, "Dataset's chunk indexing type is not version 1 B-tree\n");
+ fprintf(stdout, "Dataset's chunk indexing type is not version 1 B-tree\n");
break;
case H5D_CONTIGUOUS:
if (verbose_g)
- HDfprintf(stdout, "Dataset is a contiguous dataset: downgrade layout version as needed\n");
+ fprintf(stdout, "Dataset is a contiguous dataset: downgrade layout version as needed\n");
break;
case H5D_COMPACT:
if (verbose_g)
- HDfprintf(stdout, "Dataset is a compact dataset: downgrade layout version as needed\n");
+ fprintf(stdout, "Dataset is a compact dataset: downgrade layout version as needed\n");
break;
case H5D_VIRTUAL:
if (verbose_g)
- HDfprintf(stdout, "No further action for virtual dataset\n");
+ fprintf(stdout, "No further action for virtual dataset\n");
goto done;
case H5D_NLAYOUTS:
@@ -287,13 +286,13 @@ convert(hid_t fid, const char *dname)
/* No further action if it is a noop */
if (noop_g) {
if (verbose_g)
- HDfprintf(stdout, "Not converting the dataset\n");
+ fprintf(stdout, "Not converting the dataset\n");
h5tools_setstatus(EXIT_SUCCESS);
goto done;
}
if (verbose_g)
- HDfprintf(stdout, "Converting the dataset...\n");
+ fprintf(stdout, "Converting the dataset...\n");
/* Downgrade the dataset */
if (H5Dformat_convert(did) < 0) {
@@ -302,7 +301,7 @@ convert(hid_t fid, const char *dname)
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Done\n");
+ fprintf(stdout, "Done\n");
done:
/* Close the dataset */
@@ -312,7 +311,7 @@ done:
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Close the dataset\n");
+ fprintf(stdout, "Close the dataset\n");
/* Close the dataset creation property list */
if (H5Pclose(dcpl) < 0) {
@@ -321,13 +320,13 @@ done:
goto error;
}
else if (verbose_g)
- HDprintf("Close the dataset creation property list\n");
+ printf("Close the dataset creation property list\n");
return 0;
error:
if (verbose_g)
- HDfprintf(stdout, "Error encountered\n");
+ fprintf(stdout, "Error encountered\n");
H5E_BEGIN_TRY
{
@@ -358,7 +357,7 @@ convert_dsets_cb(const char *path, const H5O_info2_t *oi, const char *already_vi
if (NULL == already_visited) {
if (oi->type == H5O_TYPE_DATASET) {
if (verbose_g)
- HDfprintf(stdout, "Going to process dataset:%s...\n", path);
+ fprintf(stdout, "Going to process dataset:%s...\n", path);
if (convert(fid, path) < 0)
goto error;
} /* end if */
@@ -396,10 +395,10 @@ main(int argc, char *argv[])
if (parse_command_line(argc, (const char *const *)argv) < 0)
goto done;
else if (verbose_g)
- HDfprintf(stdout, "Process command line options\n");
+ fprintf(stdout, "Process command line options\n");
if (noop_g && verbose_g)
- HDfprintf(stdout, "It is noop...\n");
+ fprintf(stdout, "It is noop...\n");
/* enable error reporting if command line option */
h5tools_error_report();
@@ -411,28 +410,28 @@ main(int argc, char *argv[])
goto done;
}
else if (verbose_g)
- HDfprintf(stdout, "Open the file %s\n", fname_g);
+ fprintf(stdout, "Open the file %s\n", fname_g);
if (dset_g) { /* Convert a specified dataset in the file */
if (verbose_g)
- HDfprintf(stdout, "Going to process dataset: %s...\n", dname_g);
+ fprintf(stdout, "Going to process dataset: %s...\n", dname_g);
if (convert(fid, dname_g) < 0)
goto done;
}
else { /* Convert all datasets in the file */
if (verbose_g)
- HDfprintf(stdout, "Processing all datasets in the file...\n");
+ fprintf(stdout, "Processing all datasets in the file...\n");
if (h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid, H5O_INFO_BASIC) < 0)
goto done;
} /* end else */
if (verbose_g) {
if (noop_g) {
- HDfprintf(stdout, "Not processing the file's superblock...\n");
+ fprintf(stdout, "Not processing the file's superblock...\n");
h5tools_setstatus(EXIT_SUCCESS);
goto done;
} /* end if */
- HDfprintf(stdout, "Processing the file's superblock...\n");
+ fprintf(stdout, "Processing the file's superblock...\n");
} /* end if */
/* Process superblock */
@@ -450,14 +449,14 @@ done:
h5tools_setstatus(EXIT_FAILURE);
}
else if (verbose_g) {
- HDfprintf(stdout, "Close the file\n");
+ fprintf(stdout, "Close the file\n");
}
} /* end if */
if (fname_g)
- HDfree(fname_g);
+ free(fname_g);
if (dname_g)
- HDfree(dname_g);
+ free(dname_g);
leave(h5tools_getstatus());
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 5a2fae3..b7d18a1 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -101,19 +101,19 @@ main(int argc, char *argv[])
(void)HDsetvbuf(stderr, (char *)NULL, _IOLBF, 0);
(void)HDsetvbuf(stdout, (char *)NULL, _IOLBF, 0);
- if ((opt = (struct Options *)HDcalloc(1, sizeof(struct Options))) == NULL)
+ if ((opt = (struct Options *)calloc(1, sizeof(struct Options))) == NULL)
goto err;
if (argv[1] && (HDstrcmp("-V", argv[1]) == 0)) {
print_version(PROGRAMNAME);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/*
* validate the number of command line arguments
*/
if (argc < 2) {
- (void)HDfprintf(stderr, err1, argc);
+ (void)fprintf(stderr, err1, argc);
usage(argv[0]);
goto err;
}
@@ -140,7 +140,7 @@ main(int argc, char *argv[])
opt->fcount++;
}
else {
- (void)HDfprintf(stderr, err9, argv[i]);
+ (void)fprintf(stderr, err9, argv[i]);
goto err;
}
@@ -159,7 +159,7 @@ main(int argc, char *argv[])
case 5: /* get outfile found */
if (HDstrlen(argv[i]) > MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, err10, argv[i]);
+ (void)fprintf(stderr, err10, argv[i]);
goto err;
}
(void)HDstrcpy(opt->outfile, argv[i]);
@@ -168,7 +168,7 @@ main(int argc, char *argv[])
case 6: /* -h found; help, then exit */
help(argv[0]);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
break;
case 7: /* -d found; look for dimensions */
@@ -176,7 +176,7 @@ main(int argc, char *argv[])
case 8: /* read dimensions */
if (parseDimensions(in, argv[i]) == -1) {
- (void)HDfprintf(stderr, err6, argv[i]);
+ (void)fprintf(stderr, err6, argv[i]);
goto err;
}
break;
@@ -186,7 +186,7 @@ main(int argc, char *argv[])
case 10: /* read path name */
if (parsePathInfo(&in->path, argv[i]) == -1) {
- (void)HDfprintf(stderr, err5, argv[i]);
+ (void)fprintf(stderr, err5, argv[i]);
goto err;
}
break;
@@ -196,7 +196,7 @@ main(int argc, char *argv[])
case 12: /* read data type */
if (getInputClass(in, argv[i]) == -1) {
- (void)HDfprintf(stderr, err7, argv[i]);
+ (void)fprintf(stderr, err7, argv[i]);
goto err;
}
@@ -213,7 +213,7 @@ main(int argc, char *argv[])
case 14: /* read data size */
if (getInputSize(in, (int)HDstrtol(argv[i], NULL, BASE_10)) == -1) {
- (void)HDfprintf(stderr, err8, argv[i]);
+ (void)fprintf(stderr, err8, argv[i]);
goto err;
}
/*set default value for output-size */
@@ -222,14 +222,14 @@ main(int argc, char *argv[])
case ERR: /* command syntax error */
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
usage(argv[0]);
goto err;
}
}
if (FALSE == outfile_named) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
usage(argv[0]);
goto err;
}
@@ -242,35 +242,35 @@ main(int argc, char *argv[])
for (i = 0; i < opt->fcount; i++) {
in = &(opt->infiles[i].in);
if (in->sizeOfDimension)
- HDfree(in->sizeOfDimension);
+ free(in->sizeOfDimension);
if (in->sizeOfChunk)
- HDfree(in->sizeOfChunk);
+ free(in->sizeOfChunk);
if (in->maxsizeOfDimension)
- HDfree(in->maxsizeOfDimension);
+ free(in->maxsizeOfDimension);
if (in->externFilename)
- HDfree(in->externFilename);
+ free(in->externFilename);
if (in->data)
- HDfree(in->data);
+ free(in->data);
}
- HDfree(opt);
+ free(opt);
return EXIT_SUCCESS;
err:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
for (i = 0; i < opt->fcount; i++) {
in = &(opt->infiles[i].in);
if (in->sizeOfDimension)
- HDfree(in->sizeOfDimension);
+ free(in->sizeOfDimension);
if (in->sizeOfChunk)
- HDfree(in->sizeOfChunk);
+ free(in->sizeOfChunk);
if (in->maxsizeOfDimension)
- HDfree(in->maxsizeOfDimension);
+ free(in->maxsizeOfDimension);
if (in->externFilename)
- HDfree(in->externFilename);
+ free(in->externFilename);
if (in->data)
- HDfree(in->data);
+ free(in->data);
}
- HDfree(opt);
+ free(opt);
return EXIT_FAILURE;
}
@@ -329,7 +329,7 @@ gtoken(char *s)
}
if (token == ERR)
- (void)HDfprintf(stderr, err1, s);
+ (void)fprintf(stderr, err1, s);
}
else { /* filename */
token = FILNAME;
@@ -375,8 +375,8 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
*/
if (in->inputClass == 4 /* "IN" */ || in->inputClass == 3 /* "FP" */ || in->inputClass == 7 /* "UIN" */) {
- if ((strm = HDfopen(infile, READ_OPEN_FLAGS)) == NULL) {
- (void)HDfprintf(stderr, err1, infile);
+ if ((strm = fopen(infile, READ_OPEN_FLAGS)) == NULL) {
+ (void)fprintf(stderr, err1, infile);
goto error;
}
}
@@ -385,8 +385,8 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
*-------------------------------------------------------------------------
*/
else {
- if ((strm = HDfopen(infile, "r")) == NULL) {
- (void)HDfprintf(stderr, err1, infile);
+ if ((strm = fopen(infile, "r")) == NULL) {
+ (void)fprintf(stderr, err1, infile);
goto error;
}
}
@@ -395,12 +395,12 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
case 0: /* TEXTIN */
case 4: /* IN */
if (allocateIntegerStorage(in) == -1) {
- (void)HDfprintf(stderr, err2, infile);
+ (void)fprintf(stderr, err2, infile);
goto error;
}
if (readIntegerData(strm, in) == -1) {
- (void)HDfprintf(stderr, err4, infile);
+ (void)fprintf(stderr, err4, infile);
goto error;
}
break;
@@ -409,12 +409,12 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
case 2: /* TEXTFPE */
case 3: /* FP */
if (allocateFloatStorage(in) == -1) {
- (void)HDfprintf(stderr, err3, infile);
+ (void)fprintf(stderr, err3, infile);
goto error;
}
if (readFloatData(strm, in) == -1) {
- (void)HDfprintf(stderr, err5, infile);
+ (void)fprintf(stderr, err5, infile);
goto error;
}
break;
@@ -422,13 +422,13 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
case 5: /* STR */
if (in->h5dumpInput) {
if (processStrHDFData(strm, in, file_id) == -1) {
- (void)HDfprintf(stderr, err11, infile);
+ (void)fprintf(stderr, err11, infile);
goto error;
}
}
else {
if (processStrData(strm, in, file_id) == -1) {
- (void)HDfprintf(stderr, err11, infile);
+ (void)fprintf(stderr, err11, infile);
goto error;
}
}
@@ -438,17 +438,17 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
case 6: /* TEXTUIN */
case 7: /* UIN */
if (allocateUIntegerStorage(in) == -1) {
- (void)HDfprintf(stderr, err6, infile);
+ (void)fprintf(stderr, err6, infile);
goto error;
}
if (readUIntegerData(strm, in) == -1) {
- (void)HDfprintf(stderr, err7, infile);
+ (void)fprintf(stderr, err7, infile);
goto error;
}
break;
default:
- (void)HDfprintf(stderr, "%s", err10);
+ (void)fprintf(stderr, "%s", err10);
goto error;
}
@@ -492,7 +492,7 @@ readIntegerData(FILE *strm, struct Input *in)
in08 = (H5DT_INT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
if (HDfscanf(strm, "%hd", &temp16) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
(*in08) = (H5DT_INT8)temp16;
@@ -503,17 +503,17 @@ readIntegerData(FILE *strm, struct Input *in)
in08 = (H5DT_INT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
if (HDfread((char *)in08, sizeof(H5DT_INT8), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
#ifdef H5DEBUGIMPORT
- HDprintf("readIntegerData %d (0x%.8X)\n", *in08, *in08);
+ printf("readIntegerData %d (0x%.8X)\n", *in08, *in08);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -524,7 +524,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in16++) {
if (HDfscanf(strm, "%hd", in16) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -534,7 +534,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 4: /* IN */
for (i = 0; i < len; i++, in16++) {
if (HDfread((char *)&temp16, sizeof(H5DT_INT16), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -544,13 +544,13 @@ readIntegerData(FILE *strm, struct Input *in)
*/
*in16 = temp16;
#ifdef H5DEBUGIMPORT
- HDprintf("readIntegerData %d (0x%.8X)\n", *in16, temp16);
+ printf("readIntegerData %d (0x%.8X)\n", *in16, temp16);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -561,7 +561,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in32++) {
if (HDfscanf(strm, "%d", in32) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -570,7 +570,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 4: /* IN */
for (i = 0; i < len; i++, in32++) {
if (HDfread((char *)&temp32, sizeof(H5DT_INT32), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -580,13 +580,13 @@ readIntegerData(FILE *strm, struct Input *in)
*/
*in32 = temp32;
#ifdef H5DEBUGIMPORT
- HDprintf("readIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32);
+ printf("readIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -597,7 +597,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in64++) {
if (HDfscanf(strm, "%s", buffer) < 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
*in64 = (H5DT_INT64)HDstrtoll(buffer, NULL, 10);
@@ -607,7 +607,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 4: /* IN */
for (i = 0; i < len; i++, in64++) {
if (HDfread((char *)&temp64, sizeof(H5DT_INT64), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -617,19 +617,19 @@ readIntegerData(FILE *strm, struct Input *in)
*/
*in64 = temp64;
#ifdef H5DEBUGIMPORT
- HDprintf("readIntegerData %d (0x%.8X)\n", *in64, temp64);
+ printf("readIntegerData %d (0x%.8X)\n", *in64, temp64);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
break;
}
return (0);
@@ -663,7 +663,7 @@ readUIntegerData(FILE *strm, struct Input *in)
in08 = (H5DT_UINT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
if (HDfscanf(strm, "%hu", &temp16) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
(*in08) = (H5DT_UINT8)temp16;
@@ -674,14 +674,14 @@ readUIntegerData(FILE *strm, struct Input *in)
in08 = (H5DT_UINT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
if (HDfread((char *)in08, sizeof(H5DT_UINT8), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -692,7 +692,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in16++) {
if (HDfscanf(strm, "%hu", in16) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -701,7 +701,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 7: /* UIN */
for (i = 0; i < len; i++, in16++) {
if (HDfread((char *)&temp16, sizeof(H5DT_UINT16), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -711,13 +711,13 @@ readUIntegerData(FILE *strm, struct Input *in)
*/
*in16 = temp16;
#ifdef H5DEBUGIMPORT
- HDprintf("readUIntegerData %d (0x%.4X = 0x%.4X)\n", *in16, *in16, temp16);
+ printf("readUIntegerData %d (0x%.4X = 0x%.4X)\n", *in16, *in16, temp16);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -728,7 +728,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in32++) {
if (HDfscanf(strm, "%u", in32) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -737,7 +737,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 7: /* UIN */
for (i = 0; i < len; i++, in32++) {
if (HDfread((char *)&temp32, sizeof(H5DT_UINT32), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -747,13 +747,13 @@ readUIntegerData(FILE *strm, struct Input *in)
*/
*in32 = temp32;
#ifdef H5DEBUGIMPORT
- HDprintf("readUIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32);
+ printf("readUIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -764,7 +764,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in64++) {
if (HDfscanf(strm, "%s", buffer) < 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
*in64 = (H5DT_UINT64)HDstrtoll(buffer, NULL, 10);
@@ -774,7 +774,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 7: /* UIN */
for (i = 0; i < len; i++, in64++) {
if (HDfread((char *)&temp64, sizeof(H5DT_UINT64), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -784,19 +784,19 @@ readUIntegerData(FILE *strm, struct Input *in)
*/
*in64 = temp64;
#ifdef H5DEBUGIMPORT
- HDprintf("readUIntegerData %ld (0x%.8X = 0x%.8X)\n", *in64, *in64, temp64);
+ printf("readUIntegerData %ld (0x%.8X = 0x%.8X)\n", *in64, *in64, temp64);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
break;
}
return (0);
@@ -829,7 +829,7 @@ readFloatData(FILE *strm, struct Input *in)
case 1: /* TEXTFP */
for (i = 0; i < len; i++, fp32++) {
if (HDfscanf(strm, "%f", fp32) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -842,7 +842,7 @@ readFloatData(FILE *strm, struct Input *in)
for (i = 0; i < len; i++, fp32++) {
if (HDfscanf(strm, "%f", fp32) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -854,7 +854,7 @@ readFloatData(FILE *strm, struct Input *in)
bfp32 = (uint32_t *)in->data;
for (i = 0; i < len; i++, bfp32++) {
if (HDfread((char *)&temp32, sizeof(uint32_t), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -864,13 +864,13 @@ readFloatData(FILE *strm, struct Input *in)
*/
*bfp32 = temp32;
#ifdef H5DEBUGIMPORT
- HDprintf("readFloatData %ld (0x%.8X = 0x%.8X)\n", *bfp32, *bfp32, temp32);
+ printf("readFloatData %ld (0x%.8X = 0x%.8X)\n", *bfp32, *bfp32, temp32);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -881,7 +881,7 @@ readFloatData(FILE *strm, struct Input *in)
case 1: /* TEXTFP */
for (i = 0; i < len; i++, fp64++) {
if (HDfscanf(strm, "%lf", fp64) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -894,7 +894,7 @@ readFloatData(FILE *strm, struct Input *in)
for (i = 0; i < len; i++, fp64++) {
if (HDfscanf(strm, "%lf", fp64) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -906,7 +906,7 @@ readFloatData(FILE *strm, struct Input *in)
bfp64 = (uint64_t *)in->data;
for (i = 0; i < len; i++, bfp64++) {
if (HDfread((char *)&temp64, sizeof(uint64_t), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -916,19 +916,19 @@ readFloatData(FILE *strm, struct Input *in)
*/
*bfp64 = temp64;
#ifdef H5DEBUGIMPORT
- HDprintf("readFloatData %ld (0x%.16lX)\n", *bfp64, temp64);
+ printf("readFloatData %ld (0x%.16lX)\n", *bfp64, temp64);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
break;
}
return (0);
@@ -1111,7 +1111,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
*-------------------------------------------------------------------------
*/
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING\n");
+ printf("processStrHDFData DATATYPE STRING\n");
#endif
if ((type_id = H5Tcopy(H5T_C_S1)) < 0)
@@ -1149,7 +1149,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
}
H5E_END_TRY;
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING groups created\n");
+ printf("processStrHDFData DATATYPE STRING groups created\n");
#endif
if ((space_id = H5Screate_simple(in->rank, in->sizeOfDimension, NULL)) < 0)
@@ -1163,7 +1163,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
goto out;
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING ready to process strings\n");
+ printf("processStrHDFData DATATYPE STRING ready to process strings\n");
#endif
line = 0;
j = 0;
@@ -1173,27 +1173,27 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
str2 = NULL;
str3 = NULL;
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING[%llu]={%s}\n", (unsigned long long)line, str1);
+ printf("processStrHDFData DATATYPE STRING[%llu]={%s}\n", (unsigned long long)line, str1);
#endif
/* process string to remove the first and last quote char */
str2 = strchr(str1, '"');
if (str2 != NULL) {
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
#endif
str2++;
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
#endif
str3 = strrchr(str2, '"');
if (str3 != NULL) {
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str3), str3);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str3), str3);
#endif
*str3 = '\0';
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
#endif
if (HDstrlen(str2) > 0) {
@@ -1202,8 +1202,8 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
hsize_t count[1] = {1};
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING[%llu] store %s\n", (unsigned long long)line,
- str2);
+ printf("processStrHDFData DATATYPE STRING[%llu] store %s\n", (unsigned long long)line,
+ str2);
#endif
if ((fspace_id = H5Dget_space(dset_id)) < 0)
goto out;
@@ -1225,7 +1225,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
j++;
}
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING eof reached\n");
+ printf("processStrHDFData DATATYPE STRING eof reached\n");
#endif
/* close */
@@ -1238,7 +1238,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
out:
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING error exit\n");
+ printf("processStrHDFData DATATYPE STRING error exit\n");
#endif
/* disable error reporting */
H5E_BEGIN_TRY
@@ -1267,35 +1267,35 @@ allocateIntegerStorage(struct Input *in)
switch (in->inputSize) {
case 8:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_INT8))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_INT8))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 16:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_INT16))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_INT16))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 32:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_INT32))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_INT32))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 64:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_INT64))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_INT64))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
break;
}
return (0);
@@ -1314,35 +1314,35 @@ allocateUIntegerStorage(struct Input *in)
switch (in->inputSize) {
case 8:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_UINT8))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_UINT8))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 16:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_UINT16))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_UINT16))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 32:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_UINT32))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_UINT32))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 64:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_UINT64))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_UINT64))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
break;
}
return (0);
@@ -1361,21 +1361,21 @@ allocateFloatStorage(struct Input *in)
switch (in->inputSize) {
case 32:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_FLOAT32))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_FLOAT32))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 64:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_FLOAT64))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_FLOAT64))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
break;
}
return (0);
@@ -1446,24 +1446,24 @@ processConfigurationFile(char *infile, struct Input *in)
/* 0 for big endian, 1 for little endian. */
if ((*((volatile uint8_t *)(&ibyte))) == 0x67) {
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err11e);
+ (void)fprintf(stderr, "%s", err11e);
return (-1);
}
}
else {
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err11e);
+ (void)fprintf(stderr, "%s", err11e);
return (-1);
}
}
in->inputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
in->inputArchitecture = 0; /* default to NATIVE */
- if ((strm = HDfopen(infile, "r")) == NULL) {
- (void)HDfprintf(stderr, err1, infile);
+ if ((strm = fopen(infile, "r")) == NULL) {
+ (void)fprintf(stderr, err1, infile);
goto error;
}
@@ -1471,7 +1471,7 @@ processConfigurationFile(char *infile, struct Input *in)
if ((scanret == 1) && !HDstrcmp("HDF5", key)) {
#ifdef H5DEBUGIMPORT
int pndx;
- HDprintf("\nh5dump file\n");
+ printf("\nh5dump file\n");
#endif
in->h5dumpInput = 1;
scanret = HDfscanf(strm, "%254s", temp); /* filename */
@@ -1480,51 +1480,51 @@ processConfigurationFile(char *infile, struct Input *in)
while (scanret == 1) {
if (!HDstrcmp("DATASET", key)) { /* PATH */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASET key\n");
+ printf("h5dump DATASET key\n");
#endif
if (in->configOptionVector[PATH] == 1) {
- (void)HDfprintf(stderr, err3a, infile);
+ (void)fprintf(stderr, err3a, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASET %s found\n", temp);
+ printf("h5dump DATASET %s found\n", temp);
#endif
if (parsePathInfo(&in->path, temp) == -1) {
- (void)HDfprintf(stderr, err3b, infile);
+ (void)fprintf(stderr, err3b, infile);
goto error;
}
in->configOptionVector[PATH] = 1;
scanret = HDfscanf(strm, "%254s", temp); /* start bracket */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASET %s found\n", temp);
+ printf("h5dump DATASET %s found\n", temp);
#endif
} /* if(!HDstrcmp("DATASET", key)) PATH */
else if (!HDstrcmp("DATATYPE", key)) { /* INPUT-CLASS */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE key\n");
+ printf("h5dump DATATYPE key\n");
#endif
if (in->configOptionVector[INPUT_CLASS] == 1) {
- (void)HDfprintf(stderr, err4a, infile);
+ (void)fprintf(stderr, err4a, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE %s found\n", temp);
+ printf("h5dump DATATYPE %s found\n", temp);
#endif
if ((kindex = getInputClassType(in, temp)) == -1) {
- (void)HDfprintf(stderr, err4b, infile);
+ (void)fprintf(stderr, err4b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE type %d inputClass\n", in->inputClass);
+ printf("h5dump DATATYPE type %d inputClass\n", in->inputClass);
#endif
in->configOptionVector[INPUT_CLASS] = 1;
@@ -1539,80 +1539,80 @@ processConfigurationFile(char *infile, struct Input *in)
in->outputClass = 2;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE type %d outputClass\n", in->outputClass);
+ printf("h5dump DATATYPE type %d outputClass\n", in->outputClass);
#endif
if (in->inputClass == 5) { /* STRING */
int get_next_prop = 1;
in->outputClass = -1;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING found\n");
+ printf("h5dump DATATYPE STRING found\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING %s found\n", temp);
+ printf("h5dump DATATYPE STRING %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* string properties */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
while (get_next_prop) {
if (!HDstrcmp("STRSIZE", temp)) { /* STRSIZE */
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err19);
+ (void)fprintf(stderr, "%s", err19);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING STRSIZE %s found\n", temp);
+ printf("h5dump DATATYPE STRING STRSIZE %s found\n", temp);
#endif
if (HDstrcmp("H5T_VARIABLE;", temp) != 0) {
char *more = temp;
ival = (int)HDstrtol(more, &more, 10);
if (getInputSize(in, ival) == -1) {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING %d InputSize\n", in->inputSize);
+ printf("h5dump DATATYPE STRING %d InputSize\n", in->inputSize);
#endif
}
}
else if (!HDstrcmp("STRPAD", temp)) { /* STRPAD */
if (HDfscanf(strm, "%254s", temp) != 1) { /* STRPAD type */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING STRPAD %s found\n", temp);
+ printf("h5dump DATATYPE STRING STRPAD %s found\n", temp);
#endif
}
else if (!HDstrcmp("CSET", key)) { /* CSET */
if (HDfscanf(strm, "%254s", temp) != 1) { /* CSET type */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING CSET %s found\n", temp);
+ printf("h5dump DATATYPE STRING CSET %s found\n", temp);
#endif
}
else if (!HDstrcmp("CTYPE", temp)) { /* CTYPE */
if (HDfscanf(strm, "%254s", temp) != 1) { /* CTYPE type */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING CTYPE %s found\n", temp);
+ printf("h5dump DATATYPE STRING CTYPE %s found\n", temp);
#endif
} /* if(!HDstrcmp("CSET", key)) */
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING %s found\n", temp);
+ printf("h5dump DATATYPE STRING %s found\n", temp);
#endif
if (!HDstrcmp("}", temp)) { /* end bracket */
get_next_prop = 0;
@@ -1624,58 +1624,58 @@ processConfigurationFile(char *infile, struct Input *in)
hsize_t temp_dims[MAX_NUM_DIMENSION];
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE key\n");
+ printf("h5dump DATASPACE key\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
if (!HDstrcmp("SCALAR", temp)) { /* SCALAR */
in->rank = 0;
} /* if(!HDstrcmp("SCALAR", key)) */
else if (!HDstrcmp("NULL", temp)) { /* NULL */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
} /* else if(!HDstrcmp("NULL", key)) */
else if (!HDstrcmp("SIMPLE", temp)) { /* SIMPLE */
int icount = 0;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE found\n");
+ printf("h5dump DATASPACE SIMPLE found\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = HDstrtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp(")", temp)) { /* end paren */
in->rank = ++icount;
@@ -1685,71 +1685,71 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* Dimension */
icount++;
if (icount > MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
} /* while (get_next_dim) */
- if ((in->sizeOfDimension = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) ==
+ if ((in->sizeOfDimension = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) ==
NULL) {
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %ld rank\n", in->rank);
+ printf("h5dump DATASPACE SIMPLE %ld rank\n", in->rank);
#endif
for (i = 0; i < in->rank; i++) {
in->sizeOfDimension[i] = temp_dims[i];
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE dims[%ld]:", in->rank);
+ printf("h5dump DATASPACE SIMPLE dims[%ld]:", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->sizeOfDimension[pndx]);
+ printf(" %ld", in->sizeOfDimension[pndx]);
}
- HDprintf("\n");
+ printf("\n");
#endif
in->configOptionVector[DIM] = 1;
} /* if(!HDstrcmp("(", key)) start paren */
else {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp("/", temp)) { /* / max dims */
if ((in->maxsizeOfDimension =
- (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE process max dim values\n");
+ printf("h5dump DATASPACE SIMPLE process max dim values\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* max dim with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
while (get_next_dim) {
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE get max dim value\n");
+ printf("h5dump DATASPACE SIMPLE get max dim value\n");
#endif
if (!HDstrcmp("H5S_UNLIMITED", temp) ||
!HDstrcmp("H5S_UNLIMITED,", temp)) { /* unlimited */
@@ -1761,11 +1761,11 @@ processConfigurationFile(char *infile, struct Input *in)
in->maxsizeOfDimension[i] = HDstrtoull(more, &more, 10);
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* max dim or end paren */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp(")", temp)) { /* end paren */
get_next_dim = 0;
@@ -1773,85 +1773,85 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* comma */
i++;
if (i >= MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
} /* while (get_next_dim) */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE maxdims[%ld]:", in->rank);
+ printf("h5dump DATASPACE SIMPLE maxdims[%ld]:", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->maxsizeOfDimension[pndx]);
+ printf(" %ld", in->maxsizeOfDimension[pndx]);
}
- HDprintf("\n");
- HDprintf("h5dump DATASPACE SIMPLE get max dim finished\n");
+ printf("\n");
+ printf("h5dump DATASPACE SIMPLE get max dim finished\n");
#endif
} /* if(!HDstrcmp("(", key)) start paren */
else {
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
scanret = HDfscanf(strm, "%254s", temp); /* end bracket */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
} /* if(!HDstrcmp("/", key)) max dims separator */
} /* else if(!HDstrcmp("SIMPLE", key)) */
else {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
} /* else if(!HDstrcmp("DATASPACE", key)) RANK and DIMENSIONS */
else if (!HDstrcmp("STORAGE_LAYOUT", key)) { /* CHUNKED-DIMENSION-SIZES */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT key\n");
+ printf("h5dump STORAGE_LAYOUT key\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* CHUNKED */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT %s found\n", temp);
#endif
if (!HDstrcmp("CHUNKED", temp)) { /* CHUNKED */
- if ((in->sizeOfChunk = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "Unable to allocate dynamic memory.\n");
+ if ((in->sizeOfChunk = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (void)fprintf(stderr, "Unable to allocate dynamic memory.\n");
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int icount = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
while (get_next_dim) {
char *more = temp;
in->sizeOfChunk[icount] = HDstrtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
if (!HDstrcmp(")", temp)) { /* end paren */
in->configOptionVector[RANK] = 1;
@@ -1860,47 +1860,47 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* Dimension */
icount++;
if (icount > MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
} /* while (get_next_dim) */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED dims [%ld]:", in->rank);
+ printf("h5dump STORAGE_LAYOUT CHUNKED dims [%ld]:", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->sizeOfChunk[pndx]);
+ printf(" %ld", in->sizeOfChunk[pndx]);
}
- HDprintf("\n");
+ printf("\n");
#endif
in->configOptionVector[DIM] = 1;
} /* if(!HDstrcmp("(", key)) start paren */
else {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* SIZE */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
if (!HDstrcmp("SIZE", temp)) { /* SIZE */
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err19);
+ (void)fprintf(stderr, "%s", err19);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED SIZE %d found\n", ival);
+ printf("h5dump STORAGE_LAYOUT CHUNKED SIZE %d found\n", ival);
#endif
}
while (HDstrcmp("}", temp) != 0) {
if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
}
in->configOptionVector[CHUNK] = 1;
@@ -1908,135 +1908,135 @@ processConfigurationFile(char *infile, struct Input *in)
} /* else if(!HDstrcmp("STORAGE_LAYOUT", key)) CHUNKED-DIMENSION-SIZES */
else if (!HDstrcmp("FILTERS", key)) { /* FILTERS */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS key\n");
+ printf("h5dump FILTERS key\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS %s found\n", temp);
+ printf("h5dump FILTERS %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS %s found\n", temp);
+ printf("h5dump FILTERS %s found\n", temp);
#endif
if (!HDstrcmp("COMPRESSION", temp)) { /* COMPRESSION */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION found\n");
+ printf("h5dump FILTERS COMPRESSION found\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* DEFLATE */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp);
+ printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* bgin bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp);
+ printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* LEVEL */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp);
+ printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err19);
+ (void)fprintf(stderr, "%s", err19);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION LEVEL %d found\n", ival);
+ printf("h5dump FILTERS COMPRESSION LEVEL %d found\n", ival);
#endif
in->compressionParam = ival;
if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp);
+ printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
in->compressionType = 0; /* ONLY GZIP supported */
in->configOptionVector[COMPRESS] = 1;
}
else if (!HDstrcmp("CONTIGUOUS", temp)) { /* CONTIGUOUS */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS CONTIGUOUS found\n");
+ printf("h5dump FILTERS CONTIGUOUS found\n");
#endif
in->configOptionVector[COMPRESS] = 0;
}
else if (!HDstrcmp("NONE", temp)) { /* NONE */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS NONE found\n");
+ printf("h5dump FILTERS NONE found\n");
#endif
in->configOptionVector[COMPRESS] = 0;
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS %s found\n", temp);
+ printf("h5dump FILTERS %s found\n", temp);
#endif
}
else if (!HDstrcmp("SUBSET", key)) { /* reduce dimensions */
hsize_t temp_dims[MAX_NUM_DIMENSION];
int get_next_prop = 1;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET key\n");
+ printf("h5dump SUBSET key\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, err20, infile);
+ (void)fprintf(stderr, err20, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* SUBSET keyword */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
while (get_next_prop) {
if (!HDstrcmp("COUNT", temp)) { /* COUNT */
int icount = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET COUNT [%s] found\n", temp);
+ printf("h5dump SUBSET COUNT [%s] found\n", temp);
#endif
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = HDstrtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET COUNT %s found\n", temp);
+ printf("h5dump SUBSET COUNT %s found\n", temp);
#endif
if (!HDstrcmp(");", temp)) { /* end paren */
in->rank = ++icount;
@@ -2046,7 +2046,7 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* Dimension */
icount++;
if (icount >= MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
@@ -2055,11 +2055,11 @@ processConfigurationFile(char *infile, struct Input *in)
in->sizeOfDimension[i] = temp_dims[i];
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET COUNT dims: [%d]", in->rank);
+ printf("h5dump SUBSET COUNT dims: [%d]", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->sizeOfDimension[pndx]);
+ printf(" %ld", in->sizeOfDimension[pndx]);
}
- HDprintf("\n");
+ printf("\n");
#endif
in->configOptionVector[DIM] = 1;
} /* if(!HDstrcmp("(", key)) start paren */
@@ -2067,32 +2067,32 @@ processConfigurationFile(char *infile, struct Input *in)
if (!HDstrcmp("BLOCK", temp)) { /* BLOCK */
int icount = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET BLOCK [%s] found\n", temp);
+ printf("h5dump SUBSET BLOCK [%s] found\n", temp);
#endif
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = HDstrtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET BLOCK %s found\n", temp);
+ printf("h5dump SUBSET BLOCK %s found\n", temp);
#endif
if (!HDstrcmp(");", temp)) { /* end paren */
in->rank = ++icount;
@@ -2102,7 +2102,7 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* Dimension */
icount++;
if (icount > MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
@@ -2111,21 +2111,21 @@ processConfigurationFile(char *infile, struct Input *in)
in->sizeOfDimension[i] = in->sizeOfDimension[i] * temp_dims[i];
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET BLOCK dims: [%d]", in->rank);
+ printf("h5dump SUBSET BLOCK dims: [%d]", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->sizeOfDimension[pndx]);
+ printf(" %ld", in->sizeOfDimension[pndx]);
}
- HDprintf("\n");
+ printf("\n");
#endif
in->configOptionVector[DIM] = 1;
} /* if(!HDstrcmp("(", key)) start paren */
} /* if(!HDstrcmp("BLOCK", temp)) BLOCK */
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
if (!HDstrcmp("}", temp)) { /* end bracket */
get_next_prop = 0;
@@ -2134,7 +2134,7 @@ processConfigurationFile(char *infile, struct Input *in)
} /* else if(!HDstrcmp("SUBSET", key)) */
else if (!HDstrcmp("DATA", key)) { /* FINISHED */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATA key\n");
+ printf("h5dump DATA key\n");
#endif
scanret = 0;
break;
@@ -2142,50 +2142,50 @@ processConfigurationFile(char *infile, struct Input *in)
scanret = HDfscanf(strm, "%254s", key);
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump path");
+ printf("h5dump path");
for (pndx = 0; pndx < in->path.count; pndx++) {
- HDprintf(" : %s", in->path.group[pndx]);
+ printf(" : %s", in->path.group[pndx]);
}
- HDprintf("\n");
- HDprintf("h5dump inputClass=%d\n", in->inputClass);
- HDprintf("h5dump inputSize=%d\n", in->inputSize);
- HDprintf("h5dump inputArchitecture=%d\n", in->inputArchitecture);
- HDprintf("h5dump inputByteOrder=%d\n", in->inputByteOrder);
- HDprintf("h5dump rank=%d\n", in->rank);
- HDprintf("h5dump outputClass=%d\n", in->outputClass);
- HDprintf("h5dump outputSize=%d\n", in->outputSize);
- HDprintf("h5dump outputArchitecture=%d\n", in->outputArchitecture);
- HDprintf("h5dump outputByteOrder=%d\n", in->outputByteOrder);
- HDprintf("h5dump compressionType=%d\n", in->compressionType);
- HDprintf("h5dump compressionParam=%d\n", in->compressionParam);
- HDprintf("h5dump externFilename=%s\n", in->externFilename);
- HDprintf("h5dump sizeOfDimensions:\n");
+ printf("\n");
+ printf("h5dump inputClass=%d\n", in->inputClass);
+ printf("h5dump inputSize=%d\n", in->inputSize);
+ printf("h5dump inputArchitecture=%d\n", in->inputArchitecture);
+ printf("h5dump inputByteOrder=%d\n", in->inputByteOrder);
+ printf("h5dump rank=%d\n", in->rank);
+ printf("h5dump outputClass=%d\n", in->outputClass);
+ printf("h5dump outputSize=%d\n", in->outputSize);
+ printf("h5dump outputArchitecture=%d\n", in->outputArchitecture);
+ printf("h5dump outputByteOrder=%d\n", in->outputByteOrder);
+ printf("h5dump compressionType=%d\n", in->compressionType);
+ printf("h5dump compressionParam=%d\n", in->compressionParam);
+ printf("h5dump externFilename=%s\n", in->externFilename);
+ printf("h5dump sizeOfDimensions:\n");
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld\n", in->sizeOfDimension[pndx]);
+ printf(" %ld\n", in->sizeOfDimension[pndx]);
}
#endif
}
else {
#ifdef H5DEBUGIMPORT
- HDprintf("original option keyword parsing\n");
+ printf("original option keyword parsing\n");
#endif
while (scanret == 1) {
if ((kindex = mapKeywordToIndex(key)) == -1) {
- (void)HDfprintf(stderr, err2, key, infile);
+ (void)fprintf(stderr, err2, key, infile);
goto error;
}
switch (kindex) {
case 0: /* PATH */
if (in->configOptionVector[PATH] == 1) {
- (void)HDfprintf(stderr, err3a, infile);
+ (void)fprintf(stderr, err3a, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
if (parsePathInfo(&in->path, temp) == -1) {
- (void)HDfprintf(stderr, err3b, infile);
+ (void)fprintf(stderr, err3b, infile);
goto error;
}
in->configOptionVector[PATH] = 1;
@@ -2193,16 +2193,16 @@ processConfigurationFile(char *infile, struct Input *in)
case 1: /* INPUT-CLASS */
if (in->configOptionVector[INPUT_CLASS] == 1) {
- (void)HDfprintf(stderr, err4a, infile);
+ (void)fprintf(stderr, err4a, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
if (getInputClass(in, temp) == -1) {
- (void)HDfprintf(stderr, err4b, infile);
+ (void)fprintf(stderr, err4b, infile);
goto error;
}
@@ -2221,15 +2221,15 @@ processConfigurationFile(char *infile, struct Input *in)
case 2: /* INPUT-SIZE */
if (in->configOptionVector[INPUT_SIZE] == 1) {
- (void)HDfprintf(stderr, err5a, infile);
+ (void)fprintf(stderr, err5a, infile);
goto error;
}
if (HDfscanf(strm, "%254d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err19);
+ (void)fprintf(stderr, "%s", err19);
goto error;
}
if (getInputSize(in, ival) == -1) {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2241,12 +2241,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 3: /* RANK */
if (in->configOptionVector[RANK] == 1) {
- (void)HDfprintf(stderr, err6a, infile);
+ (void)fprintf(stderr, err6a, infile);
goto error;
}
if (getRank(in, strm) == -1) {
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
in->configOptionVector[RANK] = 1;
@@ -2254,16 +2254,16 @@ processConfigurationFile(char *infile, struct Input *in)
case 4: /* DIMENSION-SIZES */
if (in->configOptionVector[DIM] == 1) {
- (void)HDfprintf(stderr, err7a, infile);
+ (void)fprintf(stderr, err7a, infile);
goto error;
}
if (in->configOptionVector[RANK] == 0) {
- (void)HDfprintf(stderr, err7b, infile);
+ (void)fprintf(stderr, err7b, infile);
goto error;
}
if (getDimensionSizes(in, strm) == -1) {
- (void)HDfprintf(stderr, err7c, infile);
+ (void)fprintf(stderr, err7c, infile);
goto error;
}
in->configOptionVector[DIM] = 1;
@@ -2271,12 +2271,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 5: /* OUTPUT-CLASS */
if (in->configOptionVector[OUTPUT_CLASS] == 1) {
- (void)HDfprintf(stderr, err8a, infile);
+ (void)fprintf(stderr, err8a, infile);
goto error;
}
if (getOutputClass(in, strm) == -1) {
- (void)HDfprintf(stderr, err8b, infile);
+ (void)fprintf(stderr, err8b, infile);
goto error;
}
in->configOptionVector[OUTPUT_CLASS] = 1;
@@ -2284,12 +2284,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 6: /* OUTPUT-SIZE */
if (in->configOptionVector[OUTPUT_SIZE] == 1) {
- (void)HDfprintf(stderr, err9a, infile);
+ (void)fprintf(stderr, err9a, infile);
goto error;
}
if (getOutputSize(in, strm) == -1) {
- (void)HDfprintf(stderr, err9b, infile);
+ (void)fprintf(stderr, err9b, infile);
goto error;
}
in->configOptionVector[OUTPUT_SIZE] = 1;
@@ -2297,12 +2297,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 7: /* OUTPUT-ARCHITECTURE */
if (in->configOptionVector[OUTPUT_ARCH] == 1) {
- (void)HDfprintf(stderr, err10a, infile);
+ (void)fprintf(stderr, err10a, infile);
goto error;
}
if (getOutputArchitecture(in, strm) == -1) {
- (void)HDfprintf(stderr, err10b, infile);
+ (void)fprintf(stderr, err10b, infile);
goto error;
}
in->configOptionVector[OUTPUT_ARCH] = 1;
@@ -2310,12 +2310,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 8: /* OUTPUT-BYTE-ORDER */
if (in->configOptionVector[OUTPUT_B_ORDER] == 1) {
- (void)HDfprintf(stderr, err11a, infile);
+ (void)fprintf(stderr, err11a, infile);
goto error;
}
if (getOutputByteOrder(in, strm) == -1) {
- (void)HDfprintf(stderr, err11b, infile);
+ (void)fprintf(stderr, err11b, infile);
goto error;
}
in->configOptionVector[OUTPUT_B_ORDER] = 1;
@@ -2323,17 +2323,17 @@ processConfigurationFile(char *infile, struct Input *in)
case 9: /* CHUNKED-DIMENSION-SIZES */
if (in->configOptionVector[CHUNK] == 1) {
- (void)HDfprintf(stderr, err12a, infile);
+ (void)fprintf(stderr, err12a, infile);
goto error;
}
/* can't appear before dimension sizes have been provided */
if (in->configOptionVector[DIM] == 0) {
- (void)HDfprintf(stderr, err12b, infile);
+ (void)fprintf(stderr, err12b, infile);
goto error;
}
if (getChunkedDimensionSizes(in, strm) == -1) {
- (void)HDfprintf(stderr, err12c, infile);
+ (void)fprintf(stderr, err12c, infile);
goto error;
}
in->configOptionVector[CHUNK] = 1;
@@ -2341,12 +2341,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 10: /* COMPRESSION-TYPE */
if (in->configOptionVector[COMPRESS] == 1) {
- (void)HDfprintf(stderr, err13a, infile);
+ (void)fprintf(stderr, err13a, infile);
goto error;
}
if (getCompressionType(in, strm) == -1) {
- (void)HDfprintf(stderr, err13b, infile);
+ (void)fprintf(stderr, err13b, infile);
goto error;
}
in->configOptionVector[COMPRESS] = 1;
@@ -2359,12 +2359,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 11: /* COMPRESSION-PARAM */
if (in->configOptionVector[COMPRESS_PARAM] == 1) {
- (void)HDfprintf(stderr, err14a, infile);
+ (void)fprintf(stderr, err14a, infile);
goto error;
}
if (getCompressionParameter(in, strm) == -1) {
- (void)HDfprintf(stderr, err14b, infile);
+ (void)fprintf(stderr, err14b, infile);
goto error;
}
@@ -2377,12 +2377,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 12: /* EXTERNAL-STORAGE */
if (in->configOptionVector[EXTERNALSTORE] == 1) {
- (void)HDfprintf(stderr, err15a, infile);
+ (void)fprintf(stderr, err15a, infile);
goto error;
}
if (getExternalFilename(in, strm) == -1) {
- (void)HDfprintf(stderr, err15b, infile);
+ (void)fprintf(stderr, err15b, infile);
goto error;
}
in->configOptionVector[EXTERNALSTORE] = 1;
@@ -2390,16 +2390,16 @@ processConfigurationFile(char *infile, struct Input *in)
case 13: /* MAXIMUM-DIMENSIONS */
if (in->configOptionVector[EXTEND] == 1) {
- (void)HDfprintf(stderr, err16a, infile);
+ (void)fprintf(stderr, err16a, infile);
goto error;
}
/* can't appear before dimension sizes have been provided */
if (in->configOptionVector[DIM] == 0) {
- (void)HDfprintf(stderr, err16b, infile);
+ (void)fprintf(stderr, err16b, infile);
goto error;
}
if (getMaximumDimensionSizes(in, strm) == -1) {
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
in->configOptionVector[EXTEND] = 1;
@@ -2407,12 +2407,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 14: /* INPUT-BYTE-ORDER */
if (in->configOptionVector[INPUT_B_ORDER] == 1) {
- (void)HDfprintf(stderr, err11c, infile);
+ (void)fprintf(stderr, err11c, infile);
goto error;
}
if (getInputByteOrder(in, strm) == -1) {
- (void)HDfprintf(stderr, err11d, infile);
+ (void)fprintf(stderr, err11d, infile);
goto error;
}
in->configOptionVector[INPUT_B_ORDER] = 1;
@@ -2430,7 +2430,7 @@ processConfigurationFile(char *infile, struct Input *in)
*/
if (validateConfigurationParameters(in) == -1) {
- (void)HDfprintf(stderr, err17, infile);
+ (void)fprintf(stderr, err17, infile);
goto error;
}
}
@@ -2463,21 +2463,21 @@ validateConfigurationParameters(struct Input *in)
return (0);
if ((in->configOptionVector[DIM] != 1) || (in->configOptionVector[RANK] != 1)) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if (in->configOptionVector[EXTERNALSTORE] == 1) {
if ((in->configOptionVector[COMPRESS] == 1) || (in->configOptionVector[CHUNK] == 1) ||
(in->configOptionVector[EXTEND] == 1)) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
}
if ((in->configOptionVector[COMPRESS] == 1) || (in->configOptionVector[EXTEND] == 1)) {
if (in->configOptionVector[CHUNK] != 1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -2485,20 +2485,20 @@ validateConfigurationParameters(struct Input *in)
/* Arch can't be STD if O/p class is FP */
if (in->outputArchitecture == 1)
if (in->outputClass == 1) {
- (void)HDfprintf(stderr, "%s", err4a);
+ (void)fprintf(stderr, "%s", err4a);
return (-1);
}
/* Arch can't be IEEE if O/p class is IN */
if (in->outputArchitecture == 2)
if (in->outputClass == 0) {
- (void)HDfprintf(stderr, "%s", err4b);
+ (void)fprintf(stderr, "%s", err4b);
return (-1);
}
if (in->outputClass == 1)
if (in->outputSize != 32 && in->outputSize != 64) {
- (void)HDfprintf(stderr, "%s", err5);
+ (void)fprintf(stderr, "%s", err5);
return (-1);
}
@@ -2526,7 +2526,7 @@ parsePathInfo(struct path_info *path, char *temp)
token = HDstrtok(temp, delimiter);
if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
HDstrcpy(path->group[i++], token);
@@ -2536,7 +2536,7 @@ parsePathInfo(struct path_info *path, char *temp)
if (token == NULL)
break;
if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
HDstrcpy(path->group[i++], token);
@@ -2565,8 +2565,8 @@ parseDimensions(struct Input *in, char *strm)
i++;
}
in->rank = i + 1;
- if ((in->sizeOfDimension = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->sizeOfDimension = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2593,12 +2593,12 @@ getOutputClass(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for output class.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputClassStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -2628,7 +2628,7 @@ getOutputSize(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for output size.\n";
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2637,7 +2637,7 @@ getOutputSize(struct Input *in, FILE *strm)
in->outputSize = ival;
return (0);
}
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -2648,7 +2648,7 @@ getInputClass(struct Input *in, char *temp)
const char *err1 = "Invalid value for input class.\n";
if ((kindex = InputClassStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2669,18 +2669,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2690,18 +2690,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2711,18 +2711,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2732,18 +2732,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2753,18 +2753,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2774,18 +2774,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2795,18 +2795,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2816,18 +2816,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2837,18 +2837,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2858,18 +2858,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2879,18 +2879,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2900,18 +2900,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2921,18 +2921,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2942,18 +2942,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2963,18 +2963,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2984,18 +2984,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -3005,7 +3005,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3017,7 +3017,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3029,7 +3029,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3041,7 +3041,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3053,7 +3053,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3065,7 +3065,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3077,7 +3077,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3089,7 +3089,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3101,7 +3101,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3113,7 +3113,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3125,18 +3125,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("IEEE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
@@ -3146,18 +3146,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("IEEE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
@@ -3167,18 +3167,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("IEEE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
@@ -3188,18 +3188,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("IEEE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
@@ -3221,7 +3221,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3233,7 +3233,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3245,7 +3245,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3262,18 +3262,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B8BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3281,18 +3281,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B8LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3300,18 +3300,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B16BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3319,18 +3319,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B16LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3338,18 +3338,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B32BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3357,18 +3357,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B32LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3376,18 +3376,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B64BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3395,18 +3395,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B64LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3437,7 +3437,7 @@ getInputClassType(struct Input *in, char *buffer)
}
if (kindex == -1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3445,9 +3445,9 @@ getInputClassType(struct Input *in, char *buffer)
if (in->configOptionVector[OUTPUT_SIZE] == 0)
in->outputSize = in->inputSize;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE InClass %d inputSize\n", in->inputSize);
- HDprintf("h5dump DATATYPE InClass %d outputSize\n", in->outputSize);
- HDprintf("h5dump DATATYPE InClass %d outputArchitecture\n", in->outputArchitecture);
+ printf("h5dump DATATYPE InClass %d inputSize\n", in->inputSize);
+ printf("h5dump DATATYPE InClass %d outputSize\n", in->outputSize);
+ printf("h5dump DATATYPE InClass %d outputArchitecture\n", in->outputArchitecture);
#endif
in->inputClass = kindex;
@@ -3478,7 +3478,7 @@ getInputSize(struct Input *in, int ival)
in->inputSize = ival;
return (0);
}
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3491,12 +3491,12 @@ getInputByteOrder(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for input byte-order.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputByteOrderStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3513,7 +3513,7 @@ getRank(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for rank.\n";
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if (ival >= MIN_NUM_DIMENSION && ival <= MAX_NUM_DIMENSION) {
@@ -3521,7 +3521,7 @@ getRank(struct Input *in, FILE *strm)
return (0);
}
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3536,8 +3536,8 @@ getDimensionSizes(struct Input *in, FILE *strm)
const char *err2 =
"No. of dimensions for which dimension sizes provided is not equal to provided rank.\n";
- if ((in->sizeOfDimension = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->sizeOfDimension = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3545,7 +3545,7 @@ getDimensionSizes(struct Input *in, FILE *strm)
in->sizeOfDimension[i++] = ullval;
if (in->rank != i) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
return (0);
@@ -3562,8 +3562,8 @@ getChunkedDimensionSizes(struct Input *in, FILE *strm)
"No. of dimensions for which chunked dimension sizes provided is not equal to provided rank.\n";
const char *err3 = "The CHUNKED-DIMENSION-SIZES cannot exceed the sizes of DIMENSION-SIZES\n";
- if ((in->sizeOfChunk = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->sizeOfChunk = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3571,13 +3571,13 @@ getChunkedDimensionSizes(struct Input *in, FILE *strm)
in->sizeOfChunk[i++] = ullval;
if (in->rank != i) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
for (i = 0; i < in->rank; i++)
if (in->sizeOfChunk[i] > in->sizeOfDimension[i]) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
return (0);
@@ -3595,8 +3595,8 @@ getMaximumDimensionSizes(struct Input *in, FILE *strm)
const char *err3 = "The MAXIMUM-DIMENSIONS cannot be less than the sizes of DIMENSION-SIZES. Exception: "
"can be -1 to indicate unlimited size\n";
- if ((in->maxsizeOfDimension = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->maxsizeOfDimension = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3608,14 +3608,14 @@ getMaximumDimensionSizes(struct Input *in, FILE *strm)
}
if (in->rank != i) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
for (i = 0; i < in->rank; i++) {
if (in->maxsizeOfDimension[i] != H5S_UNLIMITED)
if (in->maxsizeOfDimension[i] < in->sizeOfDimension[i]) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -3631,12 +3631,12 @@ getOutputArchitecture(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for output architecture.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputArchStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3664,12 +3664,12 @@ getOutputByteOrder(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for output byte-order.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputByteOrderStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3697,12 +3697,12 @@ getCompressionType(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for compression.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = CompressionTypeStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3739,19 +3739,19 @@ getCompressionParameter(struct Input *in, FILE *strm)
switch (in->compressionType) {
case 0: /* GZIP */
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if (ival < 0 || ival > 9) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->compressionParam = ival;
return (0);
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -3764,12 +3764,12 @@ getExternalFilename(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
temp_len = HDstrlen(temp);
- in->externFilename = (char *)HDmalloc((temp_len + 1) * sizeof(char));
+ in->externFilename = (char *)malloc((temp_len + 1) * sizeof(char));
(void)HDstrcpy(in->externFilename, temp);
in->externFilename[temp_len] = '\0';
return (0);
@@ -3836,7 +3836,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->outputByteOrder) {
@@ -3851,7 +3851,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -3870,7 +3870,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -3887,7 +3887,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -3904,7 +3904,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -3921,19 +3921,19 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
@@ -3951,7 +3951,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->outputByteOrder) {
@@ -3966,13 +3966,13 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
case 1:
- (void)HDfprintf(stderr, "%s", err5);
+ (void)fprintf(stderr, "%s", err5);
return (-1);
case 2:
@@ -3989,7 +3989,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4006,19 +4006,19 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
@@ -4044,7 +4044,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->outputByteOrder) {
@@ -4059,7 +4059,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4078,7 +4078,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4095,7 +4095,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4112,7 +4112,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4129,29 +4129,29 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
case 2:
- (void)HDfprintf(stderr, "%s", err6);
+ (void)fprintf(stderr, "%s", err6);
return (-1);
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
return new_type;
@@ -4191,7 +4191,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->inputByteOrder) {
@@ -4206,7 +4206,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4225,7 +4225,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4242,7 +4242,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4259,7 +4259,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4276,19 +4276,19 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
@@ -4306,7 +4306,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->inputByteOrder) {
@@ -4321,13 +4321,13 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
case 1:
- (void)HDfprintf(stderr, "%s", err5);
+ (void)fprintf(stderr, "%s", err5);
return (-1);
case 2:
@@ -4344,7 +4344,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4361,19 +4361,19 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
@@ -4399,7 +4399,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->inputByteOrder) {
@@ -4414,7 +4414,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4433,7 +4433,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4450,7 +4450,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4467,7 +4467,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4484,29 +4484,29 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
case 2:
- (void)HDfprintf(stderr, "%s", err6);
+ (void)fprintf(stderr, "%s", err6);
return (-1);
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -4532,7 +4532,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -4550,13 +4550,13 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
case 5:
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
break;
@@ -4580,13 +4580,13 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -4624,7 +4624,7 @@ process(struct Options *opt)
{
if ((file_id = H5Fopen(opt->outfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
if ((file_id = H5Fcreate(opt->outfile, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) == FAIL) {
- (void)HDfprintf(stderr, err1, opt->outfile);
+ (void)fprintf(stderr, err1, opt->outfile);
return (-1);
}
}
@@ -4635,13 +4635,13 @@ process(struct Options *opt)
in = &(opt->infiles[k].in);
if (opt->infiles[k].config == 1) {
if (processConfigurationFile(opt->infiles[k].configfile, in) == -1) {
- (void)HDfprintf(stderr, err2, opt->infiles[k].configfile);
+ (void)fprintf(stderr, err2, opt->infiles[k].configfile);
return (-1);
}
}
if (processDataFile(opt->infiles[k].datafile, in, file_id) == -1) {
- (void)HDfprintf(stderr, err3, opt->infiles[k].datafile);
+ (void)fprintf(stderr, err3, opt->infiles[k].datafile);
return (-1);
}
@@ -4683,7 +4683,7 @@ process(struct Options *opt)
intype = createInputDataType(in);
outtype = createOutputDataType(in);
#ifdef H5DEBUGIMPORT
- HDprintf("process intype %ld outtype %ld\n", intype, outtype);
+ printf("process intype %ld outtype %ld\n", intype, outtype);
#endif
/* create property list */
@@ -4700,8 +4700,8 @@ process(struct Options *opt)
if (in->configOptionVector[EXTERNALSTORE] == 1) {
/* creating the external file if it doesn't exist */
- if ((extfile = HDfopen(in->externFilename, "ab")) == NULL) {
- (void)HDfprintf(stderr, "%s", err4);
+ if ((extfile = fopen(in->externFilename, "ab")) == NULL) {
+ (void)fprintf(stderr, "%s", err4);
H5Pclose(proplist);
H5Sclose(dataspace);
H5Fclose(file_id);
@@ -4724,7 +4724,7 @@ process(struct Options *opt)
/* create data set */
if ((dataset = H5Dcreate2(handle, in->path.group[j], outtype, dataspace, H5P_DEFAULT,
proplist, H5P_DEFAULT)) < 0) {
- (void)HDfprintf(stderr, "%s", err5);
+ (void)fprintf(stderr, "%s", err5);
H5Pclose(proplist);
H5Sclose(dataspace);
H5Fclose(file_id);
@@ -4737,7 +4737,7 @@ process(struct Options *opt)
/* write dataset */
if (H5Dwrite(dataset, intype, H5S_ALL, H5S_ALL, H5P_DEFAULT, (VOIDP)in->data) < 0) {
- (void)HDfprintf(stderr, "%s", err6);
+ (void)fprintf(stderr, "%s", err6);
H5Dclose(dataset);
H5Pclose(proplist);
H5Sclose(dataspace);
@@ -4813,292 +4813,292 @@ swap_uint64(uint64_t val)
void
help(char *name)
{
- (void)HDfprintf(stdout, "Name:\n\n");
- (void)HDfprintf(stdout, "\t%s\n\n", name);
- (void)HDfprintf(stdout, "\t TOOL NAME:\n");
- (void)HDfprintf(stdout, "\t %s\n", name);
- (void)HDfprintf(stdout, "\t SYNTAX:\n");
- (void)HDfprintf(stdout, "\t %s -h[elp], OR\n", name);
- (void)HDfprintf(stdout, "\t %s <infile> -c[onfig] <configfile> [<infile> -c[config] <configfile>...]",
- name);
- (void)HDfprintf(stdout, "\t\t\t\t -o[utfile] <outfile>\n\n");
- (void)HDfprintf(stdout, "\t PURPOSE:\n");
- (void)HDfprintf(stdout, "\t To convert data stored in one or more ASCII or binary files\n");
- (void)HDfprintf(stdout, "\t into one or more datasets (in accordance with the \n");
- (void)HDfprintf(stdout, "\t user-specified type and storage properties) in an existing \n");
- (void)HDfprintf(stdout, "\t or new HDF5 file.\n\n");
- (void)HDfprintf(stdout, "\t DESCRIPTION:\n");
- (void)HDfprintf(stdout, "\t The primary objective of the utility is to convert floating\n");
- (void)HDfprintf(stdout, "\t point or integer data stored in ASCII text or binary form \n");
- (void)HDfprintf(stdout, "\t into a data-set according to the type and storage properties\n");
- (void)HDfprintf(stdout, "\t specified by the user. The utility can also accept ASCII\n");
- (void)HDfprintf(stdout, "\t text files and store the contents in a compact form as an\n");
- (void)HDfprintf(stdout, "\t array of one-dimensional strings.\n\n");
- (void)HDfprintf(stdout, "\t The input data to be written as a data-set can be provided\n");
- (void)HDfprintf(stdout, "\t to the utility in one of the following forms:\n");
- (void)HDfprintf(stdout, "\t 1. ASCII text file with numeric data (floating point or \n");
- (void)HDfprintf(stdout, "\t integer data). \n");
- (void)HDfprintf(stdout, "\t 2. Binary file with native floating point data (32-bit or \n");
- (void)HDfprintf(stdout, "\t 64-bit) \n");
- (void)HDfprintf(stdout, "\t 3. Binary file with native integer (signed or unsigned)\n");
- (void)HDfprintf(stdout, "\t data (8-bit or 16-bit or 32-bit or 64-bit). \n");
- (void)HDfprintf(stdout, "\t 4. ASCII text file containing strings (text data).\n");
- (void)HDfprintf(stdout, "\t \n");
- (void)HDfprintf(stdout, "\t Every input file is associated with a configuration file \n");
- (void)HDfprintf(stdout, "\t also provided as an input to the utility. (See Section \n");
- (void)HDfprintf(stdout, "\t \"CONFIGURATION FILE\" to know how it is to be organized).\n");
- (void)HDfprintf(stdout, "\t The class, size and dimensions of the input data is \n");
- (void)HDfprintf(stdout, "\t specified in this configuration file. A point to note is\n");
- (void)HDfprintf(stdout, "\t that the floating point data in the ASCII text file may be\n");
- (void)HDfprintf(stdout, "\t organized in the fixed floating form (for example 323.56)\n");
- (void)HDfprintf(stdout, "\t or in a scientific notation (for example 3.23E+02). A \n");
- (void)HDfprintf(stdout, "\t different input-class specification is to be used for both\n");
- (void)HDfprintf(stdout, "\t forms.\n\n");
- (void)HDfprintf(stdout, "\t The utility extracts the input data from the input file \n");
- (void)HDfprintf(stdout, "\t according to the specified parameters and saves it into \n");
- (void)HDfprintf(stdout, "\t an H5 dataset. \n\n");
- (void)HDfprintf(stdout, "\t The user can specify output type and storage properties in \n");
- (void)HDfprintf(stdout, "\t the configuration file. The user is required to specify the \n");
- (void)HDfprintf(stdout, "\t path of the dataset. If the groups in the path leading to \n");
- (void)HDfprintf(stdout, "\t the data-set do not exist, the groups will be created by the\n");
- (void)HDfprintf(stdout, "\t utility. If no group is specified, the dataset will be\n");
- (void)HDfprintf(stdout, "\t created under the root group.\n\n");
- (void)HDfprintf(stdout, "\t In addition to the name, the user is also required to \n");
- (void)HDfprintf(stdout, "\t provide the class and size of output data to be written to \n");
- (void)HDfprintf(stdout, "\t the dataset and may optionally specify the output-architecture,\n");
- (void)HDfprintf(stdout, "\t and the output-byte-order. If output-architecture is not \n");
- (void)HDfprintf(stdout, "\t specified the default is NATIVE. Output-byte-orders are fixed\n");
- (void)HDfprintf(stdout, "\t for some architectures and may be specified only if output-\n");
- (void)HDfprintf(stdout, "\t architecture is IEEE, UNIX or STD.\n\n");
- (void)HDfprintf(stdout, "\t Also, layout and other storage properties such as \n");
- (void)HDfprintf(stdout, "\t compression, external storage and extendible data-sets may be\n");
- (void)HDfprintf(stdout, "\t optionally specified. The layout and storage properties \n");
- (void)HDfprintf(stdout, "\t denote how raw data is to be organized on the disk. If these \n");
- (void)HDfprintf(stdout, "\t options are not specified the default is Contiguous layout \n");
- (void)HDfprintf(stdout, "\t and storage.\n\n");
- (void)HDfprintf(stdout, "\t The dataset can be organized in any of the following ways:\n");
- (void)HDfprintf(stdout, "\t 1. Contiguous.\n");
- (void)HDfprintf(stdout, "\t 2. Chunked.\n");
- (void)HDfprintf(stdout, "\t 3. External Storage File (has to be contiguous)\n");
- (void)HDfprintf(stdout, "\t 4. Extendible data sets (has to be chunked)\n");
- (void)HDfprintf(stdout, "\t 5. Compressed. (has to be chunked)\n");
- (void)HDfprintf(stdout, "\t 6. Compressed & Extendible (has to be chunked)\n\n");
- (void)HDfprintf(stdout, "\t If the user wants to store raw data in a non-HDF file then \n");
- (void)HDfprintf(stdout, "\t the external storage file option is to be used and the name \n");
- (void)HDfprintf(stdout, "\t of the file is to be specified. \n\n");
- (void)HDfprintf(stdout, "\t If the user wants the dimensions of the data-set to be\n");
- (void)HDfprintf(stdout, "\t unlimited, the extendible data set option can be chosen. \n\n");
- (void)HDfprintf(stdout, "\t The user may also specify the type of compression and the \n");
- (void)HDfprintf(stdout, "\t level to which the data set must be compresses by setting \n");
- (void)HDfprintf(stdout, "\t the compressed option.\n\n");
- (void)HDfprintf(stdout, "\t SYNOPSIS:\n");
- (void)HDfprintf(stdout, "\t h5import -h[elp], OR\n");
- (void)HDfprintf(stdout, "\t h5import <infile> -c[onfig] <configfile> \
+ (void)fprintf(stdout, "Name:\n\n");
+ (void)fprintf(stdout, "\t%s\n\n", name);
+ (void)fprintf(stdout, "\t TOOL NAME:\n");
+ (void)fprintf(stdout, "\t %s\n", name);
+ (void)fprintf(stdout, "\t SYNTAX:\n");
+ (void)fprintf(stdout, "\t %s -h[elp], OR\n", name);
+ (void)fprintf(stdout, "\t %s <infile> -c[onfig] <configfile> [<infile> -c[config] <configfile>...]",
+ name);
+ (void)fprintf(stdout, "\t\t\t\t -o[utfile] <outfile>\n\n");
+ (void)fprintf(stdout, "\t PURPOSE:\n");
+ (void)fprintf(stdout, "\t To convert data stored in one or more ASCII or binary files\n");
+ (void)fprintf(stdout, "\t into one or more datasets (in accordance with the \n");
+ (void)fprintf(stdout, "\t user-specified type and storage properties) in an existing \n");
+ (void)fprintf(stdout, "\t or new HDF5 file.\n\n");
+ (void)fprintf(stdout, "\t DESCRIPTION:\n");
+ (void)fprintf(stdout, "\t The primary objective of the utility is to convert floating\n");
+ (void)fprintf(stdout, "\t point or integer data stored in ASCII text or binary form \n");
+ (void)fprintf(stdout, "\t into a data-set according to the type and storage properties\n");
+ (void)fprintf(stdout, "\t specified by the user. The utility can also accept ASCII\n");
+ (void)fprintf(stdout, "\t text files and store the contents in a compact form as an\n");
+ (void)fprintf(stdout, "\t array of one-dimensional strings.\n\n");
+ (void)fprintf(stdout, "\t The input data to be written as a data-set can be provided\n");
+ (void)fprintf(stdout, "\t to the utility in one of the following forms:\n");
+ (void)fprintf(stdout, "\t 1. ASCII text file with numeric data (floating point or \n");
+ (void)fprintf(stdout, "\t integer data). \n");
+ (void)fprintf(stdout, "\t 2. Binary file with native floating point data (32-bit or \n");
+ (void)fprintf(stdout, "\t 64-bit) \n");
+ (void)fprintf(stdout, "\t 3. Binary file with native integer (signed or unsigned)\n");
+ (void)fprintf(stdout, "\t data (8-bit or 16-bit or 32-bit or 64-bit). \n");
+ (void)fprintf(stdout, "\t 4. ASCII text file containing strings (text data).\n");
+ (void)fprintf(stdout, "\t \n");
+ (void)fprintf(stdout, "\t Every input file is associated with a configuration file \n");
+ (void)fprintf(stdout, "\t also provided as an input to the utility. (See Section \n");
+ (void)fprintf(stdout, "\t \"CONFIGURATION FILE\" to know how it is to be organized).\n");
+ (void)fprintf(stdout, "\t The class, size and dimensions of the input data is \n");
+ (void)fprintf(stdout, "\t specified in this configuration file. A point to note is\n");
+ (void)fprintf(stdout, "\t that the floating point data in the ASCII text file may be\n");
+ (void)fprintf(stdout, "\t organized in the fixed floating form (for example 323.56)\n");
+ (void)fprintf(stdout, "\t or in a scientific notation (for example 3.23E+02). A \n");
+ (void)fprintf(stdout, "\t different input-class specification is to be used for both\n");
+ (void)fprintf(stdout, "\t forms.\n\n");
+ (void)fprintf(stdout, "\t The utility extracts the input data from the input file \n");
+ (void)fprintf(stdout, "\t according to the specified parameters and saves it into \n");
+ (void)fprintf(stdout, "\t an H5 dataset. \n\n");
+ (void)fprintf(stdout, "\t The user can specify output type and storage properties in \n");
+ (void)fprintf(stdout, "\t the configuration file. The user is required to specify the \n");
+ (void)fprintf(stdout, "\t path of the dataset. If the groups in the path leading to \n");
+ (void)fprintf(stdout, "\t the data-set do not exist, the groups will be created by the\n");
+ (void)fprintf(stdout, "\t utility. If no group is specified, the dataset will be\n");
+ (void)fprintf(stdout, "\t created under the root group.\n\n");
+ (void)fprintf(stdout, "\t In addition to the name, the user is also required to \n");
+ (void)fprintf(stdout, "\t provide the class and size of output data to be written to \n");
+ (void)fprintf(stdout, "\t the dataset and may optionally specify the output-architecture,\n");
+ (void)fprintf(stdout, "\t and the output-byte-order. If output-architecture is not \n");
+ (void)fprintf(stdout, "\t specified the default is NATIVE. Output-byte-orders are fixed\n");
+ (void)fprintf(stdout, "\t for some architectures and may be specified only if output-\n");
+ (void)fprintf(stdout, "\t architecture is IEEE, UNIX or STD.\n\n");
+ (void)fprintf(stdout, "\t Also, layout and other storage properties such as \n");
+ (void)fprintf(stdout, "\t compression, external storage and extendible data-sets may be\n");
+ (void)fprintf(stdout, "\t optionally specified. The layout and storage properties \n");
+ (void)fprintf(stdout, "\t denote how raw data is to be organized on the disk. If these \n");
+ (void)fprintf(stdout, "\t options are not specified the default is Contiguous layout \n");
+ (void)fprintf(stdout, "\t and storage.\n\n");
+ (void)fprintf(stdout, "\t The dataset can be organized in any of the following ways:\n");
+ (void)fprintf(stdout, "\t 1. Contiguous.\n");
+ (void)fprintf(stdout, "\t 2. Chunked.\n");
+ (void)fprintf(stdout, "\t 3. External Storage File (has to be contiguous)\n");
+ (void)fprintf(stdout, "\t 4. Extendible data sets (has to be chunked)\n");
+ (void)fprintf(stdout, "\t 5. Compressed. (has to be chunked)\n");
+ (void)fprintf(stdout, "\t 6. Compressed & Extendible (has to be chunked)\n\n");
+ (void)fprintf(stdout, "\t If the user wants to store raw data in a non-HDF file then \n");
+ (void)fprintf(stdout, "\t the external storage file option is to be used and the name \n");
+ (void)fprintf(stdout, "\t of the file is to be specified. \n\n");
+ (void)fprintf(stdout, "\t If the user wants the dimensions of the data-set to be\n");
+ (void)fprintf(stdout, "\t unlimited, the extendible data set option can be chosen. \n\n");
+ (void)fprintf(stdout, "\t The user may also specify the type of compression and the \n");
+ (void)fprintf(stdout, "\t level to which the data set must be compresses by setting \n");
+ (void)fprintf(stdout, "\t the compressed option.\n\n");
+ (void)fprintf(stdout, "\t SYNOPSIS:\n");
+ (void)fprintf(stdout, "\t h5import -h[elp], OR\n");
+ (void)fprintf(stdout, "\t h5import <infile> -c[onfig] <configfile> \
[<infile> -c[config] <confile2>...] -o[utfile] <outfile>\n\n");
- (void)HDfprintf(stdout, "\t -h[elp]:\n");
- (void)HDfprintf(stdout, "\t Prints this summary of usage, and exits.\n\n");
- (void)HDfprintf(stdout, "\t <infile(s)>:\n");
- (void)HDfprintf(stdout, "\t Name of the Input file(s), containing a \n");
- (void)HDfprintf(stdout, "\t single n-dimensional floating point or integer array \n");
- (void)HDfprintf(stdout, "\t in either ASCII text, native floating point(32-bit \n");
- (void)HDfprintf(stdout, "\t or 64-bit) or native integer(8-bit or 16-bit or \n");
- (void)HDfprintf(stdout, "\t 32-bit or 64-bit). Data to be specified in the order\n");
- (void)HDfprintf(stdout, "\t of fastest changing dimensions first.\n\n");
- (void)HDfprintf(stdout, "\t -c[config] <configfile>:\n");
- (void)HDfprintf(stdout, "\t Every input file should be associated with a \n");
- (void)HDfprintf(stdout, "\t configuration file and this is done by the -c option.\n");
- (void)HDfprintf(stdout, "\t <configfile> is the name of the configuration file.\n");
- (void)HDfprintf(stdout, "\t (See Section \"CONFIGURATION FILE\")\n\n");
- (void)HDfprintf(stdout, "\t -o[utfile] <outfile>:\n");
- (void)HDfprintf(stdout, "\t Name of the HDF5 output file. Data from one or more \n");
- (void)HDfprintf(stdout, "\t input files are stored as one or more data sets in \n");
- (void)HDfprintf(stdout, "\t <outfile>. The output file may be an existing file or \n");
- (void)HDfprintf(stdout, "\t it maybe new in which case it will be created.\n\n\n");
- (void)HDfprintf(stdout, "\t CONFIGURATION FILE:\n");
- (void)HDfprintf(stdout, "\t The configuration file is an ASCII text file and must be \n");
- (void)HDfprintf(stdout, "\t the ddl formatted file (without data values) produced by h5dump \n");
- (void)HDfprintf(stdout, "\t when used with the options '-o outfilename -b' of a single dataset (-d) \n");
- (void)HDfprintf(stdout, "\t OR organized as \"CONFIG-KEYWORD VALUE\" pairs, one pair on each \n");
- (void)HDfprintf(stdout, "\t line.\n\n");
- (void)HDfprintf(stdout, "\t The configuration file may have the following keywords each \n");
- (void)HDfprintf(stdout, "\t followed by an acceptable value.\n\n");
- (void)HDfprintf(stdout, "\t Required KEYWORDS:\n");
- (void)HDfprintf(stdout, "\t PATH\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS\n");
- (void)HDfprintf(stdout, "\t INPUT-SIZE\n");
- (void)HDfprintf(stdout, "\t INPUT-BYTE-ORDER\n");
- (void)HDfprintf(stdout, "\t RANK\n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES\n");
- (void)HDfprintf(stdout, "\t OUTPUT-CLASS\n");
- (void)HDfprintf(stdout, "\t OUTPUT-SIZE\n\n");
- (void)HDfprintf(stdout, "\t Optional KEYWORDS:\n");
- (void)HDfprintf(stdout, "\t OUTPUT-ARCHITECTURE\n");
- (void)HDfprintf(stdout, "\t OUTPUT-BYTE-ORDER\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-TYPE\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-PARAM\n");
- (void)HDfprintf(stdout, "\t EXTERNAL-STORAGE\n");
- (void)HDfprintf(stdout, "\t MAXIMUM-DIMENSIONS\n\n\n");
- (void)HDfprintf(stdout, "\t Values for keywords:\n");
- (void)HDfprintf(stdout, "\t PATH:\n");
- (void)HDfprintf(stdout, "\t Strings separated by spaces to represent\n");
- (void)HDfprintf(stdout, "\t the path of the data-set. If the groups in\n");
- (void)HDfprintf(stdout, "\t the path do not exist, they will be created. \n");
- (void)HDfprintf(stdout, "\t For example,\n");
- (void)HDfprintf(stdout, "\t PATH grp1/grp2/dataset1\n");
- (void)HDfprintf(stdout, "\t PATH: keyword\n");
- (void)HDfprintf(stdout, "\t grp1: group under the root. If\n");
- (void)HDfprintf(stdout, "\t non-existent will be created.\n");
- (void)HDfprintf(stdout, "\t grp2: group under grp1. If \n");
- (void)HDfprintf(stdout, "\t non-existent will be created \n");
- (void)HDfprintf(stdout, "\t under grp1.\n");
- (void)HDfprintf(stdout, "\t dataset1: the name of the data-set \n");
- (void)HDfprintf(stdout, "\t to be created.\n\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS:\n");
- (void)HDfprintf(stdout, "\t String denoting the type of input data.\n");
- (void)HDfprintf(stdout, "\t (\"TEXTIN\", \"TEXTFP\", \"FP\", \"IN\", \n");
- (void)HDfprintf(stdout, "\t \"STR\", \"TEXTUIN\", \"UIN\"). \n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS \"TEXTIN\" denotes an ASCII text \n");
- (void)HDfprintf(stdout, "\t file with signed integer data in ASCII form,\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS \"TEXTUIN\" denotes an ASCII text \n");
- (void)HDfprintf(stdout, "\t file with unsigned integer data in ASCII form,\n");
- (void)HDfprintf(stdout, "\t \"TEXTFP\" denotes an ASCII text file containing\n");
- (void)HDfprintf(stdout, "\t floating point data in the fixed notation\n");
- (void)HDfprintf(stdout, "\t (325.34),\n");
- (void)HDfprintf(stdout, "\t \"FP\" denotes a floating point binary file,\n");
- (void)HDfprintf(stdout, "\t \"IN\" denotes a signed integer binary file,\n");
- (void)HDfprintf(stdout, "\t \"UIN\" denotes an unsigned integer binary file,\n");
- (void)HDfprintf(stdout, "\t & \"STR\" denotes an ASCII text file the \n");
- (void)HDfprintf(stdout, "\t contents of which should be stored as an 1-D \n");
- (void)HDfprintf(stdout, "\t array of strings.\n");
- (void)HDfprintf(stdout, "\t If INPUT-CLASS is \"STR\", then RANK, \n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES, OUTPUT-CLASS, OUTPUT-SIZE, \n");
- (void)HDfprintf(stdout, "\t OUTPUT-ARCHITECTURE and OUTPUT-BYTE-ORDER \n");
- (void)HDfprintf(stdout, "\t will be ignored.\n\n\n");
- (void)HDfprintf(stdout, "\t INPUT-SIZE:\n");
- (void)HDfprintf(stdout, "\t Integer denoting the size of the input data \n");
- (void)HDfprintf(stdout, "\t (8, 16, 32, 64). \n\n");
- (void)HDfprintf(stdout, "\t For floating point,\n");
- (void)HDfprintf(stdout, "\t INPUT-SIZE can be 32 or 64.\n");
- (void)HDfprintf(stdout, "\t For integers (signed and unsigned)\n");
- (void)HDfprintf(stdout, "\t INPUT-SIZE can be 8, 16, 32 or 64.\n\n");
- (void)HDfprintf(stdout, "\t RANK:\n");
- (void)HDfprintf(stdout, "\t Integer denoting the number of dimensions.\n\n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES:\n");
- (void)HDfprintf(stdout, "\t Integers separated by spaces to denote the \n");
- (void)HDfprintf(stdout, "\t dimension sizes for the no. of dimensions \n");
- (void)HDfprintf(stdout, "\t determined by rank.\n\n");
- (void)HDfprintf(stdout, "\t OUTPUT-CLASS:\n");
- (void)HDfprintf(stdout, "\t String dentoting data type of the dataset to \n");
- (void)HDfprintf(stdout, "\t be written (\"IN\",\"FP\", \"UIN\")\n\n");
- (void)HDfprintf(stdout, "\t OUTPUT-SIZE:\n");
- (void)HDfprintf(stdout, "\t Integer denoting the size of the data in the \n");
- (void)HDfprintf(stdout, "\t output dataset to be written.\n");
- (void)HDfprintf(stdout, "\t If OUTPUT-CLASS is \"FP\", OUTPUT-SIZE can be \n");
- (void)HDfprintf(stdout, "\t 32 or 64.\n");
- (void)HDfprintf(stdout, "\t If OUTPUT-CLASS is \"IN\" or \"UIN\", OUTPUT-SIZE\n");
- (void)HDfprintf(stdout, "\t can be 8, 16, 32 or 64.\n\n");
- (void)HDfprintf(stdout, "\t OUTPUT-ARCHITECTURE:\n");
- (void)HDfprintf(stdout, "\t STRING denoting the type of output \n");
- (void)HDfprintf(stdout, "\t architecture. Can accept the following values\n");
- (void)HDfprintf(stdout, "\t STD\n");
- (void)HDfprintf(stdout, "\t IEEE\n");
- (void)HDfprintf(stdout, "\t INTEL\n");
- (void)HDfprintf(stdout, "\t CRAY\n");
- (void)HDfprintf(stdout, "\t MIPS\n");
- (void)HDfprintf(stdout, "\t ALPHA\n");
- (void)HDfprintf(stdout, "\t NATIVE (default)\n");
- (void)HDfprintf(stdout, "\t UNIX\n\n");
- (void)HDfprintf(stdout, "\t OUTPUT-BYTE-ORDER:\n");
- (void)HDfprintf(stdout, "\t String denoting the output-byte-order. Ignored\n");
- (void)HDfprintf(stdout, "\t if the OUTPUT-ARCHITECTURE is not specified or\n");
- (void)HDfprintf(stdout, "\t if it is IEEE, UNIX or STD. Can accept the \n");
- (void)HDfprintf(stdout, "\t following values.\n");
- (void)HDfprintf(stdout, "\t BE (default)\n");
- (void)HDfprintf(stdout, "\t LE\n\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES:\n");
- (void)HDfprintf(stdout, "\t Integers separated by spaces to denote the \n");
- (void)HDfprintf(stdout, "\t dimension sizes of the chunk for the no. of \n");
- (void)HDfprintf(stdout, "\t dimensions determined by rank. Required field\n");
- (void)HDfprintf(stdout, "\t to denote that the dataset will be stored with\n");
- (void)HDfprintf(stdout, "\t chunked storage. If this field is absent the\n");
- (void)HDfprintf(stdout, "\t dataset will be stored with contiguous storage.\n\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-TYPE:\n");
- (void)HDfprintf(stdout, "\t String denoting the type of compression to be\n");
- (void)HDfprintf(stdout, "\t used with the chunked storage. Requires the\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. The only \n");
- (void)HDfprintf(stdout, "\t currently supported compression method is GZIP. \n");
- (void)HDfprintf(stdout, "\t Will accept the following value\n");
- (void)HDfprintf(stdout, "\t GZIP\n\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-PARAM:\n");
- (void)HDfprintf(stdout, "\t Integer used to denote compression level and \n");
- (void)HDfprintf(stdout, "\t this option is to be always specified when \n");
- (void)HDfprintf(stdout, "\t the COMPRESSION-TYPE option is specified. The\n");
- (void)HDfprintf(stdout, "\t values are applicable only to GZIP \n");
- (void)HDfprintf(stdout, "\t compression.\n");
- (void)HDfprintf(stdout, "\t Value 1-9: The level of Compression. \n");
- (void)HDfprintf(stdout, "\t 1 will result in the fastest \n");
- (void)HDfprintf(stdout, "\t compression while 9 will result in \n");
- (void)HDfprintf(stdout, "\t the best compression ratio. The default\n");
- (void)HDfprintf(stdout, "\t level of compression is 6.\n\n");
- (void)HDfprintf(stdout, "\t EXTERNAL-STORAGE:\n");
- (void)HDfprintf(stdout, "\t String to denote the name of the non-HDF5 file \n");
- (void)HDfprintf(stdout, "\t to store data to. Cannot be used if CHUNKED-\n");
- (void)HDfprintf(stdout, "\t DIMENSIONS or COMPRESSION-TYPE or EXTENDIBLE-\n");
- (void)HDfprintf(stdout, "\t DATASET is specified.\n");
- (void)HDfprintf(stdout, "\t Value <external-filename>: the name of the \n");
- (void)HDfprintf(stdout, "\t external file as a string to be used.\n\n");
- (void)HDfprintf(stdout, "\t MAXIMUM-DIMENSIONS:\n");
- (void)HDfprintf(stdout, "\t Integers separated by spaces to denote the \n");
- (void)HDfprintf(stdout, "\t maximum dimension sizes of all the \n");
- (void)HDfprintf(stdout, "\t dimensions determined by rank. Requires the\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. A value of \n");
- (void)HDfprintf(stdout, "\t -1 for any dimension implies UNLIMITED \n");
- (void)HDfprintf(stdout, "\t DIMENSION size for that particular dimension.\n\n");
- (void)HDfprintf(stdout, "\t EXAMPLES:\n");
- (void)HDfprintf(stdout, "\t 1. Configuration File may look like:\n\n");
- (void)HDfprintf(stdout, "\t PATH work h5 pkamat First-set\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS TEXTFP\n");
- (void)HDfprintf(stdout, "\t RANK 3\n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES 5 2 4\n");
- (void)HDfprintf(stdout, "\t OUTPUT-CLASS FP\n");
- (void)HDfprintf(stdout, "\t OUTPUT-SIZE 64\n");
- (void)HDfprintf(stdout, "\t OUTPUT-ARCHITECTURE IEEE\n");
- (void)HDfprintf(stdout, "\t OUTPUT-BYTE-ORDER LE\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 \n\n");
- (void)HDfprintf(stdout, "\t The above configuration will accept a floating point array \n");
- (void)HDfprintf(stdout, "\t (5 x 2 x 4) in an ASCII file with the rank and dimension sizes \n");
- (void)HDfprintf(stdout, "\t specified and will save it in a chunked data-set (of pattern \n");
- (void)HDfprintf(stdout, "\t 2 X 2 X 2) of 64-bit floating point in the little-endian order \n");
- (void)HDfprintf(stdout, "\t and IEEE architecture. The dataset will be stored at\n");
- (void)HDfprintf(stdout, "\t \"/work/h5/pkamat/First-set\"\n\n");
- (void)HDfprintf(stdout, "\t 2. Another configuration could be:\n\n");
- (void)HDfprintf(stdout, "\t PATH Second-set\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS IN \n");
- (void)HDfprintf(stdout, "\t RANK 5\n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES 6 3 5 2 4\n");
- (void)HDfprintf(stdout, "\t OUTPUT-CLASS IN\n");
- (void)HDfprintf(stdout, "\t OUTPUT-SIZE 32\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 2 2\n");
- (void)HDfprintf(stdout, "\t EXTENDIBLE-DATASET 1 3 \n");
- (void)HDfprintf(stdout, "\t COMPRESSION-TYPE GZIP\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-PARAM 7\n\n\n");
- (void)HDfprintf(stdout, "\t The above configuration will accept an integer array \n");
- (void)HDfprintf(stdout, "\t (6 X 3 X 5 x 2 x 4) in a binary file with the rank and \n");
- (void)HDfprintf(stdout, "\t dimension sizes specified and will save it in a chunked data-set\n");
- (void)HDfprintf(stdout, "\t (of pattern 2 X 2 X 2 X 2 X 2) of 32-bit floating point in \n");
- (void)HDfprintf(stdout, "\t native format (as output-architecture is not specified). The \n");
- (void)HDfprintf(stdout, "\t first and the third dimension will be defined as unlimited. The \n");
- (void)HDfprintf(stdout, "\t data-set will be compressed using GZIP and a compression level \n");
- (void)HDfprintf(stdout, "\t of 7.\n");
- (void)HDfprintf(stdout, "\t The dataset will be stored at \"/Second-set\"\n\n");
+ (void)fprintf(stdout, "\t -h[elp]:\n");
+ (void)fprintf(stdout, "\t Prints this summary of usage, and exits.\n\n");
+ (void)fprintf(stdout, "\t <infile(s)>:\n");
+ (void)fprintf(stdout, "\t Name of the Input file(s), containing a \n");
+ (void)fprintf(stdout, "\t single n-dimensional floating point or integer array \n");
+ (void)fprintf(stdout, "\t in either ASCII text, native floating point(32-bit \n");
+ (void)fprintf(stdout, "\t or 64-bit) or native integer(8-bit or 16-bit or \n");
+ (void)fprintf(stdout, "\t 32-bit or 64-bit). Data to be specified in the order\n");
+ (void)fprintf(stdout, "\t of fastest changing dimensions first.\n\n");
+ (void)fprintf(stdout, "\t -c[config] <configfile>:\n");
+ (void)fprintf(stdout, "\t Every input file should be associated with a \n");
+ (void)fprintf(stdout, "\t configuration file and this is done by the -c option.\n");
+ (void)fprintf(stdout, "\t <configfile> is the name of the configuration file.\n");
+ (void)fprintf(stdout, "\t (See Section \"CONFIGURATION FILE\")\n\n");
+ (void)fprintf(stdout, "\t -o[utfile] <outfile>:\n");
+ (void)fprintf(stdout, "\t Name of the HDF5 output file. Data from one or more \n");
+ (void)fprintf(stdout, "\t input files are stored as one or more data sets in \n");
+ (void)fprintf(stdout, "\t <outfile>. The output file may be an existing file or \n");
+ (void)fprintf(stdout, "\t it maybe new in which case it will be created.\n\n\n");
+ (void)fprintf(stdout, "\t CONFIGURATION FILE:\n");
+ (void)fprintf(stdout, "\t The configuration file is an ASCII text file and must be \n");
+ (void)fprintf(stdout, "\t the ddl formatted file (without data values) produced by h5dump \n");
+ (void)fprintf(stdout, "\t when used with the options '-o outfilename -b' of a single dataset (-d) \n");
+ (void)fprintf(stdout, "\t OR organized as \"CONFIG-KEYWORD VALUE\" pairs, one pair on each \n");
+ (void)fprintf(stdout, "\t line.\n\n");
+ (void)fprintf(stdout, "\t The configuration file may have the following keywords each \n");
+ (void)fprintf(stdout, "\t followed by an acceptable value.\n\n");
+ (void)fprintf(stdout, "\t Required KEYWORDS:\n");
+ (void)fprintf(stdout, "\t PATH\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS\n");
+ (void)fprintf(stdout, "\t INPUT-SIZE\n");
+ (void)fprintf(stdout, "\t INPUT-BYTE-ORDER\n");
+ (void)fprintf(stdout, "\t RANK\n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES\n");
+ (void)fprintf(stdout, "\t OUTPUT-CLASS\n");
+ (void)fprintf(stdout, "\t OUTPUT-SIZE\n\n");
+ (void)fprintf(stdout, "\t Optional KEYWORDS:\n");
+ (void)fprintf(stdout, "\t OUTPUT-ARCHITECTURE\n");
+ (void)fprintf(stdout, "\t OUTPUT-BYTE-ORDER\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES\n");
+ (void)fprintf(stdout, "\t COMPRESSION-TYPE\n");
+ (void)fprintf(stdout, "\t COMPRESSION-PARAM\n");
+ (void)fprintf(stdout, "\t EXTERNAL-STORAGE\n");
+ (void)fprintf(stdout, "\t MAXIMUM-DIMENSIONS\n\n\n");
+ (void)fprintf(stdout, "\t Values for keywords:\n");
+ (void)fprintf(stdout, "\t PATH:\n");
+ (void)fprintf(stdout, "\t Strings separated by spaces to represent\n");
+ (void)fprintf(stdout, "\t the path of the data-set. If the groups in\n");
+ (void)fprintf(stdout, "\t the path do not exist, they will be created. \n");
+ (void)fprintf(stdout, "\t For example,\n");
+ (void)fprintf(stdout, "\t PATH grp1/grp2/dataset1\n");
+ (void)fprintf(stdout, "\t PATH: keyword\n");
+ (void)fprintf(stdout, "\t grp1: group under the root. If\n");
+ (void)fprintf(stdout, "\t non-existent will be created.\n");
+ (void)fprintf(stdout, "\t grp2: group under grp1. If \n");
+ (void)fprintf(stdout, "\t non-existent will be created \n");
+ (void)fprintf(stdout, "\t under grp1.\n");
+ (void)fprintf(stdout, "\t dataset1: the name of the data-set \n");
+ (void)fprintf(stdout, "\t to be created.\n\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS:\n");
+ (void)fprintf(stdout, "\t String denoting the type of input data.\n");
+ (void)fprintf(stdout, "\t (\"TEXTIN\", \"TEXTFP\", \"FP\", \"IN\", \n");
+ (void)fprintf(stdout, "\t \"STR\", \"TEXTUIN\", \"UIN\"). \n");
+ (void)fprintf(stdout, "\t INPUT-CLASS \"TEXTIN\" denotes an ASCII text \n");
+ (void)fprintf(stdout, "\t file with signed integer data in ASCII form,\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS \"TEXTUIN\" denotes an ASCII text \n");
+ (void)fprintf(stdout, "\t file with unsigned integer data in ASCII form,\n");
+ (void)fprintf(stdout, "\t \"TEXTFP\" denotes an ASCII text file containing\n");
+ (void)fprintf(stdout, "\t floating point data in the fixed notation\n");
+ (void)fprintf(stdout, "\t (325.34),\n");
+ (void)fprintf(stdout, "\t \"FP\" denotes a floating point binary file,\n");
+ (void)fprintf(stdout, "\t \"IN\" denotes a signed integer binary file,\n");
+ (void)fprintf(stdout, "\t \"UIN\" denotes an unsigned integer binary file,\n");
+ (void)fprintf(stdout, "\t & \"STR\" denotes an ASCII text file the \n");
+ (void)fprintf(stdout, "\t contents of which should be stored as an 1-D \n");
+ (void)fprintf(stdout, "\t array of strings.\n");
+ (void)fprintf(stdout, "\t If INPUT-CLASS is \"STR\", then RANK, \n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES, OUTPUT-CLASS, OUTPUT-SIZE, \n");
+ (void)fprintf(stdout, "\t OUTPUT-ARCHITECTURE and OUTPUT-BYTE-ORDER \n");
+ (void)fprintf(stdout, "\t will be ignored.\n\n\n");
+ (void)fprintf(stdout, "\t INPUT-SIZE:\n");
+ (void)fprintf(stdout, "\t Integer denoting the size of the input data \n");
+ (void)fprintf(stdout, "\t (8, 16, 32, 64). \n\n");
+ (void)fprintf(stdout, "\t For floating point,\n");
+ (void)fprintf(stdout, "\t INPUT-SIZE can be 32 or 64.\n");
+ (void)fprintf(stdout, "\t For integers (signed and unsigned)\n");
+ (void)fprintf(stdout, "\t INPUT-SIZE can be 8, 16, 32 or 64.\n\n");
+ (void)fprintf(stdout, "\t RANK:\n");
+ (void)fprintf(stdout, "\t Integer denoting the number of dimensions.\n\n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES:\n");
+ (void)fprintf(stdout, "\t Integers separated by spaces to denote the \n");
+ (void)fprintf(stdout, "\t dimension sizes for the no. of dimensions \n");
+ (void)fprintf(stdout, "\t determined by rank.\n\n");
+ (void)fprintf(stdout, "\t OUTPUT-CLASS:\n");
+ (void)fprintf(stdout, "\t String dentoting data type of the dataset to \n");
+ (void)fprintf(stdout, "\t be written (\"IN\",\"FP\", \"UIN\")\n\n");
+ (void)fprintf(stdout, "\t OUTPUT-SIZE:\n");
+ (void)fprintf(stdout, "\t Integer denoting the size of the data in the \n");
+ (void)fprintf(stdout, "\t output dataset to be written.\n");
+ (void)fprintf(stdout, "\t If OUTPUT-CLASS is \"FP\", OUTPUT-SIZE can be \n");
+ (void)fprintf(stdout, "\t 32 or 64.\n");
+ (void)fprintf(stdout, "\t If OUTPUT-CLASS is \"IN\" or \"UIN\", OUTPUT-SIZE\n");
+ (void)fprintf(stdout, "\t can be 8, 16, 32 or 64.\n\n");
+ (void)fprintf(stdout, "\t OUTPUT-ARCHITECTURE:\n");
+ (void)fprintf(stdout, "\t STRING denoting the type of output \n");
+ (void)fprintf(stdout, "\t architecture. Can accept the following values\n");
+ (void)fprintf(stdout, "\t STD\n");
+ (void)fprintf(stdout, "\t IEEE\n");
+ (void)fprintf(stdout, "\t INTEL\n");
+ (void)fprintf(stdout, "\t CRAY\n");
+ (void)fprintf(stdout, "\t MIPS\n");
+ (void)fprintf(stdout, "\t ALPHA\n");
+ (void)fprintf(stdout, "\t NATIVE (default)\n");
+ (void)fprintf(stdout, "\t UNIX\n\n");
+ (void)fprintf(stdout, "\t OUTPUT-BYTE-ORDER:\n");
+ (void)fprintf(stdout, "\t String denoting the output-byte-order. Ignored\n");
+ (void)fprintf(stdout, "\t if the OUTPUT-ARCHITECTURE is not specified or\n");
+ (void)fprintf(stdout, "\t if it is IEEE, UNIX or STD. Can accept the \n");
+ (void)fprintf(stdout, "\t following values.\n");
+ (void)fprintf(stdout, "\t BE (default)\n");
+ (void)fprintf(stdout, "\t LE\n\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES:\n");
+ (void)fprintf(stdout, "\t Integers separated by spaces to denote the \n");
+ (void)fprintf(stdout, "\t dimension sizes of the chunk for the no. of \n");
+ (void)fprintf(stdout, "\t dimensions determined by rank. Required field\n");
+ (void)fprintf(stdout, "\t to denote that the dataset will be stored with\n");
+ (void)fprintf(stdout, "\t chunked storage. If this field is absent the\n");
+ (void)fprintf(stdout, "\t dataset will be stored with contiguous storage.\n\n");
+ (void)fprintf(stdout, "\t COMPRESSION-TYPE:\n");
+ (void)fprintf(stdout, "\t String denoting the type of compression to be\n");
+ (void)fprintf(stdout, "\t used with the chunked storage. Requires the\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. The only \n");
+ (void)fprintf(stdout, "\t currently supported compression method is GZIP. \n");
+ (void)fprintf(stdout, "\t Will accept the following value\n");
+ (void)fprintf(stdout, "\t GZIP\n\n");
+ (void)fprintf(stdout, "\t COMPRESSION-PARAM:\n");
+ (void)fprintf(stdout, "\t Integer used to denote compression level and \n");
+ (void)fprintf(stdout, "\t this option is to be always specified when \n");
+ (void)fprintf(stdout, "\t the COMPRESSION-TYPE option is specified. The\n");
+ (void)fprintf(stdout, "\t values are applicable only to GZIP \n");
+ (void)fprintf(stdout, "\t compression.\n");
+ (void)fprintf(stdout, "\t Value 1-9: The level of Compression. \n");
+ (void)fprintf(stdout, "\t 1 will result in the fastest \n");
+ (void)fprintf(stdout, "\t compression while 9 will result in \n");
+ (void)fprintf(stdout, "\t the best compression ratio. The default\n");
+ (void)fprintf(stdout, "\t level of compression is 6.\n\n");
+ (void)fprintf(stdout, "\t EXTERNAL-STORAGE:\n");
+ (void)fprintf(stdout, "\t String to denote the name of the non-HDF5 file \n");
+ (void)fprintf(stdout, "\t to store data to. Cannot be used if CHUNKED-\n");
+ (void)fprintf(stdout, "\t DIMENSIONS or COMPRESSION-TYPE or EXTENDIBLE-\n");
+ (void)fprintf(stdout, "\t DATASET is specified.\n");
+ (void)fprintf(stdout, "\t Value <external-filename>: the name of the \n");
+ (void)fprintf(stdout, "\t external file as a string to be used.\n\n");
+ (void)fprintf(stdout, "\t MAXIMUM-DIMENSIONS:\n");
+ (void)fprintf(stdout, "\t Integers separated by spaces to denote the \n");
+ (void)fprintf(stdout, "\t maximum dimension sizes of all the \n");
+ (void)fprintf(stdout, "\t dimensions determined by rank. Requires the\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. A value of \n");
+ (void)fprintf(stdout, "\t -1 for any dimension implies UNLIMITED \n");
+ (void)fprintf(stdout, "\t DIMENSION size for that particular dimension.\n\n");
+ (void)fprintf(stdout, "\t EXAMPLES:\n");
+ (void)fprintf(stdout, "\t 1. Configuration File may look like:\n\n");
+ (void)fprintf(stdout, "\t PATH work h5 pkamat First-set\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS TEXTFP\n");
+ (void)fprintf(stdout, "\t RANK 3\n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES 5 2 4\n");
+ (void)fprintf(stdout, "\t OUTPUT-CLASS FP\n");
+ (void)fprintf(stdout, "\t OUTPUT-SIZE 64\n");
+ (void)fprintf(stdout, "\t OUTPUT-ARCHITECTURE IEEE\n");
+ (void)fprintf(stdout, "\t OUTPUT-BYTE-ORDER LE\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 \n\n");
+ (void)fprintf(stdout, "\t The above configuration will accept a floating point array \n");
+ (void)fprintf(stdout, "\t (5 x 2 x 4) in an ASCII file with the rank and dimension sizes \n");
+ (void)fprintf(stdout, "\t specified and will save it in a chunked data-set (of pattern \n");
+ (void)fprintf(stdout, "\t 2 X 2 X 2) of 64-bit floating point in the little-endian order \n");
+ (void)fprintf(stdout, "\t and IEEE architecture. The dataset will be stored at\n");
+ (void)fprintf(stdout, "\t \"/work/h5/pkamat/First-set\"\n\n");
+ (void)fprintf(stdout, "\t 2. Another configuration could be:\n\n");
+ (void)fprintf(stdout, "\t PATH Second-set\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS IN \n");
+ (void)fprintf(stdout, "\t RANK 5\n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES 6 3 5 2 4\n");
+ (void)fprintf(stdout, "\t OUTPUT-CLASS IN\n");
+ (void)fprintf(stdout, "\t OUTPUT-SIZE 32\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 2 2\n");
+ (void)fprintf(stdout, "\t EXTENDIBLE-DATASET 1 3 \n");
+ (void)fprintf(stdout, "\t COMPRESSION-TYPE GZIP\n");
+ (void)fprintf(stdout, "\t COMPRESSION-PARAM 7\n\n\n");
+ (void)fprintf(stdout, "\t The above configuration will accept an integer array \n");
+ (void)fprintf(stdout, "\t (6 X 3 X 5 x 2 x 4) in a binary file with the rank and \n");
+ (void)fprintf(stdout, "\t dimension sizes specified and will save it in a chunked data-set\n");
+ (void)fprintf(stdout, "\t (of pattern 2 X 2 X 2 X 2 X 2) of 32-bit floating point in \n");
+ (void)fprintf(stdout, "\t native format (as output-architecture is not specified). The \n");
+ (void)fprintf(stdout, "\t first and the third dimension will be defined as unlimited. The \n");
+ (void)fprintf(stdout, "\t data-set will be compressed using GZIP and a compression level \n");
+ (void)fprintf(stdout, "\t of 7.\n");
+ (void)fprintf(stdout, "\t The dataset will be stored at \"/Second-set\"\n\n");
}
void
usage(char *name)
{
- (void)HDfprintf(stdout, "\nusage:\t%s -h[elp], OR\n", name);
- (void)HDfprintf(stdout, "\t%s <infile> -c[onfig] <configfile> \
+ (void)fprintf(stdout, "\nusage:\t%s -h[elp], OR\n", name);
+ (void)fprintf(stdout, "\t%s <infile> -c[onfig] <configfile> \
[<infile> -c[config] <configfile>...] -o[utfile] <outfile> \n\n",
- name);
+ name);
}
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index c7ede3c..4043c73 100644
--- a/tools/src/h5jam/h5jam.c
+++ b/tools/src/h5jam/h5jam.c
@@ -49,31 +49,31 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", requir
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "usage: %s -i <in_file.h5> -u <in_user_file> [-o <out_file.h5>] [--clobber]\n", prog);
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Adds user block to front of an HDF5 file and creates a new concatenated file.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "OPTIONS\n");
- HDfprintf(stdout, " -i in_file.h5 Specifies the input HDF5 file.\n");
- HDfprintf(stdout, " -u in_user_file Specifies the file to be inserted into the user block.\n");
- HDfprintf(stdout, " Can be any file format except an HDF5 format.\n");
- HDfprintf(stdout, " -o out_file.h5 Specifies the output HDF5 file.\n");
- HDfprintf(stdout, " If not specified, the user block will be concatenated in\n");
- HDfprintf(stdout, " place to the input HDF5 file.\n");
- HDfprintf(stdout, " --clobber Wipes out any existing user block before concatenating\n");
- HDfprintf(stdout, " the given user block.\n");
- HDfprintf(stdout, " The size of the new user block will be the larger of;\n");
- HDfprintf(stdout, " - the size of existing user block in the input HDF5 file\n");
- HDfprintf(stdout, " - the size of user block required by new input user file\n");
- HDfprintf(stdout, " (size = 512 x 2N, N is positive integer.)\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " -h Prints a usage message and exits.\n");
- HDfprintf(stdout, " -V Prints the HDF5 library version and exits.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Exit Status:\n");
- HDfprintf(stdout, " 0 Succeeded.\n");
- HDfprintf(stdout, " >0 An error occurred.\n");
+ fflush(stdout);
+ fprintf(stdout, "usage: %s -i <in_file.h5> -u <in_user_file> [-o <out_file.h5>] [--clobber]\n", prog);
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Adds user block to front of an HDF5 file and creates a new concatenated file.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "OPTIONS\n");
+ fprintf(stdout, " -i in_file.h5 Specifies the input HDF5 file.\n");
+ fprintf(stdout, " -u in_user_file Specifies the file to be inserted into the user block.\n");
+ fprintf(stdout, " Can be any file format except an HDF5 format.\n");
+ fprintf(stdout, " -o out_file.h5 Specifies the output HDF5 file.\n");
+ fprintf(stdout, " If not specified, the user block will be concatenated in\n");
+ fprintf(stdout, " place to the input HDF5 file.\n");
+ fprintf(stdout, " --clobber Wipes out any existing user block before concatenating\n");
+ fprintf(stdout, " the given user block.\n");
+ fprintf(stdout, " The size of the new user block will be the larger of;\n");
+ fprintf(stdout, " - the size of existing user block in the input HDF5 file\n");
+ fprintf(stdout, " - the size of user block required by new input user file\n");
+ fprintf(stdout, " (size = 512 x 2N, N is positive integer.)\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " -h Prints a usage message and exits.\n");
+ fprintf(stdout, " -V Prints the HDF5 library version and exits.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Exit Status:\n");
+ fprintf(stdout, " 0 Succeeded.\n");
+ fprintf(stdout, " >0 An error occurred.\n");
}
/*-------------------------------------------------------------------------
@@ -89,7 +89,7 @@ leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -330,11 +330,11 @@ main(int argc, char *argv[])
done:
if (ub_file)
- HDfree(ub_file);
+ free(ub_file);
if (input_file)
- HDfree(input_file);
+ free(input_file);
if (output_file)
- HDfree(output_file);
+ free(output_file);
if (plist >= 0)
H5Pclose(plist);
@@ -395,7 +395,7 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi
res = HDfstat(infid, &sbuf);
if (res < 0) {
error_msg("Can't stat file \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
howmuch = (ssize_t)sbuf.st_size;
@@ -432,12 +432,12 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi
if (nchars <= 0) {
error_msg("Read error \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
if (HDwrite(outfid, buf, (unsigned)nchars) < 0) {
error_msg("Write error \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
tot += nchars;
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index d130b38..d606e94 100644
--- a/tools/src/h5jam/h5unjam.c
+++ b/tools/src/h5jam/h5unjam.c
@@ -50,35 +50,34 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", require
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "usage: %s -i <in_file.h5> [-o <out_file.h5> ] [-u <out_user_file> | --delete]\n",
- prog);
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Splits user file and HDF5 file into two files: user block data and HDF5 data.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "OPTIONS\n");
- HDfprintf(stdout, " -i in_file.h5 Specifies the HDF5 as input. If the input HDF5 file\n");
- HDfprintf(stdout, " contains no user block, exit with an error message.\n");
- HDfprintf(stdout, " -o out_file.h5 Specifies output HDF5 file without a user block.\n");
- HDfprintf(stdout, " If not specified, the user block will be removed from the\n");
- HDfprintf(stdout, " input HDF5 file.\n");
- HDfprintf(stdout, " -u out_user_file\n");
- HDfprintf(stdout, " Specifies the output file containing the data from the\n");
- HDfprintf(stdout, " user block.\n");
- HDfprintf(stdout, " Cannot be used with --delete option.\n");
- HDfprintf(stdout, " --delete Remove the user block from the input HDF5 file. The content\n");
- HDfprintf(stdout, " of the user block is discarded.\n");
- HDfprintf(stdout, " Cannot be used with the -u option.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " -h Prints a usage message and exits.\n");
- HDfprintf(stdout, " -V Prints the HDF5 library version and exits.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " If neither --delete nor -u is specified, the user block from the input file\n");
- HDfprintf(stdout, " will be displayed to stdout.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Exit Status:\n");
- HDfprintf(stdout, " 0 Succeeded.\n");
- HDfprintf(stdout, " >0 An error occurred.\n");
+ fflush(stdout);
+ fprintf(stdout, "usage: %s -i <in_file.h5> [-o <out_file.h5> ] [-u <out_user_file> | --delete]\n", prog);
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Splits user file and HDF5 file into two files: user block data and HDF5 data.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "OPTIONS\n");
+ fprintf(stdout, " -i in_file.h5 Specifies the HDF5 as input. If the input HDF5 file\n");
+ fprintf(stdout, " contains no user block, exit with an error message.\n");
+ fprintf(stdout, " -o out_file.h5 Specifies output HDF5 file without a user block.\n");
+ fprintf(stdout, " If not specified, the user block will be removed from the\n");
+ fprintf(stdout, " input HDF5 file.\n");
+ fprintf(stdout, " -u out_user_file\n");
+ fprintf(stdout, " Specifies the output file containing the data from the\n");
+ fprintf(stdout, " user block.\n");
+ fprintf(stdout, " Cannot be used with --delete option.\n");
+ fprintf(stdout, " --delete Remove the user block from the input HDF5 file. The content\n");
+ fprintf(stdout, " of the user block is discarded.\n");
+ fprintf(stdout, " Cannot be used with the -u option.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " -h Prints a usage message and exits.\n");
+ fprintf(stdout, " -V Prints the HDF5 library version and exits.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " If neither --delete nor -u is specified, the user block from the input file\n");
+ fprintf(stdout, " will be displayed to stdout.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Exit Status:\n");
+ fprintf(stdout, " 0 Succeeded.\n");
+ fprintf(stdout, " >0 An error occurred.\n");
}
/*-------------------------------------------------------------------------
@@ -145,11 +144,11 @@ parse_command_line(int argc, const char *const *argv)
done:
if (input_file)
- HDfree(input_file);
+ free(input_file);
if (output_file)
- HDfree(output_file);
+ free(output_file);
if (ub_file)
- HDfree(ub_file);
+ free(ub_file);
return EXIT_FAILURE;
}
@@ -158,7 +157,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -283,13 +282,13 @@ main(int argc, char *argv[])
done:
if (input_file)
- HDfree(input_file);
+ free(input_file);
if (output_file)
- HDfree(output_file);
+ free(output_file);
if (ub_file) {
- HDfree(ub_file);
+ free(ub_file);
}
leave(h5tools_getstatus());
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 5d9e184..719c296 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -916,8 +916,8 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
dst_size = H5Tget_size(type);
/* Get the names and raw values of all members */
- name = (char **)HDcalloc((size_t)nmembs, sizeof(char *));
- value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size));
+ name = (char **)calloc((size_t)nmembs, sizeof(char *));
+ value = (unsigned char *)calloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size));
for (i = 0; i < (unsigned)nmembs; i++) {
name[i] = H5Tget_member_name(type, i);
H5Tget_member_value(type, i, value + i * H5Tget_size(type));
@@ -929,8 +929,8 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
/* Release resources */
for (i = 0; i < (unsigned)nmembs; i++)
H5free_memory(name[i]);
- HDfree(name);
- HDfree(value);
+ free(name);
+ free(value);
H5Tclose(super);
return FALSE;
@@ -957,13 +957,13 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
else if (H5T_SGN_NONE == H5Tget_sign(native)) {
unsigned long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(buffer, "%llu", copy);
}
else {
long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(buffer, "%lld", copy);
}
}
@@ -971,8 +971,8 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
/* Release resources */
for (i = 0; i < (unsigned)nmembs; i++)
H5free_memory(name[i]);
- HDfree(name);
- HDfree(value);
+ free(name);
+ free(value);
}
else
h5tools_str_append(buffer, "\n%*s <empty>", ind + 4, "");
@@ -1178,7 +1178,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
return FALSE;
ndims = H5Tget_array_ndims(type);
if (ndims) {
- dims = (hsize_t *)HDmalloc((unsigned)ndims * sizeof(dims[0]));
+ dims = (hsize_t *)malloc((unsigned)ndims * sizeof(dims[0]));
H5Tget_array_dims2(type, dims);
/* Print dimensions */
@@ -1186,7 +1186,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
h5tools_str_append(buffer, "%s%" PRIuHSIZE, i ? "," : "[", dims[i]);
h5tools_str_append(buffer, "]");
- HDfree(dims);
+ free(dims);
}
else
h5tools_str_append(buffer, " [SCALAR]\n");
@@ -1324,8 +1324,8 @@ dump_dataset_values(hid_t dset)
f_type = H5Dget_type(dset);
space = H5Dget_space(dset);
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
outputformat = *info;
outputformat.line_1st = NULL;
@@ -1431,17 +1431,17 @@ dump_dataset_values(hid_t dset)
ctx.need_prefix = TRUE;
if (NULL !=
- (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
+ (ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
H5TOOLS_DEBUG("H5Dread reference read");
if (H5Dread(dset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) {
- HDfree(ref_buf);
+ free(ref_buf);
H5TOOLS_INFO("H5Dread reference failed");
H5TOOLS_GOTO_DONE_NO_RET();
}
h5tools_dump_reference(rawoutstream, info, &ctx, dset, ref_buf, ndims);
PRINTVALSTREAM(rawoutstream, "\n");
- HDfree(ref_buf);
+ free(ref_buf);
}
}
else {
@@ -1493,8 +1493,8 @@ dump_attribute_values(hid_t attr)
f_type = H5Aget_type(attr);
space = H5Aget_space(attr);
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
outputformat = *info;
outputformat.line_1st = NULL;
@@ -1601,10 +1601,10 @@ dump_attribute_values(hid_t attr)
ctx.need_prefix = TRUE;
if (NULL !=
- (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
+ (ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
H5TOOLS_DEBUG("H5Aread reference read");
if (H5Aread(attr, H5T_STD_REF, ref_buf) < 0) {
- HDfree(ref_buf);
+ free(ref_buf);
H5TOOLS_INFO("H5Aread reference failed");
H5TOOLS_GOTO_DONE_NO_RET();
}
@@ -1613,7 +1613,7 @@ dump_attribute_values(hid_t attr)
PRINTVALSTREAM(rawoutstream, "\n");
ctx.indent_level--;
- HDfree(ref_buf);
+ free(ref_buf);
}
}
else {
@@ -1666,8 +1666,8 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
H5TOOLS_START_DEBUG(" ");
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
ctx.indent_level = 2;
ctx.cur_column = (size_t)curr_pos;
@@ -1772,8 +1772,8 @@ dataset_list1(hid_t dset)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -1844,8 +1844,8 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -2051,8 +2051,8 @@ datatype_list2(hid_t type, const char H5_ATTR_UNUSED *name)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -2088,8 +2088,8 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
H5TOOLS_START_DEBUG(" ");
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -2203,7 +2203,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
*/
if (cmt_bufsize > 0) {
comment =
- (char *)HDmalloc((size_t)cmt_bufsize + 1); /* new_size including null terminator */
+ (char *)malloc((size_t)cmt_bufsize + 1); /* new_size including null terminator */
if (comment) {
cmt_bufsize = H5Oget_comment(obj_id, comment, (size_t)cmt_bufsize);
if (cmt_bufsize > 0) {
@@ -2215,7 +2215,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos,
(size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
} /* end if */
- HDfree(comment);
+ free(comment);
}
}
}
@@ -2266,13 +2266,13 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
/* init linkinfo struct */
- HDmemset(&lnk_info, 0, sizeof(h5tool_link_info_t));
+ memset(&lnk_info, 0, sizeof(h5tool_link_info_t));
/* if verbose, make H5tools_get_symlink_info() display more */
if (verbose_g)
@@ -2429,7 +2429,7 @@ done:
h5tools_str_close(&buffer);
if (buf)
- HDfree(buf);
+ free(buf);
return 0;
} /* end list_lnk() */
@@ -2452,8 +2452,8 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -2596,14 +2596,14 @@ is_valid_args(void)
hbool_t ret = TRUE;
if (recursive_g && grp_literal_g) {
- HDfprintf(rawerrorstream, "Error: 'recursive' option not compatible with 'group info' option!\n\n");
+ fprintf(rawerrorstream, "Error: 'recursive' option not compatible with 'group info' option!\n\n");
ret = FALSE;
goto out;
}
if (no_dangling_link_g && !follow_symlink_g) {
- HDfprintf(rawerrorstream,
- "Error: --no-dangling-links must be used along with --follow-symlinks option!\n\n");
+ fprintf(rawerrorstream,
+ "Error: --no-dangling-links must be used along with --follow-symlinks option!\n\n");
ret = FALSE;
goto out;
}
@@ -2625,7 +2625,7 @@ leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -2684,8 +2684,8 @@ main(int argc, char *argv[])
h5tools_init();
/* Initialize fapl info structs */
- HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t));
- HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t));
+ memset(&vol_info, 0, sizeof(h5tools_vol_info_t));
+ memset(&vfd_info, 0, sizeof(h5tools_vfd_info_t));
/* Build object display table */
DISPATCH(H5O_TYPE_GROUP, "Group", NULL, NULL);
@@ -2749,7 +2749,7 @@ main(int argc, char *argv[])
}
else if (!HDstrncmp(argv[argno], "--vol-value=", (size_t)12)) {
vol_info.type = VOL_BY_VALUE;
- vol_info.u.value = (H5VL_class_value_t)HDatoi(argv[argno] + 12);
+ vol_info.u.value = (H5VL_class_value_t)atoi(argv[argno] + 12);
custom_vol_fapl = TRUE;
}
else if (!HDstrncmp(argv[argno], "--vol-name=", (size_t)11)) {
@@ -2767,7 +2767,7 @@ main(int argc, char *argv[])
}
else if (!HDstrncmp(argv[argno], "--vfd-value=", (size_t)12)) {
vfd_info.type = VFD_BY_VALUE;
- vfd_info.u.value = (H5FD_class_value_t)HDatoi(argv[argno] + 12);
+ vfd_info.u.value = (H5FD_class_value_t)atoi(argv[argno] + 12);
custom_vfd_fapl = TRUE;
}
else if (!HDstrncmp(argv[argno], "--vfd-name=", (size_t)11)) {
@@ -2839,23 +2839,23 @@ main(int argc, char *argv[])
start = strchr(argv[argno], '=');
if (start == NULL) {
- HDfprintf(rawerrorstream,
- "Error: Unable to parse null credentials tuple\n"
- " For anonymous access, omit \"--s3-cred\" and use only \"--vfd=ros3\"\n\n");
+ fprintf(rawerrorstream,
+ "Error: Unable to parse null credentials tuple\n"
+ " For anonymous access, omit \"--s3-cred\" and use only \"--vfd=ros3\"\n\n");
usage();
leave(EXIT_FAILURE);
}
start++;
if (h5tools_parse_ros3_fapl_tuple(start, ',', &ros3_fa) < 0) {
- HDfprintf(rawerrorstream, "Error: failed to parse S3 VFD credential info\n\n");
+ fprintf(rawerrorstream, "Error: failed to parse S3 VFD credential info\n\n");
usage();
leave(EXIT_FAILURE);
}
vfd_info.info = &ros3_fa;
#else
- HDfprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n");
+ fprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n");
usage();
leave(EXIT_FAILURE);
#endif
@@ -2871,14 +2871,14 @@ main(int argc, char *argv[])
}
if (h5tools_parse_hdfs_fapl_tuple(start, ',', &hdfs_fa) < 0) {
- HDfprintf(rawerrorstream, "Error: failed to parse HDFS VFD configuration info\n\n");
+ fprintf(rawerrorstream, "Error: failed to parse HDFS VFD configuration info\n\n");
usage();
leave(EXIT_FAILURE);
}
vfd_info.info = &hdfs_fa;
#else
- HDfprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n");
+ fprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n");
usage();
leave(EXIT_FAILURE);
#endif
@@ -2955,7 +2955,7 @@ main(int argc, char *argv[])
} /* end for */
}
else {
- HDfprintf(stderr, "Unknown argument: %s\n", argv[argno]);
+ fprintf(stderr, "Unknown argument: %s\n", argv[argno]);
usage();
leave(EXIT_FAILURE);
}
@@ -3043,8 +3043,8 @@ main(int argc, char *argv[])
} /* end while */
if (file_id < 0) {
- HDfprintf(rawerrorstream, "%s: unable to open file\n", argv[argno - 1]);
- HDfree(fname);
+ fprintf(rawerrorstream, "%s: unable to open file\n", argv[argno - 1]);
+ free(fname);
err_exit = 1;
continue;
} /* end if */
@@ -3056,7 +3056,7 @@ main(int argc, char *argv[])
iter.base_len -= oname[iter.base_len - 1] == '/';
x = oname;
if (NULL == (oname = HDstrdup(oname))) {
- HDfprintf(rawerrorstream, "memory allocation failed\n");
+ fprintf(rawerrorstream, "memory allocation failed\n");
leave(EXIT_FAILURE);
}
*x = '\0';
@@ -3095,8 +3095,8 @@ main(int argc, char *argv[])
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
print_obj_name(&buffer, &iter, oname, "**NOT FOUND**");
@@ -3121,17 +3121,17 @@ main(int argc, char *argv[])
list_lnk(oname, &li, &iter);
}
H5Fclose(file_id);
- HDfree(fname);
+ free(fname);
if (x)
- HDfree(oname);
+ free(oname);
for (u = 0; u < symlink_list.nused; u++) {
if (symlink_list.objs[u].type == H5L_TYPE_EXTERNAL)
- HDfree(symlink_list.objs[u].file);
+ free(symlink_list.objs[u].file);
- HDfree(symlink_list.objs[u].path);
+ free(symlink_list.objs[u].path);
}
- HDfree(symlink_list.objs);
+ free(symlink_list.objs);
/* if no-dangling-links option specified and dangling link found */
if (no_dangling_link_g && iter.symlink_list->dangle_link)
@@ -3140,7 +3140,7 @@ main(int argc, char *argv[])
if (fapl_id != H5P_DEFAULT) {
if (0 < H5Pclose(fapl_id)) {
- HDfprintf(rawerrorstream, "Error: Unable to set close fapl entry\n\n");
+ fprintf(rawerrorstream, "Error: Unable to set close fapl entry\n\n");
leave(EXIT_FAILURE);
}
}
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c
index 2238aac..d6d075f 100644
--- a/tools/src/h5perf/pio_engine.c
+++ b/tools/src/h5perf/pio_engine.c
@@ -62,8 +62,8 @@
}
#define ERRMSG(mesg) \
{ \
- HDfprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
- HDfprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \
+ fprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
+ fprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \
}
/* verify: if val is false (0), print mesg. */
@@ -166,7 +166,7 @@ do_pio(parameters param)
/* IO type */
iot = param.io_type;
- if (NULL == (fname = HDcalloc(FILENAME_MAX, sizeof(char))))
+ if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
GOTOERROR(FAIL);
switch (iot) {
@@ -184,7 +184,7 @@ do_pio(parameters param)
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", iot);
+ fprintf(stderr, "Unknown IO type request (%d)\n", iot);
GOTOERROR(FAIL);
}
@@ -203,66 +203,66 @@ do_pio(parameters param)
}
if (param.num_files < 0) {
- HDfprintf(stderr, "number of files must be >= 0 (%ld)\n", param.num_files);
+ fprintf(stderr, "number of files must be >= 0 (%ld)\n", param.num_files);
GOTOERROR(FAIL);
}
if (ndsets < 0) {
- HDfprintf(stderr, "number of datasets per file must be >= 0 (%ld)\n", ndsets);
+ fprintf(stderr, "number of datasets per file must be >= 0 (%ld)\n", ndsets);
GOTOERROR(FAIL);
}
if (param.num_procs <= 0) {
- HDfprintf(stderr, "maximum number of process to use must be > 0 (%d)\n", param.num_procs);
+ fprintf(stderr, "maximum number of process to use must be > 0 (%d)\n", param.num_procs);
GOTOERROR(FAIL);
}
/* Validate transfer buffer size & block size*/
if (blk_size <= 0) {
- HDfprintf(stderr, "Transfer block size (%zu) must be > 0\n", blk_size);
+ fprintf(stderr, "Transfer block size (%zu) must be > 0\n", blk_size);
GOTOERROR(FAIL);
}
if (buf_size <= 0) {
- HDfprintf(stderr, "Transfer buffer size (%zu) must be > 0\n", buf_size);
+ fprintf(stderr, "Transfer buffer size (%zu) must be > 0\n", buf_size);
GOTOERROR(FAIL);
}
if ((buf_size % blk_size) != 0) {
- HDfprintf(stderr,
- "Transfer buffer size (%zu) must be a multiple of the "
- "interleaved I/O block size (%zu)\n",
- buf_size, blk_size);
+ fprintf(stderr,
+ "Transfer buffer size (%zu) must be a multiple of the "
+ "interleaved I/O block size (%zu)\n",
+ buf_size, blk_size);
GOTOERROR(FAIL);
}
if ((snbytes % pio_mpi_nprocs_g) != 0) {
- HDfprintf(stderr,
- "Dataset size (%lld) must be a multiple of the "
- "number of processes (%d)\n",
- (long long)snbytes, pio_mpi_nprocs_g);
+ fprintf(stderr,
+ "Dataset size (%lld) must be a multiple of the "
+ "number of processes (%d)\n",
+ (long long)snbytes, pio_mpi_nprocs_g);
GOTOERROR(FAIL);
}
if (!param.dim2d) {
if (((size_t)(snbytes / pio_mpi_nprocs_g) % buf_size) != 0) {
- HDfprintf(stderr,
- "Dataset size/process (%lld) must be a multiple of the "
- "transfer buffer size (%zu)\n",
- (long long)(snbytes / pio_mpi_nprocs_g), buf_size);
+ fprintf(stderr,
+ "Dataset size/process (%lld) must be a multiple of the "
+ "transfer buffer size (%zu)\n",
+ (long long)(snbytes / pio_mpi_nprocs_g), buf_size);
GOTOERROR(FAIL);
}
}
else {
if (((size_t)snbytes % buf_size) != 0) {
- HDfprintf(stderr,
- "Dataset side size (%lld) must be a multiple of the "
- "transfer buffer size (%zu)\n",
- (long long)snbytes, buf_size);
+ fprintf(stderr,
+ "Dataset side size (%lld) must be a multiple of the "
+ "transfer buffer size (%zu)\n",
+ (long long)snbytes, buf_size);
GOTOERROR(FAIL);
}
}
/* Allocate transfer buffer */
if ((buffer = malloc(bsize)) == NULL) {
- HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", bsize);
+ fprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", bsize);
GOTOERROR(FAIL);
}
@@ -273,7 +273,7 @@ do_pio(parameters param)
/* output all of the times for all iterations */
if (myrank == 0)
- HDfprintf(output, "Timer details:\n");
+ fprintf(output, "Timer details:\n");
}
for (nf = 1; nf <= param.num_files; nf++) {
@@ -286,7 +286,7 @@ do_pio(parameters param)
HDsnprintf(base_name, sizeof(base_name), "#pio_tmp_%lu", nf);
pio_create_filename(iot, base_name, fname, FILENAME_MAX);
if (pio_debug_level > 0)
- HDfprintf(output, "rank %d: data filename=%s\n", pio_mpi_rank_g, fname);
+ fprintf(output, "rank %d: data filename=%s\n", pio_mpi_rank_g, fname);
/* Need barrier to make sure everyone starts at the same time */
MPI_Barrier(pio_comm_g);
@@ -366,8 +366,8 @@ done:
}
/* release generic resources */
- HDfree(buffer);
- HDfree(fname);
+ free(buffer);
+ free(fname);
res.ret_code = ret_code;
return res;
}
@@ -391,7 +391,7 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
if (!base_name || !fullname || size < 1)
return NULL;
- HDmemset(fullname, 0, size);
+ memset(fullname, 0, size);
switch (iot) {
case POSIXIO:
@@ -601,7 +601,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
/* Prepare buffer for verifying data */
if (parms->verify)
- HDmemset(buffer, pio_mpi_rank_g + 1, buf_size * blk_size);
+ memset(buffer, pio_mpi_rank_g + 1, buf_size * blk_size);
} /* end else */
/* Calculate the total number of bytes (bytes_count) to be
@@ -621,17 +621,17 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
if (pio_debug_level >= 4) {
HDprint_rank(output);
if (!parms->dim2d) {
- HDfprintf(output,
- "Debug(do_write): "
- "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
- buf_size, (long long)bytes_begin[0], (long long)bytes_count);
+ fprintf(output,
+ "Debug(do_write): "
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
+ buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
- HDfprintf(output,
- "Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
- buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
- (long long)bytes_count);
+ fprintf(output,
+ "Debug(do_write): "
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
+ buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
+ (long long)bytes_count);
}
}
@@ -831,7 +831,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -839,7 +839,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
if (parms->collective) {
hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -864,7 +864,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
case PHDF5:
h5dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (h5dcpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
/* 1D dataspace */
@@ -875,7 +875,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
h5dims[0] = blk_size;
hrc = H5Pset_chunk(h5dcpl, 1, h5dims);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -888,7 +888,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
h5dims[1] = blk_size;
hrc = H5Pset_chunk(h5dcpl, 2, h5dims);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -898,14 +898,14 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
h5ds_id = H5DCREATE(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, h5dcpl);
if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset Create failed\n");
+ fprintf(stderr, "HDF5 Dataset Create failed\n");
GOTOERROR(FAIL);
}
hrc = H5Pclose(h5dcpl);
/* verifying the close of the dcpl */
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Close failed\n");
+ fprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}
break;
@@ -1407,7 +1407,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -1464,7 +1464,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -1475,7 +1475,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
+ fprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -1486,7 +1486,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
}
else {
@@ -1631,17 +1631,17 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
if (pio_debug_level >= 4) {
HDprint_rank(output);
if (!parms->dim2d) {
- HDfprintf(output,
- "Debug(do_write): "
- "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
- buf_size, (long long)bytes_begin[0], (long long)bytes_count);
+ fprintf(output,
+ "Debug(do_write): "
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
+ buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
- HDfprintf(output,
- "Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
- buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
- (long long)bytes_count);
+ fprintf(output,
+ "Debug(do_write): "
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
+ buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
+ (long long)bytes_count);
}
}
@@ -1839,7 +1839,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -1847,7 +1847,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
if (parms->collective) {
hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -1873,7 +1873,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
HDsnprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
h5ds_id = H5DOPEN(fd->h5fd, dname);
if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset open failed\n");
+ fprintf(stderr, "HDF5 Dataset open failed\n");
GOTOERROR(FAIL);
}
break;
@@ -2369,17 +2369,17 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
if (++nerror < 20) {
/* report at most 20 errors */
HDprint_rank(output);
- HDfprintf(output,
- "read data error, expected (%d), "
- "got (%d)\n",
- pio_mpi_rank_g + 1, (int)*(ucharptr - 1));
+ fprintf(output,
+ "read data error, expected (%d), "
+ "got (%d)\n",
+ pio_mpi_rank_g + 1, (int)*(ucharptr - 1));
} /* end if */
} /* end if */
} /* end for */
if (nerror >= 20) {
HDprint_rank(output);
- HDfprintf(output, "...");
- HDfprintf(output, "total read data errors=%d\n", nerror);
+ fprintf(output, "...");
+ fprintf(output, "total read data errors=%d\n", nerror);
} /* end if */
} /* if (parms->verify) */
@@ -2395,7 +2395,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -2452,7 +2452,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -2463,7 +2463,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
+ fprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -2474,7 +2474,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
}
else {
@@ -2505,7 +2505,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
fd->posixfd = POSIXOPEN(fname, O_RDONLY);
if (fd->posixfd < 0) {
- HDfprintf(stderr, "POSIX File Open failed(%s)\n", fname);
+ fprintf(stderr, "POSIX File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
@@ -2528,7 +2528,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
&fd->mpifd);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI File Open failed(%s)\n", fname);
+ fprintf(stderr, "MPI File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
@@ -2536,14 +2536,14 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
/*filesize , set size to 0 explicitedly. */
mrc = MPI_File_set_size(fd->mpifd, (MPI_Offset)0);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI_File_set_size failed\n");
+ fprintf(stderr, "MPI_File_set_size failed\n");
GOTOERROR(FAIL);
}
}
else {
mrc = MPI_File_open(pio_comm_g, fname, MPI_MODE_RDONLY, h5_io_info_g, &fd->mpifd);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI File Open failed(%s)\n", fname);
+ fprintf(stderr, "MPI File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
}
@@ -2552,19 +2552,19 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
case PHDF5:
if ((acc_tpl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
/* Set the file driver to the MPI-IO driver */
if (H5Pset_fapl_mpio(acc_tpl, pio_comm_g, h5_io_info_g) < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
}
/* Set the alignment of objects in HDF5 file */
if (H5Pset_alignment(acc_tpl, param->h5_thresh, param->h5_align) < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
}
@@ -2574,13 +2574,13 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
else
fd->h5fd = H5Fopen(fname, H5F_ACC_RDONLY, acc_tpl);
if (fd->h5fd < 0) {
- HDfprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
+ fprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
GOTOERROR(FAIL);
}
/* verifying the close of the acc_tpl */
if (H5Pclose(acc_tpl) < 0) {
- HDfprintf(stderr, "HDF5 Property List Close failed\n");
+ fprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}
@@ -2611,7 +2611,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
rc = POSIXCLOSE(fd->posixfd);
if (rc != 0) {
- HDfprintf(stderr, "POSIX File Close failed\n");
+ fprintf(stderr, "POSIX File Close failed\n");
GOTOERROR(FAIL);
}
@@ -2622,7 +2622,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
mrc = MPI_File_close(&fd->mpifd);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI File close failed\n");
+ fprintf(stderr, "MPI File close failed\n");
GOTOERROR(FAIL);
}
@@ -2633,7 +2633,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
hrc = H5Fclose(fd->h5fd);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 File Close failed\n");
+ fprintf(stderr, "HDF5 File Close failed\n");
GOTOERROR(FAIL);
}
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index d4b302e..fee0a61 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -224,12 +224,12 @@ main(int argc, char *argv[])
ret = MPI_Comm_size(MPI_COMM_WORLD, &comm_world_nprocs_g);
if (ret != MPI_SUCCESS) {
- HDfprintf(stderr, "%s: MPI_Comm_size call failed\n", progname);
+ fprintf(stderr, "%s: MPI_Comm_size call failed\n", progname);
if (ret == MPI_ERR_COMM)
- HDfprintf(stderr, "invalid MPI communicator\n");
+ fprintf(stderr, "invalid MPI communicator\n");
else
- HDfprintf(stderr, "invalid argument\n");
+ fprintf(stderr, "invalid argument\n");
exit_value = EXIT_FAILURE;
goto finish;
@@ -238,12 +238,12 @@ main(int argc, char *argv[])
ret = MPI_Comm_rank(MPI_COMM_WORLD, &comm_world_rank_g);
if (ret != MPI_SUCCESS) {
- HDfprintf(stderr, "%s: MPI_Comm_rank call failed\n", progname);
+ fprintf(stderr, "%s: MPI_Comm_rank call failed\n", progname);
if (ret == MPI_ERR_COMM)
- HDfprintf(stderr, "invalid MPI communicator\n");
+ fprintf(stderr, "invalid MPI communicator\n");
else
- HDfprintf(stderr, "invalid argument\n");
+ fprintf(stderr, "invalid argument\n");
exit_value = EXIT_FAILURE;
goto finish;
@@ -260,8 +260,8 @@ main(int argc, char *argv[])
}
if (opts->output_file) {
- if ((output = HDfopen(opts->output_file, "w")) == NULL) {
- HDfprintf(stderr, "%s: cannot open output file\n", progname);
+ if ((output = fopen(opts->output_file, "w")) == NULL) {
+ fprintf(stderr, "%s: cannot open output file\n", progname);
perror(opts->output_file);
goto finish;
}
@@ -763,7 +763,7 @@ h5_set_info_object(void)
/* copy key/value pair into temporary buffer */
len = strcspn(valp, ";");
next = &valp[len];
- key_val = (char *)HDcalloc(1, len + 1);
+ key_val = (char *)calloc(1, len + 1);
/* increment the next pointer past the terminating semicolon */
if (*next == ';')
@@ -805,16 +805,16 @@ h5_set_info_object(void)
/* actually set the darned thing */
if (MPI_SUCCESS != MPI_Info_set(h5_io_info_g, namep, valp)) {
- HDprintf("MPI_Info_set failed\n");
+ printf("MPI_Info_set failed\n");
ret_value = -1;
}
}
valp = next;
- HDfree(key_val);
+ free(key_val);
} while (next && *next);
- HDfree(envp);
+ free(envp);
}
return ret_value;
@@ -834,17 +834,17 @@ h5_dump_info_object(MPI_Info info)
int flag;
int i, nkeys;
- HDprintf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
+ printf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
if (info == MPI_INFO_NULL) {
- HDprintf("object is MPI_INFO_NULL\n");
+ printf("object is MPI_INFO_NULL\n");
}
else {
MPI_Info_get_nkeys(info, &nkeys);
- HDprintf("object has %d items\n", nkeys);
+ printf("object has %d items\n", nkeys);
for (i = 0; i < nkeys; i++) {
MPI_Info_get_nthkey(info, i, key);
MPI_Info_get(info, key, MPI_MAX_INFO_VAL, value, &flag);
- HDprintf("%s=%s\n", key, value);
+ printf("%s=%s\n", key, value);
}
}
}
@@ -926,8 +926,8 @@ create_comm_world(int num_procs, int *doing_pio)
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
if (num_procs > nprocs) {
- HDfprintf(stderr, "number of process(%d) must be <= number of processes in MPI_COMM_WORLD(%d)\n",
- num_procs, nprocs);
+ fprintf(stderr, "number of process(%d) must be <= number of processes in MPI_COMM_WORLD(%d)\n",
+ num_procs, nprocs);
goto error_done;
}
@@ -936,7 +936,7 @@ create_comm_world(int num_procs, int *doing_pio)
mrc = MPI_Comm_split(MPI_COMM_WORLD, color, myrank, &pio_comm_g);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI_Comm_split failed\n");
+ fprintf(stderr, "MPI_Comm_split failed\n");
goto error_done;
}
@@ -1059,11 +1059,11 @@ output_report(const char *fmt, ...)
if (myrank == 0) {
va_list ap;
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
HDvfprintf(output, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
- HDva_end(ap);
+ va_end(ap);
}
}
@@ -1095,28 +1095,28 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_KB && (val % ONE_KB) == 0) {
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
- HDfprintf(output,
- "%lld"
- "GB%s",
- val / ONE_GB, end);
+ fprintf(output,
+ "%lld"
+ "GB%s",
+ val / ONE_GB, end);
else
- HDfprintf(output,
- "%lld"
- "MB%s",
- val / ONE_MB, end);
+ fprintf(output,
+ "%lld"
+ "MB%s",
+ val / ONE_MB, end);
}
else {
- HDfprintf(output,
- "%lld"
- "KB%s",
- val / ONE_KB, end);
+ fprintf(output,
+ "%lld"
+ "KB%s",
+ val / ONE_KB, end);
}
}
else {
- HDfprintf(output,
- "%lld"
- "%s",
- val, end);
+ fprintf(output,
+ "%lld"
+ "%s",
+ val, end);
}
}
@@ -1124,12 +1124,12 @@ static void
print_io_api(long io_types)
{
if (io_types & PIO_POSIX)
- HDfprintf(output, "posix ");
+ fprintf(output, "posix ");
if (io_types & PIO_MPI)
- HDfprintf(output, "mpiio ");
+ fprintf(output, "mpiio ");
if (io_types & PIO_HDF5)
- HDfprintf(output, "phdf5 ");
- HDfprintf(output, "\n");
+ fprintf(output, "phdf5 ");
+ fprintf(output, "\n");
}
static void
@@ -1138,34 +1138,34 @@ report_parameters(struct options *opts)
int rank = comm_world_rank_g;
print_version("HDF5 Library"); /* print library version */
- HDfprintf(output, "rank %d: ==== Parameters ====\n", rank);
+ fprintf(output, "rank %d: ==== Parameters ====\n", rank);
- HDfprintf(output, "rank %d: IO API=", rank);
+ fprintf(output, "rank %d: IO API=", rank);
print_io_api(opts->io_types);
- HDfprintf(output, "rank %d: Number of files=%ld\n", rank, opts->num_files);
- HDfprintf(output, "rank %d: Number of datasets=%ld\n", rank, opts->num_dsets);
- HDfprintf(output, "rank %d: Number of iterations=%d\n", rank, opts->num_iters);
- HDfprintf(output, "rank %d: Number of processes=%d:%d\n", rank, opts->min_num_procs, opts->max_num_procs);
+ fprintf(output, "rank %d: Number of files=%ld\n", rank, opts->num_files);
+ fprintf(output, "rank %d: Number of datasets=%ld\n", rank, opts->num_dsets);
+ fprintf(output, "rank %d: Number of iterations=%d\n", rank, opts->num_iters);
+ fprintf(output, "rank %d: Number of processes=%d:%d\n", rank, opts->min_num_procs, opts->max_num_procs);
if (opts->dim2d) {
- HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
+ fprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->min_num_procs), ":");
recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->max_num_procs), "\n");
- HDfprintf(output, "rank %d: Size of dataset(s)=", rank);
+ fprintf(output, "rank %d: Size of dataset(s)=", rank);
recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), "x");
recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":");
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "x");
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
- HDfprintf(output, "rank %d: File size=", rank);
+ fprintf(output, "rank %d: File size=", rank);
recover_size_and_print((long long)(squareo(opts->num_bpp * opts->min_num_procs) * opts->num_dsets),
":");
recover_size_and_print((long long)(squareo(opts->num_bpp * opts->max_num_procs) * opts->num_dsets),
"\n");
- HDfprintf(output, "rank %d: Transfer buffer size=", rank);
+ fprintf(output, "rank %d: Transfer buffer size=", rank);
if (opts->interleaved) {
recover_size_and_print((long long)opts->min_xfer_size, "x");
recover_size_and_print((long long)opts->blk_size, ":");
@@ -1178,66 +1178,66 @@ report_parameters(struct options *opts)
recover_size_and_print((long long)opts->blk_size, "x");
recover_size_and_print((long long)opts->max_xfer_size, "\n");
}
- HDfprintf(output, "rank %d: Block size=", rank);
+ fprintf(output, "rank %d: Block size=", rank);
recover_size_and_print((long long)opts->blk_size, "x");
recover_size_and_print((long long)opts->blk_size, "\n");
}
else {
- HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
+ fprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
recover_size_and_print((long long)opts->num_bpp, "\n");
- HDfprintf(output, "rank %d: Size of dataset(s)=", rank);
+ fprintf(output, "rank %d: Size of dataset(s)=", rank);
recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":");
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
- HDfprintf(output, "rank %d: File size=", rank);
+ fprintf(output, "rank %d: File size=", rank);
recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs * opts->num_dsets), ":");
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs * opts->num_dsets), "\n");
- HDfprintf(output, "rank %d: Transfer buffer size=", rank);
+ fprintf(output, "rank %d: Transfer buffer size=", rank);
recover_size_and_print((long long)opts->min_xfer_size, ":");
recover_size_and_print((long long)opts->max_xfer_size, "\n");
- HDfprintf(output, "rank %d: Block size=", rank);
+ fprintf(output, "rank %d: Block size=", rank);
recover_size_and_print((long long)opts->blk_size, "\n");
}
- HDfprintf(output, "rank %d: Block Pattern in Dataset=", rank);
+ fprintf(output, "rank %d: Block Pattern in Dataset=", rank);
if (opts->interleaved)
- HDfprintf(output, "Interleaved\n");
+ fprintf(output, "Interleaved\n");
else
- HDfprintf(output, "Contiguous\n");
+ fprintf(output, "Contiguous\n");
- HDfprintf(output, "rank %d: I/O Method for MPI and HDF5=", rank);
+ fprintf(output, "rank %d: I/O Method for MPI and HDF5=", rank);
if (opts->collective)
- HDfprintf(output, "Collective\n");
+ fprintf(output, "Collective\n");
else
- HDfprintf(output, "Independent\n");
+ fprintf(output, "Independent\n");
- HDfprintf(output, "rank %d: Geometry=", rank);
+ fprintf(output, "rank %d: Geometry=", rank);
if (opts->dim2d)
- HDfprintf(output, "2D\n");
+ fprintf(output, "2D\n");
else
- HDfprintf(output, "1D\n");
+ fprintf(output, "1D\n");
- HDfprintf(output, "rank %d: VFL used for HDF5 I/O=%s\n", rank, "MPI-IO driver");
+ fprintf(output, "rank %d: VFL used for HDF5 I/O=%s\n", rank, "MPI-IO driver");
- HDfprintf(output, "rank %d: Data storage method in HDF5=", rank);
+ fprintf(output, "rank %d: Data storage method in HDF5=", rank);
if (opts->h5_use_chunks)
- HDfprintf(output, "Chunked\n");
+ fprintf(output, "Chunked\n");
else
- HDfprintf(output, "Contiguous\n");
+ fprintf(output, "Contiguous\n");
{
char *prefix = HDgetenv("HDF5_PARAPREFIX");
- HDfprintf(output, "rank %d: Env HDF5_PARAPREFIX=%s\n", rank, (prefix ? prefix : "not set"));
+ fprintf(output, "rank %d: Env HDF5_PARAPREFIX=%s\n", rank, (prefix ? prefix : "not set"));
}
- HDfprintf(output, "rank %d: ", rank);
+ fprintf(output, "rank %d: ", rank);
h5_dump_info_object(h5_io_info_g);
- HDfprintf(output, "rank %d: ==== End of Parameters ====\n", rank);
- HDfprintf(output, "\n");
+ fprintf(output, "rank %d: ==== End of Parameters ====\n", rank);
+ fprintf(output, "\n");
}
/*
@@ -1289,7 +1289,7 @@ parse_command_line(int argc, const char *const *argv)
char buf[10];
int i;
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (isalnum(*end) && i < 10)
@@ -1305,8 +1305,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->io_types |= PIO_POSIX;
}
else {
- HDfprintf(stderr, "pio_perf: invalid --api option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "pio_perf: invalid --api option %s\n", buf);
+ exit(EXIT_FAILURE);
}
if (*end == '\0')
@@ -1342,7 +1342,7 @@ parse_command_line(int argc, const char *const *argv)
char buf[10];
int i;
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -1353,8 +1353,8 @@ parse_command_line(int argc, const char *const *argv)
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
if (!isdigit(buf[j])) {
- HDfprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
+ exit(EXIT_FAILURE);
}
pio_debug_level = atoi(buf);
@@ -1379,8 +1379,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->verify = TRUE;
break;
default:
- HDfprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
+ exit(EXIT_FAILURE);
}
}
@@ -1396,13 +1396,13 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->num_bpp = parse_size_directive(H5_optarg);
break;
case 'F':
- cl_opts->num_files = HDatoi(H5_optarg);
+ cl_opts->num_files = atoi(H5_optarg);
break;
case 'g':
cl_opts->dim2d = 1;
break;
case 'i':
- cl_opts->num_iters = HDatoi(H5_optarg);
+ cl_opts->num_iters = atoi(H5_optarg);
break;
case 'I':
cl_opts->interleaved = 1;
@@ -1411,10 +1411,10 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->output_file = H5_optarg;
break;
case 'p':
- cl_opts->min_num_procs = HDatoi(H5_optarg);
+ cl_opts->min_num_procs = atoi(H5_optarg);
break;
case 'P':
- cl_opts->max_num_procs = HDatoi(H5_optarg);
+ cl_opts->max_num_procs = atoi(H5_optarg);
break;
case 'T':
cl_opts->h5_threshold = parse_size_directive(H5_optarg);
@@ -1432,7 +1432,7 @@ parse_command_line(int argc, const char *const *argv)
case '?':
default:
usage(progname);
- HDfree(cl_opts);
+ free(cl_opts);
return NULL;
}
}
@@ -1523,8 +1523,8 @@ parse_size_directive(const char *size)
s *= ONE_GB;
break;
default:
- HDfprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
+ exit(EXIT_FAILURE);
}
}
@@ -1546,124 +1546,124 @@ usage(const char *prog)
if (myrank == 0) {
print_version(prog);
- HDprintf("usage: %s [OPTIONS]\n", prog);
- HDprintf(" OPTIONS\n");
- HDprintf(" -h, --help Print a usage message and exit\n");
- HDprintf(" -a S, --align=S Alignment of objects in HDF5 file [default: 1]\n");
- HDprintf(" -A AL, --api=AL Which APIs to test [default: all of them]\n");
+ printf("usage: %s [OPTIONS]\n", prog);
+ printf(" OPTIONS\n");
+ printf(" -h, --help Print a usage message and exit\n");
+ printf(" -a S, --align=S Alignment of objects in HDF5 file [default: 1]\n");
+ printf(" -A AL, --api=AL Which APIs to test [default: all of them]\n");
#if 0
- HDprintf(" -b, --binary The elusive binary option\n");
+ printf(" -b, --binary The elusive binary option\n");
#endif /* 0 */
- HDprintf(" -B S, --block-size=S Block size within transfer buffer\n");
- HDprintf(" (see below for description)\n");
- HDprintf(" [default: half the number of bytes per process\n");
- HDprintf(" per dataset]\n");
- HDprintf(" -c, --chunk Create HDF5 datasets using chunked storage\n");
- HDprintf(" [default: contiguous storage]\n");
- HDprintf(" -C, --collective Use collective I/O for MPI and HDF5 APIs\n");
- HDprintf(" [default: independent I/O)\n");
- HDprintf(" -d N, --num-dsets=N Number of datasets per file [default: 1]\n");
- HDprintf(" -D DL, --debug=DL Indicate the debugging level\n");
- HDprintf(" [default: no debugging]\n");
- HDprintf(" -e S, --num-bytes=S Number of bytes per process per dataset\n");
- HDprintf(" (see below for description)\n");
- HDprintf(" [default: 256K for 1D, 8K for 2D]\n");
- HDprintf(" -F N, --num-files=N Number of files [default: 1]\n");
- HDprintf(" -g, --geometry Use 2D geometry [default: 1D geometry]\n");
- HDprintf(" -i N, --num-iterations=N Number of iterations to perform [default: 1]\n");
- HDprintf(" -I, --interleaved Interleaved access pattern\n");
- HDprintf(" (see below for example)\n");
- HDprintf(" [default: Contiguous access pattern]\n");
- HDprintf(" -o F, --output=F Output raw data into file F [default: none]\n");
- HDprintf(" -p N, --min-num-processes=N Minimum number of processes to use [default: 1]\n");
- HDprintf(" -P N, --max-num-processes=N Maximum number of processes to use\n");
- HDprintf(" [default: all MPI_COMM_WORLD processes ]\n");
- HDprintf(" -T S, --threshold=S Threshold for alignment of objects in HDF5 file\n");
- HDprintf(" [default: 1]\n");
- HDprintf(" -w, --write-only Perform write tests not the read tests\n");
- HDprintf(" -x S, --min-xfer-size=S Minimum transfer buffer size\n");
- HDprintf(" (see below for description)\n");
- HDprintf(" [default: half the number of bytes per process\n");
- HDprintf(" per dataset]\n");
- HDprintf(" -X S, --max-xfer-size=S Maximum transfer buffer size\n");
- HDprintf(" [default: the number of bytes per process per\n");
- HDprintf(" dataset]\n");
- HDprintf("\n");
- HDprintf(" F - is a filename.\n");
- HDprintf(" N - is an integer >=0.\n");
- HDprintf(" S - is a size specifier, an integer >=0 followed by a size indicator:\n");
- HDprintf(" K - Kilobyte (%d)\n", ONE_KB);
- HDprintf(" M - Megabyte (%d)\n", ONE_MB);
- HDprintf(" G - Gigabyte (%d)\n", ONE_GB);
- HDprintf("\n");
- HDprintf(" Example: '37M' is 37 megabytes or %d bytes\n", 37 * ONE_MB);
- HDprintf("\n");
- HDprintf(" AL - is an API list. Valid values are:\n");
- HDprintf(" phdf5 - Parallel HDF5\n");
- HDprintf(" mpiio - MPI-I/O\n");
- HDprintf(" posix - POSIX\n");
- HDprintf("\n");
- HDprintf(" Example: --api=mpiio,phdf5\n");
- HDprintf("\n");
- HDprintf(" Dataset size:\n");
- HDprintf(" Depending on the selected geometry, each test dataset is either a linear\n");
- HDprintf(" array of size bytes-per-process * num-processes, or a square array of size\n");
- HDprintf(" (bytes-per-process * num-processes) x (bytes-per-process * num-processes).\n");
- HDprintf("\n");
- HDprintf(" Block size vs. Transfer buffer size:\n");
- HDprintf(" buffer-size controls the size of the memory buffer, which is broken into\n");
- HDprintf(" blocks and written to the file. Depending on the selected geometry, each\n");
- HDprintf(" block can be a linear array of size block-size or a square array of size\n");
- HDprintf(" block-size x block-size. The arrangement in which blocks are written is\n");
- HDprintf(" determined by the access pattern.\n");
- HDprintf("\n");
- HDprintf(" In 1D geometry, the transfer buffer is a linear array of size buffer-size.\n");
- HDprintf(" In 2D geometry, it is a rectangular array of size block-size x buffer-size\n");
- HDprintf(" or buffer-size x block-size if interleaved pattern is selected.\n");
- HDprintf("\n");
- HDprintf(" Interleaved and Contiguous patterns in 1D geometry:\n");
- HDprintf(" When contiguous access pattern is chosen, the dataset is evenly divided\n");
- HDprintf(" into num-processes regions and each process writes data to its own region.\n");
- HDprintf(" When interleaved blocks are written to a dataset, space for the first\n");
- HDprintf(" block of the first process is allocated in the dataset, then space is\n");
- HDprintf(" allocated for the first block of the second process, etc. until space is\n");
- HDprintf(" allocated for the first block of each process, then space is allocated for\n");
- HDprintf(" the second block of the first process, the second block of the second\n");
- HDprintf(" process, etc.\n");
- HDprintf("\n");
- HDprintf(" For example, with a 3 process run, 512KB bytes-per-process, 256KB transfer\n");
- HDprintf(" buffer size, and 64KB block size, each process must issue 2 transfer\n");
- HDprintf(" requests to complete access to the dataset.\n");
- HDprintf(" Contiguous blocks of the first transfer request are written like so:\n");
- HDprintf(" 1111----2222----3333----\n");
- HDprintf(" Interleaved blocks of the first transfer request are written like so:\n");
- HDprintf(" 123123123123------------\n");
- HDprintf(" The actual number of I/O operations involved in a transfer request\n");
- HDprintf(" depends on the access pattern and communication mode.\n");
- HDprintf(" When using independent I/O with interleaved pattern, each process\n");
- HDprintf(" performs 4 small non-contiguous I/O operations per transfer request.\n");
- HDprintf(" If collective I/O is turned on, the combined content of the buffers of\n");
- HDprintf(" the 3 processes will be written using one collective I/O operation\n");
- HDprintf(" per transfer request.\n");
- HDprintf("\n");
- HDprintf(" For information about access patterns in 2D geometry, please refer to the\n");
- HDprintf(" HDF5 Reference Manual.\n");
- HDprintf("\n");
- HDprintf(" DL - is a list of debugging flags. Valid values are:\n");
- HDprintf(" 1 - Minimal\n");
- HDprintf(" 2 - Not quite everything\n");
- HDprintf(" 3 - Everything\n");
- HDprintf(" 4 - The kitchen sink\n");
- HDprintf(" r - Raw data I/O throughput information\n");
- HDprintf(" t - Times as well as throughputs\n");
- HDprintf(" v - Verify data correctness\n");
- HDprintf("\n");
- HDprintf(" Example: --debug=2,r,t\n");
- HDprintf("\n");
- HDprintf(" Environment variables:\n");
- HDprintf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
- HDprintf(" HDF5_MPI_INFO MPI INFO object key=value separated by ;\n");
- HDprintf(" HDF5_PARAPREFIX Parallel data files prefix\n");
+ printf(" -B S, --block-size=S Block size within transfer buffer\n");
+ printf(" (see below for description)\n");
+ printf(" [default: half the number of bytes per process\n");
+ printf(" per dataset]\n");
+ printf(" -c, --chunk Create HDF5 datasets using chunked storage\n");
+ printf(" [default: contiguous storage]\n");
+ printf(" -C, --collective Use collective I/O for MPI and HDF5 APIs\n");
+ printf(" [default: independent I/O)\n");
+ printf(" -d N, --num-dsets=N Number of datasets per file [default: 1]\n");
+ printf(" -D DL, --debug=DL Indicate the debugging level\n");
+ printf(" [default: no debugging]\n");
+ printf(" -e S, --num-bytes=S Number of bytes per process per dataset\n");
+ printf(" (see below for description)\n");
+ printf(" [default: 256K for 1D, 8K for 2D]\n");
+ printf(" -F N, --num-files=N Number of files [default: 1]\n");
+ printf(" -g, --geometry Use 2D geometry [default: 1D geometry]\n");
+ printf(" -i N, --num-iterations=N Number of iterations to perform [default: 1]\n");
+ printf(" -I, --interleaved Interleaved access pattern\n");
+ printf(" (see below for example)\n");
+ printf(" [default: Contiguous access pattern]\n");
+ printf(" -o F, --output=F Output raw data into file F [default: none]\n");
+ printf(" -p N, --min-num-processes=N Minimum number of processes to use [default: 1]\n");
+ printf(" -P N, --max-num-processes=N Maximum number of processes to use\n");
+ printf(" [default: all MPI_COMM_WORLD processes ]\n");
+ printf(" -T S, --threshold=S Threshold for alignment of objects in HDF5 file\n");
+ printf(" [default: 1]\n");
+ printf(" -w, --write-only Perform write tests not the read tests\n");
+ printf(" -x S, --min-xfer-size=S Minimum transfer buffer size\n");
+ printf(" (see below for description)\n");
+ printf(" [default: half the number of bytes per process\n");
+ printf(" per dataset]\n");
+ printf(" -X S, --max-xfer-size=S Maximum transfer buffer size\n");
+ printf(" [default: the number of bytes per process per\n");
+ printf(" dataset]\n");
+ printf("\n");
+ printf(" F - is a filename.\n");
+ printf(" N - is an integer >=0.\n");
+ printf(" S - is a size specifier, an integer >=0 followed by a size indicator:\n");
+ printf(" K - Kilobyte (%d)\n", ONE_KB);
+ printf(" M - Megabyte (%d)\n", ONE_MB);
+ printf(" G - Gigabyte (%d)\n", ONE_GB);
+ printf("\n");
+ printf(" Example: '37M' is 37 megabytes or %d bytes\n", 37 * ONE_MB);
+ printf("\n");
+ printf(" AL - is an API list. Valid values are:\n");
+ printf(" phdf5 - Parallel HDF5\n");
+ printf(" mpiio - MPI-I/O\n");
+ printf(" posix - POSIX\n");
+ printf("\n");
+ printf(" Example: --api=mpiio,phdf5\n");
+ printf("\n");
+ printf(" Dataset size:\n");
+ printf(" Depending on the selected geometry, each test dataset is either a linear\n");
+ printf(" array of size bytes-per-process * num-processes, or a square array of size\n");
+ printf(" (bytes-per-process * num-processes) x (bytes-per-process * num-processes).\n");
+ printf("\n");
+ printf(" Block size vs. Transfer buffer size:\n");
+ printf(" buffer-size controls the size of the memory buffer, which is broken into\n");
+ printf(" blocks and written to the file. Depending on the selected geometry, each\n");
+ printf(" block can be a linear array of size block-size or a square array of size\n");
+ printf(" block-size x block-size. The arrangement in which blocks are written is\n");
+ printf(" determined by the access pattern.\n");
+ printf("\n");
+ printf(" In 1D geometry, the transfer buffer is a linear array of size buffer-size.\n");
+ printf(" In 2D geometry, it is a rectangular array of size block-size x buffer-size\n");
+ printf(" or buffer-size x block-size if interleaved pattern is selected.\n");
+ printf("\n");
+ printf(" Interleaved and Contiguous patterns in 1D geometry:\n");
+ printf(" When contiguous access pattern is chosen, the dataset is evenly divided\n");
+ printf(" into num-processes regions and each process writes data to its own region.\n");
+ printf(" When interleaved blocks are written to a dataset, space for the first\n");
+ printf(" block of the first process is allocated in the dataset, then space is\n");
+ printf(" allocated for the first block of the second process, etc. until space is\n");
+ printf(" allocated for the first block of each process, then space is allocated for\n");
+ printf(" the second block of the first process, the second block of the second\n");
+ printf(" process, etc.\n");
+ printf("\n");
+ printf(" For example, with a 3 process run, 512KB bytes-per-process, 256KB transfer\n");
+ printf(" buffer size, and 64KB block size, each process must issue 2 transfer\n");
+ printf(" requests to complete access to the dataset.\n");
+ printf(" Contiguous blocks of the first transfer request are written like so:\n");
+ printf(" 1111----2222----3333----\n");
+ printf(" Interleaved blocks of the first transfer request are written like so:\n");
+ printf(" 123123123123------------\n");
+ printf(" The actual number of I/O operations involved in a transfer request\n");
+ printf(" depends on the access pattern and communication mode.\n");
+ printf(" When using independent I/O with interleaved pattern, each process\n");
+ printf(" performs 4 small non-contiguous I/O operations per transfer request.\n");
+ printf(" If collective I/O is turned on, the combined content of the buffers of\n");
+ printf(" the 3 processes will be written using one collective I/O operation\n");
+ printf(" per transfer request.\n");
+ printf("\n");
+ printf(" For information about access patterns in 2D geometry, please refer to the\n");
+ printf(" HDF5 Reference Manual.\n");
+ printf("\n");
+ printf(" DL - is a list of debugging flags. Valid values are:\n");
+ printf(" 1 - Minimal\n");
+ printf(" 2 - Not quite everything\n");
+ printf(" 3 - Everything\n");
+ printf(" 4 - The kitchen sink\n");
+ printf(" r - Raw data I/O throughput information\n");
+ printf(" t - Times as well as throughputs\n");
+ printf(" v - Verify data correctness\n");
+ printf("\n");
+ printf(" Example: --debug=2,r,t\n");
+ printf("\n");
+ printf(" Environment variables:\n");
+ printf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
+ printf(" HDF5_MPI_INFO MPI INFO object key=value separated by ;\n");
+ printf(" HDF5_PARAPREFIX Parallel data files prefix\n");
fflush(stdout);
} /* end if */
} /* end usage() */
@@ -1680,7 +1680,7 @@ usage(const char *prog)
int
main(void)
{
- HDprintf("No parallel IO performance because parallel is not configured\n");
+ printf("No parallel IO performance because parallel is not configured\n");
return EXIT_SUCCESS;
} /* end main */
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index b80189b..511957b 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -44,7 +44,7 @@
}
#define ERRMSG(mesg) \
{ \
- HDfprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \
+ fprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \
}
/* verify: if val is false (0), print mesg. */
@@ -144,7 +144,7 @@ do_sio(parameters param, results *res)
/* IO type */
iot = param.io_type;
- if (NULL == (fname = HDcalloc(FILENAME_MAX, sizeof(char))))
+ if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
GOTOERROR(FAIL);
switch (iot) {
@@ -158,7 +158,7 @@ do_sio(parameters param, results *res)
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
GOTOERROR(FAIL);
}
@@ -173,29 +173,29 @@ do_sio(parameters param, results *res)
/* Validate transfer buffer size */
if (param.buf_size[i] <= 0) {
- HDfprintf(stderr, "Transfer buffer size[%d] (%zu) must be > 0\n", i, buf_size[i]);
+ fprintf(stderr, "Transfer buffer size[%d] (%zu) must be > 0\n", i, buf_size[i]);
GOTOERROR(FAIL);
}
if ((param.dset_size[i] % param.buf_size[i]) != 0) {
- HDfprintf(stderr,
- "Dataset size[%d] (%lld) must be a multiple of the "
- "transfer buffer size[%d] (%zu)\n",
- param.rank, (long long)param.dset_size[i], param.rank, param.buf_size[i]);
+ fprintf(stderr,
+ "Dataset size[%d] (%lld) must be a multiple of the "
+ "transfer buffer size[%d] (%zu)\n",
+ param.rank, (long long)param.dset_size[i], param.rank, param.buf_size[i]);
GOTOERROR(FAIL);
}
}
/* Allocate transfer buffer */
if ((buffer = (char *)malloc(linear_buf_size)) == NULL) {
- HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", linear_buf_size);
+ fprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", linear_buf_size);
GOTOERROR(FAIL);
}
if (sio_debug_level >= 4)
/* output all of the times for all iterations */
- HDfprintf(output, "Timer details:\n");
+ fprintf(output, "Timer details:\n");
/*
* Write performance measurement
@@ -206,7 +206,7 @@ do_sio(parameters param, results *res)
sio_create_filename(iot, base_name, fname, FILENAME_MAX, &param);
if (sio_debug_level > 0)
- HDfprintf(output, "data filename=%s\n", fname);
+ fprintf(output, "data filename=%s\n", fname);
io_time_set(res->timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTART);
hrc = do_fopen(&param, fname, &fd, SIO_CREATE | SIO_WRITE);
@@ -263,13 +263,13 @@ done:
break;
default:
/* unknown request */
- HDassert(0 && "Unknown IO type");
+ assert(0 && "Unknown IO type");
break;
}
/* release generic resources */
- HDfree(buffer);
- HDfree(fname);
+ free(buffer);
+ free(fname);
res->ret_code = ret_code;
}
@@ -310,8 +310,8 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
- HDassert(0 && "Unknown IO type");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ assert(0 && "Unknown IO type");
break;
}
@@ -486,14 +486,14 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
break;
default:
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
GOTOERROR(FAIL);
break;
} /* end switch */
@@ -507,7 +507,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
h5dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (h5dcpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -515,7 +515,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Set the chunk size to be the same as the buffer size */
hrc = H5Pset_chunk(h5dcpl, rank, h5chunk);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -525,21 +525,21 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
H5Dcreate2(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, H5P_DEFAULT, h5dcpl, H5P_DEFAULT);
if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset Create failed\n");
+ fprintf(stderr, "HDF5 Dataset Create failed\n");
GOTOERROR(FAIL);
}
hrc = H5Pclose(h5dcpl);
/* verifying the close of the dcpl */
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Close failed\n");
+ fprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
GOTOERROR(FAIL);
break;
}
@@ -551,7 +551,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = dset_write(rank - 1, fd, parms, buffer);
if (hrc < 0) {
- HDfprintf(stderr, "Error in dataset write\n");
+ fprintf(stderr, "Error in dataset write\n");
GOTOERROR(FAIL);
}
@@ -565,7 +565,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -578,7 +578,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -589,7 +589,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
+ fprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -600,7 +600,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
}
else {
@@ -660,7 +660,7 @@ dset_write(int local_dim, file_descr *fd, parameters *parms, void *buffer)
for (k = 0; k < parms->rank; k++) {
- HDassert(h5offset[k] >= 0);
+ assert(h5offset[k] >= 0);
if (dims[k] <= (hsize_t)h5offset[k]) {
dims[k] = dims[k] + h5count[k];
hrc = H5Sset_extent_simple(h5dset_space_id, parms->rank, dims, maxdims);
@@ -683,8 +683,8 @@ dset_write(int local_dim, file_descr *fd, parameters *parms, void *buffer)
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
- HDassert(0 && "Unknown IO type");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ assert(0 && "Unknown IO type");
break;
} /* switch (parms->io_type) */
}
@@ -777,7 +777,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Allocate data verification buffer */
if (NULL == (buffer2 = (char *)malloc(linear_buf_size))) {
- HDfprintf(stderr, "malloc for data verification buffer size (%zu) failed\n", linear_buf_size);
+ fprintf(stderr, "malloc for data verification buffer size (%zu) failed\n", linear_buf_size);
GOTOERROR(FAIL);
} /* end if */
@@ -828,14 +828,14 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
GOTOERROR(FAIL);
break;
} /* end switch */
@@ -849,14 +849,14 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
HDsnprintf(dname, sizeof(dname), "Dataset_%ld", (long)parms->num_bytes);
h5ds_id = H5Dopen2(fd->h5fd, dname, H5P_DEFAULT);
if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset open failed\n");
+ fprintf(stderr, "HDF5 Dataset open failed\n");
GOTOERROR(FAIL);
}
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
GOTOERROR(FAIL);
break;
} /* end switch */
@@ -866,7 +866,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = dset_read(rank - 1, fd, parms, buffer, buffer2);
if (hrc < 0) {
- HDfprintf(stderr, "Error in dataset read\n");
+ fprintf(stderr, "Error in dataset read\n");
GOTOERROR(FAIL);
}
@@ -880,7 +880,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -893,7 +893,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -904,7 +904,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
+ fprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -915,7 +915,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
}
else {
@@ -981,8 +981,8 @@ dset_read(int local_dim, file_descr *fd, parameters *parms, void *buffer, const
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
- HDassert(0 && "Unknown IO type");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ assert(0 && "Unknown IO type");
break;
} /* switch (parms->io_type) */
}
@@ -1065,7 +1065,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
fd->posixfd = POSIXOPEN(fname, O_RDONLY);
if (fd->posixfd < 0) {
- HDfprintf(stderr, "POSIX File Open failed(%s)\n", fname);
+ fprintf(stderr, "POSIX File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
@@ -1076,7 +1076,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
fapl = set_vfd(param);
if (fapl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -1097,14 +1097,14 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
}
if (fd->h5fd < 0) {
- HDfprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
+ fprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
GOTOERROR(FAIL);
}
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)param->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)param->io_type);
GOTOERROR(FAIL);
break;
}
@@ -1162,14 +1162,14 @@ set_vfd(parameters *param)
char arr[H5FD_MEM_NTYPES][1024];
} *sv = NULL;
- HDmemset(memb_map, 0, sizeof memb_map);
- HDmemset(memb_fapl, 0, sizeof memb_fapl);
- HDmemset(memb_name, 0, sizeof memb_name);
- HDmemset(memb_addr, 0, sizeof memb_addr);
+ memset(memb_map, 0, sizeof memb_map);
+ memset(memb_fapl, 0, sizeof memb_fapl);
+ memset(memb_name, 0, sizeof memb_name);
+ memset(memb_addr, 0, sizeof memb_addr);
- HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
- if (NULL == (sv = HDcalloc(1, sizeof(*sv))))
+ if (NULL == (sv = calloc(1, sizeof(*sv))))
return -1;
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
@@ -1179,11 +1179,11 @@ set_vfd(parameters *param)
}
if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE) < 0) {
- HDfree(sv);
+ free(sv);
return -1;
}
- HDfree(sv);
+ free(sv);
}
else if (vfd == family) {
hsize_t fam_size = 1 * 1024 * 1024; /*100 MB*/
@@ -1227,7 +1227,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
rc = POSIXCLOSE(fd->posixfd);
if (rc != 0) {
- HDfprintf(stderr, "POSIX File Close failed\n");
+ fprintf(stderr, "POSIX File Close failed\n");
GOTOERROR(FAIL);
}
@@ -1238,7 +1238,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
hrc = H5Fclose(fd->h5fd);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 File Close failed\n");
+ fprintf(stderr, "HDF5 File Close failed\n");
GOTOERROR(FAIL);
}
@@ -1247,7 +1247,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
GOTOERROR(FAIL);
break;
}
@@ -1271,7 +1271,7 @@ do_cleanupfile(iotype iot, char *filename)
hid_t driver;
temp_sz = (4096 + sizeof("-?.h5")) * sizeof(char);
- if (NULL == (temp = HDcalloc(1, temp_sz)))
+ if (NULL == (temp = calloc(1, temp_sz)))
goto done;
if (clean_file_g == -1)
@@ -1310,7 +1310,7 @@ do_cleanupfile(iotype iot, char *filename)
}
else if (driver == H5FD_MULTI) {
H5FD_mem_t mt;
- HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
HDsnprintf(temp, temp_sz, "%s-%c.h5", filename, multi_letters[mt]);
@@ -1325,12 +1325,12 @@ do_cleanupfile(iotype iot, char *filename)
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
- HDassert(0 && "Unknown IO type");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ assert(0 && "Unknown IO type");
break;
}
}
done:
- HDfree(temp);
+ free(temp);
}
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index ef9e7db..a06e1fe 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -202,8 +202,8 @@ main(int argc, char *argv[])
}
if (opts->output_file) {
- if ((output = HDfopen(opts->output_file, "w")) == NULL) {
- HDfprintf(stderr, "%s: cannot open output file\n", progname);
+ if ((output = fopen(opts->output_file, "w")) == NULL) {
+ fprintf(stderr, "%s: cannot open output file\n", progname);
HDperror(opts->output_file);
goto finish;
}
@@ -214,7 +214,7 @@ main(int argc, char *argv[])
run_test_loop(opts);
finish:
- HDfree(opts);
+ free(opts);
return exit_value;
}
@@ -327,8 +327,8 @@ run_test(iotype iot, parameters parms, struct options *opts)
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
- HDassert(0 && "Unknown IO tpe");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ assert(0 && "Unknown IO tpe");
break;
}
@@ -500,16 +500,16 @@ run_test(iotype iot, parameters parms, struct options *opts)
}
/* clean up our mess */
- HDfree(write_sys_mm_table);
- HDfree(write_mm_table);
- HDfree(write_gross_mm_table);
- HDfree(write_raw_mm_table);
+ free(write_sys_mm_table);
+ free(write_mm_table);
+ free(write_gross_mm_table);
+ free(write_raw_mm_table);
if (!parms.h5_write_only) {
- HDfree(read_sys_mm_table);
- HDfree(read_mm_table);
- HDfree(read_gross_mm_table);
- HDfree(read_raw_mm_table);
+ free(read_sys_mm_table);
+ free(read_mm_table);
+ free(read_gross_mm_table);
+ free(read_raw_mm_table);
}
return ret_value;
@@ -633,11 +633,11 @@ output_report(const char *fmt, ...)
{
va_list ap;
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
HDvfprintf(output, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
- HDva_end(ap);
+ va_end(ap);
}
/*
@@ -662,28 +662,28 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_KB && (val % ONE_KB) == 0) {
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
- HDfprintf(output,
- "%lld"
- "GB%s",
- val / ONE_GB, end);
+ fprintf(output,
+ "%lld"
+ "GB%s",
+ val / ONE_GB, end);
else
- HDfprintf(output,
- "%lld"
- "MB%s",
- val / ONE_MB, end);
+ fprintf(output,
+ "%lld"
+ "MB%s",
+ val / ONE_MB, end);
}
else {
- HDfprintf(output,
- "%lld"
- "KB%s",
- val / ONE_KB, end);
+ fprintf(output,
+ "%lld"
+ "KB%s",
+ val / ONE_KB, end);
}
}
else {
- HDfprintf(output,
- "%lld"
- "%s",
- val, end);
+ fprintf(output,
+ "%lld"
+ "%s",
+ val, end);
}
}
@@ -691,10 +691,10 @@ static void
print_io_api(long io_types)
{
if (io_types & SIO_POSIX)
- HDfprintf(output, "posix ");
+ fprintf(output, "posix ");
if (io_types & SIO_HDF5)
- HDfprintf(output, "hdf5 ");
- HDfprintf(output, "\n");
+ fprintf(output, "hdf5 ");
+ fprintf(output, "\n");
}
static void
@@ -704,95 +704,95 @@ report_parameters(struct options *opts)
rank = opts->dset_rank;
print_version("HDF5 Library"); /* print library version */
- HDfprintf(output, "==== Parameters ====\n");
+ fprintf(output, "==== Parameters ====\n");
- HDfprintf(output, "IO API=");
+ fprintf(output, "IO API=");
print_io_api(opts->io_types);
- HDfprintf(output, "Number of iterations=%d\n", opts->num_iters);
+ fprintf(output, "Number of iterations=%d\n", opts->num_iters);
- HDfprintf(output, "Dataset size=");
+ fprintf(output, "Dataset size=");
for (i = 0; i < rank; i++)
recover_size_and_print((long long)opts->dset_size[i], " ");
- HDfprintf(output, "\n");
+ fprintf(output, "\n");
- HDfprintf(output, "Transfer buffer size=");
+ fprintf(output, "Transfer buffer size=");
for (i = 0; i < rank; i++)
recover_size_and_print((long long)opts->buf_size[i], " ");
- HDfprintf(output, "\n");
+ fprintf(output, "\n");
if (opts->page_size) {
- HDfprintf(output, "Page Aggregation Enabled. Page size = %zu\n", opts->page_size);
+ fprintf(output, "Page Aggregation Enabled. Page size = %zu\n", opts->page_size);
if (opts->page_buffer_size)
- HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %zu\n", opts->page_buffer_size);
+ fprintf(output, "Page Buffering Enabled. Page Buffer size = %zu\n", opts->page_buffer_size);
else
- HDfprintf(output, "Page Buffering Disabled\n");
+ fprintf(output, "Page Buffering Disabled\n");
}
else
- HDfprintf(output, "Page Aggregation Disabled\n");
+ fprintf(output, "Page Aggregation Disabled\n");
- HDfprintf(output, "Dimension access order=");
+ fprintf(output, "Dimension access order=");
for (i = 0; i < rank; i++)
recover_size_and_print((long long)opts->order[i], " ");
- HDfprintf(output, "\n");
+ fprintf(output, "\n");
if (opts->io_types & SIO_HDF5) {
- HDfprintf(output, "HDF5 data storage method=");
+ fprintf(output, "HDF5 data storage method=");
if (opts->h5_use_chunks) {
- HDfprintf(output, "Chunked\n");
- HDfprintf(output, "HDF5 chunk size=");
+ fprintf(output, "Chunked\n");
+ fprintf(output, "HDF5 chunk size=");
for (i = 0; i < rank; i++)
recover_size_and_print((long long)opts->chk_size[i], " ");
- HDfprintf(output, "\n");
+ fprintf(output, "\n");
- HDfprintf(output, "HDF5 dataset dimensions=");
+ fprintf(output, "HDF5 dataset dimensions=");
if (opts->h5_extendable) {
- HDfprintf(output, "Extendable\n");
+ fprintf(output, "Extendable\n");
}
else {
- HDfprintf(output, "Fixed\n");
+ fprintf(output, "Fixed\n");
}
}
else {
- HDfprintf(output, "Contiguous\n");
+ fprintf(output, "Contiguous\n");
}
- HDfprintf(output, "HDF5 file driver=");
+ fprintf(output, "HDF5 file driver=");
if (opts->vfd == sec2) {
- HDfprintf(output, "sec2\n");
+ fprintf(output, "sec2\n");
}
else if (opts->vfd == stdio) {
- HDfprintf(output, "stdio\n");
+ fprintf(output, "stdio\n");
}
else if (opts->vfd == core) {
- HDfprintf(output, "core\n");
+ fprintf(output, "core\n");
}
else if (opts->vfd == split) {
- HDfprintf(output, "split\n");
+ fprintf(output, "split\n");
}
else if (opts->vfd == multi) {
- HDfprintf(output, "multi\n");
+ fprintf(output, "multi\n");
}
else if (opts->vfd == family) {
- HDfprintf(output, "family\n");
+ fprintf(output, "family\n");
}
else if (opts->vfd == direct) {
- HDfprintf(output, "direct\n");
+ fprintf(output, "direct\n");
}
}
{
char *prefix = HDgetenv("HDF5_PREFIX");
- HDfprintf(output, "Env HDF5_PREFIX=%s\n", (prefix ? prefix : "not set"));
+ fprintf(output, "Env HDF5_PREFIX=%s\n", (prefix ? prefix : "not set"));
}
- HDfprintf(output, "==== End of Parameters ====\n");
- HDfprintf(output, "\n");
+ fprintf(output, "==== End of Parameters ====\n");
+ fprintf(output, "\n");
}
/*
@@ -809,7 +809,7 @@ parse_command_line(int argc, const char *const *argv)
struct options *cl_opts;
int i, default_rank, actual_rank, ranks[4];
- cl_opts = (struct options *)HDmalloc(sizeof(struct options));
+ cl_opts = (struct options *)malloc(sizeof(struct options));
cl_opts->page_buffer_size = 0;
cl_opts->page_size = 0;
@@ -859,7 +859,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -872,8 +872,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->io_types |= SIO_POSIX;
}
else {
- HDfprintf(stderr, "sio_perf: invalid --api option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "sio_perf: invalid --api option %s\n", buf);
+ exit(EXIT_FAILURE);
}
if (*end == '\0')
@@ -899,7 +899,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -925,7 +925,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -936,8 +936,8 @@ parse_command_line(int argc, const char *const *argv)
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
if (!HDisdigit(buf[j])) {
- HDfprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
+ exit(EXIT_FAILURE);
}
sio_debug_level = atoi(buf);
@@ -962,8 +962,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->verify = TRUE;
break;
default:
- HDfprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
+ exit(EXIT_FAILURE);
}
}
@@ -982,7 +982,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -1003,7 +1003,7 @@ parse_command_line(int argc, const char *const *argv)
break;
case 'i':
- cl_opts->num_iters = HDatoi(H5_optarg);
+ cl_opts->num_iters = atoi(H5_optarg);
break;
case 'o':
cl_opts->output_file = H5_optarg;
@@ -1034,8 +1034,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->vfd = direct;
}
else {
- HDfprintf(stderr, "sio_perf: invalid --api option %s\n", H5_optarg);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "sio_perf: invalid --api option %s\n", H5_optarg);
+ exit(EXIT_FAILURE);
}
break;
case 'w':
@@ -1051,7 +1051,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -1078,7 +1078,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -1103,7 +1103,7 @@ parse_command_line(int argc, const char *const *argv)
case '?':
default:
usage(progname);
- HDfree(cl_opts);
+ free(cl_opts);
return NULL;
}
}
@@ -1198,8 +1198,8 @@ parse_size_directive(const char *size)
break;
default:
- HDfprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
+ exit(EXIT_FAILURE);
}
}
@@ -1216,70 +1216,70 @@ static void
usage(const char *prog)
{
print_version(prog);
- HDprintf("usage: %s [OPTIONS]\n", prog);
- HDprintf(" OPTIONS\n");
- HDprintf(" -h Print an usage message and exit\n");
- HDprintf(" -A AL Which APIs to test\n");
- HDprintf(" [default: all of them]\n");
- HDprintf(" -c SL Selects chunked storage and defines chunks dimensions\n");
- HDprintf(" and sizes\n");
- HDprintf(" [default: Off]\n");
- HDprintf(" -e SL Dimensions and sizes of dataset\n");
- HDprintf(" [default: 100,200]\n");
- HDprintf(" -i N Number of iterations to perform\n");
- HDprintf(" [default: 1]\n");
- HDprintf(" -r NL Dimension access order (see below for description)\n");
- HDprintf(" [default: 1,2]\n");
- HDprintf(" -t Selects extendable dimensions for HDF5 dataset\n");
- HDprintf(" [default: Off]\n");
- HDprintf(" -v VFD Selects file driver for HDF5 access\n");
- HDprintf(" [default: sec2]\n");
- HDprintf(" -w Perform write tests, not the read tests\n");
- HDprintf(" [default: Off]\n");
- HDprintf(" -x SL Dimensions and sizes of the transfer buffer\n");
- HDprintf(" [default: 10,20]\n");
- HDprintf("\n");
- HDprintf(" N - is an integer > 0.\n");
- HDprintf("\n");
- HDprintf(" S - is a size specifier, an integer > 0 followed by a size indicator:\n");
- HDprintf(" K - Kilobyte (%d)\n", ONE_KB);
- HDprintf(" M - Megabyte (%d)\n", ONE_MB);
- HDprintf(" G - Gigabyte (%d)\n", ONE_GB);
- HDprintf("\n");
- HDprintf(" Example: '37M' is 37 megabytes or %d bytes\n", 37 * ONE_MB);
- HDprintf("\n");
- HDprintf(" AL - is an API list. Valid values are:\n");
- HDprintf(" hdf5 - HDF5\n");
- HDprintf(" posix - POSIX\n");
- HDprintf("\n");
- HDprintf(" Example: -A posix,hdf5\n");
- HDprintf("\n");
- HDprintf(" NL - is list of integers (N) separated by commas.\n");
- HDprintf("\n");
- HDprintf(" Example: 1,2,3\n");
- HDprintf("\n");
- HDprintf(" SL - is list of size specifiers (S) separated by commas.\n");
- HDprintf("\n");
- HDprintf(" Example: 2K,2K,3K\n");
- HDprintf("\n");
- HDprintf(" The example defines an object (dataset, transfer buffer) with three\n");
- HDprintf(" dimensions. Be aware that as the number of dimensions increases, the\n");
- HDprintf(" the total size of the object increases exponentially.\n");
- HDprintf("\n");
- HDprintf(" VFD - is an HDF5 file driver specifier. Valid values are:\n");
- HDprintf(" sec2, stdio, core, split, multi, family, direct\n");
- HDprintf("\n");
- HDprintf(" Dimension access order:\n");
- HDprintf(" Data access starts at the cardinal origin of the dataset using the\n");
- HDprintf(" transfer buffer. The next access occurs on a dataset region next to\n");
- HDprintf(" the previous one. For a multidimensional dataset, there are several\n");
- HDprintf(" directions as to where to proceed. This can be specified in the dimension\n");
- HDprintf(" access order. For example, -r 1,2 states that the tool should traverse\n");
- HDprintf(" dimension 1 first, and then dimension 2.\n");
- HDprintf("\n");
- HDprintf(" Environment variables:\n");
- HDprintf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
- HDprintf(" HDF5_PREFIX Data file prefix\n");
- HDprintf("\n");
- HDfflush(stdout);
+ printf("usage: %s [OPTIONS]\n", prog);
+ printf(" OPTIONS\n");
+ printf(" -h Print an usage message and exit\n");
+ printf(" -A AL Which APIs to test\n");
+ printf(" [default: all of them]\n");
+ printf(" -c SL Selects chunked storage and defines chunks dimensions\n");
+ printf(" and sizes\n");
+ printf(" [default: Off]\n");
+ printf(" -e SL Dimensions and sizes of dataset\n");
+ printf(" [default: 100,200]\n");
+ printf(" -i N Number of iterations to perform\n");
+ printf(" [default: 1]\n");
+ printf(" -r NL Dimension access order (see below for description)\n");
+ printf(" [default: 1,2]\n");
+ printf(" -t Selects extendable dimensions for HDF5 dataset\n");
+ printf(" [default: Off]\n");
+ printf(" -v VFD Selects file driver for HDF5 access\n");
+ printf(" [default: sec2]\n");
+ printf(" -w Perform write tests, not the read tests\n");
+ printf(" [default: Off]\n");
+ printf(" -x SL Dimensions and sizes of the transfer buffer\n");
+ printf(" [default: 10,20]\n");
+ printf("\n");
+ printf(" N - is an integer > 0.\n");
+ printf("\n");
+ printf(" S - is a size specifier, an integer > 0 followed by a size indicator:\n");
+ printf(" K - Kilobyte (%d)\n", ONE_KB);
+ printf(" M - Megabyte (%d)\n", ONE_MB);
+ printf(" G - Gigabyte (%d)\n", ONE_GB);
+ printf("\n");
+ printf(" Example: '37M' is 37 megabytes or %d bytes\n", 37 * ONE_MB);
+ printf("\n");
+ printf(" AL - is an API list. Valid values are:\n");
+ printf(" hdf5 - HDF5\n");
+ printf(" posix - POSIX\n");
+ printf("\n");
+ printf(" Example: -A posix,hdf5\n");
+ printf("\n");
+ printf(" NL - is list of integers (N) separated by commas.\n");
+ printf("\n");
+ printf(" Example: 1,2,3\n");
+ printf("\n");
+ printf(" SL - is list of size specifiers (S) separated by commas.\n");
+ printf("\n");
+ printf(" Example: 2K,2K,3K\n");
+ printf("\n");
+ printf(" The example defines an object (dataset, transfer buffer) with three\n");
+ printf(" dimensions. Be aware that as the number of dimensions increases, the\n");
+ printf(" the total size of the object increases exponentially.\n");
+ printf("\n");
+ printf(" VFD - is an HDF5 file driver specifier. Valid values are:\n");
+ printf(" sec2, stdio, core, split, multi, family, direct\n");
+ printf("\n");
+ printf(" Dimension access order:\n");
+ printf(" Data access starts at the cardinal origin of the dataset using the\n");
+ printf(" transfer buffer. The next access occurs on a dataset region next to\n");
+ printf(" the previous one. For a multidimensional dataset, there are several\n");
+ printf(" directions as to where to proceed. This can be specified in the dimension\n");
+ printf(" access order. For example, -r 1,2 states that the tool should traverse\n");
+ printf(" dimension 1 first, and then dimension 2.\n");
+ printf("\n");
+ printf(" Environment variables:\n");
+ printf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
+ printf(" HDF5_PREFIX Data file prefix\n");
+ printf("\n");
+ fflush(stdout);
} /* end usage() */
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index c58943b..0ced980 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -71,7 +71,7 @@ h5repack_init(pack_opt_t *options, int verbose, hbool_t latest)
{
int k, n;
- HDmemset(options, 0, sizeof(pack_opt_t));
+ memset(options, 0, sizeof(pack_opt_t));
options->min_comp = 0;
options->verbose = verbose;
options->latest = latest;
@@ -132,7 +132,7 @@ h5repack_addfilter(const char *str, pack_opt_t *options)
n = options->n_filter_g++; /* increase # of global filters */
if (options->n_filter_g > H5_REPACK_MAX_NFILTERS) {
error_msg("maximum number of filters exceeded for <%s>\n", str);
- HDfree(obj_list);
+ free(obj_list);
return -1;
}
@@ -141,7 +141,7 @@ h5repack_addfilter(const char *str, pack_opt_t *options)
else
options_add_filter(obj_list, n_objs, filter, options->op_tbl);
- HDfree(obj_list);
+ free(obj_list);
return 0;
} /* end h5repack_addfilter() */
@@ -195,7 +195,7 @@ h5repack_addlayout(const char *str, pack_opt_t *options)
if (options->all_layout == 0)
ret_value = options_add_layout(obj_list, n_objs, &pack, options->op_tbl);
- HDfree(obj_list);
+ free(obj_list);
ret_value = 0;
} /* end if obj_list exists */
@@ -253,13 +253,13 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
for (i = 0; i < travt->nobjs; i++) {
if (travt->objs[i].type == H5TRAV_TYPE_NAMED_DATATYPE) {
/* Push onto the stack */
- if (NULL == (dt = (named_dt_t *)HDmalloc(sizeof(named_dt_t))))
+ if (NULL == (dt = (named_dt_t *)malloc(sizeof(named_dt_t))))
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "buffer allocation failed failed");
dt->next = *named_dt_head_p;
*named_dt_head_p = dt;
/* Update the token/address and id */
- HDmemcpy(&dt->obj_token, &travt->objs[i].obj_token, sizeof(H5O_token_t));
+ memcpy(&dt->obj_token, &travt->objs[i].obj_token, sizeof(H5O_token_t));
dt->id_out = H5I_INVALID_HID;
/* Check if this type is the one requested */
@@ -276,13 +276,13 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
*/
if (!dt_ret) {
/* Push the new datatype onto the stack */
- if (NULL == (dt_ret = (named_dt_t *)HDmalloc(sizeof(named_dt_t))))
+ if (NULL == (dt_ret = (named_dt_t *)malloc(sizeof(named_dt_t))))
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "buffer allocation failed failed");
dt_ret->next = *named_dt_head_p;
*named_dt_head_p = dt_ret;
/* Update the token/address and id */
- HDmemcpy(&dt_ret->obj_token, &oinfo.token, sizeof(H5O_token_t));
+ memcpy(&dt_ret->obj_token, &oinfo.token, sizeof(H5O_token_t));
dt_ret->id_out = H5I_INVALID_HID;
} /* end if requested datatype not found */
@@ -330,7 +330,7 @@ named_datatype_free(named_dt_t **named_dt_head_p, int ignore_err)
if (H5Tclose(dt->id_out) < 0 && !ignore_err)
H5TOOLS_GOTO_ERROR((-1), "H5Tclose failed");
dt = dt->next;
- HDfree(*named_dt_head_p);
+ free(*named_dt_head_p);
*named_dt_head_p = dt;
}
@@ -481,9 +481,9 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
*-----------------------------------------------------------------
*/
- buf = (void *)HDmalloc((size_t)(nelmts * msize));
+ buf = (void *)malloc((size_t)(nelmts * msize));
if (buf == NULL) {
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (options->verbose == 2) {
H5_timer_init(&timer);
@@ -526,15 +526,15 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
if (TRUE == h5tools_detect_vlen(wtype_id))
H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
- HDfree(buf);
+ free(buf);
buf = NULL;
} /*H5T_REFERENCE*/
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_ATTR_TIME, "attr", read_time, write_time, name);
+ printf(FORMAT_OBJ_ATTR_TIME, "attr", read_time, write_time, name);
else
- HDprintf(FORMAT_OBJ_ATTR, "attr", name);
+ printf(FORMAT_OBJ_ATTR, "attr", name);
}
/*---------------------------------------------------------------------
@@ -566,7 +566,7 @@ done:
H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
/* Free buf */
- HDfree(buf);
+ free(buf);
}
H5Aclose(attr_out);
@@ -602,7 +602,7 @@ check_options(pack_opt_t *options)
*/
if (options->verbose > 0 && have_request(options)) {
if (options->all_layout == 1) {
- HDprintf("All objects to modify layout are...\n");
+ printf("All objects to modify layout are...\n");
switch (options->layout_g) {
case H5D_COMPACT:
strcpy(slayout, "compact");
@@ -624,17 +624,17 @@ check_options(pack_opt_t *options)
strcpy(slayout, "invalid layout\n");
H5TOOLS_GOTO_DONE((-1));
}
- HDprintf(" Apply %s layout to all", slayout);
+ printf(" Apply %s layout to all", slayout);
if (H5D_CHUNKED == options->layout_g) {
- HDprintf("with dimension [ ");
+ printf("with dimension [ ");
for (j = 0; j < options->chunk_g.rank; j++)
- HDprintf("%d ", (int)options->chunk_g.chunk_lengths[j]);
- HDprintf("]");
+ printf("%d ", (int)options->chunk_g.chunk_lengths[j]);
+ printf("]");
}
- HDprintf("\n");
+ printf("\n");
}
else
- HDprintf("No all objects to modify layout\n");
+ printf("No all objects to modify layout\n");
} /* end if verbose */
for (i = 0; i < options->op_tbl->nelems; i++) {
@@ -642,16 +642,16 @@ check_options(pack_opt_t *options)
if (options->op_tbl->objs[i].chunk.rank > 0) {
if (options->verbose > 0) {
- HDprintf(" <%s> with chunk size ", name);
+ printf(" <%s> with chunk size ", name);
for (k = 0; k < options->op_tbl->objs[i].chunk.rank; k++)
- HDprintf("%d ", (int)options->op_tbl->objs[i].chunk.chunk_lengths[k]);
- HDprintf("\n");
+ printf("%d ", (int)options->op_tbl->objs[i].chunk.chunk_lengths[k]);
+ printf("\n");
}
has_ck = 1;
}
else if (options->op_tbl->objs[i].chunk.rank == -2) { /* TODO: replace 'magic number' */
if (options->verbose > 0)
- HDprintf(" <%s> %s\n", name, "NONE (contiguous)");
+ printf(" <%s> %s\n", name, "NONE (contiguous)");
has_ck = 1;
}
} /* end for each object in options */
@@ -666,34 +666,34 @@ check_options(pack_opt_t *options)
if (options->verbose > 0 && have_request(options)) {
if (options->all_filter == 1) {
- HDprintf("All objects to apply filter are...\n");
+ printf("All objects to apply filter are...\n");
for (k = 0; k < options->n_filter_g; k++) {
H5Z_filter_t filtn = options->filter_g[k].filtn;
if (filtn < 0) {
- HDprintf(" Unknown\n");
+ printf(" Unknown\n");
continue;
}
switch (filtn) {
case H5Z_FILTER_NONE:
- HDprintf(" Uncompress all\n");
+ printf(" Uncompress all\n");
break;
case H5Z_FILTER_SHUFFLE:
case H5Z_FILTER_FLETCHER32:
- HDprintf(" All with %s\n", get_sfilter(filtn));
+ printf(" All with %s\n", get_sfilter(filtn));
break;
case H5Z_FILTER_SZIP:
case H5Z_FILTER_DEFLATE:
- HDprintf(" All with %s, parameter %d\n", get_sfilter(filtn),
- options->filter_g[k].cd_values[0]);
+ printf(" All with %s, parameter %d\n", get_sfilter(filtn),
+ options->filter_g[k].cd_values[0]);
break;
default:
- HDprintf(" User Defined %d\n", filtn);
+ printf(" User Defined %d\n", filtn);
break;
} /* end switch */
} /* end for each filter */
} /* end if options->all_filter == 1 (TODO: meaning) */
else
- HDprintf("No all objects to apply filter\n");
+ printf("No all objects to apply filter\n");
} /* end if verbose */
for (i = 0; i < options->op_tbl->nelems; i++) {
@@ -704,11 +704,11 @@ check_options(pack_opt_t *options)
if (options->verbose > 0) {
if (pack.filter[j].filtn >= 0) {
if (pack.filter[j].filtn > H5Z_FILTER_SCALEOFFSET) {
- HDprintf(" <%s> with %s filter %d\n", name, get_sfilter(pack.filter[j].filtn),
- pack.filter[j].filtn);
+ printf(" <%s> with %s filter %d\n", name, get_sfilter(pack.filter[j].filtn),
+ pack.filter[j].filtn);
}
else {
- HDprintf(" <%s> with %s filter\n", name, get_sfilter(pack.filter[j].filtn));
+ printf(" <%s> with %s filter\n", name, get_sfilter(pack.filter[j].filtn));
}
}
}
@@ -740,8 +740,8 @@ check_options(pack_opt_t *options)
*/
if (options->ublock_filename != NULL && options->ublock_size == 0) {
if (options->verbose > 0) {
- HDprintf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n",
- options->ublock_filename);
+ printf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n",
+ options->ublock_filename);
options->ublock_size = 1024;
}
}
@@ -813,21 +813,21 @@ check_objects(const char *fname, pack_opt_t *options)
*/
if (options->verbose > 0)
- HDprintf("Opening file. Searching %zu objects to modify ...\n", travt->nobjs);
+ printf("Opening file. Searching %zu objects to modify ...\n", travt->nobjs);
for (i = 0; i < options->op_tbl->nelems; i++) {
pack_info_t obj = options->op_tbl->objs[i];
char *name = obj.path;
if (options->verbose > 0)
- HDprintf(" <%s>", name);
+ printf(" <%s>", name);
/* the input object names are present in the file and are valid */
if (h5trav_getindext(name, travt) < 0)
H5TOOLS_GOTO_ERROR((-1), "%s Could not find <%s> in file <%s>. Exiting...\n",
(options->verbose > 0 ? "\n" : ""), name, fname);
if (options->verbose > 0)
- HDprintf("...Found\n");
+ printf("...Found\n");
for (ifil = 0; ifil < obj.nfilters; ifil++) {
if (obj.filter[ifil].filtn < 0)
@@ -854,7 +854,7 @@ check_objects(const char *fname, pack_opt_t *options)
H5TOOLS_GOTO_ERROR((-1), "H5Dget_space failed");
if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_ndims failed");
- HDmemset(dims, 0, sizeof dims);
+ memset(dims, 0, sizeof dims);
if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_dims failed");
for (j = 0; j < rank; j++)
@@ -866,7 +866,7 @@ check_objects(const char *fname, pack_opt_t *options)
}
if (csize < ppb) {
- HDprintf(" <warning: SZIP settings, chunk size is smaller than pixels per block>\n");
+ printf(" <warning: SZIP settings, chunk size is smaller than pixels per block>\n");
H5TOOLS_GOTO_DONE(0);
}
} /* end case SZIP */
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index 42c393b..172ba26 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -299,7 +299,7 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options)
*-------------------------------------------------------------------------
*/
if (options->verbose > 0)
- HDprintf("Making new file ...\n");
+ printf("Making new file ...\n");
if ((fidout = H5Fcreate(fnameout, H5F_ACC_TRUNC, fcpl, options->fout_fapl)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Fcreate could not create file <%s>:", fnameout);
@@ -658,7 +658,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
int ret_value = 0;
/* init linkinfo struct */
- HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t));
+ memset(&linkinfo, 0, sizeof(h5tool_link_info_t));
/*-------------------------------------------------------------------------
* copy the supplied object list
@@ -667,14 +667,14 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (options->verbose > 0) {
if (options->verbose == 2) {
- HDprintf("-----------------------------------------------------------------\n");
- HDprintf(" Type Filter (Compression) Timing read/write Name\n");
- HDprintf("-----------------------------------------------------------------\n");
+ printf("-----------------------------------------------------------------\n");
+ printf(" Type Filter (Compression) Timing read/write Name\n");
+ printf("-----------------------------------------------------------------\n");
}
else {
- HDprintf("-----------------------------------------\n");
- HDprintf(" Type Filter (Compression) Name\n");
- HDprintf("-----------------------------------------\n");
+ printf("-----------------------------------------\n");
+ printf(" Type Filter (Compression) Name\n");
+ printf("-----------------------------------------\n");
}
}
@@ -695,9 +695,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
case H5TRAV_TYPE_GROUP:
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_NOTIME, "group", travt->objs[i].name);
+ printf(FORMAT_OBJ_NOTIME, "group", travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "group", travt->objs[i].name);
+ printf(FORMAT_OBJ, "group", travt->objs[i].name);
}
/* open input group */
@@ -877,7 +877,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Dget_create_plist failed");
if ((rank = H5Sget_simple_extent_ndims(f_space_id)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_ndims failed");
- HDmemset(dims, 0, sizeof dims);
+ memset(dims, 0, sizeof dims);
if (H5Sget_simple_extent_dims(f_space_id, dims, NULL) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_dims failed");
if (H5Dget_space_status(dset_in, &space_status) < 0)
@@ -991,9 +991,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (dset_out == H5I_INVALID_HID) {
H5TOOLS_INFO("H5Dcreate2 failed");
if (options->verbose > 0)
- HDprintf(" warning: could not create dataset <%s>. Applying original "
- "settings\n",
- travt->objs[i].name);
+ printf(" warning: could not create dataset <%s>. Applying original "
+ "settings\n",
+ travt->objs[i].name);
if ((dset_out =
H5Dcreate2(fidout, travt->objs[i].name, wtype_id, f_space_id,
@@ -1012,7 +1012,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* have to read the whole dataset if there is only one element in the
* dataset */
if (need < H5TOOLS_MALLOCSIZE)
- buf = HDmalloc(need);
+ buf = malloc(need);
/* Set up collective write if using filters in parallel */
{
@@ -1061,7 +1061,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (buf != NULL) { /* TODO: is buf potentially released by
H5Dvlen_reclaim()? */
- HDfree(buf);
+ free(buf);
buf = NULL;
}
}
@@ -1108,7 +1108,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
&hslab_nbytes) < 0)
H5TOOLS_GOTO_ERROR((-1), "get_hyperslab failed");
- hslab_buf = HDmalloc((size_t)hslab_nbytes);
+ hslab_buf = malloc((size_t)hslab_nbytes);
if (hslab_buf == NULL)
H5TOOLS_GOTO_ERROR((-1), "can't allocate space for hyperslab");
@@ -1116,8 +1116,8 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
hslab_space = H5Screate_simple(1, &hslab_nelmts, NULL);
/* the hyperslab selection loop */
- HDmemset(hs_sel_offset, 0, sizeof hs_sel_offset);
- HDmemset(zero, 0, sizeof zero);
+ memset(hs_sel_offset, 0, sizeof hs_sel_offset);
+ memset(zero, 0, sizeof zero);
for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_select_nelmts) {
if (rank > 0) {
@@ -1189,7 +1189,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5Sclose(hslab_space);
if (hslab_buf != NULL) {
- HDfree(hslab_buf);
+ free(hslab_buf);
hslab_buf = NULL;
}
} /* end if reading/writing by hyperslab */
@@ -1221,13 +1221,13 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
* (in case there was a filter)
*/
if (has_filter && apply_s == 0)
- HDprintf(" <warning: filter not applied to %s. dataset smaller than "
- "%d bytes>\n",
- travt->objs[i].name, (int)options->min_comp);
+ printf(" <warning: filter not applied to %s. dataset smaller than "
+ "%d bytes>\n",
+ travt->objs[i].name, (int)options->min_comp);
if (has_filter && apply_f == 0)
- HDprintf(" <warning: could not apply the filter to %s>\n",
- travt->objs[i].name);
+ printf(" <warning: could not apply the filter to %s>\n",
+ travt->objs[i].name);
} /* end if verbose (print compression) */
/*-------------------------------------------------------------------------
@@ -1310,9 +1310,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_TIME, "dset", 0.0, write_time, travt->objs[i].name);
+ printf(FORMAT_OBJ_TIME, "dset", 0.0, write_time, travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name);
+ printf(FORMAT_OBJ, "dset", travt->objs[i].name);
}
} /* end whether we have request for filter/chunking */
@@ -1327,9 +1327,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
case H5TRAV_TYPE_NAMED_DATATYPE:
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_NOTIME, "type", travt->objs[i].name);
+ printf(FORMAT_OBJ_NOTIME, "type", travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "type", travt->objs[i].name);
+ printf(FORMAT_OBJ, "type", travt->objs[i].name);
}
if ((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
@@ -1371,9 +1371,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
case H5TRAV_TYPE_UDLINK:
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_NOTIME, "link", travt->objs[i].name);
+ printf(FORMAT_OBJ_NOTIME, "link", travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "link", travt->objs[i].name);
+ printf(FORMAT_OBJ, "link", travt->objs[i].name);
}
/* Check -X option. */
@@ -1381,7 +1381,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (H5tools_get_symlink_info(fidin, travt->objs[i].name, &linkinfo, 1) == 0) {
/* dangling link */
if (options->prune) {
- HDprintf("Pruned %s.\n", travt->objs[i].name);
+ printf("Pruned %s.\n", travt->objs[i].name);
}
else {
if (H5Lcopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name,
@@ -1421,12 +1421,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ free(linkinfo.trg_path);
linkinfo.trg_path = NULL;
} /* options->merge */
else {
if (options->prune) {
- HDprintf("Pruned %s.\n", travt->objs[i].name);
+ printf("Pruned %s.\n", travt->objs[i].name);
}
else {
if (H5Lcopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name, H5P_DEFAULT,
@@ -1460,7 +1460,7 @@ done:
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ free(linkinfo.trg_path);
H5E_BEGIN_TRY
{
@@ -1484,9 +1484,9 @@ done:
/* free */
if (buf != NULL)
- HDfree(buf);
+ free(buf);
if (hslab_buf != NULL)
- HDfree(hslab_buf);
+ free(hslab_buf);
return ret_value;
} /* end do_copy_objects() */
@@ -1589,9 +1589,9 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
if (!pr)
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_TIME, "dset", read_time, write_time, objname);
+ printf(FORMAT_OBJ_TIME, "dset", read_time, write_time, objname);
else
- HDprintf(FORMAT_OBJ, "dset", objname);
+ printf(FORMAT_OBJ, "dset", objname);
else {
char str[512], temp[512];
@@ -1600,9 +1600,9 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
HDsnprintf(temp, sizeof(temp), " (%.3f:1)", ratio);
HDstrcat(str, temp);
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_TIME, str, read_time, write_time, objname);
+ printf(FORMAT_OBJ_TIME, str, read_time, write_time, objname);
else
- HDprintf(FORMAT_OBJ, str, objname);
+ printf(FORMAT_OBJ, str, objname);
}
} /* end print_dataset_info() */
@@ -1654,13 +1654,13 @@ copy_user_block(const char *infile, const char *outfile, hsize_t size)
} while (-1 == nwritten && EINTR == errno);
if (-1 == nwritten) /* error */
H5TOOLS_GOTO_ERROR((-1), "HDwrite failed");
- HDassert(nwritten > 0);
- HDassert(nwritten <= nbytes);
+ assert(nwritten > 0);
+ assert(nwritten <= nbytes);
/* Update # of bytes left & offset in buffer */
nbytes -= nwritten;
wbuf += nwritten;
- HDassert(nbytes == 0 || wbuf < (rbuf + USERBLOCK_XFER_SIZE));
+ assert(nbytes == 0 || wbuf < (rbuf + USERBLOCK_XFER_SIZE));
} /* end while */
/* Update size of userblock left to transfer */
@@ -1728,9 +1728,9 @@ print_user_block(const char *filename, hid_t fid)
for (i = 0; i < nread; i++) {
- HDprintf("%c ", rbuf[i]);
+ printf("%c ", rbuf[i]);
}
- HDprintf("\n");
+ printf("\n");
if (nread < 0) {
H5TOOLS_GOTO_ERROR((-1), "nread < 0");
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 5ecb423..0621c7a 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -370,7 +370,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -391,7 +391,7 @@ read_info(const char *filename, pack_opt_t *options)
int i;
int ret_value = EXIT_SUCCESS;
- if (NULL == (fp = HDfopen(filename, "r"))) {
+ if (NULL == (fp = fopen(filename, "r"))) {
error_msg("cannot open options file %s\n", filename);
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
@@ -534,10 +534,10 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
int ret_value = 0;
/* Initialize fapl info structs */
- HDmemset(&in_vol_info, 0, sizeof(h5tools_vol_info_t));
- HDmemset(&out_vol_info, 0, sizeof(h5tools_vol_info_t));
- HDmemset(&in_vfd_info, 0, sizeof(h5tools_vfd_info_t));
- HDmemset(&out_vfd_info, 0, sizeof(h5tools_vfd_info_t));
+ memset(&in_vol_info, 0, sizeof(h5tools_vol_info_t));
+ memset(&out_vol_info, 0, sizeof(h5tools_vol_info_t));
+ memset(&in_vfd_info, 0, sizeof(h5tools_vfd_info_t));
+ memset(&out_vfd_info, 0, sizeof(h5tools_vfd_info_t));
/* parse command line options */
while (EOF != (opt = H5_get_option(argc, argv, s_opts, l_opts))) {
@@ -569,7 +569,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case 'v':
if (H5_optarg != NULL) {
- if (2 == HDatoi(H5_optarg))
+ if (2 == atoi(H5_optarg))
options->verbose = 2;
}
else
@@ -624,7 +624,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'j':
- bound = HDatoi(H5_optarg);
+ bound = atoi(H5_optarg);
if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing low bound\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -635,7 +635,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'k':
- bound = HDatoi(H5_optarg);
+ bound = atoi(H5_optarg);
if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing high bound\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -654,13 +654,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'c':
- options->grp_compact = HDatoi(H5_optarg);
+ options->grp_compact = atoi(H5_optarg);
if (options->grp_compact > 0)
options->latest = TRUE; /* must use latest format */
break;
case 'd':
- options->grp_indexed = HDatoi(H5_optarg);
+ options->grp_indexed = atoi(H5_optarg);
if (options->grp_indexed > 0)
options->latest = TRUE; /* must use latest format */
break;
@@ -671,7 +671,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
char *msgPtr = HDstrchr(H5_optarg, ':');
options->latest = TRUE; /* must use latest format */
if (msgPtr == NULL) {
- ssize = HDatoi(H5_optarg);
+ ssize = atoi(H5_optarg);
for (idx = 0; idx < 5; idx++)
options->msg_size[idx] = ssize;
}
@@ -680,7 +680,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
HDstrcpy(msgType, msgPtr + 1);
msgPtr[0] = '\0';
- ssize = HDatoi(H5_optarg);
+ ssize = atoi(H5_optarg);
if (!HDstrncmp(msgType, "dspace", 6))
options->msg_size[0] = ssize;
else if (!HDstrncmp(msgType, "dtype", 5))
@@ -744,7 +744,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
} break;
case 'P':
- options->fs_persist = HDatoi(H5_optarg);
+ options->fs_persist = atoi(H5_optarg);
if (options->fs_persist == 0)
/* To distinguish the "specified" zero value */
options->fs_persist = -1;
@@ -784,14 +784,14 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case 'E':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
case '1':
in_vol_info.type = VOL_BY_VALUE;
- in_vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg);
+ in_vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
custom_in_vol = TRUE;
break;
@@ -807,7 +807,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '4':
out_vol_info.type = VOL_BY_VALUE;
- out_vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg);
+ out_vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
custom_out_vol = TRUE;
break;
@@ -823,7 +823,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '7':
in_vfd_info.type = VFD_BY_VALUE;
- in_vfd_info.u.value = (H5FD_class_value_t)HDatoi(H5_optarg);
+ in_vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
custom_in_vfd = TRUE;
break;
@@ -839,7 +839,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '0':
out_vfd_info.type = VFD_BY_VALUE;
- out_vfd_info.u.value = (H5FD_class_value_t)HDatoi(H5_optarg);
+ out_vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
custom_out_vfd = TRUE;
break;
@@ -891,7 +891,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
errno = 0;
onion_fa_in_g.revision_num = HDstrtoull(in_vfd_info.info, NULL, 10);
if (errno == ERANGE) {
- HDprintf("Invalid onion revision specified for the input file\n");
+ printf("Invalid onion revision specified for the input file\n");
usage(h5tools_getprogname());
exit(EXIT_FAILURE);
}
@@ -965,7 +965,7 @@ main(int argc, char **argv)
pack_opt_t options; /*the global options */
int parse_ret;
- HDmemset(&options, 0, sizeof(pack_opt_t));
+ memset(&options, 0, sizeof(pack_opt_t));
/* Initialize h5tools lib */
h5tools_init();
@@ -975,14 +975,14 @@ main(int argc, char **argv)
/* update hyperslab buffer size from H5TOOLS_BUFSIZE env if exist */
if (h5tools_getenv_update_hyperslab_bufsize() < 0) {
- HDprintf("Error occurred while retrieving H5TOOLS_BUFSIZE value\n");
+ printf("Error occurred while retrieving H5TOOLS_BUFSIZE value\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
/* initialize options */
if (h5repack_init(&options, 0, FALSE) < 0) {
- HDprintf("Error occurred while initializing repack options\n");
+ printf("Error occurred while initializing repack options\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
@@ -992,7 +992,7 @@ main(int argc, char **argv)
parse_ret = parse_command_line(argc, (const char *const *)argv, &options);
if (parse_ret < 0) {
- HDprintf("Error occurred while parsing command-line options\n");
+ printf("Error occurred while parsing command-line options\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
@@ -1007,7 +1007,7 @@ main(int argc, char **argv)
/* pack it */
if (h5repack(infile, outfile, &options) < 0) {
- HDprintf("Error occurred while repacking\n");
+ printf("Error occurred while repacking\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c
index 4e6e0f4..2018527 100644
--- a/tools/src/h5repack/h5repack_opttable.c
+++ b/tools/src/h5repack/h5repack_opttable.c
@@ -104,7 +104,7 @@ aux_inctable(pack_opttbl_t *table, unsigned n_objs)
int ret_value = 0;
table->size += n_objs;
- table->objs = (pack_info_t *)HDrealloc(table->objs, table->size * sizeof(pack_info_t));
+ table->objs = (pack_info_t *)realloc(table->objs, table->size * sizeof(pack_info_t));
if (table->objs == NULL) {
H5TOOLS_INFO("not enough memory for options table");
ret_value = -1;
@@ -132,14 +132,14 @@ options_table_init(pack_opttbl_t **tbl)
pack_opttbl_t *table;
int ret_value = 0;
- if (NULL == (table = (pack_opttbl_t *)HDmalloc(sizeof(pack_opttbl_t)))) {
+ if (NULL == (table = (pack_opttbl_t *)malloc(sizeof(pack_opttbl_t)))) {
H5TOOLS_GOTO_ERROR((-1), "not enough memory for options table");
}
table->size = 30;
table->nelems = 0;
- if (NULL == (table->objs = (pack_info_t *)HDmalloc(table->size * sizeof(pack_info_t)))) {
- HDfree(table);
+ if (NULL == (table->objs = (pack_info_t *)malloc(table->size * sizeof(pack_info_t)))) {
+ free(table);
H5TOOLS_GOTO_ERROR((-1), "not enough memory for options table");
}
@@ -163,8 +163,8 @@ done:
int
options_table_free(pack_opttbl_t *table)
{
- HDfree(table->objs);
- HDfree(table);
+ free(table->objs);
+ free(table);
return 0;
}
@@ -200,7 +200,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
/* already chunk info inserted for this one; exit */
if (table->objs[i].chunk.rank > 0) {
H5TOOLS_INFO("chunk information already inserted for <%s>\n", obj_list[j].obj);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* insert the layout info */
else {
diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c
index 9ffee0a..9ee4d07 100644
--- a/tools/src/h5repack/h5repack_parse.c
+++ b/tools/src/h5repack/h5repack_parse.c
@@ -52,7 +52,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
unsigned pixels_per_block;
/* initialize compression info */
- HDmemset(filt, 0, sizeof(filter_info_t));
+ memset(filt, 0, sizeof(filter_info_t));
*is_glb = 0;
/* check for the end of object list and number of objects */
@@ -77,7 +77,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
else
*n_objs = n;
- obj_list = (obj_list_t *)HDmalloc(n * sizeof(obj_list_t));
+ obj_list = (obj_list_t *)malloc(n * sizeof(obj_list_t));
if (obj_list == NULL) {
error_msg("could not allocate object list\n");
return NULL;
@@ -95,7 +95,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
sobj[k + 1] = '\0';
HDstrcpy(obj_list[n].obj, sobj);
- HDmemset(sobj, 0, sizeof(sobj));
+ memset(sobj, 0, sizeof(sobj));
n++;
k = -1;
}
@@ -103,9 +103,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
/* nothing after : */
if (end_obj + 1 == (int)len) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("input Error: Invalid compression type in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* get filter additional parameters */
@@ -134,9 +134,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
c = str[u];
if (!HDisdigit(c) && l == -1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("compression parameter not digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (l == -1)
stype[m] = c;
@@ -152,7 +152,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_values[j++] = H5_SZIP_EC_OPTION_MASK;
else {
error_msg("szip mask must be 'NN' or 'EC' \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
}
@@ -184,9 +184,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
c = str[u];
if (!HDisdigit(c) && l == -1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("compression parameter is not a digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (l == -1)
stype[m] = c;
@@ -202,7 +202,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_values[j++] = H5Z_SO_FLOAT_DSCALE;
else {
error_msg("scale type must be 'IN' or 'DS' \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
}
@@ -224,7 +224,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (str[u] == ',') {
stype[q] = '\0'; /* end digit */
if (l == -1) {
- filt->filtn = HDatoi(stype);
+ filt->filtn = atoi(stype);
l = 0;
}
else if (f == -1) {
@@ -244,15 +244,15 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
c = str[u];
if (!HDisdigit(c) && l == -1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("filter number parameter is not a digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
else if (!HDisdigit(c) && f == -1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("filter flag parameter is not a digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
stype[q] = c;
} /* for u */
@@ -269,9 +269,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
c = str[u];
if (!HDisdigit(c)) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("compression parameter is not a digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
stype[m] = c;
} /* u */
@@ -312,9 +312,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 1;
if (no_param) { /*no more parameters, GZIP must have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("missing compression parameter in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
@@ -327,9 +327,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 2;
if (no_param) { /*no more parameters, SZIP must have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("missing compression parameter in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
@@ -342,9 +342,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 0;
if (m > 0) { /*shuffle does not have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("extra parameter in SHUF <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -356,9 +356,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 0;
if (m > 0) { /*shuffle does not have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("extra parameter in FLET <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -370,9 +370,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 0;
if (m > 0) { /*nbit does not have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("extra parameter in NBIT <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -384,9 +384,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 2;
if (no_param) { /*no more parameters, SOFF must have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("missing compression parameter in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -397,16 +397,16 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
/* parameters does not match count */
if (filt->cd_nelmts != j) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("incorrect number of compression parameters in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("invalid filter type in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
}
@@ -425,9 +425,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
case H5Z_FILTER_DEFLATE:
if (filt->cd_values[0] > 9) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("invalid compression parameter in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
/*-------------------------------------------------------------------------
@@ -438,21 +438,21 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
pixels_per_block = filt->cd_values[0];
if ((pixels_per_block % 2) == 1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("pixels_per_block is not even in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (pixels_per_block > H5_SZIP_MAX_PIXELS_PER_BLOCK) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("pixels_per_block is too large in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if ((HDstrcmp(smask, "NN") != 0) && (HDstrcmp(smask, "EC") != 0)) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("szip mask must be 'NN' or 'EC' \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
default:
@@ -496,9 +496,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
char sdim[10];
char slayout[10];
- HDmemset(sdim, '\0', sizeof(sdim));
- HDmemset(sobj, '\0', sizeof(sobj));
- HDmemset(slayout, '\0', sizeof(slayout));
+ memset(sdim, '\0', sizeof(sdim));
+ memset(sobj, '\0', sizeof(sobj));
+ memset(slayout, '\0', sizeof(slayout));
/* check for the end of object list and number of objects */
for (i = 0, n = 0; i < len; i++) {
@@ -514,7 +514,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
}
n++;
- obj_list = (obj_list_t *)HDmalloc(n * sizeof(obj_list_t));
+ obj_list = (obj_list_t *)malloc(n * sizeof(obj_list_t));
if (obj_list == NULL) {
error_msg("could not allocate object list\n");
return NULL;
@@ -532,7 +532,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
else
sobj[k + 1] = '\0';
HDstrcpy(obj_list[n].obj, sobj);
- HDmemset(sobj, 0, sizeof(sobj));
+ memset(sobj, 0, sizeof(sobj));
n++;
k = -1;
}
@@ -541,9 +541,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
/* nothing after : */
if (end_obj + 1 == (int)len) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, no characters after : in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* get layout info */
@@ -558,7 +558,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
pack->layout = H5D_CHUNKED;
else {
error_msg("in parse layout, not a valid layout in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else {
@@ -575,9 +575,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
k = 0;
if (j > len) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, <%s> Chunk dimensions missing\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
for (i = j, c_index = 0; i < len; i++) {
@@ -587,9 +587,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
if (!HDisdigit(c) && c != 'x' && c != 'N' && c != 'O' && c != 'N' && c != 'E') {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, <%s> Not a valid character in <%s>\n", sdim, str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (c == 'x' || i == len - 1) {
@@ -599,9 +599,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
pack->chunk.chunk_lengths[c_index] = HDstrtoull(sdim, NULL, 0);
if (pack->chunk.chunk_lengths[c_index] == 0) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n", sdim, str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
c_index++;
}
@@ -615,9 +615,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
pack->chunk.chunk_lengths[c_index] = HDstrtoull(sdim, NULL, 0);
if (pack->chunk.chunk_lengths[c_index] == 0) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n", sdim, str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
pack->chunk.rank = c_index + 1;
}
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 3c0be30..171b335 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -152,18 +152,18 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
*-------------------------------------------------------------------------
*/
if (nelmts) {
- buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize));
+ buf = (hobj_ref_t *)malloc((unsigned)(nelmts * msize));
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Dread(dset_in, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Dread failed");
- refbuf = (hobj_ref_t *)HDcalloc((unsigned)nelmts, msize);
+ refbuf = (hobj_ref_t *)calloc((unsigned)nelmts, msize);
if (refbuf == NULL) {
- HDprintf("cannot allocate memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDcalloc failed");
+ printf("cannot allocate memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "calloc failed");
} /* end if */
for (u = 0; u < nelmts; u++) {
H5E_BEGIN_TRY
@@ -183,11 +183,11 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Rcreate failed");
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_NOTIME, "dset", travt->objs[i].name);
+ printf(FORMAT_OBJ_NOTIME, "dset", travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name);
- HDprintf("object <%s> object reference created to <%s>\n",
- travt->objs[i].name, refname);
+ printf(FORMAT_OBJ, "dset", travt->objs[i].name);
+ printf("object <%s> object reference created to <%s>\n",
+ travt->objs[i].name, refname);
}
} /*refname*/
if (H5Oclose(refobj_id) < 0)
@@ -207,9 +207,9 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Dwrite failed");
if (buf)
- HDfree(buf);
+ free(buf);
if (refbuf)
- HDfree(refbuf);
+ free(refbuf);
/*------------------------------------------------------
* copy attrs
@@ -234,10 +234,10 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
*-------------------------------------------------------------------------
*/
if (nelmts) {
- buf = (hdset_reg_ref_t *)HDmalloc((unsigned)(nelmts * msize));
+ buf = (hdset_reg_ref_t *)malloc((unsigned)(nelmts * msize));
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Dread(dset_in, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Dread failed");
@@ -246,11 +246,11 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
* create output
*-------------------------------------------------------------------------
*/
- refbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t),
- (size_t)nelmts); /*init to zero */
+ refbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t),
+ (size_t)nelmts); /*init to zero */
if (refbuf == NULL) {
- HDprintf("cannot allocate memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDcalloc failed");
+ printf("cannot allocate memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "calloc failed");
} /* end if */
for (u = 0; u < nelmts; u++) {
@@ -279,9 +279,9 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (H5Sclose(region_id) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sclose failed");
if (options->verbose > 0) {
- HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name);
- HDprintf("object <%s> region reference created to <%s>\n",
- travt->objs[i].name, refname);
+ printf(FORMAT_OBJ, "dset", travt->objs[i].name);
+ printf("object <%s> region reference created to <%s>\n",
+ travt->objs[i].name, refname);
}
} /*refname*/
if (H5Oclose(refobj_id) < 0)
@@ -301,9 +301,9 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Dwrite failed");
if (buf)
- HDfree(buf);
+ free(buf);
if (refbuf)
- HDfree(refbuf);
+ free(refbuf);
/*-----------------------------------------------------
* copy attrs
@@ -506,8 +506,8 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (nmembers < 1)
H5TOOLS_GOTO_ERROR((-1), "H5Tget_nmembers failed");
- ref_comp_index = (unsigned *)HDmalloc((size_t)nmembers * sizeof(unsigned));
- ref_comp_size = (size_t *)HDmalloc((size_t)nmembers * sizeof(ref_comp_size));
+ ref_comp_index = (unsigned *)malloc((size_t)nmembers * sizeof(unsigned));
+ ref_comp_size = (size_t *)malloc((size_t)nmembers * sizeof(ref_comp_size));
ref_comp_field_n = 0;
for (i = 0; i < (unsigned)nmembers; i++) {
@@ -527,12 +527,12 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
* statement below. */
if (!ref_comp_field_n) {
if (ref_comp_index) {
- HDfree(ref_comp_index);
+ free(ref_comp_index);
ref_comp_index = NULL;
}
if (ref_comp_size) {
- HDfree(ref_comp_size);
+ free(ref_comp_size);
ref_comp_size = NULL;
}
}
@@ -598,18 +598,18 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (nelmts > 0) {
/* handle object references */
if ((is_ref || is_ref_array) && (H5R_OBJ_REF_BUF_SIZE == msize)) {
- buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize));
+ buf = (hobj_ref_t *)malloc((unsigned)(nelmts * msize));
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Aread(attr_id, mtype_id, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Aread failed");
- refbuf = (hobj_ref_t *)HDcalloc((unsigned)nelmts, msize);
+ refbuf = (hobj_ref_t *)calloc((unsigned)nelmts, msize);
if (refbuf == NULL) {
- HDprintf("cannot allocate memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDcalloc failed");
+ printf("cannot allocate memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "calloc failed");
} /* end if */
for (i = 0; i < (unsigned)nelmts; i++)
@@ -619,11 +619,11 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
} /* H5T_STD_REF_OBJ */
/* handle region references */
else if ((is_ref || is_ref_array) && (H5R_DSET_REG_REF_BUF_SIZE == msize)) {
- buf = (hdset_reg_ref_t *)HDmalloc((unsigned)(nelmts * msize));
+ buf = (hdset_reg_ref_t *)malloc((unsigned)(nelmts * msize));
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Aread(attr_id, mtype_id, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Aread failed");
@@ -632,11 +632,10 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
* create output
*-------------------------------------------------------------------------
*/
- refbuf =
- (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */
+ refbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */
if (refbuf == NULL) {
- HDprintf("cannot allocate memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDcalloc failed");
+ printf("cannot allocate memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "calloc failed");
} /* end if */
for (i = 0; i < (unsigned)nelmts; i++)
@@ -647,12 +646,12 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
else if (is_ref_vlen) {
/* handle VLEN of references */
- buf = (hvl_t *)HDmalloc((unsigned)(nelmts * sizeof(hvl_t)));
+ buf = (hvl_t *)malloc((unsigned)(nelmts * sizeof(hvl_t)));
refbuf = buf; /* reuse the read buffer for write */
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Aread(attr_id, mtype_id, buf) < 0)
@@ -667,7 +666,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
for (j = 0; j < ((hvl_t *)buf)[i].len; j++) {
if (update_ref_value(attr_id, H5R_OBJECT, &(ptr[j]), fidout, &ref_out, travt) < 0)
continue;
- HDmemcpy(&(ptr[j]), &ref_out, msize);
+ memcpy(&(ptr[j]), &ref_out, msize);
}
} /* for (i=0; i<nelems; i++) */
}
@@ -681,7 +680,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (update_ref_value(attr_id, H5R_DATASET_REGION, &(ptr[j]), fidout, &ref_out,
travt) < 0)
continue;
- HDmemcpy(&(ptr[j]), &ref_out, msize);
+ memcpy(&(ptr[j]), &ref_out, msize);
}
} /* for (i=0; i<nelems; i++) */
}
@@ -689,12 +688,12 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
else if (is_ref_comp) {
/* handle ref fields in a compound */
- buf = HDmalloc((unsigned)(nelmts * msize));
+ buf = malloc((unsigned)(nelmts * msize));
refbuf = buf; /* reuse the read buffer for write */
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Aread(attr_id, mtype_id, buf) < 0)
@@ -712,7 +711,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
travt) < 0) /* Extra (void *) cast to quiet "cast to create
alignment" warning - 2019/07/05, QAK */
continue;
- HDmemcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]);
+ memcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]);
} /* if */
else if (ref_comp_size[j] == H5R_DSET_REG_REF_BUF_SIZE) {
size_t idx = i * msize + H5Tget_member_offset(mtype_id, ref_comp_index[j]);
@@ -722,7 +721,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
(hdset_reg_ref_t *)(((char *)buf) + idx), fidout, &ref_out,
travt) < 0)
continue;
- HDmemcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]);
+ memcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]);
} /* else if */
} /* j */
} /* i */
@@ -739,22 +738,22 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
refbuf = NULL; /* set it to NULL to avoid double free since buf and refbuf are the same. */
if (buf) {
- HDfree(buf);
+ free(buf);
buf = NULL;
}
if (refbuf) {
- HDfree(refbuf);
+ free(refbuf);
refbuf = NULL;
}
if (ref_comp_index) {
- HDfree(ref_comp_index);
+ free(ref_comp_index);
ref_comp_index = NULL;
}
if (ref_comp_size) {
- HDfree(ref_comp_size);
+ free(ref_comp_size);
ref_comp_size = NULL;
}
@@ -777,15 +776,15 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
done:
if (refbuf)
- HDfree(refbuf);
+ free(refbuf);
if (buf)
- HDfree(buf);
+ free(buf);
if (ref_comp_index)
- HDfree(ref_comp_index);
+ free(ref_comp_index);
if (ref_comp_size)
- HDfree(ref_comp_size);
+ free(ref_comp_size);
H5E_BEGIN_TRY
{
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 05e0be8..7916517 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -192,7 +192,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -207,46 +207,45 @@ leave(int ret)
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "usage: %s [OPTIONS] file\n", prog);
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " ERROR\n");
- HDfprintf(stdout, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n");
- HDfprintf(stdout, " Optional value 2 also prints file open errors\n");
- HDfprintf(stdout, " OPTIONS\n");
- HDfprintf(stdout, " -h, --help Print a usage message and exit\n");
- HDfprintf(stdout, " -V, --version Print version number and exit\n");
- HDfprintf(stdout, " -f, --file Print file information\n");
- HDfprintf(stdout, " -F, --filemetadata Print file space information for file's metadata\n");
- HDfprintf(stdout, " -g, --group Print group information\n");
- HDfprintf(stdout, " -l N, --links=N Set the threshold for the # of links when printing\n");
- HDfprintf(stdout, " information for small groups. N is an integer greater\n");
- HDfprintf(stdout, " than 0. The default threshold is 10.\n");
- HDfprintf(stdout, " -G, --groupmetadata Print file space information for groups' metadata\n");
- HDfprintf(stdout, " -d, --dset Print dataset information\n");
- HDfprintf(stdout, " -m N, --dims=N Set the threshold for the dimension sizes when printing\n");
- HDfprintf(stdout,
- " information for small datasets. N is an integer greater\n");
- HDfprintf(stdout, " than 0. The default threshold is 10.\n");
- HDfprintf(stdout, " -D, --dsetmetadata Print file space information for datasets' metadata\n");
- HDfprintf(stdout, " -T, --dtypemetadata Print datasets' datatype information\n");
- HDfprintf(stdout, " -A, --attribute Print attribute information\n");
- HDfprintf(stdout, " -a N, --numattrs=N Set the threshold for the # of attributes when printing\n");
- HDfprintf(stdout,
- " information for small # of attributes. N is an integer greater\n");
- HDfprintf(stdout, " than 0. The default threshold is 10.\n");
- HDfprintf(stdout, " -s, --freespace Print free space information\n");
- HDfprintf(stdout, " -S, --summary Print summary of file space information\n");
- HDfprintf(stdout, " --s3-cred=<cred> Access file on S3, using provided credential\n");
- HDfprintf(stdout, " <cred> :: (region,id,key)\n");
- HDfprintf(stdout, " If <cred> == \"(,,)\", no authentication is used.\n");
- HDfprintf(stdout, " --hdfs-attrs=<attrs> Access a file on HDFS with given configuration\n");
- HDfprintf(stdout, " attributes.\n");
- HDfprintf(stdout, " <attrs> :: (<namenode name>,<namenode port>,\n");
- HDfprintf(stdout, " <kerberos cache path>,<username>,\n");
- HDfprintf(stdout, " <buffer size>)\n");
- HDfprintf(stdout, " If an attribute is empty, a default value will be\n");
- HDfprintf(stdout, " used.\n");
+ fflush(stdout);
+ fprintf(stdout, "usage: %s [OPTIONS] file\n", prog);
+ fprintf(stdout, "\n");
+ fprintf(stdout, " ERROR\n");
+ fprintf(stdout, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n");
+ fprintf(stdout, " Optional value 2 also prints file open errors\n");
+ fprintf(stdout, " OPTIONS\n");
+ fprintf(stdout, " -h, --help Print a usage message and exit\n");
+ fprintf(stdout, " -V, --version Print version number and exit\n");
+ fprintf(stdout, " -f, --file Print file information\n");
+ fprintf(stdout, " -F, --filemetadata Print file space information for file's metadata\n");
+ fprintf(stdout, " -g, --group Print group information\n");
+ fprintf(stdout, " -l N, --links=N Set the threshold for the # of links when printing\n");
+ fprintf(stdout, " information for small groups. N is an integer greater\n");
+ fprintf(stdout, " than 0. The default threshold is 10.\n");
+ fprintf(stdout, " -G, --groupmetadata Print file space information for groups' metadata\n");
+ fprintf(stdout, " -d, --dset Print dataset information\n");
+ fprintf(stdout, " -m N, --dims=N Set the threshold for the dimension sizes when printing\n");
+ fprintf(stdout, " information for small datasets. N is an integer greater\n");
+ fprintf(stdout, " than 0. The default threshold is 10.\n");
+ fprintf(stdout, " -D, --dsetmetadata Print file space information for datasets' metadata\n");
+ fprintf(stdout, " -T, --dtypemetadata Print datasets' datatype information\n");
+ fprintf(stdout, " -A, --attribute Print attribute information\n");
+ fprintf(stdout, " -a N, --numattrs=N Set the threshold for the # of attributes when printing\n");
+ fprintf(stdout,
+ " information for small # of attributes. N is an integer greater\n");
+ fprintf(stdout, " than 0. The default threshold is 10.\n");
+ fprintf(stdout, " -s, --freespace Print free space information\n");
+ fprintf(stdout, " -S, --summary Print summary of file space information\n");
+ fprintf(stdout, " --s3-cred=<cred> Access file on S3, using provided credential\n");
+ fprintf(stdout, " <cred> :: (region,id,key)\n");
+ fprintf(stdout, " If <cred> == \"(,,)\", no authentication is used.\n");
+ fprintf(stdout, " --hdfs-attrs=<attrs> Access a file on HDFS with given configuration\n");
+ fprintf(stdout, " attributes.\n");
+ fprintf(stdout, " <attrs> :: (<namenode name>,<namenode port>,\n");
+ fprintf(stdout, " <kerberos cache path>,<username>,\n");
+ fprintf(stdout, " <buffer size>)\n");
+ fprintf(stdout, " If an attribute is empty, a default value will be\n");
+ fprintf(stdout, " used.\n");
}
/*-------------------------------------------------------------------------
@@ -307,8 +306,8 @@ attribute_stats(iter_t *iter, const H5O_info2_t *oi, const H5O_native_info_t *na
/* Add attribute count to proper bin */
bin = ceil_log10((unsigned long)oi->num_attrs);
if ((bin + 1) > iter->attr_nbins) {
- iter->attr_bins = (unsigned long *)HDrealloc(iter->attr_bins, (bin + 1) * sizeof(unsigned long));
- HDassert(iter->attr_bins);
+ iter->attr_bins = (unsigned long *)realloc(iter->attr_bins, (bin + 1) * sizeof(unsigned long));
+ assert(iter->attr_bins);
/* Initialize counts for intermediate bins */
while (iter->attr_nbins < bin)
@@ -368,7 +367,7 @@ group_stats(iter_t *iter, const char *name, const H5O_info2_t *oi, const H5O_nat
if ((bin + 1) > iter->group_nbins) {
/* Allocate more storage for info about dataset's datatype */
if ((iter->group_bins =
- (unsigned long *)HDrealloc(iter->group_bins, (bin + 1) * sizeof(unsigned long))) == NULL)
+ (unsigned long *)realloc(iter->group_bins, (bin + 1) * sizeof(unsigned long))) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "H5Drealloc() failed");
/* Initialize counts for intermediate bins */
@@ -503,8 +502,8 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info2_t *oi, const H5O_n
bin = ceil_log10((unsigned long)dims[0]);
if ((bin + 1) > iter->dset_dim_nbins) {
/* Allocate more storage for info about dataset's datatype */
- if ((iter->dset_dim_bins = (unsigned long *)HDrealloc(iter->dset_dim_bins,
- (bin + 1) * sizeof(unsigned long))) == NULL)
+ if ((iter->dset_dim_bins = (unsigned long *)realloc(iter->dset_dim_bins,
+ (bin + 1) * sizeof(unsigned long))) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "H5Drealloc() failed");
/* Initialize counts for intermediate bins */
@@ -542,7 +541,7 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info2_t *oi, const H5O_n
iter->dset_ntypes++;
/* Allocate more storage for info about dataset's datatype */
- if ((iter->dset_type_info = (dtype_info_t *)HDrealloc(
+ if ((iter->dset_type_info = (dtype_info_t *)realloc(
iter->dset_type_info, iter->dset_ntypes * sizeof(dtype_info_t))) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "H5Drealloc() failed");
@@ -739,10 +738,10 @@ freespace_stats(hid_t fid, iter_t *iter)
if ((nsects = H5Fget_free_sections(fid, H5FD_MEM_DEFAULT, 0, NULL)) < 0)
return (FAIL);
else if (nsects) {
- if (NULL == (sect_info = (H5F_sect_info_t *)HDcalloc((size_t)nsects, sizeof(H5F_sect_info_t))))
+ if (NULL == (sect_info = (H5F_sect_info_t *)calloc((size_t)nsects, sizeof(H5F_sect_info_t))))
return (FAIL);
nsects = H5Fget_free_sections(fid, H5FD_MEM_DEFAULT, (size_t)nsects, sect_info);
- HDassert(nsects);
+ assert(nsects);
} /* end else-if */
for (u = 0; u < (size_t)nsects; u++) {
@@ -755,8 +754,8 @@ freespace_stats(hid_t fid, iter_t *iter)
bin = ceil_log10((unsigned long)sect_info[u].size);
if (bin >= iter->sect_nbins) {
/* Allocate more storage for section info */
- iter->sect_bins = (unsigned long *)HDrealloc(iter->sect_bins, (bin + 1) * sizeof(unsigned long));
- HDassert(iter->sect_bins);
+ iter->sect_bins = (unsigned long *)realloc(iter->sect_bins, (bin + 1) * sizeof(unsigned long));
+ assert(iter->sect_bins);
/* Initialize counts for intermediate bins */
while (iter->sect_nbins < bin)
@@ -771,7 +770,7 @@ freespace_stats(hid_t fid, iter_t *iter)
} /* end for */
if (sect_info)
- HDfree(sect_info);
+ free(sect_info);
return 0;
} /* end freespace_stats() */
@@ -795,12 +794,12 @@ hand_free(struct handler_t *hand)
for (u = 0; u < hand->obj_count; u++)
if (hand->obj[u]) {
- HDfree(hand->obj[u]);
+ free(hand->obj[u]);
hand->obj[u] = NULL;
} /* end if */
hand->obj_count = 0;
- HDfree(hand->obj);
- HDfree(hand);
+ free(hand->obj);
+ free(hand);
} /* end if */
} /* end hand_free() */
@@ -842,7 +841,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
case 'E':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
@@ -869,7 +868,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
case 'l':
if (H5_optarg) {
- sgroups_threshold = HDatoi(H5_optarg);
+ sgroups_threshold = atoi(H5_optarg);
if (sgroups_threshold < 1) {
error_msg("Invalid threshold for small groups\n");
goto error;
@@ -892,7 +891,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
case 'm':
if (H5_optarg) {
- sdsets_threshold = HDatoi(H5_optarg);
+ sdsets_threshold = atoi(H5_optarg);
if (sdsets_threshold < 1) {
error_msg("Invalid threshold for small datasets\n");
goto error;
@@ -915,7 +914,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
case 'a':
if (H5_optarg) {
- sattrs_threshold = HDatoi(H5_optarg);
+ sattrs_threshold = atoi(H5_optarg);
if (sattrs_threshold < 1) {
error_msg("Invalid threshold for small # of attributes\n");
goto error;
@@ -941,14 +940,14 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
display_object = TRUE;
/* Allocate space to hold the command line info */
- if (NULL == (hand = (struct handler_t *)HDcalloc((size_t)1, sizeof(struct handler_t)))) {
+ if (NULL == (hand = (struct handler_t *)calloc((size_t)1, sizeof(struct handler_t)))) {
error_msg("unable to allocate memory for object struct\n");
goto error;
} /* end if */
/* Allocate space to hold the object strings */
hand->obj_count = (size_t)argc;
- if (NULL == (hand->obj = (char **)HDcalloc((size_t)argc, sizeof(char *)))) {
+ if (NULL == (hand->obj = (char **)calloc((size_t)argc, sizeof(char *)))) {
error_msg("unable to allocate memory for object array\n");
goto error;
} /* end if */
@@ -1032,49 +1031,49 @@ iter_free(iter_t *iter)
/* Clear array of bins for group counts */
if (iter->group_bins) {
- HDfree(iter->group_bins);
+ free(iter->group_bins);
iter->group_bins = NULL;
} /* end if */
/* Clear array for tracking small groups */
if (iter->num_small_groups) {
- HDfree(iter->num_small_groups);
+ free(iter->num_small_groups);
iter->num_small_groups = NULL;
} /* end if */
/* Clear array of bins for attribute counts */
if (iter->attr_bins) {
- HDfree(iter->attr_bins);
+ free(iter->attr_bins);
iter->attr_bins = NULL;
} /* end if */
/* Clear array for tracking small attributes */
if (iter->num_small_attrs) {
- HDfree(iter->num_small_attrs);
+ free(iter->num_small_attrs);
iter->num_small_attrs = NULL;
} /* end if */
/* Clear dataset datatype information found */
if (iter->dset_type_info) {
- HDfree(iter->dset_type_info);
+ free(iter->dset_type_info);
iter->dset_type_info = NULL;
} /* end if */
/* Clear array of bins for dataset dimensions */
if (iter->dset_dim_bins) {
- HDfree(iter->dset_dim_bins);
+ free(iter->dset_dim_bins);
iter->dset_dim_bins = NULL;
} /* end if */
/* Clear array of tracking 1-D small datasets */
if (iter->small_dset_dims) {
- HDfree(iter->small_dset_dims);
+ free(iter->small_dset_dims);
iter->small_dset_dims = NULL;
} /* end if */
/* Clear array of bins for free-space section sizes */
if (iter->sect_bins) {
- HDfree(iter->sect_bins);
+ free(iter->sect_bins);
iter->sect_bins = NULL;
} /* end if */
} /* end iter_free() */
@@ -1096,14 +1095,14 @@ iter_free(iter_t *iter)
static herr_t
print_file_info(const iter_t *iter)
{
- HDprintf("File information\n");
- HDprintf("\t# of unique groups: %lu\n", iter->uniq_groups);
- HDprintf("\t# of unique datasets: %lu\n", iter->uniq_dsets);
- HDprintf("\t# of unique named datatypes: %lu\n", iter->uniq_dtypes);
- HDprintf("\t# of unique links: %lu\n", iter->uniq_links);
- HDprintf("\t# of unique other: %lu\n", iter->uniq_others);
- HDprintf("\tMax. # of links to object: %lu\n", iter->max_links);
- HDfprintf(stdout, "\tMax. # of objects in group: %" PRIuHSIZE "\n", iter->max_fanout);
+ printf("File information\n");
+ printf("\t# of unique groups: %lu\n", iter->uniq_groups);
+ printf("\t# of unique datasets: %lu\n", iter->uniq_dsets);
+ printf("\t# of unique named datatypes: %lu\n", iter->uniq_dtypes);
+ printf("\t# of unique links: %lu\n", iter->uniq_links);
+ printf("\t# of unique other: %lu\n", iter->uniq_others);
+ printf("\tMax. # of links to object: %lu\n", iter->max_links);
+ fprintf(stdout, "\tMax. # of objects in group: %" PRIuHSIZE "\n", iter->max_fanout);
return 0;
} /* print_file_info() */
@@ -1125,41 +1124,41 @@ print_file_info(const iter_t *iter)
static herr_t
print_file_metadata(const iter_t *iter)
{
- HDfprintf(stdout, "File space information for file metadata (in bytes):\n");
- HDfprintf(stdout, "\tSuperblock: %" PRIuHSIZE "\n", iter->super_size);
- HDfprintf(stdout, "\tSuperblock extension: %" PRIuHSIZE "\n", iter->super_ext_size);
- HDfprintf(stdout, "\tUser block: %" PRIuHSIZE "\n", iter->ublk_size);
-
- HDfprintf(stdout, "\tObject headers: (total/unused)\n");
- HDfprintf(stdout, "\t\tGroups: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->group_ohdr_info.total_size,
- iter->group_ohdr_info.free_size);
- HDfprintf(stdout, "\t\tDatasets(exclude compact data): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
- iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
- HDfprintf(stdout, "\t\tDatatypes: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->dtype_ohdr_info.total_size,
- iter->dtype_ohdr_info.free_size);
-
- HDfprintf(stdout, "\tGroups:\n");
- HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
- HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
-
- HDfprintf(stdout, "\tAttributes:\n");
- HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->attrs_btree_storage_size);
- HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->attrs_heap_storage_size);
-
- HDfprintf(stdout, "\tChunked datasets:\n");
- HDfprintf(stdout, "\t\tIndex: %" PRIuHSIZE "\n", iter->datasets_index_storage_size);
-
- HDfprintf(stdout, "\tDatasets:\n");
- HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
-
- HDfprintf(stdout, "\tShared Messages:\n");
- HDfprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->SM_hdr_storage_size);
- HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->SM_index_storage_size);
- HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->SM_heap_storage_size);
-
- HDfprintf(stdout, "\tFree-space managers:\n");
- HDfprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->free_hdr);
- HDfprintf(stdout, "\t\tAmount of free space: %" PRIuHSIZE "\n", iter->free_space);
+ fprintf(stdout, "File space information for file metadata (in bytes):\n");
+ fprintf(stdout, "\tSuperblock: %" PRIuHSIZE "\n", iter->super_size);
+ fprintf(stdout, "\tSuperblock extension: %" PRIuHSIZE "\n", iter->super_ext_size);
+ fprintf(stdout, "\tUser block: %" PRIuHSIZE "\n", iter->ublk_size);
+
+ fprintf(stdout, "\tObject headers: (total/unused)\n");
+ fprintf(stdout, "\t\tGroups: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->group_ohdr_info.total_size,
+ iter->group_ohdr_info.free_size);
+ fprintf(stdout, "\t\tDatasets(exclude compact data): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
+ iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
+ fprintf(stdout, "\t\tDatatypes: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->dtype_ohdr_info.total_size,
+ iter->dtype_ohdr_info.free_size);
+
+ fprintf(stdout, "\tGroups:\n");
+ fprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
+ fprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
+
+ fprintf(stdout, "\tAttributes:\n");
+ fprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->attrs_btree_storage_size);
+ fprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->attrs_heap_storage_size);
+
+ fprintf(stdout, "\tChunked datasets:\n");
+ fprintf(stdout, "\t\tIndex: %" PRIuHSIZE "\n", iter->datasets_index_storage_size);
+
+ fprintf(stdout, "\tDatasets:\n");
+ fprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
+
+ fprintf(stdout, "\tShared Messages:\n");
+ fprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->SM_hdr_storage_size);
+ fprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->SM_index_storage_size);
+ fprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->SM_heap_storage_size);
+
+ fprintf(stdout, "\tFree-space managers:\n");
+ fprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->free_hdr);
+ fprintf(stdout, "\t\tAmount of free space: %" PRIuHSIZE "\n", iter->free_space);
return 0;
} /* print_file_metadata() */
@@ -1185,32 +1184,31 @@ print_group_info(const iter_t *iter)
unsigned long total; /* Total count for various statistics */
unsigned u; /* Local index variable */
- HDprintf("Small groups (with 0 to %u links):\n", sgroups_threshold - 1);
+ printf("Small groups (with 0 to %u links):\n", sgroups_threshold - 1);
total = 0;
for (u = 0; u < (unsigned)sgroups_threshold; u++) {
if (iter->num_small_groups[u] > 0) {
- HDprintf("\t# of groups with %u link(s): %lu\n", u, iter->num_small_groups[u]);
+ printf("\t# of groups with %u link(s): %lu\n", u, iter->num_small_groups[u]);
total += iter->num_small_groups[u];
} /* end if */
} /* end for */
- HDprintf("\tTotal # of small groups: %lu\n", total);
+ printf("\tTotal # of small groups: %lu\n", total);
- HDprintf("Group bins:\n");
+ printf("Group bins:\n");
total = 0;
if ((iter->group_nbins > 0) && (iter->group_bins[0] > 0)) {
- HDprintf("\t# of groups with 0 link: %lu\n", iter->group_bins[0]);
+ printf("\t# of groups with 0 link: %lu\n", iter->group_bins[0]);
total = iter->group_bins[0];
} /* end if */
power = 1;
for (u = 1; u < iter->group_nbins; u++) {
if (iter->group_bins[u] > 0) {
- HDprintf("\t# of groups with %lu - %lu links: %lu\n", power, (power * 10) - 1,
- iter->group_bins[u]);
+ printf("\t# of groups with %lu - %lu links: %lu\n", power, (power * 10) - 1, iter->group_bins[u]);
total += iter->group_bins[u];
} /* end if */
power *= 10;
} /* end for */
- HDprintf("\tTotal # of groups: %lu\n", total);
+ printf("\tTotal # of groups: %lu\n", total);
return 0;
} /* print_group_info() */
@@ -1230,13 +1228,13 @@ print_group_info(const iter_t *iter)
static herr_t
print_group_metadata(const iter_t *iter)
{
- HDprintf("File space information for groups' metadata (in bytes):\n");
+ printf("File space information for groups' metadata (in bytes):\n");
- HDfprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
- iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size);
+ fprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
+ iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size);
- HDfprintf(stdout, "\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
- HDfprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
+ fprintf(stdout, "\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
+ fprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
return 0;
} /* print_group_metadata() */
@@ -1262,69 +1260,68 @@ print_dataset_info(const iter_t *iter)
unsigned u; /* Local index variable */
if (iter->uniq_dsets > 0) {
- HDprintf("Dataset dimension information:\n");
- HDprintf("\tMax. rank of datasets: %u\n", iter->max_dset_rank);
- HDprintf("\tDataset ranks:\n");
+ printf("Dataset dimension information:\n");
+ printf("\tMax. rank of datasets: %u\n", iter->max_dset_rank);
+ printf("\tDataset ranks:\n");
for (u = 0; u < H5S_MAX_RANK; u++)
if (iter->dset_rank_count[u] > 0)
- HDprintf("\t\t# of dataset with rank %u: %lu\n", u, iter->dset_rank_count[u]);
+ printf("\t\t# of dataset with rank %u: %lu\n", u, iter->dset_rank_count[u]);
- HDprintf("1-D Dataset information:\n");
- HDfprintf(stdout, "\tMax. dimension size of 1-D datasets: %" PRIuHSIZE "\n", iter->max_dset_dims);
- HDprintf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1);
+ printf("1-D Dataset information:\n");
+ fprintf(stdout, "\tMax. dimension size of 1-D datasets: %" PRIuHSIZE "\n", iter->max_dset_dims);
+ printf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1);
total = 0;
for (u = 0; u < (unsigned)sdsets_threshold; u++) {
if (iter->small_dset_dims[u] > 0) {
- HDprintf("\t\t# of datasets with dimension sizes %u: %lu\n", u, iter->small_dset_dims[u]);
+ printf("\t\t# of datasets with dimension sizes %u: %lu\n", u, iter->small_dset_dims[u]);
total += iter->small_dset_dims[u];
} /* end if */
} /* end for */
- HDprintf("\t\tTotal # of small datasets: %lu\n", total);
+ printf("\t\tTotal # of small datasets: %lu\n", total);
/* Protect against no datasets in file */
if (iter->dset_dim_nbins > 0) {
- HDprintf("\t1-D Dataset dimension bins:\n");
+ printf("\t1-D Dataset dimension bins:\n");
total = 0;
if (iter->dset_dim_bins[0] > 0) {
- HDprintf("\t\t# of datasets with dimension size 0: %lu\n", iter->dset_dim_bins[0]);
+ printf("\t\t# of datasets with dimension size 0: %lu\n", iter->dset_dim_bins[0]);
total = iter->dset_dim_bins[0];
} /* end if */
power = 1;
for (u = 1; u < iter->dset_dim_nbins; u++) {
if (iter->dset_dim_bins[u] > 0) {
- HDprintf("\t\t# of datasets with dimension size %lu - %lu: %lu\n", power,
- (power * 10) - 1, iter->dset_dim_bins[u]);
+ printf("\t\t# of datasets with dimension size %lu - %lu: %lu\n", power, (power * 10) - 1,
+ iter->dset_dim_bins[u]);
total += iter->dset_dim_bins[u];
} /* end if */
power *= 10;
} /* end for */
- HDprintf("\t\tTotal # of datasets: %lu\n", total);
+ printf("\t\tTotal # of datasets: %lu\n", total);
} /* end if */
- HDprintf("Dataset storage information:\n");
- HDfprintf(stdout, "\tTotal raw data size: %" PRIuHSIZE "\n", iter->dset_storage_size);
- HDfprintf(stdout, "\tTotal external raw data size: %" PRIuHSIZE "\n",
- iter->dset_external_storage_size);
+ printf("Dataset storage information:\n");
+ fprintf(stdout, "\tTotal raw data size: %" PRIuHSIZE "\n", iter->dset_storage_size);
+ fprintf(stdout, "\tTotal external raw data size: %" PRIuHSIZE "\n", iter->dset_external_storage_size);
- HDprintf("Dataset layout information:\n");
+ printf("Dataset layout information:\n");
for (u = 0; u < H5D_NLAYOUTS; u++)
- HDprintf("\tDataset layout counts[%s]: %lu\n",
- (u == H5D_COMPACT
- ? "COMPACT"
- : (u == H5D_CONTIGUOUS ? "CONTIG" : (u == H5D_CHUNKED ? "CHUNKED" : "VIRTUAL"))),
- iter->dset_layouts[u]);
- HDprintf("\tNumber of external files : %lu\n", iter->nexternal);
-
- HDprintf("Dataset filters information:\n");
- HDprintf("\tNumber of datasets with:\n");
- HDprintf("\t\tNO filter: %lu\n", iter->dset_comptype[H5Z_FILTER_ERROR + 1]);
- HDprintf("\t\tGZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_DEFLATE]);
- HDprintf("\t\tSHUFFLE filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SHUFFLE]);
- HDprintf("\t\tFLETCHER32 filter: %lu\n", iter->dset_comptype[H5Z_FILTER_FLETCHER32]);
- HDprintf("\t\tSZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SZIP]);
- HDprintf("\t\tNBIT filter: %lu\n", iter->dset_comptype[H5Z_FILTER_NBIT]);
- HDprintf("\t\tSCALEOFFSET filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SCALEOFFSET]);
- HDprintf("\t\tUSER-DEFINED filter: %lu\n", iter->dset_comptype[H5_NFILTERS_IMPL - 1]);
+ printf("\tDataset layout counts[%s]: %lu\n",
+ (u == H5D_COMPACT
+ ? "COMPACT"
+ : (u == H5D_CONTIGUOUS ? "CONTIG" : (u == H5D_CHUNKED ? "CHUNKED" : "VIRTUAL"))),
+ iter->dset_layouts[u]);
+ printf("\tNumber of external files : %lu\n", iter->nexternal);
+
+ printf("Dataset filters information:\n");
+ printf("\tNumber of datasets with:\n");
+ printf("\t\tNO filter: %lu\n", iter->dset_comptype[H5Z_FILTER_ERROR + 1]);
+ printf("\t\tGZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_DEFLATE]);
+ printf("\t\tSHUFFLE filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SHUFFLE]);
+ printf("\t\tFLETCHER32 filter: %lu\n", iter->dset_comptype[H5Z_FILTER_FLETCHER32]);
+ printf("\t\tSZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SZIP]);
+ printf("\t\tNBIT filter: %lu\n", iter->dset_comptype[H5Z_FILTER_NBIT]);
+ printf("\t\tSCALEOFFSET filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SCALEOFFSET]);
+ printf("\t\tUSER-DEFINED filter: %lu\n", iter->dset_comptype[H5_NFILTERS_IMPL - 1]);
} /* end if */
return 0;
@@ -1346,13 +1343,13 @@ print_dataset_info(const iter_t *iter)
static herr_t
print_dset_metadata(const iter_t *iter)
{
- HDprintf("File space information for datasets' metadata (in bytes):\n");
+ printf("File space information for datasets' metadata (in bytes):\n");
- HDfprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
- iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
+ fprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
+ iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
- HDfprintf(stdout, "\tIndex for Chunked datasets: %" PRIuHSIZE "\n", iter->datasets_index_storage_size);
- HDfprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
+ fprintf(stdout, "\tIndex for Chunked datasets: %" PRIuHSIZE "\n", iter->datasets_index_storage_size);
+ fprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
return 0;
} /* print_dset_metadata() */
@@ -1378,20 +1375,20 @@ print_dset_dtype_meta(const iter_t *iter)
unsigned u; /* Local index variable */
if (iter->dset_ntypes) {
- HDprintf("Dataset datatype information:\n");
- HDprintf("\t# of unique datatypes used by datasets: %lu\n", iter->dset_ntypes);
+ printf("Dataset datatype information:\n");
+ printf("\t# of unique datatypes used by datasets: %lu\n", iter->dset_ntypes);
total = 0;
for (u = 0; u < iter->dset_ntypes; u++) {
H5Tencode(iter->dset_type_info[u].tid, NULL, &dtype_size);
- HDprintf("\tDataset datatype #%u:\n", u);
- HDprintf("\t\tCount (total/named) = (%lu/%lu)\n", iter->dset_type_info[u].count,
- iter->dset_type_info[u].named);
- HDprintf("\t\tSize (desc./elmt) = (%lu/%lu)\n", (unsigned long)dtype_size,
- (unsigned long)H5Tget_size(iter->dset_type_info[u].tid));
+ printf("\tDataset datatype #%u:\n", u);
+ printf("\t\tCount (total/named) = (%lu/%lu)\n", iter->dset_type_info[u].count,
+ iter->dset_type_info[u].named);
+ printf("\t\tSize (desc./elmt) = (%lu/%lu)\n", (unsigned long)dtype_size,
+ (unsigned long)H5Tget_size(iter->dset_type_info[u].tid));
H5Tclose(iter->dset_type_info[u].tid);
total += iter->dset_type_info[u].count;
} /* end for */
- HDprintf("\tTotal dataset datatype count: %lu\n", total);
+ printf("\tTotal dataset datatype count: %lu\n", total);
} /* end if */
return 0;
@@ -1418,29 +1415,29 @@ print_attr_info(const iter_t *iter)
unsigned long total; /* Total count for various statistics */
unsigned u; /* Local index variable */
- HDprintf("Small # of attributes (objects with 1 to %u attributes):\n", sattrs_threshold);
+ printf("Small # of attributes (objects with 1 to %u attributes):\n", sattrs_threshold);
total = 0;
for (u = 1; u <= (unsigned)sattrs_threshold; u++) {
if (iter->num_small_attrs[u] > 0) {
- HDprintf("\t# of objects with %u attributes: %lu\n", u, iter->num_small_attrs[u]);
+ printf("\t# of objects with %u attributes: %lu\n", u, iter->num_small_attrs[u]);
total += iter->num_small_attrs[u];
} /* end if */
} /* end for */
- HDprintf("\tTotal # of objects with small # of attributes: %lu\n", total);
+ printf("\tTotal # of objects with small # of attributes: %lu\n", total);
- HDprintf("Attribute bins:\n");
+ printf("Attribute bins:\n");
total = 0;
power = 1;
for (u = 1; u < iter->attr_nbins; u++) {
if (iter->attr_bins[u] > 0) {
- HDprintf("\t# of objects with %lu - %lu attributes: %lu\n", power, (power * 10) - 1,
- iter->attr_bins[u]);
+ printf("\t# of objects with %lu - %lu attributes: %lu\n", power, (power * 10) - 1,
+ iter->attr_bins[u]);
total += iter->attr_bins[u];
} /* end if */
power *= 10;
} /* end for */
- HDprintf("\tTotal # of objects with attributes: %lu\n", total);
- HDprintf("\tMax. # of attributes to objects: %lu\n", (unsigned long)iter->max_attrs);
+ printf("\tTotal # of objects with attributes: %lu\n", total);
+ printf("\tMax. # of attributes to objects: %lu\n", (unsigned long)iter->max_attrs);
return 0;
} /* print_attr_info() */
@@ -1465,30 +1462,30 @@ print_freespace_info(const iter_t *iter)
unsigned long total; /* Total count for various statistics */
unsigned u; /* Local index variable */
- HDfprintf(stdout, "Free-space persist: %s\n", iter->fs_persist ? "TRUE" : "FALSE");
- HDfprintf(stdout, "Free-space section threshold: %" PRIuHSIZE " bytes\n", iter->fs_threshold);
- HDprintf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
+ fprintf(stdout, "Free-space persist: %s\n", iter->fs_persist ? "TRUE" : "FALSE");
+ fprintf(stdout, "Free-space section threshold: %" PRIuHSIZE " bytes\n", iter->fs_threshold);
+ printf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
total = 0;
for (u = 0; u < SIZE_SMALL_SECTS; u++) {
if (iter->num_small_sects[u] > 0) {
- HDprintf("\t# of sections of size %u: %lu\n", u, iter->num_small_sects[u]);
+ printf("\t# of sections of size %u: %lu\n", u, iter->num_small_sects[u]);
total += iter->num_small_sects[u];
} /* end if */
} /* end for */
- HDprintf("\tTotal # of small size sections: %lu\n", total);
+ printf("\tTotal # of small size sections: %lu\n", total);
- HDprintf("Free-space section bins:\n");
+ printf("Free-space section bins:\n");
total = 0;
power = 1;
for (u = 1; u < iter->sect_nbins; u++) {
if (iter->sect_bins[u] > 0) {
- HDprintf("\t# of sections of size %lu - %lu: %lu\n", power, (power * 10) - 1, iter->sect_bins[u]);
+ printf("\t# of sections of size %lu - %lu: %lu\n", power, (power * 10) - 1, iter->sect_bins[u]);
total += iter->sect_bins[u];
} /* end if */
power *= 10;
} /* end for */
- HDprintf("\tTotal # of sections: %lu\n", total);
+ printf("\tTotal # of sections: %lu\n", total);
return 0;
} /* print_freespace_info() */
@@ -1513,9 +1510,9 @@ print_storage_summary(const iter_t *iter)
hsize_t unaccount = 0;
double percent = 0.0;
- HDfprintf(stdout, "File space management strategy: %s\n", FS_STRATEGY_NAME[iter->fs_strategy]);
- HDfprintf(stdout, "File space page size: %" PRIuHSIZE " bytes\n", iter->fsp_size);
- HDprintf("Summary of file space information:\n");
+ fprintf(stdout, "File space management strategy: %s\n", FS_STRATEGY_NAME[iter->fs_strategy]);
+ fprintf(stdout, "File space page size: %" PRIuHSIZE " bytes\n", iter->fsp_size);
+ printf("Summary of file space information:\n");
total_meta =
iter->super_size + iter->super_ext_size + iter->ublk_size + iter->group_ohdr_info.total_size +
iter->dset_ohdr_info.total_size + iter->dtype_ohdr_info.total_size + iter->groups_btree_storage_size +
@@ -1523,28 +1520,28 @@ print_storage_summary(const iter_t *iter)
iter->datasets_index_storage_size + iter->datasets_heap_storage_size + iter->SM_hdr_storage_size +
iter->SM_index_storage_size + iter->SM_heap_storage_size + iter->free_hdr;
- HDfprintf(stdout, " File metadata: %" PRIuHSIZE " bytes\n", total_meta);
- HDfprintf(stdout, " Raw data: %" PRIuHSIZE " bytes\n", iter->dset_storage_size);
+ fprintf(stdout, " File metadata: %" PRIuHSIZE " bytes\n", total_meta);
+ fprintf(stdout, " Raw data: %" PRIuHSIZE " bytes\n", iter->dset_storage_size);
percent = ((double)iter->free_space / (double)iter->filesize) * 100.0;
- HDfprintf(stdout, " Amount/Percent of tracked free space: %" PRIuHSIZE " bytes/%3.1f%%\n",
- iter->free_space, percent);
+ fprintf(stdout, " Amount/Percent of tracked free space: %" PRIuHSIZE " bytes/%3.1f%%\n",
+ iter->free_space, percent);
if (iter->filesize < (total_meta + iter->dset_storage_size + iter->free_space)) {
unaccount = (total_meta + iter->dset_storage_size + iter->free_space) - iter->filesize;
- HDfprintf(stdout, " ??? File has %" PRIuHSIZE " more bytes accounted for than its size! ???\n",
- unaccount);
+ fprintf(stdout, " ??? File has %" PRIuHSIZE " more bytes accounted for than its size! ???\n",
+ unaccount);
}
else {
unaccount = iter->filesize - (total_meta + iter->dset_storage_size + iter->free_space);
- HDfprintf(stdout, " Unaccounted space: %" PRIuHSIZE " bytes\n", unaccount);
+ fprintf(stdout, " Unaccounted space: %" PRIuHSIZE " bytes\n", unaccount);
}
- HDfprintf(stdout, "Total space: %" PRIuHSIZE " bytes\n",
- total_meta + iter->dset_storage_size + iter->free_space + unaccount);
+ fprintf(stdout, "Total space: %" PRIuHSIZE " bytes\n",
+ total_meta + iter->dset_storage_size + iter->free_space + unaccount);
if (iter->nexternal)
- HDfprintf(stdout, "External raw data: %" PRIuHSIZE " bytes\n", iter->dset_external_storage_size);
+ fprintf(stdout, "External raw data: %" PRIuHSIZE " bytes\n", iter->dset_external_storage_size);
return 0;
} /* print_storage_summary() */
@@ -1622,7 +1619,7 @@ print_file_statistics(const iter_t *iter)
static void
print_object_statistics(const char *name)
{
- HDprintf("Object name %s\n", name);
+ printf("Object name %s\n", name);
} /* print_object_statistics() */
/*-------------------------------------------------------------------------
@@ -1668,7 +1665,7 @@ main(int argc, char *argv[])
/* Initialize h5tools lib */
h5tools_init();
- HDmemset(&iter, 0, sizeof(iter));
+ memset(&iter, 0, sizeof(iter));
if (parse_command_line(argc, (const char *const *)argv, &hand) < 0)
goto done;
@@ -1705,7 +1702,7 @@ main(int argc, char *argv[])
hid_t fcpl;
H5F_info2_t finfo;
- HDprintf("Filename: %s\n", fname);
+ printf("Filename: %s\n", fname);
fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id != H5P_DEFAULT), NULL, 0);
@@ -1720,7 +1717,7 @@ main(int argc, char *argv[])
if (H5Fget_filesize(fid, &iter.filesize) < 0)
warn_msg("Unable to retrieve file size\n");
- HDassert(iter.filesize != 0);
+ assert(iter.filesize != 0);
/* Get storage info for file-level structures */
if (H5Fget_info2(fid, &finfo) < 0)
@@ -1735,10 +1732,9 @@ main(int argc, char *argv[])
iter.free_hdr = finfo.free.meta_size;
} /* end else */
- iter.num_small_groups = (unsigned long *)HDcalloc((size_t)sgroups_threshold, sizeof(unsigned long));
- iter.num_small_attrs =
- (unsigned long *)HDcalloc((size_t)(sattrs_threshold + 1), sizeof(unsigned long));
- iter.small_dset_dims = (unsigned long *)HDcalloc((size_t)sdsets_threshold, sizeof(unsigned long));
+ iter.num_small_groups = (unsigned long *)calloc((size_t)sgroups_threshold, sizeof(unsigned long));
+ iter.num_small_attrs = (unsigned long *)calloc((size_t)(sattrs_threshold + 1), sizeof(unsigned long));
+ iter.small_dset_dims = (unsigned long *)calloc((size_t)sdsets_threshold, sizeof(unsigned long));
if (iter.num_small_groups == NULL || iter.num_small_attrs == NULL || iter.small_dset_dims == NULL) {
error_msg("Unable to allocate memory for tracking small groups/datasets/attributes\n");
@@ -1754,7 +1750,7 @@ main(int argc, char *argv[])
if (H5Pget_file_space_strategy(fcpl, &iter.fs_strategy, &iter.fs_persist, &iter.fs_threshold) < 0)
warn_msg("Unable to retrieve file space information\n");
- HDassert(iter.fs_strategy >= 0 && iter.fs_strategy < H5F_FSPACE_STRATEGY_NTYPES);
+ assert(iter.fs_strategy >= 0 && iter.fs_strategy < H5F_FSPACE_STRATEGY_NTYPES);
if (H5Pget_file_space_page_size(fcpl, &iter.fsp_size) < 0)
warn_msg("Unable to retrieve file space page size\n");
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index 4a2b07d..2272626 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -144,11 +144,11 @@ parse_command_line(int argc, const char *const *argv)
case 'i':
increment_eoa_eof = TRUE;
if (H5_optarg != NULL) {
- if (HDatoi(H5_optarg) < 0) {
+ if (atoi(H5_optarg) < 0) {
usage(h5tools_getprogname());
goto done;
}
- increment = (hsize_t)HDatoi(H5_optarg);
+ increment = (hsize_t)atoi(H5_optarg);
}
break;
@@ -189,7 +189,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
} /* leave() */
/*-------------------------------------------------------------------------
@@ -325,7 +325,7 @@ main(int argc, char *argv[])
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
- HDfprintf(stdout, "EOA is %" PRIuHADDR "; EOF is %" PRIuHADDR " \n", eoa, (haddr_t)st.st_size);
+ fprintf(stdout, "EOA is %" PRIuHADDR "; EOF is %" PRIuHADDR " \n", eoa, (haddr_t)st.st_size);
}
/* --increment option */
@@ -353,9 +353,9 @@ main(int argc, char *argv[])
done:
if (fname)
- HDfree(fname);
+ free(fname);
if (fname_g)
- HDfree(fname_g);
+ free(fname_g);
H5E_BEGIN_TRY
{
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index b15ae09..9bac669 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -131,7 +131,7 @@ get_H5B2_class(const uint8_t *sig)
case H5B2_NUM_BTREE_ID:
default:
- HDfprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype));
+ fprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype));
} /* end switch */
return (cls);
@@ -172,7 +172,7 @@ get_H5EA_class(const uint8_t *sig)
case H5EA_NUM_CLS_ID:
default:
- HDfprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid));
+ fprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid));
} /* end switch */
return (cls);
@@ -213,7 +213,7 @@ get_H5FA_class(const uint8_t *sig)
case H5FA_NUM_CLS_ID:
default:
- HDfprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid));
+ fprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid));
} /* end switch */
return (cls);
@@ -252,14 +252,14 @@ main(int argc, char *argv[])
int exit_value = 0;
if (argc == 1) {
- HDfprintf(stderr, "Usage: %s filename [signature-addr [extra]*]\n", argv[0]);
+ fprintf(stderr, "Usage: %s filename [signature-addr [extra]*]\n", argv[0]);
exit_value = 1;
goto done;
} /* end if */
/* Initialize the library */
if (H5open() < 0) {
- HDfprintf(stderr, "cannot initialize the library\n");
+ fprintf(stderr, "cannot initialize the library\n");
exit_value = 1;
goto done;
} /* end if */
@@ -272,45 +272,45 @@ main(int argc, char *argv[])
* Open the file and get the file descriptor.
*/
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- HDfprintf(stderr, "cannot create file access property list\n");
+ fprintf(stderr, "cannot create file access property list\n");
exit_value = 1;
goto done;
} /* end if */
if (HDstrchr(argv[1], '%'))
if (H5Pset_fapl_family(fapl, (hsize_t)0, H5P_DEFAULT) < 0) {
- HDfprintf(stderr, "cannot set file access property list\n");
+ fprintf(stderr, "cannot set file access property list\n");
exit_value = 1;
goto done;
}
if ((fid = H5Fopen(argv[1], H5F_ACC_RDONLY, fapl)) < 0) {
- HDfprintf(stderr, "cannot open file\n");
+ fprintf(stderr, "cannot open file\n");
exit_value = 1;
goto done;
} /* end if */
/* Push API context */
if (H5CX_push() < 0) {
- HDfprintf(stderr, "cannot set API context\n");
+ fprintf(stderr, "cannot set API context\n");
exit_value = 1;
goto done;
}
api_ctx_pushed = TRUE;
if (NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(fid))) {
- HDfprintf(stderr, "cannot obtain vol_obj pointer\n");
+ fprintf(stderr, "cannot obtain vol_obj pointer\n");
exit_value = 2;
goto done;
} /* end if */
if (NULL == (f = (H5F_t *)H5VL_object_data(vol_obj))) {
- HDfprintf(stderr, "cannot obtain H5F_t pointer\n");
+ fprintf(stderr, "cannot obtain H5F_t pointer\n");
exit_value = 2;
goto done;
} /* end if */
/* Ignore metadata tags while using h5debug */
if (H5AC_ignore_tags(f) < 0) {
- HDfprintf(stderr, "cannot ignore metadata tags\n");
+ fprintf(stderr, "cannot ignore metadata tags\n");
exit_value = 1;
goto done;
}
@@ -324,15 +324,15 @@ main(int argc, char *argv[])
addr = (haddr_t)HDstrtoll(argv[2], NULL, 0);
/* Extra arguments for primary data structure */
- HDmemset(extra, 0, sizeof(extra));
+ memset(extra, 0, sizeof(extra));
if (argc > 3) {
/* Number of extra arguments */
extra_count = argc - 3;
/* Range check against 'extra' array size */
if (extra_count > (int)(sizeof(extra) / sizeof(haddr_t))) {
- HDfprintf(stderr, "\nWARNING: Only using first %d extra parameters\n\n",
- (int)(sizeof(extra) / sizeof(haddr_t)));
+ fprintf(stderr, "\nWARNING: Only using first %d extra parameters\n\n",
+ (int)(sizeof(extra) / sizeof(haddr_t)));
extra_count = (int)(sizeof(extra) / sizeof(haddr_t));
} /* end if */
@@ -343,46 +343,46 @@ main(int argc, char *argv[])
/*
* Read the signature at the specified file position.
*/
- HDfprintf(stdout, "Reading signature at address %" PRIuHADDR " (rel)\n", addr);
+ fprintf(stdout, "Reading signature at address %" PRIuHADDR " (rel)\n", addr);
if (H5F_block_read(f, H5FD_MEM_SUPER, addr, sizeof(sig), sig) < 0) {
- HDfprintf(stderr, "cannot read signature\n");
+ fprintf(stderr, "cannot read signature\n");
exit_value = 3;
goto done;
}
- if (!HDmemcmp(sig, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) {
+ if (!memcmp(sig, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) {
/*
* Debug the file's super block.
*/
status = H5F_debug(f, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a local heap.
*/
status = H5HL_debug(f, addr, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a global heap collection.
*/
status = H5HG_debug(f, addr, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a symbol table node.
*/
/* Check for extra parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(stderr,
- "\nWarning: Providing the group's local heap address will give more information\n");
- HDfprintf(stderr, "Symbol table node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <Symbol table node address> <address of local heap>\n\n");
+ fprintf(stderr,
+ "\nWarning: Providing the group's local heap address will give more information\n");
+ fprintf(stderr, "Symbol table node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <Symbol table node address> <address of local heap>\n\n");
} /* end if */
status = H5G_node_debug(f, addr, stdout, 0, VCOL, extra[0]);
}
- else if (!HDmemcmp(sig, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a B-tree. B-trees are debugged through the B-tree
* subclass. The subclass identifier is the byte immediately
@@ -396,12 +396,11 @@ main(int argc, char *argv[])
case H5B_SNODE_ID:
/* Check for extra parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(
+ fprintf(
stderr,
"\nWarning: Providing the group's local heap address will give more information\n");
- HDfprintf(stderr, "B-tree symbol table node usage:\n");
- HDfprintf(stderr,
- "\th5debug <filename> <B-tree node address> <address of local heap>\n\n");
+ fprintf(stderr, "B-tree symbol table node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <B-tree node address> <address of local heap>\n\n");
exit_value = 4;
goto done;
} /* end if */
@@ -412,12 +411,11 @@ main(int argc, char *argv[])
case H5B_CHUNK_ID:
/* Check for extra parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(
- stderr,
- "ERROR: Need number of dimensions of chunk in order to dump chunk B-tree node\n");
- HDfprintf(stderr, "B-tree chunked storage node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest "
- "chunk dim>...<fastest chunk dim>\n");
+ fprintf(stderr,
+ "ERROR: Need number of dimensions of chunk in order to dump chunk B-tree node\n");
+ fprintf(stderr, "B-tree chunked storage node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest "
+ "chunk dim>...<fastest chunk dim>\n");
exit_value = 4;
goto done;
} /* end if */
@@ -427,10 +425,10 @@ main(int argc, char *argv[])
/* Check for dimension error */
if (ndims > 9) {
- HDfprintf(stderr, "ERROR: Only 9 dimensions support currently (fix h5debug)\n");
- HDfprintf(stderr, "B-tree chunked storage node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest "
- "chunk dim>...<fastest chunk dim>\n");
+ fprintf(stderr, "ERROR: Only 9 dimensions support currently (fix h5debug)\n");
+ fprintf(stderr, "B-tree chunked storage node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest "
+ "chunk dim>...<fastest chunk dim>\n");
exit_value = 4;
goto done;
} /* end for */
@@ -442,10 +440,10 @@ main(int argc, char *argv[])
/* Check for dimension error */
for (u = 0; u < ndims; u++)
if (0 == dim[u]) {
- HDfprintf(stderr, "ERROR: Chunk dimensions should be >0\n");
- HDfprintf(stderr, "B-tree chunked storage node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> "
- "<slowest chunk dim>...<fastest chunk dim>\n");
+ fprintf(stderr, "ERROR: Chunk dimensions should be >0\n");
+ fprintf(stderr, "B-tree chunked storage node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> "
+ "<slowest chunk dim>...<fastest chunk dim>\n");
exit_value = 4;
goto done;
} /* end if */
@@ -458,58 +456,58 @@ main(int argc, char *argv[])
case H5B_NUM_BTREE_ID:
default:
- HDfprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype));
+ fprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype));
exit_value = 4;
goto done;
}
}
- else if (!HDmemcmp(sig, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a v2 B-tree header.
*/
const H5B2_class_t *cls = get_H5B2_class(sig);
- HDassert(cls);
+ assert(cls);
if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) && (extra_count == 0 || extra[0] == 0)) {
- HDfprintf(stderr, "ERROR: Need v2 B-tree header address and object header address containing the "
- "layout message in order to dump header\n");
- HDfprintf(stderr, "v2 B-tree hdr usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <v2 B-tree header address> <object header address>\n");
+ fprintf(stderr, "ERROR: Need v2 B-tree header address and object header address containing the "
+ "layout message in order to dump header\n");
+ fprintf(stderr, "v2 B-tree hdr usage:\n");
+ fprintf(stderr, "\th5debug <filename> <v2 B-tree header address> <object header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5B2__hdr_debug(f, addr, stdout, 0, VCOL, cls, (haddr_t)extra[0]);
}
- else if (!HDmemcmp(sig, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a v2 B-tree internal node.
*/
const H5B2_class_t *cls = get_H5B2_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) &&
(extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0 || extra[3] == 0)) {
- HDfprintf(stderr,
- "ERROR: Need v2 B-tree header address, the node's number of records, depth, and object "
- "header address containing the layout message in order to dump internal node\n");
- HDfprintf(stderr,
- "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
- HDfprintf(stderr, "v2 B-tree internal node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> "
- "<number of records> <depth> <object header address>\n");
+ fprintf(stderr,
+ "ERROR: Need v2 B-tree header address, the node's number of records, depth, and object "
+ "header address containing the layout message in order to dump internal node\n");
+ fprintf(stderr,
+ "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
+ fprintf(stderr, "v2 B-tree internal node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> "
+ "<number of records> <depth> <object header address>\n");
exit_value = 4;
goto done;
}
else if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) {
- HDfprintf(stderr, "ERROR: Need v2 B-tree header address and the node's number of records and "
- "depth in order to dump internal node\n");
- HDfprintf(stderr,
- "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
- HDfprintf(stderr, "v2 B-tree internal node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> "
- "<number of records> <depth>\n");
+ fprintf(stderr, "ERROR: Need v2 B-tree header address and the node's number of records and "
+ "depth in order to dump internal node\n");
+ fprintf(stderr,
+ "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
+ fprintf(stderr, "v2 B-tree internal node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> "
+ "<number of records> <depth>\n");
exit_value = 4;
goto done;
} /* end if */
@@ -517,31 +515,31 @@ main(int argc, char *argv[])
status = H5B2__int_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (unsigned)extra[1],
(unsigned)extra[2], (haddr_t)extra[3]);
}
- else if (!HDmemcmp(sig, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a v2 B-tree leaf node.
*/
const H5B2_class_t *cls = get_H5B2_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) &&
(extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0)) {
- HDfprintf(stderr, "ERROR: Need v2 B-tree header address, number of records, and object header "
- "address containing the layout message in order to dump leaf node\n");
- HDfprintf(stderr, "v2 B-tree leaf node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <leaf node address> <v2 B-tree header address> <number "
- "of records> <object header address>\n");
+ fprintf(stderr, "ERROR: Need v2 B-tree header address, number of records, and object header "
+ "address containing the layout message in order to dump leaf node\n");
+ fprintf(stderr, "v2 B-tree leaf node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <leaf node address> <v2 B-tree header address> <number "
+ "of records> <object header address>\n");
exit_value = 4;
goto done;
}
else if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(
+ fprintf(
stderr,
"ERROR: Need v2 B-tree header address and number of records in order to dump leaf node\n");
- HDfprintf(stderr, "v2 B-tree leaf node usage:\n");
- HDfprintf(
+ fprintf(stderr, "v2 B-tree leaf node usage:\n");
+ fprintf(
stderr,
"\th5debug <filename> <leaf node address> <v2 B-tree header address> <number of records>\n");
exit_value = 4;
@@ -551,23 +549,23 @@ main(int argc, char *argv[])
status =
H5B2__leaf_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (unsigned)extra[1], (haddr_t)extra[2]);
}
- else if (!HDmemcmp(sig, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fractal heap header.
*/
status = H5HF_hdr_debug(f, addr, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fractal heap direct block.
*/
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need fractal heap header address and size of direct block in order to "
- "dump direct block\n");
- HDfprintf(stderr, "Fractal heap direct block usage:\n");
- HDfprintf(
+ fprintf(stderr, "ERROR: Need fractal heap header address and size of direct block in order to "
+ "dump direct block\n");
+ fprintf(stderr, "Fractal heap direct block usage:\n");
+ fprintf(
stderr,
"\th5debug <filename> <direct block address> <heap header address> <size of direct block>\n");
exit_value = 4;
@@ -576,108 +574,107 @@ main(int argc, char *argv[])
status = H5HF_dblock_debug(f, addr, stdout, 0, VCOL, extra[0], (size_t)extra[1]);
}
- else if (!HDmemcmp(sig, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fractal heap indirect block.
*/
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need fractal heap header address and number of rows in order to dump "
- "indirect block\n");
- HDfprintf(stderr, "Fractal heap indirect block usage:\n");
- HDfprintf(
- stderr,
- "\th5debug <filename> <indirect block address> <heap header address> <number of rows>\n");
+ fprintf(stderr, "ERROR: Need fractal heap header address and number of rows in order to dump "
+ "indirect block\n");
+ fprintf(stderr, "Fractal heap indirect block usage:\n");
+ fprintf(stderr,
+ "\th5debug <filename> <indirect block address> <heap header address> <number of rows>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5HF_iblock_debug(f, addr, stdout, 0, VCOL, extra[0], (unsigned)extra[1]);
}
- else if (!HDmemcmp(sig, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a free space header.
*/
status = H5FS_debug(f, addr, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug free space serialized sections.
*/
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need free space header address and client address in order to dump "
- "serialized sections\n");
- HDfprintf(stderr, "Free space serialized sections usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <serialized sections address> <free space header "
- "address> <client address>\n");
+ fprintf(stderr, "ERROR: Need free space header address and client address in order to dump "
+ "serialized sections\n");
+ fprintf(stderr, "Free space serialized sections usage:\n");
+ fprintf(stderr, "\th5debug <filename> <serialized sections address> <free space header "
+ "address> <client address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5FS_sects_debug(f, addr, stdout, 0, VCOL, extra[0], extra[1]);
}
- else if (!HDmemcmp(sig, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug shared message master table.
*/
status = H5SM_table_debug(f, addr, stdout, 0, VCOL, UINT_MAX, UINT_MAX);
}
- else if (!HDmemcmp(sig, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug shared message list index.
*/
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(stderr, "ERROR: Need shared message header address in order to shared message list\n");
- HDfprintf(stderr, "Shared message list usage:\n");
- HDfprintf(stderr,
- "\th5debug <filename> <shared message list address> <shared message header address>\n");
+ fprintf(stderr, "ERROR: Need shared message header address in order to shared message list\n");
+ fprintf(stderr, "Shared message list usage:\n");
+ fprintf(stderr,
+ "\th5debug <filename> <shared message list address> <shared message header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5SM_list_debug(f, addr, stdout, 0, VCOL, (haddr_t)extra[0]);
}
- else if (!HDmemcmp(sig, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug an extensible array header.
*/
const H5EA_class_t *cls = get_H5EA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(
+ fprintf(
stderr,
"ERROR: Need object header address containing the layout message in order to dump header\n");
- HDfprintf(stderr, "Extensible array header block usage:\n");
- HDfprintf(stderr,
- "\th5debug <filename> <Extensible Array header address> <object header address>\n");
+ fprintf(stderr, "Extensible array header block usage:\n");
+ fprintf(stderr,
+ "\th5debug <filename> <Extensible Array header address> <object header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5EA__hdr_debug(f, addr, stdout, 0, VCOL, cls, extra[0]);
}
- else if (!HDmemcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug an extensible array index block.
*/
const H5EA_class_t *cls = get_H5EA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need extensible array header address and object header address "
- "containing the layout message in order to dump index block\n");
- HDfprintf(stderr, "Extensible array index block usage:\n");
- HDfprintf(
+ fprintf(stderr, "ERROR: Need extensible array header address and object header address "
+ "containing the layout message in order to dump index block\n");
+ fprintf(stderr, "Extensible array index block usage:\n");
+ fprintf(
stderr,
"\th5debug <filename> <index block address> <array header address> <object header address\n");
exit_value = 4;
@@ -686,80 +683,80 @@ main(int argc, char *argv[])
status = H5EA__iblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], extra[1]);
}
- else if (!HDmemcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug an extensible array super block.
*/
const H5EA_class_t *cls = get_H5EA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) {
- HDfprintf(stderr, "ERROR: Need extensible array header address, super block index and object "
- "header address containing the layout message in order to dump super block\n");
- HDfprintf(stderr, "Extensible array super block usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super "
- "block index> <object header address>\n");
+ fprintf(stderr, "ERROR: Need extensible array header address, super block index and object "
+ "header address containing the layout message in order to dump super block\n");
+ fprintf(stderr, "Extensible array super block usage:\n");
+ fprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super "
+ "block index> <object header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5EA__sblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (unsigned)extra[1], extra[2]);
}
- else if (!HDmemcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug an extensible array data block.
*/
const H5EA_class_t *cls = get_H5EA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) {
- HDfprintf(stderr,
- "ERROR: Need extensible array header address, # of elements in data block and object "
- "header address containing the layout message in order to dump data block\n");
- HDfprintf(stderr, "Extensible array data block usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of "
- "elements in data block> <object header address\n");
+ fprintf(stderr,
+ "ERROR: Need extensible array header address, # of elements in data block and object "
+ "header address containing the layout message in order to dump data block\n");
+ fprintf(stderr, "Extensible array data block usage:\n");
+ fprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of "
+ "elements in data block> <object header address\n");
exit_value = 4;
goto done;
} /* end if */
status = H5EA__dblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (size_t)extra[1], extra[2]);
}
- else if (!HDmemcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fixed array header.
*/
const H5FA_class_t *cls = get_H5FA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(
+ fprintf(
stderr,
"ERROR: Need object header address containing the layout message in order to dump header\n");
- HDfprintf(stderr, "Fixed array header block usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n");
+ fprintf(stderr, "Fixed array header block usage:\n");
+ fprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5FA__hdr_debug(f, addr, stdout, 0, VCOL, cls, extra[0]);
}
- else if (!HDmemcmp(sig, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fixed array data block.
*/
const H5FA_class_t *cls = get_H5FA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need fixed array header address and object header address containing "
- "the layout message in order to dump data block\n");
- HDfprintf(stderr, "fixed array data block usage:\n");
- HDfprintf(
+ fprintf(stderr, "ERROR: Need fixed array header address and object header address containing "
+ "the layout message in order to dump data block\n");
+ fprintf(stderr, "fixed array data block usage:\n");
+ fprintf(
stderr,
"\th5debug <filename> <data block address> <array header address> <object header address>\n");
exit_value = 4;
@@ -768,7 +765,7 @@ main(int argc, char *argv[])
status = H5FA__dblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], extra[1]);
}
- else if (!HDmemcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug v2 object header (which have signatures).
*/
@@ -786,7 +783,7 @@ main(int argc, char *argv[])
/*
* Got some other unrecognized signature.
*/
- HDprintf("%-*s ", VCOL, "Signature:");
+ printf("%-*s ", VCOL, "Signature:");
for (u = 0; u < sizeof(sig); u++) {
if (sig[u] > ' ' && sig[u] <= '~' && '\\' != sig[u])
HDputchar(sig[u]);
@@ -795,18 +792,18 @@ main(int argc, char *argv[])
HDputchar('\\');
}
else
- HDprintf("\\%03o", sig[u]);
+ printf("\\%03o", sig[u]);
}
HDputchar('\n');
- HDfprintf(stderr, "unknown signature\n");
+ fprintf(stderr, "unknown signature\n");
exit_value = 4;
goto done;
} /* end else */
/* Check for an error when dumping information */
if (status < 0) {
- HDfprintf(stderr, "An error occurred!\n");
+ fprintf(stderr, "An error occurred!\n");
H5Eprint2(H5E_DEFAULT, stderr);
exit_value = 5;
goto done;
@@ -817,7 +814,7 @@ done:
H5Pclose(fapl);
if (fid > 0) {
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Error in closing file!\n");
+ fprintf(stderr, "Error in closing file!\n");
exit_value = 1;
}
}
diff --git a/tools/src/misc/h5delete.c b/tools/src/misc/h5delete.c
index ef5b25f..3684365 100644
--- a/tools/src/misc/h5delete.c
+++ b/tools/src/misc/h5delete.c
@@ -25,7 +25,7 @@ static void usage(void);
static void
usage(void)
{
- HDfprintf(stderr, "usage: h5delete [-f] <filename>\n");
+ fprintf(stderr, "usage: h5delete [-f] <filename>\n");
}
int
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
H5E_END_TRY;
if (ret < 0 && !quiet)
- HDfprintf(stderr, "Unable to delete storage at: %s\n", name);
+ fprintf(stderr, "Unable to delete storage at: %s\n", name);
return ret < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index fc7d5b6..36e6c15 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -58,18 +58,18 @@ leave(int ret)
size_t curr_group;
if (params_g.fname)
- HDfree(params_g.fname);
+ free(params_g.fname);
if (params_g.ngroups) {
for (curr_group = 0; curr_group < params_g.ngroups; curr_group++)
- HDfree(params_g.groups[curr_group]);
- HDfree(params_g.groups);
+ free(params_g.groups[curr_group]);
+ free(params_g.groups);
}
if (H5I_INVALID_HID != params_g.fapl_id && H5P_DEFAULT != params_g.fapl_id)
if (H5Pclose(params_g.fapl_id) < 0)
error_msg("Could not close file access property list\n");
h5tools_close();
- HDexit(ret);
+ exit(ret);
} /* end leave() */
/*-------------------------------------------------------------------------
@@ -147,8 +147,8 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
}
/* Initialize fapl info structs */
- HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t));
- HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t));
+ memset(&vol_info, 0, sizeof(h5tools_vol_info_t));
+ memset(&vfd_info, 0, sizeof(h5tools_vfd_info_t));
/* Parse command line options */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
@@ -182,7 +182,7 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
case '1':
vol_info.type = VOL_BY_VALUE;
- vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg);
+ vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
custom_vol = TRUE;
break;
@@ -198,7 +198,7 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
case '4':
vfd_info.type = VFD_BY_VALUE;
- vfd_info.u.value = (H5FD_class_value_t)HDatoi(H5_optarg);
+ vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
custom_vfd = TRUE;
break;
@@ -239,7 +239,7 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
/* Allocate space for the group name pointers */
options->ngroups = (size_t)(argc - H5_optind);
- options->groups = (char **)HDmalloc(options->ngroups * sizeof(char *));
+ options->groups = (char **)malloc(options->ngroups * sizeof(char *));
/* Retrieve the group names */
curr_group = 0;
@@ -293,7 +293,7 @@ main(int argc, char *argv[])
h5tools_init();
/* Initialize the parameters */
- HDmemset(&params_g, 0, sizeof(params_g));
+ memset(&params_g, 0, sizeof(params_g));
/* Create file access property list */
if ((params_g.fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
@@ -320,7 +320,7 @@ main(int argc, char *argv[])
/* Display some output if requested */
if (params_g.verbose)
- HDprintf("%s: Creating groups with latest version of the format\n", h5tools_getprogname());
+ printf("%s: Creating groups with latest version of the format\n", h5tools_getprogname());
}
/* Attempt to open an existing HDF5 file first */
@@ -354,7 +354,7 @@ main(int argc, char *argv[])
/* Display some output if requested */
if (params_g.verbose)
- HDprintf("%s: Creating parent groups\n", h5tools_getprogname());
+ printf("%s: Creating parent groups\n", h5tools_getprogname());
}
/* Loop over creating requested groups */
@@ -375,7 +375,7 @@ main(int argc, char *argv[])
/* Display some output if requested */
if (params_g.verbose)
- HDprintf("%s: created group '%s'\n", h5tools_getprogname(), params_g.groups[curr_group]);
+ printf("%s: created group '%s'\n", h5tools_getprogname(), params_g.groups[curr_group]);
} /* end for */
/* Close link creation property list */
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index c01ec0f..004241d 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -50,22 +50,22 @@
static void
usage(const char *progname)
{
- HDfprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2|-family_to_single] SRC DST\n",
- progname);
- HDfprintf(stderr, " -v Produce verbose output\n");
- HDfprintf(stderr, " -V Print a version number and exit\n");
- HDfprintf(stderr, " -b N The I/O block size, defaults to 1kB\n");
- HDfprintf(stderr, " -m N The destination member size or 1GB\n");
- HDfprintf(stderr, " -family_to_sec2 Deprecated version of -family_to_single (below)\n");
- HDfprintf(stderr, " -family_to_single Change file driver from family to the default single-file VFD "
- "(windows or sec2)\n");
- HDfprintf(stderr, " SRC The name of the source file\n");
- HDfprintf(stderr, " DST The name of the destination files\n");
- HDfprintf(stderr, "Sizes may be suffixed with 'g' for GB, 'm' for MB or "
- "'k' for kB.\n");
- HDfprintf(stderr, "File family names include an integer printf "
- "format such as '%%d'\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2|-family_to_single] SRC DST\n",
+ progname);
+ fprintf(stderr, " -v Produce verbose output\n");
+ fprintf(stderr, " -V Print a version number and exit\n");
+ fprintf(stderr, " -b N The I/O block size, defaults to 1kB\n");
+ fprintf(stderr, " -m N The destination member size or 1GB\n");
+ fprintf(stderr, " -family_to_sec2 Deprecated version of -family_to_single (below)\n");
+ fprintf(stderr, " -family_to_single Change file driver from family to the default single-file VFD "
+ "(windows or sec2)\n");
+ fprintf(stderr, " SRC The name of the source file\n");
+ fprintf(stderr, " DST The name of the destination files\n");
+ fprintf(stderr, "Sizes may be suffixed with 'g' for GB, 'm' for MB or "
+ "'k' for kB.\n");
+ fprintf(stderr, "File family names include an integer printf "
+ "format such as '%%d'\n");
+ exit(EXIT_FAILURE);
}
/*-------------------------------------------------------------------------
@@ -202,9 +202,9 @@ main(int argc, char *argv[])
argno++;
}
else if (!HDstrcmp(argv[argno], "-V")) {
- HDprintf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR,
- H5_VERS_RELEASE);
- HDexit(EXIT_SUCCESS);
+ printf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR,
+ H5_VERS_RELEASE);
+ exit(EXIT_SUCCESS);
}
else if (!HDstrcmp(argv[argno], "-family_to_sec2")) {
family_to_single = TRUE;
@@ -226,10 +226,10 @@ main(int argc, char *argv[])
} /* end while */
/* allocate names */
- if (NULL == (src_name = (char *)HDcalloc((size_t)NAMELEN, sizeof(char))))
- HDexit(EXIT_FAILURE);
- if (NULL == (dst_name = (char *)HDcalloc((size_t)NAMELEN, sizeof(char))))
- HDexit(EXIT_FAILURE);
+ if (NULL == (src_name = (char *)calloc((size_t)NAMELEN, sizeof(char))))
+ exit(EXIT_FAILURE);
+ if (NULL == (dst_name = (char *)calloc((size_t)NAMELEN, sizeof(char))))
+ exit(EXIT_FAILURE);
/*
* Get the name for the source file and open the first member. The size
@@ -243,16 +243,16 @@ main(int argc, char *argv[])
if ((src = HDopen(src_name, O_RDONLY)) < 0) {
HDperror(src_name);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
HDperror("fstat");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
src_size = src_act_size = sb.st_size;
if (verbose)
- HDfprintf(stderr, "< %s\n", src_name);
+ fprintf(stderr, "< %s\n", src_name);
/*
* Get the name for the destination file and open the first member.
@@ -265,17 +265,17 @@ main(int argc, char *argv[])
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
HDperror(dst_name);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (verbose)
- HDfprintf(stderr, "> %s\n", dst_name);
+ fprintf(stderr, "> %s\n", dst_name);
/* No more arguments */
if (argno < argc)
usage(prog_name);
/* Now the real work, split the file */
- buf = (char *)HDmalloc(blk_size);
+ buf = (char *)malloc(blk_size);
while (src_offset < src_size) {
/* Read a block. The amount to read is the minimum of:
@@ -295,11 +295,11 @@ main(int argc, char *argv[])
n = (size_t)MIN((off_t)n, src_act_size - src_offset);
if ((nio = HDread(src, buf, n)) < 0) {
HDperror("read");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
- HDfprintf(stderr, "%s: short read\n", src_name);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "%s: short read\n", src_name);
+ exit(EXIT_FAILURE);
}
for (i = 0; i < n; i++) {
if (buf[i])
@@ -321,15 +321,15 @@ main(int argc, char *argv[])
if (need_write) {
if (need_seek && HDlseek(dst, dst_offset, SEEK_SET) < 0) {
HDperror("HDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if ((nio = HDwrite(dst, buf, n)) < 0) {
HDperror("write");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
- HDfprintf(stderr, "%s: short write\n", dst_name);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "%s: short write\n", dst_name);
+ exit(EXIT_FAILURE);
}
need_seek = FALSE;
}
@@ -359,19 +359,19 @@ main(int argc, char *argv[])
}
else if (src < 0) {
HDperror(src_name);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
HDperror("fstat");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
src_act_size = sb.st_size;
if (src_act_size > src_size) {
- HDfprintf(stderr, "%s: member truncated to %lu bytes\n", src_name, (unsigned long)src_size);
+ fprintf(stderr, "%s: member truncated to %lu bytes\n", src_name, (unsigned long)src_size);
}
src_offset = 0;
if (verbose)
- HDfprintf(stderr, "< %s\n", src_name);
+ fprintf(stderr, "< %s\n", src_name);
}
/*
@@ -384,31 +384,31 @@ main(int argc, char *argv[])
if (0 == dst_membno) {
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
HDperror("HDHDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
HDperror("read");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
HDperror("HDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
HDperror("write");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
HDclose(dst);
HDsnprintf(dst_name, NAMELEN, dst_gen_name, ++dst_membno);
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
HDperror(dst_name);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
dst_offset = 0;
need_seek = FALSE;
if (verbose)
- HDfprintf(stderr, "> %s\n", dst_name);
+ fprintf(stderr, "> %s\n", dst_name);
}
}
@@ -420,19 +420,19 @@ main(int argc, char *argv[])
if (need_seek) {
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
HDperror("HDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
HDperror("read");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
HDperror("HDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
HDperror("write");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
HDclose(dst);
@@ -441,7 +441,7 @@ main(int argc, char *argv[])
* These private properties are for this tool only. */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
HDperror("H5Pcreate");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (family_to_single) {
@@ -451,7 +451,7 @@ main(int argc, char *argv[])
*/
if (H5Pset(fapl, H5F_ACS_FAMILY_TO_SINGLE_NAME, &family_to_single) < 0) {
HDperror("H5Pset");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else {
@@ -460,14 +460,14 @@ main(int argc, char *argv[])
* This private property is for this tool only. */
if (H5Pset_fapl_family(fapl, H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0) {
HDperror("H5Pset_fapl_family");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Set the property of the new member size as hsize_t */
hdsize = (hsize_t)dst_size;
if (H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) {
HDperror("H5Pset");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
@@ -488,19 +488,19 @@ main(int argc, char *argv[])
if (file >= 0) {
if (H5Fclose(file) < 0) {
HDperror("H5Fclose");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
} /* end if */
if (H5Pclose(fapl) < 0) {
HDperror("H5Pclose");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
/* Free resources and return */
- HDfree(src_name);
- HDfree(dst_name);
- HDfree(buf);
+ free(src_name);
+ free(dst_name);
+ free(buf);
return EXIT_SUCCESS;
} /* end main */
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index 93289ad..899eaa7 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -238,10 +238,10 @@ gent_named_vl(hid_t loc_id)
/* allocate and initialize VL dataset to write */
buf[0].len = 1;
- buf[0].p = HDmalloc(1 * sizeof(int));
+ buf[0].p = malloc(1 * sizeof(int));
((int *)buf[0].p)[0] = 1;
buf[1].len = 2;
- buf[1].p = HDmalloc(2 * sizeof(int));
+ buf[1].p = malloc(2 * sizeof(int));
((int *)buf[1].p)[0] = 2;
((int *)buf[1].p)[1] = 3;
@@ -284,16 +284,16 @@ gent_nested_vl(hid_t loc_id)
/* allocate and initialize VL dataset to write */
buf[0].len = 1;
- buf[0].p = HDmalloc(1 * sizeof(hvl_t));
+ buf[0].p = malloc(1 * sizeof(hvl_t));
tvl = (hvl_t *)buf[0].p;
- tvl->p = HDmalloc(1 * sizeof(int));
+ tvl->p = malloc(1 * sizeof(int));
tvl->len = 1;
((int *)tvl->p)[0] = 1;
buf[1].len = 1;
- buf[1].p = HDmalloc(1 * sizeof(hvl_t));
+ buf[1].p = malloc(1 * sizeof(hvl_t));
tvl = (hvl_t *)buf[1].p;
- tvl->p = HDmalloc(2 * sizeof(int));
+ tvl->p = malloc(2 * sizeof(int));
tvl->len = 2;
((int *)tvl->p)[0] = 2;
((int *)tvl->p)[1] = 3;
@@ -512,21 +512,21 @@ gen_obj_ref(hid_t loc_id)
* add dataset */
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
oid = H5Dcreate2(loc_id, OBJ_REF_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -538,7 +538,7 @@ gen_obj_ref(hid_t loc_id)
* add group */
oid = H5Gcreate2(loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -546,34 +546,34 @@ gen_obj_ref(hid_t loc_id)
status = H5Rcreate(&or_data[0], loc_id, OBJ_REF_DS, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate(&or_data[1], loc_id, OBJ_REF_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
sid = H5Screate_simple(1, dims2, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
oid = H5Dcreate2(loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, or_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -612,7 +612,7 @@ gen_region_ref(hid_t loc_id)
sid = H5Screate_simple(2, dims2, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -620,7 +620,7 @@ gen_region_ref(hid_t loc_id)
/* create normal dataset which is referred */
oid2 = H5Dcreate2(loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid2 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -628,7 +628,7 @@ gen_region_ref(hid_t loc_id)
/* write values to dataset */
status = H5Dwrite(oid2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -636,7 +636,7 @@ gen_region_ref(hid_t loc_id)
/* select elements space for reference */
status = H5Sselect_elements(sid, H5S_SELECT_SET, 4, coords[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -644,7 +644,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference from elements space */
status = H5Rcreate(&rr_data[0], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -652,7 +652,7 @@ gen_region_ref(hid_t loc_id)
/* select hyperslab space for reference */
status = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -660,7 +660,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference from hyperslab space */
status = H5Rcreate(&rr_data[1], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -670,7 +670,7 @@ gen_region_ref(hid_t loc_id)
/* Create dataspace. */
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -678,7 +678,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference dataset */
oid1 = H5Dcreate2(loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid1 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -686,7 +686,7 @@ gen_region_ref(hid_t loc_id)
/* write data as region references */
status = H5Dwrite(oid1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -716,11 +716,11 @@ Test_Obj_Copy(void)
unsigned new_format; /* New format or old format */
if ((fapl_new = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- HDfprintf(stderr, "Error: H5Pcreate failed.\n");
+ fprintf(stderr, "Error: H5Pcreate failed.\n");
goto out;
}
if (H5Pset_libver_bounds(fapl_new, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- HDfprintf(stderr, "Error: H5Pset_libver_bounds failed.\n");
+ fprintf(stderr, "Error: H5Pset_libver_bounds failed.\n");
goto out;
}
@@ -734,7 +734,7 @@ Test_Obj_Copy(void)
else
fid = H5Fcreate(HDF_FILE1_NEW, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0) {
- HDfprintf(stderr, "Error: H5Fcreate failed.\n");
+ fprintf(stderr, "Error: H5Fcreate failed.\n");
goto out;
}
@@ -772,19 +772,19 @@ Test_Ref_Copy(void)
fid = H5Fcreate(HDF_FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE2);
goto out;
}
/* add object reference */
status = gen_obj_ref(fid);
if (status < 0)
- HDfprintf(stderr, "Failed to generate object reference.\n");
+ fprintf(stderr, "Failed to generate object reference.\n");
/* add region reference */
status = gen_region_ref(fid);
if (status < 0)
- HDfprintf(stderr, "Failed to generate region reference.\n");
+ fprintf(stderr, "Failed to generate region reference.\n");
out:
/*-----------------------------------------------------------------------
@@ -815,7 +815,7 @@ gen_extlink_trg(hid_t loc_id)
* target file */
gid = H5Gcreate2(loc_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -830,7 +830,7 @@ gen_extlink_trg(hid_t loc_id)
tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(loc_id, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -863,7 +863,7 @@ gen_extlink_src(hid_t loc_id)
*------------------------------------------------------------------------*/
gid = H5Gcreate2(loc_id, "/group_ext", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -874,7 +874,7 @@ gen_extlink_src(hid_t loc_id)
/* link to dataset */
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/simple", gid, "extlink_dset", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -882,7 +882,7 @@ gen_extlink_src(hid_t loc_id)
/* link to group */
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/group", gid, "extlink_grp", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -891,7 +891,7 @@ gen_extlink_src(hid_t loc_id)
status =
H5Lcreate_external(HDF_EXT_TRG_FILE, "/datatype", gid, "extlink_datatype", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -899,7 +899,7 @@ gen_extlink_src(hid_t loc_id)
/* dangling link - no obj*/
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "notyet", gid, "extlink_notyet1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -907,7 +907,7 @@ gen_extlink_src(hid_t loc_id)
/* dangling link - no file */
status = H5Lcreate_external("notyet_file.h5", "notyet", gid, "extlink_notyet2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -934,25 +934,25 @@ Test_Extlink_Copy(void)
fid1 = H5Fcreate(HDF_EXT_SRC_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_SRC_FILE);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_SRC_FILE);
goto out;
}
fid2 = H5Fcreate(HDF_EXT_TRG_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_TRG_FILE);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_TRG_FILE);
goto out;
}
/* add links to source external link file */
status = gen_extlink_src(fid1);
if (status < 0)
- HDfprintf(stderr, "Error: %s> gen_extlink_src failed.\n", HDF_EXT_SRC_FILE);
+ fprintf(stderr, "Error: %s> gen_extlink_src failed.\n", HDF_EXT_SRC_FILE);
/* add objs to target external link file */
status = gen_extlink_trg(fid2);
if (status < 0)
- HDfprintf(stderr, "Error: %s> gen_extlink_trg failed.\n", HDF_EXT_TRG_FILE);
+ fprintf(stderr, "Error: %s> gen_extlink_trg failed.\n", HDF_EXT_TRG_FILE);
out:
/*-----------------------------------------------------------------------
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index c59d3b5..5749d29 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -120,7 +120,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
#define ONE_DIM_SIZE 16
/* Error macros */
-#define AT() HDprintf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
+#define AT() printf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
#define PROGRAM_ERROR \
do { \
AT(); \
@@ -334,17 +334,17 @@ onion_filepaths_init(const char *basename)
{
struct onion_filepaths *paths = NULL;
- if (NULL == (paths = HDcalloc(1, sizeof(struct onion_filepaths))))
+ if (NULL == (paths = calloc(1, sizeof(struct onion_filepaths))))
goto error;
if (NULL == (paths->canon = HDstrdup(basename)))
goto error;
- if (NULL == (paths->onion = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
+ if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
goto error;
HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
- if (NULL == (paths->recovery = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
+ 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);
@@ -352,10 +352,10 @@ onion_filepaths_init(const char *basename)
error:
if (paths != NULL) {
- HDfree(paths->canon);
- HDfree(paths->onion);
- HDfree(paths->recovery);
- HDfree(paths);
+ free(paths->canon);
+ free(paths->onion);
+ free(paths->recovery);
+ free(paths);
}
return NULL;
}
@@ -364,10 +364,10 @@ static void
onion_filepaths_destroy(struct onion_filepaths *s)
{
if (s) {
- HDfree(s->canon);
- HDfree(s->onion);
- HDfree(s->recovery);
- HDfree(s);
+ free(s->canon);
+ free(s->onion);
+ free(s->recovery);
+ free(s);
}
}
@@ -1000,11 +1000,11 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
/* create the empty file */
if ((fid1 = H5Fcreate(fname3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "empty file (%s) creation failed.\n", fname3);
+ fprintf(stderr, "empty file (%s) creation failed.\n", fname3);
goto out;
}
if (H5Fclose(fid1) < 0) {
- HDfprintf(stderr, "empty file (%s) close failed.\n", fname3);
+ fprintf(stderr, "empty file (%s) close failed.\n", fname3);
goto out;
}
@@ -1734,7 +1734,7 @@ test_attributes_verbose_level(const char *fname1, const char *fname2)
* Create file1
*-----------------------------------------------------------------------*/
if ((fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1744,28 +1744,28 @@ test_attributes_verbose_level(const char *fname1, const char *fname2)
*/
f1_gid = H5Gcreate2(fid1, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
f1_gid2 = H5Gcreate2(fid1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
f1_gid3 = H5Gcreate2(fid1, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid3 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
f1_gid4 = H5Gcreate2(fid1, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid4 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1776,13 +1776,13 @@ test_attributes_verbose_level(const char *fname1, const char *fname2)
f1_sid = H5Screate_simple(1, dset_dims, NULL);
f1_did = H5Dcreate2(fid1, "dset", H5T_NATIVE_INT, f1_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_did == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = H5Dwrite(f1_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1793,7 +1793,7 @@ test_attributes_verbose_level(const char *fname1, const char *fname2)
f1_tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(fid1, "ntype", f1_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1802,7 +1802,7 @@ test_attributes_verbose_level(const char *fname1, const char *fname2)
* Create file2
*-----------------------------------------------------------------------*/
if ((fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1812,28 +1812,28 @@ test_attributes_verbose_level(const char *fname1, const char *fname2)
*/
f2_gid = H5Gcreate2(fid2, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
f2_gid2 = H5Gcreate2(fid2, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
f2_gid3 = H5Gcreate2(fid2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid3 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
f2_gid4 = H5Gcreate2(fid2, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid4 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1844,13 +1844,13 @@ test_attributes_verbose_level(const char *fname1, const char *fname2)
f2_sid = H5Screate_simple(1, dset_dims, NULL);
f2_did = H5Dcreate2(fid2, "dset", H5T_NATIVE_INT, f2_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_did == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = H5Dwrite(f2_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1861,7 +1861,7 @@ test_attributes_verbose_level(const char *fname1, const char *fname2)
f2_tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(fid2, "ntype", f2_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2093,7 +2093,7 @@ test_link_name(const char *fname1)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2103,14 +2103,14 @@ test_link_name(const char *fname1)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid1, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid1, "group_longname", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2120,14 +2120,14 @@ test_link_name(const char *fname1)
*------------------------------------------------------------------------*/
status = H5Lcreate_soft("group", fid1, "link_g1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("group_longname", fid1, "link_g2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2168,7 +2168,7 @@ test_soft_links(const char *fname1)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2178,7 +2178,7 @@ test_soft_links(const char *fname1)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2189,21 +2189,21 @@ test_soft_links(const char *fname1)
/* file1 */
status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -2214,42 +2214,42 @@ test_soft_links(const char *fname1)
/* file 1 */
status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_dset2", fid1, "softlink_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_group", fid1, "softlink_group1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_group", fid1, "softlink_group2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/no_obj", fid1, "softlink_noexist", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2290,7 +2290,7 @@ test_linked_softlinks(const char *fname1)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2300,21 +2300,21 @@ test_linked_softlinks(const char *fname1)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid1, "target_group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid3 = H5Gcreate2(fid1, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2325,20 +2325,20 @@ test_linked_softlinks(const char *fname1)
/* file1 */
status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -2350,84 +2350,84 @@ test_linked_softlinks(const char *fname1)
* file 1 */
status = H5Lcreate_soft("/target_dset1", fid1, "softlink1_to_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink1_to_dset1", fid1, "softlink1_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink1_to_slink1", fid1, "softlink1_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_dset2", fid1, "softlink2_to_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink2_to_dset2", fid1, "softlink2_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink2_to_slink1", fid1, "softlink2_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("target_group1", fid1, "softlink3_to_group1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink3_to_group1", fid1, "softlink3_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink3_to_slink1", fid1, "softlink3_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("target_group2", fid1, "softlink4_to_group2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink4_to_group2", fid1, "softlink4_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink4_to_slink1", fid1, "softlink4_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2473,7 +2473,7 @@ test_external_links(const char *fname1, const char *fname2)
/* source file */
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2481,7 +2481,7 @@ test_external_links(const char *fname1, const char *fname2)
/* target file */
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2493,14 +2493,14 @@ test_external_links(const char *fname1, const char *fname2)
* target file */
gid1 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid2, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2511,21 +2511,21 @@ test_external_links(const char *fname1, const char *fname2)
* target file */
status = write_dset(fid2, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "x_dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "x_dset", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -2538,7 +2538,7 @@ test_external_links(const char *fname1, const char *fname2)
status =
H5Lcreate_external(fname2, "/target_group/x_dset", fid1, "ext_link_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2546,35 +2546,35 @@ test_external_links(const char *fname1, const char *fname2)
status =
H5Lcreate_external(fname2, "/target_group2/x_dset", fid1, "ext_link_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/target_group", fid1, "/ext_link_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/target_group2", fid1, "/ext_link_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link_noexist1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link_noexist2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2620,7 +2620,7 @@ test_ext2soft_links(const char *fname1, const char *fname2)
/* source file */
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2628,7 +2628,7 @@ test_ext2soft_links(const char *fname1, const char *fname2)
/* target file */
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2639,7 +2639,7 @@ test_ext2soft_links(const char *fname1, const char *fname2)
/* target file */
gid2 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2651,14 +2651,14 @@ test_ext2soft_links(const char *fname1, const char *fname2)
* target file */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -2670,14 +2670,14 @@ test_ext2soft_links(const char *fname1, const char *fname2)
* target file */
status = H5Lcreate_soft("/dset1", fid2, "softlink_to_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/dset2", fid2, "softlink_to_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2689,7 +2689,7 @@ test_ext2soft_links(const char *fname1, const char *fname2)
* source file */
status = H5Lcreate_external(fname2, "/target_group", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2697,7 +2697,7 @@ test_ext2soft_links(const char *fname1, const char *fname2)
status = H5Lcreate_external(fname2, "/softlink_to_dset1", fid1, "ext_link_to_slink1", H5P_DEFAULT,
H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2705,7 +2705,7 @@ test_ext2soft_links(const char *fname1, const char *fname2)
status = H5Lcreate_external(fname2, "/softlink_to_dset2", fid1, "ext_link_to_slink2", H5P_DEFAULT,
H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2838,14 +2838,14 @@ test_dangle_links(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2856,14 +2856,14 @@ test_dangle_links(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -2871,14 +2871,14 @@ test_dangle_links(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -2889,28 +2889,28 @@ test_dangle_links(const char *fname1, const char *fname2)
/* file 1 */
status = H5Lcreate_soft("no_obj", fid1, "soft_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/dset1", fid1, "soft_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj", fid1, "soft_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj1", fid1, "soft_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2918,28 +2918,28 @@ test_dangle_links(const char *fname1, const char *fname2)
/* file 2 */
status = H5Lcreate_soft("no_obj", fid2, "soft_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj", fid2, "soft_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/dset2", fid2, "soft_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj2", fid2, "soft_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2950,28 +2950,28 @@ test_dangle_links(const char *fname1, const char *fname2)
/* file1 */
status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/dset1", fid1, "ext_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2979,28 +2979,28 @@ test_dangle_links(const char *fname1, const char *fname2)
/* file2 */
status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "/dset2", fid2, "ext_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external("no_file.h5", "no_obj", fid2, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3044,14 +3044,14 @@ test_group_recurse(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3062,28 +3062,28 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
gid1_f1 = H5Gcreate2(fid1, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1_f1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid2_f1 = H5Gcreate2(fid1, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2_f1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid3_f1 = H5Gcreate2(fid1, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3_f1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid10_f1 = H5Gcreate2(fid1, "/grp10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid10_f1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3091,28 +3091,28 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
gid1_f2 = H5Gcreate2(fid2, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1_f2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid2_f2 = H5Gcreate2(fid2, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2_f2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid3_f2 = H5Gcreate2(fid2, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3_f2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid11_f2 = H5Gcreate2(fid2, "/grp11", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid11_f2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3123,21 +3123,21 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3145,21 +3145,21 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -3170,54 +3170,54 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(gid1_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid2_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid2_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid3_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid3_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid3_f1, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid10_f1, 2, dims2, "dset4", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid10_f1, 2, dims2, "dset5", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3225,54 +3225,54 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(gid1_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3_f2, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid11_f2, 2, dims2, "dset4", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid11_f2, 2, dims2, "dset5", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -3283,28 +3283,28 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file 1 */
status = H5Lcreate_soft("/grp1", fid1, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2", fid1, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2/grp3", fid1, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp10", fid1, "slink_grp10", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3312,28 +3312,28 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file 2 */
status = H5Lcreate_soft("/grp1", fid2, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2", fid2, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2/grp3", fid2, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp11", fid2, "slink_grp11", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3344,21 +3344,21 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = H5Lcreate_external(fname2, "/grp1", fid1, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/grp1/grp2", fid1, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/grp1/grp2/grp3", fid1, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3366,21 +3366,21 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
status = H5Lcreate_external(fname1, "/grp1", fid2, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "/grp1/grp2", fid2, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "/grp1/grp2/grp3", fid2, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3392,14 +3392,14 @@ test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = H5Lcreate_external(fname2, "/grp11", gid10_f1, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
/* file2 */
status = H5Lcreate_external(fname1, "/grp10", gid11_f2, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3474,28 +3474,28 @@ test_group_recurse2(void)
*------------------------------------------------------------------------*/
grp1 = H5Gcreate2(fileid1, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
grp2 = H5Gcreate2(grp1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp3 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
grp4 = H5Gcreate2(grp3, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp4 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
@@ -3570,7 +3570,7 @@ test_group_recurse2(void)
/* link to dset1 */
status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE1_EXT);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
@@ -3594,7 +3594,7 @@ test_group_recurse2(void)
*/
grp4 = H5Gcreate2(fileid4, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp4 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT3);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT3);
status = FAIL;
goto out;
}
@@ -3628,14 +3628,14 @@ test_group_recurse2(void)
*/
grp2 = H5Gcreate2(fileid3, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
status = FAIL;
goto out;
}
grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp3 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
status = FAIL;
goto out;
}
@@ -3659,7 +3659,7 @@ test_group_recurse2(void)
*/
status = H5Lcreate_external(GRP_RECURSE2_EXT3, "/g4", fileid3, "/g2/g3/g4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT2);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT2);
status = FAIL;
goto out;
}
@@ -3680,7 +3680,7 @@ test_group_recurse2(void)
*/
grp1 = H5Gcreate2(fileid2, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
@@ -3704,7 +3704,7 @@ test_group_recurse2(void)
/* link to dset1 */
status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid2, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE2_EXT1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE2_EXT1);
status = FAIL;
goto out;
}
@@ -3714,7 +3714,7 @@ test_group_recurse2(void)
*/
status = H5Lcreate_external(GRP_RECURSE2_EXT2, "/g2", fileid2, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT1);
+ fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT1);
status = FAIL;
goto out;
}
@@ -3768,14 +3768,14 @@ test_exclude_obj1(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3786,7 +3786,7 @@ test_exclude_obj1(const char *fname1, const char *fname2)
/* file1 */
gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3795,7 +3795,7 @@ test_exclude_obj1(const char *fname1, const char *fname2)
gid2 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3806,21 +3806,21 @@ test_exclude_obj1(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset3", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3828,21 +3828,21 @@ test_exclude_obj1(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "dset3", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -3890,14 +3890,14 @@ test_exclude_obj2(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3908,7 +3908,7 @@ test_exclude_obj2(const char *fname1, const char *fname2)
/* file1 */
gid1 = H5Gcreate2(fid1, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3916,7 +3916,7 @@ test_exclude_obj2(const char *fname1, const char *fname2)
/* file2 */
gid2 = H5Gcreate2(fid2, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3925,7 +3925,7 @@ test_exclude_obj2(const char *fname1, const char *fname2)
gid3 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3936,21 +3936,21 @@ test_exclude_obj2(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset10", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3958,21 +3958,21 @@ test_exclude_obj2(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset10", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3, 2, dims2, "dset3", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -4019,14 +4019,14 @@ test_exclude_obj3(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -4037,7 +4037,7 @@ test_exclude_obj3(const char *fname1, const char *fname2)
/* file1 */
gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4048,14 +4048,14 @@ test_exclude_obj3(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -4063,7 +4063,7 @@ test_exclude_obj3(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -4374,7 +4374,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
if (is_file_new == 1) {
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4382,7 +4382,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
else {
fid1 = H5Fopen(fname1, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4393,7 +4393,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
*------------------------------------------------------------------------*/
gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4403,7 +4403,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
*------------------------------------------------------------------------*/
sid_vlen_str = H5Screate_simple(STR_RANK, dims_vlen_str, NULL);
if (sid_vlen_str < 0) {
- HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4411,7 +4411,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
tid_vlen_str = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_vlen_str, H5T_VARIABLE);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4421,7 +4421,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
*------------------------------------------------------------------------*/
sid_fixlen_str = H5Screate_simple(STR_RANK, dims_fixlen_str, NULL);
if (sid_fixlen_str < 0) {
- HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4429,7 +4429,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
tid_fixlen_str = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_fixlen_str, FIXLEN_STR_SIZE);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4439,7 +4439,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
*------------------------------------------------------------------------*/
sid_vlen_str_array = H5Screate_simple(STR_RANK, dims_vlen_str_array, NULL);
if (sid_vlen_str_array < 0) {
- HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4447,7 +4447,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
tid_vlen_str_array_pre = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_vlen_str_array_pre, H5T_VARIABLE);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4455,7 +4455,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
/* Create the array data type for the string array */
tid_vlen_str_array = H5Tarray_create2(tid_vlen_str_array_pre, COMP_RANK, dims_vlen_str_array);
if (tid_vlen_str_array < 0) {
- HDfprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4465,7 +4465,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
*------------------------------------------------------------------------*/
sid_fixlen_str_array = H5Screate_simple(STR_RANK, dims_fixlen_str_array, NULL);
if (sid_fixlen_str_array < 0) {
- HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4473,14 +4473,14 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
tid_fixlen_str_array_pre = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_fixlen_str_array_pre, FIXLEN_STR_ARRY_SIZE);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
/* Create the array data type for the string array */
tid_fixlen_str_array = H5Tarray_create2(tid_fixlen_str_array_pre, COMP_RANK, dims_fixlen_str_array);
if (tid_fixlen_str_array < 0) {
- HDfprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4490,7 +4490,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
*------------------------------------------------------------------------*/
sid_comp = H5Screate_simple(COMP_RANK, dims_comp, NULL);
if (sid_comp < 0) {
- HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4604,7 +4604,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
did_comp = H5Dcreate2(gid, "Compound_dset1", tid1_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid1_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp1_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4614,7 +4614,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
did_comp = H5Dcreate2(gid, "Compound_dset2", tid2_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid2_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp2_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4624,7 +4624,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
did_comp = H5Dcreate2(gid, "Compound_dset3", tid3_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid3_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp3_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4634,7 +4634,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
did_comp = H5Dcreate2(gid, "Compound_dset4", tid4_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid4_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp4_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4644,7 +4644,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
did_comp = H5Dcreate2(gid, "Compound_dset5", tid5_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid5_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp5_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4654,7 +4654,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
did_comp = H5Dcreate2(gid, "Compound_dset6", tid6_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid6_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp6_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4664,7 +4664,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
did_comp = H5Dcreate2(gid, "Compound_dset7", tid7_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid7_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp7_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4674,7 +4674,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
did_comp = H5Dcreate2(gid, "Compound_dset8", tid8_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid8_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp8_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4690,7 +4690,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
status = H5Dwrite(did_comp, tid9_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp9_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4813,14 +4813,14 @@ test_enums(const char *fname)
enum_val = 0;
status = H5Tenum_insert(tid, "YIN", &enum_val);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
+ fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
status = FAIL;
goto out;
}
enum_val = 1;
status = H5Tenum_insert(tid, "YANG", &enum_val);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
+ fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
status = FAIL;
goto out;
}
@@ -4831,13 +4831,13 @@ test_enums(const char *fname)
status = write_dset(fid, 1, &dims, "dset1", tid, data1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> write_dset failed.\n", fname);
+ fprintf(stderr, "Error: %s> write_dset failed.\n", fname);
status = FAIL;
goto out;
}
status = write_dset(fid, 1, &dims, "dset2", tid, data2);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> write_dset failed.\n", fname);
+ fprintf(stderr, "Error: %s> write_dset failed.\n", fname);
status = FAIL;
goto out;
}
@@ -5020,7 +5020,7 @@ test_comps_vlen(const char *fname, const char *dset, const char *attr, int diff,
/* Allocate and initialize VL data to write */
for (i = 0; i < SDIM_DSET; i++) {
wdata[i].i1 = (int)i;
- wdata[i].vl.p = HDmalloc((i + 1) * sizeof(cmpd2_t));
+ wdata[i].vl.p = malloc((i + 1) * sizeof(cmpd2_t));
wdata[i].vl.len = i + 1;
for (j = 0; j < (i + 1); j++) {
((cmpd2_t *)wdata[i].vl.p)[j].i2 = (int)(i * 10 + (unsigned)diff);
@@ -5141,7 +5141,7 @@ test_comps_array_vlen(const char *fname, const char *dset, const char *attr, int
/* Allocate and initialize VL data to write in compound2 */
for (j = 0; j < SDIM_CMPD_ARRAY; j++) {
wdata[i].cmpd2[j].i2 = (int)(j * 10);
- wdata[i].cmpd2[j].vl.p = HDmalloc((j + 1) * sizeof(cmpd3_t));
+ wdata[i].cmpd2[j].vl.p = malloc((j + 1) * sizeof(cmpd3_t));
wdata[i].cmpd2[j].vl.len = j + 1;
for (k = 0; k < (j + 1); k++) {
/* Initialize data of compound3 */
@@ -5280,7 +5280,7 @@ test_comps_vlen_arry(const char *fname, const char *dset, const char *attr, int
for (i = 0; i < SDIM_DSET; i++) {
/* compound 1 data */
wdata[i].i1 = (int)i;
- wdata[i].vl.p = HDmalloc((i + 1) * sizeof(cmpd2_t));
+ wdata[i].vl.p = malloc((i + 1) * sizeof(cmpd2_t));
wdata[i].vl.len = i + 1;
for (j = 0; j < (i + 1); j++) {
/* compound2 data */
@@ -5470,7 +5470,7 @@ test_data_nocomparables(const char *fname, int make_diffs)
*------------------------------------------------------------------------*/
fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname);
status = FAIL;
goto out;
}
@@ -5480,14 +5480,14 @@ test_data_nocomparables(const char *fname, int make_diffs)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
status = FAIL;
goto out;
}
@@ -5500,13 +5500,13 @@ test_data_nocomparables(const char *fname, int make_diffs)
/* dset1 */
if ((did1 = H5Dcreate2(gid1, "dset1", tid_dset1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
+ fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
status = FAIL;
goto out;
}
if (H5Dwrite(did1, tid_dset1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr1) < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
status = FAIL;
goto out;
}
@@ -5515,7 +5515,7 @@ test_data_nocomparables(const char *fname, int make_diffs)
/* dset2 */
status = write_dset(gid1, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr2);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname);
goto out;
}
@@ -5525,13 +5525,13 @@ test_data_nocomparables(const char *fname, int make_diffs)
/* ---------
* dset1 */
if ((did2 = H5Dcreate2(gid2, "dset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
+ fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
status = FAIL;
goto out;
}
if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr3) < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
status = FAIL;
goto out;
}
@@ -5551,7 +5551,7 @@ test_data_nocomparables(const char *fname, int make_diffs)
* dset2 */
status = write_dset(gid2, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr3);
if (status == FAIL) {
- HDfprintf(stderr, "Error: %s> write_dset failed\n", fname);
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname);
goto out;
}
@@ -5755,14 +5755,14 @@ test_objs_strings(const char *fname1, const char *fname2)
/* file1 */
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
goto out;
}
/* file2 */
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
goto out;
}
@@ -6088,10 +6088,10 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid,
/* Allocate and initialize VL dataset to write */
buf5[0].len = 1;
- buf5[0].p = HDmalloc(1 * sizeof(int));
+ buf5[0].p = malloc(1 * sizeof(int));
((int *)buf5[0].p)[0] = 1;
buf5[1].len = 2;
- buf5[1].p = HDmalloc(2 * sizeof(int));
+ buf5[1].p = malloc(2 * sizeof(int));
((int *)buf5[1].p)[0] = 2;
((int *)buf5[1].p)[1] = 3;
@@ -6349,7 +6349,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid,
n = 0;
for (i = 0; i < 3; i++) {
for (j = 0; j < 2; j++) {
- buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int));
buf52[i][j].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++)
if (make_diffs)
@@ -6748,7 +6748,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid,
for (i = 0; i < 4; i++)
for (j = 0; j < 3; j++)
for (k = 0; k < 2; k++) {
- buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ buf53[i][j][k].p = malloc((size_t)(i + 1) * sizeof(int));
buf53[i][j][k].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++)
if (make_diffs)
@@ -7074,10 +7074,10 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid,
/* Allocate and initialize VL dataset to write */
buf5[0].len = 1;
- buf5[0].p = HDmalloc(1 * sizeof(int));
+ buf5[0].p = malloc(1 * sizeof(int));
((int *)buf5[0].p)[0] = 1;
buf5[1].len = 2;
- buf5[1].p = HDmalloc(2 * sizeof(int));
+ buf5[1].p = malloc(2 * sizeof(int));
((int *)buf5[1].p)[0] = 2;
((int *)buf5[1].p)[1] = 3;
@@ -7338,7 +7338,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid,
n = 0;
for (i = 0; i < 3; i++) {
for (j = 0; j < 2; j++) {
- buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int));
buf52[i][j].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++)
if (make_diffs)
@@ -7738,7 +7738,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid,
for (i = 0; i < 4; i++)
for (j = 0; j < 3; j++)
for (k = 0; k < 2; k++) {
- buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ buf53[i][j][k].p = malloc((size_t)(i + 1) * sizeof(int));
buf53[i][j][k].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++)
if (make_diffs)
@@ -8041,10 +8041,10 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
/* Allocate and initialize VL dataset to write */
buf5[0].len = 1;
- buf5[0].p = HDmalloc(1 * sizeof(int));
+ buf5[0].p = malloc(1 * sizeof(int));
((int *)buf5[0].p)[0] = 1;
buf5[1].len = 2;
- buf5[1].p = HDmalloc(2 * sizeof(int));
+ buf5[1].p = malloc(2 * sizeof(int));
((int *)buf5[1].p)[0] = 2;
((int *)buf5[1].p)[1] = 3;
@@ -8058,9 +8058,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
tid = H5Tvlen_create(H5T_NATIVE_INT);
did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -8091,7 +8091,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
/* allocate and initialize array data to write */
size = (H5TOOLS_MALLOCSIZE / sizeof(double) + 1) * sizeof(double);
- dbuf = (double *)HDmalloc(size);
+ dbuf = (double *)malloc(size);
for (jj = 0; jj < (H5TOOLS_MALLOCSIZE / sizeof(double) + 1); jj++)
dbuf[jj] = (double)jj;
@@ -8114,7 +8114,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
H5Dclose(ldid);
H5Tclose(ltid);
H5Sclose(lsid);
- HDfree(dbuf);
+ free(dbuf);
}
/*-------------------------------------------------------------------------
@@ -8229,7 +8229,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
n = 0;
for (i = 0; i < 3; i++)
for (j = 0; j < 2; j++) {
- buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int));
buf52[i][j].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++) {
if (make_diffs)
@@ -8408,7 +8408,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid,
for (i = 0; i < 4; i++)
for (j = 0; j < 3; j++)
for (k = 0; k < 2; k++) {
- buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ buf53[i][j][k].p = malloc((size_t)(i + 1) * sizeof(int));
buf53[i][j][k].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++) {
if (make_diffs)
@@ -8500,10 +8500,10 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
int i;
/* allocate the buffer for write the references */
- rbuf = (hdset_reg_ref_t *)HDcalloc((size_t)2, sizeof(hdset_reg_ref_t));
+ rbuf = (hdset_reg_ref_t *)calloc((size_t)2, sizeof(hdset_reg_ref_t));
/* allocate the buffer for write the data dataset */
- buf = (int *)HDmalloc(10 * 10 * sizeof(int));
+ buf = (int *)malloc(10 * 10 * sizeof(int));
for (i = 0; i < 10 * 10; i++)
buf[i] = i;
@@ -8512,7 +8512,7 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
sid1 = H5Screate_simple(2, dims1, NULL);
did1 = H5Dcreate2(fid, "dsetref", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
- HDassert(status >= 0);
+ assert(status >= 0);
/* create the reference dataset */
sid2 = H5Screate_simple(1, dims2, NULL);
@@ -8533,12 +8533,12 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
}
status = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL);
- HDassert(status >= 0);
+ assert(status >= 0);
H5Sget_select_npoints(sid1);
/* store first dataset region */
status = H5Rcreate(&rbuf[0], fid, "dsetref", H5R_DATASET_REGION, sid1);
- HDassert(status >= 0);
+ assert(status >= 0);
/* select sequence of five points for second reference */
coord[0][0] = 6;
@@ -8567,20 +8567,20 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
/* write */
status = H5Dwrite(did2, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
- HDassert(status >= 0);
+ assert(status >= 0);
/* close, free memory buffers */
status = H5Dclose(did1);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Sclose(sid1);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(did2);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Sclose(sid2);
- HDassert(status >= 0);
+ assert(status >= 0);
- HDfree(rbuf);
- HDfree(buf);
+ free(rbuf);
+ free(buf);
}
/*-------------------------------------------------------------------------
@@ -8631,7 +8631,7 @@ test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers
goto out;
/* create a evenly divided buffer from 0 to 127 */
- buf = (char *)HDmalloc((size_t)(nelmts * size));
+ buf = (char *)malloc((size_t)(nelmts * size));
s = 1024 * 1024 / 127;
for (i = 0, j = 0, c = 0; i < 1024 * 1024; j++, i++) {
if (j == s) {
@@ -8640,11 +8640,11 @@ test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers
}
/* set the hyperslab values */
- HDmemset(buf, c, nelmts);
+ memset(buf, c, nelmts);
/* make a different hyperslab at this position */
if (make_diffs && i == 512 * 512)
- HDmemset(buf, 0, nelmts);
+ memset(buf, 0, nelmts);
hs_start[0] = (unsigned long long)i * GBLL / (1024 * 1024);
if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0)
@@ -8656,7 +8656,7 @@ test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers
goto out;
}
}
- HDfree(buf);
+ free(buf);
buf = NULL;
/* close */
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 1fd512c..3628a4a 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -470,13 +470,13 @@ gent_dataset(void)
int i, j;
/* Set up data arrays */
- dset1_data = (int *)HDcalloc(10 * 20, sizeof(int));
- dset1 = (int **)HDcalloc(10, sizeof(dset1_data));
+ dset1_data = (int *)calloc(10 * 20, sizeof(int));
+ dset1 = (int **)calloc(10, sizeof(dset1_data));
for (i = 0; i < 10; i++)
dset1[i] = dset1_data + (i * 20);
- dset2_data = (double *)HDcalloc(30 * 20, sizeof(double));
- dset2 = (double **)HDcalloc(30, sizeof(dset2_data));
+ dset2_data = (double *)calloc(30 * 20, sizeof(double));
+ dset2 = (double **)calloc(30, sizeof(dset2_data));
for (i = 0; i < 30; i++)
dset2[i] = dset2_data + (i * 20);
@@ -512,10 +512,10 @@ gent_dataset(void)
H5Dclose(dataset);
H5Fclose(fid);
- HDfree(dset1);
- HDfree(dset1_data);
- HDfree(dset2);
- HDfree(dset2_data);
+ free(dset1);
+ free(dset1_data);
+ free(dset2);
+ free(dset2_data);
}
static void
@@ -683,7 +683,7 @@ gent_softlink2(void)
/* Create a new file */
fileid1 = H5Fcreate(FILE4_1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fileid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -693,14 +693,14 @@ gent_softlink2(void)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fileid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fileid1, "group_empty", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -711,7 +711,7 @@ gent_softlink2(void)
datatype = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(fileid1, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -737,14 +737,14 @@ gent_softlink2(void)
/* Create a new dataset as sample object */
dset1 = H5Dcreate2(fileid1, "/dset1", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dset1 < 0) {
- HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1);
status = FAIL;
goto out;
}
status = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -755,14 +755,14 @@ gent_softlink2(void)
/* Create a new dataset as sample object */
dset2 = H5Dcreate2(fileid1, "/dset2", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dset2 < 0) {
- HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1);
status = FAIL;
goto out;
}
status = H5Dwrite(dset2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -776,7 +776,7 @@ gent_softlink2(void)
/* link to dset1 */
status = H5Lcreate_soft("/dset1", fileid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -784,7 +784,7 @@ gent_softlink2(void)
/* link to data type */
status = H5Lcreate_soft("/dtype", fileid1, "soft_dtype", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -792,7 +792,7 @@ gent_softlink2(void)
/* link to group1 */
status = H5Lcreate_soft("/group1", fileid1, "soft_group1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -800,7 +800,7 @@ gent_softlink2(void)
/* link to empty group */
status = H5Lcreate_soft("/group_empty", fileid1, "soft_empty_grp", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -808,7 +808,7 @@ gent_softlink2(void)
/* dangling link */
status = H5Lcreate_soft("not_yet", fileid1, "soft_dangle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -819,7 +819,7 @@ gent_softlink2(void)
/* link to dset1 */
status = H5Lcreate_soft("/dset1", gid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -827,7 +827,7 @@ gent_softlink2(void)
/* link to dset2 */
status = H5Lcreate_soft("/dset2", gid1, "soft_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -835,7 +835,7 @@ gent_softlink2(void)
/* link to data type */
status = H5Lcreate_soft("/dtype", gid1, "soft_dtype", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -843,7 +843,7 @@ gent_softlink2(void)
/* link to empty group */
status = H5Lcreate_soft("/group_empty", gid1, "soft_empty_grp", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -851,7 +851,7 @@ gent_softlink2(void)
/* dangling link */
status = H5Lcreate_soft("not_yet", gid1, "soft_dangle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
status = FAIL;
goto out;
}
@@ -861,31 +861,31 @@ out:
* Close/release resources.
*/
if (dataspace >= 0 && H5Sclose(dataspace) < 0) {
- HDfprintf(stderr, "Error: %s> H5Sclose failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Sclose failed.\n", FILE4_1);
status = FAIL;
}
if (gid1 >= 0 && H5Gclose(gid1) < 0) {
- HDfprintf(stderr, "Error: %s> H5Gclose failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Gclose failed.\n", FILE4_1);
status = FAIL;
}
if (gid2 >= 0 && H5Gclose(gid2) < 0) {
- HDfprintf(stderr, "Error: %s> H5Gclose failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Gclose failed.\n", FILE4_1);
status = FAIL;
}
if (datatype >= 0 && H5Tclose(datatype) < 0) {
- HDfprintf(stderr, "Error: %s> H5Tclose failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Tclose failed.\n", FILE4_1);
status = FAIL;
}
if (dset1 >= 0 && H5Dclose(dset1) < 0) {
- HDfprintf(stderr, "Error: %s> H5Dclose failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Dclose failed.\n", FILE4_1);
status = FAIL;
}
if (dset2 >= 0 && H5Dclose(dset2) < 0) {
- HDfprintf(stderr, "Error: %s> H5Dclose failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Dclose failed.\n", FILE4_1);
status = FAIL;
}
if (fileid1 >= 0 && H5Fclose(fileid1) < 0) {
- HDfprintf(stderr, "Error: %s> H5Fclose failed.\n", FILE4_1);
+ fprintf(stderr, "Error: %s> H5Fclose failed.\n", FILE4_1);
status = FAIL;
}
@@ -1750,9 +1750,9 @@ gent_many(void)
/* Create links to external and UD links */
ret = H5Lcreate_soft("/g8/elink", fid, "/g7/slink5", H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Lcreate_soft("/g8/udlink", fid, "/g7/slink6", H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
H5Fclose(fid);
}
@@ -1808,8 +1808,8 @@ gent_str(void)
hsize_t mdims[2];
/* Set up data array */
- comp1_data = (compound_t *)HDcalloc(3 * 6, sizeof(compound_t));
- comp1 = (compound_t **)HDcalloc(3, sizeof(comp1_data));
+ comp1_data = (compound_t *)calloc(3 * 6, sizeof(compound_t));
+ comp1 = (compound_t **)calloc(3, sizeof(comp1_data));
for (i = 0; i < 3; i++)
comp1[i] = comp1_data + (i * 6);
@@ -1909,8 +1909,8 @@ gent_str(void)
H5Fclose(fid);
- HDfree(comp1);
- HDfree(comp1_data);
+ free(comp1);
+ free(comp1_data);
}
/*
@@ -2126,9 +2126,9 @@ gent_objref(void)
uint64_t supports_comments = 0;
/* Allocate write & read buffers */
- wbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * SPACE1_DIM1);
- rbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * SPACE1_DIM1);
- tbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * SPACE1_DIM1);
+ wbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * SPACE1_DIM1);
+ rbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * SPACE1_DIM1);
+ tbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * SPACE1_DIM1);
/* Create file */
fid1 = H5Fcreate(FILE16, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2211,9 +2211,9 @@ gent_objref(void)
H5Fclose(fid1);
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(tbuf);
+ free(wbuf);
+ free(rbuf);
+ free(tbuf);
}
static void
@@ -2240,10 +2240,10 @@ gent_datareg(void)
int i; /* counting variables */
/* Allocate write & read buffers */
- wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- rbuf = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
- dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2);
+ wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
+ dwbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2);
/* Create file */
fid1 = H5Fcreate(FILE17, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2331,10 +2331,10 @@ gent_datareg(void)
H5Fclose(fid1);
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
}
static void
@@ -2364,10 +2364,10 @@ gent_attrreg(void)
int i; /* counting variables */
/* Allocate write & read buffers */
- wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- rbuf = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
- dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2);
+ wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
+ dwbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2);
/* Create file */
fid1 = H5Fcreate(FILE64, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2464,10 +2464,10 @@ gent_attrreg(void)
H5Fclose(fid1);
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
}
/*taken from Elena's compound test file*/
@@ -2560,7 +2560,7 @@ gent_nestcomp(void)
*/
status = H5Dwrite(dataset, s2_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, s1);
if (status < 0)
- HDfprintf(stderr, "gent_nestcomp H5Dwrite failed\n");
+ fprintf(stderr, "gent_nestcomp H5Dwrite failed\n");
/*
* Release resources
@@ -2695,7 +2695,7 @@ gent_vldatatypes(void)
for (i = 0; i < SPACE1_DIM1; i++) {
int j;
- wdata[i].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ wdata[i].p = malloc((size_t)(i + 1) * sizeof(int));
wdata[i].len = (size_t)(i + 1);
for (j = 0; j < i + 1; j++)
@@ -2707,22 +2707,22 @@ gent_vldatatypes(void)
type = H5Tvlen_create(H5T_NATIVE_INT);
dset = H5Dcreate2(file, "Dataset1.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Treclaim(type, space, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Dclose(dset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(type);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(space);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Allocate and initialize VL dataset to write */
for (i = 0; i < SPACE1_DIM1; i++) {
int j;
- wdata[i].p = HDmalloc((size_t)(i + 1) * sizeof(float));
+ wdata[i].p = malloc((size_t)(i + 1) * sizeof(float));
wdata[i].len = (size_t)(i + 1);
for (j = 0; j < i + 1; j++)
@@ -2734,19 +2734,19 @@ gent_vldatatypes(void)
type = H5Tvlen_create(H5T_NATIVE_FLOAT);
dset = H5Dcreate2(file, "Dataset2.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Treclaim(type, space, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Dclose(dset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(type);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(space);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Allocate and initialize a scalar VL dataset to write */
- adata.p = HDmalloc(37 * sizeof(int));
+ adata.p = malloc(37 * sizeof(int));
adata.len = 37;
for (i = 0; i < 37; i++)
@@ -2757,18 +2757,18 @@ gent_vldatatypes(void)
type = H5Tvlen_create(H5T_NATIVE_INT);
dset = H5Dcreate2(file, "Dataset3.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, &adata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Treclaim(type, space, H5P_DEFAULT, &adata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Dclose(dset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(type);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(space);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(file);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -2786,16 +2786,16 @@ gent_vldatatypes2(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = (hvl_t *)HDmalloc((i + 1) * sizeof(hvl_t));
+ wdata[i].p = (hvl_t *)malloc((i + 1) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
- HDprintf("Cannot allocate memory for VL data! i=%u\n", i);
+ printf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + 1;
for (t1 = (hvl_t *)wdata[i].p, j = 0; j < (i + 1); j++, t1++) {
- t1->p = (unsigned *)HDmalloc((j + 1) * sizeof(unsigned));
+ t1->p = (unsigned *)malloc((j + 1) * sizeof(unsigned));
if (t1->p == NULL) {
- HDprintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
+ printf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
} /* end if */
t1->len = j + 1;
@@ -2821,23 +2821,23 @@ gent_vldatatypes2(void)
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Reclaim the write VL data */
ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -2861,7 +2861,7 @@ gent_vldatatypes3(void)
for (i = 0; i < SPACE1_DIM1; i++) {
wdata[i].i = (int)(i * 10);
wdata[i].f = (float)((float)(i * 20) / 3.0F);
- wdata[i].v.p = HDmalloc((size_t)(i + 1) * sizeof(unsigned int));
+ wdata[i].v.p = malloc((size_t)(i + 1) * sizeof(unsigned int));
wdata[i].v.len = (size_t)(i + 1);
for (j = 0; j < (i + 1); j++)
((unsigned int *)wdata[i].v.p)[j] = i * 10 + j;
@@ -2881,34 +2881,34 @@ gent_vldatatypes3(void)
/* Insert fields */
ret = H5Tinsert(tid2, "i", HOFFSET(s1, i), H5T_NATIVE_INT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tinsert(tid2, "f", HOFFSET(s1, f), H5T_NATIVE_FLOAT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tinsert(tid2, "v", HOFFSET(s1, v), tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create a dataset */
dataset = H5Dcreate2(fid1, "Dataset1", tid2, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Reclaim the write VL data */
ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -2929,7 +2929,7 @@ gent_vldatatypes4(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(s1));
+ wdata[i].p = malloc((i + 1) * sizeof(s1));
wdata[i].len = i + 1;
for (j = 0; j < (i + 1); j++) {
((s1 *)wdata[i].p)[j].i = (int)(i * 10 + j);
@@ -2948,9 +2948,9 @@ gent_vldatatypes4(void)
/* Insert fields */
ret = H5Tinsert(tid2, "i", HOFFSET(s1, i), H5T_NATIVE_INT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tinsert(tid2, "f", HOFFSET(s1, f), H5T_NATIVE_FLOAT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create a datatype to refer to */
tid1 = H5Tvlen_create(tid2);
@@ -2960,23 +2960,23 @@ gent_vldatatypes4(void)
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Reclaim the write VL data */
ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/* Generate a variable-length dataset with NULL values in it */
@@ -3000,7 +3000,7 @@ gent_vldatatypes5(void)
} /* end if */
else {
wdata[i].len = (size_t)(i + 5);
- wdata[i].p = HDmalloc(sizeof(unsigned) * (size_t)(i + 5));
+ wdata[i].p = malloc(sizeof(unsigned) * (size_t)(i + 5));
for (j = 0; j < i + 5; j++)
((unsigned *)wdata[i].p)[j] = (unsigned)(j * 2);
} /* end else */
@@ -3008,37 +3008,37 @@ gent_vldatatypes5(void)
/* Create file */
fid1 = H5Fcreate(FILE43, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid1 > 0);
+ assert(fid1 > 0);
/* Create dataspace for datasets */
sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
- HDassert(sid1 > 0);
+ assert(sid1 > 0);
/* Create a datatype to refer to */
tid1 = H5Tvlen_create(H5T_NATIVE_UINT);
- HDassert(tid1 > 0);
+ assert(tid1 > 0);
/* Create a dataset */
dataset = H5Dcreate2(fid1, F43_DSETNAME, tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(dataset > 0);
+ assert(dataset > 0);
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/* This is big enough to make h5dump to use hyperslap to read
@@ -3079,8 +3079,8 @@ gent_array1_big(void)
block[0] = 1;
/* Allocate write & read buffers */
- wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- wdata = (int *)HDmalloc(sizeof(int) * (size_t)(SPACE_ARRAY1BIG_DIM * ARRAY1BIG_DIM));
+ wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ wdata = (int *)malloc(sizeof(int) * (size_t)(SPACE_ARRAY1BIG_DIM * ARRAY1BIG_DIM));
/* Allocate and initialize array data to write */
for (i = 0; i < SPACE_ARRAY1BIG_DIM; i++)
@@ -3104,7 +3104,7 @@ gent_array1_big(void)
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*---------------------------
* Region Reference dataset
@@ -3128,17 +3128,17 @@ gent_array1_big(void)
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Release memory */
- HDfree(wbuf);
- HDfree(wdata);
+ free(wbuf);
+ free(wdata);
}
static void
@@ -3173,17 +3173,17 @@ gent_array1(void)
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -3220,17 +3220,17 @@ gent_array2(void)
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -3272,19 +3272,19 @@ gent_array3(void)
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -3323,35 +3323,35 @@ gent_array4(void)
/* Insert integer field */
ret = H5Tinsert(tid2, "i", HOFFSET(s2_t, i), H5T_NATIVE_INT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Insert float field */
ret = H5Tinsert(tid2, "f", HOFFSET(s2_t, f), H5T_NATIVE_FLOAT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create an array datatype to refer to */
tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1);
/* Close compound datatype */
ret = H5Tclose(tid2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create a dataset */
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -3392,42 +3392,42 @@ gent_array5(void)
/* Insert integer field */
ret = H5Tinsert(tid2, "i", HOFFSET(s2_t, i), H5T_NATIVE_INT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create an array of floats datatype */
tid3 = H5Tarray_create2(H5T_NATIVE_FLOAT, ARRAY1_RANK, tdims1);
/* Insert float array field */
ret = H5Tinsert(tid2, "f", HOFFSET(s2_t, f), tid3);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close array of floats field datatype */
ret = H5Tclose(tid3);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create an array datatype to refer to */
tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1);
/* Close compound datatype */
ret = H5Tclose(tid2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create a dataset */
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -3447,7 +3447,7 @@ gent_array6(void)
/* Initialize array data to write */
for (i = 0; i < SPACE1_DIM1; i++)
for (j = 0; j < ARRAY1_DIM1; j++) {
- wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int));
+ wdata[i][j].p = malloc((size_t)(i + j + 1) * sizeof(unsigned int));
wdata[i][j].len = (size_t)(i + j + 1);
for (k = 0; k < (i + j + 1); k++)
((unsigned int *)wdata[i][j].p)[k] = (unsigned)(i * 100 + j * 10 + k);
@@ -3467,28 +3467,28 @@ gent_array6(void)
/* Close VL datatype */
ret = H5Tclose(tid2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create a dataset */
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Reclaim the write VL data */
ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -3509,7 +3509,7 @@ gent_array7(void)
/* Initialize array data to write */
for (i = 0; i < SPACE1_DIM1; i++)
for (j = 0; j < ARRAY1_DIM1; j++) {
- wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * (sizeof(unsigned int) * ARRAY1_DIM1));
+ wdata[i][j].p = malloc((size_t)(i + j + 1) * (sizeof(unsigned int) * ARRAY1_DIM1));
wdata[i][j].len = (size_t)(i + j + 1);
for (k = 0; k < (i + j + 1); k++)
for (l = 0; l < ARRAY1_DIM1; l++)
@@ -3531,35 +3531,35 @@ gent_array7(void)
/* Close nested array datatype */
ret = H5Tclose(tid3);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create an array datatype to refer to */
tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1);
/* Close VL datatype */
ret = H5Tclose(tid2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create a dataset */
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write dataset to disk */
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Reclaim the write VL data */
ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close Dataset */
ret = H5Dclose(dataset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/* Test the boundary of the display output buffer at the reallocation event */
@@ -3577,8 +3577,8 @@ gent_array8(void)
unsigned int i;
/* Allocate data buffer */
- wdata = (int *)HDmalloc(F64_DIM1 * sizeof(int));
- HDassert(wdata);
+ wdata = (int *)malloc(F64_DIM1 * sizeof(int));
+ assert(wdata);
/*
* Initialize data. i is the element in the dataspace, j and k the
@@ -3610,21 +3610,21 @@ gent_array8(void)
dset = H5Dcreate2(file, F64_DATASET, filetype, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dset >= 0)
status = H5Dwrite(dset, filetype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- HDassert(status >= 0);
+ assert(status >= 0);
}
/*
* Close and release resources.
*/
status = H5Dclose(dset);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Sclose(space);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(filetype);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Fclose(file);
- HDassert(status >= 0);
- HDfree(wdata);
+ assert(status >= 0);
+ free(wdata);
}
static void
@@ -3648,30 +3648,30 @@ gent_empty(void)
dset = H5Dcreate2(file, "Dataset1.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Don't write any data */
ret = H5Dclose(dset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(type);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* write out an empty native integer dataset dataset */
dset = H5Dcreate2(file, "Dataset2.0", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Don't write any data */
ret = H5Dclose(dset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* write out an empty native floating-point dataset dataset */
dset = H5Dcreate2(file, "Dataset3.0", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Don't write any data */
ret = H5Dclose(dset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* write out an empty array dataset */
type = H5Tarray_create2(H5T_NATIVE_INT, SPACE1_RANK, dims);
dset = H5Dcreate2(file, "Dataset4.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Don't write any data */
ret = H5Dclose(dset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(type);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* write out an empty compound dataset */
type = H5Tcreate(H5T_COMPOUND, sizeof(empty_struct));
@@ -3681,15 +3681,15 @@ gent_empty(void)
dset = H5Dcreate2(file, "Dataset5.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Don't write any data */
ret = H5Dclose(dset);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(type);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(space);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(file);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
static void
@@ -3869,26 +3869,26 @@ gent_multi(void)
char *sv_data = NULL;
haddr_t memb_addr[H5FD_MEM_NTYPES];
- sv_data = (char *)HDcalloc(H5FD_MEM_NTYPES * 1024, sizeof(char));
- sv = (char **)HDcalloc(H5FD_MEM_NTYPES, sizeof(sv_data));
+ sv_data = (char *)calloc(H5FD_MEM_NTYPES * 1024, sizeof(char));
+ sv = (char **)calloc(H5FD_MEM_NTYPES, sizeof(sv_data));
for (i = 0; i < H5FD_MEM_NTYPES; i++)
sv[i] = sv_data + (i * 1024);
fapl = H5Pcreate(H5P_FILE_ACCESS);
- HDmemset(memb_map, 0, sizeof memb_map);
- HDmemset(memb_fapl, 0, sizeof memb_fapl);
- HDmemset(memb_name, 0, sizeof memb_name);
- HDmemset(memb_addr, 0, sizeof memb_addr);
+ memset(memb_map, 0, sizeof memb_map);
+ memset(memb_fapl, 0, sizeof memb_fapl);
+ memset(memb_name, 0, sizeof memb_name);
+ memset(memb_addr, 0, sizeof memb_addr);
- HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(HDstrlen(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]);
memb_name[mt] = sv[mt];
- /*HDprintf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[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);
}
memb_map[H5FD_MEM_DEFAULT] = H5FD_MEM_SUPER;
@@ -3914,8 +3914,8 @@ gent_multi(void)
H5Fclose(fid);
H5Pclose(fapl);
- HDfree(sv);
- HDfree(sv_data);
+ free(sv);
+ free(sv_data);
}
static void
@@ -4157,10 +4157,10 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
/* Allocate and initialize VL dataset to write */
buf5[0].len = 1;
- buf5[0].p = HDmalloc(1 * sizeof(int));
+ buf5[0].p = malloc(1 * sizeof(int));
((int *)buf5[0].p)[0] = 1;
buf5[1].len = 2;
- buf5[1].p = HDmalloc(2 * sizeof(int));
+ buf5[1].p = malloc(2 * sizeof(int));
((int *)buf5[1].p)[0] = 2;
((int *)buf5[1].p)[1] = 3;
@@ -4168,9 +4168,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
tid = H5Tvlen_create(H5T_NATIVE_INT);
aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf5);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -4266,7 +4266,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
for (j = 0; j < 2; j++) {
int l;
- buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int));
buf52[i][j].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++)
((int *)buf52[i][j].p)[l] = n++;
@@ -4277,9 +4277,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
tid = H5Tvlen_create(H5T_NATIVE_INT);
aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf52);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -4396,7 +4396,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
for (k = 0; k < 2; k++) {
int l;
- buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ buf53[i][j][k].p = malloc((size_t)(i + 1) * sizeof(int));
buf53[i][j][k].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++)
((int *)buf53[i][j][k].p)[l] = n++;
@@ -4408,9 +4408,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
tid = H5Tvlen_create(H5T_NATIVE_INT);
aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf53);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -4586,10 +4586,10 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
/* Allocate and initialize VL dataset to write */
buf5[0].len = 1;
- buf5[0].p = HDmalloc(1 * sizeof(int));
+ buf5[0].p = malloc(1 * sizeof(int));
((int *)buf5[0].p)[0] = 1;
buf5[1].len = 2;
- buf5[1].p = HDmalloc(2 * sizeof(int));
+ buf5[1].p = malloc(2 * sizeof(int));
((int *)buf5[1].p)[0] = 2;
((int *)buf5[1].p)[1] = 3;
@@ -4597,9 +4597,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
tid = H5Tvlen_create(H5T_NATIVE_INT);
did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -4695,7 +4695,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
for (j = 0; j < 2; j++) {
int l;
- buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int));
+ buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int));
buf52[i][j].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++)
((int *)buf52[i][j].p)[l] = n++;
@@ -4705,9 +4705,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
tid = H5Tvlen_create(H5T_NATIVE_INT);
did = H5Dcreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -4832,7 +4832,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
for (k = 0; k < 2; k++) {
int l;
- buf53[i][j][k].p = HDmalloc(((size_t)i + 1) * sizeof(int));
+ buf53[i][j][k].p = malloc(((size_t)i + 1) * sizeof(int));
buf53[i][j][k].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++)
((int *)buf53[i][j][k].p)[l] = n++;
@@ -4842,9 +4842,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
tid = H5Tvlen_create(H5T_NATIVE_INT);
did = H5Dcreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -4915,7 +4915,7 @@ gent_attr_all(void)
sid = H5Screate_simple(1, dims, NULL);
did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Sclose(sid);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create groups */
group_id = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4940,17 +4940,17 @@ gent_attr_all(void)
/* Close */
status = H5Dclose(did);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Gclose(group_id);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Gclose(group2_id);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Gclose(root_id);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Close file */
status = H5Fclose(fid);
- HDassert(status >= 0);
+ assert(status >= 0);
}
/*-------------------------------------------------------------------------
@@ -5091,65 +5091,65 @@ gent_compound_complex(void)
/* Create the dataspace */
dataspace = H5Screate_simple(F41_RANK, dim, NULL);
- HDassert(dataspace >= 0);
+ assert(dataspace >= 0);
/* Create the file */
datafile = H5Fcreate(FILE41, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(datafile >= 0);
+ assert(datafile >= 0);
/* Copy the array data type for the string array */
array_tid = H5Tcopy(H5T_C_S1);
- HDassert(array_tid >= 0);
+ assert(array_tid >= 0);
/* Set the string array size to Variable */
status = H5Tset_size(array_tid, H5T_VARIABLE);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create the array data type for the string array */
str_array_id = H5Tarray_create2(array_tid, F41_ARRAY_RANK, array_dimb);
- HDassert(str_array_id >= 0);
+ assert(str_array_id >= 0);
/* Copy the array data type for the character array */
array1_tid = H5Tcopy(H5T_C_S1);
- HDassert(array1_tid >= 0);
+ assert(array1_tid >= 0);
/* Set the character array size */
status = H5Tset_size(array1_tid, F41_ARRAY_DIMc);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create the array data type for the character array */
array2_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F41_ARRAY_RANKd, array_dimd);
- HDassert(array2_tid >= 0);
+ assert(array2_tid >= 0);
/* Create the array data type for the character array */
array4_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F41_ARRAY_RANK, array_dimf);
- HDassert(array4_tid >= 0);
+ assert(array4_tid >= 0);
/* Create the memory data type */
Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct));
- HDassert(Array1Structid >= 0);
+ assert(Array1Structid >= 0);
/* Insert the arrays and variables into the structure */
status = H5Tinsert(Array1Structid, "a_name", HOFFSET(Array1Struct, a), H5T_NATIVE_INT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, "b_name", HOFFSET(Array1Struct, b), str_array_id);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, "c_name", HOFFSET(Array1Struct, c), array1_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, "d_name", HOFFSET(Array1Struct, d), array2_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, "e_name", HOFFSET(Array1Struct, e), H5T_NATIVE_FLOAT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, "f_name", HOFFSET(Array1Struct, f), array4_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, "g_name", HOFFSET(Array1Struct, g), H5T_NATIVE_CHAR);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create the dataset */
dataset = H5Dcreate2(datafile, F41_DATASETNAME, Array1Structid, dataspace, H5P_DEFAULT, H5P_DEFAULT,
@@ -5157,35 +5157,35 @@ gent_compound_complex(void)
/* Write data to the dataset */
status = H5Dwrite(dataset, Array1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Array1);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Release resources */
status = H5Tclose(Array1Structid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array1_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array2_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array4_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(str_array_id);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Sclose(dataspace);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(dataset);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Fclose(datafile);
- HDassert(status >= 0);
+ assert(status >= 0);
}
static void
@@ -5202,7 +5202,7 @@ gent_named_dtype_attr(void)
/* Create a file */
fid = H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid > 0);
+ assert(fid > 0);
/*-------------------------------------------------------------------------
* datatype
@@ -5211,27 +5211,27 @@ gent_named_dtype_attr(void)
/* Create a datatype to commit and use */
tid = H5Tcopy(H5T_NATIVE_INT);
- HDassert(tid > 0);
+ assert(tid > 0);
/* Commit datatype to file */
ret = H5Tcommit2(fid, F42_TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create a hard link to the datatype */
ret = H5Lcreate_hard(fid, F42_TYPENAME, fid, F42_LINKNAME, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Create a scalar dataspace used for all objects */
sid = H5Screate(H5S_SCALAR);
- HDassert(sid > 0);
+ assert(sid > 0);
/* Create attribute on committed datatype */
aid = H5Acreate2(tid, F42_ATTRNAME, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(aid > 0);
+ assert(aid > 0);
/* Write data into the attribute */
ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* dataset
@@ -5240,15 +5240,15 @@ gent_named_dtype_attr(void)
/* Create dataset */
did = H5Dcreate2(fid, F42_DSETNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(did > 0);
+ assert(did > 0);
/* Create attribute on dataset */
aid = H5Acreate2(did, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(aid > 0);
+ assert(aid > 0);
/* Write data into the attribute */
ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* group
@@ -5257,15 +5257,15 @@ gent_named_dtype_attr(void)
/* Create a group */
gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(gid > 0);
+ assert(gid > 0);
/* Create attribute on group */
aid = H5Acreate2(gid, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(aid > 0);
+ assert(aid > 0);
/* Write data into the attribute */
ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* close
@@ -5274,23 +5274,23 @@ gent_named_dtype_attr(void)
/* Close attribute */
ret = H5Aclose(aid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close dataset */
ret = H5Dclose(did);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close dataspace */
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close datatype */
ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* Close file */
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -5423,25 +5423,25 @@ make_external(hid_t fid)
dcpl = H5Pcreate(H5P_DATASET_CREATE);
ret = H5Pset_external(dcpl, "ext1.bin", (off_t)0, size);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pset_external(dcpl, "ext2.bin", (off_t)0, size);
- HDassert(ret >= 0);
+ assert(ret >= 0);
sid = H5Screate_simple(1, cur_size, max_size);
- HDassert(ret >= 0);
+ assert(ret >= 0);
dsid = H5Dcreate2(fid, "external", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
H5Dclose(dsid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
H5Pclose(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -5477,7 +5477,7 @@ gent_filters(void)
/* create a file */
fid = H5Fcreate(FILE44, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Check if we support comments in the current VOL connector */
H5VLquery_optional(fid, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_SET_COMMENT, &supports_comments);
@@ -5494,40 +5494,40 @@ gent_filters(void)
*-------------------------------------------------------------------------
*/
ret = H5Pset_layout(dcpl, H5D_COMPACT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "compact", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) {
ret = H5Oset_comment_by_name(fid, "compact", "This is a dataset with compact storage", H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
ret = H5Pset_layout(dcpl, H5D_CONTIGUOUS);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "contiguous", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) {
ret = H5Oset_comment_by_name(fid, "contiguous", "This is a dataset with contiguous storage",
H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
ret = H5Pset_layout(dcpl, H5D_CHUNKED);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "chunked", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) {
ret = H5Oset_comment_by_name(fid, "chunked", "This is a dataset with chunked storage", H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -5537,7 +5537,7 @@ gent_filters(void)
/* set up chunk */
ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* SZIP
@@ -5547,14 +5547,14 @@ gent_filters(void)
if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* set szip data */
ret = H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "szip", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
#endif /* H5_HAVE_FILTER_SZIP */
@@ -5565,14 +5565,14 @@ gent_filters(void)
#if defined(H5_HAVE_FILTER_DEFLATE)
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* set deflate data */
ret = H5Pset_deflate(dcpl, 9);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "deflate", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
#endif
/*-------------------------------------------------------------------------
@@ -5582,14 +5582,14 @@ gent_filters(void)
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* set the shuffle filter */
ret = H5Pset_shuffle(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "shuffle", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* checksum
@@ -5598,14 +5598,14 @@ gent_filters(void)
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* set the checksum filter */
ret = H5Pset_fletcher32(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "fletcher32", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* nbit
@@ -5614,16 +5614,16 @@ gent_filters(void)
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* set the checksum filter */
ret = H5Pset_nbit(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
tid = H5Tcopy(H5T_NATIVE_INT);
H5Tset_precision(tid, H5Tget_size(tid) - 1);
ret = make_dset(fid, "nbit", sid, tid, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* scaleoffset
@@ -5632,14 +5632,14 @@ gent_filters(void)
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* set the scaleoffset filter */
ret = H5Pset_scaleoffset(dcpl, H5Z_SO_INT, (int)H5Tget_size(H5T_NATIVE_INT));
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "scaleoffset", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* all filters
@@ -5647,37 +5647,37 @@ gent_filters(void)
*/
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* set the shuffle filter */
ret = H5Pset_shuffle(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
#ifdef H5_HAVE_FILTER_SZIP
if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
szip_options_mask = H5_SZIP_CHIP_OPTION_MASK | H5_SZIP_EC_OPTION_MASK;
/* set szip data */
ret = H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
#endif /* H5_HAVE_FILTER_SZIP */
#if defined(H5_HAVE_FILTER_DEFLATE)
/* set deflate data */
ret = H5Pset_deflate(dcpl, 5);
- HDassert(ret >= 0);
+ assert(ret >= 0);
#endif
/* set the checksum filter */
ret = H5Pset_fletcher32(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* set the nbit filter */
ret = H5Pset_nbit(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "all", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* user defined filter
@@ -5685,20 +5685,20 @@ gent_filters(void)
*/
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Zregister(H5Z_MYFILTER);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pset_filter(dcpl, MYFILTER_ID, 0, 0, NULL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "myfilter", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* make an external dataset
@@ -5711,27 +5711,27 @@ gent_filters(void)
*-------------------------------------------------------------------------
*/
ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "alloc_time_early", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* H5D_ALLOC_TIME_INCR
*-------------------------------------------------------------------------
*/
ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "alloc_time_incr", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* H5D_ALLOC_TIME_LATE
*-------------------------------------------------------------------------
*/
ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "alloc_time_late", sid, H5T_NATIVE_INT, dcpl, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* commit a H5G_TYPE type with a comment
@@ -5739,28 +5739,28 @@ gent_filters(void)
*/
tid = H5Tcopy(H5T_STD_B8LE);
ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) {
ret = H5Oset_comment_by_name(fid, "mytype", "This is a committed datatype", H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* close
*-------------------------------------------------------------------------
*/
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pclose(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -5825,7 +5825,7 @@ gent_fcontents(void)
/* create a file */
fid = H5Fcreate(FILE46, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
write_dset(fid, 1, dims, "dset", H5T_NATIVE_INT, buf);
@@ -5851,27 +5851,27 @@ gent_fcontents(void)
/* hard link to "dset" */
ret = H5Lcreate_hard(fid, "/dset", H5L_SAME_LOC, "dset3", H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* hard link to "dset" */
ret = H5Lcreate_hard(fid, "/dset", H5L_SAME_LOC, "dset4", H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* soft link to itself */
ret = H5Lcreate_soft("mylink", fid, "mylink", H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* soft link to "dset" */
ret = H5Lcreate_soft("/dset", fid, "softlink", H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* dangling external link */
ret = H5Lcreate_external("fname", "oname", fid, "extlink", H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* dangling udlink */
ret = H5Lcreate_ud(fid, "udlink", (H5L_type_t)MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* datatypes
@@ -5879,19 +5879,19 @@ gent_fcontents(void)
*/
tid = H5Tcopy(H5T_NATIVE_INT);
ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* no name datatype */
tid = H5Tcopy(H5T_NATIVE_INT);
ret = H5Tcommit2(fid, "mytype2", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
write_dset(fid, 1, dims, "dsetmytype2", tid, buf);
ret = H5Ldelete(fid, "mytype2", H5P_DEFAULT);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* close
@@ -5899,14 +5899,14 @@ gent_fcontents(void)
*/
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* create a file for the bootblock test */
fid = H5Fcreate(FILE47, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -5943,7 +5943,7 @@ gent_fvalues(void)
/* create a file */
fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* create a space */
sid = H5Screate_simple(1, dims, NULL);
@@ -5957,42 +5957,42 @@ gent_fvalues(void)
*-------------------------------------------------------------------------
*/
ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "fill_time_ifset", sid, H5T_NATIVE_INT, dcpl, buf);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* H5D_FILL_TIME_NEVER
*-------------------------------------------------------------------------
*/
ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "fill_time_never", sid, H5T_NATIVE_INT, dcpl, buf);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* H5D_FILL_TIME_ALLOC
*-------------------------------------------------------------------------
*/
ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "fill_time_alloc", sid, H5T_NATIVE_INT, dcpl, buf);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pclose(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* dataset with no fill value
@@ -6009,23 +6009,23 @@ gent_fvalues(void)
H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_CHAR);
H5Tinsert(tid, "b", HOFFSET(c_t, b), H5T_NATIVE_DOUBLE);
ret = H5Pset_fill_value(dcpl, tid, &fillval2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = make_dset(fid, "fill_compound", sid, tid, dcpl, buf2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pclose(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* dataset with a H5T_VLEN fill value
*-------------------------------------------------------------------------
*/
buf3[0].len = 1;
- buf3[0].p = HDmalloc(1 * sizeof(int));
+ buf3[0].p = malloc(1 * sizeof(int));
((int *)buf3[0].p)[0] = 1;
buf3[1].len = 2;
- buf3[1].p = HDmalloc(2 * sizeof(int));
+ buf3[1].p = malloc(2 * sizeof(int));
((int *)buf3[1].p)[0] = 2;
((int *)buf3[1].p)[1] = 3;
@@ -6035,17 +6035,17 @@ gent_fvalues(void)
fillval3.p = NULL;
fillval3.len = 0;
ret = H5Pset_fill_value(dcpl, tid, &fillval3);
- HDassert(ret >= 0);
+ assert(ret >= 0);
did = H5Dcreate2(fid, "fill_vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Treclaim(tid, sid, H5P_DEFAULT, buf3);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Dclose(did);
ret = H5Tclose(tid);
ret = H5Pclose(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* dataset with a H5T_ARRAY fill value
@@ -6060,9 +6060,9 @@ gent_fvalues(void)
*-------------------------------------------------------------------------
*/
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -6105,7 +6105,7 @@ gent_string(void)
/* create a file */
fid = H5Fcreate(FILE49, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/*-------------------------------------------------------------------------
* str1
@@ -6114,11 +6114,11 @@ gent_string(void)
tid = H5Tcopy(H5T_C_S1);
ret = H5Tset_size(tid, sizeof(buf1));
- HDassert(ret >= 0);
+ assert(ret >= 0);
write_dset(fid, 1, dims1, "str1", tid, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* str2
@@ -6127,16 +6127,16 @@ gent_string(void)
sid = H5Screate_simple(SPACE1_RANK, dims2, NULL);
tid = H5Tcopy(H5T_C_S1);
ret = H5Tset_size(tid, H5T_VARIABLE);
- HDassert(ret >= 0);
+ assert(ret >= 0);
did = H5Dcreate2(fid, "str2", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Dclose(did);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* str3
@@ -6149,13 +6149,13 @@ gent_string(void)
H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_INT);
H5Tinsert(tid, "str", HOFFSET(c_t, str), str_tid);
ret = make_dset(fid, "str3", sid, tid, H5P_DEFAULT, &buf3);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Tclose(str_tid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* str4
@@ -6164,14 +6164,14 @@ gent_string(void)
sid = H5Screate_simple(SPACE1_RANK, dims4, NULL);
ret = make_dset(fid, "str4", sid, H5T_NATIVE_CHAR, H5P_DEFAULT, buf4);
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* close
*-------------------------------------------------------------------------
*/
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -6215,7 +6215,7 @@ gent_aindices(void)
/* create a file */
fid = H5Fcreate(FILE50, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/*-------------------------------------------------------------------------
* root datasets
@@ -6248,7 +6248,7 @@ gent_aindices(void)
*-------------------------------------------------------------------------
*/
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -6269,37 +6269,37 @@ gent_longlinks(void)
/* Create files */
fid = H5Fcreate(FILE51, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Create group with short name in file (used as target for hard links) */
gid = H5Gcreate2(fid, "grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(gid >= 0);
+ assert(gid >= 0);
/* Construct very long file name */
- objname = (char *)HDmalloc((size_t)(F51_MAX_NAME_LEN + 1));
- HDassert(objname);
+ objname = (char *)malloc((size_t)(F51_MAX_NAME_LEN + 1));
+ assert(objname);
for (u = 0; u < F51_MAX_NAME_LEN; u++)
objname[u] = 'a';
objname[F51_MAX_NAME_LEN] = '\0';
/* Create hard link to existing object */
- HDassert(H5Lcreate_hard(fid, "grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0);
+ assert(H5Lcreate_hard(fid, "grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0);
/* Create soft link to existing object */
objname[0] = 'b';
- HDassert(H5Lcreate_soft("grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0);
+ assert(H5Lcreate_soft("grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0);
/* Create group with long name in existing group */
gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(gid2 >= 0);
+ assert(gid2 >= 0);
/* Close objects */
- HDassert(H5Gclose(gid2) >= 0);
- HDassert(H5Gclose(gid) >= 0);
- HDassert(H5Fclose(fid) >= 0);
+ assert(H5Gclose(gid2) >= 0);
+ assert(H5Gclose(gid) >= 0);
+ assert(H5Fclose(fid) >= 0);
/* Release memory */
- HDfree(objname);
+ free(objname);
}
/*-------------------------------------------------------------------------
@@ -6349,7 +6349,7 @@ gent_ldouble(void)
return 0;
error:
- HDprintf("error !\n");
+ printf("error !\n");
return -1;
}
@@ -6400,7 +6400,7 @@ gent_ldouble_scalar(void)
return 0;
error:
- HDprintf("error !\n");
+ printf("error !\n");
return -1;
}
@@ -6494,7 +6494,7 @@ gent_bigdims(void)
/* create a file */
fid = H5Fcreate(FILE56, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* create dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -6520,7 +6520,7 @@ gent_bigdims(void)
if ((m_sid = H5Screate_simple(1, hs_size, hs_size)) < 0)
goto out;
- buf = (char *)HDmalloc((unsigned)(nelmts * size));
+ buf = (char *)malloc((unsigned)(nelmts * size));
for (i = 0, c = 0; i < nelmts; i++, c++) {
buf[i] = c;
@@ -6531,7 +6531,7 @@ gent_bigdims(void)
if (H5Dwrite(did, H5T_NATIVE_SCHAR, m_sid, f_sid, H5P_DEFAULT, buf) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
/* close */
@@ -6552,12 +6552,12 @@ gent_bigdims(void)
did = H5I_INVALID_HID;
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
return;
out:
- HDprintf("Error.....\n");
+ printf("Error.....\n");
H5E_BEGIN_TRY
{
H5Pclose(dcpl);
@@ -6586,20 +6586,20 @@ gent_hyperslab(void)
int i;
int H5_ATTR_NDEBUG_UNUSED ret;
- buf = (double *)HDmalloc(32 * 4097 * sizeof(double));
+ buf = (double *)malloc(32 * 4097 * sizeof(double));
for (i = 0; i < 32 * 4097; i++)
buf[i] = 1;
/* create a file */
fid = H5Fcreate(FILE57, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
write_dset(fid, 2, dims, "stripmine", H5T_NATIVE_DOUBLE, buf);
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
- HDfree(buf);
+ free(buf);
}
/*-------------------------------------------------------------------------
@@ -6744,7 +6744,7 @@ gent_group_creation_order(void)
return;
out:
- HDprintf("Error.....\n");
+ printf("Error.....\n");
H5E_BEGIN_TRY
{
H5Gclose(gid);
@@ -7000,7 +7000,7 @@ gent_attr_creation_order(void)
return;
out:
- HDprintf("Error.....\n");
+ printf("Error.....\n");
H5E_BEGIN_TRY
{
H5Gclose(gid);
@@ -7479,15 +7479,15 @@ gent_packedbits(void)
H5Dclose(dataset);
H5Fclose(fid);
- HDfree(dsetu8);
- HDfree(dsetu16);
- HDfree(dsetu32);
- HDfree(dsetu64);
- HDfree(dset8);
- HDfree(dset16);
- HDfree(dset32);
- HDfree(dset64);
- HDfree(dsetdbl);
+ free(dsetu8);
+ free(dsetu16);
+ free(dsetu32);
+ free(dsetu64);
+ free(dset8);
+ free(dset16);
+ free(dset32);
+ free(dset64);
+ free(dsetdbl);
}
/*-------------------------------------------------------------------------
@@ -7733,15 +7733,15 @@ gent_attr_intsize(void)
H5Gclose(root);
H5Fclose(fid);
- HDfree(dsetu8);
- HDfree(dsetu16);
- HDfree(dsetu32);
- HDfree(dsetu64);
- HDfree(dset8);
- HDfree(dset16);
- HDfree(dset32);
- HDfree(dset64);
- HDfree(dsetdbl);
+ free(dsetu8);
+ free(dsetu16);
+ free(dsetu32);
+ free(dsetu64);
+ free(dset8);
+ free(dset16);
+ free(dset32);
+ free(dset64);
+ free(dsetdbl);
}
static void
@@ -7858,17 +7858,17 @@ gent_charsets(void)
sid = H5Screate_simple(1, dim, NULL);
fid = H5Fcreate(FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
status = H5Tset_cset(ascii_dtid, H5T_CSET_ASCII);
- HDassert(status >= 0);
+ assert(status >= 0);
H5Tinsert(charset_dtid, "ascii", HOFFSET(CharSetInfo, ascii_p_), ascii_dtid);
status = H5Tset_cset(utf8_dtid, H5T_CSET_UTF8);
- HDassert(status >= 0);
+ assert(status >= 0);
H5Tinsert(charset_dtid, "utf8", HOFFSET(CharSetInfo, utf8_p_), utf8_dtid);
did = H5Dcreate2(fid, "CharSets", charset_dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, charset_dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, writeData);
- HDassert(status >= 0);
+ assert(status >= 0);
H5Tclose(charset_dtid);
H5Tclose(ascii_dtid);
@@ -7925,8 +7925,8 @@ gent_compound_intsizes(void)
int m, n, o; /* Array init loop vars */
/* Allocate buffer */
- Array1 = (Array1Struct *)HDmalloc(sizeof(Array1Struct) * F70_LENGTH);
- HDassert(Array1);
+ Array1 = (Array1Struct *)malloc(sizeof(Array1Struct) * F70_LENGTH);
+ assert(Array1);
/* Initialize the data in the arrays/datastructure */
for (m = 0; m < F70_LENGTH; m++) {
@@ -8038,128 +8038,128 @@ gent_compound_intsizes(void)
/* Create the array data type for the 8 bits signed int array */
array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F70_ARRAY_RANK, array_dim8);
- HDassert(array8_tid >= 0);
+ assert(array8_tid >= 0);
/* Create the array data type for the 16 bits signed int array */
array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F70_ARRAY_RANK, array_dim16);
- HDassert(array16_tid >= 0);
+ assert(array16_tid >= 0);
/* Create the array data type for the 32 bits signed int array */
array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F70_ARRAY_RANK, array_dim32);
- HDassert(array32_tid >= 0);
+ assert(array32_tid >= 0);
/* Create the array data type for the 64 bits signed int array */
array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F70_ARRAY_RANK, array_dim64);
- HDassert(array64_tid >= 0);
+ assert(array64_tid >= 0);
/* Create the array data type for the 8 bits signed int array */
arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F70_ARRAY_RANK, array_dim8);
- HDassert(arrayu8_tid >= 0);
+ assert(arrayu8_tid >= 0);
/* Create the array data type for the 16 bits signed int array */
arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F70_ARRAY_RANK, array_dim16);
- HDassert(arrayu16_tid >= 0);
+ assert(arrayu16_tid >= 0);
/* Create the array data type for the 32 bits signed int array */
arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F70_ARRAY_RANK, array_dim32);
- HDassert(arrayu32_tid >= 0);
+ assert(arrayu32_tid >= 0);
/* Create the array data type for the 64 bits signed int array */
arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F70_ARRAY_RANK, array_dim64);
- HDassert(arrayu64_tid >= 0);
+ assert(arrayu64_tid >= 0);
/* Create the array data type for the 32 bits double array */
arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F70_ARRAY_RANK, array_dim8);
- HDassert(arraydbl_tid >= 0);
+ assert(arraydbl_tid >= 0);
/* Create the dataspace */
space = H5Screate_simple(F70_RANK, dim, NULL);
- HDassert(space >= 0);
+ assert(space >= 0);
/* Create the file */
fid = H5Fcreate(FILE70, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Create the memory data type */
Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct));
- HDassert(Array1Structid >= 0);
+ assert(Array1Structid >= 0);
/* Insert the arrays and variables into the structure */
status = H5Tinsert(Array1Structid, F70_DATASETU08, HOFFSET(Array1Struct, dsetu8), arrayu8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETU16, HOFFSET(Array1Struct, dsetu16), arrayu16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETU32, HOFFSET(Array1Struct, dsetu32), arrayu32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETU64, HOFFSET(Array1Struct, dsetu64), arrayu64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETS08, HOFFSET(Array1Struct, dset8), array8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETS16, HOFFSET(Array1Struct, dset16), array16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETS32, HOFFSET(Array1Struct, dset32), array32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETS64, HOFFSET(Array1Struct, dset64), array64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DUMMYDBL, HOFFSET(Array1Struct, dsetdbl), arraydbl_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create the dataset */
dataset = H5Dcreate2(fid, F70_DATASETNAME, Array1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write data to the dataset */
status = H5Dwrite(dataset, Array1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Array1);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Release resources */
status = H5Tclose(Array1Structid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arraydbl_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Sclose(space);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(dataset);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Fclose(fid);
- HDassert(status >= 0);
+ assert(status >= 0);
- HDfree(Array1);
+ free(Array1);
}
static void
@@ -8208,7 +8208,7 @@ gent_compound_attr_intsizes(void)
int m, n, o; /* Array init loop vars */
- Array1 = (Array1Struct *)HDcalloc(F70_LENGTH, sizeof(Array1Struct));
+ Array1 = (Array1Struct *)calloc(F70_LENGTH, sizeof(Array1Struct));
/* Initialize the data in the arrays/datastructure */
for (m = 0; m < F70_LENGTH; m++) {
@@ -8328,79 +8328,79 @@ gent_compound_attr_intsizes(void)
/* Create the array data type for the 8 bits signed int array */
array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F70_ARRAY_RANK, array_dim8);
- HDassert(array8_tid >= 0);
+ assert(array8_tid >= 0);
/* Create the array data type for the 16 bits signed int array */
array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F70_ARRAY_RANK, array_dim16);
- HDassert(array16_tid >= 0);
+ assert(array16_tid >= 0);
/* Create the array data type for the 32 bits signed int array */
array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F70_ARRAY_RANK, array_dim32);
- HDassert(array32_tid >= 0);
+ assert(array32_tid >= 0);
/* Create the array data type for the 64 bits signed int array */
array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F70_ARRAY_RANK, array_dim64);
- HDassert(array64_tid >= 0);
+ assert(array64_tid >= 0);
/* Create the array data type for the 8 bits signed int array */
arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F70_ARRAY_RANK, array_dim8);
- HDassert(arrayu8_tid >= 0);
+ assert(arrayu8_tid >= 0);
/* Create the array data type for the 16 bits signed int array */
arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F70_ARRAY_RANK, array_dim16);
- HDassert(arrayu16_tid >= 0);
+ assert(arrayu16_tid >= 0);
/* Create the array data type for the 32 bits signed int array */
arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F70_ARRAY_RANK, array_dim32);
- HDassert(arrayu32_tid >= 0);
+ assert(arrayu32_tid >= 0);
/* Create the array data type for the 64 bits signed int array */
arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F70_ARRAY_RANK, array_dim64);
- HDassert(arrayu64_tid >= 0);
+ assert(arrayu64_tid >= 0);
/* Create the array data type for the 32 bits double array */
arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F70_ARRAY_RANK, array_dim8);
- HDassert(arraydbl_tid >= 0);
+ assert(arraydbl_tid >= 0);
/* Create the dataspace */
space = H5Screate_simple(F70_RANK, dim, NULL);
- HDassert(space >= 0);
+ assert(space >= 0);
/* Create the file */
fid = H5Fcreate(FILE71, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Create the memory data type */
Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct));
- HDassert(Array1Structid >= 0);
+ assert(Array1Structid >= 0);
/* Insert the arrays and variables into the structure */
status = H5Tinsert(Array1Structid, F70_DATASETU08, HOFFSET(Array1Struct, dsetu8), arrayu8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETU16, HOFFSET(Array1Struct, dsetu16), arrayu16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETU32, HOFFSET(Array1Struct, dsetu32), arrayu32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETU64, HOFFSET(Array1Struct, dsetu64), arrayu64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETS08, HOFFSET(Array1Struct, dset8), array8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETS16, HOFFSET(Array1Struct, dset16), array16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETS32, HOFFSET(Array1Struct, dset32), array32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DATASETS64, HOFFSET(Array1Struct, dset64), array64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Array1Structid, F70_DUMMYDBL, HOFFSET(Array1Struct, dsetdbl), arraydbl_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
root = H5Gopen2(fid, "/", H5P_DEFAULT);
@@ -8409,49 +8409,49 @@ gent_compound_attr_intsizes(void)
/* Write data to the attribute */
status = H5Awrite(attr, Array1Structid, Array1);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arraydbl_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Release resources */
status = H5Tclose(Array1Structid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Sclose(space);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Aclose(attr);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Fclose(fid);
- HDassert(status >= 0);
+ assert(status >= 0);
- HDfree(Array1);
+ free(Array1);
}
static void
@@ -8854,15 +8854,15 @@ gent_intscalars(void)
H5Dclose(dataset);
H5Fclose(fid);
- HDfree(dsetu8);
- HDfree(dsetu16);
- HDfree(dsetu32);
- HDfree(dsetu64);
- HDfree(dset8);
- HDfree(dset16);
- HDfree(dset32);
- HDfree(dset64);
- HDfree(dsetdbl);
+ free(dsetu8);
+ free(dsetu16);
+ free(dsetu32);
+ free(dsetu64);
+ free(dset8);
+ free(dset16);
+ free(dset32);
+ free(dset64);
+ free(dsetdbl);
}
/*-------------------------------------------------------------------------
@@ -9118,15 +9118,15 @@ gent_attr_intscalars(void)
H5Gclose(root);
H5Fclose(fid);
- HDfree(dsetu8);
- HDfree(dsetu16);
- HDfree(dsetu32);
- HDfree(dsetu64);
- HDfree(dset8);
- HDfree(dset16);
- HDfree(dset32);
- HDfree(dset64);
- HDfree(dsetdbl);
+ free(dsetu8);
+ free(dsetu16);
+ free(dsetu32);
+ free(dsetu64);
+ free(dset8);
+ free(dset16);
+ free(dset32);
+ free(dset64);
+ free(dsetdbl);
}
/*-------------------------------------------------------------------------
@@ -9229,8 +9229,8 @@ gent_compound_int_array(void)
int m, n; /* Array init loop vars */
/* Allocate buffer */
- Cmpd1 = (Cmpd1Struct *)HDmalloc(sizeof(Cmpd1Struct) * F76_LENGTH);
- HDassert(Cmpd1);
+ Cmpd1 = (Cmpd1Struct *)malloc(sizeof(Cmpd1Struct) * F76_LENGTH);
+ assert(Cmpd1);
/* Initialize the data in the arrays/datastructure */
for (m = 0; m < F76_LENGTH; m++) {
@@ -9316,128 +9316,128 @@ gent_compound_int_array(void)
/* Create the array data type for the 8 bits signed int array */
array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F76_ARRAY_RANK, array_dim8);
- HDassert(array8_tid >= 0);
+ assert(array8_tid >= 0);
/* Create the array data type for the 16 bits signed int array */
array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F76_ARRAY_RANK, array_dim16);
- HDassert(array16_tid >= 0);
+ assert(array16_tid >= 0);
/* Create the array data type for the 32 bits signed int array */
array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F76_ARRAY_RANK, array_dim32);
- HDassert(array32_tid >= 0);
+ assert(array32_tid >= 0);
/* Create the array data type for the 64 bits signed int array */
array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F76_ARRAY_RANK, array_dim64);
- HDassert(array64_tid >= 0);
+ assert(array64_tid >= 0);
/* Create the array data type for the 8 bits signed int array */
arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F76_ARRAY_RANK, array_dim8);
- HDassert(arrayu8_tid >= 0);
+ assert(arrayu8_tid >= 0);
/* Create the array data type for the 16 bits signed int array */
arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F76_ARRAY_RANK, array_dim16);
- HDassert(arrayu16_tid >= 0);
+ assert(arrayu16_tid >= 0);
/* Create the array data type for the 32 bits signed int array */
arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F76_ARRAY_RANK, array_dim32);
- HDassert(arrayu32_tid >= 0);
+ assert(arrayu32_tid >= 0);
/* Create the array data type for the 64 bits signed int array */
arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F76_ARRAY_RANK, array_dim64);
- HDassert(arrayu64_tid >= 0);
+ assert(arrayu64_tid >= 0);
/* Create the array data type for the 32 bits double array */
arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F76_ARRAY_RANK, array_dim8);
- HDassert(arraydbl_tid >= 0);
+ assert(arraydbl_tid >= 0);
/* Create the dataspace */
space = H5Screate_simple(F76_RANK, dim, NULL);
- HDassert(space >= 0);
+ assert(space >= 0);
/* Create the file */
fid = H5Fcreate(FILE76, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Create the memory data type */
Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct));
- HDassert(Cmpd1Structid >= 0);
+ assert(Cmpd1Structid >= 0);
/* Insert the arrays and variables into the structure */
status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), arrayu8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), arrayu16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), arrayu32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), arrayu64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), array8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), array16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), array32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), array64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), arraydbl_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create the dataset */
dataset = H5Dcreate2(fid, F76_DATASETNAME, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write data to the dataset */
status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Release resources */
status = H5Tclose(Cmpd1Structid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arrayu64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array8_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array16_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array32_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(array64_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tclose(arraydbl_tid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Sclose(space);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(dataset);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Fclose(fid);
- HDassert(status >= 0);
+ assert(status >= 0);
- HDfree(Cmpd1);
+ free(Cmpd1);
}
static void
@@ -9487,10 +9487,10 @@ gent_compound_ints(void)
int m; /* Array init loop vars */
/* Allocate buffers */
- Cmpd1 = (Cmpd1Struct *)HDmalloc(sizeof(Cmpd1Struct) * F77_LENGTH);
- HDassert(Cmpd1);
- Cmpd2 = (Cmpd2Struct *)HDmalloc(sizeof(Cmpd2Struct) * F77_LENGTH);
- HDassert(Cmpd2);
+ Cmpd1 = (Cmpd1Struct *)malloc(sizeof(Cmpd1Struct) * F77_LENGTH);
+ assert(Cmpd1);
+ Cmpd2 = (Cmpd2Struct *)malloc(sizeof(Cmpd2Struct) * F77_LENGTH);
+ assert(Cmpd2);
/* Initialize the data in the arrays/datastructure */
for (m = 0; m < F77_LENGTH; m++) {
@@ -9558,119 +9558,119 @@ gent_compound_ints(void)
/* Create the dataspace */
space = H5Screate_simple(F76_RANK, dim, NULL);
- HDassert(space >= 0);
+ assert(space >= 0);
/* Create the file */
fid = H5Fcreate(FILE77, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Create the memory data type */
Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct));
- HDassert(Cmpd1Structid >= 0);
+ assert(Cmpd1Structid >= 0);
/* Insert the arrays and variables into the structure */
status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), H5T_NATIVE_UCHAR);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), H5T_NATIVE_USHORT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), H5T_NATIVE_UINT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), H5T_NATIVE_ULONG);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), H5T_NATIVE_SCHAR);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), H5T_NATIVE_SHORT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), H5T_NATIVE_INT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), H5T_NATIVE_LONG);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), H5T_NATIVE_DOUBLE);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create the dataset */
dataset = H5Dcreate2(fid, F77_DATASETNAME1, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write data to the dataset */
status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Release resources */
status = H5Tclose(Cmpd1Structid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Sclose(space);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(dataset);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create the dataspace */
space = H5Screate_simple(F76_RANK, dim, NULL);
- HDassert(space >= 0);
+ assert(space >= 0);
/* Create the memory data type */
Cmpd2Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd2Struct));
- HDassert(Cmpd2Structid >= 0);
+ assert(Cmpd2Structid >= 0);
/* Insert the arrays and variables into the structure */
status = H5Tinsert(Cmpd2Structid, F76_DATASETU64, HOFFSET(Cmpd2Struct, dsetu64), H5T_NATIVE_ULONG);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd2Structid, F76_DATASETU32, HOFFSET(Cmpd2Struct, dsetu32), H5T_NATIVE_UINT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd2Structid, F76_DATASETU16, HOFFSET(Cmpd2Struct, dsetu16), H5T_NATIVE_USHORT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd2Structid, F76_DATASETU08, HOFFSET(Cmpd2Struct, dsetu8), H5T_NATIVE_UCHAR);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd2Structid, F76_DATASETS64, HOFFSET(Cmpd2Struct, dset64), H5T_NATIVE_LONG);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd2Structid, F76_DATASETS32, HOFFSET(Cmpd2Struct, dset32), H5T_NATIVE_INT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd2Structid, F76_DATASETS16, HOFFSET(Cmpd2Struct, dset16), H5T_NATIVE_SHORT);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd2Structid, F76_DATASETS08, HOFFSET(Cmpd2Struct, dset8), H5T_NATIVE_SCHAR);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Tinsert(Cmpd2Structid, F76_DUMMYDBL, HOFFSET(Cmpd2Struct, dsetdbl), H5T_NATIVE_DOUBLE);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Create the dataset */
dataset = H5Dcreate2(fid, F77_DATASETNAME2, Cmpd2Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write data to the dataset */
status = H5Dwrite(dataset, Cmpd2Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd2);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Release resources */
status = H5Tclose(Cmpd2Structid);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Sclose(space);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Dclose(dataset);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5Fclose(fid);
- HDassert(status >= 0);
+ assert(status >= 0);
- HDfree(Cmpd1);
- HDfree(Cmpd2);
+ free(Cmpd1);
+ free(Cmpd2);
}
/*-------------------------------------------------------------------------
@@ -9958,15 +9958,15 @@ gent_intattrscalars(void)
H5Dclose(dataset);
H5Fclose(fid);
- HDfree(dsetu8);
- HDfree(dsetu16);
- HDfree(dsetu32);
- HDfree(dsetu64);
- HDfree(dset8);
- HDfree(dset16);
- HDfree(dset32);
- HDfree(dset64);
- HDfree(dsetdbl);
+ free(dsetu8);
+ free(dsetu16);
+ free(dsetu32);
+ free(dsetu64);
+ free(dset8);
+ free(dset16);
+ free(dset32);
+ free(dset64);
+ free(dsetdbl);
}
/*-------------------------------------------------------------------------
@@ -10049,15 +10049,15 @@ gent_intsattrs(void)
dset64 = malloc(sizeof(*dset64));
dsetdbl = malloc(sizeof(*dsetdbl));
- asetu8 = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(uint8_t));
- asetu16 = HDcalloc(F66_XDIM * F66_YDIM16, sizeof(uint16_t));
- asetu32 = HDcalloc(F66_XDIM * F66_YDIM32, sizeof(uint32_t));
- asetu64 = HDcalloc(F66_XDIM * F66_YDIM64, sizeof(uint64_t));
- aset8 = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(int8_t));
- aset16 = HDcalloc(F66_XDIM * F66_YDIM16, sizeof(int16_t));
- aset32 = HDcalloc(F66_XDIM * F66_YDIM32, sizeof(int32_t));
- aset64 = HDcalloc(F66_XDIM * F66_YDIM64, sizeof(int64_t));
- asetdbl = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(double));
+ asetu8 = calloc(F66_XDIM * F66_YDIM8, sizeof(uint8_t));
+ asetu16 = calloc(F66_XDIM * F66_YDIM16, sizeof(uint16_t));
+ asetu32 = calloc(F66_XDIM * F66_YDIM32, sizeof(uint32_t));
+ asetu64 = calloc(F66_XDIM * F66_YDIM64, sizeof(uint64_t));
+ aset8 = calloc(F66_XDIM * F66_YDIM8, sizeof(int8_t));
+ aset16 = calloc(F66_XDIM * F66_YDIM16, sizeof(int16_t));
+ aset32 = calloc(F66_XDIM * F66_YDIM32, sizeof(int32_t));
+ aset64 = calloc(F66_XDIM * F66_YDIM64, sizeof(int64_t));
+ asetdbl = calloc(F66_XDIM * F66_YDIM8, sizeof(double));
fid = H5Fcreate(FILE79, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -10309,25 +10309,25 @@ gent_intsattrs(void)
H5Dclose(dataset);
H5Fclose(fid);
- HDfree(dsetu8);
- HDfree(dsetu16);
- HDfree(dsetu32);
- HDfree(dsetu64);
- HDfree(dset8);
- HDfree(dset16);
- HDfree(dset32);
- HDfree(dset64);
- HDfree(dsetdbl);
-
- HDfree(asetu8);
- HDfree(asetu16);
- HDfree(asetu32);
- HDfree(asetu64);
- HDfree(aset8);
- HDfree(aset16);
- HDfree(aset32);
- HDfree(aset64);
- HDfree(asetdbl);
+ free(dsetu8);
+ free(dsetu16);
+ free(dsetu32);
+ free(dsetu64);
+ free(dset8);
+ free(dset16);
+ free(dset32);
+ free(dset64);
+ free(dsetdbl);
+
+ free(asetu8);
+ free(asetu16);
+ free(asetu32);
+ free(asetu64);
+ free(aset8);
+ free(aset16);
+ free(aset32);
+ free(aset64);
+ free(asetdbl);
}
/*-------------------------------------------------------------------------
@@ -10374,9 +10374,9 @@ gent_floatsattrs(void)
dset64 = malloc(sizeof(*dset64));
dset128 = malloc(sizeof(*dset128));
- aset32 = HDcalloc(F89_XDIM * F89_YDIM32, sizeof(float));
- aset64 = HDcalloc(F89_XDIM * F89_YDIM64, sizeof(double));
- aset128 = HDcalloc(F89_XDIM * F89_YDIM128, sizeof(long double));
+ aset32 = calloc(F89_XDIM * F89_YDIM32, sizeof(float));
+ aset64 = calloc(F89_XDIM * F89_YDIM64, sizeof(double));
+ aset128 = calloc(F89_XDIM * F89_YDIM128, sizeof(long double));
fid = H5Fcreate(FILE89, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -10473,13 +10473,13 @@ gent_floatsattrs(void)
error:
H5Fclose(fid);
- HDfree(dset32);
- HDfree(dset64);
- HDfree(dset128);
+ free(dset32);
+ free(dset64);
+ free(dset128);
- HDfree(aset32);
- HDfree(aset64);
- HDfree(aset128);
+ free(aset32);
+ free(aset64);
+ free(aset128);
}
static void
@@ -10754,8 +10754,8 @@ gent_compound_complex2(void)
hsize_t nelmts = F82_DIM32;
/* Allocate buffer */
- buf = (compound *)HDmalloc(sizeof(compound) * F82_DIM32);
- HDassert(buf);
+ buf = (compound *)malloc(sizeof(compound) * F82_DIM32);
+ assert(buf);
file = H5Fcreate(FILE82, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -10930,7 +10930,7 @@ gent_compound_complex2(void)
}
if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- HDfprintf(stderr, "gent_tcompound_complex2 H5Dwrite failed\n");
+ fprintf(stderr, "gent_tcompound_complex2 H5Dwrite failed\n");
H5Dclose(dset);
}
@@ -11010,7 +11010,7 @@ gent_compound_complex2(void)
*/
H5Fclose(file);
- HDfree(buf);
+ free(buf);
}
/*-------------------------------------------------------------------------
@@ -11061,7 +11061,7 @@ gent_vlenstr_array(void)
if ((dset = H5Dcreate2(file, F83_DATASETNAME, type, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) >= 0) {
if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer) < 0)
- HDfprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n");
+ fprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n");
H5Dclose(dset);
}
@@ -11083,7 +11083,7 @@ gent_vlenstr_array(void)
if ((dset = H5Dcreate2(file, F83_DATASETNAME2, type, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) >= 0) {
if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- HDfprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n");
+ fprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n");
H5Dclose(dset);
}
@@ -11124,54 +11124,54 @@ gent_udfilter(void)
/* create a file */
fid = H5Fcreate(FILE84, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* create a space */
sid = H5Screate_simple(SPACE2_RANK, dims1, NULL);
dcpl = H5Pcreate(H5P_DATASET_CREATE);
- HDassert(dcpl >= 0);
+ assert(dcpl >= 0);
ret = H5Pset_layout(dcpl, H5D_CHUNKED);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Zregister(H5Z_DYNLIBUD);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pset_filter(dcpl, H5Z_FILTER_DYNLIBUD, H5Z_FLAG_MANDATORY, 0, NULL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* create the dataset */
dsid = H5Dcreate2(fid, "dynlibud", H5T_STD_I32LE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- HDassert(dsid >= 0);
+ assert(dsid >= 0);
/* write */
ret = H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* close */
ret = H5Dclose(dsid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* close
*-------------------------------------------------------------------------
*/
ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Pclose(dcpl);
- HDassert(ret >= 0);
+ assert(ret >= 0);
ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -11367,17 +11367,17 @@ onion_filepaths_init(const char *basename)
{
struct onion_filepaths *paths = NULL;
- if (NULL == (paths = HDcalloc(1, sizeof(struct onion_filepaths))))
+ if (NULL == (paths = calloc(1, sizeof(struct onion_filepaths))))
goto error;
if (NULL == (paths->canon = HDstrdup(basename)))
goto error;
- if (NULL == (paths->onion = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
+ if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
goto error;
HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
- if (NULL == (paths->recovery = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
+ 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);
@@ -11385,10 +11385,10 @@ onion_filepaths_init(const char *basename)
error:
if (paths != NULL) {
- HDfree(paths->canon);
- HDfree(paths->onion);
- HDfree(paths->recovery);
- HDfree(paths);
+ free(paths->canon);
+ free(paths->onion);
+ free(paths->recovery);
+ free(paths);
}
return NULL;
}
@@ -11397,10 +11397,10 @@ static void
onion_filepaths_destroy(struct onion_filepaths *s)
{
if (s) {
- HDfree(s->canon);
- HDfree(s->onion);
- HDfree(s->recovery);
- HDfree(s);
+ free(s->canon);
+ free(s->onion);
+ free(s->recovery);
+ free(s);
}
}
diff --git a/tools/test/h5format_convert/h5fc_chk_idx.c b/tools/test/h5format_convert/h5fc_chk_idx.c
index 97688ad..49fbbab 100644
--- a/tools/test/h5format_convert/h5fc_chk_idx.c
+++ b/tools/test/h5format_convert/h5fc_chk_idx.c
@@ -25,7 +25,7 @@ static void usage(void);
static void
usage(void)
{
- HDfprintf(stdout, "Usage: h5fc_chk_idx file_name dataset_pathname\n");
+ fprintf(stdout, "Usage: h5fc_chk_idx file_name dataset_pathname\n");
} /* usage() */
/*-------------------------------------------------------------------------
@@ -51,7 +51,7 @@ main(int argc, char *argv[])
/* h5fc_chk_idx fname dname */
if (argc != 3) {
usage();
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
/* Duplicate the file name & dataset name */
@@ -60,40 +60,40 @@ main(int argc, char *argv[])
/* Try opening the file */
if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
- HDfprintf(stderr, "h5fc_chk_idx: unable to open the file\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "h5fc_chk_idx: unable to open the file\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Open the dataset */
if ((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0) {
- HDfprintf(stderr, "h5fc_chk_idx: unable to open the dataset\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "h5fc_chk_idx: unable to open the dataset\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Get the dataset's chunk indexing type */
if (H5Dget_chunk_index_type(did, &idx_type) < 0) {
- HDfprintf(stderr, "h5fc_chk_idx: unable to get chunk index type for the dataset\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "h5fc_chk_idx: unable to get chunk index type for the dataset\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Close the dataset */
if (H5Dclose(did) < 0) {
- HDfprintf(stderr, "h5fc_chk_idx: unable to close the dataset\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "h5fc_chk_idx: unable to close the dataset\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Close the file */
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "h5fc_chk_idx_type: cannot close the file\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "h5fc_chk_idx_type: cannot close the file\n");
+ exit(EXIT_FAILURE);
} /* end if */
/* Return success when the chunk indexing type is version 1 B-tree */
if (idx_type == H5D_CHUNK_IDX_BTREE)
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
else {
- HDfprintf(stderr, "Error: chunk indexing type is %d\n", idx_type);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error: chunk indexing type is %d\n", idx_type);
+ exit(EXIT_FAILURE);
} /* end if */
} /* main() */
diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c
index 26ee4ca..56287cf 100644
--- a/tools/test/h5format_convert/h5fc_gentest.c
+++ b/tools/test/h5format_convert/h5fc_gentest.c
@@ -423,8 +423,8 @@ gen_err_level(const char *fname)
goto error;
/* Initialize data buffer */
- buf = (unsigned char *)HDmalloc(NUM * sizeof(unsigned char *));
- HDmemset(buf, 42, NUM * sizeof(unsigned char));
+ buf = (unsigned char *)malloc(NUM * sizeof(unsigned char *));
+ memset(buf, 42, NUM * sizeof(unsigned char));
/* Create the test file */
if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
@@ -797,7 +797,7 @@ main(void)
for (i = 0; i < 8; i++) {
char filename[50];
- HDmemset(filename, 0, sizeof(filename));
+ memset(filename, 0, sizeof(filename));
if (!new_format)
HDstrcat(filename, "old_");
HDstrcat(filename, FILENAME[i]);
diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c
index b05ea82..1919e5b 100644
--- a/tools/test/h5import/h5importtest.c
+++ b/tools/test/h5import/h5importtest.c
@@ -159,12 +159,12 @@ main(void)
*-------------------------------------------------------------------------
*/
- sp = HDfopen("txtin8.txt", "w");
+ sp = fopen("txtin8.txt", "w");
for (k = 0; k < npln; k++) {
for (i = 0; i < nrow; i++) {
for (j = 0; j < ncol; j++)
- (void)HDfprintf(sp, "%10u", b8i3[k][i][j]);
- (void)HDfprintf(sp, "\n");
+ (void)fprintf(sp, "%10u", b8i3[k][i][j]);
+ (void)fprintf(sp, "\n");
}
}
(void)HDfclose(sp);
@@ -174,12 +174,12 @@ main(void)
*-------------------------------------------------------------------------
*/
- sp = HDfopen("txtin16.txt", "w");
+ sp = fopen("txtin16.txt", "w");
for (k = 0; k < npln; k++) {
for (i = 0; i < nrow; i++) {
for (j = 0; j < ncol; j++)
- (void)HDfprintf(sp, "%10u", b16i3[k][i][j]);
- (void)HDfprintf(sp, "\n");
+ (void)fprintf(sp, "%10u", b16i3[k][i][j]);
+ (void)fprintf(sp, "\n");
}
}
(void)HDfclose(sp);
@@ -189,12 +189,12 @@ main(void)
*-------------------------------------------------------------------------
*/
- sp = HDfopen("txtin32.txt", "w");
+ sp = fopen("txtin32.txt", "w");
for (k = 0; k < npln; k++) {
for (i = 0; i < nrow; i++) {
for (j = 0; j < ncol; j++)
- (void)HDfprintf(sp, "%10d", b32i3[k][i][j]);
- (void)HDfprintf(sp, "\n");
+ (void)fprintf(sp, "%10d", b32i3[k][i][j]);
+ (void)fprintf(sp, "\n");
}
}
(void)HDfclose(sp);
@@ -205,7 +205,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- sp = HDfopen("binin32.bin", OPEN_FLAGS);
+ sp = fopen("binin32.bin", OPEN_FLAGS);
for (k = 0; k < npln; k++) {
for (i = 0; i < nrow; i++) {
for (j = 0; j < ncol; j++) {
@@ -215,17 +215,17 @@ main(void)
}
(void)HDfclose(sp);
- sp = HDfopen("binin32.conf", "w");
- (void)HDfprintf(sp, "PATH /int/bin/32-bit\n");
- (void)HDfprintf(sp, "INPUT-CLASS IN\n");
- (void)HDfprintf(sp, "INPUT-SIZE 32\n");
- (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void)HDfprintf(sp, "RANK 3\n");
- (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
- (void)HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 1 2 1\n");
- (void)HDfprintf(sp, "\n");
+ sp = fopen("binin32.conf", "w");
+ (void)fprintf(sp, "PATH /int/bin/32-bit\n");
+ (void)fprintf(sp, "INPUT-CLASS IN\n");
+ (void)fprintf(sp, "INPUT-SIZE 32\n");
+ (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void)fprintf(sp, "RANK 3\n");
+ (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void)fprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
+ (void)fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 1 2 1\n");
+ (void)fprintf(sp, "\n");
(void)HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -233,7 +233,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- sp = HDfopen("binuin32.bin", OPEN_FLAGS);
+ sp = fopen("binuin32.bin", OPEN_FLAGS);
for (k = 0; k < npln; k++) {
for (i = 0; i < nrow; i++) {
for (j = 0; j < ncol; j++) {
@@ -243,16 +243,16 @@ main(void)
}
(void)HDfclose(sp);
- sp = HDfopen("binuin32.conf", "w");
- (void)HDfprintf(sp, "PATH /int/buin/32-bit\n");
- (void)HDfprintf(sp, "INPUT-CLASS UIN\n");
- (void)HDfprintf(sp, "INPUT-SIZE 32\n");
- (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void)HDfprintf(sp, "RANK 3\n");
- (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void)HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void)HDfprintf(sp, "\n");
+ sp = fopen("binuin32.conf", "w");
+ (void)fprintf(sp, "PATH /int/buin/32-bit\n");
+ (void)fprintf(sp, "INPUT-CLASS UIN\n");
+ (void)fprintf(sp, "INPUT-SIZE 32\n");
+ (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void)fprintf(sp, "RANK 3\n");
+ (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void)fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void)fprintf(sp, "\n");
(void)HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -260,7 +260,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- sp = HDfopen("binin16.bin", OPEN_FLAGS);
+ sp = fopen("binin16.bin", OPEN_FLAGS);
for (k = 0; k < npln; k++) {
for (i = 0; i < nrow; i++) {
for (j = 0; j < ncol; j++) {
@@ -270,25 +270,25 @@ main(void)
}
(void)HDfclose(sp);
- sp = HDfopen("binin16.conf", "w");
- (void)HDfprintf(sp, "PATH /int/bin/16-bit\n");
- (void)HDfprintf(sp, "INPUT-CLASS IN\n");
- (void)HDfprintf(sp, "INPUT-SIZE 16\n");
- (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void)HDfprintf(sp, "RANK 3\n");
- (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void)HDfprintf(sp, "DIMENSION-SIZES 2 3 4\n");
- (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void)HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
- (void)HDfprintf(sp, "\n");
+ sp = fopen("binin16.conf", "w");
+ (void)fprintf(sp, "PATH /int/bin/16-bit\n");
+ (void)fprintf(sp, "INPUT-CLASS IN\n");
+ (void)fprintf(sp, "INPUT-SIZE 16\n");
+ (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void)fprintf(sp, "RANK 3\n");
+ (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void)fprintf(sp, "DIMENSION-SIZES 2 3 4\n");
+ (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void)fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
+ (void)fprintf(sp, "\n");
(void)HDfclose(sp);
/*-------------------------------------------------------------------------
* TOOLTEST binuin16.bin -c binuin16.conf -o binuin16.h5
*-------------------------------------------------------------------------
*/
- sp = HDfopen("binuin16.bin", OPEN_FLAGS);
+ sp = fopen("binuin16.bin", OPEN_FLAGS);
for (k = 0; k < npln; k++) {
for (i = 0; i < nrow; i++) {
for (j = 0; j < ncol; j++) {
@@ -298,18 +298,18 @@ main(void)
}
(void)HDfclose(sp);
- sp = HDfopen("binuin16.conf", "w");
- (void)HDfprintf(sp, "PATH /int/buin/16-bit\n");
- (void)HDfprintf(sp, "INPUT-CLASS UIN\n");
- (void)HDfprintf(sp, "INPUT-SIZE 16\n");
- (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void)HDfprintf(sp, "RANK 3\n");
- (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
- (void)HDfprintf(sp, "DIMENSION-SIZES 2 3 4\n");
- (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void)HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
- (void)HDfprintf(sp, "\n");
+ sp = fopen("binuin16.conf", "w");
+ (void)fprintf(sp, "PATH /int/buin/16-bit\n");
+ (void)fprintf(sp, "INPUT-CLASS UIN\n");
+ (void)fprintf(sp, "INPUT-SIZE 16\n");
+ (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void)fprintf(sp, "RANK 3\n");
+ (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void)fprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
+ (void)fprintf(sp, "DIMENSION-SIZES 2 3 4\n");
+ (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void)fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
+ (void)fprintf(sp, "\n");
(void)HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -317,7 +317,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- sp = HDfopen("binin8.bin", OPEN_FLAGS);
+ sp = fopen("binin8.bin", OPEN_FLAGS);
for (k = 0; k < npln; k++) {
for (i = 0; i < nrow; i++) {
for (j = 0; j < ncol; j++) {
@@ -327,21 +327,21 @@ main(void)
}
(void)HDfclose(sp);
- sp = HDfopen("binin8.conf", "w");
- (void)HDfprintf(sp, "PATH /int/bin/8-bit\n");
- (void)HDfprintf(sp, "INPUT-CLASS IN\n");
- (void)HDfprintf(sp, "INPUT-SIZE 8\n");
- (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void)HDfprintf(sp, "RANK 3\n");
- (void)HDfprintf(sp, "OUTPUT-CLASS IN\n");
- (void)HDfprintf(sp, "OUTPUT-SIZE 16\n");
- (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void)HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void)HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 -1\n");
- (void)HDfprintf(sp, "COMPRESSION-PARAM 3\n");
- (void)HDfprintf(sp, "\n");
+ sp = fopen("binin8.conf", "w");
+ (void)fprintf(sp, "PATH /int/bin/8-bit\n");
+ (void)fprintf(sp, "INPUT-CLASS IN\n");
+ (void)fprintf(sp, "INPUT-SIZE 8\n");
+ (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void)fprintf(sp, "RANK 3\n");
+ (void)fprintf(sp, "OUTPUT-CLASS IN\n");
+ (void)fprintf(sp, "OUTPUT-SIZE 16\n");
+ (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void)fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void)fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 -1\n");
+ (void)fprintf(sp, "COMPRESSION-PARAM 3\n");
+ (void)fprintf(sp, "\n");
(void)HDfclose(sp);
#endif /* UNICOS */
@@ -355,7 +355,7 @@ main(void)
* binary 64-bit file - rank 2 & 3
*/
- sp = HDfopen("binfp64.bin", OPEN_FLAGS);
+ sp = fopen("binfp64.bin", OPEN_FLAGS);
for (k = 0; k < npln; k++) {
for (i = 0; i < nrow; i++) {
for (j = 0; j < ncol; j++) {
@@ -365,19 +365,19 @@ main(void)
}
(void)HDfclose(sp);
- sp = HDfopen("binfp64.conf", "w");
- (void)HDfprintf(sp, "PATH /fp/bin/64-bit\n");
- (void)HDfprintf(sp, "INPUT-CLASS FP\n");
- (void)HDfprintf(sp, "INPUT-SIZE 64\n");
- (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void)HDfprintf(sp, "RANK 3\n");
- (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE IEEE\n");
- (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void)HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void)HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 6 7\n");
- (void)HDfprintf(sp, "COMPRESSION-PARAM 8\n");
- (void)HDfprintf(sp, "\n");
+ sp = fopen("binfp64.conf", "w");
+ (void)fprintf(sp, "PATH /fp/bin/64-bit\n");
+ (void)fprintf(sp, "INPUT-CLASS FP\n");
+ (void)fprintf(sp, "INPUT-SIZE 64\n");
+ (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void)fprintf(sp, "RANK 3\n");
+ (void)fprintf(sp, "OUTPUT-ARCHITECTURE IEEE\n");
+ (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void)fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void)fprintf(sp, "MAXIMUM-DIMENSIONS -1 6 7\n");
+ (void)fprintf(sp, "COMPRESSION-PARAM 8\n");
+ (void)fprintf(sp, "\n");
(void)HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -389,25 +389,25 @@ main(void)
/* test CR+LF (13,10) and EOF (26) in windows */
char bin8w[4] = {13, 10, 26, 0};
- sp = HDfopen("binin8w.bin", OPEN_FLAGS);
+ sp = fopen("binin8w.bin", OPEN_FLAGS);
for (i = 0; i < 4; i++) {
char c = bin8w[i];
if (HDfwrite(&c, sizeof(char), 1, sp) != 1)
- HDprintf("error writing file\n");
+ printf("error writing file\n");
}
HDfclose(sp);
- sp = HDfopen("binin8w.conf", "w");
- (void)HDfprintf(sp, "INPUT-CLASS IN\n");
- (void)HDfprintf(sp, "INPUT-SIZE 8\n");
- (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void)HDfprintf(sp, "RANK 1\n");
- (void)HDfprintf(sp, "OUTPUT-CLASS IN\n");
- (void)HDfprintf(sp, "OUTPUT-SIZE 8\n");
- (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void)HDfprintf(sp, "DIMENSION-SIZES 4\n");
- (void)HDfprintf(sp, "\n");
+ sp = fopen("binin8w.conf", "w");
+ (void)fprintf(sp, "INPUT-CLASS IN\n");
+ (void)fprintf(sp, "INPUT-SIZE 8\n");
+ (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void)fprintf(sp, "RANK 1\n");
+ (void)fprintf(sp, "OUTPUT-CLASS IN\n");
+ (void)fprintf(sp, "OUTPUT-SIZE 8\n");
+ (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void)fprintf(sp, "DIMENSION-SIZES 4\n");
+ (void)fprintf(sp, "\n");
(void)HDfclose(sp);
}
return (EXIT_SUCCESS);
diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c
index c01df38..96ee5cd 100644
--- a/tools/test/h5jam/getub.c
+++ b/tools/test/h5jam/getub.c
@@ -35,9 +35,9 @@ static struct h5_long_options l_opts[] = {{"c", require_arg, 'c'}, /* input file
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "usage: %s -c nb file] \n", prog);
- HDfprintf(stdout, " print first 'nb' byts of file to stdoug.\n");
+ fflush(stdout);
+ fprintf(stdout, "usage: %s -c nb file] \n", prog);
+ fprintf(stdout, " print first 'nb' byts of file to stdoug.\n");
}
/*-------------------------------------------------------------------------
@@ -64,14 +64,14 @@ parse_command_line(int argc, const char *const *argv)
case '?':
default:
usage(h5tools_getprogname());
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end switch */
} /* end while */
if (argc <= H5_optind) {
error_msg("missing file name\n");
usage(h5tools_getprogname());
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
} /* end parse_command_line() */
@@ -120,7 +120,7 @@ main(int argc, char *argv[])
goto error;
} /* end if */
- if (NULL == (buf = (char *)HDmalloc((unsigned)(size + 1)))) {
+ if (NULL == (buf = (char *)malloc((unsigned)(size + 1)))) {
error_msg("can't allocate buffer \n");
goto error;
} /* end if */
@@ -137,15 +137,15 @@ main(int argc, char *argv[])
} /* end if */
/* close things and exit */
- HDfree(filename);
- HDfree(buf);
+ free(filename);
+ free(buf);
HDclose(fd);
return EXIT_SUCCESS;
error:
- HDfree(filename);
- HDfree(buf);
+ free(filename);
+ free(buf);
if (fd >= 0)
HDclose(fd);
return EXIT_FAILURE;
diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c
index bfeb92d..3bb332c 100644
--- a/tools/test/h5jam/h5jamgentest.c
+++ b/tools/test/h5jam/h5jamgentest.c
@@ -326,7 +326,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill)
goto error;
/* Fill buf with pattern */
- HDmemset(buf, '\0', ub_size);
+ memset(buf, '\0', ub_size);
bp = buf;
for (u = 0; u < ub_fill; u++)
*bp++ = pattern[u % 10];
@@ -369,7 +369,7 @@ create_textfile(const char *name, size_t size)
if ((fd = HDcreat(name, 0777)) < 0)
goto error;
- if (NULL == (buf = (char *)HDcalloc(size, 1)))
+ if (NULL == (buf = (char *)calloc(size, 1)))
goto error;
/* Fill buf with pattern */
@@ -380,13 +380,13 @@ create_textfile(const char *name, size_t size)
if (HDwrite(fd, buf, size) < 0)
goto error;
- HDfree(buf);
+ free(buf);
HDclose(fd);
return SUCCEED;
error:
- HDfree(buf);
+ free(buf);
if (fd >= 0)
HDclose(fd);
@@ -420,6 +420,6 @@ main(void)
return EXIT_SUCCESS;
error:
- HDfprintf(stderr, "h5jam test generator FAILED\n");
+ fprintf(stderr, "h5jam test generator FAILED\n");
return EXIT_FAILURE;
}
diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c
index d0e717a..501ecc5 100644
--- a/tools/test/h5jam/tellub.c
+++ b/tools/test/h5jam/tellub.c
@@ -37,11 +37,11 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no_arg,
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "usage: %s h5_file\n", prog);
- HDfprintf(stdout, " Check that h5_fil is HDF5 file and print size of user block \n");
- HDfprintf(stdout, " %s -h\n", prog);
- HDfprintf(stdout, " Print a usage message and exit\n");
+ fflush(stdout);
+ fprintf(stdout, "usage: %s h5_file\n", prog);
+ fprintf(stdout, " Check that h5_fil is HDF5 file and print size of user block \n");
+ fprintf(stdout, " %s -h\n", prog);
+ fprintf(stdout, " Print a usage message and exit\n");
} /* end usage() */
/*-------------------------------------------------------------------------
@@ -85,7 +85,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -156,7 +156,7 @@ main(int argc, char *argv[])
goto done;
}
- HDprintf("%ld\n", (long)usize);
+ printf("%ld\n", (long)usize);
done:
H5Pclose(plist);
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index bc22e8d..8910abb 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -329,19 +329,19 @@ main(void)
for (i = 0; i < 2; i++) {
hbool_t external = (i & 1) ? TRUE : FALSE;
if (generate_int32le_1d(external) < 0)
- HDprintf("A generate_int32le_1d failed!\n");
+ printf("A generate_int32le_1d failed!\n");
if (generate_int32le_2d(external) < 0)
- HDprintf("A generate_int32le_2d failed!\n");
+ printf("A generate_int32le_2d failed!\n");
if (generate_int32le_3d(external) < 0)
- HDprintf("A generate_int32le_3d failed!\n");
+ printf("A generate_int32le_3d failed!\n");
if (generate_uint8be(external) < 0)
- HDprintf("A generate_uint8be failed!\n");
+ printf("A generate_uint8be failed!\n");
if (generate_f32le(external) < 0)
- HDprintf("A generate_f32le failed!\n");
+ printf("A generate_f32le failed!\n");
} /* end for external data storage or not */
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index d8a4732..1c47827 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -194,8 +194,8 @@ main(void)
h5tools_init();
/* initialize */
- HDmemset(&diff_options, 0, sizeof(diff_opt_t));
- HDmemset(&pack_options, 0, sizeof(pack_opt_t));
+ memset(&diff_options, 0, sizeof(diff_opt_t));
+ memset(&pack_options, 0, sizeof(pack_opt_t));
/* run tests */
puts("Testing h5repack:");
@@ -222,7 +222,7 @@ main(void)
*/
TESTING(" files with file space info setting--no options (-S, -P, -T, -G) are set");
j = 0; /* #0 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
@@ -239,7 +239,7 @@ main(void)
TESTING(" files with file space info setting--all options -S, -P, -T, -G are set");
++j; /* #1 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
@@ -259,7 +259,7 @@ main(void)
TESTING(" files with file space info setting--options -S and -T are set");
++j; /* #2 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
@@ -278,7 +278,7 @@ main(void)
if (h5_using_default_driver(NULL)) {
TESTING(" files with file space info setting-- options -S and -P are set & -L");
++j; /* #3 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if (h5repack_init(&pack_options, 0, TRUE) < 0)
GOERROR;
@@ -296,7 +296,7 @@ main(void)
TESTING(" files with file space info setting-- options -P and -T are set & -L");
++j; /* #4 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if (h5repack_init(&pack_options, 0, TRUE) < 0)
GOERROR;
@@ -314,7 +314,7 @@ main(void)
TESTING(" files with file space info setting-- options -S and -G are set & -L");
++j; /* #5 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if (h5repack_init(&pack_options, 0, TRUE) < 0)
GOERROR;
@@ -332,7 +332,7 @@ main(void)
TESTING(" files with file space info setting-- options -S, -P, -T, -G are set");
++j; /* #6 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
@@ -352,7 +352,7 @@ main(void)
TESTING(" files with file space info setting-- options -S, -T, -G are set & -L");
++j; /* #7 */
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if (h5repack_init(&pack_options, 0, TRUE) < 0)
GOERROR;
@@ -2040,7 +2040,7 @@ make_testfiles(void)
* default: strategy=FSM_AGGR, persist=FALSE, threshold=1
* default: inpage=4096
*/
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (H5Fclose(fid) < 0)
@@ -2061,7 +2061,7 @@ make_testfiles(void)
return -1;
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
return -1;
if (H5Fclose(fid) < 0)
@@ -2080,7 +2080,7 @@ make_testfiles(void)
return -1;
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
return -1;
if (H5Fclose(fid) < 0)
@@ -2103,7 +2103,7 @@ make_testfiles(void)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0)
return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
return -1;
if (H5Fclose(fid) < 0)
@@ -2125,7 +2125,7 @@ make_testfiles(void)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0)
return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
return -1;
if (H5Fclose(fid) < 0)
@@ -2145,7 +2145,7 @@ make_testfiles(void)
return -1;
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
return -1;
if (H5Fclose(fid) < 0)
@@ -2168,7 +2168,7 @@ make_testfiles(void)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0)
return -1;
- HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
+ assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
return -1;
if (H5Fclose(fid) < 0)
@@ -2505,7 +2505,7 @@ make_szip(hid_t loc_id)
if (H5Pclose(dcpl) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -2517,7 +2517,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return -1;
}
@@ -2590,7 +2590,7 @@ make_deflate(hid_t loc_id)
if (H5Pclose(dcpl) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -2602,7 +2602,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return -1;
}
@@ -2660,7 +2660,7 @@ make_shuffle(hid_t loc_id)
if (H5Pclose(dcpl) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -2672,7 +2672,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return -1;
}
@@ -2733,7 +2733,7 @@ make_fletcher32(hid_t loc_id)
if (H5Pclose(dcpl) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -2745,7 +2745,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return -1;
}
@@ -2838,7 +2838,7 @@ make_nbit(hid_t loc_id)
if (H5Tclose(dtid) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -2853,7 +2853,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return -1;
}
@@ -2940,7 +2940,7 @@ make_scaleoffset(hid_t loc_id)
if (H5Pclose(dcpl) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -2955,7 +2955,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return -1;
}
@@ -3124,7 +3124,7 @@ make_all_filters(hid_t loc_id)
if (H5Pclose(dcpl) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -3139,7 +3139,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return -1;
}
@@ -3321,7 +3321,7 @@ make_layout(hid_t loc_id)
if (H5Pclose(dcpl) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -3333,7 +3333,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return -1;
}
@@ -3406,7 +3406,7 @@ error:
}
H5E_END_TRY;
- HDfree(s_buf);
+ free(s_buf);
return (ret_value);
@@ -3533,8 +3533,8 @@ make_layout3(hid_t loc_id)
if (H5Pclose(dcpl3) < 0)
goto error;
- HDfree(buf1);
- HDfree(buf2);
+ free(buf1);
+ free(buf2);
return 0;
@@ -3549,8 +3549,8 @@ error:
}
H5E_END_TRY;
- HDfree(buf1);
- HDfree(buf2);
+ free(buf1);
+ free(buf2);
return -1;
}
@@ -3656,14 +3656,14 @@ make_big(hid_t loc_id)
goto out;
/* initialize buffer to 0 */
- buf = (signed char *)HDcalloc(nelmts, size);
+ buf = (signed char *)calloc(nelmts, size);
if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0)
goto out;
if (H5Dwrite(did, H5T_NATIVE_SCHAR, m_sid, f_sid, H5P_DEFAULT, buf) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
/* close */
@@ -3787,7 +3787,7 @@ make_userblock(void)
/* Write userblock data */
nwritten = HDwrite(fd, ub, (size_t)USERBLOCK_SIZE);
- HDassert(nwritten == USERBLOCK_SIZE);
+ assert(nwritten == USERBLOCK_SIZE);
/* Close file */
HDclose(fd);
@@ -3852,7 +3852,7 @@ verify_userblock(const char *filename)
/* Read userblock data */
nread = HDread(fd, ub, (size_t)USERBLOCK_SIZE);
- HDassert(nread == USERBLOCK_SIZE);
+ assert(nread == USERBLOCK_SIZE);
/* Verify userblock data */
for (u = 0; u < USERBLOCK_SIZE; u++)
@@ -3902,7 +3902,7 @@ make_userblock_file(void)
/* write userblock data */
nwritten = HDwrite(fd, ub, (size_t)USERBLOCK_SIZE);
- HDassert(nwritten == USERBLOCK_SIZE);
+ assert(nwritten == USERBLOCK_SIZE);
/* close file */
HDclose(fd);
@@ -4116,10 +4116,10 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
/* Allocate and initialize VL dataset to write */
buf5[0].len = 1;
- buf5[0].p = HDmalloc(1 * sizeof(int));
+ buf5[0].p = malloc(1 * sizeof(int));
((int *)buf5[0].p)[0] = 1;
buf5[1].len = 2;
- buf5[1].p = HDmalloc(2 * sizeof(int));
+ buf5[1].p = malloc(2 * sizeof(int));
((int *)buf5[1].p)[0] = 2;
((int *)buf5[1].p)[1] = 3;
@@ -4175,10 +4175,10 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
/* allocate and initialize array data to write */
size = (TEST_BUFSIZE / sizeof(double) + 1) * sizeof(double);
- dbuf = (double *)HDmalloc(size);
+ dbuf = (double *)malloc(size);
if (NULL == dbuf) {
- HDprintf("\nError: Cannot allocate memory for \"arrayd\" data buffer size %dMB.\n",
- (int)size / 1000000);
+ printf("\nError: Cannot allocate memory for \"arrayd\" data buffer size %dMB.\n",
+ (int)size / 1000000);
goto out;
}
@@ -4192,16 +4192,16 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
/* create a type larger than TEST_BUFSIZE */
if ((tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, 1, tdims)) < 0) {
- HDfree(dbuf);
+ free(dbuf);
goto out;
}
size = H5Tget_size(tid);
if ((sid = H5Screate_simple(1, sdims, NULL)) < 0) {
- HDfree(dbuf);
+ free(dbuf);
goto out;
}
if ((did = H5Dcreate2(loc_id, "arrayd", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDfree(dbuf);
+ free(dbuf);
goto out;
}
#if defined(WRITE_ARRAY)
@@ -4212,7 +4212,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
H5Dclose(did);
H5Tclose(tid);
H5Sclose(sid);
- HDfree(dbuf);
+ free(dbuf);
}
/*-------------------------------------------------------------------------
@@ -4243,7 +4243,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf12, 'z', sizeof buf12);
+ memset(buf12, 'z', sizeof buf12);
}
if ((tid = H5Tcopy(H5T_C_S1)) < 0)
@@ -4261,7 +4261,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf22, 0, sizeof buf22);
+ memset(buf22, 0, sizeof buf22);
}
if ((tid = H5Tcopy(H5T_STD_B8LE)) < 0)
@@ -4290,7 +4290,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf32, 0, sizeof buf32);
+ memset(buf32, 0, sizeof buf32);
}
if ((tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t))) < 0)
@@ -4343,7 +4343,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
for (j = 0; j < 2; j++) {
unsigned l;
- buf52[i][j].p = HDmalloc((i + 1) * sizeof(int));
+ buf52[i][j].p = malloc((i + 1) * sizeof(int));
buf52[i][j].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++) {
if (make_diffs)
@@ -4377,7 +4377,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf62, 0, sizeof buf62);
+ memset(buf62, 0, sizeof buf62);
}
if ((tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray)) < 0)
@@ -4393,8 +4393,8 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf72, 0, sizeof buf72);
- HDmemset(buf82, 0, sizeof buf82);
+ memset(buf72, 0, sizeof buf72);
+ memset(buf82, 0, sizeof buf82);
}
if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -4431,7 +4431,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf13, 'z', sizeof buf13);
+ memset(buf13, 'z', sizeof buf13);
}
if ((tid = H5Tcopy(H5T_C_S1)) < 0)
@@ -4552,7 +4552,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
for (k = 0; k < 2; k++) {
unsigned l;
- buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int));
+ buf53[i][j][k].p = malloc((i + 1) * sizeof(int));
buf53[i][j][k].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++) {
if (make_diffs)
@@ -4676,8 +4676,8 @@ make_dset_reg_ref(hid_t loc_id)
int retval = -1; /* return value */
/* Allocate write & read buffers */
- wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
- dwbuf = (int *)HDmalloc(sizeof(int) * SPACE2_DIM1 * SPACE2_DIM2);
+ wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
+ dwbuf = (int *)malloc(sizeof(int) * SPACE2_DIM1 * SPACE2_DIM2);
/* Create dataspace for datasets */
if ((sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL)) < 0)
@@ -4738,9 +4738,9 @@ make_dset_reg_ref(hid_t loc_id)
out:
if (wbuf)
- HDfree(wbuf);
+ free(wbuf);
if (dwbuf)
- HDfree(dwbuf);
+ free(dwbuf);
H5E_BEGIN_TRY
{
@@ -5008,10 +5008,10 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
/* Allocate and initialize VL dataset to write */
buf5[0].len = 1;
- buf5[0].p = HDmalloc(1 * sizeof(int));
+ buf5[0].p = malloc(1 * sizeof(int));
((int *)buf5[0].p)[0] = 1;
buf5[1].len = 2;
- buf5[1].p = HDmalloc(2 * sizeof(int));
+ buf5[1].p = malloc(2 * sizeof(int));
((int *)buf5[1].p)[0] = 2;
((int *)buf5[1].p)[1] = 3;
@@ -5124,7 +5124,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*-------------------------------------------------------------------------
*/
if (make_diffs) {
- HDmemset(buf12, 'z', sizeof buf12);
+ memset(buf12, 'z', sizeof buf12);
}
/*
@@ -5163,7 +5163,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf22, 0, sizeof buf22);
+ memset(buf22, 0, sizeof buf22);
}
/*
@@ -5221,7 +5221,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*-------------------------------------------------------------------------
*/
if (make_diffs) {
- HDmemset(buf32, 0, sizeof buf32);
+ memset(buf32, 0, sizeof buf32);
}
/*
@@ -5314,7 +5314,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
for (j = 0; j < 2; j++) {
unsigned l;
- buf52[i][j].p = HDmalloc((i + 1) * sizeof(int));
+ buf52[i][j].p = malloc((i + 1) * sizeof(int));
buf52[i][j].len = (size_t)(i + 1);
for (l = 0; l < i + 1; l++)
if (make_diffs)
@@ -5366,7 +5366,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf62, 0, sizeof buf62);
+ memset(buf62, 0, sizeof buf62);
}
/*
buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}};
@@ -5408,8 +5408,8 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf72, 0, sizeof buf72);
- HDmemset(buf82, 0, sizeof buf82);
+ memset(buf72, 0, sizeof buf72);
+ memset(buf82, 0, sizeof buf82);
}
/*
Attribute: <integer2D> and <integer2D>
@@ -5449,7 +5449,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*/
if (make_diffs) {
- HDmemset(buf13, 'z', sizeof buf13);
+ memset(buf13, 'z', sizeof buf13);
}
/*
@@ -5759,7 +5759,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
for (k = 0; k < 2; k++) {
unsigned l;
- buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int));
+ buf53[i][j][k].p = malloc((i + 1) * sizeof(int));
buf53[i][j][k].len = (size_t)i + 1;
for (l = 0; l < i + 1; l++)
if (make_diffs)
@@ -6202,7 +6202,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id)
/* ref to dset */
status = H5Rcreate(&data_attr_objref[0], file_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6210,7 +6210,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id)
/* ref to group */
status = H5Rcreate(&data_attr_objref[1], file_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6218,7 +6218,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id)
/* ref to datatype */
status = H5Rcreate(&data_attr_objref[2], file_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6226,7 +6226,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id)
/* create attr with obj ref type */
status = make_attr(obj_id, 1, dim_attr_objref, "Attr_OBJREF", H5T_STD_REF_OBJ, data_attr_objref);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6266,7 +6266,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id)
*/
sid_regrefed_dset = H5Screate_simple(2, dim_regrefed_dset, NULL);
if (sid_regrefed_dset < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6274,7 +6274,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id)
/* select elements space for reference */
status = H5Sselect_elements(sid_regrefed_dset, H5S_SELECT_SET, (size_t)3, coords_regrefed_dset[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6282,7 +6282,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id)
/* create region reference from elements space */
status = H5Rcreate(&data_attr_regref[0], file_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_regrefed_dset);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6290,7 +6290,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id)
/* create attr with region ref type */
status = make_attr(obj_id, 1, dim_attr_regref, "Attr_REGREF", H5T_STD_REF_DSETREG, data_attr_regref);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6335,21 +6335,21 @@ gen_refered_objs(hid_t loc_id)
*/
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
did1 = H5Dcreate2(loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (did1 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6360,7 +6360,7 @@ gen_refered_objs(hid_t loc_id)
*/
gid = H5Gcreate2(loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6372,7 +6372,7 @@ gen_refered_objs(hid_t loc_id)
tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6383,7 +6383,7 @@ gen_refered_objs(hid_t loc_id)
*/
sid2 = H5Screate_simple(2, dims2, NULL);
if (sid2 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6391,7 +6391,7 @@ gen_refered_objs(hid_t loc_id)
/* create normal dataset which is referred */
did2 = H5Dcreate2(loc_id, NAME_OBJ_DS2, H5T_STD_I8LE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (did2 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6399,7 +6399,7 @@ gen_refered_objs(hid_t loc_id)
/* write values to dataset */
status = H5Dwrite(did2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6455,7 +6455,7 @@ gen_obj_ref(hid_t loc_id)
/* obj ref to dataset */
status = H5Rcreate(&objref_buf[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6463,7 +6463,7 @@ gen_obj_ref(hid_t loc_id)
/* obj ref to group */
status = H5Rcreate(&objref_buf[1], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6471,7 +6471,7 @@ gen_obj_ref(hid_t loc_id)
/* obj ref to named-datatype */
status = H5Rcreate(&objref_buf[2], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6481,21 +6481,21 @@ gen_obj_ref(hid_t loc_id)
*/
sid = H5Screate_simple(1, dims_dset_objref, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
oid = H5Dcreate2(loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, objref_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6507,7 +6507,7 @@ gen_obj_ref(hid_t loc_id)
/* add attribute with obj ref */
status = add_attr_with_objref(loc_id, oid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6515,7 +6515,7 @@ gen_obj_ref(hid_t loc_id)
/* add attribute with region ref */
status = add_attr_with_regref(loc_id, oid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6567,7 +6567,7 @@ gen_region_ref(hid_t loc_id)
sid_trg = H5Screate_simple(2, dims_trg, NULL);
if (sid_trg < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6575,7 +6575,7 @@ gen_region_ref(hid_t loc_id)
/* select elements space for reference */
status = H5Sselect_elements(sid_trg, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6583,7 +6583,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference from elements space */
status = H5Rcreate(&rr_data[0], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6591,7 +6591,7 @@ gen_region_ref(hid_t loc_id)
/* select hyperslab space for reference */
status = H5Sselect_hyperslab(sid_trg, H5S_SELECT_SET, start, stride, count, block);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6599,7 +6599,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference from hyperslab space */
status = H5Rcreate(&rr_data[1], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6607,7 +6607,7 @@ gen_region_ref(hid_t loc_id)
/* Create dataspace. */
sid_ref = H5Screate_simple(1, dims1, NULL);
if (sid_ref < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6616,7 +6616,7 @@ gen_region_ref(hid_t loc_id)
oid_ref =
H5Dcreate2(loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid_ref, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid_ref < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6624,7 +6624,7 @@ gen_region_ref(hid_t loc_id)
/* write data as region references */
status = H5Dwrite(oid_ref, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6636,7 +6636,7 @@ gen_region_ref(hid_t loc_id)
/* add attribute with obj ref */
status = add_attr_with_objref(loc_id, oid_ref);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6644,7 +6644,7 @@ gen_region_ref(hid_t loc_id)
/* add attribute with region ref */
status = add_attr_with_regref(loc_id, oid_ref);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6677,21 +6677,21 @@ make_references(hid_t loc_id)
/* add target objects */
status = gen_refered_objs(loc_id);
if (status == FAIL) {
- HDfprintf(stderr, "Failed to generate referenced object.\n");
+ fprintf(stderr, "Failed to generate referenced object.\n");
ret = FAIL;
}
/* add object reference */
status = gen_obj_ref(loc_id);
if (status == FAIL) {
- HDfprintf(stderr, "Failed to generate object reference.\n");
+ fprintf(stderr, "Failed to generate object reference.\n");
ret = FAIL;
}
/* add region reference */
status = gen_region_ref(loc_id);
if (status == FAIL) {
- HDfprintf(stderr, "Failed to generate region reference.\n");
+ fprintf(stderr, "Failed to generate region reference.\n");
ret = FAIL;
}
@@ -6811,7 +6811,7 @@ make_complex_attr_references(hid_t loc_id)
objdid = H5Dcreate2(loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, objsid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(objdid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6820,7 +6820,7 @@ make_complex_attr_references(hid_t loc_id)
objtid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, objtid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6831,7 +6831,7 @@ make_complex_attr_references(hid_t loc_id)
* compound type which contain obj and region reference */
main_gid = H5Gcreate2(loc_id, "group_main", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (main_gid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6846,7 +6846,7 @@ make_complex_attr_references(hid_t loc_id)
status = H5Dwrite(main_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6869,7 +6869,7 @@ make_complex_attr_references(hid_t loc_id)
/* references to dataset */
status = H5Rcreate(&(comp_objref_data[0].val_objref), loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6878,7 +6878,7 @@ make_complex_attr_references(hid_t loc_id)
/* references to group */
status = H5Rcreate(&(comp_objref_data[1].val_objref), loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6887,7 +6887,7 @@ make_complex_attr_references(hid_t loc_id)
/* references to datatype */
status = H5Rcreate(&(comp_objref_data[2].val_objref), loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6901,7 +6901,7 @@ make_complex_attr_references(hid_t loc_id)
H5Acreate2(main_did, "Comp_OBJREF", comp_objref_tid, comp_objref_attr_sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(comp_objref_aid, comp_objref_tid, comp_objref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6922,13 +6922,13 @@ make_complex_attr_references(hid_t loc_id)
*/
status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate(&(comp_regref_data[0].val_regref), loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6942,7 +6942,7 @@ make_complex_attr_references(hid_t loc_id)
H5Acreate2(main_did, "Comp_REGREF", comp_regref_tid, comp_regref_attr_sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(comp_regref_aid, comp_regref_tid, comp_regref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6954,11 +6954,11 @@ make_complex_attr_references(hid_t loc_id)
* prepare vlen data
*/
vlen_objref_data[0].len = LEN0_VLEN_OBJREF;
- vlen_objref_data[0].p = HDmalloc(vlen_objref_data[0].len * sizeof(hobj_ref_t));
+ vlen_objref_data[0].p = malloc(vlen_objref_data[0].len * sizeof(hobj_ref_t));
vlen_objref_data[1].len = LEN1_VLEN_OBJREF;
- vlen_objref_data[1].p = HDmalloc(vlen_objref_data[1].len * sizeof(hobj_ref_t));
+ vlen_objref_data[1].p = malloc(vlen_objref_data[1].len * sizeof(hobj_ref_t));
vlen_objref_data[2].len = LEN2_VLEN_OBJREF;
- vlen_objref_data[2].p = HDmalloc(vlen_objref_data[2].len * sizeof(hobj_ref_t));
+ vlen_objref_data[2].p = malloc(vlen_objref_data[2].len * sizeof(hobj_ref_t));
/*
* create obj references
@@ -6967,7 +6967,7 @@ make_complex_attr_references(hid_t loc_id)
status =
H5Rcreate(&((hobj_ref_t *)vlen_objref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6975,7 +6975,7 @@ make_complex_attr_references(hid_t loc_id)
status =
H5Rcreate(&((hobj_ref_t *)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6983,7 +6983,7 @@ make_complex_attr_references(hid_t loc_id)
status =
H5Rcreate(&((hobj_ref_t *)vlen_objref_data[2].p)[0], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -7001,7 +7001,7 @@ make_complex_attr_references(hid_t loc_id)
H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(vlen_objref_attr_id, vlen_objref_attr_tid, vlen_objref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -7009,7 +7009,7 @@ make_complex_attr_references(hid_t loc_id)
/* close resource for vlen data */
status = H5Treclaim(vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, vlen_objref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -7022,21 +7022,21 @@ make_complex_attr_references(hid_t loc_id)
* prepare vlen data
*/
vlen_regref_data[0].len = LEN0_VLEN_REGREF;
- vlen_regref_data[0].p = HDmalloc(vlen_regref_data[0].len * sizeof(hdset_reg_ref_t));
+ vlen_regref_data[0].p = malloc(vlen_regref_data[0].len * sizeof(hdset_reg_ref_t));
/*
* create region reference
*/
status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate(&((hdset_reg_ref_t *)vlen_regref_data[0].p)[0], loc_id, NAME_OBJ_DS1,
H5R_DATASET_REGION, objsid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -7054,7 +7054,7 @@ make_complex_attr_references(hid_t loc_id)
H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(vlen_regref_attr_id, vlen_regref_attr_tid, vlen_regref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -7062,7 +7062,7 @@ make_complex_attr_references(hid_t loc_id)
/* close resource for vlen data */
status = H5Treclaim(vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
diff --git a/tools/test/h5repack/testh5repack_detect_szip.c b/tools/test/h5repack/testh5repack_detect_szip.c
index b2be484..02a6d2b 100644
--- a/tools/test/h5repack/testh5repack_detect_szip.c
+++ b/tools/test/h5repack/testh5repack_detect_szip.c
@@ -44,10 +44,10 @@ main(void)
#ifdef H5_HAVE_FILTER_SZIP
if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
- HDprintf("yes\n");
+ printf("yes\n");
return (1);
}
#endif /* H5_HAVE_FILTER_SZIP */
- HDprintf("no\n");
+ printf("no\n");
return (0);
}
diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c
index a8aefba..acd3a03 100644
--- a/tools/test/h5stat/h5stat_gentest.c
+++ b/tools/test/h5stat/h5stat_gentest.c
@@ -626,6 +626,6 @@ main(void)
return EXIT_SUCCESS;
error:
- HDfprintf(stderr, "h5stat test generator FAILED\n");
+ fprintf(stderr, "h5stat test generator FAILED\n");
return EXIT_FAILURE;
}
diff --git a/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c
index 37e7307..ec86ec4 100644
--- a/tools/test/misc/clear_open_chk.c
+++ b/tools/test/misc/clear_open_chk.c
@@ -18,9 +18,9 @@ static void usage(void);
static void
usage(void)
{
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Usage error!\n");
- HDfprintf(stdout, "Usage: clear_open_chk filename\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Usage error!\n");
+ fprintf(stdout, "Usage: clear_open_chk filename\n");
} /* usage() */
/*-------------------------------------------------------------------------
@@ -45,7 +45,7 @@ main(int argc, char *argv[])
/* Check the # of arguments */
if (argc != 2) {
usage();
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Get the file name */
@@ -53,18 +53,18 @@ main(int argc, char *argv[])
/* Try opening the file */
if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
- HDfprintf(stderr, "clear_open_chk: unable to open the file\n");
- HDfree(fname);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "clear_open_chk: unable to open the file\n");
+ free(fname);
+ exit(EXIT_FAILURE);
}
- HDfree(fname);
+ free(fname);
/* Close the file */
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "clear_open_chk: cannot close the file\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "clear_open_chk: cannot close the file\n");
+ exit(EXIT_FAILURE);
}
/* Return success */
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* main() */
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 666a3f7..15804fe 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -124,7 +124,7 @@ gen_cache_image_file(const char *fname)
if (H5Fclose(fid) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -140,7 +140,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return 1;
} /* gen_cache_image_file() */
@@ -600,10 +600,10 @@ main(void)
fflush(stderr);
/* Not going through library closing by calling _exit(0) with success */
- HD_exit(0);
+ _exit(0);
error:
/* Exit with failure */
- HD_exit(1);
+ _exit(1);
}
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
index 5b898db..cf91c79 100644
--- a/tools/test/misc/h5perf_gentest.c
+++ b/tools/test/misc/h5perf_gentest.c
@@ -85,20 +85,20 @@ main(int argc, char *argv[])
else if (strcmp(argv[i], "-z") == 0)
z = 1;
else if (strcmp(argv[i], "-h") == 0) {
- HDprintf("\nOPTONS:\n");
- HDprintf("\t-f F:\tname of the test file (default: %s).\n", FNAME);
- HDprintf("\t-g N:\tnumber of top level groups (default: %d).\n", NGROUPS);
- HDprintf("\t-d N:\tnumber of datasets (default: %d).\n", NDSETS);
- HDprintf("\t-a N:\tnumber of attributes (default: %d).\n", NATTRS);
- HDprintf("\t-r N:\tnumber of rows in the large compound dataset (default: %d).\n", NROWS);
- HDprintf("\t-s N:\tsize of dim0 in datasets (default: %d).\n", DIM0);
- HDprintf("\t-c N:\tchunk size of dim0 (default: %d).\n", (DIM0 / 10 + 1));
- HDprintf("\t-v N:\tmax vlen size (default: %d).\n", MAXVLEN);
- HDprintf("\t-l:\tuse latest format (default: no).\n");
- HDprintf("\t-z:\tuse gzip compression (default: no).\n");
- HDprintf("\t-h:\tthis help information.\n");
- HDprintf("Example:\n");
- HDprintf("\t./a.out -f test.h5 -g 10000 -d 5000 -a 500 -r 10000 -s 200 -c 20 -v 40 -l -z\n\n");
+ printf("\nOPTONS:\n");
+ printf("\t-f F:\tname of the test file (default: %s).\n", FNAME);
+ printf("\t-g N:\tnumber of top level groups (default: %d).\n", NGROUPS);
+ printf("\t-d N:\tnumber of datasets (default: %d).\n", NDSETS);
+ printf("\t-a N:\tnumber of attributes (default: %d).\n", NATTRS);
+ printf("\t-r N:\tnumber of rows in the large compound dataset (default: %d).\n", NROWS);
+ printf("\t-s N:\tsize of dim0 in datasets (default: %d).\n", DIM0);
+ printf("\t-c N:\tchunk size of dim0 (default: %d).\n", (DIM0 / 10 + 1));
+ printf("\t-v N:\tmax vlen size (default: %d).\n", MAXVLEN);
+ printf("\t-l:\tuse latest format (default: no).\n");
+ printf("\t-z:\tuse gzip compression (default: no).\n");
+ printf("\t-h:\tthis help information.\n");
+ printf("Example:\n");
+ printf("\t./a.out -f test.h5 -g 10000 -d 5000 -a 500 -r 10000 -s 200 -c 20 -v 40 -l -z\n\n");
exit(0);
}
}
diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c
index 04ac8e7..df1c312 100644
--- a/tools/test/misc/h5repart_gentest.c
+++ b/tools/test/misc/h5repart_gentest.c
@@ -36,13 +36,13 @@ main(void)
hsize_t dims[2] = {FAMILY_NUMBER, FAMILY_SIZE};
/* Set up data array */
- if (NULL == (buf_data = (int *)HDcalloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) {
- HDperror("HDcalloc");
- HDexit(EXIT_FAILURE);
+ if (NULL == (buf_data = (int *)calloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) {
+ HDperror("calloc");
+ exit(EXIT_FAILURE);
}
- if (NULL == (buf = (int **)HDcalloc(FAMILY_NUMBER, sizeof(buf_data)))) {
- HDperror("HDcalloc");
- HDexit(EXIT_FAILURE);
+ if (NULL == (buf = (int **)calloc(FAMILY_NUMBER, sizeof(buf_data)))) {
+ HDperror("calloc");
+ exit(EXIT_FAILURE);
}
for (i = 0; i < FAMILY_NUMBER; i++)
buf[i] = buf_data + (i * FAMILY_SIZE);
@@ -50,28 +50,28 @@ main(void)
/* Set property list and file name for FAMILY driver */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
HDperror("H5Pcreate");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) {
HDperror("H5Pset_fapl_family");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if ((file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
HDperror("H5Fcreate");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Create and write dataset */
if ((space = H5Screate_simple(2, dims, NULL)) < 0) {
HDperror("H5Screate_simple");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if ((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
HDperror("H5Dcreate2");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
for (i = 0; i < FAMILY_NUMBER; i++)
@@ -80,34 +80,34 @@ main(void)
if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0) {
HDperror("H5Dwrite");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (H5Sclose(space) < 0) {
HDperror("H5Sclose");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (H5Dclose(dset) < 0) {
HDperror("H5Dclose");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (H5Pclose(fapl) < 0) {
HDperror("H5Pclose");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (H5Fclose(file) < 0) {
HDperror("H5Fclose");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
HDputs(" PASSED");
- HDfflush(stdout);
+ fflush(stdout);
return EXIT_SUCCESS;
}
diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c
index 5c3ebf2..5951fd2 100644
--- a/tools/test/misc/repart_test.c
+++ b/tools/test/misc/repart_test.c
@@ -142,10 +142,10 @@ main(void)
if (nerrors)
goto error;
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
nerrors = MAX(1, nerrors);
- HDprintf("***** %d FAMILY FILE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %d FAMILY FILE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
} /* end main() */
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index 7764e34..f8fe076 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -51,7 +51,7 @@ main(void)
int result = 0;
herr_t error = 1;
- HDprintf("%-70s", "Testing alignment in compound datatypes");
+ printf("%-70s", "Testing alignment in compound datatypes");
HDstrcpy(string5, "Hi!");
HDunlink(fname);
@@ -122,7 +122,7 @@ main(void)
H5Dclose(set);
/* Now open the set, and read it back in */
- data = (char *)HDmalloc(H5Tget_size(fix));
+ data = (char *)malloc(H5Tget_size(fix));
if (!data) {
HDperror("malloc() failed");
@@ -146,39 +146,39 @@ out:
result = 1;
mname = H5Tget_member_name(fix, 0);
- HDprintf("%14s (%2d) %6s = %s\n", mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 0),
- string5, (char *)(data + H5Tget_member_offset(fix, 0)));
+ printf("%14s (%2d) %6s = %s\n", mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 0), string5,
+ (char *)(data + H5Tget_member_offset(fix, 0)));
if (mname)
H5free_memory(mname);
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
mname = H5Tget_member_name(fix, 1);
- HDprintf("Data comparison:\n"
- "%14s (%2d) %6f = %f\n"
- " %6f = %f\n",
- mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 1), (double)fok[0], (double)fptr[0],
- (double)fok[1], (double)fptr[1]);
+ printf("Data comparison:\n"
+ "%14s (%2d) %6f = %f\n"
+ " %6f = %f\n",
+ mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 1), (double)fok[0], (double)fptr[0],
+ (double)fok[1], (double)fptr[1]);
if (mname)
H5free_memory(mname);
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 2)));
mname = H5Tget_member_name(fix, 2);
- HDprintf("%14s (%2d) %6f = %f\n"
- " %6f = %6f\n",
- mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 2), (double)fnok[0],
- (double)fptr[0], (double)fnok[1], (double)fptr[1]);
+ printf("%14s (%2d) %6f = %f\n"
+ " %6f = %6f\n",
+ mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 2), (double)fnok[0], (double)fptr[0],
+ (double)fnok[1], (double)fptr[1]);
if (mname)
H5free_memory(mname);
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
- HDprintf("\n"
- "Short circuit\n"
- " %6f = %f\n"
- " %6f = %f\n"
- " %6f = %f\n"
- " %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]);
+ printf("\n"
+ "Short circuit\n"
+ " %6f = %f\n"
+ " %6f = %f\n"
+ " %6f = %f\n"
+ " %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*");
}
else {
@@ -186,7 +186,7 @@ out:
}
if (data)
- HDfree(data);
+ free(data);
H5Sclose(spc);
H5Tclose(cs6);
H5Tclose(cmp);
@@ -197,6 +197,6 @@ out:
H5Pclose(plist);
H5Fclose(fil);
HDunlink(fname);
- HDfflush(stdout);
+ fflush(stdout);
return result;
}
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index 9f6554d..289d7c0 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -134,7 +134,7 @@ create_dset1(hid_t file)
H5Dclose(dataset);
H5Pclose(dcpl);
H5Sclose(dataspace);
- HDfree(data);
+ free(data);
return 0;
error:
@@ -145,7 +145,7 @@ error:
H5Sclose(dataspace);
}
H5E_END_TRY;
- HDfree(data);
+ free(data);
return 1;
}
@@ -198,7 +198,7 @@ create_dset2(hid_t file)
H5Dclose(dataset);
H5Pclose(dcpl);
H5Sclose(dataspace);
- HDfree(data);
+ free(data);
return 0;
@@ -210,7 +210,7 @@ error:
H5Sclose(dataspace);
}
H5E_END_TRY;
- HDfree(data);
+ free(data);
return 1;
}
@@ -264,13 +264,12 @@ check_partial_chunks_perf(hid_t file)
end_t = H5_get_time();
if ((end_t - start_t) > 0.0)
- HDprintf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n",
- (end_t - start_t), nbytes_global);
+ printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n",
+ (end_t - start_t), nbytes_global);
else
- HDprintf(
- "1. Partial chunks: no total read time because timer is not available; number of bytes being "
- "read from file is %zu\n",
- nbytes_global);
+ printf("1. Partial chunks: no total read time because timer is not available; number of bytes being "
+ "read from file is %zu\n",
+ nbytes_global);
H5Dclose(dataset);
H5Sclose(filespace);
@@ -343,13 +342,12 @@ check_hash_value_perf(hid_t file)
end_t = H5_get_time();
if ((end_t - start_t) > 0.0)
- HDprintf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n",
- (end_t - start_t), nbytes_global);
+ printf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n",
+ (end_t - start_t), nbytes_global);
else
- HDprintf(
- "2. Hash value: no total read time because timer is not available; number of bytes being read "
- "from file is %zu\n",
- nbytes_global);
+ printf("2. Hash value: no total read time because timer is not available; number of bytes being read "
+ "from file is %zu\n",
+ nbytes_global);
H5Dclose(dataset);
H5Sclose(filespace);
@@ -407,6 +405,6 @@ main(void)
return 0;
error:
- HDfprintf(stderr, "*** ERRORS DETECTED ***\n");
+ fprintf(stderr, "*** ERRORS DETECTED ***\n");
return 1;
}
diff --git a/tools/test/perform/direct_write_perf.c b/tools/test/perform/direct_write_perf.c
index 0d94cf5..7772324 100644
--- a/tools/test/perform/direct_write_perf.c
+++ b/tools/test/perform/direct_write_perf.c
@@ -693,7 +693,7 @@ main(void)
int
main(void)
{
- HDfprintf(stdout, "No compression IO performance because zlib was not configured\n");
+ fprintf(stdout, "No compression IO performance because zlib was not configured\n");
return EXIT_SUCCESS;
}
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index c61e6a9..c184917 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -73,9 +73,9 @@ print_stats(const char *prefix,
H5_bandwidth(bw, sizeof(bw), (double)nbytes, e_time);
#ifdef H5_HAVE_GETRUSAGE
- HDprintf(HEADING "%1.2fuser %1.2fsystem %1.2felapsed %s\n", prefix, u_time, s_time, e_time, bw);
+ printf(HEADING "%1.2fuser %1.2fsystem %1.2felapsed %s\n", prefix, u_time, s_time, e_time, bw);
#else
- HDprintf(HEADING "%1.2felapsed %s\n", prefix, e_time, bw);
+ printf(HEADING "%1.2felapsed %s\n", prefix, e_time, bw);
#endif
}
@@ -100,10 +100,10 @@ synchronize(void)
int H5_ATTR_NDEBUG_UNUSED status;
status = HDsystem("sync");
- HDassert(status >= 0);
+ assert(status >= 0);
status = HDsystem("df >/dev/null");
- HDassert(status >= 0);
+ assert(status >= 0);
#endif
}
@@ -146,23 +146,23 @@ main(void)
* Win32 version 5.0 compiler.
* 1998-11-06 ptl
*/
- HDprintf("I/O request size is %1.1fMB\n", (double)(hssize_t)(size[0] * size[1]) / 1024.0 * 1024.0);
+ printf("I/O request size is %1.1fMB\n", (double)(hssize_t)(size[0] * size[1]) / 1024.0 * 1024.0);
/* Open the files */
file = H5Fcreate(HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(file >= 0);
+ assert(file >= 0);
fd = HDopen(RAW_FILE_NAME, O_RDWR | O_CREAT | O_TRUNC, 0666);
- HDassert(fd >= 0);
+ assert(fd >= 0);
/* Create the dataset */
file_space = H5Screate_simple(2, size, size);
- HDassert(file_space >= 0);
+ assert(file_space >= 0);
dset = H5Dcreate2(file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(dset >= 0);
- the_data = (unsigned char *)HDmalloc((size_t)(size[0] * size[1]));
+ assert(dset >= 0);
+ the_data = (unsigned char *)malloc((size_t)(size[0] * size[1]));
/* initial fill for lazy malloc */
- HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1]));
+ memset(the_data, 0xAA, (size_t)(size[0] * size[1]));
/* Fill raw */
synchronize();
@@ -170,11 +170,11 @@ main(void)
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
t_start = H5_get_time();
- HDfprintf(stderr, HEADING, "fill raw");
+ fprintf(stderr, HEADING, "fill raw");
for (u = 0; u < nwrite; u++) {
HDputc(PROGRESS, stderr);
- HDfflush(stderr);
- HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1]));
+ fflush(stderr);
+ memset(the_data, 0xAA, (size_t)(size[0] * size[1]));
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -193,12 +193,12 @@ main(void)
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
t_start = H5_get_time();
- HDfprintf(stderr, HEADING, "fill hdf5");
+ fprintf(stderr, HEADING, "fill hdf5");
for (u = 0; u < nread; u++) {
HDputc(PROGRESS, stderr);
- HDfflush(stderr);
+ fflush(stderr);
status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data);
- HDassert(status >= 0);
+ assert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -217,14 +217,14 @@ main(void)
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
t_start = H5_get_time();
- HDfprintf(stderr, HEADING, "out raw");
+ fprintf(stderr, HEADING, "out raw");
for (u = 0; u < nwrite; u++) {
HDputc(PROGRESS, stderr);
- HDfflush(stderr);
+ fflush(stderr);
offset = HDlseek(fd, (off_t)0, SEEK_SET);
- HDassert(0 == offset);
+ assert(0 == offset);
n = HDwrite(fd, the_data, (size_t)(size[0] * size[1]));
- HDassert(n >= 0 && (size_t)n == (size[0] * size[1]));
+ assert(n >= 0 && (size_t)n == (size[0] * size[1]));
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -243,12 +243,12 @@ main(void)
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
t_start = H5_get_time();
- HDfprintf(stderr, HEADING, "out hdf5");
+ fprintf(stderr, HEADING, "out hdf5");
for (u = 0; u < nwrite; u++) {
HDputc(PROGRESS, stderr);
- HDfflush(stderr);
+ fflush(stderr);
status = H5Dwrite(dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, the_data);
- HDassert(status >= 0);
+ assert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -267,14 +267,14 @@ main(void)
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
t_start = H5_get_time();
- HDfprintf(stderr, HEADING, "in raw");
+ fprintf(stderr, HEADING, "in raw");
for (u = 0; u < nread; u++) {
HDputc(PROGRESS, stderr);
- HDfflush(stderr);
+ fflush(stderr);
offset = HDlseek(fd, (off_t)0, SEEK_SET);
- HDassert(0 == offset);
+ assert(0 == offset);
n = HDread(fd, the_data, (size_t)(size[0] * size[1]));
- HDassert(n >= 0 && (size_t)n == (size[0] * size[1]));
+ assert(n >= 0 && (size_t)n == (size[0] * size[1]));
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -293,12 +293,12 @@ main(void)
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
t_start = H5_get_time();
- HDfprintf(stderr, HEADING, "in hdf5");
+ fprintf(stderr, HEADING, "in hdf5");
for (u = 0; u < nread; u++) {
HDputc(PROGRESS, stderr);
- HDfflush(stderr);
+ fflush(stderr);
status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data);
- HDassert(status >= 0);
+ assert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -312,22 +312,22 @@ main(void)
t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Read hyperslab */
- HDassert(size[0] > 20 && size[1] > 20);
+ assert(size[0] > 20 && size[1] > 20);
start[0] = start[1] = 10;
count[0] = count[1] = size[0] - 20;
status = H5Sselect_hyperslab(file_space, H5S_SELECT_SET, start, NULL, count, NULL);
- HDassert(status >= 0);
+ assert(status >= 0);
synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
t_start = H5_get_time();
- HDfprintf(stderr, HEADING, "in hdf5 partial");
+ fprintf(stderr, HEADING, "in hdf5 partial");
for (u = 0; u < nread; u++) {
HDputc(PROGRESS, stderr);
- HDfflush(stderr);
+ fflush(stderr);
status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data);
- HDassert(status >= 0);
+ assert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -347,7 +347,7 @@ main(void)
H5Sclose(file_space);
H5Fclose(file);
- HDfree(the_data);
+ free(the_data);
return 0;
}
diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c
index 257d3ec..82c7131 100644
--- a/tools/test/perform/overhead.c
+++ b/tools/test/perform/overhead.c
@@ -67,8 +67,8 @@ typedef enum fill_t { FILL_ALL, FILL_FORWARD, FILL_REVERSE, FILL_INWARD, FILL_OU
static void
usage(const char *prog)
{
- HDfprintf(stderr, "usage: %s [STYLE|cache] [LEFT [MIDDLE [RIGHT]]]\n", prog);
- HDfprintf(stderr, "\
+ fprintf(stderr, "usage: %s [STYLE|cache] [LEFT [MIDDLE [RIGHT]]]\n", prog);
+ fprintf(stderr, "\
STYLE is the order that the dataset is filled and should be one of:\n\
forward -- Fill the dataset from lowest address to highest\n\
address. This style tests the right split ratio.\n\
@@ -230,7 +230,7 @@ test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc
abort();
default:
/* unknown request */
- HDfprintf(stderr, "Unknown fill style\n");
+ fprintf(stderr, "Unknown fill style\n");
goto error;
break;
}
@@ -286,7 +286,7 @@ test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc
abort();
default:
/* unknown request */
- HDfprintf(stderr, "Unknown fill style\n");
+ fprintf(stderr, "Unknown fill style\n");
goto error;
break;
}
@@ -394,6 +394,6 @@ main(int argc, char *argv[])
return 0;
error:
- HDfprintf(stderr, "*** ERRORS DETECTED ***\n");
+ fprintf(stderr, "*** ERRORS DETECTED ***\n");
return 1;
}
diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c
index 6e62f6a..37a1ffd 100644
--- a/tools/test/perform/perf_meta.c
+++ b/tools/test/perform/perf_meta.c
@@ -399,8 +399,7 @@ create_attrs_1(void)
attr_t.avg = attr_t.total / (NUM_ATTRS * NUM_DSETS);
/* Print out the performance result */
- HDfprintf(stderr, "1. Create %d attributes for each of %d existing datasets\n", NUM_ATTRS,
- NUM_DSETS);
+ fprintf(stderr, "1. Create %d attributes for each of %d existing datasets\n", NUM_ATTRS, NUM_DSETS);
print_perf(open_t, close_t, attr_t);
}
@@ -500,7 +499,7 @@ create_attrs_2(void)
attr_t.avg = attr_t.total / (NUM_ATTRS * NUM_DSETS);
/* Print out the performance result */
- HDfprintf(stderr, "2. Create %d attributes for each of %d new datasets\n", NUM_ATTRS, NUM_DSETS);
+ fprintf(stderr, "2. Create %d attributes for each of %d new datasets\n", NUM_ATTRS, NUM_DSETS);
print_perf(create_t, close_t, attr_t);
}
@@ -608,8 +607,8 @@ create_attrs_3(void)
attr_t.avg = attr_t.total / (NUM_ATTRS * NUM_DSETS);
/* Print out the performance result */
- HDfprintf(stderr, "3. Create %d attributes for each of %d existing datasets for %d times\n",
- BATCH_ATTRS, NUM_DSETS, loop_num);
+ fprintf(stderr, "3. Create %d attributes for each of %d existing datasets for %d times\n",
+ BATCH_ATTRS, NUM_DSETS, loop_num);
print_perf(open_t, close_t, attr_t);
}
@@ -715,13 +714,13 @@ perf(p_time *perf_t, double start_t, double end_t)
void
print_perf(p_time open_t, p_time close_t, p_time attr_t)
{
- HDfprintf(stderr, "\t%s:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", open_t.func, open_t.avg, open_t.max,
- open_t.min);
- HDfprintf(stderr, "\tH5Dclose:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", close_t.avg, close_t.max,
- close_t.min);
+ fprintf(stderr, "\t%s:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", open_t.func, open_t.avg, open_t.max,
+ open_t.min);
+ fprintf(stderr, "\tH5Dclose:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", close_t.avg, close_t.max,
+ close_t.min);
if (NUM_ATTRS)
- HDfprintf(stderr, "\tH5A(create & close):\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", attr_t.avg,
- attr_t.max, attr_t.min);
+ fprintf(stderr, "\tH5A(create & close):\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", attr_t.avg, attr_t.max,
+ attr_t.min);
}
/*-------------------------------------------------------------------------
@@ -761,7 +760,7 @@ main(int argc, char **argv)
#ifdef H5_HAVE_PARALLEL
if (facc_type == FACC_DEFAULT || (facc_type != FACC_DEFAULT && MAINPROCESS))
#endif /*H5_HAVE_PARALLEL*/
- HDfprintf(stderr, "\t\tPerformance result of metadata for datasets and attributes\n\n");
+ fprintf(stderr, "\t\tPerformance result of metadata for datasets and attributes\n\n");
fapl = H5Pcreate(H5P_FILE_ACCESS);
#ifdef H5_HAVE_PARALLEL
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index 256289c..00b3140 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -84,13 +84,13 @@ error(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- HDfprintf(stderr, "%s: error: ", prog);
+ fprintf(stderr, "%s: error: ", prog);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
HDvfprintf(stderr, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
- HDfprintf(stderr, "\n");
+ fprintf(stderr, "\n");
va_end(ap);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/*
@@ -104,7 +104,7 @@ cleanup(void)
{
if (!HDgetenv(HDF5_NOCLEANUP))
HDunlink(filename);
- HDfree(filename);
+ free(filename);
}
static void
@@ -117,7 +117,7 @@ write_file(Bytef *source, uLongf sourceLen)
/* destination buffer needs to be at least 0.1% larger than sourceLen
* plus 12 bytes */
destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12;
- dest = (Bytef *)HDmalloc(destLen);
+ dest = (Bytef *)malloc(destLen);
if (!dest)
error("out of memory");
@@ -130,7 +130,7 @@ write_file(Bytef *source, uLongf sourceLen)
((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / MICROSECOND);
if (report_once_flag) {
- HDfprintf(stdout, "\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen);
+ fprintf(stdout, "\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen);
report_once_flag = 0;
}
@@ -151,7 +151,7 @@ write_file(Bytef *source, uLongf sourceLen)
d_ptr += rc;
}
- HDfree(dest);
+ free(dest);
}
/*
@@ -211,9 +211,9 @@ get_unique_name(void)
if (prefix)
/* 2 = 1 for '/' + 1 for null terminator */
- filename = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2);
+ filename = (char *)malloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2);
else
- filename = (char *)HDmalloc(HDstrlen(ZIP_PERF_FILE) + 1);
+ filename = (char *)malloc(HDstrlen(ZIP_PERF_FILE) + 1);
if (!filename)
error("out of memory");
@@ -235,30 +235,30 @@ get_unique_name(void)
static void
usage(void)
{
- HDfprintf(stdout, "usage: %s [OPTIONS]\n", prog);
- HDfprintf(stdout, " OPTIONS\n");
- HDfprintf(stdout, " -h, --help Print this usage message and exit\n");
- HDfprintf(stdout, " -1...-9 Level of compression, from 1 to 9\n");
- HDfprintf(stdout, " -c P, --compressability=P Percentage of compressability of the random\n");
- HDfprintf(stdout, " data you want [default: 0]");
- HDfprintf(stdout, " -s S, --file-size=S Maximum size of uncompressed file [default: 64M]\n");
- HDfprintf(stdout, " -B S, --max-buffer_size=S Maximum size of buffer [default: 1M]\n");
- HDfprintf(stdout, " -b S, --min-buffer_size=S Minimum size of buffer [default: 128K]\n");
- HDfprintf(stdout, " -p D, --prefix=D The directory prefix to place the file\n");
- HDfprintf(stdout, " -r, --random-test Use random data to write to the file\n");
- HDfprintf(stdout, " [default: no]\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " D - a directory which exists\n");
- HDfprintf(stdout, " P - a number between 0 and 100\n");
- HDfprintf(stdout, " S - is a size specifier, an integer >=0 followed by a size indicator:\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " K - Kilobyte (%d)\n", ONE_KB);
- HDfprintf(stdout, " M - Megabyte (%d)\n", ONE_MB);
- HDfprintf(stdout, " G - Gigabyte (%d)\n", ONE_GB);
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " Example: 37M = 37 Megabytes = %d bytes\n", 37 * ONE_MB);
- HDfprintf(stdout, "\n");
- HDfflush(stdout);
+ fprintf(stdout, "usage: %s [OPTIONS]\n", prog);
+ fprintf(stdout, " OPTIONS\n");
+ fprintf(stdout, " -h, --help Print this usage message and exit\n");
+ fprintf(stdout, " -1...-9 Level of compression, from 1 to 9\n");
+ fprintf(stdout, " -c P, --compressability=P Percentage of compressability of the random\n");
+ fprintf(stdout, " data you want [default: 0]");
+ fprintf(stdout, " -s S, --file-size=S Maximum size of uncompressed file [default: 64M]\n");
+ fprintf(stdout, " -B S, --max-buffer_size=S Maximum size of buffer [default: 1M]\n");
+ fprintf(stdout, " -b S, --min-buffer_size=S Minimum size of buffer [default: 128K]\n");
+ fprintf(stdout, " -p D, --prefix=D The directory prefix to place the file\n");
+ fprintf(stdout, " -r, --random-test Use random data to write to the file\n");
+ fprintf(stdout, " [default: no]\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " D - a directory which exists\n");
+ fprintf(stdout, " P - a number between 0 and 100\n");
+ fprintf(stdout, " S - is a size specifier, an integer >=0 followed by a size indicator:\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " K - Kilobyte (%d)\n", ONE_KB);
+ fprintf(stdout, " M - Megabyte (%d)\n", ONE_MB);
+ fprintf(stdout, " G - Gigabyte (%d)\n", ONE_GB);
+ fprintf(stdout, "\n");
+ fprintf(stdout, " Example: 37M = 37 Megabytes = %d bytes\n", 37 * ONE_MB);
+ fprintf(stdout, "\n");
+ fflush(stdout);
}
/*
@@ -319,7 +319,7 @@ fill_with_random_data(Bytef *src, uLongf src_len)
Bytef *buf = src;
int fd = HDopen("/dev/urandom", O_RDONLY, 0);
- HDfprintf(stdout, "Using /dev/urandom for random data\n");
+ fprintf(stdout, "Using /dev/urandom for random data\n");
if (fd < 0)
error(HDstrerror(errno));
@@ -339,7 +339,7 @@ fill_with_random_data(Bytef *src, uLongf src_len)
HDclose(fd);
}
else {
- HDfprintf(stdout, "Using random() for random data\n");
+ fprintf(stdout, "Using random() for random data\n");
for (u = 0; u < src_len; ++u)
src[u] = (Bytef)(0xff & HDrandom());
@@ -348,7 +348,7 @@ fill_with_random_data(Bytef *src, uLongf src_len)
if (compress_percent) {
size_t s = (size_t)((src_len * (uLongf)compress_percent) / 100);
- HDmemset(src, '\0', s);
+ memset(src, '\0', s);
}
}
@@ -364,7 +364,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
unsigned long i, iters;
iters = file_size / src_len;
- src = (Bytef *)HDcalloc(1, sizeof(Bytef) * src_len);
+ src = (Bytef *)calloc(1, sizeof(Bytef) * src_len);
if (!src) {
cleanup();
@@ -376,21 +376,21 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
if (random_test)
fill_with_random_data(src, src_len);
- HDfprintf(stdout, "Buffer size == ");
+ fprintf(stdout, "Buffer size == ");
if (src_len >= ONE_KB && (src_len % ONE_KB) == 0) {
if (src_len >= ONE_MB && (src_len % ONE_MB) == 0) {
- HDfprintf(stdout, "%ldMB", src_len / ONE_MB);
+ fprintf(stdout, "%ldMB", src_len / ONE_MB);
}
else {
- HDfprintf(stdout, "%ldKB", src_len / ONE_KB);
+ fprintf(stdout, "%ldKB", src_len / ONE_KB);
}
}
else {
- HDfprintf(stdout, "%ld", src_len);
+ fprintf(stdout, "%ld", src_len);
}
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
/* do uncompressed data write */
HDgettimeofday(&timer_start, NULL);
@@ -424,8 +424,8 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
total_time = ((double)timer_stop.tv_sec + ((double)timer_stop.tv_usec) / (double)MICROSECOND) -
((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / (double)MICROSECOND);
- HDfprintf(stdout, "\tUncompressed Write Time: %.2fs\n", total_time);
- HDfprintf(stdout, "\tUncompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time));
+ fprintf(stdout, "\tUncompressed Write Time: %.2fs\n", total_time);
+ fprintf(stdout, "\tUncompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time));
HDunlink(filename);
@@ -447,12 +447,12 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
total_time = ((double)timer_stop.tv_sec + ((double)timer_stop.tv_usec) / (double)MICROSECOND) -
((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / (double)MICROSECOND);
- HDfprintf(stdout, "\tCompressed Write Time: %.2fs\n", total_time);
- HDfprintf(stdout, "\tCompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time));
- HDfprintf(stdout, "\tCompression Time: %gs\n", compression_time);
+ fprintf(stdout, "\tCompressed Write Time: %.2fs\n", total_time);
+ fprintf(stdout, "\tCompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time));
+ fprintf(stdout, "\tCompression Time: %gs\n", compression_time);
HDunlink(filename);
- HDfree(src);
+ free(src);
}
}
@@ -527,12 +527,12 @@ main(int argc, char *argv[])
if (min_buf_size > max_buf_size)
error("minimum buffer size (%d) exceeds maximum buffer size (%d)", min_buf_size, max_buf_size);
- HDfprintf(stdout, "Filesize: %ld\n", file_size);
+ fprintf(stdout, "Filesize: %ld\n", file_size);
if (compress_level == Z_DEFAULT_COMPRESSION)
- HDfprintf(stdout, "Compression Level: 6\n");
+ fprintf(stdout, "Compression Level: 6\n");
else
- HDfprintf(stdout, "Compression Level: %d\n", compress_level);
+ fprintf(stdout, "Compression Level: %d\n", compress_level);
get_unique_name();
do_write_test(file_size, min_buf_size, max_buf_size);
@@ -552,7 +552,7 @@ main(int argc, char *argv[])
int
main(void)
{
- HDfprintf(stdout, "No compression IO performance because zlib was not configured\n");
+ fprintf(stdout, "No compression IO performance because zlib was not configured\n");
return EXIT_SUCCESS;
}
diff --git a/utils/tools/h5dwalk/h5dwalk.c b/utils/tools/h5dwalk/h5dwalk.c
index acb1724..9dcb4a8 100644
--- a/utils/tools/h5dwalk/h5dwalk.c
+++ b/utils/tools/h5dwalk/h5dwalk.c
@@ -120,7 +120,7 @@ create_default_separators(struct distribute_option *option, mfu_flist *flist, ui
double max_size_tmp;
const char *max_size_units;
mfu_format_bytes(*global_max_file_size, &max_size_tmp, &max_size_units);
- HDprintf("Max File Size: %.3lf %s\n", max_size_tmp, max_size_units);
+ printf("Max File Size: %.3lf %s\n", max_size_tmp, max_size_units);
/* round next_pow_2 to next multiple of 10 */
uint64_t max_magnitude_bin = (uint64_t)((ceil(log2((double)(*global_max_file_size)) / 10)) * 10);
@@ -213,15 +213,15 @@ print_flist_distribution(int file_histogram, struct distribute_option *option, m
uint64_t number;
double size_tmp;
const char *size_units;
- HDprintf("%-27s %s\n", "Range", "Number");
+ printf("%-27s %s\n", "Range", "Number");
for (size_t i = 0; i <= separators; i++) {
- HDprintf("%s", "[ ");
+ printf("%s", "[ ");
if (i == 0) {
- HDprintf("%7.3lf %3s", 0.000, "B");
+ printf("%7.3lf %3s", 0.000, "B");
}
else {
mfu_format_bytes((uint64_t)option->separators[i - 1], &size_tmp, &size_units);
- HDprintf("%7.3lf %3s", size_tmp, size_units);
+ printf("%7.3lf %3s", size_tmp, size_units);
}
printf("%s", " - ");
@@ -230,17 +230,17 @@ print_flist_distribution(int file_histogram, struct distribute_option *option, m
mfu_format_bytes((uint64_t)option->separators[i], &size_tmp, &size_units);
number = disttotal[i];
mfu_format_bytes((uint64_t)option->separators[i], &size_tmp, &size_units);
- HDprintf("%7.3lf %3s ) %" PRIu64 "\n", size_tmp, size_units, number);
+ printf("%7.3lf %3s ) %" PRIu64 "\n", size_tmp, size_units, number);
}
else {
if (i == separators) {
number = disttotal[i];
- HDprintf("%10s ) %" PRIu64 "\n", "MAX", number);
+ printf("%10s ) %" PRIu64 "\n", "MAX", number);
}
else {
number = disttotal[i];
mfu_format_bytes((uint64_t)option->separators[i], &size_tmp, &size_units);
- HDprintf("%7.3lf %3s ) %" PRIu64 "\n", size_tmp, size_units, number);
+ printf("%7.3lf %3s ) %" PRIu64 "\n", size_tmp, size_units, number);
}
}
}
@@ -268,7 +268,7 @@ distribute_separator_add(struct distribute_option *option, uint64_t separator)
count = option->separator_number;
option->separator_number++;
if (option->separator_number > MAX_DISTRIBUTE_SEPARATORS) {
- HDprintf("Too many separators");
+ printf("Too many separators");
return -1;
}
@@ -340,13 +340,13 @@ distribution_parse(struct distribute_option *option, const char *string)
}
if (mfu_abtoull(ptr, &separator) != MFU_SUCCESS) {
- HDprintf("Invalid separator \"%s\"\n", ptr);
+ printf("Invalid separator \"%s\"\n", ptr);
status = -1;
goto out;
}
if (distribute_separator_add(option, separator)) {
- HDprintf("Duplicated separator \"%llu\"\n", separator);
+ printf("Duplicated separator \"%llu\"\n", separator);
status = -1;
goto out;
}
@@ -450,8 +450,8 @@ print_file(mfu_flist flist, uint64_t idx)
const char *size_units;
mfu_format_bytes(size, &size_tmp, &size_units);
- HDprintf("%s %s %s %7.3f %3s %s %s\n", mode_format, username, groupname, size_tmp, size_units,
- modify_s, file);
+ printf("%s %s %s %7.3f %3s %s %s\n", mode_format, username, groupname, size_tmp, size_units, modify_s,
+ file);
}
else {
/* get type */
@@ -467,7 +467,7 @@ print_file(mfu_flist flist, uint64_t idx)
type_str = type_str_link;
}
- HDprintf("Type=%s File=%s\n", type_str, file);
+ printf("Type=%s File=%s\n", type_str, file);
}
}
@@ -521,8 +521,8 @@ print_file_text(mfu_flist flist, uint64_t idx, char *buffer, size_t bufsize)
const char *size_units;
mfu_format_bytes(size, &size_tmp, &size_units);
- numbytes = (size_t)snHDprintf(buffer, bufsize, "%s %s %s %7.3f %3s %s %s\n", mode_format, username,
- groupname, size_tmp, size_units, modify_s, file);
+ numbytes = (size_t)snprintf(buffer, bufsize, "%s %s %s %7.3f %3s %s %s\n", mode_format, username,
+ groupname, size_tmp, size_units, modify_s, file);
}
else {
/* get type */
@@ -538,7 +538,7 @@ print_file_text(mfu_flist flist, uint64_t idx, char *buffer, size_t bufsize)
type_str = type_str_link;
}
- numbytes = (size_t)snHDprintf(buffer, bufsize, "Type=%s File=%s\n", type_str, file);
+ numbytes = (size_t)snprintf(buffer, bufsize, "Type=%s File=%s\n", type_str, file);
}
return numbytes;
@@ -606,7 +606,7 @@ dh5tool_flist_write_text(const char *name, mfu_flist bflist)
/* change number of ranks to string to pass to MPI_Info */
char str_buf[12];
- HDprintf(str_buf, "%d", ranks);
+ printf(str_buf, "%d", ranks);
/* no. of I/O devices for lustre striping is number of ranks */
MPI_Info_set(info, "striping_factor", str_buf);
@@ -758,7 +758,7 @@ fill_file_list(mfu_flist new_flist, const char *config_filename, int myrank, int
char linebuf[PATH_MAX] = {
'\0',
};
- FILE *config = HDfopen(config_filename, "r");
+ FILE *config = fopen(config_filename, "r");
if (config == NULL)
return -1;
while (HDfgets(linebuf, sizeof(linebuf), config) != NULL) {
@@ -924,7 +924,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
int use_stdout = 0;
#ifdef H5_HAVE_WINDOWS
- HDprintf("ERROR: %s %s: Unable to support fork/exec on WINDOWS\n", PROGRAMNAME, __func__);
+ printf("ERROR: %s %s: Unable to support fork/exec on WINDOWS\n", PROGRAMNAME, __func__);
h5dwalk_exit(EXIT_FAILURE);
#else
@@ -943,7 +943,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
buf_cache = bufs;
#ifdef VERBOSE
if (buft_count == 0) {
- HDprintf("[%d] Initial buf_cache allocation: buft_count=%d\n", sg_mpi_rank, buft_count);
+ printf("[%d] Initial buf_cache allocation: buft_count=%d\n", sg_mpi_rank, buft_count);
}
#endif
bufs[buft_count++] = thisbuft = (buf_t *)MFU_CALLOC(1, sizeof(buf_t));
@@ -1006,7 +1006,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
/* Create a new read buffer */
#ifdef VERBOSE
- HDprintf("[%d] Allocate-1 a new read buffer:: buft_count=%d\n", sg_mpi_rank, buft_count);
+ printf("[%d] Allocate-1 a new read buffer:: buft_count=%d\n", sg_mpi_rank, buft_count);
#endif
bufs[buft_count++] = thisbuft = (buf_t *)MFU_CALLOC(1, sizeof(buf_t));
assert(thisbuft != NULL);
@@ -1033,8 +1033,8 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
thisbuft->count = 0;
thisbuft->chars += read_bytes;
#ifdef VERBOSE
- HDprintf("[%d] Allocate-2 a new read buffer:: buft_count=%d\n", sg_mpi_rank,
- buft_count);
+ printf("[%d] Allocate-2 a new read buffer:: buft_count=%d\n", sg_mpi_rank,
+ buft_count);
#endif
bufs[buft_count++] = thisbuft = (buf_t *)MFU_CALLOC(1, sizeof(buf_t));
assert(thisbuft != NULL);
@@ -1109,7 +1109,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
HDstrcpy(&logErrors[log_len - 3], "err");
}
if (mfu_debug_level == MFU_LOG_VERBOSE) {
- HDprintf("\tCreating logfile: %s\n", logpath);
+ printf("\tCreating logfile: %s\n", logpath);
fflush(stdout);
}
pid = fork();
@@ -1175,7 +1175,7 @@ MFU_PRED_EXEC(mfu_flist flist, uint64_t idx, void *arg)
argv[k++] = HDstrdup(toolname);
- HDmemset(cmdline, 0, sizeof(cmdline));
+ memset(cmdline, 0, sizeof(cmdline));
buf += HDstrlen(toolname) + 1;
/* Reconstruct the command line that the user provided for the h5tool */
for (k = 1; k < count; k++) {
@@ -1184,15 +1184,15 @@ MFU_PRED_EXEC(mfu_flist flist, uint64_t idx, void *arg)
mfu_flist flist_arg;
void *check_ptr[2] = {NULL, NULL};
- HDmemcpy(check_ptr, &buf[1], sizeof(void *));
+ memcpy(check_ptr, &buf[1], sizeof(void *));
flist_arg = (mfu_flist)check_ptr[0];
/* +2 (see below) accounts for the '&' and the trailing zero pad */
buf += sizeof(mfu_flist *) + 2;
fname_arg = mfu_flist_file_get_name(flist_arg, idx);
if (fname_arg == NULL) {
- HDprintf("[%d] Warning: Unable to resolve file_substitution %d (idx=%ld)\n", sg_mpi_rank,
- file_substituted, idx);
+ printf("[%d] Warning: Unable to resolve file_substitution %d (idx=%ld)\n", sg_mpi_rank,
+ file_substituted, idx);
argv[k] = HDstrdup(fname);
}
else {
@@ -1224,7 +1224,7 @@ int
MFU_PRED_PRINT(mfu_flist flist, uint64_t idx, void *arg __attribute__((unused)))
{
const char *name = mfu_flist_file_get_name(flist, idx);
- HDprintf("%s\n", name);
+ printf("%s\n", name);
return 1;
}
@@ -1257,7 +1257,7 @@ process_input_file(char *inputname, int myrank, int size)
char linebuf[PATH_MAX] = {
'\0',
};
- FILE *config = HDfopen(inputname, "r");
+ FILE *config = fopen(inputname, "r");
mfu_flist flist1 = NULL;
if (config == NULL)
@@ -1311,7 +1311,7 @@ process_input_file(char *inputname, int myrank, int size)
index++;
}
linebuf[0] = 0;
- HDfree(cmdline);
+ free(cmdline);
}
if (output_log_file) {
@@ -1352,7 +1352,7 @@ main(int argc, char *argv[])
#if 0
env_var = HDgetenv("HDF5_H5DWALK_PRINT_CMDLINE");
if (env_var) {
- int enable = HDatoi(env_var);
+ int enable = atoi(env_var);
if (enable) {
}
@@ -1517,7 +1517,7 @@ main(int argc, char *argv[])
}
}
if (count1 != count2) {
- HDprintf("config files have different file counts: (1) %d and (2) %d\n", count1, count2);
+ printf("config files have different file counts: (1) %d and (2) %d\n", count1, count2);
}
}
else if (numpaths > 0) {
@@ -1568,7 +1568,7 @@ main(int argc, char *argv[])
if (tool_selected && (args_byte_length > 0)) {
pred_head = mfu_pred_new();
- args_buf = (char *)HDmalloc((size_t)(args_byte_length + pathlen_total));
+ args_buf = (char *)malloc((size_t)(args_byte_length + pathlen_total));
}
/* filter files to only include hdf5 files */
@@ -1607,10 +1607,10 @@ main(int argc, char *argv[])
*ptr++ = '&';
/* Select which argument list should be used */
if (k == 0) {
- HDmemcpy(ptr, &flist1, sizeof(void *));
+ memcpy(ptr, &flist1, sizeof(void *));
}
if (k == 1) {
- HDmemcpy(ptr, &flist2, sizeof(void *));
+ memcpy(ptr, &flist2, sizeof(void *));
}
ptr += sizeof(mfu_flist *);
k++;
@@ -1708,5 +1708,5 @@ h5dwalk_exit(int status)
if (require_finalize)
MPI_Finalize();
- HDexit(status);
+ exit(status);
}